diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/es_enum.h --- a/epoc32/include/es_enum.h Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/es_enum.h Wed Mar 31 12:33:34 2010 +0100 @@ -1,9 +1,9 @@ // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// 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 +// under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// at the URL "http://www.eclipse.org/legal/epl-v10.html". // // Initial Contributors: // Nokia Corporation - initial contribution. @@ -13,6 +13,13 @@ // Description: // + +/** + @file + @publishedAll + @released +*/ + #if !defined (__ES_ENUM_H__) #define __ES_ENUM_H__ @@ -20,6 +27,7 @@ #include #include + class TConnArgBase /** * Base class for many arguments to RConnection functions. Provides versioning information. @@ -30,6 +38,10 @@ { public: inline TConnArgBase(); + inline TConnArgBase(const TDesC8& aConnectionInfo) + : iVersion(*((TUint8*)aConnectionInfo.Ptr())) + { + } inline TUint8 Version() const; protected: @@ -63,11 +75,13 @@ { public: inline TConnectionInfo(); - TConnectionInfo(const TDesC8& aConnectionInfo /*as passed to ::Bearer/::NoBearer*/); + TConnectionInfo(const TDesC8& aConnectionInfo /*as passed to ::Bearer*/); inline TConnectionInfo(TUint32 aIapId, TUint32 aNetId); static TBool IsLocalBearer(const TDesC8& aConnectionInfo); - + + inline bool operator == (const TConnectionInfo& aRhs) const; + protected: inline TConnectionInfo(TUint8 aVersion, TUint32 aIapId, TUint32 aNetId); @@ -76,57 +90,17 @@ TUint32 iNetId; }; +const TUint8 KConnArgVersion3 = 3; + + /** @publishedAll @released since v7.0s */ typedef TPckgBuf TConnectionInfoBuf; -class TConnectionInfoV2 : public TConnectionInfo -/** - * Connection information structure (version 2) - * Extends basic connection info with connection type information - * @publishedPartner - * @released since v7.0s - * @see TConnectionInfo -*/ - { -public: - inline TConnectionInfoV2(); - inline TConnectionInfoV2(TUint32 aIapId, TUint32 aNetId, TConnectionType aConnectionType); - inline TConnectionType ConnectionType(); -protected: - inline TConnectionInfoV2(TUint8 aVersion, TUint32 aIapId, TUint32 aNetId, TConnectionType aConnectionType); -private: - TConnectionType iConnectionType; - }; - -/** -@publishedPartner -@released since v7.0s -*/ -typedef TPckgBuf TConnectionInfoV2Buf; - -class TSubConnectionInfo : public TConnArgBase -/** - * Base class for information about a subconnection - * @publishedPartner - * @released since v7.0s - * @note Classes for information about a specific connection type should derive from this class - * @note Generic classes for most bearers are defined in nifconninfo.h - * @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. - */ - { -public: - inline TSubConnectionInfo(); - -public: - TSubConnectionUniqueId iSubConnectionUniqueId; - TConnectionType iConnectionType; - TTime iTimeStarted; - }; /** The following classes are used with RConnection::AllInterfaceNotification() to receive information @@ -154,10 +128,6 @@ TConnInterfaceState iState; }; -/** -@internalTechnology -*/ -typedef TPckgBuf TInterfaceNotificationBuf; /** Types of events that can occur on a subconnection @@ -172,169 +142,18 @@ * @released since v7.0s */ { - ESubConnectionOpened, ///< Connection values 0-9999 for agent-based events - ESubConnectionClosed, ///< Connection values 0-9999 for agent-based events - ESubConnectionQoSChanged = 1000 ///< Connection values 10000-19999 for nif-based events + ESubConnectionOpened, //< Connection values 0-9999 for agent-based events + ESubConnectionClosed, //< Connection values 0-9999 for agent-based events + ESubConnectionQoSChanged = 1000 //< Connection values 10000-19999 for nif-based events }; -class TSubConnectionEvent -/** - * Base class for structures that provide information related to a specific subconnection event - * @note Classes derived from this must not exceed KMaxSubConnectionEventSize bytes in size - * @publishedPartner - * @released since v7.0s - */ - { -public: - IMPORT_C TSubConnectionEvent* CloneL() const; - IMPORT_C TUint Length() const; - -protected: - IMPORT_C TSubConnectionEvent(TSubConnectionEventType aEventType, TUint aLength); -public: - TSubConnectionUniqueId iSubConnectionUniqueId; - TSubConnectionEventType iEventType; -protected: - TUint iLength; - }; - -class TSubConnectionOpenedEvent : public TSubConnectionEvent -/** - * Information about a subconnection that has just been opened - * @publishedPartner - * @released since v7.0s - * @note This class currently not passed to clients, as it is (essentially) empty - */ - { -public: - IMPORT_C TSubConnectionOpenedEvent(); - }; - -class TSubConnectionClosedEvent : public TSubConnectionEvent -/** - * Information about a subconnection that has just been closed - * @publishedPartner - * @released since v7.0s - * @note The time closed uses universal time as a time zone - */ - { -public: - IMPORT_C TSubConnectionClosedEvent(); -public: - TUint iTotalUplinkDataVolume; - TUint iTotalDownlinkDataVolume; - TTime iTimeClosed; // universal time - }; - -class TSubConnectionQoSChangedEvent : public TSubConnectionEvent -/** - * 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 - * @publishedPartner - * @released since v7.0s - * @note This will be produced by NIFs when QoS changes - */ - { -public: - IMPORT_C TSubConnectionQoSChangedEvent(); - }; - -/** -@internalTechnology -*/ -typedef TPckgBuf TInterfaceNotificationBuf; - - -/** -The following classes are used to enumerate clients and sockets associated with a -particular connection. RConnection::Control() is used to retrieve this information. -*/ - -class TConnectionEnumArg : public TConnArgBase -/** -for KCoEnumerateConnectionClients and KCoEnumerateConnectionSockets -@publishedPartner -@released since v7.0s -*/ - { -public: - inline TConnectionEnumArg(); -public: - TUint iIndex; - TUint iCount; - }; - -/** -@internalComponent -*/ -typedef TPckgBuf TConnEnumArgBuf; - -class TConnectionClientInfo -/** -@publishedPartner -@released since v7.0s -*/ - { -public: - inline TConnectionClientInfo(); - inline TConnectionClientInfo(TUint aProcId, TUint aUid, TUint aThreadId); -public: - TProcessId iProcessId; - TUid iUid; - TThreadId iThreadId; - }; - -class TConnectionGetClientInfoArg : public TConnArgBase -/** -for KCoGetConnectionClientInfo -@publishedPartner -@released since v7.0s -*/ - { -public: - inline TConnectionGetClientInfoArg(); -public: - TUint iIndex; - TConnectionClientInfo iClientInfo; - }; - -/** -@internalComponent -*/ -typedef TPckgBuf TConnGetClientInfoArgBuf; - -class TConnectionSocketInfo -/** -@internalComponent -*/ - { -public: - inline TConnectionSocketInfo(); -public: - TUint iAddressFamily; - TUint iProtocol; - TSockAddr iSourceAddress; - TSockAddr iDestinationAddress; - }; - -class TConnectionGetSocketInfoArg : public TConnArgBase -/** -for KCoGetConnectionSocketInfo - -@internalComponent -*/ - { -public: - TConnectionGetSocketInfoArg(); -public: - TUint iIndex; - TConnectionSocketInfo iSocketInfo; - }; - -/** -@internalComponent -*/ -typedef TPckgBuf TConnGetSocketInfoArgBuf; +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#include +#endif #include + #endif // __ES_ENUM_H__ +