Debian Codegraph @

Source/Network/HTTP/CQtHttpResponse.cpp

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 #include "CQtHttpResponse.h"
22
23
24 namespace Konclude {
25
26 namespace Network {
27
28 namespace HTTP {
29
30 CQtHttpResponse::CQtHttpResponse(CQtHttpRequest* request, QNetworkReply* qNetworkReply) : mQNetworkReply(qNetworkReply) {
31 mRequest = request;
32 mDownloadSizeLimit = -1;
33 mAborted = false;
34 mAbortReason = 0;
35 }
36
37 CQtHttpResponse::~CQtHttpResponse() {
38 }
39
40 QNetworkReply* CQtHttpResponse::getQNetworkReply() {
41 return mQNetworkReply;
42 }
43
44
45 CQtHttpRequest* CQtHttpResponse::getHttpRequest() {
46 return mRequest;
47 }
48
49 CQtHttpResponse* CQtHttpResponse::setQNetworkReply(QNetworkReply* qNetworkReply) {
50 if (mQNetworkReply) {
51 delete mQNetworkReply;
52 }
53 mQNetworkReply = qNetworkReply;
54 return this;
55 }
56
57 CCallbackRememberLinkedExecuter* CQtHttpResponse::getFinishedCallbackList() {
58 return &finishCallbackList;
59 }
60
61
62 cint64 CQtHttpResponse::getDownloadSizeLimit() {
63 return mDownloadSizeLimit;
64 }
65
66 CQtHttpResponse* CQtHttpResponse::setDownloadSizeLimit(cint64 limit) {
67 mDownloadSizeLimit = limit;
68 return this;
69 }
70
71 bool CQtHttpResponse::isAborted() {
72 return mAborted;
73 }
74
75 cint64 CQtHttpResponse::getAbortReason() {
76 return mAbortReason;
77 }
78
79 CQtHttpResponse* CQtHttpResponse::setAborted(cint64 abortReason) {
80 mAborted = true;
81 mAbortReason = abortReason;
82 return this;
83 }
84
85 }; // end namespace HTTP
86
87 }; // end namespace Network
88
89 }; // end namespace Konclude
90