X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky.h;h=3bdfd59cd76a7b9ac5a42ad293e2c257f388d281;hb=ccd8dcd110e04b43ae1d04a3b1ab058cc1761d8b;hp=21fd8551b95c9cc25c5567a548931f3b048f094a;hpb=f6cf25a6403fae7297c8d8913815dbd7a87f4f0b;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index 21fd855..3bdfd59 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -17,6 +17,14 @@ extern "C" { #endif +/* Various options to tweak for performance benchmarking purposes. */ +typedef struct { + /* Perform all get/put operations synchronously. */ + int synchronous_stores; +} BlueSkyOptions; + +extern BlueSkyOptions bluesky_options; + /* BlueSky status and error codes. Various frontends should translate these to * the appropriate error code for whatever protocol they implement. */ typedef enum { @@ -56,23 +64,6 @@ BlueSkyRCStr *bluesky_crypt_decrypt(BlueSkyRCStr *in, const uint8_t *key); /* Storage interface. This presents a key-value store abstraction, and can * have multiple implementations: in-memory, on-disk, in-cloud. */ -typedef struct { - /* Create a new store instance and return a handle to it. */ - gpointer (*create)(); - - /* Clean up any resources used by this store. */ - void (*destroy)(gpointer store); - - /* Fetch an item with the given name, or return NULL if not found. */ - BlueSkyRCStr * (*get)(gpointer store, const gchar *key); - - /* Store an item to the given key name. */ - void (*put)(gpointer store, const gchar *key, BlueSkyRCStr *val); -} BlueSkyStoreImplementation; - -void bluesky_store_register(const BlueSkyStoreImplementation *impl, - const gchar *name); - struct _BlueSkyStore; typedef struct _BlueSkyStore BlueSkyStore;