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 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 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)
struct timespec * getConnectionTimeout () const
 get the current connexion timeout
void setOperationTimeout (struct timespec *ops_timeout)
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 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)

Detailed Description

Main container for Davix request options.

RequestParams hold the davix request options : authentification parameters, timeouts, user-agents,... A Requestparams object can be shared between several Request


Constructor & Destructor Documentation

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

copy constructor

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

conveniencecopy constructor with NULL check

Parameters:
params 

Member Function Documentation

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:
key key of the header
val value of the header
const std::pair<AwsSecretKey, AwsAccessKey>& Davix::RequestParams::getAwsAutorizationKeys (  )  const

get Amazon S3 authentication tokens

Returns:
pair of secret key and public key
int Davix::RequestParams::getOperationRetry (  )  const

getOperationRetry

Returns:
get current number of retry attempt, see setOperationRetry for more details
int Davix::RequestParams::getOperationRetryDelay (  )  const

getOperationRetryDelay

Returns:
get current number of seconds between retry attempts, see setOperationRetryDelay for more details
struct timespec* Davix::RequestParams::getOperationTimeout (  )  const [read]

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

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

get current SOCKS5 proxy server

Returns:
URL of the server or NULL if not defined
void Davix::RequestParams::setAwsAuthorizationKeys ( const AwsSecretKey &  secret_key,
const AwsAccessKey &  access_key 
)

define a Amazon S3 private key and public key

Parameters:
secret_key secret key
access_key public 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::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

Parameters:
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.

Parameters:
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::setProxyServer ( const Uri proxy_url  ) 

set a SOCKS5 proxy server for intermediate usage example: setProxyServer("socks5://login:password@socks5.exmaple.org:8080")

Parameters:
proxy_url url of the proxy server
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


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

Generated on 17 Jul 2015 for davix by  doxygen 1.6.1