Add support for byterange requests in the storage layer.
[bluesky.git] / bluesky / bluesky-private.h
index 2598772..1574a54 100644 (file)
@@ -116,6 +116,14 @@ struct BlueSkyStoreAsync {
     gchar *key;                 /* Key to read/write */
     BlueSkyRCStr *data;         /* Data read/to write */
 
+    /* For range requests on reads: starting byte offset and length; len 0
+     * implies reading to the end of the object.  At completion, the backend
+     * should set range_done if a range read was made; if not set the entire
+     * object was read and the storage layer will select out just the
+     * appropriate bytes. */
+    size_t start, len;
+    gboolean range_done;
+
     int result;                 /* Result code; 0 for success. */
     struct BlueSkyNotifierList *notifiers;
     gint notifier_count;