Debian Codegraph @

Source/Network/HTTP/CQtHttpResponse.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude 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
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_NETWORK_HTTP_CQTHTTPRESPONSE_H
22 #define KONCLUDE_NETWORK_HTTP_CQTHTTPRESPONSE_H
23
24 // Namespace includes
25 #include "HttpSettings.h"
26 #include "CHttpResponse.h"
27 #include "CQtHttpRequest.h"
28
29 // Library includes
30 #include <QNetworkReply>
31
32 // Other includes
33 #include "Network/CNetworkResponse.h"
34
35 #include "Concurrent/Callback/CCallbackData.h"
36 #include "Concurrent/Callback/CCallbackRememberLinkedExecuter.h"
37
38 // Logger includes
39 #include "Logger/CLogger.h"
40
41
42 namespace Konclude {
43
44 using namespace Concurrent::Callback;
45
46 namespace Network {
47
48 namespace HTTP {
49
50
51 /*!
52 *
53 * \class CQtHttpResponse
54 * \author Andreas Steigmiller
55 * \version 0.1
56 * \brief TODO
57 *
58 */
59 class CQtHttpResponse : public CHttpResponse {
60 // public methods
61 public:
62 //! Constructor
63 CQtHttpResponse(CQtHttpRequest* request, QNetworkReply* qNetworkReply = nullptr);
64
65 //! Destructor
66 virtual ~CQtHttpResponse();
67
68 QNetworkReply* getQNetworkReply();
69 CQtHttpRequest* getHttpRequest();
70 CQtHttpResponse* setQNetworkReply(QNetworkReply* qNetworkReply);
71
72 CCallbackRememberLinkedExecuter* getFinishedCallbackList();
73
74 cint64 getDownloadSizeLimit();
75 CQtHttpResponse* setDownloadSizeLimit(cint64 limit);
76
77 bool isAborted();
78 cint64 getAbortReason();
79 CQtHttpResponse* setAborted(cint64 abortReason = 0);
80
81 // protected methods
82 protected:
83
84 // protected variables
85 protected:
86 QNetworkReply* mQNetworkReply;
87 CCallbackRememberLinkedExecuter finishCallbackList;
88 CQtHttpRequest* mRequest;
89
90 cint64 mDownloadSizeLimit;
91 cint64 mAbortReason;
92 bool mAborted;
93
94 // private methods
95 private:
96
97 // private variables
98 private:
99 };
100
101
102 }; // end namespace HTTP
103
104 }; // end namespace Network
105
106 }; // end namespace Konclude
107
108
109 #endif // KONCLUDE_NETWORK_HTTP_CQTHTTPRESPONSE_H