messagingappbase/obexmtms/TObexMTM/INC/ObexTestUtils.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2002-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 #ifndef __OBEXTESTUTILS_H__
       
    18 #define __OBEXTESTUTILS_H__
       
    19 
       
    20 
       
    21 
       
    22 // System includes
       
    23 #include "msvtestutils.h"
       
    24 // User includes
       
    25 
       
    26 // forward declarations
       
    27 
       
    28 class CObexTestUtils : public CMsvTestUtils
       
    29     {
       
    30     public:
       
    31         static CObexTestUtils* NewL(RTest& aTest, TUint aCreationFlags = ETuNone);
       
    32         static CObexTestUtils* NewLC(RTest& aTest, TUint aCreationFlags = ETuNone);
       
    33         ~CObexTestUtils();
       
    34     
       
    35     public:     //from CMsvTestUtils
       
    36         virtual void InstantiateClientMtmsL();
       
    37 		virtual void InstantiateServerMtmsL();
       
    38 		virtual void DeleteServicesL();
       
    39 	    virtual void CreateServicesL();
       
    40 	    virtual void FindExistingServicesL();
       
    41 		virtual void CreateServerMtmRegsL();
       
    42 	    virtual void InstallMtmGroupsL();
       
    43         virtual void Reset();
       
    44         virtual void Panic(TInt aPanic);
       
    45 
       
    46     public:        
       
    47         TMsvId CreateObexServiceL(TUid aMsgType);  
       
    48         void InstantiateBTClientMtmL();
       
    49 		void InstantiateBTServerMtmL();
       
    50         void InstantiateIRClientMtmL();
       
    51 		void InstantiateIRServerMtmL();
       
    52 
       
    53         const CBaseMtm& GetCurrentObexClientMtm() const;
       
    54         CBaseMtm& GetCurrentObexClientMtm();
       
    55         const CBaseServerMtm& GetCurrentObexServerMtm() const;
       
    56         CBaseServerMtm& GetCurrentObexServerMtm();
       
    57         TMsvId GetCurrentServiceId() const;
       
    58 
       
    59         TBool SelectObexMtmL(TUid aMsgType);
       
    60         TUid CurrentObexMtm() const;
       
    61 
       
    62 		void RegisterIRMtmL();
       
    63 		void RegisterBTMtmL();
       
    64 		void UnRegisterIRMtmL();
       
    65 		void UnRegisterBTMtmL();
       
    66 
       
    67 
       
    68     private:    //methods
       
    69         CObexTestUtils(RTest& aTest);
       
    70         void ConstructL(TUint aCreationFlags);
       
    71       
       
    72 
       
    73     private:    //attribs
       
    74         CBaseMtm* iBTClientMtm;
       
    75         CBaseServerMtm* iBTServerMtm;
       
    76         CBaseMtm* iIRClientMtm;
       
    77         CBaseServerMtm* iIRServerMtm;
       
    78         TMsvId iBTServiceId;
       
    79         TMsvId iIRServiceId;
       
    80         TUid iCurrentMtm;               //the currently selected MTM
       
    81         
       
    82     };
       
    83 
       
    84 #endif // __OBEXTESTUTILS_H__