sipproviderplugins/sipprovider/sipdummyprt/src/SIPDummy.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 // Copyright (c) 2005-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 // Implementation file for SIP dummy PRT
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef SIPDUMMY_H
       
    24 #define SIPDUMMY_H
       
    25 
       
    26 #include <sipconnpref.h>
       
    27 
       
    28 //---------------------------------------------------------------------------------------------------------
       
    29 
       
    30 NONSHARABLE_CLASS(CDProtocolFamily): public CProtocolFamilyBase
       
    31 	{
       
    32 private:
       
    33 	CDProtocolFamily();	
       
    34 public:
       
    35 	static CDProtocolFamily * NewL();
       
    36 	TInt Install();
       
    37 	TInt Remove();
       
    38 	CProtocolBase * NewProtocolL(TUint aSockType,TUint aProtocol);
       
    39 	TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
       
    40 private:
       
    41 	TServerProtocolDesc iProtocolDescs[1];
       
    42 	};
       
    43 
       
    44 //---------------------------------------------------------------------------------------------------------
       
    45 
       
    46 NONSHARABLE_CLASS(CDummyProtocol): public CProtocolBase
       
    47 	{
       
    48 public:
       
    49 	CDummyProtocol(TServerProtocolDesc* aProtoDesc);
       
    50 	~CDummyProtocol();
       
    51 	static CDummyProtocol *NewL(TInt aProtocol, TServerProtocolDesc* aProtoDesc);
       
    52 	CServProviderBase *NewSAPL(TUint aProtocol);
       
    53 	virtual CHostResolvProvdBase *NewHostResolverL();
       
    54 	virtual CServiceResolvProvdBase *NewServiceResolverL();
       
    55 	virtual CNetDBProvdBase* NewNetDatabaseL();
       
    56 	TBool CanCreateSockets();
       
    57 	void InitL(TDesC& aTag);
       
    58 	void BindL(CProtocolBase *aProtocol, TUint anId);
       
    59 	virtual void BindToL(CProtocolBase *protocol);
       
    60 	void StartL(void);
       
    61 	TInt Send(RMBufChain &,CProtocolBase* aSourceProtocol);
       
    62 	void Process(RMBufChain &,CProtocolBase* aSourceProtocol);
       
    63 	TInt Send(TDes8 &, TSockAddr *to,TSockAddr *from,CProtocolBase* aSourceProtocol);
       
    64 	void Process(TDes8 & ,TSockAddr *from,TSockAddr *to,CProtocolBase* aSourceProtocol);
       
    65 	void Identify(TServerProtocolDesc *)const;
       
    66 	TInt GetOption(TUint level,TUint name,TDes8 &anOption,CProtocolBase* aSourceProtocol);
       
    67 	TInt SetOption(TUint level,TUint name,const TDesC8& option,CProtocolBase* aSourceProtocol);
       
    68 	void Error(TInt anError,CProtocolBase* aSourceProtocol);
       
    69 	TBool IsStarted(){return iIsStarted;}
       
    70 protected:
       
    71 	TInt iType;
       
    72 	TServerProtocolDesc* iProtoDesc;
       
    73 	TBool iIsStarted;
       
    74 	CArrayFixFlat<CProtocolBase *> iProtocols;
       
    75 	};
       
    76 
       
    77 
       
    78 
       
    79 
       
    80 
       
    81 #endif //SIPDUMMY_H