datacommsserver/esockserver/inc/es_enum_partner.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 /**
       
    18  @file
       
    19  @publishedPartner
       
    20  @released
       
    21 */
       
    22 
       
    23 #if !defined (__ES_ENUM_PARTNER_H__)
       
    24 #define __ES_ENUM_PARTNER_H__
       
    25 
       
    26 #include <es_enum.h>
       
    27 
       
    28 class TConnectionInfoV2 : public TConnectionInfo
       
    29 /**
       
    30  * Connection information structure (version 2)
       
    31  * Extends basic connection info with connection type information
       
    32  * @publishedPartner
       
    33  * @released since v7.0s
       
    34  * @see TConnectionInfo
       
    35 */
       
    36 	{
       
    37 public:
       
    38 	inline TConnectionInfoV2();
       
    39 	inline TConnectionInfoV2(TUint32 aIapId, TUint32 aNetId, TConnectionType aConnectionType);
       
    40 	inline TConnectionType ConnectionType();
       
    41 
       
    42 protected:
       
    43 	inline TConnectionInfoV2(TUint8 aVersion, TUint32 aIapId, TUint32 aNetId, TConnectionType aConnectionType);
       
    44 
       
    45 private:
       
    46 	TConnectionType iConnectionType;
       
    47 	};
       
    48 
       
    49 /**
       
    50 @publishedPartner
       
    51 @released since v7.0s
       
    52 */
       
    53 typedef TPckgBuf<TConnectionInfoV2> TConnectionInfoV2Buf;
       
    54 
       
    55 
       
    56 class TSubConnectionInfo : public TConnArgBase
       
    57 /**
       
    58  * Base class for information about a subconnection
       
    59  * @publishedPartner
       
    60  * @released since v7.0s
       
    61  * @note Classes for information about a specific connection type should derive from this class
       
    62  * @note Generic classes for most bearers are defined in nifconninfo.h
       
    63  * @note Classes with increasingly specific parameters for a connection type should derive from the more generic class of the same connection type, as clients can assume that any less specific TSubConnectionInfo-derived classes are acceptable for use in GetSubConnectionInfo() calls.
       
    64  */
       
    65 	{
       
    66 public:
       
    67 	inline TSubConnectionInfo();
       
    68 
       
    69 public:
       
    70 	TSubConnectionUniqueId iSubConnectionUniqueId;
       
    71 	TConnectionType iConnectionType;
       
    72 	TTime iTimeStarted;
       
    73 	};
       
    74 
       
    75 class TSubConnectionEvent
       
    76 /**
       
    77  * Base class for structures that provide information related to a specific subconnection event
       
    78  * @note Classes derived from this must not exceed KMaxSubConnectionEventSize bytes in size
       
    79  * @publishedPartner
       
    80  * @released since v7.0s
       
    81  */
       
    82 	{
       
    83 public:
       
    84 	IMPORT_C TSubConnectionEvent* CloneL() const;
       
    85 	IMPORT_C TUint Length() const;
       
    86 	inline TSubConnectionEvent()
       
    87 		: iSubConnectionUniqueId(0), iEventType((TSubConnectionEventType)0), iLength(0)
       
    88 			{}
       
    89 			
       
    90 protected:
       
    91 	IMPORT_C TSubConnectionEvent(TSubConnectionEventType aEventType, TUint aLength);
       
    92 public:
       
    93 	TSubConnectionUniqueId iSubConnectionUniqueId;
       
    94 	TSubConnectionEventType iEventType;
       
    95 protected:
       
    96 	TUint iLength;
       
    97 	};
       
    98 
       
    99 class TSubConnectionOpenedEvent : public TSubConnectionEvent
       
   100 /**
       
   101  * Information about a subconnection that has just been opened
       
   102  * @publishedPartner
       
   103  * @released since v7.0s
       
   104  * @note This class currently not passed to clients, as it is (essentially) empty
       
   105  */
       
   106 	{
       
   107 public:
       
   108 	IMPORT_C TSubConnectionOpenedEvent();
       
   109 	};
       
   110 
       
   111 class TSubConnectionClosedEvent : public TSubConnectionEvent
       
   112 /**
       
   113  * Information about a subconnection that has just been closed
       
   114  * @publishedPartner
       
   115  * @released since v7.0s
       
   116  * @note The time closed uses universal time as a time zone
       
   117  */
       
   118 	{
       
   119 public:
       
   120 	IMPORT_C TSubConnectionClosedEvent();
       
   121 public:
       
   122 	TUint iTotalUplinkDataVolume;
       
   123 	TUint iTotalDownlinkDataVolume;
       
   124 	TTime iTimeClosed;	// universal time
       
   125 	};
       
   126 
       
   127 class TSubConnectionQoSChangedEvent : public TSubConnectionEvent
       
   128 /**
       
   129  * Information about a subconnection on which the QoS settings have just changed. This only signals that QoS has changed. If the client wants to know what has changed should then get TSubConnectionInfo
       
   130  * @publishedPartner
       
   131  * @released since v7.0s
       
   132  * @note This will be produced by NIFs when QoS changes
       
   133  */
       
   134 	{
       
   135 public:
       
   136 	IMPORT_C TSubConnectionQoSChangedEvent();
       
   137 	};
       
   138 
       
   139 
       
   140 
       
   141 /**
       
   142 The following classes are used to enumerate clients and sockets associated with a 
       
   143 particular connection.  RConnection::Control() is used to retrieve this information.
       
   144 */
       
   145 
       
   146 class TConnectionEnumArg : public TConnArgBase
       
   147 /**
       
   148 for KCoEnumerateConnectionClients and KCoEnumerateConnectionSockets
       
   149 @publishedPartner
       
   150 @released since v7.0s
       
   151 */
       
   152 	{
       
   153 public:
       
   154 	inline TConnectionEnumArg();
       
   155 public:
       
   156 	TUint iIndex;
       
   157 	TUint iCount;
       
   158 	};
       
   159 
       
   160 
       
   161 class TConnectionClientInfo
       
   162 /**
       
   163 @publishedPartner
       
   164 @released since v7.0s
       
   165 */
       
   166 	{
       
   167 public:
       
   168 	inline TConnectionClientInfo();
       
   169 	inline TConnectionClientInfo(TUint aProcId, TUint aUid, TUint aThreadId);
       
   170 public:
       
   171 	TProcessId iProcessId;
       
   172 	TUid iUid;
       
   173 	TThreadId iThreadId;
       
   174 	};
       
   175 
       
   176 class TConnectionGetClientInfoArg : public TConnArgBase
       
   177 /**
       
   178 for KCoGetConnectionClientInfo
       
   179 @publishedPartner
       
   180 @released since v7.0s
       
   181 */
       
   182 	{
       
   183 public:
       
   184 	inline TConnectionGetClientInfoArg();
       
   185 public:
       
   186 	TUint iIndex;
       
   187 	TConnectionClientInfo iClientInfo;
       
   188 	};
       
   189 
       
   190 #include <es_enum_partner.inl>
       
   191 
       
   192 #endif // __ES_ENUM_PARTNER_H__
       
   193 
       
   194