2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FNetHttp_HttpTransactionEventArg.cpp
20 * @brief This is the implementation file for _HttpTransactionEventArg class.
23 #include <FBaseSysLog.h>
25 #include "FNetHttp_HttpTransactionImpl.h"
26 #include "FNetHttp_HttpTransactionEvent.h"
27 #include "FNetHttp_HttpTransactionEventArg.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
32 namespace Tizen { namespace Net { namespace Http
35 _HttpTransactionEventArg::_HttpTransactionEventArg(int transactionId, _HttpTransactionEventType eventType)
36 : __transactionId(transactionId)
37 , __eventType(eventType)
39 , __readHeaderLength(0)
41 , __isProxyAuth(false)
43 , __recommendedSize(0)
44 , __uploadCurrentProgress(0)
45 , __uploadTotalProgress(0)
46 , __downloadCurrentProgress(0)
47 , __downloadTotalProgress(0)
49 , __pServerCertList(null)
53 _HttpTransactionEventArg::~_HttpTransactionEventArg(void)
56 __eventType = _HTTP_TRANSACTION_EVENT_TYPE_UNDEFINED;
58 __readHeaderLength = 0;
63 _HttpTransactionEventArg::GetTransactionId() const
65 return __transactionId;
68 _HttpTransactionEventType
69 _HttpTransactionEventArg::GetEventType()
76 _HttpTransactionEventArg::SetError(result error)
82 _HttpTransactionEventArg::GetError() const
88 _HttpTransactionEventArg::SetReadHeaderLength(int readHeaderLength)
90 __readHeaderLength = readHeaderLength;
94 _HttpTransactionEventArg::GetReadHeaderLength(void) const
96 return __readHeaderLength;
100 _HttpTransactionEventArg::SetAuthType(long httpAuth)
102 __httpAuth = httpAuth;
105 _HttpTransactionEventArg::GetAuthType(void) const
111 _HttpTransactionEventArg::SetProxyAuth(bool isProxyAuth)
113 __isProxyAuth = isProxyAuth;
117 _HttpTransactionEventArg::IsProxyAuth(void) const
119 return __isProxyAuth;
123 _HttpTransactionEventArg::SetReadBodyLength(int readBodyLength)
125 __readBodyLength = readBodyLength;
128 _HttpTransactionEventArg::GetReadBodyLength(void) const
130 return __readBodyLength;
134 _HttpTransactionEventArg::SetRecommendedSize(int recommendedSize)
136 __recommendedSize = recommendedSize;
140 _HttpTransactionEventArg::GetRecommendedSize(void) const
142 return __recommendedSize;
146 _HttpTransactionEventArg::SetUploadProgress(long long currentSize, long long totalSize)
148 __uploadCurrentProgress = currentSize;
149 __uploadTotalProgress = totalSize;
153 _HttpTransactionEventArg::GetCurrentUploadProgress(void) const
155 return __uploadCurrentProgress;
159 _HttpTransactionEventArg::GetTotalUploadProgress(void) const
161 return __uploadTotalProgress;
165 _HttpTransactionEventArg::SetDownloadProgress(long long currentSize, long long totalSize)
167 __downloadCurrentProgress = currentSize;
168 __downloadTotalProgress = totalSize;
172 _HttpTransactionEventArg::GetCurrentDownloadProgress(void) const
174 return __downloadCurrentProgress;
178 _HttpTransactionEventArg::GetTotalDownloadProgress(void) const
180 return __downloadTotalProgress;
184 _HttpTransactionEventArg::SetServerCert(String* pServerCert)
186 __pServerCert = pServerCert;
190 _HttpTransactionEventArg::GetServerCert(void) const
192 return __pServerCert;
196 _HttpTransactionEventArg::SetServerCertList(IList* pServerCertList)
198 __pServerCertList = pServerCertList;
202 _HttpTransactionEventArg::GetServerCertList(void) const
204 return __pServerCertList;
207 } } } // Tizen::Net::Http