Line data Source code
1 : /*
2 : Copyright 2013-2015 Paul Colby
3 :
4 : This file is part of libqtaws.
5 :
6 : Libqtaws is free software: you can redistribute it and/or modify
7 : it under the terms of the GNU Lesser General Public License as published by
8 : the Free Software Foundation, either version 3 of the License, or
9 : (at your option) any later version.
10 :
11 : Libqtaws 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
14 : GNU Lesser General Public License for more details.
15 :
16 : You should have received a copy of the GNU Lesser General Public License
17 : along with libqtaws. If not, see <http://www.gnu.org/licenses/>.
18 : */
19 :
20 : #ifndef AWSABSTRACTSIGNATURE_H
21 : #define AWSABSTRACTSIGNATURE_H
22 :
23 : #include "qtawsglobal.h"
24 : #include "awsabstractcredentials.h"
25 :
26 : #include <QNetworkAccessManager>
27 : #include <QNetworkRequest>
28 :
29 : QTAWS_BEGIN_NAMESPACE
30 :
31 : class AwsAbstractSignaturePrivate;
32 :
33 : class QTAWS_EXPORT AwsAbstractSignature {
34 :
35 : public:
36 : AwsAbstractSignature();
37 :
38 : virtual ~AwsAbstractSignature();
39 :
40 : virtual void sign(const AwsAbstractCredentials &credentials, const QNetworkAccessManager::Operation operation,
41 : QNetworkRequest &request, const QByteArray &data = QByteArray()) const = 0;
42 :
43 : virtual int version() const = 0;
44 :
45 : protected:
46 : /// @cond internal
47 : AwsAbstractSignaturePrivate * const d_ptr; ///< Internal d-pointer.
48 : AwsAbstractSignature(AwsAbstractSignaturePrivate * const d);
49 : /// @endcond
50 :
51 : private:
52 26 : Q_DECLARE_PRIVATE(AwsAbstractSignature)
53 : friend class TestAwsAbstractSignature;
54 : };
55 :
56 : QTAWS_END_NAMESPACE
57 :
58 : #endif
|