Add reference counting to asynchronous storage operations.
[bluesky.git] / bluesky / bluesky-private.h
index 7f5e646..0dd6446 100644 (file)
@@ -51,6 +51,8 @@ typedef struct {
     GMutex *lock;
     GCond *completion_cond;     /* Used to wait for operation to complete. */
 
+    gint refcount;              /* Reference count for destruction. */
+
     BlueSkyAsyncStatus status;
 
     BlueSkyStoreOp op;
@@ -82,8 +84,11 @@ void bluesky_store_register(const BlueSkyStoreImplementation *impl,
                             const gchar *name);
 
 BlueSkyStoreAsync *bluesky_store_async_new(BlueSkyStore *store);
+void bluesky_store_async_ref(BlueSkyStoreAsync *async);
+void bluesky_store_async_unref(BlueSkyStoreAsync *async);
 void bluesky_store_async_wait(BlueSkyStoreAsync *async);
 void bluesky_store_async_mark_complete(BlueSkyStoreAsync *async);
+void bluesky_store_async_submit(BlueSkyStoreAsync *async);
 
 #ifdef __cplusplus
 }