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 */ |
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. |
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 |
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 |
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 |
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); |
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); |
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 |
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); |