datacommsserver/esockserver/inc/es_prot_internal.h
changeset 0 dfb7c4ff071f
child 24 00c6709d25aa
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  @file
       
    18  @InternalTechnology
       
    19 */
       
    20 
       
    21 #ifndef __ES_PROT_INTERNAL_H__
       
    22 #define __ES_PROT_INTERNAL_H__
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <es_sock.h>
       
    26 
       
    27 /**
       
    28 @internalComponent
       
    29 */
       
    30 enum TConnStartType 
       
    31 	{
       
    32 	EConnStartExplicit,
       
    33 	EConnStartImplicit
       
    34 	};
       
    35 
       
    36 /**
       
    37 @internalComponent
       
    38 */
       
    39 enum TESOCKActivePriority
       
    40 	{
       
    41 	ESSExclusivePriority=100000,
       
    42 	ECommReceivePriority=200,		//< Must always run.
       
    43 	ECommTransmitPriority=100,
       
    44 	ECAsyncImmediatePriority=75,	//< I.e. before a timer event goes off.
       
    45 	ESocketTimerPriority=50,
       
    46 	EActiveIpcPriority=20,
       
    47 	EActiveHighPriority=10,
       
    48 	EActiveMedPriority=0,
       
    49 	EActiveLowPriority=-10,
       
    50 	ECAsyncDeferredPriority=-20,
       
    51 	EShutDownPriority=-100000,		//< Lowest priority for shutdown, so that other async cleanup behaviours can complete first
       
    52 	};
       
    53 
       
    54 /**
       
    55 @internalComponent
       
    56 */
       
    57 enum TProtocolServiceInfo
       
    58 	{
       
    59 	ESocketSupport=0x00000001,		//< Can make sockets
       
    60 	ETransport=0x00000002,			//< Can act as a transport - ie can be bound to
       
    61 	EPreferMBufChains=0x00000004,	//< Will process MBufChains (I.e. won't convert them to descriptors)
       
    62 	EPreferDescriptors=0x00000008,	//< Will process Descriptors (I.e. won't convert them to MBufChains)
       
    63 	ECantProcessMBufChains=0x00000010,	//< Will Panic if asked to process an MBufChain
       
    64 	ENeedMBufs=0x00000020,			//< Uses MBufChains internally.
       
    65 	EUseCanSend=0x00000040,			//< Uses the inter-protocol CanSend upcall.
       
    66 	EInterface=0x00000080,			//< Is a CInterfaceBase rather than CProtocolBase
       
    67 	};
       
    68 
       
    69 
       
    70 /**
       
    71 @internalTechnology
       
    72 */
       
    73 enum TProtocolType
       
    74 	{
       
    75 	ENormalProtocol,				//< Normal protocol
       
    76 	EInterfaceProtocol				//< Has EInterface flags set and supports GetBinderL()
       
    77 	};
       
    78 
       
    79 /** Ensure that the requested length for datagrams is bigger than any real one. This ensures that
       
    80 naive providers deliver them without truncation, so allowing the client to perform continuation reads.
       
    81 @internalTechnology
       
    82 */
       
    83 const TUint KGetDataWholeDatagram = 0x40000000;
       
    84 
       
    85 
       
    86 /**
       
    87 Definition of argument to CConnectionProvdBase::SetUsageProfile()
       
    88 Bitmap masks
       
    89 
       
    90 @internalTechnology
       
    91 */
       
    92 const TUint KConnProfileNone = 0;
       
    93 
       
    94 
       
    95 /**
       
    96 Definition of argument to CConnectionProvdBase::SetUsageProfile()
       
    97 Bitmap masks
       
    98 
       
    99 @internalTechnology
       
   100 */
       
   101 const TUint KConnProfileLong = 1;
       
   102 
       
   103 /**
       
   104 Definition of argument to CConnectionProvdBase::SetUsageProfile()
       
   105 Bitmap masks
       
   106 
       
   107 @internalTechnology
       
   108 */
       
   109 const TUint KConnProfileMedium = 2;
       
   110 
       
   111 
       
   112 class SocketTimer 
       
   113 /**
       
   114 @internalComponent
       
   115 */
       
   116 	{
       
   117 public:
       
   118 	IMPORT_C static void Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds,TDeltaTimerEntry& aTimer);
       
   119 	IMPORT_C static void Remove(TDeltaTimerEntry& aTimer);
       
   120 	};
       
   121 
       
   122 class CProtocolBase;
       
   123 class SocketServExt
       
   124 /**
       
   125 @internalTechnology
       
   126 */
       
   127     {
       
   128 public:
       
   129 	IMPORT_C static CProtocolBase* FindAndLoadProtocolL(const TDesC& aName, TProtocolType aType=ENormalProtocol);
       
   130 	IMPORT_C static CProtocolBase* FindAndLoadProtocolL(TUint aAddrFamily, TUint aSockType, TUint aProtocol);
       
   131 	IMPORT_C static void InstallExtensionL(const TDesC& aDllName, const TDesC& aArgs);
       
   132 	IMPORT_C static void OpenSession();
       
   133 	IMPORT_C static void CloseSession();
       
   134 	IMPORT_C static void InstallSchedulerWaitHook(TCallBack* aCall);
       
   135 	};
       
   136 
       
   137 class CSocketServExtRef;
       
   138 class CSocketServExtBase : public CBase
       
   139 /**
       
   140 Base class for extensions
       
   141 
       
   142 @internalTechnology
       
   143 */
       
   144 	{
       
   145 public:
       
   146 	IMPORT_C virtual ~CSocketServExtBase();
       
   147 protected:
       
   148 	IMPORT_C CSocketServExtBase();
       
   149 public:	
       
   150 	virtual void InstallL(const TDesC& aArgs)=0;
       
   151 	virtual void Remove()=0;
       
   152 	//
       
   153 private:
       
   154 	friend class CSocketServExtRef;
       
   155 	CSocketServExtRef* iExtRef;
       
   156 	};
       
   157 
       
   158 
       
   159 /**
       
   160 KSoOwnerInfo
       
   161 
       
   162 Definition for internal SetOption() from ESock to Provider to communicate
       
   163 socket owner information.
       
   164 
       
   165 @internalTechnology
       
   166 @released
       
   167 */
       
   168 const TInt KSOLProvider = 2;
       
   169 
       
   170 const TUint KSoOwnerInfo = 1 | KSocketInternalOptionBit;
       
   171 
       
   172 /**
       
   173 KSoConnectionInfo
       
   174 
       
   175 Definition for internal SetOption() from ESock to Provider to communicate
       
   176 connection selection information.  Note that the information is opaque
       
   177 to ESock and comes from Nifman in the form of a TSoIfConnectionInfo class.
       
   178 @internalTechnology
       
   179 */
       
   180 const TInt KSoConnectionInfo = 2 | KSocketInternalOptionBit;
       
   181 
       
   182 #ifdef SYMBIAN_NETWORKING_UPS
       
   183 /**
       
   184 KSoGetErrorCode
       
   185 
       
   186 Definition for internal GetOption() from ESock to Host Resolver Provider to retrieve
       
   187 any specific error code needed to error the subsession with in certain
       
   188 circumstances.
       
   189 @internalTechnology
       
   190 */
       
   191 const TUint KSoGetErrorCode = 3 | KSocketInternalOptionBit;
       
   192 
       
   193 /**
       
   194 KSoSetPlatSecApi
       
   195 
       
   196 Definition for internal SetOption() from ESock to Socket/Host Resolver Provider to send
       
   197 a class instance that can be used to dynamically retrieve thread and process id information.
       
   198 @internalTechnology
       
   199 */
       
   200 const TUint KSoSetPlatSecApi = 4 | KSocketInternalOptionBit;
       
   201 #endif //SYMBIAN_NETWORKING_UPS
       
   202 
       
   203 /**
       
   204 UID of Unicode Protocol Modules
       
   205 
       
   206 @internalTechnology
       
   207 */
       
   208 const TInt KUidUnicodeProtocolModule = 0x10003d38;
       
   209 
       
   210 /** @internalTechnology */
       
   211 const TInt KUidEsockExtension = 0x10000387;
       
   212 
       
   213 
       
   214 #endif // __ES_PROT_INTERNAL_H__
       
   215