mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-23 09:54:14 +00:00
Only send final PUT on Azure profiles Fix core dump when reading Azure key from environment variable Improve interface between mod_http_cache and storage providers Remove debug Remove out-of-date TODO Add new configuration to example Changes arising from Christopher Rienzo's comments Add function to pointers to the profile to allow for better integration with the storage providers. Add function to pointers to the profile to allow for better integration with the storage providers Remove old header file inclusion
40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
#ifndef COMMON_H
|
|
#define COMMON_H
|
|
|
|
#include <switch.h>
|
|
|
|
/**
|
|
* An http profile. Defines optional credentials
|
|
* for access to Amazon S3 and Azure Blob Service
|
|
*/
|
|
struct http_profile {
|
|
const char *name;
|
|
char *aws_s3_access_key_id;
|
|
char *secret_access_key;
|
|
char *base_domain;
|
|
switch_size_t bytes_per_block;
|
|
|
|
// function to be called to add the profile specific headers to the GET/PUT requests
|
|
switch_curl_slist_t *(*append_headers_ptr)(struct http_profile *profile, switch_curl_slist_t *headers,
|
|
const char *verb, unsigned int content_length, const char *content_type, const char *url, const unsigned int block_num, char **query_string);
|
|
// function to be called to perform the profile-specific actions at the end of the PUT operation
|
|
switch_status_t (*finalise_put_ptr)(struct http_profile *profile, const char *url, const unsigned int num_blocks);
|
|
};
|
|
typedef struct http_profile http_profile_t;
|
|
|
|
|
|
void parse_url(char *url, const char *base_domain, const char *default_base_domain, char **bucket, char **object);
|
|
|
|
#endif
|
|
|
|
/* For Emacs:
|
|
* Local Variables:
|
|
* mode:c
|
|
* indent-tabs-mode:t
|
|
* tab-width:4
|
|
* c-basic-offset:4
|
|
* End:
|
|
* For VIM:
|
|
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
|
|
*/
|