summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorBryan Ischo <bryan@ischo.com>2008-07-12 12:08:34 +0000
committerBryan Ischo <bryan@ischo.com>2008-07-12 12:08:34 +0000
commit26a9aad80885a9e8f65c6c37ca562fc7c6d5d4d3 (patch)
tree4a39519b24ad6b202ff447d46fa022b76640a7e4 /src/object.c
parent037783a33a3c2f02307511bdadd4c85486217a40 (diff)
downloadceph-libs3-26a9aad80885a9e8f65c6c37ca562fc7c6d5d4d3.tar.gz
* Work in progress: put object now works
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c
index 2162363..c2e7e85 100644
--- a/src/object.c
+++ b/src/object.c
@@ -23,14 +23,40 @@
************************************************************************** **/
#include "libs3.h"
+#include "request.h"
+// put object -----------------------------------------------------------------
+
void S3_put_object(S3BucketContext *bucketContext, const char *key,
uint64_t contentLength,
const S3RequestHeaders *requestHeaders,
S3RequestContext *requestContext,
S3PutObjectHandler *handler, void *callbackData)
{
+ // Set up the RequestParams
+ RequestParams params =
+ {
+ HttpRequestTypePUT, // httpRequestType
+ bucketContext->protocol, // protocol
+ bucketContext->uriStyle, // uriStyle
+ bucketContext->bucketName, // bucketName
+ key, // key
+ 0, // queryParams
+ 0, // subResource
+ bucketContext->accessKeyId, // accessKeyId
+ bucketContext->secretAccessKey, // secretAccessKey
+ requestHeaders, // requestHeaders
+ handler->responseHandler.headersCallback, // headersCallback
+ handler->putObjectDataCallback, // toS3Callback
+ contentLength, // toS3CallbackTotalSize
+ 0, // fromS3Callback
+ handler->responseHandler.completeCallback, // completeCallback
+ callbackData // callbackData
+ };
+
+ // Perform the request
+ request_perform(&params, requestContext);
}