In-progress commit of online cleaner.
[bluesky.git] / bluesky / bluesky-private.h
index 20079da..adeb82e 100644 (file)
@@ -78,11 +78,13 @@ BlueSkyRCStr *bluesky_crypt_decrypt(BlueSkyRCStr *in, const uint8_t *key);
 void bluesky_crypt_block_encrypt(gchar *cloud_block, size_t len,
                                  BlueSkyCryptKeys *keys);
 gboolean bluesky_crypt_block_decrypt(gchar *cloud_block, size_t len,
-                                     BlueSkyCryptKeys *keys);
+                                     BlueSkyCryptKeys *keys,
+                                     gboolean allow_unauth);
 void bluesky_cloudlog_encrypt(GString *segment, BlueSkyCryptKeys *keys);
 void bluesky_cloudlog_decrypt(char *segment, size_t len,
                               BlueSkyCryptKeys *keys,
-                              BlueSkyRangeset *items);
+                              BlueSkyRangeset *items,
+                              gboolean allow_unauth);
 
 /* Storage layer.  Requests can be performed asynchronously, so these objects
  * help keep track of operations in progress. */
@@ -402,7 +404,8 @@ struct BlueSkyCacheFile {
     int disk_used;
     BlueSkyFS *fs;
     BlueSkyLog *log;
-    gboolean fetching, ready;   // Cloud data: downloading or ready for use
+    gboolean fetching;          // Cloud data: downloading or ready for use
+    gboolean complete;          // Complete file has been fetched from cloud
     int64_t atime;              // Access time, for cache management
     BlueSkyRangeset *items;     // Locations of valid items
     BlueSkyRangeset *prefetches;// Locations we have been requested to prefetch
@@ -469,6 +472,9 @@ void bluesky_inode_map_minimize(BlueSkyFS *fs);
 
 gboolean bluesky_checkpoint_load(BlueSkyFS *fs);
 
+/* Merging of log state with the work of the cleaner. */
+void bluesky_cleaner_find_checkpoint(BlueSkyFS *fs);
+
 #ifdef __cplusplus
 }
 #endif