davix
|
Main container for Davix request options. More...
#include <davixrequestparams.hpp>
Public Member Functions | |
RequestParams () | |
default constructor | |
RequestParams (const RequestParams ¶ms) | |
copy constructor | |
RequestParams (const RequestParams *params) | |
conveniencecopy constructor with NULL check | |
RequestParams & | operator= (const RequestParams &_p) |
assignment operator | |
void | setSSLCAcheck (bool chk) |
disable the certificate authority validity check for the https request | |
bool | getSSLCACheck () const |
return the SSL Certificate authority validity check | |
void | setClientCertX509 (const X509Credential &cli_cert) |
const X509Credential & | getClientCertX509 () const |
get the current client side credential | |
void | setClientLoginPassword (const std::string &login, const std::string &password) |
set login/password for HTTP Authentication | |
const std::pair< std::string, std::string > & | getClientLoginPassword () const |
get login/password for HTTP Authentication | |
void | setClientCertCallbackX509 (authCallbackClientCertX509 callback, void *userdata) |
std::pair< authCallbackClientCertX509, void * > | getClientCertCallbackX509 () const |
return the current client side callback for authentication with the associated user data | |
void | setClientLoginPasswordCallback (authCallbackLoginPasswordBasic callback, void *userdata) |
std::pair< authCallbackLoginPasswordBasic, void * > | getClientLoginPasswordCallback () const |
return the current login/password callback and the associated user data | |
void | setAwsAuthorizationKeys (const AwsSecretKey &secret_key, const AwsAccessKey &access_key) |
define a Amazon S3 private key and public key | |
const std::pair< AwsSecretKey, AwsAccessKey > & | getAwsAutorizationKeys () const |
get Amazon S3 authentication tokens | |
void | setAwsRegion (const AwsRegion ®ion) |
define a Amazon S3 bucket region | |
const AwsRegion & | getAwsRegion () const |
get Amazon S3 bucket region | |
void | setAwsToken (const AwsToken &token) |
define an Amazon S3 security token | |
const AwsToken & | getAwsToken () const |
get Amazon S3 security token | |
void | setAwsAlternate (const bool &alternate) |
set whether we're using an S3 path-based url | |
const bool & | getAwsAlternate () const |
get whether we're using an S3 path-based url | |
void | setAzureKey (const AzureSecretKey &key) |
set the secret key for Azure authentication | |
const AzureSecretKey & | getAzureKey () const |
get the secret key used for Azure authentication | |
void | setGcloudCredentials (const Davix::gcloud::Credentials &creds) |
set the secret key for Azure authentication | |
const Davix::gcloud::Credentials & | getGcloudCredentials () const |
get the secret key used for Azure authentication | |
void | setOSToken (const OSToken &token) |
set the OS token used for Swift authentication | |
const OSToken & | getOSToken () const |
get the OS token used for Swift authentication | |
void | setOSProjectID (const OSProjectID &id) |
set the OS project id used for Swift authentication | |
const OSProjectID & | getOSProjectID () const |
get the OS project id used for Swift authentication | |
void | setSwiftAccount (const SwiftAccount &account) |
set the Swift account used for Swift authentication | |
const SwiftAccount & | getSwiftAccount () const |
get the Swift account used for Swift authentication | |
void | setS3ListingMode (const S3ListingMode::S3ListingMode s3_listing_mode) |
set listing mode flag for S3 bucket | |
S3ListingMode::S3ListingMode | getS3ListingMode () const |
get listing mode flag for S3 bucket | |
void | setSwiftListingMode (const SwiftListingMode::SwiftListingMode swift_listing_mode) |
set listing mode flag for Swift | |
SwiftListingMode::SwiftListingMode | getSwiftListingMode () const |
get listing mode flag for Swift | |
void | setS3MaxKey (const unsigned long s3_max_key_entries) |
set maximum number of key entries return by S3 list object request | |
unsigned long | getS3MaxKey () const |
get maximun number of key entries return by S3 list object request | |
void | addCertificateAuthorityPath (const std::string &path) |
add the CA certificate in the directory 'path' as trusted certificate | |
const std::vector< std::string > & | listCertificateAuthorityPath () const |
get the list of the current user defined CA path | |
void | setConnectionTimeout (struct timespec *conn_timeout) |
const struct timespec * | getConnectionTimeout () const |
get the current connexion timeout | |
void | setOperationTimeout (struct timespec *ops_timeout) |
const struct timespec * | getOperationTimeout () const |
void | setTransparentRedirectionSupport (bool redirection) |
bool | getTransparentRedirectionSupport () const |
return true if the transparent redirection mode is enabled | |
void | setOperationRetry (int number_retry) |
number of re-try in case of operation failure | |
int | getOperationRetry () const |
getOperationRetry | |
void | setOperationRetryDelay (int delay_retry) |
Delay in second between retry attempts. | |
int | getOperationRetryDelay () const |
getOperationRetryDelay | |
void | setCopyMode (const CopyMode::CopyMode copy_mode) |
set copy mode for 3rd party copy | |
CopyMode::CopyMode | getCopyMode () const |
get copy mode for 3rd party copy | |
void | setRecursiveMode (const bool recursive_mode) |
set recursive mode for directory operations | |
bool | getRecursiveMode () const |
get recursive mode for directory operations | |
void | set100ContinueSupport (const bool enabled) |
bool | get100ContinueSupport () const |
get whether 100-continue support is enabled | |
void | setUserAgent (const std::string &user_agent) |
set the user agent for the associated request | |
const std::string & | getUserAgent () const |
get the current user agent string | |
void | setProtocol (const RequestProtocol::Protocol proto) |
set the request protocol ( ex : Webdav, Http-only, S3 ) | |
RequestProtocol::Protocol | getProtocol () const |
get the current value of the request protocol | |
void | setMetalinkMode (const MetalinkMode::MetalinkMode mode) |
MetalinkMode::MetalinkMode | getMetalinkMode () const |
get the Current Metalink mode | |
void | setKeepAlive (const bool keep_alive_flag) |
set the keep alive value of the associated session | |
bool | getKeepAlive () const |
get the keep alive value of this request params | |
void | addHeader (const std::string &key, const std::string &val) |
const HeaderVec & | getHeaders () const |
return the list of custom headers configured | |
void | setProxyServer (const Uri &proxy_url) |
const Uri * | getProxyServer () const |
void * | getParmState () const |
internal usage | |
void | swap (RequestParams ¶ms) |
int | getAcceptedRetry () const |
void | setAcceptedRetry (int num_retries) |
int | getAcceptedRetryDelay () const |
void | setAcceptedRetryDelay (int delay) |
Main container for Davix request options.
RequestParams hold the davix request options : authentication parameters, timeouts, user-agents,... A Requestparams object can be shared between several Request
Davix::RequestParams::RequestParams | ( | const RequestParams & | params | ) |
copy constructor
params |
Davix::RequestParams::RequestParams | ( | const RequestParams * | params | ) |
conveniencecopy constructor with NULL check
params |
void Davix::RequestParams::addHeader | ( | const std::string & | key, |
const std::string & | val | ||
) |
Add a custom header line that has to be included in the requests
key | key of the header |
val | value of the header |
int Davix::RequestParams::getAcceptedRetry | ( | ) | const |
get the number of retries that davix should perform in case it receives 202-Accepted on a GET request
int Davix::RequestParams::getAcceptedRetryDelay | ( | ) | const |
get the delay in seconds between retries that davix should perform in case it receives 202-Accepted on a GET request
const bool & Davix::RequestParams::getAwsAlternate | ( | ) | const |
get whether we're using an S3 path-based url
const std::pair< AwsSecretKey, AwsAccessKey > & Davix::RequestParams::getAwsAutorizationKeys | ( | ) | const |
get Amazon S3 authentication tokens
const AwsRegion & Davix::RequestParams::getAwsRegion | ( | ) | const |
get Amazon S3 bucket region
const AwsToken & Davix::RequestParams::getAwsToken | ( | ) | const |
get Amazon S3 security token
const AzureSecretKey & Davix::RequestParams::getAzureKey | ( | ) | const |
get the secret key used for Azure authentication
const Davix::gcloud::Credentials & Davix::RequestParams::getGcloudCredentials | ( | ) | const |
get the secret key used for Azure authentication
int Davix::RequestParams::getOperationRetry | ( | ) | const |
getOperationRetry
int Davix::RequestParams::getOperationRetryDelay | ( | ) | const |
getOperationRetryDelay
const struct timespec * Davix::RequestParams::getOperationTimeout | ( | ) | const |
get the maximum execution time for a davix request DEFAULT : infinite
const OSProjectID & Davix::RequestParams::getOSProjectID | ( | ) | const |
get the OS project id used for Swift authentication
const OSToken & Davix::RequestParams::getOSToken | ( | ) | const |
get the OS token used for Swift authentication
const Uri * Davix::RequestParams::getProxyServer | ( | ) | const |
get current SOCKS5 proxy server
const SwiftAccount & Davix::RequestParams::getSwiftAccount | ( | ) | const |
get the Swift account used for Swift authentication
void Davix::RequestParams::set100ContinueSupport | ( | const bool | enabled | ) |
set whether the server supports 100-continue. If enabled (default), 100-continue may or may not be sent to the server, depending on when davix decides it's appropriate. If disabled, 100-continue will never be used.
void Davix::RequestParams::setAcceptedRetry | ( | int | num_retries | ) |
set the number of retries that davix should perform in case it receives 202-Accepted on a GET request
num_retries | the number of retries |
void Davix::RequestParams::setAcceptedRetryDelay | ( | int | delay | ) |
set the delay in seconds between retries that davix should perform in case it receives 202-Accepted on a GET request
delay | the delay in seconds |
void Davix::RequestParams::setAwsAlternate | ( | const bool & | alternate | ) |
set whether we're using an S3 path-based url
alternate | whether using an S3 path-based url |
void Davix::RequestParams::setAwsAuthorizationKeys | ( | const AwsSecretKey & | secret_key, |
const AwsAccessKey & | access_key | ||
) |
define a Amazon S3 private key and public key
secret_key | secret key |
access_key | public key |
void Davix::RequestParams::setAwsRegion | ( | const AwsRegion & | region | ) |
define a Amazon S3 bucket region
region | the region |
void Davix::RequestParams::setAwsToken | ( | const AwsToken & | token | ) |
define an Amazon S3 security token
token | the security token |
void Davix::RequestParams::setAzureKey | ( | const AzureSecretKey & | key | ) |
set the secret key for Azure authentication
key | the secret key |
void Davix::RequestParams::setClientCertCallbackX509 | ( | authCallbackClientCertX509 | callback, |
void * | userdata | ||
) |
set a callback for X509 client side dynamic authentication this function overwrite setClientCertX509
void Davix::RequestParams::setClientCertX509 | ( | const X509Credential & | cli_cert | ) |
set a X509 credential for a simple client authentication this function overwrite setClientCertCallbackX509
void Davix::RequestParams::setClientLoginPasswordCallback | ( | authCallbackLoginPasswordBasic | callback, |
void * | userdata | ||
) |
set a callback for basic login/password http authentication this function overwrite setClientLoginPassword
void Davix::RequestParams::setConnectionTimeout | ( | struct timespec * | conn_timeout | ) |
define the connexion timeout conn_timeout is a relative time DEFAULT : 30s
void Davix::RequestParams::setGcloudCredentials | ( | const Davix::gcloud::Credentials & | creds | ) |
set the secret key for Azure authentication
creds | the secret key |
void Davix::RequestParams::setMetalinkMode | ( | const MetalinkMode::MetalinkMode | mode | ) |
Enable or disable the usage of the Metalink (RFC-5854 and RFC-6249) with libdavix Metalink can be used for fail-over purpose, or multi-source download
void Davix::RequestParams::setOperationRetry | ( | int | number_retry | ) |
number of re-try in case of operation failure
number_retry |
define the number of retry attempt in case of an operation failure
void Davix::RequestParams::setOperationRetryDelay | ( | int | delay_retry | ) |
Delay in second between retry attempts.
delay_retry |
define the number of seconds between retry attempts in case of slow servers
void Davix::RequestParams::setOperationTimeout | ( | struct timespec * | ops_timeout | ) |
define the maximum execution time for a davix request ops_timeout is a relative time DEFAULT : infinite
void Davix::RequestParams::setOSProjectID | ( | const OSProjectID & | id | ) |
set the OS project id used for Swift authentication
id | the project id |
void Davix::RequestParams::setOSToken | ( | const OSToken & | token | ) |
set the OS token used for Swift authentication
token | the OS token |
void Davix::RequestParams::setProxyServer | ( | const Uri & | proxy_url | ) |
set a SOCKS5 proxy server for intermediate usage example: setProxyServer("socks5://login:password@socks5.exmaple.org:8080")
proxy_url | url of the proxy server |
void Davix::RequestParams::setSwiftAccount | ( | const SwiftAccount & | account | ) |
set the Swift account used for Swift authentication
account | the Swift account |
void Davix::RequestParams::setTransparentRedirectionSupport | ( | bool | redirection | ) |
enable or disable transparent redirection support In the transparent redirection mode, davix follows the HTTP redirection automatically DEFAULT : enabled
void Davix::RequestParams::swap | ( | RequestParams & | params | ) |
swap two RequestParams content fast operation