Debian Codegraph @

Source/Network/HTTP/CQtHttpResponseHandler.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_CQTHTTPRESPONSEHANDLER_H
22 #define KONCLUDE_NETWORK_HTTP_CQTHTTPRESPONSEHANDLER_H
23
24 // Namespace includes
25 #include "HttpSettings.h"
26 #include "CHttpResponse.h"
27 #include "CQtHttpRequest.h"
28 #include "CQtHttpResponse.h"
29 #include "CHttpTransactionManager.h"
30
31 // Library includes
32 #include <QNetworkReply>
33
34 // Other includes
35 #include "Network/CNetworkResponse.h"
36
37 #include "Concurrent/Callback/CCallbackData.h"
38 #include "Concurrent/Callback/CCallbackRememberLinkedExecuter.h"
39
40 // Logger includes
41 #include "Logger/CLogger.h"
42
43
44 namespace Konclude {
45
46 using namespace Concurrent::Callback;
47
48 namespace Network {
49
50 namespace HTTP {
51
52
53 /*!
54 *
55 * \class CQtHttpResponseHandler
56 * \author Andreas Steigmiller
57 * \version 0.1
58 * \brief TODO
59 *
60 */
61 class CQtHttpResponseHandler {
62 // public methods
63 public:
64 //! Constructor
65 CQtHttpResponseHandler(CQtHttpRequest* request, CQtHttpResponse* response, cint64 downloadSizeLimit, bool downloadLimitCancel, CHttpTransactionManager* manager);
66
67
68 CQtHttpRequest* getRequest();
69 CQtHttpResponse* getResponse();
70
71 void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
72
73 // protected methods
74 protected:
75
76 // protected variables
77 protected:
78 CQtHttpRequest* mRequest;
79 CQtHttpResponse* mResponse;
80
81 cint64 mDownloadSizeLimit;
82 bool mDownloadLimitCancel;
83 CHttpTransactionManager* mManager;
84 bool mAborted;
85 bool mDeleting;
86 cint64 mTotalBytesReceived;
87
88 // private methods
89 private:
90
91 // private variables
92 private:
93 };
94
95
96 }; // end namespace HTTP
97
98 }; // end namespace Network
99
100 }; // end namespace Konclude
101
102
103 #endif // KONCLUDE_NETWORK_HTTP_CQTHTTPRESPONSEHANDLER_H