datacommsserver/esockserver/inc/es_enum.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2003-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  @publishedAll
       
    20  @released
       
    21 */
       
    22 
       
    23 #if !defined (__ES_ENUM_H__)
       
    24 #define __ES_ENUM_H__
       
    25 
       
    26 #include <e32std.h>
       
    27 #include <nifvar.h>
       
    28 #include <es_sock.h>
       
    29 
       
    30 
       
    31 class TConnArgBase
       
    32 /**
       
    33  * Base class for many arguments to RConnection functions.  Provides versioning information.
       
    34  * @note Not intended for user instantiation
       
    35  * @publishedAll
       
    36  * @released since v7.0s
       
    37  */
       
    38 	{
       
    39 public:
       
    40 	inline TConnArgBase();
       
    41 	inline TConnArgBase(const TDesC8& aConnectionInfo)
       
    42 	:	iVersion(*((TUint8*)aConnectionInfo.Ptr()))
       
    43 		{
       
    44 		}
       
    45 	inline TUint8 Version() const;
       
    46 
       
    47 protected:
       
    48 	inline TConnArgBase(TUint8 aVersion);
       
    49 
       
    50 protected:
       
    51 	TUint8 iVersion;
       
    52 	TUint8 iReserved[3];
       
    53 	};
       
    54 
       
    55 /**
       
    56  * Versioning information for connection arguments
       
    57  * @publishedAll
       
    58  * @released since v7.0s
       
    59  */
       
    60 const TUint8 KConnArgVersion1 = 1;
       
    61 
       
    62 /**
       
    63 Versioning information for connection arguments
       
    64 
       
    65 @publishedAll
       
    66 @released
       
    67 */
       
    68 const TUint8 KConnArgVersion2 = 2;
       
    69 
       
    70 class TConnectionInfo : public TConnArgBase
       
    71 /**
       
    72 @publishedAll
       
    73 @released since v7.0s
       
    74 */
       
    75 	{
       
    76 public:
       
    77 	inline TConnectionInfo();
       
    78 	TConnectionInfo(const TDesC8& aConnectionInfo /*as passed to ::Bearer*/);
       
    79 	inline TConnectionInfo(TUint32 aIapId, TUint32 aNetId);
       
    80 
       
    81 	static TBool IsLocalBearer(const TDesC8& aConnectionInfo);
       
    82 
       
    83 	inline bool operator == (const TConnectionInfo& aRhs) const;
       
    84 
       
    85 protected:
       
    86 	inline TConnectionInfo(TUint8 aVersion, TUint32 aIapId, TUint32 aNetId);
       
    87 
       
    88 public:
       
    89 	TUint32 iIapId;
       
    90 	TUint32 iNetId;
       
    91 	};
       
    92 
       
    93 const TUint8 KConnArgVersion3 = 3;
       
    94 
       
    95 
       
    96 /**
       
    97 @publishedAll
       
    98 @released since v7.0s
       
    99 */
       
   100 typedef TPckgBuf<TConnectionInfo> TConnectionInfoBuf;
       
   101 
       
   102 
       
   103 
       
   104 
       
   105 /**
       
   106 The following classes are used with RConnection::AllInterfaceNotification() to receive information
       
   107 about interfaces coming up and going down.
       
   108 */
       
   109 
       
   110 /**
       
   111 @publishedAll
       
   112 @released since v7.0s
       
   113 */
       
   114 enum TConnInterfaceState
       
   115 	{
       
   116 	EInterfaceUp,
       
   117 	EInterfaceDown
       
   118 	};
       
   119 
       
   120 class TInterfaceNotification
       
   121 /**
       
   122 @publishedAll
       
   123 @released since v7.0s
       
   124 */
       
   125 	{
       
   126 public:
       
   127 	TConnectionInfo iConnectionInfo;
       
   128 	TConnInterfaceState iState;
       
   129 	};
       
   130 
       
   131 
       
   132 /**
       
   133 Types of events that can occur on a subconnection
       
   134 
       
   135 @publishedAll
       
   136 @released
       
   137 */
       
   138 enum TSubConnectionEventType
       
   139 /**
       
   140  * Types of events that can occur on a subconnection
       
   141  * @publishedPartner
       
   142  * @released since v7.0s
       
   143  */
       
   144 	{
       
   145 	ESubConnectionOpened,           //< Connection values 0-9999 for agent-based events
       
   146 	ESubConnectionClosed,           //< Connection values 0-9999 for agent-based events
       
   147 	ESubConnectionQoSChanged = 1000 //< Connection values 10000-19999 for nif-based events
       
   148 	};
       
   149 
       
   150 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
   151 #include <es_enum_partner.h>
       
   152 #include <es_enum_internal.h>
       
   153 #endif
       
   154 
       
   155 #include <es_enum.inl>
       
   156 
       
   157 
       
   158 #endif // __ES_ENUM_H__
       
   159