| 1 |
/* |
| 2 |
* This File is part of Davix, The IO library for HTTP based protocols |
| 3 |
* Copyright (C) CERN 2013 |
| 4 |
* Author: Adrien Devresse <[email protected]> |
| 5 |
* |
| 6 |
* This library is free software; you can redistribute it and/or |
| 7 |
* modify it under the terms of the GNU Lesser General Public |
| 8 |
* License as published by the Free Software Foundation; either |
| 9 |
* version 2.1 of the License, or (at your option) any later version. |
| 10 |
* |
| 11 |
* This library is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
* Lesser General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU Lesser General Public |
| 17 |
* License along with this library; if not, write to the Free Software |
| 18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 |
* |
| 20 |
*/ |
| 21 |
|
| 22 |
#include <davix_internal.hpp> |
| 23 |
#include <davix.hpp> |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
namespace Davix { |
| 28 |
|
| 29 |
struct HttpCacheTokenInternal{ |
| 30 |
|
| 31 |
HttpCacheTokenInternal() : |
| 32 |
_req_uri(), |
| 33 |
_redirection_uri() |
| 34 |
{} |
| 35 |
|
| 36 |
HttpCacheTokenInternal(const HttpCacheTokenInternal & orig) : |
| 37 |
_req_uri(orig._req_uri), |
| 38 |
_redirection_uri(orig._redirection_uri) |
| 39 |
|
| 40 |
{ |
| 41 |
|
| 42 |
} |
| 43 |
|
| 44 |
virtual ~HttpCacheTokenInternal(){} |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
Uri _req_uri, _redirection_uri; |
| 49 |
private: |
| 50 |
HttpCacheTokenInternal & operator=(const HttpCacheTokenInternal &); |
| 51 |
}; |
| 52 |
|
| 53 |
|
| 54 |
HttpCacheToken::HttpCacheToken() : |
| 55 |
d_ptr(new HttpCacheTokenInternal()) |
| 56 |
{ |
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
HttpCacheToken::HttpCacheToken(const HttpCacheToken &orig) : |
| 61 |
d_ptr(new HttpCacheTokenInternal(*(orig.d_ptr))) |
| 62 |
{ |
| 63 |
|
| 64 |
} |
| 65 |
|
| 66 |
HttpCacheToken & HttpCacheToken::operator=(const HttpCacheToken & orig){ |
| 67 |
if(&orig == this) |
| 68 |
return *this; |
| 69 |
delete d_ptr; |
| 70 |
d_ptr = new HttpCacheTokenInternal(*(orig.d_ptr)); |
| 71 |
return *this; |
| 72 |
} |
| 73 |
|
| 74 |
HttpCacheToken::~HttpCacheToken(){ |
| 75 |
delete d_ptr; |
| 76 |
} |
| 77 |
|
| 78 |
|
| 79 |
const Uri & HttpCacheToken::getCachedRedirection() const{ |
| 80 |
return d_ptr->_redirection_uri; |
| 81 |
} |
| 82 |
|
| 83 |
const Uri & HttpCacheToken::getrequestUri() const { |
| 84 |
return d_ptr->_req_uri; |
| 85 |
} |
| 86 |
|
| 87 |
|
| 88 |
// Deprecated replicas |
| 89 |
// created for Abi compatibility |
| 90 |
void deprecated_abi_calls(){ |
| 91 |
Replica* r = new Replica(); |
| 92 |
ReplicaVec* v = new ReplicaVec(); |
| 93 |
v->resize(1); |
| 94 |
|
| 95 |
FileInfo<FileInfoProtocolType>* t = new FileInfo<FileInfoProtocolType>(); |
| 96 |
delete (t->getClone()); |
| 97 |
delete t; |
| 98 |
FileInfoSize* s = new FileInfoSize(); |
| 99 |
delete s; |
| 100 |
delete r; |
| 101 |
delete v; |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
HookTraits::HookTraits() : d_ptr(NULL){ |
| 107 |
|
| 108 |
} |
| 109 |
|
| 110 |
HookTraits::~HookTraits(){ |
| 111 |
|
| 112 |
} |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
} |
| 118 |
|