davix
Public Member Functions
Davix::RequestParams Class Reference

Main container for Davix request options. More...

#include <davixrequestparams.hpp>

Public Member Functions

 RequestParams ()
 default constructor
 
 RequestParams (const RequestParams &params)
 copy constructor
 
 RequestParams (const RequestParams *params)
 conveniencecopy constructor with NULL check
 
RequestParamsoperator= (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 X509CredentialgetClientCertX509 () 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 &region)
 define a Amazon S3 bucket region
 
const AwsRegiongetAwsRegion () const
 get Amazon S3 bucket region
 
void setAwsToken (const AwsToken &token)
 define an Amazon S3 security token
 
const AwsTokengetAwsToken () 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 AzureSecretKeygetAzureKey () 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::CredentialsgetGcloudCredentials () const
 get the secret key used for Azure authentication
 
void setOSToken (const OSToken &token)
 set the OS token used for Swift authentication
 
const OSTokengetOSToken () const
 get the OS token used for Swift authentication
 
void setOSProjectID (const OSProjectID &id)
 set the OS project id used for Swift authentication
 
const OSProjectIDgetOSProjectID () const
 get the OS project id used for Swift authentication
 
void setSwiftAccount (const SwiftAccount &account)
 set the Swift account used for Swift authentication
 
const SwiftAccountgetSwiftAccount () 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 UrigetProxyServer () const
 
void * getParmState () const
 internal usage
 
void swap (RequestParams &params)
 
int getAcceptedRetry () const
 
void setAcceptedRetry (int num_retries)
 
int getAcceptedRetryDelay () const
 
void setAcceptedRetryDelay (int delay)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ RequestParams() [1/2]

Davix::RequestParams::RequestParams ( const RequestParams params)

copy constructor

Parameters
params

◆ RequestParams() [2/2]

Davix::RequestParams::RequestParams ( const RequestParams params)

conveniencecopy constructor with NULL check

Parameters
params

Member Function Documentation

◆ addHeader()

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

Parameters
keykey of the header
valvalue of the header

◆ getAcceptedRetry()

int Davix::RequestParams::getAcceptedRetry ( ) const

get the number of retries that davix should perform in case it receives 202-Accepted on a GET request

◆ getAcceptedRetryDelay()

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

◆ getAwsAlternate()

const bool & Davix::RequestParams::getAwsAlternate ( ) const

get whether we're using an S3 path-based url

Returns
whether we're using an S3 path-based url

◆ getAwsAutorizationKeys()

const std::pair< AwsSecretKey, AwsAccessKey > & Davix::RequestParams::getAwsAutorizationKeys ( ) const

get Amazon S3 authentication tokens

Returns
pair of secret key and public key

◆ getAwsRegion()

const AwsRegion & Davix::RequestParams::getAwsRegion ( ) const

get Amazon S3 bucket region

Returns
the bucket region

◆ getAwsToken()

const AwsToken & Davix::RequestParams::getAwsToken ( ) const

get Amazon S3 security token

Returns
the security token

◆ getAzureKey()

const AzureSecretKey & Davix::RequestParams::getAzureKey ( ) const

get the secret key used for Azure authentication

Returns
the secret key

◆ getGcloudCredentials()

const Davix::gcloud::Credentials & Davix::RequestParams::getGcloudCredentials ( ) const

get the secret key used for Azure authentication

Returns
the secret key

◆ getOperationRetry()

int Davix::RequestParams::getOperationRetry ( ) const

getOperationRetry

Returns
get current number of retry attempt, see setOperationRetry for more details

◆ getOperationRetryDelay()

int Davix::RequestParams::getOperationRetryDelay ( ) const

getOperationRetryDelay

Returns
get current number of seconds between retry attempts, see setOperationRetryDelay for more details

◆ getOperationTimeout()

const struct timespec * Davix::RequestParams::getOperationTimeout ( ) const

get the maximum execution time for a davix request DEFAULT : infinite

◆ getOSProjectID()

const OSProjectID & Davix::RequestParams::getOSProjectID ( ) const

get the OS project id used for Swift authentication

Returns
the project id

◆ getOSToken()

const OSToken & Davix::RequestParams::getOSToken ( ) const

get the OS token used for Swift authentication

Returns
the OS token

◆ getProxyServer()

const Uri * Davix::RequestParams::getProxyServer ( ) const

get current SOCKS5 proxy server

Returns
URL of the server or NULL if not defined

◆ getSwiftAccount()

const SwiftAccount & Davix::RequestParams::getSwiftAccount ( ) const

get the Swift account used for Swift authentication

Returns
the Swift account

◆ set100ContinueSupport()

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.

◆ setAcceptedRetry()

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

Parameters
num_retriesthe number of retries

◆ setAcceptedRetryDelay()

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

Parameters
delaythe delay in seconds

◆ setAwsAlternate()

void Davix::RequestParams::setAwsAlternate ( const bool &  alternate)

set whether we're using an S3 path-based url

Parameters
alternatewhether using an S3 path-based url

◆ setAwsAuthorizationKeys()

void Davix::RequestParams::setAwsAuthorizationKeys ( const AwsSecretKey secret_key,
const AwsAccessKey access_key 
)

define a Amazon S3 private key and public key

Parameters
secret_keysecret key
access_keypublic key

◆ setAwsRegion()

void Davix::RequestParams::setAwsRegion ( const AwsRegion region)

define a Amazon S3 bucket region

Parameters
regionthe region

◆ setAwsToken()

void Davix::RequestParams::setAwsToken ( const AwsToken token)

define an Amazon S3 security token

Parameters
tokenthe security token

◆ setAzureKey()

void Davix::RequestParams::setAzureKey ( const AzureSecretKey key)

set the secret key for Azure authentication

Parameters
keythe secret key

◆ setClientCertCallbackX509()

void Davix::RequestParams::setClientCertCallbackX509 ( authCallbackClientCertX509  callback,
void *  userdata 
)

set a callback for X509 client side dynamic authentication this function overwrite setClientCertX509

◆ setClientCertX509()

void Davix::RequestParams::setClientCertX509 ( const X509Credential cli_cert)

set a X509 credential for a simple client authentication this function overwrite setClientCertCallbackX509

◆ setClientLoginPasswordCallback()

void Davix::RequestParams::setClientLoginPasswordCallback ( authCallbackLoginPasswordBasic  callback,
void *  userdata 
)

set a callback for basic login/password http authentication this function overwrite setClientLoginPassword

◆ setConnectionTimeout()

void Davix::RequestParams::setConnectionTimeout ( struct timespec *  conn_timeout)

define the connexion timeout conn_timeout is a relative time DEFAULT : 30s

◆ setGcloudCredentials()

void Davix::RequestParams::setGcloudCredentials ( const Davix::gcloud::Credentials creds)

set the secret key for Azure authentication

Parameters
credsthe secret key

◆ setMetalinkMode()

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

◆ setOperationRetry()

void Davix::RequestParams::setOperationRetry ( int  number_retry)

number of re-try in case of operation failure

Parameters
number_retry

define the number of retry attempt in case of an operation failure

◆ setOperationRetryDelay()

void Davix::RequestParams::setOperationRetryDelay ( int  delay_retry)

Delay in second between retry attempts.

Parameters
delay_retry

define the number of seconds between retry attempts in case of slow servers

◆ setOperationTimeout()

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

◆ setOSProjectID()

void Davix::RequestParams::setOSProjectID ( const OSProjectID id)

set the OS project id used for Swift authentication

Parameters
idthe project id

◆ setOSToken()

void Davix::RequestParams::setOSToken ( const OSToken token)

set the OS token used for Swift authentication

Parameters
tokenthe OS token

◆ setProxyServer()

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")

Parameters
proxy_urlurl of the proxy server

◆ setSwiftAccount()

void Davix::RequestParams::setSwiftAccount ( const SwiftAccount account)

set the Swift account used for Swift authentication

Parameters
accountthe Swift account

◆ setTransparentRedirectionSupport()

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

◆ swap()

void Davix::RequestParams::swap ( RequestParams params)

swap two RequestParams content fast operation


The documentation for this class was generated from the following file: