epoc32/include/es_sock.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 
    15 
    16 
       
    17 
       
    18 /**
    16 /**
    19  @file
    17  @file
    20  @publishedAll
    18  @publishedAll
    21  @released
    19  @released
    22 */
    20 */
    32 #if defined(_DEBUG)
    30 #if defined(_DEBUG)
    33 #define	_DEBUG_SOCKET_FUNCTIONS
    31 #define	_DEBUG_SOCKET_FUNCTIONS
    34 #endif
    32 #endif
    35 
    33 
    36 #include <comms-infras/metacontainer.h>
    34 #include <comms-infras/metacontainer.h>
       
    35 #include <elements/sd_errors.h>
       
    36 #include <comms-infras/es_parameterset.h>
       
    37 
       
    38 #include <comms-infras/es_event.h>
       
    39 
    37 using Meta::STypeId;
    40 using Meta::STypeId;
    38 using Meta::SMetaDataECom;
    41 using Meta::SMetaDataECom;
    39 using Meta::RMetaDataEComContainer;
    42 using Meta::RMetaDataEComContainer;
    40 
    43 
    41 
    44 
    44 {
    47 {
    45 	class CCommsDataObjectBase;
    48 	class CCommsDataObjectBase;
    46 }
    49 }
    47 
    50 
    48 /**
    51 /**
    49 Name of ESock server in EKA2
       
    50 @internalComponent
       
    51 */
       
    52 _LIT(SOCKET_SERVER_NAME, "!SocketServer");
       
    53 
       
    54 /**
       
    55 Canonical names for the core ESOCKSVR modules
    52 Canonical names for the core ESOCKSVR modules
    56 */
    53 */
    57 _LIT8(SOCKET_SERVER_MAIN_MODULE_NAME, "ESock_Main");		// Worker 0
    54 _LIT8(SOCKET_SERVER_MAIN_MODULE_NAME, "ESock_Main");		// Worker 0
    58 _LIT8(SOCKET_SERVER_IP_MODULE_NAME, "ESock_IP");			// Worker 1
    55 _LIT8(SOCKET_SERVER_IP_MODULE_NAME, "ESock_IP");			// Worker 1
    59 _LIT8(SOCKET_SERVER_BT_MODULE_NAME, "ESock_Bt");			// Worker 2
    56 _LIT8(SOCKET_SERVER_BT_MODULE_NAME, "ESock_Bt");			// Worker 2
    60 _LIT8(SOCKET_SERVER_IR_MODULE_NAME, "ESock_Ir");			// Worker 3
    57 _LIT8(SOCKET_SERVER_IR_MODULE_NAME, "ESock_Ir");			// Worker 3
    61 _LIT8(SOCKET_SERVER_SMSWAP_MODULE_NAME, "ESock_SmsWap");	// Worker 4
    58 _LIT8(SOCKET_SERVER_SMSWAP_MODULE_NAME, "ESock_SmsWap");	// Worker 4
    62 
    59 
    63 /**
    60 
    64 Id of the network layer.
    61 /**
    65 @publishedPartner
    62 Progress Notification to inform clients Connection is up
    66 */
    63 This event has the same numerical values as 
    67 const TUint KCommsNetworkLayerId = 1;
    64 KLinkLayerOpen which is deprecated
       
    65 @publishedAll
       
    66 @released
       
    67 */
       
    68 
       
    69 const TUint KConnectionUp    = 7000;    
       
    70 /**
       
    71 Progress Notification to inform clients Connection is up
       
    72 This event has the same numerical values as 
       
    73 KLinkLayerClosed which is deprecated 
       
    74 
       
    75 @publishedAll
       
    76 @released
       
    77 */
       
    78 
       
    79 const TUint KConnectionDown  = 8000;  
       
    80 
       
    81       
    68 
    82 
    69 /**
    83 /**
    70 Default number of message slots.
    84 Default number of message slots.
    71 @publishedAll
    85 @publishedAll
    72 @released
    86 @released
    73 */
    87 */
    74 const TUint KESockDefaultMessageSlots=8;
    88 const TUint KESockDefaultMessageSlots=8;
    75 
    89 
    76 /**
       
    77 Major Version Number of Connection
       
    78 
       
    79 @internalComponent
       
    80 */
       
    81 const TUint KConnectionMajorVersionNumber=1;
       
    82 
       
    83 /**
       
    84 Minor Version Number of Connection
       
    85 
       
    86 @internalComponent
       
    87 */
       
    88 const TUint KConnectionMinorVersionNumber=0;
       
    89 
       
    90 /**
       
    91 Build Version Number of Connection
       
    92 this must not be changed - expected by TCPIP to be >=68
       
    93 
       
    94 @internalComponent
       
    95 */
       
    96 const TUint KConnectionBuildVersionNumber=68;
       
    97 
    90 
    98 /**
    91 /**
    99 Size of Maximum SubConnection event
    92 Size of Maximum SubConnection event
   100 
    93 
   101 @internalComponent
    94 @publishedAll
       
    95 @released
   102 @note If you allocate this on the heap, remember to delete through the pointer to the buffer and not any pointers to the events held inside it
    96 @note If you allocate this on the heap, remember to delete through the pointer to the buffer and not any pointers to the events held inside it
   103 if you change this value, you will alter the function signature and break the .def file
    97 if you change this value, you will alter the function signature and break the .def file
   104 */
    98 */
   105 const TUint KMaxSubConnectionEventSize = 512;
    99 const TUint KMaxSubConnectionEventSize = 512;
   106 
   100 
   107 /**
   101 /**
   108 SubConnection Unique Id
   102 SubConnection Unique Id
       
   103 
       
   104 THIS API IS TO BE DEPRECATED
       
   105 
   109 @publishedPartner
   106 @publishedPartner
   110 @released
   107 @released
   111 */
   108 */
   112 typedef TUint TSubConnectionUniqueId;
   109 typedef TUint TSubConnectionUniqueId;
   113 
   110 
   114 /**
   111 /**
   115 Buffer for  notification of any change in the state of  SubConnection.
   112 Buffer for  notification of any change in the state of  SubConnection.
       
   113 
       
   114 THIS API IS TO BE DEPRECATED
       
   115 
   116 @publishedPartner
   116 @publishedPartner
   117 @released
   117 @released
   118 */
   118 */
   119 typedef TBuf8<KMaxSubConnectionEventSize> TSubConnectionNotificationBuf;
   119 typedef TBuf8<KMaxSubConnectionEventSize> TSubConnectionNotificationBuf;
   120 //
   120 //
   121 const TUint KUseEmbeddedUniqueId = 0; ///< Used by RConnection to identify cases where the subconnection id is embedded in the data structure
   121 const TUint KUseEmbeddedUniqueId = 0; //< Used by RConnection to identify cases where the subconnection id is embedded in the data structure
   122 
   122 
   123 const TUint KConnProgressDefault = 0; ///< Default Connection Progress
   123 const TUint KConnProgressDefault = 0; //< Default Connection Progress
   124 
   124 
   125 class TSessionPref
   125 class TSessionPref
   126 /**
   126 /**
   127 Hint to the Socket Server on what will be the principal usage of the connection.
   127 Hint to the Socket Server on what will be the principal usage of the connection.
   128 It is by no means a restriction but may result in better performance for the session.
   128 It is by no means a restriction but may result in better performance for the session.
   158 @released
   158 @released
   159 */
   159 */
   160 	{
   160 	{
   161 public:
   161 public:
   162 	inline TNifProgress();
   162 	inline TNifProgress();
       
   163 	inline TNifProgress(TInt aStage, TInt aError);
       
   164 	inline TBool operator==(const TNifProgress& aRHS) const;
   163 	TInt iStage;
   165 	TInt iStage;
   164 	TInt iError;
   166 	TInt iError;
   165 	};
   167 	};
   166 
   168 
   167 class TNifAgentInfo
   169 class TNifAgentInfo
   334 const TUint KSOReadBytesPending=7;
   336 const TUint KSOReadBytesPending=7;
   335 /** Getting only: retrieve the urgent data offset (only for stream protocols that
   337 /** Getting only: retrieve the urgent data offset (only for stream protocols that
   336 support urgent data).
   338 support urgent data).
   337 Value is a TInt. */
   339 Value is a TInt. */
   338 const TUint KSOUrgentDataOffset=8;
   340 const TUint KSOUrgentDataOffset=8;
   339 /** Getting only: retrieves the last error. Value is a TInt. */
   341 /** 
       
   342 Getting only: retrieves the last error. 
       
   343 Errors are normally reported by the called method and behaviour is protocol dependent.
       
   344 KSOSelectLastError does not return such errors.
       
   345 Value is a TInt. */
   340 const TUint KSOSelectLastError=9;
   346 const TUint KSOSelectLastError=9;
   341 
   347 
   342 
   348 
   343 /**
   349 /**
   344 Setting only. Enables socket to be transferred to the process with given capabilities.
   350 Setting only. Enables socket to be transferred to the process with given capabilities.
   360 const TInt  KSocketBufSizeUndefined=0;
   366 const TInt  KSocketBufSizeUndefined=0;
   361 /** Default buffer size. */
   367 /** Default buffer size. */
   362 const TInt  KSocketDefaultBufferSize=4096;
   368 const TInt  KSocketDefaultBufferSize=4096;
   363 
   369 
   364 //internal
   370 //internal
   365 const TUint KSocketInternalOptionBit=0x80000000;	///< Must not be set for client requests
   371 const TUint KSocketInternalOptionBit=0x80000000;	//< Must not be set for client requests
   366 
   372 
   367 /**
       
   368 Ioctls
       
   369 
       
   370 Must not be set for client requests
       
   371 
       
   372 @internalComponent
       
   373 @released
       
   374 */
       
   375 const TUint KInternalIoctlBit=0x80000000;
       
   376 
   373 
   377 /** The aDesc parameter of RSocket::Ioctl() specifies a TUint containing a bitmask
   374 /** The aDesc parameter of RSocket::Ioctl() specifies a TUint containing a bitmask
   378 of Socket status constants. The completion status will be the subset of those
   375 of Socket status constants. The completion status will be the subset of those
   379 conditions which is now true for the socket.
   376 conditions which is now true for the socket.
   380 
   377 
   441 // Protocol Service information bitmasks.
   438 // Protocol Service information bitmasks.
   442 // The following constants are defined for
   439 // The following constants are defined for
   443 // TServerProtocolDesc and TProtocolDesc
   440 // TServerProtocolDesc and TProtocolDesc
   444 //
   441 //
   445 /** The protocol is connectionless.
   442 /** The protocol is connectionless.
   446 @publishedPartner
   443 @publishedAll
   447 @released */
   444 @released */
   448 const TUint KSIConnectionLess=0x00000001;
   445 const TUint KSIConnectionLess=0x00000001;
   449 /** The protocol is reliable. */
   446 /** The protocol is reliable. */
   450 const TUint KSIReliable=0x00000002;
   447 const TUint KSIReliable=0x00000002;
   451 /** The protocol guarantees in-order delivery. */
   448 /** The protocol guarantees in-order delivery. */
   481 /** Protocol supports peeking (looking at the data without removing it from the
   478 /** Protocol supports peeking (looking at the data without removing it from the
   482 protocol). */
   479 protocol). */
   483 const TUint KSIPeekData=0x00010000;
   480 const TUint KSIPeekData=0x00010000;
   484 /** Protocol is to be informed of the identity of the client (i.e. process ID,
   481 /** Protocol is to be informed of the identity of the client (i.e. process ID,
   485 thread ID and UID) of each SAP (i.e. Socket Service Provider) created.
   482 thread ID and UID) of each SAP (i.e. Socket Service Provider) created.
       
   483 Note that this value has no meaningful interpretation on the client side.
   486 @see KSoOwnerInfo and TSoOwnerInfo */
   484 @see KSoOwnerInfo and TSoOwnerInfo */
   487 const TUint KSIRequiresOwnerInfo=0x00020000;	// SetOption(KSoOwnerInfo) invoked on each SAP
   485 const TUint KSIRequiresOwnerInfo=0x00020000;	// SetOption(KSoOwnerInfo) invoked on each SAP
       
   486 /** @internalTechnology */
       
   487 const TUint KSIReserved=0xFFFC0000;
   488 
   488 
   489 //
   489 //
   490 // Naming service constants
   490 // Naming service constants
   491 // The following constants are defined for
   491 // The following constants are defined for
   492 // TServerProtocolDesc and TProtocolDesc
   492 // TServerProtocolDesc and TProtocolDesc
   493 //
   493 //
   494 /** Protocol supports resolving human readable entity names into network addresses
   494 /** Protocol supports resolving human readable entity names into network addresses
   495 (like DNS).
   495 (like DNS).
   496 @publishedPartner
   496 @publishedAll
   497 @released */
   497 @released */
   498 const TUint KNSNameResolution=0x00000001;
   498 const TUint KNSNameResolution=0x00000001;
   499 /** Network naming is hierarchical. */
   499 /** Network naming is hierarchical. */
   500 const TUint KNSHierarchicalNaming=0x00000002;
   500 const TUint KNSHierarchicalNaming=0x00000002;
   501 /** @deprecated Use KNSHierarchicalNaming instead. */
   501 /** @deprecated Use KNSHierarchicalNaming instead. */
   502 const TUint KNSHeirarchicalNaming=0x00000002;
   502 const TUint KNSHeirarchicalNaming=KNSHierarchicalNaming;
   503 /** Addressing is dynamic and should be attempted every time before connecting
   503 /** Addressing is dynamic and should be attempted every time before connecting
   504 (like IrDA). */
   504 (like IrDA). */
   505 const TUint KNSRemoteDiscovery=0x00000004;
   505 const TUint KNSRemoteDiscovery=0x00000004;
   506 /** Protocol supports service name to port number resolution. (For example, you
   506 /** Protocol supports service name to port number resolution. (For example, you
   507 can look up TCP to get port 48.) */
   507 can look up TCP to get port 48.) */
   514 which randomly chooses machine addresses.) */
   514 which randomly chooses machine addresses.) */
   515 const TUint KNSDynamicAddressing=0x00000040;
   515 const TUint KNSDynamicAddressing=0x00000040;
   516 /** Protocol has another database which is defined by the protocol. */
   516 /** Protocol has another database which is defined by the protocol. */
   517 const TUint KNSInfoDatabase=0x00000080;
   517 const TUint KNSInfoDatabase=0x00000080;
   518 /** Protocol may request Socket Server to startup a connection on its behalf (via
   518 /** Protocol may request Socket Server to startup a connection on its behalf (via
   519 the KErrCompletion error code)*/
   519 the KErrCompletion error code)
       
   520 Note that this value has no meaningful interpretation on the client side.
       
   521 */
   520 const TUint KNSRequiresConnectionStartup=0x00000100;
   522 const TUint KNSRequiresConnectionStartup=0x00000100;
       
   523 /** @internalTechnology */
       
   524 const TUint KNSReserved=0xFFFFFE00;
   521 
   525 
   522 // Security Schemes
   526 // Security Schemes
   523 // The following constants are defined for
   527 // The following constants are defined for
   524 // TServerProtocolDesc and TProtocolDesc
   528 // TServerProtocolDesc and TProtocolDesc
   525 /** No security
   529 /** No security
   554 
   558 
   555 /** Undefined socket type.
   559 /** Undefined socket type.
   556 Undefined Protocol
   560 Undefined Protocol
   557 @released */
   561 @released */
   558 const TUint KUndefinedProtocol=0xFFFFFFFE;
   562 const TUint KUndefinedProtocol=0xFFFFFFFE;
       
   563 
       
   564 /** Undefined address family
       
   565 @publishedPartner
       
   566 @released
       
   567  */
       
   568 const TUint KUndefinedAddressFamily = 0;
   559 
   569 
   560 /** Contains the name of a protocol in structure TProtocolDesc.
   570 /** Contains the name of a protocol in structure TProtocolDesc.
   561 @publishedAll
   571 @publishedAll
   562 @released */
   572 @released */
   563 typedef TBuf<0x20> TProtocolName;
   573 typedef TBuf<0x20> TProtocolName;
   631 @publishedAll
   641 @publishedAll
   632 @released
   642 @released
   633 */
   643 */
   634 const TInt KErrConnectionTerminated=-17210;
   644 const TInt KErrConnectionTerminated=-17210;
   635 
   645 
   636 const TInt KErrCannotFindProtocol = -17211;
   646 const TInt KErrCannotFindProtocol = Den::KErrPlayerNotFound;
       
   647 const TInt KErrTierNotFound = -17212;
       
   648 const TInt KErrConnectionContention = -17213;
       
   649 
       
   650 /**
       
   651 The protocol requested for the socket was recognised but was not able to be used.
       
   652 This can happen with protocols that require specific settings to have been prepared
       
   653 prior to the socket being opened.
       
   654 
       
   655 @publishedAll
       
   656 @released
       
   657 */ 
       
   658 const TInt KErrProtocolNotReady = -17214;
       
   659 
       
   660 // -17215 used for non published error. Do not use here.
       
   661 
   637 
   662 
   638 /** Used in RSocket read and write calls to pass the length of data read and written.
   663 /** Used in RSocket read and write calls to pass the length of data read and written.
   639 @publishedAll
   664 @publishedAll
   640 @released */
   665 @released */
   641 typedef TPckgBuf<TInt> TSockXfrLength;
   666 typedef TPckgBuf<TInt> TSockXfrLength;
   642 
   667 
   643 class TSockIO
   668 
   644 /**
   669 
   645 IPC Data holder
   670 namespace ESockDebug
   646 
   671 	{
   647 @internalComponent
   672 	class TControlMsg;
   648 */
   673 	}
   649 	{
       
   650 public:
       
   651 	const TSockXfrLength* iLength;  ///< length of data read and written
       
   652 	TUint iFlags;                   ///<  Flag
       
   653 	TSockAddr* iAddr;               ///< Socket Address
       
   654 	};
       
   655 
       
   656 class TSockIOBufC : public TPckgC<TSockIO>
       
   657 /** @internalComponent */
       
   658 	{
       
   659 public:
       
   660 	inline TSockIOBufC();
       
   661 	TSockIO iArgs;
       
   662 	};
       
   663 
       
   664 class TSockOpen
       
   665 /** @internalComponent */
       
   666 	{
       
   667 public:
       
   668 	TUint iAddrFamily;
       
   669 	TUint iSockType;
       
   670 	TUint iProtocol;
       
   671 	TInt  iHandle;
       
   672 	TInt  iReserved;
       
   673 	};
       
   674 
       
   675 class TSockOpenBufC : public TPckgC<TSockOpen>
       
   676 /** @internalComponent */
       
   677 	{
       
   678 public:
       
   679 	inline TSockOpenBufC();
       
   680 	TSockOpen iArgs;
       
   681 	};
       
   682 
   674 
   683 class RSocket;
   675 class RSocket;
   684 class RConnection;
   676 class RConnection;
   685 class RSocketServ : public RSessionBase
   677 
       
   678 NONSHARABLE_CLASS(RCommsSession) : public RSessionBase
       
   679 	{
       
   680 	friend class RCommsApiExtensionBase;
       
   681 	friend class CCommsSessionApiExtProvider;
       
   682 	};
       
   683 
       
   684 class RSocketServ : public RCommsSession
   686 /** Provides the Connect() function to create an IPC communication channel to the
   685 /** Provides the Connect() function to create an IPC communication channel to the
   687 socket server. To close the channel RHandleBase provides a RHandleBase::Close()
   686 socket server. To close the channel RHandleBase provides a RHandleBase::Close()
   688 function.
   687 function.
   689 
   688 
   690 The prime use for instances of RSocketServ is to establish subsession communications
   689 The prime use for instances of RSocketServ is to establish subsession communications
   727 	IMPORT_C TInt __DbgFailNextMbuf(TInt aCount);
   726 	IMPORT_C TInt __DbgFailNextMbuf(TInt aCount);
   728 	IMPORT_C TInt __DbgSetMbufPoolLimit(TInt asize);
   727 	IMPORT_C TInt __DbgSetMbufPoolLimit(TInt asize);
   729 	IMPORT_C TInt __DbgCheckMbuf(TInt asize);
   728 	IMPORT_C TInt __DbgCheckMbuf(TInt asize);
   730 	IMPORT_C TInt __DbgMbufFreeSpace();
   729 	IMPORT_C TInt __DbgMbufFreeSpace();
   731 	IMPORT_C TInt __DbgMbufTotalSpace();
   730 	IMPORT_C TInt __DbgMbufTotalSpace();
       
   731 	IMPORT_C TInt __DbgControl(const ESockDebug::TControlMsg& aRequestMsg);
   732 	};
   732 	};
   733 
   733 
   734 NONSHARABLE_CLASS(RCommsSubSession) : public RSubSessionBase
   734 NONSHARABLE_CLASS(RCommsSubSession) : public RSubSessionBase
   735 	{
   735 	{
   736 	friend class RCommsApiExtensionBase;
   736 	friend class RCommsApiExtensionBase;
       
   737 	friend class CCommsSubSessionApiExtProvider;
   737 	};
   738 	};
   738 
   739 
   739 class RSubConnection;
   740 class RSubConnection;
   740 class RSocket : public RCommsSubSession
   741 class RSocket : public RCommsSubSession
   741 /** Provides a client endpoint to a protocol. It provides functions for socket
   742 /** Provides a client endpoint to a protocol. It provides functions for socket
   757 @publishedAll
   758 @publishedAll
   758 @released Since v5.0*/
   759 @released Since v5.0*/
   759 	{
   760 	{
   760 friend class RSocketServ;
   761 friend class RSocketServ;
   761 public:
   762 public:
   762 	/** Used in structure TProtocolDesc to describes the endianness of a protocol. */
   763 	/** Argument to RSocket::Shutdown() specifying how abruptly the shutdown occurs.
       
   764 	*/
   763 	enum TShutdown
   765 	enum TShutdown
   764 		{
   766 		{
   765 		/** Complete when socket output/input stopped. */
   767 		/** Complete when socket output/input stopped. */
   766 		ENormal,
   768 		ENormal,
   767 		/** Stop socket input and complete when output is stopped. */
   769 		/** Stop socket input and complete when output is stopped. */
   787 	IMPORT_C void Recv(TDes8& aDesc,TUint flags,TRequestStatus& aStatus);
   789 	IMPORT_C void Recv(TDes8& aDesc,TUint flags,TRequestStatus& aStatus);
   788 
   790 
   789 	IMPORT_C void Recv(TDes8& aDesc,TUint flags,TRequestStatus& aStatus,TSockXfrLength& aLen);
   791 	IMPORT_C void Recv(TDes8& aDesc,TUint flags,TRequestStatus& aStatus,TSockXfrLength& aLen);
   790 
   792 
   791 	IMPORT_C void RecvOneOrMore(TDes8& aDesc,TUint flags,TRequestStatus& aStatus,TSockXfrLength& aLen);
   793 	IMPORT_C void RecvOneOrMore(TDes8& aDesc,TUint flags,TRequestStatus& aStatus,TSockXfrLength& aLen);
       
   794 	IMPORT_C void RecvOneOrMore(TDes8& aDesc,TUint flags,TRequestStatus& aStatus);
   792 	IMPORT_C void CancelRecv();
   795 	IMPORT_C void CancelRecv();
   793 
   796 
   794 	IMPORT_C void Read(TDes8& aDesc,TRequestStatus& aStatus);
   797 	IMPORT_C void Read(TDes8& aDesc,TRequestStatus& aStatus);
   795 	IMPORT_C void CancelRead();
   798 	IMPORT_C void CancelRead();
   796 
   799 
   837 @publishedAll
   840 @publishedAll
   838 @released */
   841 @released */
   839 	{
   842 	{
   840 public:
   843 public:
   841 	inline TNameRecord();
   844 	inline TNameRecord();
   842 	/**
   845 
   843 	@internalComponent
   846 	enum
   844 	*/
   847 	{
   845 	enum {EAlias=0x00000001,};
   848 	EAlias=0x00000001,
       
   849 	EPartial=0x00000002, 	/*!< Indicates a partial (truncated) host name. */
       
   850 	
       
   851 	};
   846 	/** A host name
   852 	/** A host name
   847 
   853 
   848 	@see THostName */
   854 	@see THostName */
   849 	THostName iName;
   855 	THostName iName;
   850 	/** An address
   856 	/** An address
   906 
   912 
   907     IMPORT_C void Query(const TDesC8& aQuery, TDes8& aResult, TRequestStatus& aStatus);
   913     IMPORT_C void Query(const TDesC8& aQuery, TDes8& aResult, TRequestStatus& aStatus);
   908     IMPORT_C TInt Query(const TDesC8& aQuery, TDes8& aResult);
   914     IMPORT_C TInt Query(const TDesC8& aQuery, TDes8& aResult);
   909     IMPORT_C void QueryGetNext(TDes8& aResult, TRequestStatus& aStatus);
   915     IMPORT_C void QueryGetNext(TDes8& aResult, TRequestStatus& aStatus);
   910     IMPORT_C TInt QueryGetNext(TDes8& aResult);
   916     IMPORT_C TInt QueryGetNext(TDes8& aResult);
       
   917     IMPORT_C TInt SetOpt(TUint anOptionName,TUint anOptionLevel,const TDesC8& anOption=TPtrC8(NULL,0));
   911 
   918 
   912 private:
   919 private:
   913 	};
   920 	};
   914 
   921 
   915 /**
   922 /**
   968 	IMPORT_C void Close();
   975 	IMPORT_C void Close();
   969 	IMPORT_C void Cancel();
   976 	IMPORT_C void Cancel();
   970 private:
   977 private:
   971 	};
   978 	};
   972 
   979 
   973 /**
       
   974 @publishedPartner
       
   975 @released
       
   976 */
       
   977 
       
   978 const TUint KCOLConnection = 1;						// level for RConnection::Control()
       
   979 const TUint KCOLProvider = 2;						// level for RConnection::Control()
       
   980 const TUint KConnInternalOptionBit = 0x80000000;	// Must not be set for client requests
       
   981 const TUint KConnWriteUserDataBit = 0x40000000;
       
   982 const TUint KConnReadUserDataBit = 0x20000000;
       
   983 
       
   984 /**
       
   985 Level for RConnection::Control()
       
   986 
       
   987 @publishedPartner
       
   988 @deprecated in 8.1
       
   989 @capability NetworkControl Restrict access to connection clients
       
   990 @ref RConnection::Control()
       
   991 */
       
   992 const TUint KCoEnumerateConnectionClients  =  1 | (KConnWriteUserDataBit | KConnReadUserDataBit);
       
   993 
       
   994 /**
       
   995 Level for RConnection::Control()
       
   996 Information about client
       
   997 
       
   998 @publishedPartner
       
   999 @deprecated in 8.1
       
  1000 @capability NetworkControl Restrict access to connection client info
       
  1001 @ref RConnection::Control()
       
  1002 */
       
  1003 const TUint KCoGetConnectionClientInfo     =  2 | (KConnWriteUserDataBit | KConnReadUserDataBit);
       
  1004 
       
  1005 /** @internalTechnology */
       
  1006 const TUint KCoEnumerateConnectionSockets  =  3 | (KConnWriteUserDataBit | KConnReadUserDataBit);
       
  1007 
       
  1008 /**
       
  1009 Level for RConnection::Control()
       
  1010 Information about connected socket
       
  1011 
       
  1012 @publishedPartner
       
  1013 @deprecated
       
  1014 @capability NetworkControl Restrict access to socket info on a connection
       
  1015 @ref RConnection::Control()
       
  1016 */
       
  1017 const TUint KCoGetConnectionSocketInfo     =  4 | (KConnWriteUserDataBit | KConnReadUserDataBit);
       
  1018 
   980 
  1019 /**
   981 /**
  1020 Default connection type
   982 Default connection type
  1021 @publishedAll
   983 @publishedAll
  1022 @released
   984 @released
  1023 */
   985 */
  1024 const TUint KConnectionTypeDefault = 0x0800;		// KAfInet is the default connection type
   986 const TUint KConnectionTypeDefault = 0x0800;		// KAfInet is the default connection type
  1025 
   987 
  1026 /**
       
  1027 Setting only: enable processes to "clone" open this RConnection instance via a call to
       
  1028 RConnection::Open(..., TName&), as long as they conform to the security policy
       
  1029 passed as argument (specified as a TSecurityPolicyBuf).
       
  1030 @internalTechnology
       
  1031 */
       
  1032 const TUint KCoEnableCloneOpen				= 5 | (KConnReadUserDataBit);
       
  1033 
       
  1034 /**
       
  1035 Setting only: disable "clone" open of this RConnection instance, which was enabled via
       
  1036 a previous KCoEnableCloneOpen option.
       
  1037 @internalTechnology
       
  1038 */
       
  1039 const TUint KCoDisableCloneOpen				= 6 | (KConnReadUserDataBit);
       
  1040 
   988 
  1041 class TConnPref;
   989 class TConnPref;
  1042 class TSubConnectionInfo;
   990 class TSubConnectionInfo;
  1043 class TSubConnectionEvent;
   991 class TSubConnectionEvent;
  1044 
   992 
  1155 	IMPORT_C TInt Progress(TSubConnectionUniqueId aSubConnectionUniqueId, TNifProgress& aProgress);
  1103 	IMPORT_C TInt Progress(TSubConnectionUniqueId aSubConnectionUniqueId, TNifProgress& aProgress);
  1156 	IMPORT_C TInt LastProgressError(TNifProgress& aProgress);
  1104 	IMPORT_C TInt LastProgressError(TNifProgress& aProgress);
  1157 	IMPORT_C void ServiceChangeNotification(TUint32& aNewISPId, TDes& aNewServiceType, TRequestStatus& aStatus);
  1105 	IMPORT_C void ServiceChangeNotification(TUint32& aNewISPId, TDes& aNewServiceType, TRequestStatus& aStatus);
  1158 	IMPORT_C void CancelServiceChangeNotification();
  1106 	IMPORT_C void CancelServiceChangeNotification();
  1159 
  1107 
       
  1108 	
       
  1109 	/**
       
  1110 	@deprecated Since SymbianOS v9.5
       
  1111 	*/
  1160 	IMPORT_C TInt GetIntSetting(const TDesC& aSettingName, TUint32& aValue);
  1112 	IMPORT_C TInt GetIntSetting(const TDesC& aSettingName, TUint32& aValue);
       
  1113 
       
  1114 	/**
       
  1115 	@deprecated Since SymbianOS v9.5
       
  1116 	*/
  1161 	IMPORT_C TInt GetBoolSetting(const TDesC& aSettingName, TBool& aValue);
  1117 	IMPORT_C TInt GetBoolSetting(const TDesC& aSettingName, TBool& aValue);
       
  1118 
       
  1119 	/**
       
  1120 	@deprecated Since SymbianOS v9.5
       
  1121 	*/
  1162 	IMPORT_C TInt GetDesSetting(const TDesC& aSettingName, TDes8& aValue);
  1122 	IMPORT_C TInt GetDesSetting(const TDesC& aSettingName, TDes8& aValue);
       
  1123 
       
  1124 	/**
       
  1125 	@deprecated Since SymbianOS v9.5
       
  1126 	*/
  1163 	IMPORT_C TInt GetDesSetting(const TDesC& aSettingName, TDes16& aValue);
  1127 	IMPORT_C TInt GetDesSetting(const TDesC& aSettingName, TDes16& aValue);
       
  1128 
       
  1129 	/**
       
  1130 	@deprecated Since SymbianOS v9.5
       
  1131 	*/
  1164 	IMPORT_C TInt GetLongDesSetting(const TDesC& aSettingName, TDes& aValue);
  1132 	IMPORT_C TInt GetLongDesSetting(const TDesC& aSettingName, TDes& aValue);
  1165 
  1133 
  1166 
  1134 
  1167 	/**
       
  1168 	@prototype SymbianOS v9.4
       
  1169 	*/
       
  1170 	IMPORT_C TInt GetParameters(ESock::CCommsDataObjectBase& aDataObject);
  1135 	IMPORT_C TInt GetParameters(ESock::CCommsDataObjectBase& aDataObject);
       
  1136 	IMPORT_C TInt SetParameters(ESock::CCommsDataObjectBase& aDataObject);
  1171 
  1137 
  1172 	IMPORT_C TInt Name(TName& aName);
  1138 	IMPORT_C TInt Name(TName& aName);
  1173 
  1139 
  1174 	IMPORT_C TInt EnumerateConnections(TUint& aCount);
  1140 	IMPORT_C TInt EnumerateConnections(TUint& aCount);
  1175 	IMPORT_C TInt GetConnectionInfo(TUint aIndex, TDes8& aConnectionInfo);
  1141 	IMPORT_C TInt GetConnectionInfo(TUint aIndex, TDes8& aConnectionInfo);
  1213 private:
  1179 private:
  1214 	TPckg<TUint32> iNewISPId;
  1180 	TPckg<TUint32> iNewISPId;
  1215 	TUint32 iReserved[4];
  1181 	TUint32 iReserved[4];
  1216 	};
  1182 	};
  1217 
  1183 
  1218 class CSubConParameterSet : public SMetaDataECom
  1184 class CSubConParameterSet : public XParameterSetBase
  1219 /** Base class for all RSubConnection parameter sets.
  1185 /** Base class for all RSubConnection parameter sets.
  1220 
  1186 
  1221 @publishedAll
  1187 THIS API IS DEPRECATED IN FAVOUR OF XParameterSet
  1222 @released since v9.0 */
  1188 
       
  1189 @publishedAll
       
  1190 @deprecated since v9.6 */
  1223 	{
  1191 	{
  1224 public:
  1192 public:
  1225 	IMPORT_C static CSubConParameterSet* NewL(const STypeId& aTypeId);
  1193 	IMPORT_C static CSubConParameterSet* NewL(const STypeId& aTypeId);
  1226 	virtual ~CSubConParameterSet();
  1194 	virtual ~CSubConParameterSet();
  1227 
  1195 
  1231 
  1199 
  1232 
  1200 
  1233 class CSubConGenericParameterSet : public CSubConParameterSet
  1201 class CSubConGenericParameterSet : public CSubConParameterSet
  1234 /** Base class for generic RSubConnection parameter sets.
  1202 /** Base class for generic RSubConnection parameter sets.
  1235 
  1203 
  1236 @publishedAll
  1204 THIS API IS DEPRECATED IN FAVOUR OF XParameterSet
  1237 @released since v9.0 */
  1205 
       
  1206 @publishedAll
       
  1207 @deprecated since v9.6 */
  1238 	{
  1208 	{
  1239 public:
  1209 public:
  1240 	IMPORT_C ~CSubConGenericParameterSet();
  1210 	IMPORT_C ~CSubConGenericParameterSet();
  1241 
  1211 
  1242 protected:
  1212 protected:
  1244 	};
  1214 	};
  1245 
  1215 
  1246 class CSubConExtensionParameterSet : public CSubConParameterSet
  1216 class CSubConExtensionParameterSet : public CSubConParameterSet
  1247 /** Base class for extended RSubConnection parameter sets.
  1217 /** Base class for extended RSubConnection parameter sets.
  1248 
  1218 
  1249 @publishedAll
  1219 THIS API IS DEPRECATED IN FAVOUR OF XParameterSet
  1250 @released since v9.0 */
  1220 
       
  1221 @publishedAll
       
  1222 @deprecated since v9.6 */
  1251 	{
  1223 	{
  1252 public:
  1224 public:
  1253 	IMPORT_C ~CSubConExtensionParameterSet();
  1225 	IMPORT_C ~CSubConExtensionParameterSet();
  1254 
  1226 
  1255 protected:
  1227 protected:
  1263 const TInt32 KSubConnEventInterfaceUid = 0x10204305;
  1235 const TInt32 KSubConnEventInterfaceUid = 0x10204305;
  1264 
  1236 
  1265 const TInt32 KSubConnGenericParamsImplUid  = 0x10204304;
  1237 const TInt32 KSubConnGenericParamsImplUid  = 0x10204304;
  1266 const TInt32 KSubConnGenericEventsImplUid  = 0x10204306;
  1238 const TInt32 KSubConnGenericEventsImplUid  = 0x10204306;
  1267 
  1239 
  1268 const TUint32 KSubConGlobalFamily = 0;
  1240 const TUint32 KSubConGlobalFamily 				= 0;
  1269 const TUint32 KSubConQoSFamily = 1;
  1241 const TUint32 KSubConQoSFamily 					= 1;
  1270 const TUint32 KSubConAuthorisationFamily = 2;
  1242 const TUint32 KSubConAuthorisationFamily 		= 2;
  1271 const TUint32 KSubConnCallDescrParamsFamily = 3;
  1243 const TUint32 KSubConnCallDescrParamsFamily 	= 3;
  1272 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1244 const TUint32 KSubConnContextDescrParamsFamily 	= 4;
  1273 const TUint32 KSubConnContextDescrParamsFamily = 4;
  1245 
  1274 #endif //SYMBIAN_NETWORKING_UMTSR5
  1246 const TUint32 KSubConIPAddressInfoFamily 		= 5;
       
  1247 
       
  1248 const TInt32 KProtocolExtensionFamily 		= 6;
       
  1249 const TInt32 KFlowParametersFamily 		= 7;
       
  1250 class RParameterFamily;
  1275 
  1251 
  1276 class CSubConParameterFamily : public CBase
  1252 class CSubConParameterFamily : public CBase
  1277 /** Container of RSubConnection parameter sets.
  1253 /** Container of RSubConnection parameter sets.
  1278 
  1254 
  1279 For each Parameter Type (Requested, Acceptable and Granted) it
  1255 For each Parameter Type (Requested, Acceptable and Granted) it
  1280 contains one generic and 0..N extended parameter sets.
  1256 contains one generic and 0..N extended parameter sets.
  1281 
  1257 
  1282 @publishedAll
  1258 Note:
  1283 @released since v9.0 */
  1259 a CSubConParameterBundle or RSubConParameterBundle object can take ownership of a 
       
  1260 CSubConParameterFamily object, in this case, when the bundle is destroyed, this 
       
  1261 family object will also be destroyed  (along with any parameter sets that are owned 
       
  1262 by the family).
       
  1263 
       
  1264 THIS API IS DEPRECATED IN FAVOUR OF RParameterFamily
       
  1265 
       
  1266 @publishedAll
       
  1267 @deprecated since v9.6 */
  1284 	{
  1268 	{
  1285 public:
  1269 public:
  1286 
  1270 
  1287 	enum TParameterSetType
  1271 	enum TParameterSetType
  1288          {
  1272          {
  1312 	IMPORT_C TUint Length() const;
  1296 	IMPORT_C TUint Length() const;
  1313 	IMPORT_C TInt Load(TPtrC8& aDes);
  1297 	IMPORT_C TInt Load(TPtrC8& aDes);
  1314 	IMPORT_C TInt Store(TDes8& aDes) const;
  1298 	IMPORT_C TInt Store(TDes8& aDes) const;
  1315 	IMPORT_C void ClearAllParameters(TParameterSetType aType);
  1299 	IMPORT_C void ClearAllParameters(TParameterSetType aType);
  1316 
  1300 
       
  1301 	/**
       
  1302 	Copy the parameters of this CSubConParameterFamily to a RParameterFamily.
       
  1303 	@param aDest RParameterFamily object to copy to
       
  1304 	*/
       
  1305 	void CopyToFamilyL(RParameterFamily& aDest) const;
       
  1306 
       
  1307     /**
       
  1308 	Copy the parameters of this CSubConParameterFamily from a RParameterFamily.
       
  1309 	@param aSrc RParameterFamily object to copy from
       
  1310 	*/
       
  1311 	void CopyFromFamilyL(RParameterFamily& aSrc);
  1317 protected:
  1312 protected:
  1318 	explicit CSubConParameterFamily(TUint32 aFamilyId);
  1313 	IMPORT_C explicit CSubConParameterFamily(TUint32 aFamilyId);
  1319 	void ConstructL(RSubConParameterBundle& aBundle);
  1314 	IMPORT_C void ConstructL(RSubConParameterBundle& aBundle);
  1320 	void ConstructL(CSubConParameterBundle& aBundle);
  1315 	IMPORT_C void ConstructL(CSubConParameterBundle& aBundle);
  1321 
  1316 
  1322 	static TInt32 ExtractFamilyAndCreateBufferL(TPtrC8& aBuffer, TPtrC8& aContainerBuffer);
  1317 	IMPORT_C static TInt32 ExtractFamilyAndCreateBufferL(TPtrC8& aBuffer, TPtrC8& aContainerBuffer);
  1323 
  1318 
  1324 private:
  1319 private:
  1325 	const TUint32 iFamilyId;
  1320 	const TUint32 iFamilyId;   // This member variable is accessed by an inline function ( Id () ).
  1326 	RMetaDataEComContainer iGenericSets;
  1321 	RMetaDataEComContainer iGenericSets;
       
  1322 protected:
  1327 	RMetaDataEComContainer iExtensionSets[ENumValues];
  1323 	RMetaDataEComContainer iExtensionSets[ENumValues];
  1328 	};
  1324 
  1329 
  1325 	};
  1330 class CSubConParameterBundle : public CObject
  1326 
       
  1327 class RParameterFamilyBundle;
       
  1328 class RSubConParameterBundle
  1331 /** Container for (bundle of) SubConnection parameter families.
  1329 /** Container for (bundle of) SubConnection parameter families.
  1332 
  1330 
  1333 May contain and 0..N parameter families.
  1331 May contain and 0..N SubConnection parameter families.
  1334 
  1332 
  1335 @publishedPartner
  1333 Note:
  1336 @released since v9.0 */
  1334 If the RSubConParameterBundle object takes ownership of any CSubConParameterFamily object, 
  1337 	{
  1335 then when the bundle object is destroyed, any family owned by this object will also be 
  1338 public:
  1336 destroyed.
  1339 	IMPORT_C static CSubConParameterBundle* NewL();
  1337 
  1340 	IMPORT_C static CSubConParameterBundle* LoadL(TDesC8& aDes);
  1338 THIS API IS DEPRECATED IN FAVOUR OF RParameterFamilyBundle
  1341 
  1339 
  1342 	IMPORT_C ~CSubConParameterBundle();
  1340 @publishedAll
       
  1341 @deprecated since v9.6 */
       
  1342 	{
       
  1343 public:
       
  1344 	IMPORT_C RSubConParameterBundle();
       
  1345 	IMPORT_C void Close();
  1343 
  1346 
  1344 	IMPORT_C TUint Length() const;
  1347 	IMPORT_C TUint Length() const;
  1345 	IMPORT_C TInt Load(const TDesC8& aDes);
  1348 	IMPORT_C TInt Load(const TDesC8& aDes);
  1346 	IMPORT_C TInt Store(TDes8& aDes) const;
  1349 	IMPORT_C TInt Store(TDes8& aDes) const;
  1347 	IMPORT_C void AddFamilyL(CSubConParameterFamily* aFamily);
  1350 	IMPORT_C void AddFamilyL(CSubConParameterFamily* aFamily);
  1348 	IMPORT_C CSubConParameterFamily* FindFamily(TUint32 aFamilyId);
  1351 	IMPORT_C CSubConParameterFamily* FindFamily(TUint32 aFamilyId);
  1349 	IMPORT_C void ClearAllParameters(CSubConParameterFamily::TParameterSetType aType);
  1352 	IMPORT_C void ClearAllParameters(CSubConParameterFamily::TParameterSetType aType);
  1350 
  1353 
  1351 protected:
  1354     /**
  1352 	CSubConParameterBundle();
  1355     Copy the contents of this parameter bundle to a RParameterFamilyBundle.
  1353 
  1356 	@param aDest RParameterFamilyBundle to copy parameters to
  1354 private:
  1357 	*/
  1355 	CSubConParameterBundle(const CSubConParameterBundle& aBundle);
  1358 	void CopyToFamilyBundleL(RParameterFamilyBundle& aDest) const;
  1356 	CSubConParameterBundle& operator=(const CSubConParameterBundle& aBundle);
  1359 
  1357 
  1360 	/**
  1358 private:
  1361 	Copy the contents of an RParameterFamilyBundle to this RSubConParameterBundle
  1359 	RPointerArray<CSubConParameterFamily> iFamilies;
  1362 	@param aSrc RParameterFamilyBundle to copy contents from
  1360 	};
  1363 	*/
  1361 
  1364 	void CopyFromFamilyBundleL(RParameterFamilyBundle& aSrc);
  1362 class RSubConParameterBundle
       
  1363 /** Container for (bundle of) SubConnection parameter families.
       
  1364 
       
  1365 May contain and 0..N SubConnection parameter families.
       
  1366 
       
  1367 
       
  1368 @publishedAll
       
  1369 @released since v9.0 */
       
  1370 	{
       
  1371 public:
       
  1372 	IMPORT_C RSubConParameterBundle();
       
  1373 	IMPORT_C void Close();
       
  1374 
       
  1375 	IMPORT_C TUint Length() const;
       
  1376 	IMPORT_C TInt Load(const TDesC8& aDes);
       
  1377 	IMPORT_C TInt Store(TDes8& aDes) const;
       
  1378 	IMPORT_C void AddFamilyL(CSubConParameterFamily* aFamily);
       
  1379 	IMPORT_C CSubConParameterFamily* FindFamily(TUint32 aFamilyId);
       
  1380 	IMPORT_C void ClearAllParameters(CSubConParameterFamily::TParameterSetType aType);
       
  1381 
  1365 
  1382 protected:
  1366 protected:
  1383 	TInt CheckBundle() const;
  1367 	TInt CheckBundle() const;
  1384 private:
  1368 private:
  1385 	RSubConParameterBundle(const RSubConParameterBundle& aBundle);
  1369 	RSubConParameterBundle(const RSubConParameterBundle& aBundle);
  1387 
  1371 
  1388 private:
  1372 private:
  1389 	mutable CSubConParameterBundle* iBundle;
  1373 	mutable CSubConParameterBundle* iBundle;
  1390 	};
  1374 	};
  1391 
  1375 
       
  1376 
  1392 const TInt KNotificationEventMaxSize = 2048;
  1377 const TInt KNotificationEventMaxSize = 2048;
  1393 class TNotificationEventBuf : public TBuf8<KNotificationEventMaxSize>
  1378 class TNotificationEventBuf : public TBuf8<KNotificationEventMaxSize>
  1394 /**
  1379 /**
  1395 Buffer for Sub-connection event notiifcation
  1380 Buffer for Sub-connection event notiifcation
  1396 
  1381 
  1405 	IMPORT_C TBool IsGeneric() const;
  1390 	IMPORT_C TBool IsGeneric() const;
  1406 	IMPORT_C TInt32 GroupId() const;
  1391 	IMPORT_C TInt32 GroupId() const;
  1407 	IMPORT_C TUint32 Id() const;
  1392 	IMPORT_C TUint32 Id() const;
  1408 	};
  1393 	};
  1409 
  1394 
       
  1395 #ifndef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
  1410 class CSubConNotificationEvent : public SMetaDataECom
  1396 class CSubConNotificationEvent : public SMetaDataECom
       
  1397 #else
       
  1398 class CSubConNotificationEvent : public ESock::XEventBase
       
  1399 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
  1411 	{
  1400 	{
  1412 public:
  1401 public:
  1413 	IMPORT_C static CSubConNotificationEvent* NewL(const STypeId& aTypeId);
  1402 	IMPORT_C static CSubConNotificationEvent* NewL(const STypeId& aTypeId);
  1414 	IMPORT_C static CSubConNotificationEvent* NewL(const TNotificationEventBuf& aEventBuffer);
  1403 	IMPORT_C static CSubConNotificationEvent* NewL(const TNotificationEventBuf& aEventBuffer);
  1415 
  1404 
  1437 	TSubConnType iType;
  1426 	TSubConnType iType;
  1438 	TInt  iHandle;
  1427 	TInt  iHandle;
  1439 	TInt  iReserved;
  1428 	TInt  iReserved;
  1440 	};
  1429 	};
  1441 
  1430 
  1442 class RSubConnection : public RSubSessionBase
  1431 class RSubConnection : public RCommsSubSession
  1443 /** A Sub-Connection, a channel within a Connection. A representation of a channel between this device and remote devices with which we are communicating. This channel will be used by one or more sockets.
  1432 /** A Sub-Connection, a channel within a Connection. A representation of a channel between this device and remote devices with which we are communicating. This channel will be used by one or more sockets.
  1444  Depending on the state of the channel, it may not be possible to bind arbitary sockets into it.  Attempts to bind sockets from different protocol families to a single channel is an error, as each channel can only be used by one protocol family.
  1433  Depending on the state of the channel, it may not be possible to bind arbitary sockets into it.  Attempts to bind sockets from different protocol families to a single channel is an error, as each channel can only be used by one protocol family.
  1445  @note The sub-connection can represent a end-to-end channel and/or a channel from this device to an intermediate device (e.g an access server such as a GGSN which using UMTS and PDP contexts. Properties can be specified simultaneously on protocol and link level.
  1434  @note The sub-connection can represent a end-to-end channel and/or a channel from this device to an intermediate device (e.g an access server such as a GGSN which using UMTS and PDP contexts. Properties can be specified simultaneously on protocol and link level.)
  1446 
  1435 
  1447 Before using any of these services, a connection to a socket server session
  1436 Before using any of these services, a connection to a socket server session
  1448 must have been made and the connection must be open.
  1437 must have been made and the connection must be open.
  1449 
  1438 
  1450 @publishedAll
  1439 @publishedAll
  1454     friend class RConnection;
  1443     friend class RConnection;
  1455 
  1444 
  1456 	enum TSubConnType
  1445 	enum TSubConnType
  1457 		{
  1446 		{
  1458 		EAttachToDefault,
  1447 		EAttachToDefault,
  1459 		ECreateNew
  1448 		ECreateNew,
       
  1449 		EWaitIncoming
  1460 		};
  1450 		};
  1461 
  1451 
  1462 	struct TEventFilter
  1452 	struct TEventFilter
  1463 		{
  1453 		{
  1464 		inline TEventFilter(TInt32 aEventGroupId = KSubConnGenericEventsImplUid, TUint32 aEventMask = 0xffffffff);
  1454 		inline TEventFilter(TInt32 aEventGroupId = KSubConnGenericEventsImplUid, TUint32 aEventMask = 0xffffffff);
  1471 	IMPORT_C RSubConnection();
  1461 	IMPORT_C RSubConnection();
  1472 	IMPORT_C TInt Open(RSocketServ& aServer, TSubConnType aSubConnType, RConnection& aConnection);
  1462 	IMPORT_C TInt Open(RSocketServ& aServer, TSubConnType aSubConnType, RConnection& aConnection);
  1473 	IMPORT_C void Close();
  1463 	IMPORT_C void Close();
  1474 	IMPORT_C void Start(TRequestStatus& aStatus);
  1464 	IMPORT_C void Start(TRequestStatus& aStatus);
  1475 	IMPORT_C TInt Start();
  1465 	IMPORT_C TInt Start();
  1476 	IMPORT_C TInt Stop();
  1466 	IMPORT_C TInt Stop();		
  1477 
  1467 
  1478 	// Socket Management
  1468 	// Socket Management
  1479 	IMPORT_C void Add(RSocket& aSocket, TRequestStatus& aStatus);
  1469 	IMPORT_C void Add(RSocket& aSocket, TRequestStatus& aStatus);
  1480 	IMPORT_C void Remove(RSocket& aSocket, TRequestStatus& aStatus);
  1470 	IMPORT_C void Remove(RSocket& aSocket, TRequestStatus& aStatus);
  1481 
  1471 
  1482 	// QoS Properties
  1472 	// QoS Properties (legacy bundles - to be deprecated)
  1483 	IMPORT_C TInt SetParameters(const RSubConParameterBundle& aParametersSet);
  1473 	IMPORT_C TInt SetParameters(const RSubConParameterBundle& aParametersSet);
  1484 	IMPORT_C TInt GetParameters(RSubConParameterBundle& aParametersSet);
  1474 	IMPORT_C TInt GetParameters(RSubConParameterBundle& aParametersSet);
       
  1475 
       
  1476 	// QoS Properties (new prototype bundles)
       
  1477 	IMPORT_C TInt SetParameters(const RParameterFamilyBundle& aParametersSet);
       
  1478 	IMPORT_C TInt GetParameters(RParameterFamilyBundle& aParametersSet);
  1485 
  1479 
  1486 	// Event Notification
  1480 	// Event Notification
  1487 	IMPORT_C void EventNotification(TNotificationEventBuf& aEventBuffer, TBool aGenericEventsOnly, TRequestStatus& aStatus);
  1481 	IMPORT_C void EventNotification(TNotificationEventBuf& aEventBuffer, TBool aGenericEventsOnly, TRequestStatus& aStatus);
  1488 	IMPORT_C void EventNotification(TNotificationEventBuf& aEventBuffer, TEventFilter aEventFilterList[], TUint aEventListLength, TRequestStatus& aStatus);
  1482 	IMPORT_C void EventNotification(TNotificationEventBuf& aEventBuffer, TEventFilter aEventFilterList[], TUint aEventListLength, TRequestStatus& aStatus);
  1489 	IMPORT_C void CancelEventNotification();
  1483 	IMPORT_C void CancelEventNotification();
  1490 
  1484 
  1491 	// Generic Control
  1485 	// Generic Control
  1492 	IMPORT_C TInt Control(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
  1486 	IMPORT_C TInt Control(TUint aOptionLevel, TUint aOptionName, TDes8& aOption);
       
  1487 		
       
  1488 	//
       
  1489 	// IMPORT_C TInt Stop(TConnStopType aStopType);
       
  1490 	// IMPORT_C void ProgressNotification(TNifProgressBuf& aProgress, TRequestStatus& aStatus, TUint aSelectedProgress = KConnProgressDefault);
       
  1491 	// IMPORT_C void CancelProgressNotification();
       
  1492 	// IMPORT_C TInt Progress(TNifProgress& aProgress);
       
  1493 	// IMPORT_C void IsSubConnectionActiveRequest(TUint aSecs, TPckg<TBool>& aState, TRequestStatus& aStatus);
       
  1494 	// IMPORT_C void IsSubConnectionActiveCancel();	
       
  1495 	//	
  1493 
  1496 
  1494 	TBool SameSession(TInt aSessionHandle);
  1497 	TBool SameSession(TInt aSessionHandle);
  1495 
  1498 
  1496 private:
  1499 private:
  1497 	IMPORT_C TInt Open(RSocketServ& aServer, TSubConnOpen::TSubConnType aSubConnType, RConnection& aConnection);
  1500 	IMPORT_C TInt Open(RSocketServ& aServer, TSubConnOpen::TSubConnType aSubConnType, RConnection& aConnection);
  1536 	IMPORT_C static void Put16(TUint8* aPtr, TUint16 aVal);
  1539 	IMPORT_C static void Put16(TUint8* aPtr, TUint16 aVal);
  1537 	};
  1540 	};
  1538 
  1541 
  1539 class TAccessPointInfo
  1542 class TAccessPointInfo
  1540 /** Stores Access Point information.
  1543 /** Stores Access Point information.
  1541 @publishedAll */
  1544 @publishedAll
       
  1545 @released
       
  1546 */
  1542 	{
  1547 	{
  1543 public:
  1548 public:
  1544 	TAccessPointInfo(TUint aApId = 0);
  1549 	TAccessPointInfo(TUint aApId = 0);
  1545 
  1550 
  1546 	TUint AccessPoint() const;
  1551 	TUint AccessPoint() const;
  1549 	TBool operator== (const TAccessPointInfo& aRhs) const;
  1554 	TBool operator== (const TAccessPointInfo& aRhs) const;
  1550 private:
  1555 private:
  1551 	TUint iAccessPointId;
  1556 	TUint iAccessPointId;
  1552 	};
  1557 	};
  1553 
  1558 
       
  1559 
       
  1560 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
  1561 #include <es_sock_internal.h>
       
  1562 #include <es_sock_partner.h>
       
  1563 #endif
       
  1564 
  1554 #include <es_sock.inl>
  1565 #include <es_sock.inl>
  1555 
  1566 
  1556 #endif	//__ES_SOCK_H__
  1567 #endif	//__ES_SOCK_H__
       
  1568