X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;ds=sidebyside;f=bluesky%2Fbluesky.h;h=f9e97f50e6dbb5abc0f86542543b9136ef96bb55;hb=4273ee04bdd5d6920d3ff0e5db488b8a2ddab249;hp=fc300750a553dc1895098aab8ef4bd223d1dc60c;hpb=f6697c903221f4f95972b7618f84cf86ff1e6bc0;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index fc30075..f9e97f5 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -38,6 +38,7 @@ typedef struct { } BlueSkyRCStr; BlueSkyRCStr *bluesky_string_new(gpointer data, gsize len); +BlueSkyRCStr *bluesky_string_new_from_gstring(GString *s); void bluesky_string_ref(BlueSkyRCStr *string); void bluesky_string_unref(BlueSkyRCStr *string); BlueSkyRCStr *bluesky_string_dup(BlueSkyRCStr *string); @@ -55,23 +56,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; @@ -210,6 +194,7 @@ void bluesky_insert_inode(BlueSkyFS *fs, BlueSkyInode *inode); void bluesky_dirent_destroy(gpointer dirent); uint64_t bluesky_directory_lookup(BlueSkyInode *inode, gchar *name); uint64_t bluesky_directory_ilookup(BlueSkyInode *inode, gchar *name); +BlueSkyDirent *bluesky_directory_read(BlueSkyInode *dir, uint32_t cookie); gboolean bluesky_directory_insert(BlueSkyInode *dir, const gchar *name, uint64_t inum); void bluesky_directory_dump(BlueSkyInode *dir);