4 * Copyright (File::*c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
8 * Hyunjong Park <phjwithyou.park@samsung.com>
9 * Juyoung Kim <j0.kim@samsung.com>
10 * Vitaliy Cherepanov <v.cherepanov@samsung.com>
12 * This library is free software; you can redistribute it and/or modify it under
13 * the terms of the GNU Lesser General Public License as published by the
14 * Free Software Foundation; either version 2.1 of the License, or (at your option)
17 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20 * License for more details.
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this library; if not, write to the Free Software Foundation, Inc., 51
24 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28 * - Samsung RnD Institute Russia
33 #include <FBaseObject.h>
34 #include <FBaseResult.h>
36 /*#include <sys/socket.h>
37 #include <sys/types.h>
38 #include <netinet/in.h>
40 #include <arpa/inet.h>*/
47 #include "probeinfo.h"
49 #include "dacollection.h"
50 #include "tizen_probe.h"
51 #include "../probe_socket/da_socket.h"
52 static enum DaOptions _sopt = OPT_NETWORK;
58 NET_BEARER_PS = 1, /**< The bearer type for the PS domain */
59 NET_BEARER_CS, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
60 NET_BEARER_WIFI, /**< The bearer type for Wi-Fi */
61 NET_BEARER_WIFI_DIRECT, /**< The bearer type for Wi-Fi Direct @n
62 * This bearer type cannot be tested on the Emulator. */
63 NET_BEARER_USB, /**< The bearer type for USB NDIS mode @n
64 * Can use this bearer type via USB Tethering mode. @n
65 * This bearer type cannot be tested on the Emulator. */
66 NET_BEARER_MMS, /**< The bearer type for MMS */
67 NET_BEARER_NONE = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Bearer Type not set
70 enum NetProtocolType {
71 NET_PROTO_TYPE_IPV4 = 1, /**< The IPV4 type */
72 NET_PROTO_TYPE_PPP, /**< The PPP type */
73 NET_PROTO_TYPE_IPV6, /**< The IPV6 type, currently NOT supported */
74 NET_PROTO_TYPE_NONE = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Protocol type not set
77 enum NetAddressScheme {
78 NET_ADDRESS_SCHEME_DYNAMIC = 1, /**< The Dynamic IP or DNS Address */
79 NET_ADDRESS_SCHEME_STATIC, /**< The Static IP or DNS Address */
80 NET_ADDRESS_SCHEME_NONE = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Address Scheme not set
83 enum NetAddressFamily {
84 NET_AF_IPV4 = 1, /**< The default @n An IPv4 address [RFC791] is represented in decimal format with dots as delimiters. */
85 NET_AF_IPV6, /**< An IPv6 address [RFC2373] is generally represented in hexadecimal numbers with colons as delimiters @n It can also be a combination of hexadecimal and decimal numbers with dots and colons as delimiters. */
86 NET_AF_ALPHANUMERIC, /**< A generic alphanumeric address (as defined by alphanum in [RFC2396]) */
87 NET_AF_APN, /**< A GPRS APN as defined in [GENFORM] */
88 NET_AF_NONE = 0 // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. Network Address Family not set
91 enum NetConnectionState {
92 NET_CONNECTION_STATE_NONE, /**< The initial state */
93 NET_CONNECTION_STATE_STARTING, /**< The network connection is being established */
94 NET_CONNECTION_STATE_STARTED, /**< The network connection has been established */
95 NET_CONNECTION_STATE_STOPPING, /**< The network connection is being disconnected */
96 NET_CONNECTION_STATE_STOPPED, /**< The network connection has been disconnected */
97 NET_CONNECTION_STATE_SUSPENDED, /**< The network connection has been suspended */
98 NET_CONNECTION_STATE_SUSPEND = 5, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
99 NET_CONNECTION_STATE_RESUMED, /**< The network connection is established, and recovered from SUSPEND state - enable to send/receive packet data */
100 NET_CONNECTION_STATE_AVAILABLE, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
101 NET_CONNECTION_STATE_UNAVAILABLE, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
104 class _IpAddressImpl;
107 virtual ~IpAddress(void);
108 static unsigned short HostToNetworkOrder(unsigned short host);
109 static unsigned long HostToNetworkOrder(unsigned long host);
110 static unsigned short NetworkToHostOrder(unsigned short network);
111 static unsigned long NetworkToHostOrder(unsigned long network);
112 virtual NetAddressFamily GetNetAddressFamily(void) const = 0;
113 virtual result GetAddress(Tizen::Base::ByteBuffer& ipAddr) const = 0;
114 virtual Tizen::Base::String ToString(void) const = 0;
115 virtual IpAddress* CloneN(void) const = 0;
119 virtual void IpAddress_Reserved1(void) {
121 virtual void IpAddress_Reserved2(void) {
123 virtual void IpAddress_Reserved3(void) {
125 virtual void IpAddress_Reserved4(void) {
127 virtual void IpAddress_Reserved5(void) {
130 IpAddress(const IpAddress& rhs);
131 IpAddress& operator =(const IpAddress& rhs);
133 _IpAddressImpl* _pIpAddressImpl;
134 friend class _IpAddressImpl;
138 class _NetConnectionInfoImpl;
139 class NetConnectionInfo {
141 NetConnectionInfo(void);
142 virtual ~NetConnectionInfo(void);
143 NetBearerType GetBearerType(void) const;
144 NetProtocolType GetProtocolType(void) const;
145 Tizen::Base::String GetAccessPointName(void) const;
146 NetAddressScheme GetLocalAddressScheme(void) const;
147 const IpAddress* GetLocalAddress(void) const;
148 NetAddressScheme GetDnsAddressScheme(void) const;
149 const IpAddress* GetPrimaryDnsAddress(void) const;
150 const IpAddress* GetSecondaryDnsAddress(void) const;
151 const IpAddress* GetSubnetMaskAddress(void) const;
152 const IpAddress* GetDefaultGatewayAddress(void) const;
153 NetConnectionInfo(const NetConnectionInfo& rhs);
154 NetConnectionInfo& operator =(const NetConnectionInfo& rhs);
155 virtual bool Equals(const Tizen::Base::Object& rhs) const;
156 virtual int GetHashCode(void) const;
158 _NetConnectionInfoImpl* __pNetConnectionInfoImpl;
159 friend class _NetConnectionInfoImpl;
169 typedef int NetAccountId;
172 HTTP_VERSION_1_0, /**< %Http version 1.0 */
173 HTTP_VERSION_1_1 /**< %Http version 1.1 */
176 enum NetHttpSessionMode {
177 NET_HTTP_SESSION_MODE_NORMAL, /**< The Normal Mode */
178 NET_HTTP_SESSION_MODE_PIPELINING, /**< The Pipelining mode */
179 NET_HTTP_SESSION_MODE_MULTIPLE_HOST /**< The Multiple host mode */
182 enum NetHttpCookieFlag {
183 NET_HTTP_COOKIE_FLAG_NONE, /**< The mode is not defined */
184 NET_HTTP_COOKIE_FLAG_ALWAYS_AUTOMATIC, /**< The cookie will be parsed and saved, and also attached to request automatically */
185 NET_HTTP_COOKIE_FLAG_ALWAYS_MANUAL /**< The cookie will be handled by the user action with Tizen::Net::Http::HttpRequest::SetCookie() and Tizen::Net::Http::HttpCookieStorageManager::GetCookies() */
188 enum NetHttpStatusCode {
189 NET_HTTP_STATUS_UNDEFINED = 0, /**< @if OSPDEPREC The undefined status @endif */
190 NET_HTTP_STATUS_CONTINUE = 100, /**< @if OSPDEPREC The status code: 100 Continue @endif */
191 NET_HTTP_STATUS_SWITCHING_PROTOCOLS = 101, /**< @if OSPDEPREC The status code: 101 Switching Protocols @endif */
192 NET_HTTP_STATUS_OK = 200, /**< @if OSPDEPREC The status code: 200 OK @endif */
193 NET_HTTP_STATUS_CREATED = 201, /**< @if OSPDEPREC The status code: 201 Created @endif */
194 NET_HTTP_STATUS_ACCEPTED = 202, /**< @if OSPDEPREC The status code: 202 Accepted @endif */
195 NET_HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 203, /**< @if OSPDEPREC The status code: 203 Non-Authoritative Information @endif */
196 NET_HTTP_STATUS_NO_CONTENT = 204, /**< @if OSPDEPREC The status code: 204 No %Content @endif */
197 NET_HTTP_STATUS_RESET_CONTENT = 205, /**< @if OSPDEPREC The status code: 205 Reset %Content @endif */
198 NET_HTTP_STATUS_PARTIAL_CONTENT = 206, /**< @if OSPDEPREC The status code: 206 Partial %Content @endif */
200 NET_HTTP_STATUS_MULTIPLE_CHOICE = 300, /**< @if OSPDEPREC The status code: 300 Multiple Choices @endif */
201 NET_HTTP_STATUS_MOVED_PERMANENTLY = 301, /**< @if OSPDEPREC The status code: 301 Moved Permanently @endif */
202 NET_HTTP_STATUS_MOVED_TEMPORARILY = 302, /**< @if OSPDEPREC The status code: 302 Found @endif */
203 NET_HTTP_STATUS_SEE_OTHER = 303, /**< @if OSPDEPREC The status code: 303 See Other @endif */
204 NET_HTTP_STATUS_NOT_MODIFIED = 304, /**< @if OSPDEPREC The status code: 304 Not Modified @endif */
205 NET_HTTP_STATUS_USE_PROXY = 305, /**< @if OSPDEPREC The status code: 305 Use Proxy @endif */
207 NET_HTTP_STATUS_BAD_REQUEST = 400, /**< @if OSPDEPREC The status code: 400 Bad Request @endif */
208 NET_HTTP_STATUS_UNAUTHORIZED = 401, /**< @if OSPDEPREC The status code: 401 Unauthorized @endif */
209 NET_HTTP_STATUS_PAYMENT_REQUIRED = 402, /**< @if OSPDEPREC The status code: 402 Payment Required @endif */
210 NET_HTTP_STATUS_FORBIDDEN = 403, /**< @if OSPDEPREC The status code: 403 Forbidden @endif */
211 NET_HTTP_STATUS_NOT_FOUND = 404, /**<@if OSPDEPREC The status code: 404 Not Found @endif */
212 NET_HTTP_STATUS_METHOD_NOT_ALLOWED = 405, /**< @if OSPDEPREC The status code: 405 Method Not Allowed @endif */
213 NET_HTTP_STATUS_NOT_ACCEPTABLE = 406, /**< @if OSPDEPREC The status code: 406 Not Acceptable @endif */
214 NET_HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 407, /**< @if OSPDEPREC The status code: 407 Proxy Authentication Required @endif */
215 NET_HTTP_STATUS_REQUEST_TIME_OUT = 408, /**< @if OSPDEPREC The status code: 408 Request Timeout (not used) @endif */
216 NET_HTTP_STATUS_CONFLICT = 409, /**<@if OSPDEPREC The status code: 409 Conflict @endif */
217 NET_HTTP_STATUS_GONE = 410, /**< @if OSPDEPREC The status code: 410 Gone @endif */
218 NET_HTTP_STATUS_LENGTH_REQUIRED = 411, /**< @if OSPDEPREC The status code: 411 Length Required @endif */
219 NET_HTTP_STATUS_PRECONDITION_FAILED = 412, /**<@if OSPDEPREC The status code: 412 Precondition Failed @endif */
220 NET_HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 413, /**< @if OSPDEPREC The status code: 413 Request Entity Too Large (not used) @endif */
221 NET_HTTP_STATUS_REQUEST_URI_TOO_LARGE = 414, /**< @if OSPDEPREC The status code: 414 Request-URI Too Long (not used) @endif */
222 NET_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 415, /**< @if OSPDEPREC The status code: 415 Unsupported %Media Type @endif */
224 NET_HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, /**< @if OSPDEPREC The status code: 500 Internal Server Error @endif */
225 NET_HTTP_STATUS_NOT_IMPLEMENTED = 501, /**< @if OSPDEPREC The status code: 501 Not Implemented @endif */
226 NET_HTTP_STATUS_BAD_GATEWAY = 502, /**< @if OSPDEPREC The status code: 502 Bad Gateway @endif */
227 NET_HTTP_STATUS_SERVICE_UNAVAILABLE = 503, /**< @if OSPDEPREC The status code: 503 Service Unavailable @endif */
228 NET_HTTP_STATUS_GATEWAY_TIME_OUT = 504, /**< @if OSPDEPREC The status code: 504 Gateway Timeout @endif */
229 NET_HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 505 /**< @if OSPDEPREC The status code: 505 HTTP Version Not Supported @endif */
233 NET_HTTP_METHOD_GET = 0x40, /**< The HTTP GET Method */
234 NET_HTTP_METHOD_OPTIONS = 0x41, /**< The HTTP OPTIONS Method */
235 NET_HTTP_METHOD_HEAD = 0x42, /**< The HTTP HEAD Method */
236 NET_HTTP_METHOD_DELETE = 0x43, /**< The HTTP DELETE Method */
237 NET_HTTP_METHOD_TRACE = 0x44, /**< The HTTP TRACE Method */
238 NET_HTTP_METHOD_POST = 0x60, /**< The HTTP POST Method */
239 NET_HTTP_METHOD_PUT = 0x61, /**< The HTTP PUT Method */
240 NET_HTTP_METHOD_CONNECT = 0x70, /**< The HTTP CONNECT Method */
243 enum NetHttpCertificateVerificationFlag {
244 HTTP_CV_FLAG_AUTOMATIC, /**< The certificate is verified by the system @n If server certificate is invalid, the IHttpTransactionEventListener::OnTransactionCertVerificationRequiredN() listener is received. */
245 HTTP_CV_FLAG_MANUAL, /**< The certificate verification is handled by user action when the IHttpTransactionEventListener::OnTransactionCertVerificationRequestedN() listener is received */
246 HTTP_CV_FLAG_IGNORED, /**< The certificate verification is ignored */
249 enum NetHttpAuthScheme {
250 NET_HTTP_AUTH_NONE = 0, /**< The no authentication type */
251 NET_HTTP_AUTH_PROXY_BASIC = 1, /**< The authentication type is Proxy Basic Authentication */
252 NET_HTTP_AUTH_PROXY_MD5 = 2, /**< The authentication type is Proxy Digest Authentication */
253 NET_HTTP_AUTH_WWW_BASIC = 3, /**< The authentication Type is HTTP Basic Authentication */
254 NET_HTTP_AUTH_WWW_MD5 = 4, /**< The authentication type is HTTP Digest Authentication */
255 NET_HTTP_AUTH_PROXY_NTLM = 5, /**< The authentication type is Proxy NTLM Authentication */
256 NET_HTTP_AUTH_WWW_NTLM = 7, /**< The authentication type is NTLM Authentication */
257 NET_HTTP_AUTH_WWW_NEGOTIATE = 8 /**< The authentication type is Negotiate Authentication */
260 class _HttpHeaderImpl;
264 HttpHeader(const HttpHeader* pHeader);
265 virtual ~HttpHeader(void);
267 result AddField(const Tizen::Base::String& fieldName,
268 const Tizen::Base::String& fieldValue);
269 result RemoveField(const Tizen::Base::String& fieldName);
270 result RemoveField(const Tizen::Base::String& fieldName,
271 const Tizen::Base::String& fieldValue);
272 void RemoveAll(void);
273 Tizen::Base::String* GetRawHeaderN(void) const;
274 Tizen::Base::Collection::IList* GetFieldNamesN(void) const;
275 Tizen::Base::Collection::IEnumerator* GetFieldValuesN(
276 const Tizen::Base::String& fieldName) const;
278 HttpHeader(const HttpHeader& rhs);
279 HttpHeader& operator =(const HttpHeader& rhs);
281 friend class _HttpHeaderImpl;
282 _HttpHeaderImpl* __pHttpHeaderImpl;
285 Tizen::Base::String* HttpHeader::GetRawHeaderN(void) const
287 typedef Tizen::Base::String* (HttpHeader::*methodType)(void) const;
288 static methodType GetRawHeaderNp;
289 Tizen::Base::String* retVal;
291 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net4Http10HttpHeader13GetRawHeaderNEv,
294 retVal = (this->*GetRawHeaderNp)();
298 if (retVal == NULL) {
301 bufferSize = retVal->GetLength();
302 out = new char[bufferSize + sizeof(char)];
303 WcharToChar(out, retVal->GetPointer());
307 info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
308 info.msg_total_size = bufferSize;
310 AFTER_ORIGINAL_TIZEN_SOCK("HttpHeader::GetRawHeaderN", VT_NULL, NULL,
311 (unsigned int)this, (unsigned int)this,
312 HTTP_API_RESPONSE, info, "s", "void");
322 class HttpTransaction;
324 class HttpAuthentication;
325 class HttpCookieStorageManager;
327 class _HttpSessionImpl;
331 result Construct(NetHttpSessionMode sessionMode,
332 const Tizen::Base::String* pProxyAddr,
333 const Tizen::Base::String& hostAddr,
334 const HttpHeader* pCommonHeader, NetHttpCookieFlag flag =
335 NET_HTTP_COOKIE_FLAG_ALWAYS_MANUAL);
336 result Construct(const NetConnection& netConnection,
337 NetHttpSessionMode sessionMode,
338 const Tizen::Base::String* pProxyAddr,
339 const Tizen::Base::String& hostAddr,
340 const HttpHeader* pCommonHeader, NetHttpCookieFlag flag =
341 NET_HTTP_COOKIE_FLAG_ALWAYS_MANUAL);
344 HttpTransaction* OpenTransactionN(void);
345 HttpTransaction* OpenTransactionN(const HttpAuthentication& auth);
346 result CancelTransaction(HttpTransaction& httpTransaction);
347 result CloseTransaction(HttpTransaction& httpTransaction);
348 result CloseAllTransactions(void);
349 result SetAutoRedirectionEnabled(bool enable);
350 bool IsAutoRedirectionEnabled(void) const;
351 int GetActiveTransactionCount(void) const;
352 int GetMaxTransactionCount(void) const;
353 HttpCookieStorageManager* GetCookieStorageManager(void) const;
355 HttpSession(const HttpSession& rhs);
356 HttpSession& operator =(const HttpSession& rhs);
358 friend class _HttpSessionImpl;
359 _HttpSessionImpl* __pHttpSessionImpl;
363 result HttpSession::Construct(NetHttpSessionMode sessionMode,
364 const Tizen::Base::String* pProxyAddr,
365 const Tizen::Base::String& hostAddr, const HttpHeader* pCommonHeader,
366 NetHttpCookieFlag flag) {
367 typedef result (HttpSession::*methodType)(NetHttpSessionMode sessionMode,
368 const Tizen::Base::String* pProxyAddr,
369 const Tizen::Base::String& hostAddr,
370 const HttpHeader* pCommonHeader, NetHttpCookieFlag flag);
371 static methodType Constructp;
374 BEFORE_ORIGINAL_TIZEN_NET(
375 _ZN5Tizen3Net4Http11HttpSession9ConstructENS1_18NetHttpSessionModeEPKNS_4Base6StringERS6_PKNS1_10HttpHeaderENS1_17NetHttpCookieFlagE,
378 retVal = (this->*Constructp)(sessionMode, pProxyAddr, hostAddr,
379 pCommonHeader, flag);
382 if (NULL != pProxyAddr) {
383 WcharToChar(temp1, pProxyAddr->GetPointer());
385 strcpy(temp1, "NULL");
388 WcharToChar(temp2, hostAddr.GetPointer());
390 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::Construct", VT_ULONG, retVal,
391 (unsigned int)this, (unsigned int)this,
392 HTTP_API_SESSION_CONSTRUCT,
394 sessionMode, temp1, temp2,
395 voidp_to_uint64(&pCommonHeader), flag);
399 result HttpSession::Construct(const NetConnection& netConnection,
400 NetHttpSessionMode sessionMode, const Tizen::Base::String* pProxyAddr,
401 const Tizen::Base::String& hostAddr, const HttpHeader* pCommonHeader,
402 NetHttpCookieFlag flag)
404 typedef result (HttpSession::*methodType)(
405 const NetConnection& netConnection, NetHttpSessionMode sessionMode,
406 const Tizen::Base::String* pProxyAddr,
407 const Tizen::Base::String& hostAddr,
408 const HttpHeader* pCommonHeader, NetHttpCookieFlag flag);
409 static methodType Constructp;
412 BEFORE_ORIGINAL_TIZEN_NET(
413 _ZN5Tizen3Net4Http11HttpSession9ConstructERKNS0_13NetConnectionENS1_18NetHttpSessionModeEPKNS_4Base6StringERS9_PKNS1_10HttpHeaderENS1_17NetHttpCookieFlagE,
416 retVal = (this->*Constructp)(netConnection, sessionMode, pProxyAddr,
417 hostAddr, pCommonHeader, flag);
420 if (NULL != pProxyAddr) {
421 WcharToChar(temp1, pProxyAddr->GetPointer());
423 strcpy(temp1, "NULL");
426 WcharToChar(temp2, hostAddr.GetPointer());
428 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::Construct", VT_ULONG, retVal,
429 (unsigned int)this, (unsigned int)this,
430 HTTP_API_SESSION_CONSTRUCT,
432 voidp_to_uint64(&netConnection), sessionMode,
434 voidp_to_uint64(&pCommonHeader), flag);
438 HttpTransaction* HttpSession::OpenTransactionN(void)
440 typedef HttpTransaction* (HttpSession::*methodType)(void);
441 static methodType OpenTransactionNp;
443 HttpTransaction* retVal;
445 BEFORE_ORIGINAL_TIZEN_NET(
446 _ZN5Tizen3Net4Http11HttpSession16OpenTransactionNEv,
449 retVal = (this->*OpenTransactionNp)();
452 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::OpenTransactionN", VT_PTR, retVal,
453 (unsigned int)this, (unsigned int)this, HTTP_API_TRANSACTION_OPEN,
458 HttpTransaction* HttpSession::OpenTransactionN(const HttpAuthentication& auth)
460 typedef HttpTransaction* (HttpSession::*methodType)(
461 const HttpAuthentication& auth);
462 static methodType OpenTransactionNp;
464 HttpTransaction* retVal;
466 BEFORE_ORIGINAL_TIZEN_NET(
467 _ZN5Tizen3Net4Http11HttpSession16OpenTransactionNERKNS1_18HttpAuthenticationE,
470 retVal = (this->*OpenTransactionNp)(auth);
474 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::OpenTransactionN", VT_PTR, retVal,
475 (unsigned int)this, (unsigned int)this,
476 HTTP_API_TRANSACTION_OPEN,
477 info, "x", voidp_to_uint64(&auth));
482 result HttpSession::CancelTransaction(HttpTransaction& httpTransaction)
484 typedef result (HttpSession::*methodType)(HttpTransaction& httpTransaction);
485 static methodType CancelTransactionp;
489 BEFORE_ORIGINAL_TIZEN_NET(
490 _ZN5Tizen3Net4Http11HttpSession17CancelTransactionERNS1_15HttpTransactionE,
493 retVal = (this->*CancelTransactionp)(httpTransaction);
495 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::CancelTransaction", VT_ULONG,
496 retVal, (unsigned int)this,
498 HTTP_API_TRANSACTION_CLOSE, info, "x",
499 voidp_to_uint64(&httpTransaction));
504 result HttpSession::CloseTransaction(HttpTransaction& httpTransaction)
506 typedef result (HttpSession::*methodType)(HttpTransaction& httpTransaction);
507 static methodType CloseTransactionp;
511 BEFORE_ORIGINAL_TIZEN_NET(
512 _ZN5Tizen3Net4Http11HttpSession16CloseTransactionERNS1_15HttpTransactionE,
515 retVal = (this->*CloseTransactionp)(httpTransaction);
517 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::CloseTransaction", VT_ULONG, retVal,
518 (unsigned int)this, (unsigned int)this,
519 HTTP_API_TRANSACTION_CLOSE,
520 info, "x", voidp_to_uint64(&httpTransaction));
525 result HttpSession::CloseAllTransactions(void)
527 typedef result (HttpSession::*methodType)(void);
528 static methodType CloseTransactionp;
532 BEFORE_ORIGINAL_TIZEN_NET(
533 _ZN5Tizen3Net4Http11HttpSession20CloseAllTransactionsEv,
536 retVal = (this->*CloseTransactionp)();
538 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::CloseAllTransactions", VT_ULONG,
539 retVal, (unsigned int)this, (unsigned int)this,
540 HTTP_API_TRANSACTION_CLOSE, info, "s", "void");
545 result HttpSession::SetAutoRedirectionEnabled(bool enable)
547 typedef result (HttpSession::*methodType)(bool enable);
548 static methodType SetAutoRedirectionEnabledp;
551 BEFORE_ORIGINAL_TIZEN_NET(
552 _ZN5Tizen3Net4Http11HttpSession25SetAutoRedirectionEnabledEb,
553 SetAutoRedirectionEnabledp);
555 retVal = (this->*SetAutoRedirectionEnabledp)(enable);
557 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::SetAutoRedirectionEnabled",
558 VT_ULONG, retVal, (unsigned int)this, (unsigned int)this,
559 HTTP_API_OTHER, info, "d", enable);
563 bool HttpSession::IsAutoRedirectionEnabled(void) const
565 typedef bool (HttpSession::*methodType)(void) const;
566 static methodType IsAutoRedirectionEnabledp;
569 BEFORE_ORIGINAL_TIZEN_NET(
570 _ZNK5Tizen3Net4Http11HttpSession24IsAutoRedirectionEnabledEv,
571 IsAutoRedirectionEnabledp);
573 retVal = (this->*IsAutoRedirectionEnabledp)();
575 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::IsAutoRedirectionEnabled", VT_INT,
576 retVal, (unsigned int)this, (unsigned int)this,
577 HTTP_API_OTHER, info, "s", "void");
581 int HttpSession::GetActiveTransactionCount(void) const
583 typedef int (HttpSession::*methodType)(void) const;
584 static methodType GetActiveTransactionCountp;
587 BEFORE_ORIGINAL_TIZEN_NET(
588 _ZNK5Tizen3Net4Http11HttpSession25GetActiveTransactionCountEv,
589 GetActiveTransactionCountp);
591 retVal = (this->*GetActiveTransactionCountp)();
593 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::GetActiveTransactionCount", VT_INT,
594 retVal, (unsigned int)this, (unsigned int)this,
595 HTTP_API_OTHER, info, "s", "void");
599 int HttpSession::GetMaxTransactionCount(void) const
601 typedef int (HttpSession::*methodType)(void) const;
602 static methodType GetMaxTransactionCountp;
605 BEFORE_ORIGINAL_TIZEN_NET(
606 _ZNK5Tizen3Net4Http11HttpSession22GetMaxTransactionCountEv,
607 GetMaxTransactionCountp);
609 retVal = (this->*GetMaxTransactionCountp)();
611 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::GetMaxTransactionCount", VT_INT,
612 retVal, (unsigned int)this, (unsigned int)this,
613 HTTP_API_OTHER, info, "s", "void");
617 HttpCookieStorageManager* HttpSession::GetCookieStorageManager(void) const
619 typedef HttpCookieStorageManager* (HttpSession::*methodType)(void) const;
620 static methodType GetMaxTransactionCountp;
621 HttpCookieStorageManager* retVal;
623 BEFORE_ORIGINAL_TIZEN_NET(
624 _ZNK5Tizen3Net4Http11HttpSession23GetCookieStorageManagerEv,
625 GetMaxTransactionCountp);
627 retVal = (this->*GetMaxTransactionCountp)();
630 AFTER_ORIGINAL_TIZEN_SOCK("HttpSession::GetCookieStorageManager", VT_PTR,
631 retVal, (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION,
636 HttpSession::~HttpSession(void)
638 typedef void (HttpSession::*methodType)(void);
639 static methodType HttpSessionDp = 0;
641 probeInfo_t probeInfo;
644 bool bfiltering = false;
645 if (!HttpSessionDp) {
646 if (lib_handle[LIBOSP_NET] == NULL) {
647 lib_handle[LIBOSP_NET] = dlopen(lib_string[LIBOSP_NET], RTLD_LAZY);
648 if (lib_handle[LIBOSP_NET] == NULL) {
649 char perror_msg[128];
650 sprintf(perror_msg, "dlopen failed : %s",
651 lib_string[LIBOSP_NET]);
656 void* funcp = dlsym(lib_handle[LIBOSP_NET],
657 "_ZN5Tizen3Net4Http11HttpSessionD1Ev");
658 if (funcp == NULL || dlerror() != NULL) {
659 perror("dlsym failed : " "_ZN5Tizen3Net4Http11HttpSessionD1Ev");
662 memcpy(&HttpSessionDp, &funcp, sizeof(void*));
667 ((void*) __builtin_extract_return_addr(
668 __builtin_return_address(0))), bfiltering, _sopt))
670 setProbePoint(&probeInfo);
674 (this->*HttpSessionDp)();
676 if (postBlockBegin(blockresult)) {
680 log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", 15,
681 probeInfo.eventIndex, "HttpSession::~HttpSession",
682 probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
683 log.length += sprintf(log.data + log.length, "`,`,");
684 log.length += sprintf(log.data + log.length,
685 "`,0`,0`,2`,%u`,0x%x`,0x%x`,2`,%d`,`,",
686 (unsigned int) CALLER_ADDRESS, (unsigned int) this,
687 (unsigned int) this, HTTP_API_TRANSACTION_CLOSE);
688 log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
689 getBacktraceString(&log, 4096 - log.length - 17);
690 log.length += sprintf(log.data + log.length, "`,callstack_end");
692 printLog(&log, MSG_LOG);
701 class IHttpTransactionEventListener;
702 class IHttpProgressEventListener;
704 class _HttpTransactionImpl;
705 class HttpTransaction {
707 ~HttpTransaction(void);
710 HttpAuthentication* OpenAuthenticationInfoN(void);
711 HttpRequest* GetRequest(void) const;
712 HttpResponse* GetResponse(void) const;
713 result AddHttpTransactionListener(IHttpTransactionEventListener& listener);
714 result RemoveHttpTransactionListener(
715 IHttpTransactionEventListener& listener);
716 result SetHttpProgressListener(IHttpProgressEventListener& listener);
717 result SetUserObject(const Tizen::Base::Object* pUserData);
718 Tizen::Base::Object* GetUserObject(void) const;
719 bool EnableTransactionReadyToWrite(void);
723 result SetClientCertificate(int certificateId);
724 result SetTimeout(int timeout);
725 result SetServerCertificateVerification(
726 NetHttpCertificateVerificationFlag flag = HTTP_CV_FLAG_AUTOMATIC);
728 HttpTransaction(void);
729 HttpTransaction(const HttpTransaction& rhs);
730 HttpTransaction& operator =(const HttpTransaction& rhs);
732 friend class _HttpTransactionImpl;
733 _HttpTransactionImpl* __pHttpTransactionImpl;
736 HttpAuthentication* HttpTransaction::OpenAuthenticationInfoN(void)
738 typedef HttpAuthentication* (HttpTransaction::*methodType)(void) const;
739 static methodType GetRequestp;
740 HttpAuthentication* retVal;
742 BEFORE_ORIGINAL_TIZEN_NET(
743 _ZNK5Tizen3Net4Http15HttpTransaction10GetRequestEv, GetRequestp);
745 retVal = (this->*GetRequestp)();
748 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::OpenAuthenticationInfoN",
749 VT_PTR, retVal, (unsigned int)this, (unsigned int)this,
750 HTTP_API_ALLOCATION, info, "s", "void");
754 HttpRequest* HttpTransaction::GetRequest(void) const
756 typedef HttpRequest* (HttpTransaction::*methodType)(void) const;
757 static methodType GetRequestp;
760 BEFORE_ORIGINAL_TIZEN_NET(
761 _ZNK5Tizen3Net4Http15HttpTransaction10GetRequestEv, GetRequestp);
763 retVal = (this->*GetRequestp)();
766 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetRequest", VT_PTR, retVal,
767 (unsigned int)this, (unsigned int)this,
768 HTTP_API_ALLOCATION, info, "s", "void");
772 HttpResponse* HttpTransaction::GetResponse(void) const
774 typedef HttpResponse* (HttpTransaction::*methodType)(void) const;
775 static methodType GetResponsep;
776 HttpResponse* retVal;
778 BEFORE_ORIGINAL_TIZEN_NET(
779 _ZNK5Tizen3Net4Http15HttpTransaction11GetResponseEv, GetResponsep);
781 retVal = (this->*GetResponsep)();
784 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetResponse", VT_PTR, retVal,
785 (unsigned int)this, (unsigned int)this,
786 HTTP_API_ALLOCATION, info, "s", "void");
790 result HttpTransaction::AddHttpTransactionListener(
791 IHttpTransactionEventListener& listener) {
792 typedef result (HttpTransaction::*methodType)(
793 IHttpTransactionEventListener& listener);
794 static methodType AddHttpTransactionListenerp;
797 BEFORE_ORIGINAL_TIZEN_NET(
798 _ZN5Tizen3Net4Http15HttpTransaction26AddHttpTransactionListenerERNS1_29IHttpTransactionEventListenerE,
799 AddHttpTransactionListenerp);
801 retVal = (this->*AddHttpTransactionListenerp)(listener);
803 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::AddHttpTransactionListener",
804 VT_ULONG, retVal, (unsigned int)this,
806 HTTP_API_OTHER, info,
807 "x", voidp_to_uint64(&listener));
811 result HttpTransaction::RemoveHttpTransactionListener(
812 IHttpTransactionEventListener& listener) {
813 typedef result (HttpTransaction::*methodType)(
814 IHttpTransactionEventListener& listener);
815 static methodType RemoveHttpTransactionListenerp;
818 BEFORE_ORIGINAL_TIZEN_NET(
819 _ZN5Tizen3Net4Http15HttpTransaction29RemoveHttpTransactionListenerERNS1_29IHttpTransactionEventListenerE,
820 RemoveHttpTransactionListenerp);
822 retVal = (this->*RemoveHttpTransactionListenerp)(listener);
824 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::RemoveHttpTransactionListener",
825 VT_ULONG, retVal, (unsigned int)this,
827 HTTP_API_OTHER, info, "x",
828 voidp_to_uint64(&listener));
832 result HttpTransaction::SetHttpProgressListener(
833 IHttpProgressEventListener& listener) {
834 typedef result (HttpTransaction::*methodType)(
835 IHttpProgressEventListener& listener);
836 static methodType SetHttpProgressListenerp;
839 BEFORE_ORIGINAL_TIZEN_NET(
840 _ZN5Tizen3Net4Http15HttpTransaction23SetHttpProgressListenerERNS1_26IHttpProgressEventListenerE,
841 SetHttpProgressListenerp);
843 retVal = (this->*SetHttpProgressListenerp)(listener);
845 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetHttpProgressListener",
846 VT_ULONG, retVal, (unsigned int)this,
848 HTTP_API_OTHER, info, "x",
849 voidp_to_uint64(&listener));
853 result HttpTransaction::SetUserObject(const Tizen::Base::Object* pUserData)
855 typedef result (HttpTransaction::*methodType)(
856 const Tizen::Base::Object* pUserData);
857 static methodType SetUserObjectp;
860 BEFORE_ORIGINAL_TIZEN_NET(
861 _ZN5Tizen3Net4Http15HttpTransaction13SetUserObjectEPKNS_4Base6ObjectE,
864 retVal = (this->*SetUserObjectp)(pUserData);
866 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetUserObject", VT_ULONG,
867 retVal, (unsigned int)this,
869 HTTP_API_OTHER, info, "x",
870 voidp_to_uint64(&pUserData));
874 Tizen::Base::Object* HttpTransaction::GetUserObject(void) const
876 typedef Tizen::Base::Object* (HttpTransaction::*methodType)(void) const;
877 static methodType GetUserObjectp;
878 Tizen::Base::Object* retVal;
880 BEFORE_ORIGINAL_TIZEN_NET(
881 _ZNK5Tizen3Net4Http15HttpTransaction13GetUserObjectEv,
884 retVal = (this->*GetUserObjectp)();
886 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetUserObject", VT_PTR, retVal,
887 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
892 bool HttpTransaction::EnableTransactionReadyToWrite(void)
894 typedef bool (HttpTransaction::*methodType)(void) const;
895 static methodType EnableTransactionReadyToWritep;
898 BEFORE_ORIGINAL_TIZEN_NET(
899 _ZN5Tizen3Net4Http15HttpTransaction29EnableTransactionReadyToWriteEv,
900 EnableTransactionReadyToWritep);
902 retVal = (this->*EnableTransactionReadyToWritep)();
904 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::GetUserObject", VT_INT, retVal,
905 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
910 result HttpTransaction::Submit(void)
912 typedef result (HttpTransaction::*methodType)(void);
913 static methodType Submitp;
916 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net4Http15HttpTransaction6SubmitEv,
919 retVal = (this->*Submitp)();
921 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::Submit", VT_ULONG, retVal,
922 (unsigned int)this, (unsigned int)this, HTTP_API_SUBMIT, info,
927 result HttpTransaction::Resume(void)
929 typedef result (HttpTransaction::*methodType)(void);
930 static methodType Resumep;
933 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net4Http15HttpTransaction6ResumeEv,
936 retVal = (this->*Resumep)();
938 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::Resume", VT_ULONG, retVal,
939 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
944 result HttpTransaction::Pause(void)
946 typedef result (HttpTransaction::*methodType)(void);
947 static methodType Pausep;
950 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net4Http15HttpTransaction5PauseEv,
953 retVal = (this->*Pausep)();
955 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::Pause", VT_ULONG, retVal,
956 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
961 result HttpTransaction::SetClientCertificate(int certificateId)
963 typedef result (HttpTransaction::*methodType)(int certificateId);
964 static methodType SetClientCertificatep;
967 BEFORE_ORIGINAL_TIZEN_NET(
968 _ZN5Tizen3Net4Http15HttpTransaction20SetClientCertificateEi,
969 SetClientCertificatep);
971 retVal = (this->*SetClientCertificatep)(certificateId);
973 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetClientCertificate", VT_ULONG,
974 retVal, (unsigned int)this, (unsigned int)this,
975 HTTP_API_OTHER, info, "d", certificateId);
979 result HttpTransaction::SetTimeout(int timeout)
981 typedef result (HttpTransaction::*methodType)(int timeout);
982 static methodType SetTimeoutp;
985 BEFORE_ORIGINAL_TIZEN_NET(
986 _ZN5Tizen3Net4Http15HttpTransaction10SetTimeoutEi, SetTimeoutp);
988 retVal = (this->*SetTimeoutp)(timeout);
990 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetTimeout", VT_ULONG, retVal,
991 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
995 result HttpTransaction::SetServerCertificateVerification(
996 NetHttpCertificateVerificationFlag flag) {
997 typedef result (HttpTransaction::*methodType)(
998 NetHttpCertificateVerificationFlag flag);
999 static methodType SetServerCertificateVerificationp;
1002 BEFORE_ORIGINAL_TIZEN_NET(
1003 _ZN5Tizen3Net4Http15HttpTransaction32SetServerCertificateVerificationENS1_34NetHttpCertificateVerificationFlagE,
1004 SetServerCertificateVerificationp);
1006 retVal = (this->*SetServerCertificateVerificationp)(flag);
1008 AFTER_ORIGINAL_TIZEN_SOCK("HttpTransaction::SetServerCertificateVerification",
1009 VT_ULONG, retVal, (unsigned int)this,
1010 (unsigned int)this, HTTP_API_OTHER, info, "d",
1015 HttpTransaction::~HttpTransaction(void)
1017 typedef void (HttpTransaction::*methodType)(void);
1018 static methodType HttpTransactiondp = 0;
1020 probeInfo_t probeInfo;
1022 int blockresult = 0;
1023 bool bfiltering = false;
1024 if (!HttpTransactiondp) {
1025 if (lib_handle[LIBOSP_NET] == NULL) {
1026 lib_handle[LIBOSP_NET] = dlopen(lib_string[LIBOSP_NET], RTLD_LAZY);
1027 if (lib_handle[LIBOSP_NET] == NULL) {
1028 char perror_msg[128];
1029 sprintf(perror_msg, "dlopen failed : %s",
1030 lib_string[LIBOSP_NET]);
1035 void* funcp = dlsym(lib_handle[LIBOSP_NET],
1036 "_ZN5Tizen3Net4Http15HttpTransactionD1Ev");
1037 if (funcp == NULL || dlerror() != NULL) {
1038 perror("dlsym failed : " "_ZN5Tizen3Net4Http15HttpTransactionD1Ev");
1041 memcpy(&HttpTransactiondp, &funcp, sizeof(void*));
1046 ((void*) __builtin_extract_return_addr(
1047 __builtin_return_address(0))), bfiltering, _sopt))
1049 setProbePoint(&probeInfo);
1053 (this->*HttpTransactiondp)();
1055 if (postBlockBegin(blockresult)) {
1059 log.length = sprintf(log.data, "%d`,%d`,%s`,%lu`,%d`,%d", 15,
1060 probeInfo.eventIndex, "HttpTransaction::~HttpTransaction",
1061 probeInfo.currentTime, probeInfo.pID, probeInfo.tID);
1062 log.length += sprintf(log.data + log.length, "`,`,");
1063 log.length += sprintf(log.data + log.length,
1064 "`,0`,0`,2`,%u`,0x%x`,0x%x`,2`,%d`,`,",
1065 (unsigned int) CALLER_ADDRESS, (unsigned int) this,
1066 (unsigned int) this, HTTP_API_TRANSACTION_CLOSE);
1067 log.length += sprintf(log.data + log.length, "`,\ncallstack_start`,");
1068 getBacktraceString(&log, 4096 - log.length - 17);
1069 log.length += sprintf(log.data + log.length, "`,callstack_end");
1071 printLog(&log, MSG_LOG);
1078 class HttpCredentials;
1080 class _HttpAuthenticationImpl;
1081 class HttpAuthentication {
1083 ~HttpAuthentication(void);
1084 Tizen::Base::String* GetRealmN(void) const;
1085 NetHttpAuthScheme GetAuthScheme(void) const;
1086 HttpTransaction* SetCredentials(HttpCredentials& credentials);
1088 HttpAuthentication(void);
1089 HttpAuthentication(const HttpAuthentication& rhs);
1090 HttpAuthentication& operator =(const HttpAuthentication& rhs);
1092 _HttpAuthenticationImpl* __pHttpAuthenticationImpl;
1093 friend class _HttpAuthenticationImpl;
1095 // HttpAuthentication
1097 class HttpCredentials {
1099 HttpCredentials(void);
1100 HttpCredentials(const Tizen::Base::String& name,
1101 const Tizen::Base::String& password);
1102 HttpCredentials(const HttpCredentials& rhs);
1103 virtual ~HttpCredentials(void);
1104 HttpCredentials& operator =(const HttpCredentials& rhs);
1105 result SetName(const Tizen::Base::String& name);
1106 result SetPassword(const Tizen::Base::String& password);
1107 Tizen::Base::String GetName(void) const;
1108 Tizen::Base::String GetPassword(void) const;
1109 virtual bool Equals(const Tizen::Base::Object& rhs) const;
1110 virtual int GetHashCode(void) const;
1112 Tizen::Base::String __userName;
1113 Tizen::Base::String __password;
1114 friend class HttpCredentialsImpl;
1115 class HttpCredentialsImpl* __pHttpCredentialsImpl;
1119 class INetConnectionEventListener;
1121 class _NetConnectionImpl;
1122 class NetConnection {
1124 NetConnection(void);
1125 virtual ~NetConnection(void);
1126 result Construct(NetAccountId netAccountId);
1128 result AddNetConnectionListener(INetConnectionEventListener& listener);
1129 result RemoveNetConnectionListener(INetConnectionEventListener& listener);
1133 NetAccountId GetNetAccountId(void) const;
1134 const NetConnectionInfo* GetNetConnectionInfo(void) const;
1135 static NetConnectionInfo* GetNetConnectionInfoN(NetAccountId netAccountId);
1136 static Tizen::Base::Collection::IList* GetAllNetConnectionInfoN(void);
1137 NetConnectionState GetConnectionState(void) const;
1139 NetConnection(const NetConnection& rhs);
1140 NetConnection& operator =(const NetConnection& rhs);
1142 _NetConnectionImpl* __pNetConnectionImpl;
1143 friend class _NetConnectionImpl;
1149 class _HttpRequestImpl;
1152 result SetMethod(NetHttpMethod method);
1153 result SetCustomMethod(const Tizen::Base::String& method);
1154 result SetVersion(HttpVersion version);
1155 result SetUri(const Tizen::Base::String& uri);
1156 result WriteBody(const Tizen::Base::ByteBuffer& body);
1157 result SetEntity(IHttpEntity& entity);
1158 HttpHeader* GetHeader(void) const;
1159 result SetCookie(const Tizen::Base::String& cookieString);
1160 Tizen::Base::String GetCookie(void) const;
1161 result SetAcceptEncoding(const Tizen::Base::String& encoding);
1165 result Construct(const HttpTransaction& httpTransaction,
1166 const HttpHeader* pCommonHeader);
1167 NetHttpMethod GetMethod(void) const;
1168 result GetCustomMethod(Tizen::Base::String& method) const;
1169 HttpVersion GetVersion(void) const;
1170 result GetUri(Tizen::Base::String& uri) const;
1171 Tizen::Base::ByteBuffer* ReadBodyN(void);
1172 Tizen::Base::String GetAcceptEncoding(void) const;
1174 HttpRequest(const HttpRequest& rhs);
1175 HttpRequest& operator =(const HttpRequest& rhs);
1177 friend class _HttpRequestImpl;
1178 _HttpRequestImpl* __pHttpRequestImpl;
1181 result HttpRequest::SetMethod(NetHttpMethod method)
1183 typedef result (HttpRequest::*methodType)(NetHttpMethod method);
1184 static methodType SetMethodp;
1187 BEFORE_ORIGINAL_TIZEN_NET(
1188 _ZN5Tizen3Net4Http11HttpRequest9SetMethodENS1_13NetHttpMethodE,
1191 retVal = (this->*SetMethodp)(method);
1193 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetMethod", VT_ULONG, retVal,
1194 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1199 result HttpRequest::SetCustomMethod(const Tizen::Base::String& method)
1201 typedef result (HttpRequest::*methodType)(
1202 const Tizen::Base::String& method);
1203 static methodType SetCustomMethodp;
1206 BEFORE_ORIGINAL_TIZEN_NET(
1207 _ZN5Tizen3Net4Http11HttpRequest15SetCustomMethodERKNS_4Base6StringE,
1210 retVal = (this->*SetCustomMethodp)(method);
1212 int nSize = method.GetLength();
1214 WcharToChar(temp, method.GetPointer());
1215 info.msg_buf = temp;
1216 info.msg_total_size = nSize;
1217 info.msg_pack_size = nSize;
1219 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetCustomMethod", VT_ULONG,
1220 retVal, (unsigned int)this,
1222 HTTP_API_REQUEST, info, "x",
1223 voidp_to_uint64(&method));
1227 result HttpRequest::SetVersion(HttpVersion version)
1229 typedef result (HttpRequest::*methodType)(HttpVersion version);
1230 static methodType SetVersionp;
1233 BEFORE_ORIGINAL_TIZEN_NET(
1234 _ZN5Tizen3Net4Http11HttpRequest6SetUriERKNS_4Base6StringE,
1237 retVal = (this->*SetVersionp)(version);
1239 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetVersion", VT_ULONG, retVal,
1240 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1245 result HttpRequest::SetUri(const Tizen::Base::String& uri)
1247 typedef result (HttpRequest::*methodType)(const Tizen::Base::String& uri);
1248 static methodType SetUrip;
1251 BEFORE_ORIGINAL_TIZEN_NET(
1252 _ZN5Tizen3Net4Http11HttpRequest6SetUriERKNS_4Base6StringE, SetUrip);
1254 retVal = (this->*SetUrip)(uri);
1256 int nSize = uri.GetLength();
1258 WcharToChar(temp, uri.GetPointer());
1260 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetUri", VT_ULONG, retVal,
1261 (unsigned int)this, (unsigned int)this, HTTP_API_REQUEST, info,
1266 result HttpRequest::WriteBody(const Tizen::Base::ByteBuffer& body)
1268 typedef result (HttpRequest::*methodType)(
1269 const Tizen::Base::ByteBuffer& body);
1270 static methodType WriteBodyp;
1273 BEFORE_ORIGINAL_TIZEN_NET(
1274 _ZN5Tizen3Net4Http11HttpRequest9WriteBodyERKNS_4Base10ByteBufferE,
1277 retVal = (this->*WriteBodyp)(body);
1279 int bufferSize = body.GetLimit();
1280 char* pBuffer = (char*) (body.GetPointer());
1281 Tizen::Base::String strData;
1282 strData.SetCapacity(bufferSize);
1283 strData.Append(pBuffer);
1284 char* out = new char[bufferSize];
1285 WcharToChar(out, strData.GetPointer());
1288 info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
1289 info.msg_total_size = bufferSize;
1291 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::WriteBody", VT_ULONG, retVal,
1292 (unsigned int)this, (unsigned int)this,
1293 HTTP_API_REQUEST, info, "x",
1294 voidp_to_uint64(&body));
1299 result HttpRequest::SetEntity(IHttpEntity& entity)
1301 typedef result (HttpRequest::*methodType)(IHttpEntity& entity);
1302 static methodType SetEntityp;
1305 BEFORE_ORIGINAL_TIZEN_NET(
1306 _ZN5Tizen3Net4Http11HttpRequest9SetEntityERNS1_11IHttpEntityE,
1309 retVal = (this->*SetEntityp)(entity);
1311 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetEntity", VT_ULONG, retVal,
1312 (unsigned int)this, (unsigned int)this,
1313 HTTP_API_OTHER, info,
1314 "x", voidp_to_uint64(&entity));
1318 HttpHeader* HttpRequest::GetHeader(void) const
1320 typedef HttpHeader* (HttpRequest::*methodType)(void) const;
1321 static methodType GetHeaderp;
1324 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net4Http11HttpRequest9GetHeaderEv,
1326 retVal = (this->*GetHeaderp)();
1329 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::GetHeader", VT_PTR, retVal,
1330 (unsigned int)this, (unsigned int)this,
1331 HTTP_API_ALLOCATION, info, "s", "void");
1335 result HttpRequest::SetCookie(const Tizen::Base::String& cookieString)
1337 typedef result (HttpRequest::*methodType)(
1338 const Tizen::Base::String& cookieString);
1339 static methodType SetCookiep;
1342 BEFORE_ORIGINAL_TIZEN_NET(
1343 _ZN5Tizen3Net4Http11HttpRequest9SetCookieERKNS_4Base6StringE,
1346 retVal = (this->*SetCookiep)(cookieString);
1348 int nSize = cookieString.GetLength();
1350 WcharToChar(temp, cookieString.GetPointer());
1351 info.msg_buf = temp;
1352 info.msg_total_size = nSize;
1353 info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
1355 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetCookie", VT_ULONG, retVal,
1356 (unsigned int)this, (unsigned int)this,
1357 HTTP_API_REQUEST, info, "x",
1358 voidp_to_uint64(&cookieString));
1362 Tizen::Base::String HttpRequest::GetCookie(void) const
1364 typedef Tizen::Base::String (HttpRequest::*methodType)(void) const;
1365 static methodType GetCookiep;
1366 Tizen::Base::String retVal;
1368 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net4Http11HttpRequest9GetCookieEv,
1371 retVal = (this->*GetCookiep)();
1373 int nSize = retVal.GetLength();
1375 WcharToChar(temp, retVal.GetPointer());
1376 info.msg_buf = temp;
1377 info.msg_total_size = nSize;
1378 info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
1380 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::GetCookie", VT_PTR,
1381 (unsigned int)&retVal,
1382 (unsigned int)this, (unsigned int)this,
1383 HTTP_API_OTHER, info, "s", "void");
1387 result HttpRequest::SetAcceptEncoding(const Tizen::Base::String& encoding)
1389 typedef result (HttpRequest::*methodType)(const Tizen::Base::String& uri);
1390 static methodType SetAcceptEncodingp;
1393 BEFORE_ORIGINAL_TIZEN_NET(
1394 _ZN5Tizen3Net4Http11HttpRequest6SetUriERKNS_4Base6StringE,
1395 SetAcceptEncodingp);
1397 retVal = (this->*SetAcceptEncodingp)(encoding);
1399 int nSize = encoding.GetLength();
1401 WcharToChar(temp, encoding.GetPointer());
1402 info.msg_buf = temp;
1403 info.msg_total_size = nSize;
1404 info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
1406 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::SetAcceptEncoding", VT_ULONG,
1407 retVal, (unsigned int)this, (unsigned int)this,
1408 HTTP_API_REQUEST, info, "s", temp);
1412 Tizen::Base::ByteBuffer* HttpRequest::ReadBodyN(void)
1414 typedef Tizen::Base::ByteBuffer* (HttpRequest::*methodType)(void);
1415 static methodType ReadBodyNp;
1416 Tizen::Base::ByteBuffer* retVal;
1418 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net4Http11HttpRequest9ReadBodyNEv,
1420 retVal = (this->*ReadBodyNp)();
1422 int bufferSize = retVal->GetLimit();
1423 Tizen::Base::ByteBuffer copybuffer;
1424 copybuffer.Construct(bufferSize + 4);
1425 copybuffer.CopyFrom(*retVal);
1427 info.msg_buf = (char *)(copybuffer.GetPointer());
1428 info.msg_total_size = bufferSize;
1429 info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
1431 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::ReadBodyN", VT_PTR,
1432 (unsigned int)&retVal,
1433 (unsigned int)this, (unsigned int)this,
1434 HTTP_API_OTHER, info, "s", "void");
1438 Tizen::Base::String HttpRequest::GetAcceptEncoding(void) const
1440 typedef Tizen::Base::String (HttpRequest::*methodType)(void) const;
1441 static methodType HttpRequestp;
1442 Tizen::Base::String retVal;
1444 BEFORE_ORIGINAL_TIZEN_NET(
1445 _ZNK5Tizen3Net4Http11HttpRequest17GetAcceptEncodingEv,
1447 retVal = (this->*HttpRequestp)();
1449 int nSize = retVal.GetLength();
1451 WcharToChar(temp, retVal.GetPointer());
1452 info.msg_buf = temp;
1453 info.msg_total_size = nSize;
1454 info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
1456 AFTER_ORIGINAL_TIZEN_SOCK("HttpRequest::GetAcceptEncoding", VT_PTR,
1457 (unsigned int)&retVal,
1458 (unsigned int)this, (unsigned int)this,
1459 HTTP_API_OTHER, info, "s", "void");
1463 HttpRequest::~HttpRequest() {
1468 class _HttpResponseImpl;
1469 class HttpResponse {
1471 NetHttpStatusCode GetStatusCode(void) const;
1472 int GetHttpStatusCode(void) const;
1473 Tizen::Base::String GetStatusText(void) const;
1474 Tizen::Base::String GetVersion(void) const;
1475 HttpHeader* GetHeader(void) const;
1476 Tizen::Base::ByteBuffer* ReadBodyN(void);
1477 Tizen::Base::Collection::IList* GetCookies(void) const;
1480 virtual ~HttpResponse(void);
1481 result Construct(const HttpTransaction& httpTransaction);
1483 result SetStatusCode(NetHttpStatusCode statusCode);
1484 result SetHttpStatusCode(int statusCode);
1485 result SetStatusText(const Tizen::Base::String& statusText);
1486 result SetVersion(const Tizen::Base::String& httpVersion);
1487 result WriteBody(const Tizen::Base::ByteBuffer& body);
1488 result Read(int headerLen, int bodyLen, int& rcvHeaderLen, int& rcvBodyLen);
1489 result SetCookie(Tizen::Net::Http::HttpHeader* pHeader);
1491 HttpResponse(const HttpResponse& rhs);
1492 HttpResponse& operator =(const HttpResponse& rhs);
1494 friend class _HttpResponseImpl;
1495 _HttpResponseImpl* __pHttpResponseImpl;
1499 NetHttpStatusCode HttpResponse::GetStatusCode(void) const
1501 typedef NetHttpStatusCode (HttpResponse::*methodType)(void) const;
1502 static methodType GetHttpStatusCodep;
1503 NetHttpStatusCode retVal;
1505 BEFORE_ORIGINAL_TIZEN_NET(
1506 _ZNK5Tizen3Net4Http12HttpResponse17GetHttpStatusCodeEv,
1507 GetHttpStatusCodep);
1509 retVal = (this->*GetHttpStatusCodep)();
1510 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetStatusCode", VT_INT, retVal,
1511 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1517 int HttpResponse::GetHttpStatusCode(void) const
1519 typedef int (HttpResponse::*methodType)(void) const;
1520 static methodType GetHttpStatusCodep;
1523 BEFORE_ORIGINAL_TIZEN_NET(
1524 _ZNK5Tizen3Net4Http12HttpResponse17GetHttpStatusCodeEv,
1525 GetHttpStatusCodep);
1527 retVal = (this->*GetHttpStatusCodep)();
1529 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetHttpStatusCode", VT_INT, retVal,
1530 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1535 Tizen::Base::String HttpResponse::GetStatusText(void) const
1537 typedef Tizen::Base::String (HttpResponse::*methodType)(void) const;
1538 static methodType GetStatusTextp;
1539 Tizen::Base::String retVal;
1541 BEFORE_ORIGINAL_TIZEN_NET(
1542 _ZNK5Tizen3Net4Http12HttpResponse13GetStatusTextEv, GetStatusTextp);
1544 retVal = (this->*GetStatusTextp)();
1545 int nSize = retVal.GetLength();
1547 WcharToChar(temp, retVal.GetPointer());
1549 info.msg_buf = temp;
1550 info.msg_total_size = nSize;
1551 info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
1553 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetStatusText", VT_PTR,
1554 (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
1555 HTTP_API_RESPONSE, info, "s", "void");
1559 Tizen::Base::String HttpResponse::GetVersion(void) const
1561 typedef Tizen::Base::String (HttpResponse::*methodType)(void) const;
1562 static methodType GetVersionp;
1563 Tizen::Base::String retVal;
1565 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net4Http12HttpResponse10GetVersionEv,
1568 retVal = (this->*GetVersionp)();
1569 int nSize = retVal.GetLength();
1571 WcharToChar(temp, retVal.GetPointer());
1573 info.msg_buf = temp;
1574 info.msg_total_size = nSize;
1575 info.msg_pack_size = nSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : nSize;
1577 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetVersion", VT_PTR,
1578 (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
1579 HTTP_API_RESPONSE, info, "s", "void");
1583 HttpHeader* HttpResponse::GetHeader(void) const
1585 typedef HttpHeader* (HttpResponse::*methodType)(void) const;
1586 static methodType GetHeaderp;
1589 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net4Http12HttpResponse9GetHeaderEv,
1591 retVal = (this->*GetHeaderp)();
1594 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetHeader", VT_PTR, retVal,
1595 (unsigned int)this, (unsigned int)this, HTTP_API_ALLOCATION,
1600 Tizen::Base::ByteBuffer* HttpResponse::ReadBodyN(void)
1602 typedef Tizen::Base::ByteBuffer* (HttpResponse::*methodType)(void);
1603 static methodType ReadBodyNp;
1604 Tizen::Base::ByteBuffer* retVal;
1606 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net4Http12HttpResponse9ReadBodyNEv,
1608 retVal = (this->*ReadBodyNp)();
1612 int bufferSize = retVal->GetLimit();
1613 Tizen::Base::ByteBuffer copybuffer;
1614 copybuffer.Construct(bufferSize + 4);
1615 copybuffer.CopyFrom(*retVal);
1617 char* out = (char*) (copybuffer.GetPointer());
1620 info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
1621 info.msg_total_size = bufferSize;
1623 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::ReadBodyN", VT_PTR,
1624 (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
1625 HTTP_API_RESPONSE, info, "s", "void");
1629 Tizen::Base::Collection::IList* HttpResponse::GetCookies(void) const
1631 typedef Tizen::Base::Collection::IList* (HttpResponse::*methodType)(
1633 static methodType GetCookiesp;
1634 Tizen::Base::Collection::IList* retVal;
1636 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net4Http12HttpResponse10GetCookiesEv,
1639 retVal = (this->*GetCookiesp)();
1642 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::GetCookies", VT_PTR,
1643 (unsigned int)&retVal, (unsigned int)this, (unsigned int)this,
1644 HTTP_API_OTHER, info, "s", "void");
1648 result HttpResponse::SetStatusCode(NetHttpStatusCode statusCode)
1650 typedef result (HttpResponse::*methodType)(NetHttpStatusCode statusCode);
1651 static methodType SetStatusCodep;
1654 BEFORE_ORIGINAL_TIZEN_NET(
1655 _ZN5Tizen3Net4Http12HttpResponse13SetStatusCodeENS1_17NetHttpStatusCodeE,
1658 retVal = (this->*SetStatusCodep)(statusCode);
1660 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetStatusCode", VT_ULONG, retVal,
1661 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1666 result HttpResponse::SetHttpStatusCode(int statusCode)
1668 typedef result (HttpResponse::*methodType)(int statusCode);
1669 static methodType SetHttpStatusCodep;
1672 BEFORE_ORIGINAL_TIZEN_NET(
1673 _ZN5Tizen3Net4Http12HttpResponse17SetHttpStatusCodeEi,
1674 SetHttpStatusCodep);
1676 retVal = (this->*SetHttpStatusCodep)(statusCode);
1678 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetHttpStatusCode", VT_ULONG,
1679 retVal, (unsigned int)this, (unsigned int)this,
1680 HTTP_API_OTHER, info, "d", statusCode);
1684 result HttpResponse::SetStatusText(const Tizen::Base::String& statusText)
1686 typedef result (HttpResponse::*methodType)(
1687 const Tizen::Base::String& statusText);
1688 static methodType SetStatusText;
1691 BEFORE_ORIGINAL_TIZEN_NET(
1692 _ZN5Tizen3Net4Http12HttpResponse13SetStatusTextERKNS_4Base6StringE,
1695 retVal = (this->*SetStatusText)(statusText);
1697 int nSize = statusText.GetLength();
1699 WcharToChar(temp, statusText.GetPointer());
1701 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetStatusText", VT_ULONG, retVal,
1702 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1707 result HttpResponse::SetVersion(const Tizen::Base::String& httpVersion)
1709 typedef result (HttpResponse::*methodType)(
1710 const Tizen::Base::String& httpVersion);
1711 static methodType SetVersionp;
1714 BEFORE_ORIGINAL_TIZEN_NET(
1715 _ZN5Tizen3Net4Http12HttpResponse10SetVersionERKNS_4Base6StringE,
1718 retVal = (this->*SetVersionp)(httpVersion);
1720 int nSize = httpVersion.GetLength();
1722 WcharToChar(temp, httpVersion.GetPointer());
1724 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetVersion", VT_ULONG, retVal,
1725 (unsigned int)this, (unsigned int)this, HTTP_API_OTHER, info,
1730 result HttpResponse::WriteBody(const Tizen::Base::ByteBuffer& body)
1732 typedef result (HttpResponse::*methodType)(
1733 const Tizen::Base::ByteBuffer& body);
1734 static methodType WriteBodyp;
1737 BEFORE_ORIGINAL_TIZEN_NET(
1738 _ZN5Tizen3Net4Http12HttpResponse9WriteBodyERKNS_4Base10ByteBufferE,
1741 retVal = (this->*WriteBodyp)(body);
1743 int bufferSize = body.GetLimit();
1744 char* pBuffer = (char*) (body.GetPointer());
1745 Tizen::Base::String strData;
1746 strData.SetCapacity(bufferSize);
1747 strData.Append(pBuffer);
1748 char* out = new char[bufferSize + sizeof(char)];
1749 WcharToChar(out, strData.GetPointer());
1752 info.msg_pack_size = bufferSize > SOCKET_SEND_SIZE ? SOCKET_SEND_SIZE : bufferSize;
1753 info.msg_total_size = bufferSize;
1755 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::WriteBody", VT_ULONG, retVal,
1756 (unsigned int)this, (unsigned int)this,
1758 info, "x", voidp_to_uint64(&body));
1763 result HttpResponse::Read(int headerLen, int bodyLen, int& rcvHeaderLen,
1765 typedef result (HttpResponse::*methodType)(int headerLen, int bodyLen,
1766 int& rcvHeaderLen, int& rcvBodyLen);
1767 static methodType Readp;
1770 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net4Http12HttpResponse4ReadEiiRiS3_,
1773 retVal = (this->*Readp)(headerLen, bodyLen, rcvHeaderLen, rcvBodyLen);
1775 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::Read", VT_ULONG, retVal,
1776 (unsigned int)this, (unsigned int)this,
1777 HTTP_API_OTHER, info,
1778 "ddxx", headerLen, bodyLen,
1779 voidp_to_uint64(&rcvHeaderLen),
1780 voidp_to_uint64(&rcvBodyLen));
1784 result HttpResponse::SetCookie(Tizen::Net::Http::HttpHeader* pHeader)
1786 typedef result (HttpResponse::*methodType)(
1787 Tizen::Net::Http::HttpHeader* pHeader);
1788 static methodType SetCookiep;
1791 BEFORE_ORIGINAL_TIZEN_NET(
1792 _ZN5Tizen3Net4Http12HttpResponse9SetCookieEPNS1_10HttpHeaderE,
1795 retVal = (this->*SetCookiep)(pHeader);
1797 AFTER_ORIGINAL_TIZEN_SOCK("HttpResponse::SetCookie", VT_ULONG, retVal,
1798 (unsigned int)this, (unsigned int)this,
1799 HTTP_API_OTHER, info,
1800 "x", voidp_to_uint64(&pHeader));
1805 //HttpResponse::~HttpResponse(void){
1810 class _HttpCookieStorageManagerImpl;
1811 class HttpCookieStorageManager {
1814 result GetCookies(const Tizen::Base::String& url,
1815 Tizen::Base::String& cookies) const;
1816 result RemoveCookies(const Tizen::Base::String& url);
1817 result RemoveAllCookies();
1819 HttpCookieStorageManager();
1820 ~HttpCookieStorageManager();
1821 HttpCookieStorageManager(const HttpCookieStorageManager& rhs);
1822 HttpCookieStorageManager& operator =(const HttpCookieStorageManager& rhs);
1824 friend class _HttpCookieStorageManagerImpl;
1825 _HttpCookieStorageManagerImpl* __pHttpCookieStorageManagerImpl;
1827 // HttpCookieStorageManager
1829 class _HttpRequestImpl;
1832 virtual ~IHttpEntity(void) {
1835 virtual long long GetContentLength(void) const = 0;
1836 virtual Tizen::Base::String GetContentType(void) const = 0;
1838 virtual bool HasNextData(void) = 0;
1839 virtual Tizen::Base::ByteBuffer* GetNextDataN(int recommendedSize) = 0;
1841 virtual void IHttpEntity_Reserved1(void) {
1843 virtual void IHttpEntity_Reserved2(void) {
1845 virtual void IHttpEntity_Reserved3(void) {
1847 friend class _HttpRequestImpl;
1850 class IHttpTransactionEventListener {
1852 virtual ~IHttpTransactionEventListener(void) {
1855 virtual void OnTransactionReadyToRead(HttpSession& httpSession,
1856 HttpTransaction& httpTransaction, int availableBodyLen) = 0;
1857 virtual void OnTransactionAborted(HttpSession& httpSession,
1858 HttpTransaction& httpTransaction, result r) = 0;
1859 virtual void OnTransactionReadyToWrite(HttpSession& httpSession,
1860 HttpTransaction& httpTransaction, int recommendedChunkSize) = 0;
1861 virtual void OnTransactionHeaderCompleted(HttpSession& httpSession,
1862 HttpTransaction& httpTransaction, int headerLen,
1863 bool bAuthRequired) = 0;
1864 virtual void OnTransactionCompleted(HttpSession& httpSession,
1865 HttpTransaction& httpTransaction) = 0;
1866 virtual void OnTransactionCertVerificationRequiredN(
1867 HttpSession& httpSession, HttpTransaction& httpTransaction,
1868 Tizen::Base::String* pCert) = 0;
1869 virtual bool OnTransactionCertVerificationRequestedN(
1870 HttpSession&, HttpTransaction&,
1871 Tizen::Base::Collection::IList* pCertList) {
1872 std::unique_ptr < Tizen::Base::Collection::IList
1873 > upCertList(pCertList);
1877 virtual void IHttpTransactionEventListener_Reserved1(void) {
1882 class IHttpProgressEventListener {
1884 virtual ~IHttpProgressEventListener(void) {
1887 virtual void OnHttpUploadInProgress(HttpSession& httpSession,
1888 HttpTransaction& httpTransaction, long long currentLength,
1889 long long totalLength) = 0;
1890 virtual void OnHttpDownloadInProgress(HttpSession& httpSession,
1891 HttpTransaction& httpTransaction, long long currentLength,
1892 long long totalLength) = 0;
1894 virtual void IHttpProgressEventListener_Reserved1(void) {
1896 virtual void IHttpProgressEventListener_Reserved2(void) {
1898 virtual void IHttpProgressEventListener_Reserved3(void) {
1902 class INetConnectionEventListener {
1904 virtual ~INetConnectionEventListener(void) {
1907 virtual void OnNetConnectionStarted(NetConnection& netConnection,
1909 virtual void OnNetConnectionStopped(NetConnection& netConnection,
1911 virtual void OnNetConnectionSuspended(NetConnection& netConnection) = 0;
1912 virtual void OnNetConnectionResumed(NetConnection& netConnection) = 0;
1914 virtual void INetConnectionEventListener_Reserved1(void) {
1916 virtual void INetConnectionEventListener_Reserved2(void) {
1919 // INetConnectionEventListener
1923 } // namespace Tizen { namespace Net { namespace Http