summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorBryan Ischo <bryan@ischo.com>2008-07-03 11:51:19 +0000
committerBryan Ischo <bryan@ischo.com>2008-07-03 11:51:19 +0000
commitea29aa811f469e9fa3616eb73199185d7b5191a5 (patch)
tree52800a863868060b7c3671511ab06d47ae4ae06f /inc
parent1b6c5f1b4697416a32ddd1190541b09fb1931f21 (diff)
downloadceph-libs3-ea29aa811f469e9fa3616eb73199185d7b5191a5.tar.gz
* More work in progress; headers and stuff
Diffstat (limited to 'inc')
-rw-r--r--inc/libs3.h4
-rw-r--r--inc/private.h19
2 files changed, 22 insertions, 1 deletions
diff --git a/inc/libs3.h b/inc/libs3.h
index 8626bf2..ea05926 100644
--- a/inc/libs3.h
+++ b/inc/libs3.h
@@ -272,7 +272,8 @@ typedef struct S3MetaHeader
// This is the part after x-amz-meta-
const char *name;
- // This is everything after the colon, not including \r\n
+ // This is the value, not including any line terminators or leading or
+ // trailing whitespace.
const char *value;
} S3MetaHeader;
@@ -533,6 +534,7 @@ typedef struct S3RequestHeaders
* x-amz-meta-${METANAME}:${VALUE}, where the ${METANAME} and ${VALUE} are
* entirely up to the application.
**/
+ // xxx todo - convert to an array of S3MetaHeader structures
const char **metaHeaders;
} S3RequestHeaders;
diff --git a/inc/private.h b/inc/private.h
index b6758b6..1264aa2 100644
--- a/inc/private.h
+++ b/inc/private.h
@@ -176,6 +176,17 @@ typedef struct Request
// The callback data to pass to all of the callbacks
void *callbackData;
+ // responseHeaders.{requestId,requestId2,contentType,server,eTag} get
+ // copied into here. We allow 128 bytes for each header, plus \0 term.
+ char responseHeaderStrings[5 * 129];
+
+ // The length thus far of responseHeaderStrings
+ int responseHeaderStringsLen;
+
+ // responseHeaders.lastModified will be set to this if there is a
+ // LastModified header
+ struct timeval lastModified;
+
// responseHeaders.metaHeaders strings get copied into here
char responseMetaHeaderStrings[COMPACTED_META_HEADER_BUFFER_SIZE];
@@ -196,6 +207,14 @@ typedef struct Request
// This is set to nonzero after the haders callback has been made
int headersCallbackMade;
+ // This is the write callback that the user of the request wants to have
+ // called back when data is available.
+ size_t (*curlWriteCallback)(void *data, size_t s, size_t n, void *req);
+
+ // This is the read callback that the user of the request wants to have
+ // called back when data is to be written.
+ size_t (*curlReadCallback)(void *data, size_t s, size_t n, void *req);
+
// The callback to make when the response has been completely handled
S3ResponseCompleteCallback *completeCallback;