plugins/networking/winsockprt/inc/wsp_protocol.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // wsp_protocol.h
       
     2 // 
       
     3 // Copyright (c) 2002 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // 
       
     9 // Initial Contributors:
       
    10 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #ifndef __WSP_PROTOCOL_H__
       
    14 #define __WSP_PROTOCOL_H__
       
    15 
       
    16 #undef SYMBIAN_ENABLE_SPLIT_HEADERS // More tb92 stopgaps, this time for MNifIfUser in nifman.h/nifman_internal.h
       
    17 #include <es_prot.h>
       
    18 #include <comms-infras/nifif.h>
       
    19 
       
    20 class RWin32Factory;
       
    21 
       
    22 class CWinSockProviderBase;
       
    23 
       
    24 class CWinSockProtocol : public CProtocolBase, public MNifIfUser
       
    25 	{
       
    26 public:
       
    27 	~CWinSockProtocol();
       
    28 	static CWinSockProtocol* NewL(TUint aSocketType, RWin32Factory& aWin32Factory);
       
    29 	static void ProtocolIdentity(TServerProtocolDesc* aDesc, TUint aSocketType, TUint aProtocol);
       
    30 public: // From CProtocolBase.
       
    31 	CServProviderBase* NewSAPL(TUint aProtocol);
       
    32 	void Identify(TServerProtocolDesc*) const;
       
    33 	virtual CHostResolvProvdBase* NewHostResolverL();
       
    34 	virtual CServiceResolvProvdBase* NewServiceResolverL();
       
    35 	virtual CNetDBProvdBase* NewNetDatabaseL();
       
    36 	void BindL(CProtocolBase* aProtocol, TUint anId);
       
    37 	virtual void BindToL(CProtocolBase* protocol);
       
    38 	TInt Send(RMBufChain&, CProtocolBase* aSourceProtocol);
       
    39 	void Process(RMBufChain&, CProtocolBase* aSourceProtocol);
       
    40 	TInt Send(TDes8&, TSockAddr* to, TSockAddr* from, CProtocolBase* aSourceProtocol);
       
    41 	void Process(TDes8&, TSockAddr* from, TSockAddr* to, CProtocolBase* aSourceProtocol);
       
    42 	TInt GetOption(TUint level, TUint name, TDes8& anOption, CProtocolBase* aSourceProtocol);
       
    43 	TInt SetOption(TUint level, TUint name, const TDesC8& option, CProtocolBase* aSourceProtocol);
       
    44 	void Error(TInt anError, CProtocolBase* aSourceProtocol);
       
    45 private: // From MNifIfUser.
       
    46 	virtual void IfUserBindFailure(TInt aResult, TAny* aId);
       
    47 	virtual void IfUserNewInterfaceL(CNifIfBase* aIf, TAny* aId);
       
    48 	virtual void IfUserInterfaceDown(TInt aResult, CNifIfBase* aIf);
       
    49 	virtual void IfUserOpenNetworkLayer();
       
    50 	virtual void IfUserCloseNetworkLayer();
       
    51 	virtual CProtocolBase* IfUserProtocol();
       
    52  	virtual TBool IfUserIsNetworkLayerActive();
       
    53 private:
       
    54 	CWinSockProtocol(TUint aProtocol, RWin32Factory& aWin32Factory);
       
    55 private:
       
    56 	TUint iSocketType;
       
    57 	TUint iProtocol;
       
    58 	RWin32Factory& iWin32Factory;
       
    59 	};
       
    60 
       
    61 
       
    62 #endif // __WSP_PROTOCOL_H__