1.1 --- a/epoc32/include/es_enum.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/es_enum.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// 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
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -13,6 +13,13 @@
1.16 // Description:
1.17 //
1.18
1.19 +
1.20 +/**
1.21 + @file
1.22 + @publishedAll
1.23 + @released
1.24 +*/
1.25 +
1.26 #if !defined (__ES_ENUM_H__)
1.27 #define __ES_ENUM_H__
1.28
1.29 @@ -20,6 +27,7 @@
1.30 #include <nifvar.h>
1.31 #include <es_sock.h>
1.32
1.33 +
1.34 class TConnArgBase
1.35 /**
1.36 * Base class for many arguments to RConnection functions. Provides versioning information.
1.37 @@ -30,6 +38,10 @@
1.38 {
1.39 public:
1.40 inline TConnArgBase();
1.41 + inline TConnArgBase(const TDesC8& aConnectionInfo)
1.42 + : iVersion(*((TUint8*)aConnectionInfo.Ptr()))
1.43 + {
1.44 + }
1.45 inline TUint8 Version() const;
1.46
1.47 protected:
1.48 @@ -63,11 +75,13 @@
1.49 {
1.50 public:
1.51 inline TConnectionInfo();
1.52 - TConnectionInfo(const TDesC8& aConnectionInfo /*as passed to ::Bearer/::NoBearer*/);
1.53 + TConnectionInfo(const TDesC8& aConnectionInfo /*as passed to ::Bearer*/);
1.54 inline TConnectionInfo(TUint32 aIapId, TUint32 aNetId);
1.55
1.56 static TBool IsLocalBearer(const TDesC8& aConnectionInfo);
1.57 -
1.58 +
1.59 + inline bool operator == (const TConnectionInfo& aRhs) const;
1.60 +
1.61 protected:
1.62 inline TConnectionInfo(TUint8 aVersion, TUint32 aIapId, TUint32 aNetId);
1.63
1.64 @@ -76,57 +90,17 @@
1.65 TUint32 iNetId;
1.66 };
1.67
1.68 +const TUint8 KConnArgVersion3 = 3;
1.69 +
1.70 +
1.71 /**
1.72 @publishedAll
1.73 @released since v7.0s
1.74 */
1.75 typedef TPckgBuf<TConnectionInfo> TConnectionInfoBuf;
1.76
1.77 -class TConnectionInfoV2 : public TConnectionInfo
1.78 -/**
1.79 - * Connection information structure (version 2)
1.80 - * Extends basic connection info with connection type information
1.81 - * @publishedPartner
1.82 - * @released since v7.0s
1.83 - * @see TConnectionInfo
1.84 -*/
1.85 - {
1.86 -public:
1.87 - inline TConnectionInfoV2();
1.88 - inline TConnectionInfoV2(TUint32 aIapId, TUint32 aNetId, TConnectionType aConnectionType);
1.89 - inline TConnectionType ConnectionType();
1.90
1.91 -protected:
1.92 - inline TConnectionInfoV2(TUint8 aVersion, TUint32 aIapId, TUint32 aNetId, TConnectionType aConnectionType);
1.93
1.94 -private:
1.95 - TConnectionType iConnectionType;
1.96 - };
1.97 -
1.98 -/**
1.99 -@publishedPartner
1.100 -@released since v7.0s
1.101 -*/
1.102 -typedef TPckgBuf<TConnectionInfoV2> TConnectionInfoV2Buf;
1.103 -
1.104 -class TSubConnectionInfo : public TConnArgBase
1.105 -/**
1.106 - * Base class for information about a subconnection
1.107 - * @publishedPartner
1.108 - * @released since v7.0s
1.109 - * @note Classes for information about a specific connection type should derive from this class
1.110 - * @note Generic classes for most bearers are defined in nifconninfo.h
1.111 - * @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.
1.112 - */
1.113 - {
1.114 -public:
1.115 - inline TSubConnectionInfo();
1.116 -
1.117 -public:
1.118 - TSubConnectionUniqueId iSubConnectionUniqueId;
1.119 - TConnectionType iConnectionType;
1.120 - TTime iTimeStarted;
1.121 - };
1.122
1.123 /**
1.124 The following classes are used with RConnection::AllInterfaceNotification() to receive information
1.125 @@ -154,10 +128,6 @@
1.126 TConnInterfaceState iState;
1.127 };
1.128
1.129 -/**
1.130 -@internalTechnology
1.131 -*/
1.132 -typedef TPckgBuf<TInterfaceNotification> TInterfaceNotificationBuf;
1.133
1.134 /**
1.135 Types of events that can occur on a subconnection
1.136 @@ -172,169 +142,18 @@
1.137 * @released since v7.0s
1.138 */
1.139 {
1.140 - ESubConnectionOpened, ///< Connection values 0-9999 for agent-based events
1.141 - ESubConnectionClosed, ///< Connection values 0-9999 for agent-based events
1.142 - ESubConnectionQoSChanged = 1000 ///< Connection values 10000-19999 for nif-based events
1.143 + ESubConnectionOpened, //< Connection values 0-9999 for agent-based events
1.144 + ESubConnectionClosed, //< Connection values 0-9999 for agent-based events
1.145 + ESubConnectionQoSChanged = 1000 //< Connection values 10000-19999 for nif-based events
1.146 };
1.147
1.148 -class TSubConnectionEvent
1.149 -/**
1.150 - * Base class for structures that provide information related to a specific subconnection event
1.151 - * @note Classes derived from this must not exceed KMaxSubConnectionEventSize bytes in size
1.152 - * @publishedPartner
1.153 - * @released since v7.0s
1.154 - */
1.155 - {
1.156 -public:
1.157 - IMPORT_C TSubConnectionEvent* CloneL() const;
1.158 - IMPORT_C TUint Length() const;
1.159 -
1.160 -protected:
1.161 - IMPORT_C TSubConnectionEvent(TSubConnectionEventType aEventType, TUint aLength);
1.162 -public:
1.163 - TSubConnectionUniqueId iSubConnectionUniqueId;
1.164 - TSubConnectionEventType iEventType;
1.165 -protected:
1.166 - TUint iLength;
1.167 - };
1.168 -
1.169 -class TSubConnectionOpenedEvent : public TSubConnectionEvent
1.170 -/**
1.171 - * Information about a subconnection that has just been opened
1.172 - * @publishedPartner
1.173 - * @released since v7.0s
1.174 - * @note This class currently not passed to clients, as it is (essentially) empty
1.175 - */
1.176 - {
1.177 -public:
1.178 - IMPORT_C TSubConnectionOpenedEvent();
1.179 - };
1.180 -
1.181 -class TSubConnectionClosedEvent : public TSubConnectionEvent
1.182 -/**
1.183 - * Information about a subconnection that has just been closed
1.184 - * @publishedPartner
1.185 - * @released since v7.0s
1.186 - * @note The time closed uses universal time as a time zone
1.187 - */
1.188 - {
1.189 -public:
1.190 - IMPORT_C TSubConnectionClosedEvent();
1.191 -public:
1.192 - TUint iTotalUplinkDataVolume;
1.193 - TUint iTotalDownlinkDataVolume;
1.194 - TTime iTimeClosed; // universal time
1.195 - };
1.196 -
1.197 -class TSubConnectionQoSChangedEvent : public TSubConnectionEvent
1.198 -/**
1.199 - * 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
1.200 - * @publishedPartner
1.201 - * @released since v7.0s
1.202 - * @note This will be produced by NIFs when QoS changes
1.203 - */
1.204 - {
1.205 -public:
1.206 - IMPORT_C TSubConnectionQoSChangedEvent();
1.207 - };
1.208 -
1.209 -/**
1.210 -@internalTechnology
1.211 -*/
1.212 -typedef TPckgBuf<TInterfaceNotification> TInterfaceNotificationBuf;
1.213 -
1.214 -
1.215 -/**
1.216 -The following classes are used to enumerate clients and sockets associated with a
1.217 -particular connection. RConnection::Control() is used to retrieve this information.
1.218 -*/
1.219 -
1.220 -class TConnectionEnumArg : public TConnArgBase
1.221 -/**
1.222 -for KCoEnumerateConnectionClients and KCoEnumerateConnectionSockets
1.223 -@publishedPartner
1.224 -@released since v7.0s
1.225 -*/
1.226 - {
1.227 -public:
1.228 - inline TConnectionEnumArg();
1.229 -public:
1.230 - TUint iIndex;
1.231 - TUint iCount;
1.232 - };
1.233 -
1.234 -/**
1.235 -@internalComponent
1.236 -*/
1.237 -typedef TPckgBuf<TConnectionEnumArg> TConnEnumArgBuf;
1.238 -
1.239 -class TConnectionClientInfo
1.240 -/**
1.241 -@publishedPartner
1.242 -@released since v7.0s
1.243 -*/
1.244 - {
1.245 -public:
1.246 - inline TConnectionClientInfo();
1.247 - inline TConnectionClientInfo(TUint aProcId, TUint aUid, TUint aThreadId);
1.248 -public:
1.249 - TProcessId iProcessId;
1.250 - TUid iUid;
1.251 - TThreadId iThreadId;
1.252 - };
1.253 -
1.254 -class TConnectionGetClientInfoArg : public TConnArgBase
1.255 -/**
1.256 -for KCoGetConnectionClientInfo
1.257 -@publishedPartner
1.258 -@released since v7.0s
1.259 -*/
1.260 - {
1.261 -public:
1.262 - inline TConnectionGetClientInfoArg();
1.263 -public:
1.264 - TUint iIndex;
1.265 - TConnectionClientInfo iClientInfo;
1.266 - };
1.267 -
1.268 -/**
1.269 -@internalComponent
1.270 -*/
1.271 -typedef TPckgBuf<TConnectionGetClientInfoArg> TConnGetClientInfoArgBuf;
1.272 -
1.273 -class TConnectionSocketInfo
1.274 -/**
1.275 -@internalComponent
1.276 -*/
1.277 - {
1.278 -public:
1.279 - inline TConnectionSocketInfo();
1.280 -public:
1.281 - TUint iAddressFamily;
1.282 - TUint iProtocol;
1.283 - TSockAddr iSourceAddress;
1.284 - TSockAddr iDestinationAddress;
1.285 - };
1.286 -
1.287 -class TConnectionGetSocketInfoArg : public TConnArgBase
1.288 -/**
1.289 -for KCoGetConnectionSocketInfo
1.290 -
1.291 -@internalComponent
1.292 -*/
1.293 - {
1.294 -public:
1.295 - TConnectionGetSocketInfoArg();
1.296 -public:
1.297 - TUint iIndex;
1.298 - TConnectionSocketInfo iSocketInfo;
1.299 - };
1.300 -
1.301 -/**
1.302 -@internalComponent
1.303 -*/
1.304 -typedef TPckgBuf<TConnectionGetSocketInfoArg> TConnGetSocketInfoArgBuf;
1.305 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.306 +#include <es_enum_partner.h>
1.307 +#include <es_enum_internal.h>
1.308 +#endif
1.309
1.310 #include <es_enum.inl>
1.311
1.312 +
1.313 #endif // __ES_ENUM_H__
1.314 +