cache/engine.h
author terom@cl-543.hel-01.fi.sixxs.net
Thu, 07 Aug 2008 20:28:06 +0300
changeset 30 33e464fd6773
child 31 12d5361e7472
permissions -rw-r--r--
my hg working dir managed to break itself somehow... my attempt to fix that, and add some cache code :)
#ifndef CACHE_ENGINE_H
#define CACHE_ENGINE_H

struct cache_engine {
    /*
     * Allocate a `struct cache`-compatible struct and return it via cache_ptr.
     */
    int (fn_init*) (struct cache_engine *engine, struct cache **cache_ptr);
    
    /*
     * Allocate a `struct cache_op`-compatible struct and return it via cache_ptr.
     *
     * Begin the index lookup.
     */
    int (fn_op_start*) (struct cache *cache, struct cache_op **op_ptr, struct cache_key *key);
};

#endif /* CACHE_ENGINE_H */