multimediacommsengine/tsrc/testdriver/siptester/ttcnresolverplugin2/src/ttcn2gresolverplugin.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CTTCN2GRESOLVERPLUGIN_H
       
    19 #define CTTCN2GRESOLVERPLUGIN_H
       
    20 
       
    21 // INCLUDES
       
    22 #include "sipclientsimulatorcli.h"
       
    23 #include <sipresolvedclient2.h>
       
    24 
       
    25 
       
    26 // CONSTANTS
       
    27 const TInt32 KTTCN2GResolverPluginUID = 0x101F5D42;
       
    28 
       
    29 // CLASS DEFINITION
       
    30 /**
       
    31  * CTTCN2GResolverPlugin implements a 2G plug-in 
       
    32  * for testing SIP Client Resolver with TTCN.
       
    33  */
       
    34 class CTTCN2GResolverPlugin : public CSIPResolvedClient2
       
    35 	{
       
    36 	public: // Constructors and destructor
       
    37 	
       
    38 		/**
       
    39 		* Constructor
       
    40 		* @return An initialized instance of this class.
       
    41 		*/
       
    42 		static CTTCN2GResolverPlugin* NewL();
       
    43 		
       
    44 		/**
       
    45 		* Destructor
       
    46 		*/
       
    47 		~CTTCN2GResolverPlugin();
       
    48     
       
    49     public: // From CSIPResolvedClient2
       
    50     
       
    51         TBool MatchAcceptContactsL(
       
    52             RStringF aMethod,
       
    53             const CUri8& aRequestUri,
       
    54             const RPointerArray<CSIPHeaderBase>& aHeaders,
       
    55             const TDesC8& aContent,
       
    56             const CSIPContentTypeHeader* aContentType,
       
    57             TUid& aClientUid);
       
    58 
       
    59         TBool MatchEventL(
       
    60             RStringF aMethod,
       
    61             const CUri8& aRequestUri,
       
    62             const RPointerArray<CSIPHeaderBase>& aHeaders,
       
    63             const TDesC8& aContent,
       
    64             const CSIPContentTypeHeader* aContentType,
       
    65             TUid& aClientUid);
       
    66 
       
    67         TBool MatchRequestL(
       
    68             RStringF aMethod,
       
    69             const CUri8& aRequestUri,
       
    70             const RPointerArray<CSIPHeaderBase>& aHeaders,
       
    71             const TDesC8& aContent,
       
    72             const CSIPContentTypeHeader* aContentType,
       
    73             TUid& aClientUid );
       
    74 
       
    75         TBool ConnectSupported();
       
    76 
       
    77         void ConnectL( const TUid& aClientUid );
       
    78         
       
    79         void CancelConnect( const TUid& aClientUid );
       
    80         
       
    81         RPointerArray<CSIPContentTypeHeader> SupportedContentTypesL();
       
    82         
       
    83         RPointerArray<CSdpMediaField> SupportedSdpMediasL();
       
    84           
       
    85         void AddClientSpecificHeadersForOptionsResponseL(
       
    86             				RPointerArray<CSIPHeaderBase>& aHeaders );
       
    87 		
       
    88     private: // Constructors
       
    89     
       
    90         CTTCN2GResolverPlugin();
       
    91         void ConstructL();
       
    92 		
       
    93     private: // New functions
       
    94     
       
    95         TBool Match(
       
    96             RSipClientSimulator::TMatchType aMatchType,
       
    97             TUid& aClientUid );
       
    98 		
       
    99 	private: // data
       
   100 	
       
   101 	    RSipClientSimulator iSimulator;
       
   102 	};
       
   103 
       
   104 #endif // CTTCN2GRESOLVERPLUGIN_H