epoc32/include/es_prot.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/es_prot.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,1309 +0,0 @@
     1.4 -// Copyright (c) 1997-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 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -
    1.20 -
    1.21 -/**
    1.22 - @file
    1.23 - @publishedPartner
    1.24 - @released
    1.25 -*/
    1.26 -
    1.27 -#if !defined(__ES_PROT_H__)
    1.28 -#define __ES_PROT_H__
    1.29 -
    1.30 -
    1.31 -#include <es_enum.h>
    1.32 -
    1.33 -/**
    1.34 -ESock subsession unique id
    1.35 -@internalTechnology
    1.36 -*/
    1.37 -typedef TUint TSubSessionUniqueId;
    1.38 -
    1.39 -/**
    1.40 -@internalComponent
    1.41 -*/
    1.42 -enum TConnStartType 
    1.43 -	{
    1.44 -	EConnStartExplicit,
    1.45 -	EConnStartImplicit
    1.46 -	};	
    1.47 -
    1.48 -/**
    1.49 -@internalComponent
    1.50 -*/
    1.51 -enum TESOCKActivePriority
    1.52 -	{
    1.53 -	ESSExclusivePriority=100000,
    1.54 -	ECommReceivePriority=200,		///< Must always run.
    1.55 -	ECommTransmitPriority=100,
    1.56 -	ECAsyncImmediatePriority=75,	///< I.e. before a timer event goes off.
    1.57 -	ESocketTimerPriority=50,
    1.58 -	EActiveIpcPriority=20,
    1.59 -	EActiveHighPriority=10,
    1.60 -	EActiveMedPriority=0,
    1.61 -	EActiveLowPriority=-10,
    1.62 -	ECAsyncDeferredPriority=-20,
    1.63 -	};
    1.64 -
    1.65 -/**
    1.66 -End of data,Socket can't receive more data.
    1.67 -@publishedPartner
    1.68 -@released
    1.69 -*/
    1.70 -const TUint KNewDataEndofData = 0xFFFFFFFF;
    1.71 -
    1.72 -class CServProviderBase;
    1.73 -class CSocket;
    1.74 -
    1.75 -class MSocketNotify
    1.76 -/** Abstract base class used by a CServProviderBase-derived object, through its 
    1.77 -iSocket member, to notify the socket server that various events have occurred. 
    1.78 -
    1.79 -The class provides several up-call member functions.
    1.80 -
    1.81 -All up-calls on an MSocketNotify should be made in the context of the socket 
    1.82 -server's thread - i.e. the thread which called NewSAPL() on the protocol. 
    1.83 -
    1.84 -@publishedPartner
    1.85 -@released Since v5.0 */
    1.86 -	{
    1.87 -public:
    1.88 -	/** Delete and detach flags. */
    1.89 -	enum TDelete 
    1.90 -		{
    1.91 -		/** Delete SAP */	
    1.92 -		EDelete,
    1.93 -		/** Don't delete SAP */
    1.94 -		EDetach
    1.95 -		};
    1.96 -	/** Error codes. */
    1.97 -	enum TOperationBitmasks
    1.98 -		{
    1.99 -		/** An error has occurred which affects Send() operations */
   1.100 -		EErrorSend=0x0000001,  
   1.101 -
   1.102 -		/** An error has occurred which affects Receive() operations. */
   1.103 -		EErrorRecv=0x0000002,
   1.104 -
   1.105 -		/** An error has occurred which affects Connect() operations */
   1.106 -		EErrorConnect=0x0000004,
   1.107 -
   1.108 -		/** An error has occurred which affects Close() operations */
   1.109 -		EErrorClose=0x00000008,
   1.110 -
   1.111 -		/** An error has occurred which affects Ioctl() operations */
   1.112 -		EErrorIoctl=0x00000010,
   1.113 -
   1.114 -		/** A fatal error has occurred */
   1.115 -		EErrorFatal=0x10000000,
   1.116 -		
   1.117 -		/** An error has occurred which affects all operations */
   1.118 -		EErrorAllOperations=0x7fffffff,
   1.119 -		};
   1.120 -	
   1.121 -	/**
   1.122 -	Indicates that new data is available on a service access point
   1.123 -
   1.124 -	For a stream-oriented protocol aCount should be a byte count; for datagram-oriented 
   1.125 -	sockets aCount should be a datagram count.
   1.126 -	
   1.127 -	@note aCount is the amount of new data, not the total amount of data waiting 
   1.128 -	to be read.
   1.129 -	
   1.130 -	@param aCount The amount of new data. A value of KNewDataEndofData indicates 
   1.131 -	that the socket is in a half-closed state and will receive no more data. Any subsequent 
   1.132 -	reads will complete with KErrEof and a length of 0. */
   1.133 -	virtual void NewData(TUint aCount) = 0;
   1.134 -	/** Indicates that new buffer space is available on a service. */
   1.135 -	virtual void CanSend() = 0;
   1.136 -	/** Indicates that a connection attempt has completed successfully (for active opens).
   1.137 -	 
   1.138 -	There are four versions of this up-call: two are for active opens and two are for passive 
   1.139 -	opens. Both active and passive versions support a variant carrying user connection 
   1.140 -	data for protocols which support it.
   1.141 -	
   1.142 -	@note A connection-less protocol should never call the ConnectComplete() up-calls.
   1.143 -	@note A protocol should keep a count of sockets which have called ConnectComplete() 
   1.144 -	but have not had Start() called. Sockets in this state have their Error() 
   1.145 -	and NewData() calls deferred until Start() is called.*/
   1.146 -	virtual void ConnectComplete() = 0;
   1.147 -	/** Indicates that a connection attempt has completed successfully (for active opens).
   1.148 -	 
   1.149 -	There are four versions of this up-call: two are for active opens and two are for passive 
   1.150 -	opens. Both active and passive versions support a variant carrying user connection 
   1.151 -	data for protocols which support it.
   1.152 -	
   1.153 -	@note A connection-less protocol should never call the ConnectComplete() up-calls.
   1.154 -	@note A protocol should keep a count of sockets which have called ConnectComplete() 
   1.155 -	but have not had Start() called. Sockets in this state have their Error() 
   1.156 -	and NewData() calls deferred until Start() is called.
   1.157 -	
   1.158 -	@param aConnectData Connect data (if supported).
   1.159 -	*/
   1.160 -	virtual void ConnectComplete(const TDesC8& aConnectData) = 0;
   1.161 -	/** Indicates that a connection attempt has completed successfully (for passive opens). 
   1.162 -	
   1.163 -	There are four versions of this up-call: two are for active opens and two are for passive 
   1.164 -	opens. Both active and passive versions support a variant carrying user connection 
   1.165 -	data for protocols which support it.
   1.166 -	
   1.167 -	The versions of ConnectComplete() for passive opens carry a new SSP (socket service 
   1.168 -	provider, or SAP) for the newly created socket. A new socket will then be linked up to 
   1.169 -	the SSP and data transfer can take place. The original socket stays listening.
   1.170 -	
   1.171 -	@note A connection-less protocol should never call the ConnectComplete() up-calls.
   1.172 -	@note A protocol should keep a count of sockets which have called ConnectComplete() 
   1.173 -	but have not had Start() called. Sockets in this state have their Error() 
   1.174 -	and NewData() calls deferred until Start() is called.
   1.175 -	
   1.176 -	@param aSSP The new SSP for passive opens. 
   1.177 -	*/
   1.178 -    virtual void ConnectComplete(CServProviderBase& aSSP) = 0;
   1.179 -	/** Indicates that a connection attempt has completed successfully (for passive opens). 
   1.180 -	
   1.181 -	There are four versions of this up-call: two are for active opens and two are for passive 
   1.182 -	opens. Both active and passive versions support a variant carrying user connection 
   1.183 -	data for protocols which support it.
   1.184 -	
   1.185 -	The versions of ConnectComplete() for passive opens carry a new SSP (socket service 
   1.186 -	provider, or SAP) for the newly created socket. A new socket will then be linked up to 
   1.187 -	the SSP and data transfer can take place. The original socket stays listening.
   1.188 -	
   1.189 -	@note A connection-less protocol should never call the ConnectComplete() up-calls.
   1.190 -	@note A protocol should keep a count of sockets which have called ConnectComplete() 
   1.191 -	but have not had Start() called. Sockets in this state have their Error() 
   1.192 -	and NewData() calls deferred until Start() is called.
   1.193 -	
   1.194 -	@param aSSP The new SSP for passive opens. 
   1.195 -	@param aConnectData Connect data (if supported). */
   1.196 -	virtual void ConnectComplete(CServProviderBase& aSSP,const TDesC8& aConnectData) = 0;
   1.197 -	/** Indicates that the SAP has finished closing down. 
   1.198 -	
   1.199 -	This up-call is the response to a Shutdown(). A connection-oriented protocol should call 
   1.200 -	CanClose() when it has terminated communications with the remote host. Protocols can call 
   1.201 -	CanClose() from within their Shutdown() code. After CanClose() has been called, an SAP may 
   1.202 -	be deleted by the socket server.
   1.203 -	
   1.204 -	@note The protocol must not access the CServProviderBase object after calling CanClose().
   1.205 -	@param aDelete Delete SAP. 
   1.206 -	*/
   1.207 -	virtual void CanClose(TDelete aDelete=EDelete) = 0;
   1.208 -	/** Indicates that the SAP has finished closing down. 
   1.209 -	
   1.210 -	This up-call is the response to a Shutdown(). A connection-oriented protocol should call 
   1.211 -	CanClose() when it has terminated communications with the remote host. Protocols can call 
   1.212 -	CanClose() from within their Shutdown() code. After CanClose() has been called, an SAP may 
   1.213 -	be deleted by the socket server.
   1.214 -	
   1.215 -	@note The protocol must not access the CServProviderBase object after calling CanClose().
   1.216 -	@param aDisconnectData Any user data carried on the disconnect frame.
   1.217 -	@param aDelete Delete SAP. 
   1.218 -	*/
   1.219 -	virtual void CanClose(const TDesC8& aDisconnectData,TDelete aDelete=EDelete) = 0;
   1.220 -	/** Tells the socket server that an error state has arisen within the protocol. 
   1.221 -	
   1.222 -	It should not be used to report programmatic errors, either in the protocol 
   1.223 -	itself or the socket server (a panic should be used in these cases). When 
   1.224 -	Error() is called on a connection-oriented socket, the socket is moved into 
   1.225 -	a dead state which denies user access to it.
   1.226 -	
   1.227 -	@param anError KErrNone or another of the system-wide error codes. 
   1.228 -	@param anOperationMask A bitmask of TOperationBitmasks values specifying which 
   1.229 -	pending operations are affected by the Error up-call. */
   1.230 -	virtual void Error(TInt anError,TUint anOperationMask=EErrorAllOperations) = 0;
   1.231 -	/** Indicates that the other end of a connection has disconnected.
   1.232 -	
   1.233 -	This is analogous to CanClose(), but in this case the other end initiated it. 
   1.234 -	
   1.235 -	Once the client has called Shutdown() it is	illegal to call Disconnect(). Instead, 
   1.236 -	CanClose() or Error(KErrDisconnected) should be called.
   1.237 -	*/
   1.238 -	virtual void Disconnect(void) = 0;
   1.239 -	/** Indicates that the other end of a connection has disconnected.
   1.240 -	
   1.241 -	This is analogous to CanClose(), but in this case the other end initiated it. 
   1.242 -	
   1.243 -	Once the client has called Shutdown() it is	illegal to call Disconnect(). Instead, 
   1.244 -	CanClose() or Error(KErrDisconnected) should be called. 
   1.245 -	
   1.246 -	@param aConnectData User data in the disconnect frame.
   1.247 -	*/
   1.248 -	virtual void Disconnect(TDesC8& aDisconnectData) = 0;
   1.249 -	/** Indicates that the currently pending Ioctl has completed.
   1.250 -	
   1.251 -	The parameter aBuf is protocol defined - in fact it is defined by the specific 
   1.252 -	Ioctl.
   1.253 -	
   1.254 -	@param aBuf Any data requested by the Ioctl operation. */
   1.255 -	virtual void IoctlComplete(TDesC8* aBuf) = 0;
   1.256 -
   1.257 -	/**
   1.258 -	Indicates that there are no bearer available
   1.259 -
   1.260 -	@param  aConnectionParams, the connection parameters.
   1.261 -	*/
   1.262 -	virtual void NoBearer(const TDesC8& aConnectionParams) = 0;
   1.263 -
   1.264 -	/**
   1.265 -	Indicates the bearer available.
   1.266 -
   1.267 -	@param aConnectionInfo, Information about socket connection.
   1.268 -	*/
   1.269 -	virtual void Bearer(const TDesC8& aConnectionInfo) = 0;
   1.270 -
   1.271 -	/**
   1.272 -	Indicates that this socket is now completed an asynchronous join
   1.273 -	with a sub-connection. It now can use the properties of the sub-connection
   1.274 -	*/
   1.275 -	virtual void JoinedSubConnection() {;};
   1.276 -
   1.277 -	/**
   1.278 -	Indicates that this socket was not able to complete an asynchronous join
   1.279 -	with a sub-connection. The socket is still joined, but cannot use the
   1.280 -	properties of the sub-connection
   1.281 -	
   1.282 -	@param aError Reason the socket could not be joined
   1.283 -	*/
   1.284 -	virtual void SubConnectionJoinFailed(TInt /*aError*/) {;};
   1.285 -
   1.286 -	/**
   1.287 -	Indicates that this socket has now completed an asynchronous leave
   1.288 -	from a sub-connection. The socket is now connected to the sub-connection
   1.289 -	anymore.
   1.290 -	*/
   1.291 -	virtual void LeftSubConnection() {;};
   1.292 -
   1.293 -private:
   1.294 -	};
   1.295 -
   1.296 -
   1.297 -class TNifProgress;
   1.298 -
   1.299 -class MConnectionNotify
   1.300 -/**
   1.301 - * Callback interface from CConnectionProvdBase-derived classes
   1.302 - * @internalTechnology
   1.303 - */
   1.304 -	{
   1.305 -public:
   1.306 -	virtual void SelectionComplete(TInt aError, const TDesC8& aSelectionInfo) = 0;
   1.307 -	virtual void ConnectionError(TInt aError) = 0;
   1.308 -	virtual void LinkLayerOpen(TInt aError) = 0;
   1.309 -	virtual void LinkLayerClosed(TInt aError) = 0;
   1.310 -	virtual void ProgressNotification(TInt aStage, TInt aError) = 0;
   1.311 -	virtual void ProgressNotification(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError) = 0;
   1.312 -	virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType) = 0;
   1.313 -	virtual void InterfaceStateChangeNotification(TDesC8& aInfo) = 0;
   1.314 -	virtual void NotifyDataSent(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkVolume) = 0;
   1.315 -	virtual void NotifyDataReceived(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkVolume) = 0;
   1.316 -	
   1.317 -	virtual void SubConnectionEvent(const TSubConnectionEvent& aSubConnectionEvent) = 0;
   1.318 -	};
   1.319 -
   1.320 -/**
   1.321 -@internalComponent
   1.322 -*/
   1.323 -enum TProtocolServiceInfo
   1.324 -	{
   1.325 -	ESocketSupport=0x00000001,		///< Can make sockets
   1.326 -	ETransport=0x00000002,			///< Can act as a transport - ie can be bound to
   1.327 -	EPreferMBufChains=0x00000004,	///< Will process MBufChains (I.e. won't convert them to descriptors)
   1.328 -	EPreferDescriptors=0x00000008,	///< Will process Descriptors (I.e. won't convert them to MBufChains)
   1.329 -	ECantProcessMBufChains=0x00000010,	///< Will Panic if asked to process an MBufChain
   1.330 -	ENeedMBufs=0x00000020,			///< Uses MBufChains internally.
   1.331 -	EUseCanSend=0x00000040,			///< Uses the inter-protocol CanSend upcall.
   1.332 -	EInterface=0x00000080,			///< Is a CInterfaceBase rather than CProtocolBase
   1.333 -	};
   1.334 -
   1.335 -/**
   1.336 -@internalTechnology
   1.337 -*/
   1.338 -enum TProtocolType
   1.339 -	{
   1.340 -	ENormalProtocol,				///< Normal protocol
   1.341 -	EInterfaceProtocol				///< Has EInterface flags set and supports GetBinderL()
   1.342 -	};
   1.343 -
   1.344 -/**
   1.345 -@internalComponent
   1.346 -*/
   1.347 -const TInt KUnlimitedSockets=-1;
   1.348 -
   1.349 -struct TServerProtocolDesc : public TProtocolDesc
   1.350 -/**
   1.351 -Contains data that describes a particular protocol. 
   1.352 -@publishedPartner
   1.353 -@released
   1.354 -
   1.355 -@see CProtocolFamilyBase::ProtocolList(). 
   1.356 -*/
   1.357 -	{
   1.358 -	TInt iServiceTypeInfo;  ///< Set this to 1 if the protocol supports socket creation
   1.359 -	TInt iNumSockets;       ///< The maximum number of SSPs the protocol supports
   1.360 -	};
   1.361 -
   1.362 -
   1.363 -class MResolverNotify
   1.364 -/**
   1.365 -@publishedPartner
   1.366 -@released
   1.367 -*/
   1.368 -	{
   1.369 -public:
   1.370 -	virtual void QueryComplete(TInt anError)=0;
   1.371 -	};
   1.372 -
   1.373 -/** Ensure that the requested length for datagrams is bigger than any real one. This ensures that
   1.374 -naive providers deliver them without truncation, so allowing the client to perform continuation reads.
   1.375 -@internalTechnology
   1.376 -*/
   1.377 -const TUint KGetDataWholeDatagram = 0x40000000;
   1.378 -
   1.379 -/**
   1.380 -Security checker class passed down to providers which is used to perform security checks on the client
   1.381 -of the provider.  The provider calls the CheckPolicy(...) method with a suitable TSecurityPolicy
   1.382 -class and a diagnostic string as arguments.
   1.383 -
   1.384 -@see CServProviderBase
   1.385 -@see CResolverProvdBase
   1.386 -
   1.387 -@code
   1.388 -_LIT_SECURITY_POLICY_C1(myPolicy1, ECapabilityNetworkServices);
   1.389 -...
   1.390 -TInt CMyProvider::SecurityCheck(MProvdSecurityChecker *aChecker)
   1.391 -{
   1.392 -	...
   1.393 -	if (aChecker->CheckPolicy(myPolicy1, "CMyProvider main") == KErrNone)
   1.394 -	{
   1.395 -		// client has NetworkServices capability
   1.396 -	}
   1.397 -	...
   1.398 -}
   1.399 -@endcode
   1.400 -
   1.401 -@publishedPartner
   1.402 -@released
   1.403 -*/
   1.404 -class MProvdSecurityChecker 
   1.405 -{
   1.406 -public:
   1.407 -	/**
   1.408 -	Check the security policy of a client process.
   1.409 -	
   1.410 -	Called from a socket or resolver provider to check whether the client process conforms to a security policy.
   1.411 -	
   1.412 -	@param aPolicy A TSecurityPolicy class instance containing the security information to be checked against the client.
   1.413 -	@param aDiagnostic A diagnostic string used when logging system-wide security failures, else 0.
   1.414 -	@return KErrNone if client process has the required security information, else KErrPermissionDenied.
   1.415 -	(In the future, some other system error may be returned).
   1.416 -	*/
   1.417 -	virtual TInt CheckPolicy(const TSecurityPolicy& aPolicy, const char *aDiagnostic) = 0;
   1.418 -};
   1.419 -
   1.420 -class RMBufChain;
   1.421 -class CSubConnectionProviderBase;
   1.422 -class CServProviderBase : public CBase
   1.423 -/** Service Access Point.
   1.424 -
   1.425 -Provides transport services to a single protocol. Several of the calls to 
   1.426 -CServProviderBase have pre-conditions attached to them - for example 
   1.427 -a connection oriented protocol must have its local address set (either by 
   1.428 -a SetLocalName() or AutoBind()) before it is opened. If the socket server 
   1.429 -calls the CServProviderBase in such an erroneous way, the protocol should panic.
   1.430 -
   1.431 -@publishedPartner
   1.432 -@released Since 5.0 */
   1.433 -	{
   1.434 -	friend class ProtocolManager;
   1.435 -public:
   1.436 -
   1.437 -	/** Describes the behaviour the SAP should take on shutdown.*/
   1.438 -	enum TCloseType 
   1.439 -	{
   1.440 -		ENormal,        ///< The protocol should shutdown gracefully — no further input or output will be requested.
   1.441 -		EStopInput,     ///< The protocol should shut down gracefully — all further and pending input should be discarded.
   1.442 -		EStopOutput,    ///< The protocol should shutdown gracefully — all pending output should be discarded.
   1.443 -		EImmediate      ///< The protocol should close the connection immediately and free all resources without performing a graceful disconnect.
   1.444 -	};
   1.445 -	IMPORT_C CServProviderBase();
   1.446 -	IMPORT_C virtual ~CServProviderBase();
   1.447 -
   1.448 -	IMPORT_C virtual void SetNotify(MSocketNotify* aSocket);
   1.449 -	//V1.0 itf support
   1.450 -	IMPORT_C virtual void SetSockType(TUint aSockType);
   1.451 -	IMPORT_C TUint SockType() const;
   1.452 -
   1.453 -	IMPORT_C virtual void JoinSubConnectionL(CSubConnectionProviderBase& aSubConnProvider);
   1.454 -	IMPORT_C virtual void LeaveSubConnection(CSubConnectionProviderBase& aSubConnProvider);
   1.455 -
   1.456 -public:
   1.457 -
   1.458 -/**
   1.459 -pure virtual
   1.460 -*/
   1.461 -	/**
   1.462 -	Start a service provider.
   1.463 -	*/
   1.464 -	virtual void Start()=0;
   1.465 -	/** Gets the local name (address) of the socket service provider entity. The format 
   1.466 -	of the data in the TSockAddr object is defined by individual protocols.
   1.467 -	
   1.468 -	The local address is the address of the local machine plus a local port number. 
   1.469 -	Generally only the port number is important, unless you have two IP interfaces, 
   1.470 -	for example.
   1.471 -	
   1.472 -	@param anAddr The address to be filled in */
   1.473 -	virtual void LocalName(TSockAddr& anAddr) const =0;
   1.474 -	/** Sets the local name (address) of the socket service provider entity. The format 
   1.475 -	of the data in the TSockAddr object is defined by individual protocols.
   1.476 -	
   1.477 -	@param anAddr The address 
   1.478 -	@return Returns KErrNone if the local name is correctly set or, if this is 
   1.479 -	not the case, an informative error number. */
   1.480 -	virtual TInt SetLocalName(TSockAddr& anAddr)=0;
   1.481 -	/** Gets the remote name (address) of the socket service provider entity. The format 
   1.482 -	of the data in the TSockAddr object is defined by individual protocols.
   1.483 -	
   1.484 -	A remote address is either the address you're sending data to (non connection-oriented 
   1.485 -	sockets)* or the remote end of the connection. It is the address of the remote 
   1.486 -	machine (your peer in the network) plus a port number.
   1.487 -	
   1.488 -	@note RemName is only meaningful if the socket server client has called Connect() 
   1.489 -	to set up a default address for SendTo(). This function will only be called 
   1.490 -	on the protocol if this is the case.
   1.491 -	
   1.492 -	@param anAddr The address to be filled in */
   1.493 -	virtual void RemName(TSockAddr& anAddr) const =0;
   1.494 -	/** Sets the remote name (address) of the socket service provider entity. The format 
   1.495 -	of the data in the TSockAddr object is defined by individual protocols.
   1.496 -	
   1.497 -	@param anAddr The address 
   1.498 -	@return Returns KErrNone if the remote name is correctly set or, if this is 
   1.499 -	not the case, an informative error number. */
   1.500 -	virtual TInt SetRemName(TSockAddr& anAddr)=0;
   1.501 -	/** Gets some protocol specific option when called by the socket server on behalf of a 
   1.502 -	client. A protocol may pass the request down a protocol	stack (to protocols it is bound 
   1.503 -	to) using the GetOption() function of CProtocolBase.
   1.504 -	
   1.505 -	@param aLevel Option level.
   1.506 -	@param aName Option name.
   1.507 -	@param anOption Option data.
   1.508 -	@return System wide error code.
   1.509 -	*/
   1.510 -	virtual TInt GetOption(TUint level,TUint name,TDes8& anOption)const =0;
   1.511 -	/** Performs some protocol specific IO control. 
   1.512 -	
   1.513 -	@note If this function is called erroneously, the protocol should call Error() on the 
   1.514 -	socket. If an Ioctl call is already outstanding, the client will be panicked with the 
   1.515 -	value ETwoIoctls.
   1.516 -	
   1.517 -	@param aLevel Option level.
   1.518 -	@param aName Option name.
   1.519 -	@param anOption Option data.
   1.520 -	@return System wide error code.
   1.521 -	*/
   1.522 -	virtual void Ioctl(TUint level,TUint name,TDes8* anOption)=0;
   1.523 -	/** Cancels an outstanding Ioctl call. You are guaranteed only to have one outstanding 
   1.524 -	at once. 
   1.525 -	
   1.526 -	@param aLevel IOCTL level. 
   1.527 -	@param aName IOCTL name. 
   1.528 -	*/
   1.529 -	virtual void CancelIoctl(TUint aLevel,TUint aName)=0;
   1.530 -	/** Sets some protocol specific option when called by the socket server on behalf of a 
   1.531 -	client. A protocol may pass the request down a protocol	stack (to protocols it is bound 
   1.532 -	to) using the SetOption() function	of CProtocolBase.
   1.533 -	
   1.534 -	@param aLevel Option level.
   1.535 -	@param aName Option name.
   1.536 -	@param anOption Option data.
   1.537 -	@return System wide error code.
   1.538 -	*/
   1.539 -	virtual TInt SetOption(TUint level,TUint name,const TDesC8& anOption)=0;
   1.540 -	virtual void ActiveOpen()=0;
   1.541 -	/** Initiates a connection operation - this means that it tells the protocol to 
   1.542 -	attempt to connect to a peer. It is called by the socket server in response 
   1.543 -	to a connect request from a client. 
   1.544 -	
   1.545 -	This version of the function has user data in the connection frame.
   1.546 -	
   1.547 -	Only ever called on connection-oriented sockets. Such a socket 
   1.548 -	should always have both the local address and the remote address specified 
   1.549 -	before this function is called. If this is not the case then the protocol 
   1.550 -	should panic.
   1.551 -	
   1.552 -	When a connection has completed, the protocol should call ConnectComplete() 
   1.553 -	on its TNotify. If an error occurs during connection the protocol should not 
   1.554 -	call ConnectComplete() at all; instead it should call Error().
   1.555 -	
   1.556 -	@param aConnectionData If the protocol supports user specified connection 
   1.557 -	data, then it will be held in this buffer. */
   1.558 -	virtual void ActiveOpen(const TDesC8& aConnectionData)=0;
   1.559 -	/** Tells the protocol to start waiting for an incoming connection request on this 
   1.560 -	socket (i.e. port). It is called by the socket server in response to a listen 
   1.561 -	request from a client.
   1.562 -	
   1.563 -	Only ever called on connection-oriented sockets. Such a socket 
   1.564 -	should always have both the local address and the remote address specified 
   1.565 -	before this function is called. If this is not the case, then the protocol 
   1.566 -	should panic.
   1.567 -	
   1.568 -	The aQue parameter is the number of sockets which can be waiting for an outstanding 
   1.569 -	Start after calling ConnectComplete(). The protocol should keep a count of 
   1.570 -	sockets in this state - incrementing a variable in ConnectComplete(), and 
   1.571 -	decrementing it in Start().
   1.572 -	
   1.573 -	When a connection has completed, the protocol should call ConnectComplete() 
   1.574 -	on its TNotify. If an error occurs during connection the protocol should not 
   1.575 -	call ConnectComplete() at all; instead it should call Error().
   1.576 -	
   1.577 -	@param aQueSize Size of connect queue. 
   1.578 -	*/
   1.579 -	virtual TInt PassiveOpen(TUint aQueSize)=0;
   1.580 -	/** Tells the protocol to start waiting for an incoming connection request on this 
   1.581 -	socket (i.e. port). It is called by the socket server in response to a listen 
   1.582 -	request from a client.
   1.583 -	
   1.584 -	This version of the function has user data in the connection frame.
   1.585 -	
   1.586 -	Only ever called on connection-oriented sockets. Such a socket 
   1.587 -	should always have both the local address and the remote address specified 
   1.588 -	before this function is called. If this is not the case then the protocol 
   1.589 -	should panic.
   1.590 -	
   1.591 -	The aQue parameter is the number of sockets which can be waiting for an outstanding 
   1.592 -	Start after calling ConnectComplete(). The protocol should keep a count of 
   1.593 -	sockets in this state - incrementing a variable in ConnectComplete(), and 
   1.594 -	decrementing it in Start().
   1.595 -	
   1.596 -	When a connection has completed the protocol should call ConnectComplete() 
   1.597 -	on its TNotify. If an error occurs during connection the protocol should not 
   1.598 -	call ConnectComplete() at all; instead it should call Error().
   1.599 -	
   1.600 -	@param aQueSize size of connect queue 
   1.601 -	@param aConnectionData if the protocol supports user specified connection data 
   1.602 -	then it will be held in this buffer. */
   1.603 -	virtual TInt PassiveOpen(TUint aQueSize,const TDesC8& aConnectionData)=0;
   1.604 -	/** Terminates a connection (or closes a non connection-oriented socket down).
   1.605 -	 
   1.606 -	The value of the option argument specifies the type of processing which will 
   1.607 -	be required of the protocol after this function is called.
   1.608 -	
   1.609 -	Normally, when the socket server has called Shutdown() for a socket, it will 
   1.610 -	wait for the socket to call CanClose() before destroying the CServProviderBase 
   1.611 -	object. However, if the option argument is EImmediate, the CServProviderBase 
   1.612 -	will be destroyed as soon as Shutdown() returns.
   1.613 -	
   1.614 -	@param option The shutdown type. */
   1.615 -	virtual void Shutdown(TCloseType option)=0;
   1.616 -	/** Terminates a connection (or closes a non connection-oriented socket down). 
   1.617 -	
   1.618 -	The value of the option argument specifies the type of processing which will 
   1.619 -	be required of the protocol after this function is called.
   1.620 -	
   1.621 -	Normally, when the socket server has called Shutdown() for a socket, it will 
   1.622 -	wait for the socket to call CanClose() before destroying the CServProviderBase 
   1.623 -	object. However, if the option argument is EImmediate, the CServProviderBase 
   1.624 -	will be destroyed as soon as Shutdown() returns.
   1.625 -	
   1.626 -	@param option The shutdown type. 
   1.627 -	@param aDisconnectionData If the protocol supports disconnect data, any such 
   1.628 -	data required will be held in this buffer. */
   1.629 -	virtual void Shutdown(TCloseType option,const TDesC8& aDisconnectionData)=0;
   1.630 -	/** Specifies that the protocol should choose a local address for the service access 
   1.631 -	point itself. */
   1.632 -	virtual void AutoBind()=0;
   1.633 -
   1.634 -// protocol read/write data; ESock v1.5 calls down to the v1.5 itf (RMBufChain). 
   1.635 -// v1.5-ready protocols implement this, laggard protocols inherit these base class
   1.636 -// implementations which call the v1.0 descriptor itf instead. 
   1.637 -
   1.638 -	/** Sends data onto the network via the protocol.
   1.639 -	
   1.640 -	Connection-oriented sockets must be in a connected state (that is ConnectComplete() has 
   1.641 -	been called on their MSocketNotify before Write() is called).
   1.642 -	 
   1.643 -	The socket server keeps track of how much data is waiting and then tries to send it all 
   1.644 -	until the protocol tells it to hold off by returning 0 (datagram sockets) or 'less than 
   1.645 -	all data consumed' (stream sockets) to Write(). The protocol should call CanSend() when it 
   1.646 -	is ready to send more data.
   1.647 -	
   1.648 -	anAddr is the address to write the data to.	Connection oriented sockets always use the 
   1.649 -	default value.
   1.650 -	
   1.651 -	@param aDesc The data to be sent.
   1.652 -	@param aOptions Protocol specific options.
   1.653 -	@param anAddr Address to write the data to.
   1.654 -	
   1.655 -	@returns For stream-oriented protocols the return value is the number of bytes actually written. 
   1.656 -	If this is less than the length of the descriptor then the protocol should call CanSend() 
   1.657 -	when it is ready to send more data. For datagram-oriented protocols, the write should return 
   1.658 -	either 0 if the write cannot be completed, or the length of the descriptor if the write succeeds - 
   1.659 -	no other values are valid. If the Write() must return 0, then it should call CanSend() when it is 
   1.660 -	ready to send more data. If the Write() fails due to some error, then it should call Error() with 
   1.661 -	an informative error number.
   1.662 -	*/
   1.663 -	IMPORT_C virtual TUint Write(const TDesC8& aDesc,TUint options, TSockAddr* anAddr=NULL);
   1.664 -	/** Sends data onto the network via the protocol.
   1.665 -	
   1.666 -	Connection-oriented sockets must be in a connected state (that is ConnectComplete() has 
   1.667 -	been called on their MSocketNotify before Write() is called).
   1.668 -	 
   1.669 -	The socket server keeps track of how much data is waiting and then tries to send it all 
   1.670 -	until the protocol tells it to hold off by returning 0 (datagram sockets) or 'less than 
   1.671 -	all data consumed' (stream sockets) to Write(). The protocol should call CanSend() when it 
   1.672 -	is ready to send more data.
   1.673 -	
   1.674 -	anAddr is the address to write the data to.	Connection oriented sockets always use the 
   1.675 -	default value.
   1.676 -	
   1.677 -	@param aData The data to be sent.
   1.678 -	@param aOptions Protocol specific options.
   1.679 -	@param anAddr Address to write the data to.
   1.680 -	
   1.681 -	@returns For stream-oriented protocols the return value is the number of bytes actually written. 
   1.682 -	If this is less than the length of the descriptor then the protocol should call CanSend() 
   1.683 -	when it is ready to send more data. For datagram-oriented protocols, the write should return 
   1.684 -	either 0 if the write cannot be completed, or the length of the descriptor if the write succeeds - 
   1.685 -	no other values are valid. If the Write() must return 0, then it should call CanSend() when it is 
   1.686 -	ready to send more data. If the Write() fails due to some error, then it should call Error() with 
   1.687 -	an informative error number.
   1.688 -	*/
   1.689 -	IMPORT_C virtual TInt Write(RMBufChain& aData, TUint aOptions, TSockAddr* anAddr=NULL);
   1.690 -
   1.691 -	/** Gets data which the protocol has indicated is waiting in its buffers using the NewData 
   1.692 -	up-call on the MSocketNotify. 
   1.693 -	
   1.694 -	GetData() will only ever be called for as much data as the protocol has specified it can process 
   1.695 -	using the NewData up-call. 
   1.696 -	
   1.697 -	For stream oriented protocols GetData() should fill the descriptor with data from the stream. On 
   1.698 -	a datagram protocol GetData() should copy one datagram into the descriptor and set the length of 
   1.699 -	the descriptor. If a full datagram will not fit into the supplied descriptor, the overflow should 
   1.700 -	be discarded. 
   1.701 -	
   1.702 -	anAddr should be filled in by the protocol with the address of where the data came from.
   1.703 -	
   1.704 -	@param aDesc  The buffer for data.
   1.705 -	@param aOptions Protocol specific options.
   1.706 -	@param anAddr Address where the data came from.
   1.707 -	*/
   1.708 -	IMPORT_C virtual void GetData(TDes8& aDesc,TUint options,TSockAddr* anAddr=NULL);
   1.709 -	/** Gets data which the protocol has indicated is waiting in its buffers using the NewData 
   1.710 -	up-call on the MSocketNotify. 
   1.711 -	
   1.712 -	GetData() will only ever be called for as much data as the protocol has specified it can process 
   1.713 -	using the NewData up-call. 
   1.714 -	
   1.715 -	For stream oriented protocols GetData() should fill the descriptor with data from the stream. On 
   1.716 -	a datagram protocol GetData() should copy one datagram into the descriptor and set the length of 
   1.717 -	the descriptor. If a full datagram will not fit into the supplied descriptor, the overflow should 
   1.718 -	be discarded. 
   1.719 -	
   1.720 -	anAddr should be filled in by the protocol with the address of where the data came from.
   1.721 -	
   1.722 -	@param aDesc  The buffer for data.
   1.723 -	@param aOptions Protocol specific options.
   1.724 -	@param anAddr Address where the data came from.
   1.725 -	*/
   1.726 -	IMPORT_C virtual TInt GetData(RMBufChain& aData, TUint aLength, TUint aOptions, TSockAddr* anAddr=NULL);
   1.727 -
   1.728 -	/**  Use the class instance argument to perform security policy checks on the originating client process.
   1.729 -	
   1.730 -	This method is called when a SAP is created and when a socket is transferred between sessions.  The SAP is
   1.731 -	required to check whether the originating client process has enough privileges to request services from the SAP.
   1.732 -	The MProvdSecurityChecker class instance is used to perform security policy checks.  The SAP may choose
   1.733 -	to perform a security policy check in its SecurityCheck(...) method, or it may choose to store the
   1.734 -	MProvdSecurityChecker class instance argument and perform checking later (i.e. when subsequent
   1.735 -	SAP methods are called).
   1.736 -	
   1.737 -	@param aSecurityChecker Pointer to class used by SAP to perform security checks on the client process.  This
   1.738 -	pointer becomes invalid when the SAP is destroyed or detached.
   1.739 -	@returns KErrPermissionDenied if SAP wishes to disallow access to the client, else KErrNone.  This would
   1.740 -	normally be as a result of calling MProvdSecurityChecker::CheckPolicy(...) with a suitable security policy argument.
   1.741 -	*/
   1.742 -	IMPORT_C virtual TInt SecurityCheck(MProvdSecurityChecker *aSecurityChecker);
   1.743 -	
   1.744 -protected:
   1.745 -	/** On socket creation, the socket server sets this member to point to a server 
   1.746 -	notification interface. */
   1.747 -	MSocketNotify* iSocket;
   1.748 -private:
   1.749 -	//V1.0 interface support specifics
   1.750 -	HBufC8* iV1ShimDataIn;
   1.751 -	HBufC8* iV1ShimDataOut;
   1.752 -	TUint iSockType;
   1.753 -	};
   1.754 -
   1.755 -class CProtocolBase;
   1.756 -class CResolverProvdBase : public CBase
   1.757 -/**
   1.758 -@publishedPartner
   1.759 -@released
   1.760 -*/
   1.761 -	{
   1.762 -	friend class ProtocolManager;
   1.763 -public:
   1.764 -	inline void SetNotify(MResolverNotify* aNotifier);
   1.765 -
   1.766 -	/**
   1.767 -	@internalComponent
   1.768 -	*/
   1.769 -	virtual void CancelCurrentOperation()=0;
   1.770 -
   1.771 -	/**  Use the class instance argument to perform security policy checks on the originating client process.
   1.772 -	
   1.773 -	This method is called when a resolver is created.  The resolver is required to check whether the originating
   1.774 -	client process has enough privileges to request services from the resolver.  The MProvdSecurityChecker
   1.775 -	class instance is used to perform security policy checks.  The resolver may choose to perform a security
   1.776 -	policy check in its SecurityCheck(...) method, or it may choose to store the MProvdSecurityChecker class
   1.777 -	instance argument and use it to perform checking later (i.e. when subsequent resolver methods are called).
   1.778 -	
   1.779 -	@param aSecurityChecker Pointer to class used by resolver to perform security checks on the client process.  This
   1.780 -	pointer becomes invalid when the resolver is destroyed or detached.
   1.781 -	@returns KErrPermissionDenied if resolver wishes to disallow access to the client, else KErrNone.  This would
   1.782 -	normally be as a result of calling MProvdSecurityChecker::CheckPolicy(...) with a suitable security policy argument.
   1.783 -	*/
   1.784 -	IMPORT_C virtual TInt SecurityCheck(MProvdSecurityChecker *aSecurityChecker);
   1.785 -	
   1.786 -protected:
   1.787 -	MResolverNotify* iNotify;
   1.788 -private:
   1.789 -	CProtocolBase* iProtocol;
   1.790 -	};
   1.791 -
   1.792 -class CHostResolvProvdBase : public CResolverProvdBase
   1.793 -/**
   1.794 -Provides Host name resolver service
   1.795 -@publishedPartner
   1.796 -@released
   1.797 -*/
   1.798 -	{
   1.799 -	friend class ProtocolManager;
   1.800 -public:
   1.801 -
   1.802 -	/**
   1.803 -	Get the Host name by name
   1.804 -	@param aName, results of name queries
   1.805 -	*/
   1.806 -	virtual void GetByName(TNameRecord& aName)=0;
   1.807 -
   1.808 -	/**
   1.809 -	Gets the Host name by address
   1.810 -	@param aName, results of name queries
   1.811 -	*/
   1.812 -	virtual void GetByAddress(TNameRecord& aName)=0;
   1.813 -
   1.814 -	/**
   1.815 -	Sets the Host name
   1.816 -	@param aNameBuf, name to set
   1.817 -	*/
   1.818 -	virtual void SetHostName(TDes& aNameBuf)=0;
   1.819 -
   1.820 -	/**
   1.821 -	Gets the Host name 
   1.822 -	@param aNameBuf, name to retrieve
   1.823 -	*/
   1.824 -	virtual void GetHostName(TDes& aNameBuf)=0;
   1.825 -	IMPORT_C virtual TInt SetOption(TUint level,TUint name,const TDesC8& anOption);
   1.826 -    IMPORT_C virtual void Query(const TDesC8& aQryBuf, TDes8& aResBuf, TInt aCounter);
   1.827 -	};
   1.828 -
   1.829 -class CServiceResolvProvdBase : public CResolverProvdBase
   1.830 -/**
   1.831 -@publishedPartner
   1.832 -@released
   1.833 -*/
   1.834 -	{
   1.835 -	friend class ProtocolManager;
   1.836 -public:
   1.837 -	
   1.838 -	/**
   1.839 -	Get the Host name by name
   1.840 -	@param aName, results of name queries
   1.841 -	*/
   1.842 -	virtual void GetByName(const TDesC& aNameBuf,TInt32& aPortNum)=0;
   1.843 -	
   1.844 -	/**
   1.845 -	Gets the Host name by address
   1.846 -	@param aName, results of name queries
   1.847 -	*/
   1.848 -	virtual void GetByNumber(TDes& aNameBuf,TInt32 aPortNum)=0;
   1.849 -	
   1.850 -	/**
   1.851 -	Sets the Host name
   1.852 -	@param aNameBuf, name to set
   1.853 -	*/
   1.854 -	virtual void RegisterService(const TDesC& aNameBuf,TInt32 aPortNum)=0;
   1.855 -	
   1.856 -	/**
   1.857 -	Gets the Host name 
   1.858 -	@param aNameBuf, name to retrieve
   1.859 -	*/
   1.860 -	virtual void RemoveService(const TDesC& aNameBuf,TInt32 aPortNum)=0;
   1.861 -	};
   1.862 -
   1.863 -class CNetDBProvdBase : public CResolverProvdBase
   1.864 -/**
   1.865 -Provides network Database access
   1.866 -@publishedPartner
   1.867 -@released
   1.868 -*/
   1.869 -	{
   1.870 -	friend class ProtocolManager;
   1.871 -public:
   1.872 -	virtual void Query(TDes8& aBuffer)=0;
   1.873 -	virtual void Add(TDes8& aBuffer)=0;
   1.874 -	virtual void Remove(TDes8& aBuffer)=0;
   1.875 -	};
   1.876 -
   1.877 -/**
   1.878 -Definition of argument to CConnectionProvdBase::SetUsageProfile()
   1.879 -Bitmap masks
   1.880 -
   1.881 -@internalTechnology
   1.882 -*/
   1.883 -const TUint KConnProfileNone = 0;
   1.884 -
   1.885 -/**
   1.886 -Definition of argument to CConnectionProvdBase::SetUsageProfile()
   1.887 -Bitmap masks
   1.888 -
   1.889 -@internalTechnology
   1.890 -*/
   1.891 -const TUint KConnProfileLong = 1;
   1.892 -
   1.893 -/**
   1.894 -Definition of argument to CConnectionProvdBase::SetUsageProfile()
   1.895 -Bitmap masks
   1.896 -
   1.897 -@internalTechnology
   1.898 -*/
   1.899 -const TUint KConnProfileMedium = 2;
   1.900 -
   1.901 -class TConnPref;
   1.902 -class CSubConnectionProviderBase;
   1.903 -class CNifIfBase;
   1.904 -
   1.905 -class CConnectionProvdBase : public CBase
   1.906 -/**
   1.907 - * Base class for connection providers (currently nifman)
   1.908 - * @internalTechnology
   1.909 - */
   1.910 -	{
   1.911 -	friend class ProtocolManager;
   1.912 -	friend class CConnection;
   1.913 -	friend class CConnectionSettingsShim; //to access the virtual "Do" db functions directly
   1.914 -public:
   1.915 -	IMPORT_C virtual ~CConnectionProvdBase();
   1.916 -
   1.917 -	IMPORT_C TUint Id() const;
   1.918 -	IMPORT_C void SetConnectionProviderClient(MConnectionNotify* aClient);
   1.919 -	MConnectionNotify* ConnectionProviderClient();
   1.920 -
   1.921 -
   1.922 -	// SubConnectionProvider Management
   1.923 -	void JoinL(CSubConnectionProviderBase& aSubConnProvider);
   1.924 -	void Leave(CSubConnectionProviderBase& aSubConnProvider);
   1.925 -
   1.926 -	virtual void StartL(TConnStartType aConnectType, const RMessagePtr2* aMessage) = 0;
   1.927 -	virtual void StartL(TConnStartType aConnectType, const TConnPref& aPref, const RMessagePtr2* aMessage) = 0;
   1.928 -	virtual void AttachToConnectionL(const TDesC8& aConnectionInfo, TBool aMonitorAttach, const RMessagePtr2* aMessage) = 0;
   1.929 -	virtual TInt Stop(TInt aError, const RMessagePtr2* aMessage) = 0;
   1.930 -	virtual void ProgressL(TNifProgressBuf& aBuffer) const = 0;
   1.931 -	virtual void ProgressL(TSubConnectionUniqueId aSubConnectionUniqueId, TNifProgressBuf& aBuffer) const = 0;
   1.932 -	virtual void LastProgressError(TNifProgressBuf& aBuffer) = 0;
   1.933 -	virtual void RequestServiceChangeNotificationL() = 0;
   1.934 -	virtual void CancelServiceChangeNotification() = 0;
   1.935 -	virtual void EnumerateConnectionsL(RPointerArray<TConnectionInfo>& aConnectionInfoPtrArray) = 0;
   1.936 -	virtual TBool AllInterfaceNotificationL() = 0;
   1.937 -	virtual void ControlL(TUint aOptionLevel, TUint aOptionName, TDes8& aOption, const RMessagePtr2* aMessage) = 0;
   1.938 -	virtual void SetUsageProfile(TUint aProfile) = 0;
   1.939 -
   1.940 -	/**
   1.941 -	Stop the specified subconnection
   1.942 -
   1.943 -	@param aSubConnectionUniqueId The id of the subconnection to be stopped
   1.944 -	@param aError The error code to be propogated to the clients of the subconnection
   1.945 -	*/
   1.946 -	virtual TInt Stop(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aError, const RMessagePtr2* aMessage)=0;
   1.947 -
   1.948 -	/**
   1.949 -	Find out the number of subconnetions on a connection
   1.950 -
   1.951 -	@param aCount On return, contains the number of subconnections
   1.952 -	*/
   1.953 -	virtual TInt EnumerateSubConnections(TUint& aCount)=0;
   1.954 -
   1.955 -	/**
   1.956 -	Get information about a subconnection specified only by generic index
   1.957 -
   1.958 -	@param aIndex 
   1.959 -	@param aSubConnectionInfo An appropriate SubConnectionInfo-derived class; on return, this is filled in
   1.960 -	*/
   1.961 -	virtual TInt GetSubConnectionInfo(TUint aIndex, TDes8& aSubConnectionInfo)=0;
   1.962 -
   1.963 -	/**
   1.964 -	Get information about a subconnection specifed by its unique id
   1.965 -
   1.966 -	@param aSubConnectionInfo An appropriate SubConnectionInfo-derived class containing a valid TSubConnectionUniqueId; on return, this is filled in
   1.967 -	*/
   1.968 -	virtual TInt GetSubConnectionInfo(TDes8& aSubConnectionInfo)=0;
   1.969 -
   1.970 -	/**	
   1.971 -	Register for all subconnection notifications
   1.972 -	*/
   1.973 -	virtual TInt AllSubConnectionNotificationEnable()=0;
   1.974 -
   1.975 -	/**
   1.976 -	Cancel registration for AllSubConnectionNotification	
   1.977 -	*/
   1.978 -	virtual TInt CancelAllSubConnectionNotification()=0;
   1.979 -
   1.980 -	/**
   1.981 -	Find out how much data has been sent and received
   1.982 -
   1.983 -	@param aSubConnectionUniqueId The id of the subconnection to which this request refers
   1.984 -	@param aUplinkVolume The total number of bytes sent on this subconnection
   1.985 -	@param aDownlinkVolume The total number of bytes received on this subconnection
   1.986 -	*/
   1.987 -	virtual TInt DataTransferred(TSubConnectionUniqueId aSubConnectionUniqueId, TUint& aUplinkVolume, TUint& aDownlinkVolume)=0;
   1.988 -
   1.989 -	/**
   1.990 -	Cancel a request for the amount of data sent and received
   1.991 -
   1.992 -	@param aSubConnectionUniqueId The id of the subconnection that this request refers to
   1.993 -	@note At present this method is never called, as this is a synchronous operation on the server side
   1.994 -	*/
   1.995 -	virtual TInt DataTransferredCancel(TSubConnectionUniqueId aSubConnectionUniqueId)=0;
   1.996 -
   1.997 -	/**
   1.998 -	Make a request for notifications about data sent at the specifed granularity on a specified subconnection
   1.999 -
  1.1000 -	@param aSubConnectionUniqueId The id of the subconnection to which this request refers
  1.1001 -	@param aUplinkGranularity The granularity in bytes at which notifications should be sent
  1.1002 -	*/
  1.1003 -	virtual TInt SetDataSentNotificationGranularity(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aUplinkGranularity)=0;
  1.1004 -
  1.1005 -	/**
  1.1006 -	Cancel a request for notifications about data sent on a specified subconnection
  1.1007 -
  1.1008 -	@param aSubConnectionUniqueId The id of the subconnection to which this request refers
  1.1009 -	*/
  1.1010 -	virtual TInt DataSentNotificationCancel(TSubConnectionUniqueId aSubConnectionUniqueId)=0;
  1.1011 -
  1.1012 -	/**
  1.1013 -	Make a request for notifications about data received at the specifed granularity on a specified subconnection
  1.1014 -
  1.1015 -	@param aSubConnectionUniqueId The id of the subconnection to which this request refers
  1.1016 -	@param aDownlinkGranularity The granularity in bytes at which notifications should be sent
  1.1017 -	*/
  1.1018 -	virtual TInt SetDataReceivedNotificationGranularity(TSubConnectionUniqueId aSubConnectionUniqueId, TUint aDownlinkGranularity)=0;
  1.1019 -
  1.1020 -	/**
  1.1021 -	Cancel a request for notifications about data received on a specified subconnection
  1.1022 -
  1.1023 -	@param aSubConnectionUniqueId The id of the subconnection to which this request refers
  1.1024 -	*/
  1.1025 -	virtual TInt DataReceivedNotificationCancel(TSubConnectionUniqueId aSubConnectionUniqueId)=0;
  1.1026 -
  1.1027 -   /**
  1.1028 -    * SendIoctlMessageL forwards Ioctl request to the target
  1.1029 -    * Important - message has to be completed by the target. There is no notification back
  1.1030 -    *       to the caller => meant for forwarding Ioctl messages the forwarding path is not really
  1.1031 -    *       interested in apart from "routing informations"
  1.1032 -    * @param aMessage forwarded message (it's the caller's resposibility to forward just Ioctl
  1.1033 -    *                   messages)
  1.1034 -    */
  1.1035 -   	virtual void SendIoctlMessageL(const RMessage2& aMessage) = 0;
  1.1036 -   	virtual void SendCancelIoctl() = 0;
  1.1037 -   	
  1.1038 -//PREQ399_REMOVE
  1.1039 -#ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
  1.1040 -    virtual CNifIfBase* GetNif(TInt aIndex) = 0;
  1.1041 -#endif
  1.1042 -//SYMBIAN_NETWORKING_3GPPDEFAULTQOS //PREQ399_REMOVE
  1.1043 -
  1.1044 -	IMPORT_C void GetBoolSettingL(const TDesC& aSettingName, TBool& aValue );
  1.1045 -	IMPORT_C void GetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage );
  1.1046 -	IMPORT_C void GetDes16SettingL(const TDesC& aSettingName, TDes16& aValue );
  1.1047 -	IMPORT_C void GetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage );
  1.1048 -	IMPORT_C void GetDes8SettingL(const TDesC& aSettingName, TDes8& aValue );
  1.1049 -	IMPORT_C void GetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage );
  1.1050 -	IMPORT_C void GetIntSettingL(const TDesC& aSettingName, TUint32& aValue );
  1.1051 -	IMPORT_C void GetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage );
  1.1052 -	IMPORT_C HBufC* GetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage );
  1.1053 -	IMPORT_C HBufC* GetLongDesSettingLC(const TDesC& aSettingName );
  1.1054 -
  1.1055 -protected:
  1.1056 -	IMPORT_C CConnectionProvdBase(TUint aId);
  1.1057 -	IMPORT_C void CreateL(MConnectionNotify* aConnection);
  1.1058 -
  1.1059 -	virtual void DoGetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage ) = 0;
  1.1060 -	virtual void DoGetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage ) = 0;
  1.1061 -	virtual void DoGetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage ) = 0;
  1.1062 -	virtual void DoGetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage ) = 0;
  1.1063 -	virtual HBufC* DoGetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage ) = 0;
  1.1064 -
  1.1065 -protected:
  1.1066 -	MConnectionNotify* iConnection;
  1.1067 -	RPointerArray<CSubConnectionProviderBase> iSubConnProviders;
  1.1068 -	TUint iId;
  1.1069 -	};
  1.1070 -
  1.1071 -class CProtocolFamilyBase;
  1.1072 -class RMBufChain;
  1.1073 -class CProtocolRef;
  1.1074 -class CProtocolBase : public CBase
  1.1075 -/** Protocols created by protocol families must be instances of sub-classes of 
  1.1076 -the abstract CProtocolBase.
  1.1077 -@publishedPartner
  1.1078 -@released Since v5.0 */
  1.1079 -	{
  1.1080 -	friend class ProtocolManager;
  1.1081 -	friend class CProtocolRef;
  1.1082 -
  1.1083 -public:
  1.1084 -	IMPORT_C virtual CServProviderBase* NewSAPL(TUint aProtocol);
  1.1085 -	IMPORT_C virtual CHostResolvProvdBase* NewHostResolverL();
  1.1086 -	IMPORT_C virtual CServiceResolvProvdBase* NewServiceResolverL();
  1.1087 -	IMPORT_C virtual CNetDBProvdBase* NewNetDatabaseL();
  1.1088 -	IMPORT_C CProtocolBase();
  1.1089 -	IMPORT_C virtual ~CProtocolBase();
  1.1090 -	CProtocolFamilyBase* ProtocolFamily();
  1.1091 -	IMPORT_C virtual void Close();
  1.1092 -	IMPORT_C virtual void Open();
  1.1093 -	IMPORT_C virtual void CloseNow();
  1.1094 -	IMPORT_C virtual void StartSending(CProtocolBase* aProtocol);	// Up
  1.1095 -	IMPORT_C TPtrC Tag();
  1.1096 -	IMPORT_C virtual void InitL(TDesC& aTag);	// From ProtocolManager before all binding.
  1.1097 -	IMPORT_C virtual void StartL();	// From Protocol Manager - after all binding
  1.1098 -	IMPORT_C virtual void BindL(CProtocolBase* protocol, TUint id);	// From higher protocol
  1.1099 -	IMPORT_C virtual void BindToL(CProtocolBase* protocol);	// From Protocol Manager
  1.1100 -	IMPORT_C virtual TInt Send(RMBufChain& aPDU,CProtocolBase* aSourceProtocol=NULL);	// Down
  1.1101 -	IMPORT_C virtual TInt Send(TDes8& aPDU,TSockAddr* to,TSockAddr* from=NULL,CProtocolBase* aSourceProtocol=NULL);	// Done
  1.1102 -	IMPORT_C virtual void Process(RMBufChain&,CProtocolBase* aSourceProtocol=NULL);	// Up
  1.1103 -	IMPORT_C virtual void Process(TDes8& aPDU,TSockAddr* from,TSockAddr* to=NULL,CProtocolBase* aSourceProtocol=NULL);	// Up
  1.1104 -	IMPORT_C virtual TInt GetOption(TUint level,TUint name,TDes8& option,CProtocolBase* aSourceProtocol=NULL);	// Down
  1.1105 -	IMPORT_C virtual TInt SetOption(TUint level,TUint name,const TDesC8& option,CProtocolBase* aSourceProtocol=NULL);	// Down
  1.1106 -	IMPORT_C virtual void Error(TInt anError,CProtocolBase* aSourceProtocol=NULL);	// Up
  1.1107 -
  1.1108 -// Pure virtual
  1.1109 -	/** Fills in the passed TServerProtocolDesc with data describing the protocol. 
  1.1110 -	
  1.1111 -	@param aProtocolDesc Protocol description object to fill in */
  1.1112 -	virtual void Identify(TServerProtocolDesc* aProtocolDesc)const =0;	// from anyone.
  1.1113 -
  1.1114 -	inline TInt RefCount() const;
  1.1115 -protected:
  1.1116 -	IMPORT_C void CanClose();	// Up
  1.1117 -private:
  1.1118 -	void TryDelete();
  1.1119 -protected:
  1.1120 -//	TProtocolDesc iDesc;
  1.1121 -private:
  1.1122 -	CProtocolRef* iManagerRef;
  1.1123 -	TInt iRefCount;
  1.1124 -	};
  1.1125 -
  1.1126 -class CProtocolFamilyRef;
  1.1127 -class CLibUnloader;
  1.1128 -class CConnection;
  1.1129 -class CConnectionProvdBase;
  1.1130 -class CProtocolFamilyBase : public CBase
  1.1131 -/** Defines the interface for protocol families. 
  1.1132 -
  1.1133 -Protocol families must:
  1.1134 -
  1.1135 -be able to identify the protocols which they can create
  1.1136 -
  1.1137 -be able to create instances of protocol objects for all the protocols they 
  1.1138 -advertise 
  1.1139 -
  1.1140 -@publishedPartner
  1.1141 -@released */
  1.1142 -	{
  1.1143 -friend class ProtocolManager;
  1.1144 -friend class CProtocolFamilyRef;
  1.1145 -public:
  1.1146 -	IMPORT_C virtual ~CProtocolFamilyBase();
  1.1147 -	IMPORT_C CProtocolFamilyBase();
  1.1148 -	IMPORT_C virtual void Close();
  1.1149 -	IMPORT_C virtual void Open();
  1.1150 -	IMPORT_C virtual TInt Remove();
  1.1151 -	IMPORT_C virtual TBool QueryVersionSupported(const TVersion& aVer) const;
  1.1152 -
  1.1153 -	void SetLibraryL(RLibrary& aLib);
  1.1154 -
  1.1155 -	// Pure virtual
  1.1156 -	/** Initialises a protocol family. 
  1.1157 -	
  1.1158 -	After the CProtocolFamilyBase-derived object has been created, the first function 
  1.1159 -	called by the socket server on that object is Install(). It is at this point that the
  1.1160 -	CProtocolFamilyBase-derived object should perform any initialisation which it needs.
  1.1161 -	
  1.1162 -	@return System-wide error code */
  1.1163 -	virtual TInt Install()=0;
  1.1164 -	/** Creates a new protocol object. 
  1.1165 -	
  1.1166 -	During socket creation, after the socket server has called Open() on a protocol family, 
  1.1167 -	it next calls this function to create an instance of a CProtocolBase-derived object - 
  1.1168 -	the protocol itself.
  1.1169 -	
  1.1170 -	@param aSockType A supported socket type for the protocol family as advertised 
  1.1171 -	in the protocol list. 
  1.1172 -	@param aProtocol A protocol number specifying a protocol returned by ProtocolList(). 
  1.1173 -	
  1.1174 -	@return A protocol, or NULL if some error has prevented the protocol from being 
  1.1175 -	created. */
  1.1176 -	virtual CProtocolBase * NewProtocolL(TUint aSockType,TUint aProtocol)=0;
  1.1177 -	/** Gets a list of supported protocols. 
  1.1178 -	
  1.1179 -	Called during initialisation, directly after Install(). ProtocolList() returns a list 
  1.1180 -	of all the protocols in the protocol family. The protocol family object should allocate 
  1.1181 -	memory to hold an array of TServerProtocolDesc structures. This function should then 
  1.1182 -	fill them in and return the pointer and a count of the number of protocols 
  1.1183 -	supported. The socket server caches this information, so that it does not 
  1.1184 -	need to keep the protocol module loaded.
  1.1185 -	
  1.1186 -	The protocol family should not attempt to use static data (which it can't) 
  1.1187 -	or to free this memory later, as the socket server will automatically free 
  1.1188 -	this storage.
  1.1189 -	
  1.1190 -	@param aProtocolList This pointer is set to point to memory allocated by the 
  1.1191 -	protocol family and filled in as described above 
  1.1192 -	@return The number of protocols in this protocol family (and entries in the 
  1.1193 -	list of protocols) */
  1.1194 -	virtual TUint ProtocolList(TServerProtocolDesc*& aProtocolList)=0;
  1.1195 -
  1.1196 -	inline TInt RefCount() const;
  1.1197 -
  1.1198 -protected:
  1.1199 -
  1.1200 -	/** Contains version information */
  1.1201 -	TVersion iVersion;
  1.1202 -private:
  1.1203 -	TInt iRefCount;
  1.1204 -	CLibUnloader* iLibUnloader;
  1.1205 -	CProtocolFamilyRef* iManagerRef;
  1.1206 -	};
  1.1207 -
  1.1208 -/**
  1.1209 -@publishedPartner
  1.1210 -@released
  1.1211 -*/
  1.1212 -typedef CProtocolFamilyBase* (*TProtocolNew)();
  1.1213 -
  1.1214 -
  1.1215 -class SocketTimer 
  1.1216 -/**
  1.1217 -@internalComponent
  1.1218 -*/
  1.1219 -	{
  1.1220 -public:
  1.1221 -	IMPORT_C static void Queue(TTimeIntervalMicroSeconds32 aTimeInMicroSeconds,TDeltaTimerEntry& aTimer);
  1.1222 -	IMPORT_C static void Remove(TDeltaTimerEntry& aTimer);
  1.1223 -	};
  1.1224 -
  1.1225 -class SocketServExt
  1.1226 -/**
  1.1227 -@internalTechnology
  1.1228 -*/
  1.1229 -    {
  1.1230 -public:
  1.1231 -	IMPORT_C static CProtocolBase* FindAndLoadProtocolL(const TDesC& aName, TProtocolType aType=ENormalProtocol);
  1.1232 -	IMPORT_C static CProtocolBase* FindAndLoadProtocolL(TUint aAddrFamily, TUint aSockType, TUint aProtocol);
  1.1233 -	IMPORT_C static void InstallExtensionL(const TDesC& aDllName, const TDesC& aArgs);
  1.1234 -	IMPORT_C static void OpenSession();
  1.1235 -	IMPORT_C static void CloseSession();
  1.1236 -	IMPORT_C static void InstallSchedulerWaitHook(TCallBack* aCall);
  1.1237 -	};
  1.1238 -
  1.1239 -class CSocketServExtRef;
  1.1240 -class CSocketServExtBase : public CBase
  1.1241 -/**
  1.1242 -Base class for extensions
  1.1243 -
  1.1244 -@internalTechnology
  1.1245 -*/
  1.1246 -	{
  1.1247 -public:
  1.1248 -	IMPORT_C virtual ~CSocketServExtBase();
  1.1249 -protected:
  1.1250 -	IMPORT_C CSocketServExtBase();
  1.1251 -public:	
  1.1252 -	virtual void InstallL(const TDesC& aArgs)=0;
  1.1253 -	virtual void Remove()=0;
  1.1254 -	//
  1.1255 -private:
  1.1256 -	friend class CSocketServExtRef;
  1.1257 -	CSocketServExtRef* iExtRef;
  1.1258 -	};
  1.1259 -
  1.1260 -
  1.1261 -/**
  1.1262 -KSoOwnerInfo
  1.1263 -
  1.1264 -Definition for internal SetOption() from ESock to Provider to communicate
  1.1265 -socket owner information.
  1.1266 -
  1.1267 -@internalTechnology
  1.1268 -@released
  1.1269 -*/
  1.1270 -const TInt KSOLProvider = 2;
  1.1271 -
  1.1272 -const TUint KSoOwnerInfo = 1 | KSocketInternalOptionBit;
  1.1273 -
  1.1274 -class TSoOwnerInfo
  1.1275 -/**
  1.1276 -Class used to communicate the owner of a socket from ESOCK to Provider.
  1.1277 -@internalTechnology
  1.1278 -*/
  1.1279 -	{
  1.1280 -public:
  1.1281 -	TUidType	iUid;
  1.1282 -	};
  1.1283 -
  1.1284 -/**
  1.1285 -KSoConnectionInfo
  1.1286 -
  1.1287 -Definition for internal SetOption() from ESock to Provider to communicate
  1.1288 -connection selection information.  Note that the information is opaque
  1.1289 -to ESock and comes from Nifman in the form of a TSoIfConnectionInfo class.
  1.1290 -@internalTechnology
  1.1291 -*/
  1.1292 -const TInt KSoConnectionInfo = 2 | KSocketInternalOptionBit;
  1.1293 -
  1.1294 -/**
  1.1295 -UID of Protocol Modules
  1.1296 -@publishedPartner
  1.1297 -@released */
  1.1298 -const TInt KUidProtocolModule = 0x1000004A;
  1.1299 -
  1.1300 -/**
  1.1301 -UID of Unicode Protocol Modules
  1.1302 -
  1.1303 -@internalTechnology
  1.1304 -*/
  1.1305 -const TInt KUidUnicodeProtocolModule = 0x10003d38;
  1.1306 -
  1.1307 -/** @internalTechnology */
  1.1308 -const TInt KUidEsockExtension = 0x10000387;
  1.1309 -
  1.1310 -#include <es_prot.inl>
  1.1311 -
  1.1312 -#endif