mds_plat/harvester_framework_api/tsrc/ComposerPluginTest/inc/ComposerPluginTest.h
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef COMPOSERPLUGINTEST_H
       
    20 #define COMPOSERPLUGINTEST_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <StifLogger.h>
       
    24 #include <TestScripterInternal.h>
       
    25 #include <StifTestModule.h>
       
    26 
       
    27 #include <mdesession.h>
       
    28 #include <composerplugin.h>
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 _LIT( KComposerPluginTestLogPath, "\\logs\\testframework\\ComposerPluginTest\\" ); 
       
    33 // Log file
       
    34 _LIT( KComposerPluginTestLogFile, "ComposerPluginTest.txt" ); 
       
    35 _LIT( KComposerPluginTestLogFileWithTitle, "ComposerPluginTest_[%S].txt" );
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CComposerPluginTest;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 NONSHARABLE_CLASS(CComposerPluginTest) : public CScriptBase,
       
    42 									     public MMdESessionObserver
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CComposerPluginTest* NewL( CTestModuleIf& aTestModuleIf );
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CComposerPluginTest();
       
    55 
       
    56     public: // Functions from base classes
       
    57 
       
    58         virtual TInt RunMethodL( CStifItemParser& aItem );
       
    59 
       
    60     private: // Functions from base classes
       
    61     	
       
    62     	void HandleSessionOpened(CMdESession& aSession, TInt aError);
       
    63     	void HandleSessionError(CMdESession& aSession, TInt aError);
       
    64 
       
    65     private:
       
    66 
       
    67         /**
       
    68         * C++ default constructor.
       
    69         */
       
    70         CComposerPluginTest( CTestModuleIf& aTestModuleIf );
       
    71 
       
    72         /**
       
    73         * By default Symbian 2nd phase constructor is private.
       
    74         */
       
    75         void ConstructL();
       
    76 
       
    77         /**
       
    78         * Frees all resources allocated from test methods.
       
    79         */
       
    80         void Delete();
       
    81         
       
    82         /**
       
    83         * Test methods are listed below. 
       
    84         */
       
    85         //[TestMethods] - Do not remove
       
    86         virtual TInt ActiveWait( CStifItemParser& aItem );
       
    87         virtual TInt BeginComposerSessionL( CStifItemParser& aItem );
       
    88         virtual TInt EndComposerSession( CStifItemParser& aItem );
       
    89         virtual TInt LoadPluginsL( CStifItemParser& aItem );
       
    90         virtual TInt SetSessions( CStifItemParser& aItem );
       
    91         virtual TInt RemoveSessions( CStifItemParser& aItem );
       
    92         virtual TInt ModifyObjectsL( CStifItemParser& aItem );
       
    93         virtual TInt DeleteObjectL( CStifItemParser& aItem );
       
    94         virtual TInt DeleteObjectsL( CStifItemParser& aItem );
       
    95         virtual TInt WaitComposingComplete( CStifItemParser& aItem );
       
    96 
       
    97     private:    // Data
       
    98         
       
    99         CMdESession* iMdEClient;
       
   100         
       
   101         RPointerArray<CComposerPlugin> iPluginArray;
       
   102     };
       
   103 
       
   104 #endif      // COMPOSERPLUGINTEST_H
       
   105 
       
   106 // End of File