X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device-src%2Fs3.h;h=24ad9603fa70a237ba8fbb3d1209c4d7d1490969;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=c5ec6075378224188f45e4cfbcbabc2af0870ce8;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/device-src/s3.h b/device-src/s3.h index c5ec607..24ad960 100644 --- a/device-src/s3.h +++ b/device-src/s3.h @@ -115,7 +115,7 @@ typedef curl_progress_callback s3_progress_func; /* This preprocessor magic will enumerate constants named S3_ERROR_XxxYyy for * each of the errors in parentheses. * - * see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorCodeList.html + * see http://docs.amazonwebservices.com/AmazonS3/latest/API/ErrorResponses.html * for Amazon's breakdown of error responses. */ #define S3_ERROR_LIST \ @@ -166,6 +166,11 @@ typedef curl_progress_callback s3_progress_func; S3_ERROR(UnexpectedContent), \ S3_ERROR(UnresolvableGrantByEmailAddress), \ S3_ERROR(Unknown), \ + S3_ERROR(Unauthorized), \ + S3_ERROR(Created), \ + S3_ERROR(Accepted), \ + S3_ERROR(Forbidden), \ + S3_ERROR(Conflict), \ S3_ERROR(END) typedef enum { @@ -233,10 +238,14 @@ s3_init(void); * @returns: the new S3Handle */ S3Handle * -s3_open(const char * access_key, const char *secret_key, const char *host, +s3_open(const char * access_key, const char *secret_key, + const char *swift_account_id, const char *swift_access_key, + const char *host, const char *service_path, gboolean use_subdomain, const char * user_token, - const char * bucket_location, const char * storage_class, const char * ca_info); + const char * bucket_location, const char * storage_class, + const char * ca_info, const char * server_side_encryption, + const gboolean openstack_swift_api); /* Deallocate an S3Handle * @@ -424,6 +433,16 @@ gboolean s3_make_bucket(S3Handle *hdl, const char *bucket); +/* Check if a bucket exists. + * + * @param hdl: the S3Handle object + * @param bucket: the bucket to create + * @returns: FALSE if an error occur + */ +gboolean +s3_is_bucket_exists(S3Handle *hdl, + const char *bucket); + /* Delete a bucket * * @note A bucket can not be deleted if it still contains keys