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>
35 #include <arpa/inet.h>
37 #include "probeinfo.h"
39 #include "dacollection.h"
40 #include "tizen_probe.h"
41 #include "../probe_socket/da_socket.h"
43 #include "api_id_mapping.h"
45 static enum DaOptions _sopt = OPT_NETWORK;
50 typedef int NetAccountId;
52 enum NetAddressFamily {
54 NET_AF_IPV4 = 1, /**< The default @n An IPv4 address [RFC791] is represented in decimal format with dots as delimiters. */
55 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. */
56 NET_AF_ALPHANUMERIC, /**< A generic alphanumeric address (as defined by alphanum in [RFC2396]) */
57 NET_AF_APN, /**< A GPRS APN as defined in [GENFORM] */
58 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
61 enum NetConnectionState {
62 NET_CONNECTION_STATE_NONE, /**< The initial state */
63 NET_CONNECTION_STATE_STARTING, /**< The network connection is being established */
64 NET_CONNECTION_STATE_STARTED, /**< The network connection has been established */
65 NET_CONNECTION_STATE_STOPPING, /**< The network connection is being disconnected */
66 NET_CONNECTION_STATE_STOPPED, /**< The network connection has been disconnected */
67 NET_CONNECTION_STATE_SUSPENDED, /**< The network connection has been suspended */
68 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.
69 NET_CONNECTION_STATE_RESUMED, /**< The network connection is established, and recovered from SUSPEND state - enable to send/receive packet data */
70 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.
71 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.
74 NET_BEARER_PS = 1, /**< The bearer type for the PS domain */
75 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.
76 NET_BEARER_WIFI, /**< The bearer type for Wi-Fi */
77 NET_BEARER_WIFI_DIRECT, /**< The bearer type for Wi-Fi Direct @n
78 * This bearer type cannot be tested on the Emulator. */
79 NET_BEARER_USB, /**< The bearer type for USB NDIS mode @n
80 * Can use this bearer type via USB Tethering mode. @n
81 * This bearer type cannot be tested on the Emulator. */
82 NET_BEARER_MMS, /**< The bearer type for MMS */
83 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
86 enum NetAddressScheme {
87 NET_ADDRESS_SCHEME_DYNAMIC = 1, /**< The Dynamic IP or DNS Address */
88 NET_ADDRESS_SCHEME_STATIC, /**< The Static IP or DNS Address */
89 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
92 enum NetProtocolType {
93 NET_PROTO_TYPE_IPV4 = 1, /**< The IPV4 type */
94 NET_PROTO_TYPE_PPP, /**< The PPP type */
95 NET_PROTO_TYPE_IPV6, /**< The IPV6 type, currently NOT supported */
96 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
102 virtual ~IpAddress(void);
103 static unsigned short HostToNetworkOrder(unsigned short host);
104 static unsigned long HostToNetworkOrder(unsigned long host);
105 static unsigned short NetworkToHostOrder(unsigned short network);
106 static unsigned long NetworkToHostOrder(unsigned long network);
107 virtual NetAddressFamily GetNetAddressFamily(void) const = 0;
108 virtual result GetAddress(Tizen::Base::ByteBuffer& ipAddr) const = 0;
109 virtual Tizen::Base::String ToString(void) const = 0;
110 virtual IpAddress* CloneN(void) const = 0;
114 virtual void IpAddress_Reserved1(void) {
116 virtual void IpAddress_Reserved2(void) {
118 virtual void IpAddress_Reserved3(void) {
120 virtual void IpAddress_Reserved4(void) {
122 virtual void IpAddress_Reserved5(void) {
125 IpAddress(const IpAddress& rhs);
126 IpAddress& operator =(const IpAddress& rhs);
128 _IpAddressImpl* _pIpAddressImpl;
129 friend class _IpAddressImpl;
135 Tizen::Base::String ToString(void) const;
136 //unsigned long GetAddress(unsigned long& ipAddr) const;
137 unsigned long GetAddress(uint32_t *ipAddr) const;
140 Tizen::Base::String Ip4Address::ToString(void) const {
141 typedef Tizen::Base::String (Ip4Address::*methodType)(void) const;
142 static methodType ToStringp;
143 CALL_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net10Ip4Address8ToStringEv, ToStringp);
144 return (this->*ToStringp)();
147 /* INFO this is not original Ip4Address function */
148 unsigned long Ip4Address::GetAddress( uint32_t *ipAddr) const {
149 unsigned long IP, res;
150 typedef unsigned long (Ip4Address::*methodType)(unsigned long& ipAddr) const;
151 static methodType GetAddresgp;
152 CALL_ORIGINAL_TIZEN_NET(_ZNK5Tizen3Net10Ip4Address10GetAddressERm,
154 res = (this->*GetAddresgp)(IP);
161 unsigned short GetPort(void) const;
162 IpAddress* GetAddress(void) const;
165 unsigned short NetEndPoint::GetPort(void) const {
166 typedef unsigned short (NetEndPoint::*methodType)(void) const;
167 static methodType GetPortp;
168 CALL_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net11NetEndPoint7GetPortEv, GetPortp);
169 return (this->*GetPortp)();
172 IpAddress* NetEndPoint::GetAddress(void) const {
173 typedef IpAddress *(NetEndPoint::*methodType)(void) const;
174 static methodType GetAddressp;
175 CALL_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net11NetEndPoint10GetAddressEv,
177 return (this->*GetAddressp)();
180 class NetConnectionInfo;
181 class INetConnectionEventListener;
183 class _NetConnectionImpl;
184 class NetConnection {
187 virtual ~NetConnection(void);
188 result Construct(NetAccountId netAccountId);
190 result AddNetConnectionListener(INetConnectionEventListener& listener);
191 result RemoveNetConnectionListener(INetConnectionEventListener& listener);
195 NetAccountId GetNetAccountId(void) const;
196 const NetConnectionInfo* GetNetConnectionInfo(void) const;
197 static NetConnectionInfo* GetNetConnectionInfoN(NetAccountId netAccountId);
198 static Tizen::Base::Collection::IList* GetAllNetConnectionInfoN(void);
199 NetConnectionState GetConnectionState(void) const;
201 NetConnection(const NetConnection& rhs);
202 NetConnection& operator =(const NetConnection& rhs);
204 _NetConnectionImpl* __pNetConnectionImpl;
205 friend class _NetConnectionImpl;
208 class INetConnectionEventListener {
210 virtual ~INetConnectionEventListener(void) {
213 virtual void OnNetConnectionStarted(NetConnection& netConnection,
215 virtual void OnNetConnectionStopped(NetConnection& netConnection,
217 virtual void OnNetConnectionSuspended(NetConnection& netConnection) = 0;
218 virtual void OnNetConnectionResumed(NetConnection& netConnection) = 0;
220 virtual void INetConnectionEventListener_Reserved1(void) {
222 virtual void INetConnectionEventListener_Reserved2(void) {
226 class _NetConnectionInfoImpl;
227 class NetConnectionInfo {
229 NetConnectionInfo(void);
230 virtual ~NetConnectionInfo(void);
231 NetBearerType GetBearerType(void) const;
232 NetProtocolType GetProtocolType(void) const;
233 Tizen::Base::String GetAccessPointName(void) const;
234 NetAddressScheme GetLocalAddressScheme(void) const;
235 const IpAddress* GetLocalAddress(void) const;
236 NetAddressScheme GetDnsAddressScheme(void) const;
237 const IpAddress* GetPrimaryDnsAddress(void) const;
238 const IpAddress* GetSecondaryDnsAddress(void) const;
239 const IpAddress* GetSubnetMaskAddress(void) const;
240 const IpAddress* GetDefaultGatewayAddress(void) const;
241 NetConnectionInfo(const NetConnectionInfo& rhs);
242 NetConnectionInfo& operator =(const NetConnectionInfo& rhs);
243 virtual bool Equals(const Tizen::Base::Object& rhs) const;
244 virtual int GetHashCode(void) const;
246 _NetConnectionInfoImpl* __pNetConnectionInfoImpl;
247 friend class _NetConnectionInfoImpl;
251 } //namespace Tizen { namespace Net {
257 enum NetSocketAddressFamily {
258 //NET_SOCKET_AF_LOCAL = 1, /*< The local socket for loopback*/
259 NET_SOCKET_AF_IPV4 = 2, /**< An IP version 4 address family */
260 //NET_SOCKET_AF_IPV6, /*< An IP version 6 address family */
261 NET_SOCKET_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.
265 NET_SOCKET_TYPE_STREAM = 1, /**< The stream socket */
266 NET_SOCKET_TYPE_DATAGRAM, /**< The datagram socket */
267 NET_SOCKET_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.
270 enum NetSocketProtocol {
271 NET_SOCKET_PROTOCOL_TCP = 1, /**< The TCP protocol */
272 NET_SOCKET_PROTOCOL_UDP, /**< The UDP protocol */
273 NET_SOCKET_PROTOCOL_SSL, /**< The SSL protocol */
274 NET_SOCKET_PROTOCOL_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.
277 enum NetSocketIoctlCmd {
278 NET_SOCKET_FIONBIO = 1, /**< The command to set the non-blocking/blocking mode on a socket */
279 NET_SOCKET_FIONREAD, /**< The command to determine the amount of data pending in the network input buffer */
280 NET_SOCKET_FIONWRITE, /**< The functionality is not supported in this SDK */
281 NET_SOCKET_SIOCATMARK, /**< The command to determine whether all out-of-band data is read */
282 NET_SOCKET_IOCTLCMD_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.
285 enum NetSocketOptLevel {
286 NET_SOCKET_IPPROTO_TCP = 1, /**< The socket options apply only to the TCP sockets */
287 NET_SOCKET_IPPROTO_IP, /**< The socket options apply only to the IP sockets */
288 NET_SOCKET_SOL_SOCKET, /**< The socket options apply to all the sockets */
289 NET_SOCKET_OPTLEVEL_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.
292 enum NetSocketOptName {
293 NET_SOCKET_TCP_NODELAY = 1, /**< The option name is Level: NET_SOCKET_IPPROTO_TCP - Set/Get is possible */
294 NET_SOCKET_TCP_MAXSEG, /**< The option name is Level: NET_SOCKET_IPPROTO_TCP - Set/Get is possible */
295 NET_SOCKET_IP_TTL, /**< The option name is Level: NET_SOCKET_IPPROTO_IP - Set/Get is possible */
296 NET_SOCKET_IP_TOS, /**< The option name is Level: NET_SOCKET_IPPROTO_IP - Set/Get is possible */
297 NET_SOCKET_IP_ADD_MEMBERSHIP, /**< The option name is Level: NET_SOCKET_IPPROTO_IP - Only Set is possible */
298 NET_SOCKET_IP_DROP_MEMBERSHIP, /**< The option name is Level: NET_SOCKET_IPPROTO_IP - Only Set is possible */
299 NET_SOCKET_SO_ACCEPTCONN, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Only Get is possible */
300 NET_SOCKET_SO_BROADCAST, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
301 NET_SOCKET_SO_DEBUG, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible (Currently, not supported)
302 NET_SOCKET_SO_DONTROUTE, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
303 NET_SOCKET_SO_ERROR, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Only Get is possible */
304 NET_SOCKET_SO_KEEPALIVE, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
305 NET_SOCKET_SO_LINGER, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
306 NET_SOCKET_SO_OOBINLINE, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
307 NET_SOCKET_SO_RCVBUF, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
308 NET_SOCKET_SO_RCVLOWAT, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible (Currently, not supported)
309 NET_SOCKET_SO_RCVTIMEO, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
310 NET_SOCKET_SO_REUSEADDR, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
311 NET_SOCKET_SO_SNDBUF, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
312 NET_SOCKET_SO_SNDLOWAT, // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible (Currently, not supported)
313 NET_SOCKET_SO_SNDTIMEO, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
314 NET_SOCKET_SO_TYPE, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Only Get is possible */
317 NET_SOCKET_SO_SSLVERSION, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
318 NET_SOCKET_SO_SSLCIPHERSUITEID, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Set/Get is possible */
319 NET_SOCKET_SO_SSLCERTVERIFY, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Only Set is possible */
320 NET_SOCKET_SO_SSLCERTID, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Only Set is possible */
321 NET_SOCKET_SO_SSLCLIENTCERTVERIFY, /**< The option name is Level: NET_SOCKET_SOL_SOCKET - Only Set is possible */
322 NET_SOCKET_OPTNAME_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.
325 enum NetSocketClosedReason {
326 NET_SOCKET_CLOSED_REASON_NORMAL = 1, /**< A normal closed status by peer */
327 NET_SOCKET_CLOSED_REASON_TIMEOUT, /**< The connection attempt failed due to timeout */
328 NET_SOCKET_CLOSED_REASON_NETWORK_UNAVAILABLE, /**< The network is unavailable */
329 NET_SOCKET_CLOSED_REASON_SYSTEM, /**< An internal error has occurred */
330 NET_SOCKET_CLOSED_REASON_NO_CERTIFICATE, /**< The reason is there is no client's SSL certificate */
331 NET_SOCKET_CLOSED_REASON_BY_USER, /**< The connection closed by user */
332 NET_SOCKET_CLOSED_REASON_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.
337 class _LingerOptionImpl;
340 LingerOption(bool enable, int seconds);
341 virtual ~LingerOption(void);
342 LingerOption(const LingerOption& rhs);
343 LingerOption& operator =(const LingerOption& rhs);
344 virtual bool Equals(const Tizen::Base::Object& obj) const;
345 virtual int GetHashCode(void) const;
347 void SetEnabled(bool on);
348 void SetLingerTime(int seconds);
349 int GetLingerTime(void) const;
350 bool IsEnabled(void) const;
354 _LingerOptionImpl* __pLingerOptionImpl;
355 friend class _LingerOptionImpl;
358 class _IpMulticastRequestOptionImpl;
359 class IpMulticastRequestOption {
361 IpMulticastRequestOption(const NetEndPoint& multicastAddress,
362 const NetEndPoint& interfaceAddress);
363 virtual ~IpMulticastRequestOption(void);
364 IpMulticastRequestOption(const IpMulticastRequestOption& rhs);
365 IpMulticastRequestOption& operator =(const IpMulticastRequestOption& rhs);
367 result SetMulticastEndPoint(NetEndPoint& multicastAddress);
368 result SetInterfaceEndPoint(NetEndPoint& interfaceAddress);
369 const NetEndPoint* GetMulticastEndPoint(void) const;
370 const NetEndPoint* GetInterfaceEndPoint(void) const;
371 virtual bool Equals(const Tizen::Base::Object& obj) const;
372 virtual int GetHashCode(void) const;
374 IpMulticastRequestOption(void);
376 _IpMulticastRequestOptionImpl* __pIpMulticastRequestOptionImpl;
377 friend class _IpMulticastRequestOptionImpl;
380 class ISocketEventListener {
382 virtual ~ISocketEventListener(void) {
385 virtual void OnSocketConnected(Socket& socket) = 0;
386 virtual void OnSocketClosed(Socket& socket,
387 NetSocketClosedReason reason) = 0;
388 virtual void OnSocketReadyToReceive(Socket& socket) = 0;
389 virtual void OnSocketReadyToSend(Socket& socket) = 0;
390 virtual void OnSocketAccept(Socket& socket) = 0;
392 virtual void ISocketEventListener_Reserved1(void) {
394 virtual void ISocketEventListener_Reserved2(void) {
400 result Construct(NetSocketAddressFamily addressFamily,
401 NetSocketType socketType, NetSocketProtocol protocol);
402 result Construct(const NetConnection& netConnection,
403 NetSocketAddressFamily addressFamily, NetSocketType socketType,
404 NetSocketProtocol protocol);
405 result Bind(const Tizen::Net::NetEndPoint& localEndPoint);
406 result Listen(int backLog);
407 result Connect(const Tizen::Net::NetEndPoint& remoteEndPoint);
408 Socket* AcceptN(void) const;
409 result Receive(Tizen::Base::ByteBuffer& buffer) const;
410 result Receive(void* pBuffer, int length, int& rcvdLength) const;
411 result ReceiveFrom(Tizen::Base::ByteBuffer& buffer,
412 Tizen::Net::NetEndPoint& remoteEndPoint) const;
413 result ReceiveFrom(void* pBuffer, int length,
414 Tizen::Net::NetEndPoint& remoteEndPoint, int& rcvdLength) const;
415 result Send(Tizen::Base::ByteBuffer& buffer);
416 result Send(void* pBuffer, int length, int& sentLength);
417 result SendTo(Tizen::Base::ByteBuffer& buffer,
418 const Tizen::Net::NetEndPoint& remoteEndPoint);
419 result SendTo(void* pBuffer, int length,
420 const Tizen::Net::NetEndPoint& remoteEndPoint, int& sentLength);
423 result SetSockOpt(NetSocketOptLevel optionLevel,
424 NetSocketOptName optionName, int optionValue);
425 result SetSockOpt(NetSocketOptLevel optionLevel,
426 NetSocketOptName optionName, const LingerOption& optionValue);
427 result SetSockOpt(NetSocketOptLevel optionLevel,
428 NetSocketOptName optionName,
429 const IpMulticastRequestOption& optionValue);
430 result Ioctl(NetSocketIoctlCmd cmd, unsigned long& value) const;
431 result AddSocketListener(ISocketEventListener& listener);
432 result AsyncSelectByListener(unsigned long socketEventType);
433 result RemoveSocketListener(ISocketEventListener& listener);
434 result GetSockOpt(NetSocketOptLevel optionLevel,
435 NetSocketOptName optionName, int& optionValue) const;
436 result GetSockOpt(NetSocketOptLevel optionLevel,
437 NetSocketOptName optionName, LingerOption& optionValue) const;
440 result Socket::Construct(NetSocketAddressFamily addressFamily,
441 NetSocketType socketType, NetSocketProtocol protocol) {
442 typedef result (Socket::*methodType)(NetSocketAddressFamily addressFamily,
443 NetSocketType socketType, NetSocketProtocol protocol);
444 static methodType Constructp;
447 BEFORE_ORIGINAL_TIZEN_NET(
448 _ZN5Tizen3Net7Sockets6Socket9ConstructENS1_22NetSocketAddressFamilyENS1_13NetSocketTypeENS1_17NetSocketProtocolE,
451 retVal = (this->*Constructp)(addressFamily, socketType, protocol);
453 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Construct", VT_ULONG, retVal,
454 (unsigned int)this, (unsigned int)this, SOCKET_API_FD_OPEN, "", 0,
455 hostinfo, "ddd", addressFamily, socketType, protocol);
460 result Socket::Construct(const NetConnection& netConnection,
461 NetSocketAddressFamily addressFamily, NetSocketType socketType,
462 NetSocketProtocol protocol) {
463 typedef result (Socket::*methodType)(const NetConnection& netConnection,
464 NetSocketAddressFamily addressFamily, NetSocketType socketType,
465 NetSocketProtocol protocol);
466 static methodType Constructp;
469 BEFORE_ORIGINAL_TIZEN_NET(
470 _ZN5Tizen3Net7Sockets6Socket9ConstructERKNS0_13NetConnectionENS1_22NetSocketAddressFamilyENS1_13NetSocketTypeENS1_17NetSocketProtocolE,
473 retVal = (this->*Constructp)(netConnection, addressFamily, socketType,
476 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Construct", VT_ULONG, retVal,
477 (unsigned int)this, (unsigned int)this, SOCKET_API_FD_OPEN, "", 0,
479 (unsigned int)&netConnection, addressFamily, socketType, protocol);
484 Socket* Socket::AcceptN(void) const {
485 typedef Socket* (Socket::*methodType)(void) const;
486 static methodType AcceptNp;
489 BEFORE_ORIGINAL_TIZEN_NET( _ZNK5Tizen3Net7Sockets6Socket7AcceptNEv,
492 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::AcceptN", VT_NULL, NULL,
493 (unsigned int)this, (unsigned int)this, SOCKET_API_ACCEPT_START, "",
494 0, hostinfo, "s", "void");
496 pret = (this->*AcceptNp)();
499 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::AcceptN", VT_PTR, pret,
500 (unsigned int)this, (unsigned int)this, SOCKET_API_ACCEPT_END, "",
501 0, hostinfo, "s", "void");
506 result Socket::Connect(const Tizen::Net::NetEndPoint& remoteEndPoint) {
507 typedef result (Socket::*methodType)(
508 const Tizen::Net::NetEndPoint& remoteEndPoint);
509 static methodType Connectp;
512 BEFORE_ORIGINAL_TIZEN_NET(
513 _ZN5Tizen3Net7Sockets6Socket7ConnectERKNS0_11NetEndPointE,
516 Ip4Address* iv4PeerAddr = (Ip4Address*) remoteEndPoint.GetAddress();
519 WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
520 char addressInfo[64];
521 sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
522 hostinfo.port = remoteEndPoint.GetPort();
523 iv4PeerAddr->GetAddress(&hostinfo.ip);
524 retVal = (this->*Connectp)(remoteEndPoint);
527 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Connect", VT_ULONG, retVal,
528 (unsigned int)this, (unsigned int)this, SOCKET_API_CONNECT, "", 0,
529 hostinfo, "s", addressInfo);
534 result Socket::Close(void) {
535 typedef result (Socket::*methodType)(void);
536 static methodType Closep;
539 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net7Sockets6Socket5CloseEv, Closep);
541 retVal = (this->*Closep)();
543 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Close", VT_ULONG, retVal,
544 (unsigned int)this, (unsigned int)this, SOCKET_API_FD_CLOSE, "", 0,
545 hostinfo, "s", "void");
550 result Socket::Bind(const Tizen::Net::NetEndPoint& localEndPoint) {
551 typedef result (Socket::*methodType)(
552 const Tizen::Net::NetEndPoint& localEndPoint);
553 static methodType Bindp;
556 BEFORE_ORIGINAL_TIZEN_NET(
557 _ZN5Tizen3Net7Sockets6Socket4BindERKNS0_11NetEndPointE, Bindp);
559 retVal = (this->*Bindp)(localEndPoint);
561 Ip4Address* iv4PeerAddr = (Ip4Address*) localEndPoint.GetAddress();
563 WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
564 char addressInfo[64];
565 sprintf(addressInfo, "%s:%d", temp, localEndPoint.GetPort());
566 hostinfo.port = localEndPoint.GetPort();
567 iv4PeerAddr->GetAddress(&hostinfo.ip);
569 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Bind", VT_ULONG, retVal,
570 (unsigned int)this, (unsigned int)this, SOCKET_API_BIND, "", 0,
571 hostinfo, "s", addressInfo);
575 result Socket::Listen(int backLog) {
576 typedef result (Socket::*methodType)(int backLog);
577 static methodType Listenp;
580 BEFORE_ORIGINAL_TIZEN_NET( _ZN5Tizen3Net7Sockets6Socket6ListenEi, Listenp);
582 retVal = (this->*Listenp)(backLog);
584 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Listen", VT_ULONG, retVal,
585 (unsigned int)this, (unsigned int)this, SOCKET_API_LISTEN, "", 0,
586 hostinfo, "d", backLog);
591 result Socket::Receive(Tizen::Base::ByteBuffer& buffer) const {
592 typedef result (Socket::*methodType)(Tizen::Base::ByteBuffer& buffer) const;
593 static methodType Receivep;
596 BEFORE_ORIGINAL_TIZEN_NET(
597 _ZNK5Tizen3Net7Sockets6Socket7ReceiveERNS_4Base10ByteBufferE,
600 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Receive", VT_NULL, NULL,
601 (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START, "",
602 0, hostinfo, "x", (unsigned int)&buffer);
604 pret = (this->*Receivep)(buffer);
606 int bufferSize = buffer.GetLimit();
607 char* pBuffer = (char*) (buffer.GetPointer());
608 Tizen::Base::String strData;
609 strData.SetCapacity(bufferSize);
610 strData.Append(pBuffer);
611 char* out = new char[bufferSize];
612 WcharToChar(out, strData.GetPointer());
613 int socketSendSize = SOCKET_SEND_SIZE;
614 if (socketSendSize != 0 && socketSendSize < bufferSize) {
615 out[socketSendSize + 1] = '.';
616 out[socketSendSize + 2] = '.';
617 out[socketSendSize + 3] = '.';
618 out[socketSendSize + 4] = '\0';
621 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Receive", VT_ULONG, pret,
622 (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END, out,
623 buffer.GetLimit(), hostinfo, "x", (unsigned int)&buffer);
628 result Socket::Receive(void* pBuffer, int length, int& rcvdLength) const {
629 typedef result (Socket::*methodType)(void* pBuffer, int length,
630 int& rcvdLength) const;
631 static methodType Receivep;
634 BEFORE_ORIGINAL_TIZEN_NET(
635 _ZNK5Tizen3Net7Sockets6Socket11ReceiveFromEPviRNS0_11NetEndPointERi,
638 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Receive", VT_NULL, NULL,
639 (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START, "",
641 (unsigned int)&pBuffer, length, rcvdLength);
643 pret = (this->*Receivep)(pBuffer, length, rcvdLength);
645 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Receive", VT_ULONG, pret,
646 (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
647 (char*)pBuffer, length, hostinfo, "xdx",
648 (unsigned int)&pBuffer, length, rcvdLength);
653 result Socket::ReceiveFrom(Tizen::Base::ByteBuffer& buffer,
654 Tizen::Net::NetEndPoint& remoteEndPoint) const {
655 typedef result (Socket::*methodType)(Tizen::Base::ByteBuffer& buffer,
656 Tizen::Net::NetEndPoint& remoteEndPoint) const;
657 static methodType ReceiveFromp;
660 BEFORE_ORIGINAL_TIZEN_NET(
661 _ZNK5Tizen3Net7Sockets6Socket11ReceiveFromERNS_4Base10ByteBufferERNS0_11NetEndPointE,
664 Ip4Address* iv4PeerAddr = (Ip4Address*) remoteEndPoint.GetAddress();
666 WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
667 char addressInfo[64];
668 sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
669 hostinfo.port = remoteEndPoint.GetPort();
670 iv4PeerAddr->GetAddress(&hostinfo.ip);
672 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::ReceiveFrom", VT_NULL,
673 NULL, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START,
675 hostinfo, "xs", (unsigned int)&buffer, temp);
677 pret = (this->*ReceiveFromp)(buffer, remoteEndPoint);
679 int bufferSize = buffer.GetLimit();
680 char* pBuffer = (char*) (buffer.GetPointer());
681 Tizen::Base::String strData;
682 strData.SetCapacity(bufferSize);
683 strData.Append(pBuffer);
684 char* out = new char[bufferSize];
685 WcharToChar(out, strData.GetPointer());
686 int socketSendSize = SOCKET_SEND_SIZE;
687 if (socketSendSize != 0 && socketSendSize < bufferSize) {
688 out[socketSendSize + 1] = '.';
689 out[socketSendSize + 2] = '.';
690 out[socketSendSize + 3] = '.';
691 out[socketSendSize + 4] = '\0';
694 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::ReceiveFrom", VT_ULONG,
695 pret, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
696 out, buffer.GetLimit(), hostinfo, "xs",
697 (unsigned int)&buffer, temp);
701 result Socket::ReceiveFrom(void* pBuffer, int length,
702 Tizen::Net::NetEndPoint& remoteEndPoint, int& rcvdLength) const {
703 typedef result (Socket::*methodType)(void* pBuffer, int length,
704 Tizen::Net::NetEndPoint& remoteEndPoint, int& rcvdLength) const;
705 static methodType ReceiveFromp;
708 BEFORE_ORIGINAL_TIZEN_NET(
709 _ZNK5Tizen3Net7Sockets6Socket11ReceiveFromEPviRNS0_11NetEndPointERi,
712 Ip4Address* iv4PeerAddr = (Ip4Address*) remoteEndPoint.GetAddress();
714 WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
715 char addressInfo[64];
716 sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
717 hostinfo.port = remoteEndPoint.GetPort();
718 iv4PeerAddr->GetAddress(&hostinfo.ip);
720 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::ReceiveFrom", VT_NULL,
721 NULL, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_START,
722 "", 0, hostinfo, "xdsx",
723 (unsigned int)&pBuffer, length, temp, rcvdLength);
725 pret = (this->*ReceiveFromp)(pBuffer, length, remoteEndPoint, rcvdLength);
727 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::ReceiveFrom", VT_ULONG,
728 pret, (unsigned int)this, (unsigned int)this, SOCKET_API_RECV_END,
729 (char*)pBuffer, length, hostinfo, "xdsx",
730 (unsigned int)&pBuffer, length, temp, rcvdLength);
735 result Socket::Send(Tizen::Base::ByteBuffer& buffer) {
736 typedef result (Socket::*methodType)(Tizen::Base::ByteBuffer& buffer);
737 static methodType Sendp;
740 BEFORE_ORIGINAL_TIZEN_NET(
741 _ZN5Tizen3Net7Sockets6Socket4SendERNS_4Base10ByteBufferE, Sendp);
743 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Send", VT_NULL, NULL,
744 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
745 0, hostinfo, "x", (unsigned int)&buffer);
747 pret = (this->*Sendp)(buffer);
748 int bufferSize = buffer.GetLimit();
749 char* pBuffer = (char*) (buffer.GetPointer());
750 Tizen::Base::String strData;
751 strData.SetCapacity(bufferSize);
752 strData.Append(pBuffer);
753 char* out = new char[bufferSize];
754 WcharToChar(out, strData.GetPointer());
755 int socketSendSize = SOCKET_SEND_SIZE;
756 if (socketSendSize != 0 && socketSendSize < bufferSize) {
757 out[socketSendSize + 1] = '.';
758 out[socketSendSize + 2] = '.';
759 out[socketSendSize + 3] = '.';
760 out[socketSendSize + 4] = '\0';
762 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Send", VT_ULONG, pret,
763 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END, out,
764 buffer.GetLimit(), hostinfo, "x", (unsigned int)&buffer);
769 result Socket::Send(void* pBuffer, int length, int& sentLength) {
770 typedef result (Socket::*methodType)(void* pBuffer, int length,
772 static methodType Sendp;
775 BEFORE_ORIGINAL_TIZEN_NET(
776 _ZZN5Tizen3Net7Sockets6Socket4SendEPviRiE19__PRETTY_FUNCTION__,
779 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::Send", VT_NULL, NULL,
780 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
782 (unsigned int)&pBuffer, length, (unsigned int)&sentLength);
784 pret = (this->*Sendp)(pBuffer, length, sentLength);
786 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::Send", VT_ULONG, pret,
787 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END,
788 (char*)pBuffer, length, hostinfo, "xdx",
789 (unsigned int)&pBuffer, length, (unsigned int)&sentLength);
795 result Socket::SendTo(Tizen::Base::ByteBuffer& buffer,
796 const Tizen::Net::NetEndPoint& remoteEndPoint) {
797 typedef result (Socket::*methodType)(Tizen::Base::ByteBuffer& buffer,
798 const Tizen::Net::NetEndPoint& remoteEndPoint);
799 static methodType SendTop;
802 BEFORE_ORIGINAL_TIZEN_NET(
803 _ZN5Tizen3Net7Sockets6Socket6SendToERNS_4Base10ByteBufferERKNS0_11NetEndPointE,
806 Ip4Address* iv4PeerAddr = (Ip4Address*) remoteEndPoint.GetAddress();
808 WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
809 char addressInfo[64];
810 sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
811 hostinfo.port = remoteEndPoint.GetPort();
812 iv4PeerAddr->GetAddress(&hostinfo.ip);
814 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::SendTo", VT_NULL, NULL,
815 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
816 0, hostinfo, "xs", (unsigned int)&buffer, temp);
818 pret = (this->*SendTop)(buffer, remoteEndPoint);
820 int bufferSize = buffer.GetLimit();
821 char* pBuffer = (char*) (buffer.GetPointer());
822 Tizen::Base::String strData;
823 strData.SetCapacity(bufferSize);
824 strData.Append(pBuffer);
825 char* out = new char[bufferSize];
826 WcharToChar(out, strData.GetPointer());
827 int socketSendSize = SOCKET_SEND_SIZE;
828 if (socketSendSize != 0 && socketSendSize < bufferSize) {
829 out[socketSendSize + 1] = '.';
830 out[socketSendSize + 2] = '.';
831 out[socketSendSize + 3] = '.';
832 out[socketSendSize + 4] = '\0';
835 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::SendTo", VT_ULONG, pret,
836 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END, out,
837 buffer.GetLimit(), hostinfo, "xs", (unsigned int)&buffer, temp);
842 result Socket::SendTo(void* pBuffer, int length,
843 const Tizen::Net::NetEndPoint& remoteEndPoint, int& sentLength) {
844 typedef result (Socket::*methodType)(void* pBuffer, int length,
845 const Tizen::Net::NetEndPoint& remoteEndPoint, int& sentLength);
846 static methodType SendTop;
849 BEFORE_ORIGINAL_TIZEN_NET(
850 _ZN5Tizen3Net7Sockets6Socket6SendToEPviRKNS0_11NetEndPointERi,
853 Ip4Address* iv4PeerAddr = (Ip4Address*) remoteEndPoint.GetAddress();
855 WcharToChar(temp, iv4PeerAddr->ToString().GetPointer());
856 char addressInfo[64];
857 sprintf(addressInfo, "%s:%d", temp, remoteEndPoint.GetPort());
858 hostinfo.port = remoteEndPoint.GetPort();
859 iv4PeerAddr->GetAddress(&hostinfo.ip);
861 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_START("Socket::SendTo", VT_NULL, NULL,
862 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_START, "",
863 0, hostinfo, "xdsx,",
864 (unsigned int)&pBuffer, length, temp, (unsigned int)&sentLength);
866 pret = (this->*SendTop)(pBuffer, length, remoteEndPoint, sentLength);
868 AFTER_ORIGINAL_TIZEN_SOCK_WAIT_FUNC_END("Socket::SendTo", VT_ULONG, pret,
869 (unsigned int)this, (unsigned int)this, SOCKET_API_SEND_END,
870 (char*)pBuffer, length, hostinfo, "xdsx,",
871 (unsigned int)&pBuffer, length, temp, (unsigned int)&sentLength);
878 result Socket::AddSocketListener(ISocketEventListener& listener) {
879 typedef result (Socket::*methodType)(ISocketEventListener& listener);
880 static methodType AddSocketListenerp;
883 BEFORE_ORIGINAL_TIZEN_NET(
884 _ZN5Tizen3Net7Sockets6Socket17AddSocketListenerERNS1_20ISocketEventListenerE,
887 retVal = (this->*AddSocketListenerp)(listener);
889 AFTER_ORIGINAL_TIZEN_SOCK("Socket::AddSocketListener", VT_ULONG, retVal,
890 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
891 "x", (unsigned int) &listener);
896 result Socket::AsyncSelectByListener(unsigned long socketEventType) {
897 typedef result (Socket::*methodType)(unsigned long socketEventType);
898 static methodType AsyncSelectByListenerp;
901 BEFORE_ORIGINAL_TIZEN_NET(
902 _ZN5Tizen3Net7Sockets6Socket21AsyncSelectByListenerEm,
903 AsyncSelectByListenerp);
905 retVal = (this->*AsyncSelectByListenerp)(socketEventType);
907 AFTER_ORIGINAL_TIZEN_SOCK("Socket::AsyncSelectByListener", VT_ULONG, retVal,
908 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
909 "x", socketEventType);
914 result Socket::Ioctl(NetSocketIoctlCmd cmd, unsigned long& value) const {
915 typedef result (Socket::*methodType)(NetSocketIoctlCmd cmd,
916 unsigned long& value) const;
917 static methodType Ioctlp;
920 BEFORE_ORIGINAL_TIZEN_NET(
921 _ZNK5Tizen3Net7Sockets6Socket5IoctlENS1_17NetSocketIoctlCmdERm,
924 retVal = (this->*Ioctlp)(cmd, value);
926 AFTER_ORIGINAL_TIZEN_SOCK("Socket::Ioctl", VT_ULONG, retVal,
927 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
928 "dx", cmd, (unsigned int) &value);
933 result Socket::SetSockOpt(NetSocketOptLevel optionLevel,
934 NetSocketOptName optionName, int optionValue) {
935 typedef result (Socket::*methodType)(NetSocketOptLevel optionLevel,
936 NetSocketOptName optionName, int optionValue);
937 static methodType SetSockOptp;
940 BEFORE_ORIGINAL_TIZEN_NET(
941 _ZN5Tizen3Net7Sockets6Socket10SetSockOptENS1_17NetSocketOptLevelENS1_16NetSocketOptNameEi,
944 retVal = (this->*SetSockOptp)(optionLevel, optionName, optionValue);
946 AFTER_ORIGINAL_TIZEN_SOCK("Socket::SetSockOpt", VT_ULONG, retVal,
947 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
948 "ddd", optionLevel, optionName, optionValue);
952 result Socket::SetSockOpt(NetSocketOptLevel optionLevel,
953 NetSocketOptName optionName, const LingerOption& optionValue) {
954 typedef result (Socket::*methodType)(NetSocketOptLevel optionLevel,
955 NetSocketOptName optionName, const LingerOption& optionValue);
956 static methodType SetSockOptp;
959 BEFORE_ORIGINAL_TIZEN_NET(
960 _ZN5Tizen3Net7Sockets6Socket10SetSockOptENS1_17NetSocketOptLevelENS1_16NetSocketOptNameERKNS1_12LingerOptionE,
963 retVal = (this->*SetSockOptp)(optionLevel, optionName, optionValue);
965 AFTER_ORIGINAL_TIZEN_SOCK("Socket::SetSockOpt", VT_ULONG, retVal,
966 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
968 optionLevel, optionName, (unsigned int) &optionValue);
972 result Socket::SetSockOpt(NetSocketOptLevel optionLevel,
973 NetSocketOptName optionName,
974 const IpMulticastRequestOption& optionValue) {
975 typedef result (Socket::*methodType)(NetSocketOptLevel optionLevel,
976 NetSocketOptName optionName,
977 const IpMulticastRequestOption& optionValue);
978 static methodType SetSockOptp;
981 BEFORE_ORIGINAL_TIZEN_NET(
982 _ZN5Tizen3Net7Sockets6Socket10SetSockOptENS1_17NetSocketOptLevelENS1_16NetSocketOptNameERKNS1_12LingerOptionE,
985 retVal = (this->*SetSockOptp)(optionLevel, optionName, optionValue);
987 AFTER_ORIGINAL_TIZEN_SOCK("Socket::SetSockOpt", VT_ULONG, retVal,
988 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
990 optionLevel, optionName, (unsigned int) &optionValue);
995 result Socket::GetSockOpt(NetSocketOptLevel optionLevel,
996 NetSocketOptName optionName, int& optionValue) const {
997 typedef result (Socket::*methodType)(NetSocketOptLevel optionLevel,
998 NetSocketOptName optionName, int& optionValue) const;
999 static methodType GetSockOptp;
1002 BEFORE_ORIGINAL_TIZEN_NET(
1003 _ZNK5Tizen3Net7Sockets6Socket10GetSockOptENS1_17NetSocketOptLevelENS1_16NetSocketOptNameERi,
1006 retVal = (this->*GetSockOptp)(optionLevel, optionName, optionValue);
1008 AFTER_ORIGINAL_TIZEN_SOCK("Socket::GetSockOpt", VT_ULONG, retVal,
1009 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
1011 optionLevel, optionName, (unsigned int) &optionValue);
1016 result Socket::GetSockOpt(NetSocketOptLevel optionLevel,
1017 NetSocketOptName optionName, LingerOption& optionValue) const {
1018 typedef result (Socket::*methodType)(NetSocketOptLevel optionLevel,
1019 NetSocketOptName optionName, LingerOption& optionValue) const;
1020 static methodType GetSockOptp;
1023 BEFORE_ORIGINAL_TIZEN_NET(
1024 _ZNK5Tizen3Net7Sockets6Socket10GetSockOptENS1_17NetSocketOptLevelENS1_16NetSocketOptNameERNS1_12LingerOptionE,
1027 retVal = (this->*GetSockOptp)(optionLevel, optionName, optionValue);
1029 AFTER_ORIGINAL_TIZEN_SOCK("Socket::GetSockOpt", VT_ULONG, retVal,
1030 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
1032 optionLevel, optionName, (unsigned int) &optionValue);
1037 result Socket::RemoveSocketListener(ISocketEventListener& listener) {
1038 typedef result (Socket::*methodType)(ISocketEventListener& listener);
1039 static methodType RemoveSocketListenerp;
1042 BEFORE_ORIGINAL_TIZEN_NET(
1043 _ZN5Tizen3Net7Sockets6Socket20RemoveSocketListenerERNS1_20ISocketEventListenerE,
1044 RemoveSocketListenerp);
1046 retVal = (this->*RemoveSocketListenerp)(listener);
1048 AFTER_ORIGINAL_TIZEN_SOCK("Socket::RemoveSocketListener", VT_ULONG, retVal,
1049 (unsigned int)this, (unsigned int)this, SOCKET_API_OTHER, "", 0, hostinfo,
1050 "x", (unsigned int) &listener);
1057 } //namespace Tizen {namespace Net {namespace Sockets {