| 1 |
#ifndef AWS_S3_REQUEST_MESSAGES_H |
| 2 |
#define AWS_S3_REQUEST_MESSAGES_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include "aws/s3/s3.h" |
| 9 |
#include "aws/s3/s3_client.h" |
| 10 |
#include <inttypes.h> |
| 11 |
#include <stdbool.h> |
| 12 |
#include <stddef.h> |
| 13 |
|
| 14 |
struct aws_allocator; |
| 15 |
struct aws_http_message; |
| 16 |
struct aws_byte_buf; |
| 17 |
struct aws_byte_cursor; |
| 18 |
struct aws_string; |
| 19 |
struct aws_array_list; |
| 20 |
struct aws_s3_meta_request_checksum_config_storage; |
| 21 |
struct aws_s3_upload_request_checksum_context; |
| 22 |
|
| 23 |
AWS_EXTERN_C_BEGIN |
| 24 |
|
| 25 |
|
| 26 |
AWS_S3_API |
| 27 |
struct aws_http_message *aws_s3_message_util_copy_http_message_no_body_all_headers( |
| 28 |
struct aws_allocator *allocator, |
| 29 |
struct aws_http_message *message); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
AWS_S3_API |
| 34 |
struct aws_http_message *aws_s3_message_util_copy_http_message_no_body_filter_headers( |
| 35 |
struct aws_allocator *allocator, |
| 36 |
struct aws_http_message *message, |
| 37 |
const struct aws_byte_cursor *excluded_headers_arrays, |
| 38 |
size_t excluded_headers_size, |
| 39 |
bool exclude_x_amz_meta, |
| 40 |
bool exclude_x_checksum); |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
AWS_S3_API |
| 45 |
void aws_s3_message_util_copy_headers( |
| 46 |
struct aws_http_message *source_message, |
| 47 |
struct aws_http_message *dest_message, |
| 48 |
const struct aws_byte_cursor *excluded_headers_arrays, |
| 49 |
size_t excluded_headers_size, |
| 50 |
bool exclude_x_amz_meta, |
| 51 |
bool exclude_x_checksum); |
| 52 |
|
| 53 |
AWS_S3_API |
| 54 |
struct aws_input_stream *aws_s3_message_util_assign_body( |
| 55 |
struct aws_allocator *allocator, |
| 56 |
struct aws_byte_buf *byte_buf, |
| 57 |
struct aws_input_stream *stream, |
| 58 |
struct aws_http_message *out_message, |
| 59 |
struct aws_s3_upload_request_checksum_context *checksum_context); |
| 60 |
|
| 61 |
|
| 62 |
AWS_S3_API |
| 63 |
struct aws_http_message *aws_s3_ranged_get_object_message_new( |
| 64 |
struct aws_allocator *allocator, |
| 65 |
struct aws_http_message *base_message, |
| 66 |
uint64_t range_start, |
| 67 |
uint64_t range_end); |
| 68 |
|
| 69 |
AWS_S3_API |
| 70 |
int aws_s3_message_util_set_multipart_request_path( |
| 71 |
struct aws_allocator *allocator, |
| 72 |
const struct aws_string *upload_id, |
| 73 |
uint32_t part_number, |
| 74 |
bool append_uploads_suffix, |
| 75 |
struct aws_http_message *message); |
| 76 |
|
| 77 |
|
| 78 |
AWS_S3_API |
| 79 |
struct aws_http_message *aws_s3_create_multipart_upload_message_new( |
| 80 |
struct aws_allocator *allocator, |
| 81 |
struct aws_http_message *base_message, |
| 82 |
const struct aws_s3_meta_request_checksum_config_storage *checksum_config); |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
AWS_S3_API |
| 88 |
struct aws_http_message *aws_s3_upload_part_message_new( |
| 89 |
struct aws_allocator *allocator, |
| 90 |
struct aws_http_message *base_message, |
| 91 |
struct aws_byte_buf *buffer, |
| 92 |
uint32_t part_number, |
| 93 |
const struct aws_string *upload_id, |
| 94 |
bool should_compute_content_md5, |
| 95 |
struct aws_s3_upload_request_checksum_context *checksum_context); |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
AWS_S3_API |
| 100 |
struct aws_http_message *aws_s3_upload_part_message_new_streaming( |
| 101 |
struct aws_allocator *allocator, |
| 102 |
struct aws_http_message *base_message, |
| 103 |
struct aws_input_stream *input_stream, |
| 104 |
uint32_t part_number, |
| 105 |
const struct aws_string *upload_id, |
| 106 |
bool should_compute_content_md5, |
| 107 |
struct aws_s3_upload_request_checksum_context *checksum_context); |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
AWS_S3_API |
| 113 |
struct aws_http_message *aws_s3_upload_part_copy_message_new( |
| 114 |
struct aws_allocator *allocator, |
| 115 |
struct aws_http_message *base_message, |
| 116 |
struct aws_byte_buf *buffer, |
| 117 |
uint32_t part_number, |
| 118 |
uint64_t range_start, |
| 119 |
uint64_t range_end, |
| 120 |
const struct aws_string *upload_id, |
| 121 |
bool should_compute_content_md5); |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
AWS_S3_API |
| 128 |
struct aws_http_message *aws_s3_complete_multipart_message_with_object_size_new( |
| 129 |
struct aws_allocator *allocator, |
| 130 |
struct aws_http_message *base_message, |
| 131 |
struct aws_byte_buf *body_buffer, |
| 132 |
const struct aws_string *upload_id, |
| 133 |
const struct aws_array_list *parts, |
| 134 |
const struct aws_s3_meta_request_checksum_config_storage *checksum_config, |
| 135 |
uint64_t object_size); |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
AWS_S3_API |
| 142 |
struct aws_http_message *aws_s3_complete_multipart_message_new( |
| 143 |
struct aws_allocator *allocator, |
| 144 |
struct aws_http_message *base_message, |
| 145 |
struct aws_byte_buf *body_buffer, |
| 146 |
const struct aws_string *upload_id, |
| 147 |
const struct aws_array_list *parts, |
| 148 |
const struct aws_s3_meta_request_checksum_config_storage *checksum_config); |
| 149 |
|
| 150 |
AWS_S3_API |
| 151 |
struct aws_http_message *aws_s3_abort_multipart_upload_message_new( |
| 152 |
struct aws_allocator *allocator, |
| 153 |
struct aws_http_message *base_message, |
| 154 |
const struct aws_string *upload_id); |
| 155 |
|
| 156 |
|
| 157 |
AWS_S3_API |
| 158 |
struct aws_http_message *aws_s3_get_object_size_message_new( |
| 159 |
struct aws_allocator *allocator, |
| 160 |
struct aws_http_message *base_message, |
| 161 |
struct aws_byte_cursor source_bucket, |
| 162 |
struct aws_byte_cursor source_key); |
| 163 |
|
| 164 |
|
| 165 |
AWS_S3_API |
| 166 |
struct aws_http_message *aws_s3_get_source_object_size_message_new( |
| 167 |
struct aws_allocator *allocator, |
| 168 |
struct aws_http_message *base_message, |
| 169 |
struct aws_uri *source_uri); |
| 170 |
|
| 171 |
|
| 172 |
AWS_S3_API |
| 173 |
int aws_s3_message_util_add_content_md5_header( |
| 174 |
struct aws_allocator *allocator, |
| 175 |
struct aws_byte_buf *input_buf, |
| 176 |
struct aws_http_message *message); |
| 177 |
|
| 178 |
AWS_S3_API |
| 179 |
extern const struct aws_byte_cursor g_s3_create_multipart_upload_excluded_headers[]; |
| 180 |
|
| 181 |
AWS_S3_API |
| 182 |
extern const size_t g_s3_create_multipart_upload_excluded_headers_count; |
| 183 |
|
| 184 |
AWS_S3_API |
| 185 |
extern const struct aws_byte_cursor g_s3_upload_part_excluded_headers[]; |
| 186 |
|
| 187 |
AWS_S3_API |
| 188 |
extern const size_t g_s3_upload_part_excluded_headers_count; |
| 189 |
|
| 190 |
AWS_S3_API |
| 191 |
extern const struct aws_byte_cursor g_s3_complete_multipart_upload_excluded_headers[]; |
| 192 |
|
| 193 |
AWS_S3_API |
| 194 |
extern const size_t g_s3_complete_multipart_upload_excluded_headers_count; |
| 195 |
|
| 196 |
AWS_S3_API |
| 197 |
extern const struct aws_byte_cursor g_s3_abort_multipart_upload_excluded_headers[]; |
| 198 |
|
| 199 |
AWS_S3_API |
| 200 |
extern const size_t g_s3_create_session_allowed_headers_count; |
| 201 |
|
| 202 |
AWS_S3_API |
| 203 |
extern const struct aws_byte_cursor g_s3_create_session_allowed_headers[]; |
| 204 |
|
| 205 |
AWS_S3_API |
| 206 |
extern const size_t g_s3_abort_multipart_upload_excluded_headers_count; |
| 207 |
|
| 208 |
AWS_S3_API |
| 209 |
extern const struct aws_byte_cursor g_s3_list_parts_excluded_headers[]; |
| 210 |
|
| 211 |
AWS_S3_API extern const size_t g_s3_list_parts_excluded_headers_count; |
| 212 |
|
| 213 |
AWS_S3_API |
| 214 |
extern const struct aws_byte_cursor g_s3_list_parts_with_checksum_excluded_headers[]; |
| 215 |
|
| 216 |
AWS_S3_API |
| 217 |
extern const size_t g_s3_list_parts_with_checksum_excluded_headers_count; |
| 218 |
|
| 219 |
AWS_EXTERN_C_END |
| 220 |
|
| 221 |
#endif |