~ubuntu-branches/ubuntu/wily/davix/wily

« back to all changes in this revision

Viewing changes to src/params/davixrequestparams.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2015-07-31 13:17:55 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20150731131755-mizprbmn7ogv33te
Tags: 0.4.1-1
* Update to version 0.4.1
* Implement Multi-Arch support

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
    RequestParamsInternal() :
84
84
        _ssl_check(true),
85
85
        _redirection(true),
 
86
        _s3_listing_mode(S3ListingMode::Hierarchical),
 
87
        _s3_max_key_entries(10000),
86
88
        _ca_path(),
87
89
        _x509_data(),
88
90
        _idlogpass(),
99
101
        _session_flag(SESSION_FLAG_KEEP_ALIVE),
100
102
        _state_uid(get_requeste_uid()),
101
103
        _transferCb(),
102
 
        retry_number(default_retry_number)
 
104
        retry_number(default_retry_number),
 
105
        retry_delay()
103
106
    {
104
107
        timespec_clear(&connexion_timeout);
105
108
        timespec_clear(&ops_timeout);
118
121
    RequestParamsInternal(const RequestParamsInternal & param_private):
119
122
        _ssl_check(param_private._ssl_check),
120
123
        _redirection(param_private._redirection),
 
124
        _s3_listing_mode(param_private._s3_listing_mode),
 
125
        _s3_max_key_entries(param_private._s3_max_key_entries),
121
126
        _ca_path(param_private._ca_path),
122
127
        _x509_data(param_private._x509_data),
123
128
        _idlogpass(param_private._idlogpass),
134
139
        _session_flag(param_private._session_flag),
135
140
        _state_uid(param_private._state_uid),
136
141
        _transferCb(param_private._transferCb),
137
 
        retry_number(param_private.retry_number){
 
142
        retry_number(param_private.retry_number),
 
143
        retry_delay(param_private.retry_delay){
138
144
 
139
145
        timespec_copy(&(connexion_timeout), &(param_private.connexion_timeout));
140
146
        timespec_copy(&(ops_timeout), &(param_private.ops_timeout));
141
147
    }
142
148
    bool _ssl_check; // ssl CA check
143
149
    bool _redirection; // redirection support
 
150
    
 
151
    // s3 bucket listing mode
 
152
    S3ListingMode::S3ListingMode _s3_listing_mode;
 
153
 
 
154
    // Max number of keys returned by a S3 list bucket request
 
155
    unsigned long _s3_max_key_entries; 
144
156
 
145
157
    // CA management
146
158
    std::vector<std::string> _ca_path;
182
194
    // retry attempts
183
195
    int retry_number;
184
196
 
 
197
    // delay in seconds between retry attempts
 
198
    int retry_delay;
 
199
 
185
200
    // method
186
201
    inline void regenerateStateUid(){
187
202
        _state_uid = get_requeste_uid();
306
321
    return d_ptr->_aws_cred;
307
322
}
308
323
 
 
324
void RequestParams::setS3ListingMode(const S3ListingMode::S3ListingMode s3_listing_mode){
 
325
    d_ptr->_s3_listing_mode = s3_listing_mode;
 
326
}
 
327
 
 
328
S3ListingMode::S3ListingMode RequestParams::getS3ListingMode() const{
 
329
    return d_ptr->_s3_listing_mode;
 
330
}
 
331
 
 
332
void RequestParams::setS3MaxKey(const unsigned long s3_max_key_entries){
 
333
    d_ptr->_s3_max_key_entries = s3_max_key_entries;
 
334
}
 
335
 
 
336
unsigned long RequestParams::getS3MaxKey() const{
 
337
    return d_ptr->_s3_max_key_entries;    
 
338
}
 
339
 
309
340
void RequestParams::addCertificateAuthorityPath(const std::string &path){
310
341
    d_ptr->regenerateStateUid();
311
342
    d_ptr->_ca_path.push_back(path);
350
381
    return d_ptr->retry_number;
351
382
}
352
383
 
 
384
void RequestParams::setOperationRetryDelay(int delay_retry){
 
385
    d_ptr->retry_delay = delay_retry;
 
386
}
 
387
 
 
388
int RequestParams::getOperationRetryDelay() const{
 
389
    return d_ptr->retry_delay;
 
390
}
 
391
 
353
392
void RequestParams::setTransfertMonitorCb(const TransferMonitorCB &cb){
354
393
    d_ptr->_transferCb = cb;
355
394
}