From b540181d247dc28a68868c1ad97f2258bd2e6b20 Mon Sep 17 00:00:00 2001 From: Bryan Ischo Date: Sun, 13 Jul 2008 20:46:23 +0000 Subject: * More work in progress, get object is now complete --- inc/libs3.h | 14 +++++++++----- inc/request.h | 9 +++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/libs3.h b/inc/libs3.h index e9c55c0..dc82f47 100644 --- a/inc/libs3.h +++ b/inc/libs3.h @@ -138,6 +138,10 @@ typedef enum S3StatusContentDispositionFilenameTooLong , S3StatusBadContentEncoding , S3StatusContentEncodingTooLong , + S3StatusBadIfMatchETag , + S3StatusIfMatchETagTooLong , + S3StatusBadIfNotMatchETag , + S3StatusIfNotMatchETagTooLong , S3StatusHeadersTooLong , S3StatusKeyTooLong , S3StatusUriTooLong , @@ -577,9 +581,9 @@ typedef struct S3PutProperties } S3PutProperties; -// Used for get object or head object, specify properties for controlling +// Used for get object or head object, specify conditions for controlling // the get/head -typedef struct S3GetProperties +typedef struct S3GetConditions { /** * If >= 0, ... @@ -597,7 +601,7 @@ typedef struct S3GetProperties * If present ... **/ const char *ifNotMatchETag; -} S3GetProperties; +} S3GetConditions; typedef struct S3ErrorDetails @@ -1086,7 +1090,7 @@ void S3_copy_object(S3BucketContext *bucketContext, // ifModifiedSince and ifUnmodifiedSince if > 0 will be used */ void S3_get_object(S3BucketContext *bucketContext, const char *key, - const S3GetProperties *getProperties, + const S3GetConditions *getConditions, uint64_t startByte, uint64_t byteCount, S3RequestContext *requestContext, S3GetObjectHandler *handler, void *callbackData); @@ -1094,7 +1098,7 @@ void S3_get_object(S3BucketContext *bucketContext, const char *key, // ifModifiedSince and ifUnmodifiedSince if > 0 will be used void S3_head_object(S3BucketContext *bucketContext, const char *key, - const S3GetProperties *getProperties, + const S3GetConditions *getConditions, S3RequestContext *requestContext, S3ResponseHandler *handler, void *callbackData); diff --git a/inc/request.h b/inc/request.h index d1df84a..d61fde8 100644 --- a/inc/request.h +++ b/inc/request.h @@ -73,6 +73,15 @@ typedef struct RequestParams // AWS Secret Access Key const char *secretAccessKey; + // Get conditions + const S3GetConditions *getConditions; + + // Start byte + uint64_t startByte; + + // Byte count + uint64_t byteCount; + // Put properties const S3PutProperties *putProperties; -- cgit v1.2.1