usbengines/usblocodplugin/tsrc/USBLocodPluginTest/inc/USBLocodPluginTest.h
changeset 35 9d8b04ca6939
parent 0 1e05558e2206
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     1 /*
       
     2 * Copyright (c) 2002 - 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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef USBLOCODPLUGINTEST_H
       
    22 #define USBLOCODPLUGINTEST_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <StifLogger.h>
       
    26 #include <TestScripterInternal.h>
       
    27 #include <StifTestModule.h>
       
    28 #include <TestclassAssert.h>
       
    29 
       
    30 #include <e32property.h>
       
    31 #include <usbwatcherinternalpskeys.h>
       
    32 #include <usbpersonalityids.h>
       
    33 #include <locodbearerplugin.h>
       
    34 #include <locodbearer.h>
       
    35 
       
    36 #include "locodbearerpluginobs.h"
       
    37 
       
    38 // CONSTANTS
       
    39 #define KUsbDefaultPersonality  0x00
       
    40 
       
    41 // MACROS
       
    42 //#define ?macro ?macro_def
       
    43 #define TEST_CLASS_VERSION_MAJOR 0
       
    44 #define TEST_CLASS_VERSION_MINOR 0
       
    45 #define TEST_CLASS_VERSION_BUILD 0
       
    46 
       
    47 // Logging path
       
    48 _LIT( KUSBLocodPluginTestLogPath, "\\logs\\testframework\\USBLocodPluginTest\\" );
       
    49 
       
    50 // Logging path for ATS - for phone builds comment this line
       
    51 //_LIT( KUSBLocodPluginTestLogPath, "e:\\testing\\stiflogs\\" ); 
       
    52 
       
    53 // Log file
       
    54 _LIT( KUSBLocodPluginTestLogFile, "USBLocodPluginTest.txt" );
       
    55 _LIT( KUSBLocodPluginTestLogFileWithTitle, "USBLocodPluginTest_[%S].txt" );
       
    56 
       
    57 // FUNCTION PROTOTYPES
       
    58 //?type ?function_name(?arg_list);
       
    59 
       
    60 // FORWARD DECLARATIONS
       
    61 //class ?FORWARD_CLASSNAME;
       
    62 class CUSBLocodPluginTest;
       
    63 
       
    64 // DATA TYPES
       
    65 //enum ?declaration
       
    66 
       
    67 enum TUSBLocodPluginTestResult
       
    68     {
       
    69     ETestCasePassed,
       
    70     ETestCaseFailed
       
    71     };
       
    72 
       
    73 //typedef ?declaration
       
    74 //extern ?data_type;
       
    75 
       
    76 // CLASS DECLARATION
       
    77 
       
    78 /**
       
    79 *  CUSBLocodPluginTest test class for STIF Test Framework TestScripter.
       
    80 *  ?other_description_lines
       
    81 *
       
    82 *  @lib ?library
       
    83 *  @since ?Series60_version
       
    84 */
       
    85 NONSHARABLE_CLASS(CUSBLocodPluginTest) : public CScriptBase
       
    86     {
       
    87     public:  // Constructors and destructor
       
    88 
       
    89         /**
       
    90         * Two-phased constructor.
       
    91         */
       
    92         static CUSBLocodPluginTest* NewL( CTestModuleIf& aTestModuleIf );
       
    93 
       
    94         /**
       
    95         * Destructor.
       
    96         */
       
    97         virtual ~CUSBLocodPluginTest();
       
    98 
       
    99     public: // New functions
       
   100 
       
   101         /**
       
   102         * ?member_description.
       
   103         * @since ?Series60_version
       
   104         * @param ?arg1 ?description
       
   105         * @return ?description
       
   106         */
       
   107         //?type ?member_function( ?type ?arg1 );
       
   108 
       
   109     public: // Functions from base classes
       
   110 
       
   111         /**
       
   112         * From CScriptBase Runs a script line.
       
   113         * @since ?Series60_version
       
   114         * @param aItem Script line containing method name and parameters
       
   115         * @return Symbian OS error code
       
   116         */
       
   117         virtual TInt RunMethodL( CStifItemParser& aItem );
       
   118 
       
   119     protected:  // New functions
       
   120 
       
   121         /**
       
   122         * ?member_description.
       
   123         * @since ?Series60_version
       
   124         * @param ?arg1 ?description
       
   125         * @return ?description
       
   126         */
       
   127         //?type ?member_function( ?type ?arg1 );
       
   128 
       
   129     protected:  // Functions from base classes
       
   130 
       
   131         /**
       
   132         * From ?base_class ?member_description
       
   133         */
       
   134         //?type ?member_function();
       
   135 
       
   136     private:
       
   137 
       
   138         /**
       
   139         * C++ default constructor.
       
   140         */
       
   141         CUSBLocodPluginTest( CTestModuleIf& aTestModuleIf );
       
   142 
       
   143         /**
       
   144         * By default Symbian 2nd phase constructor is private.
       
   145         */
       
   146         void ConstructL();
       
   147 
       
   148         // Prohibit copy constructor if not deriving from CBase.
       
   149         // ?classname( const ?classname& );
       
   150         // Prohibit assigment operator if not deriving from CBase.
       
   151         // ?classname& operator=( const ?classname& );
       
   152 
       
   153         /**
       
   154         * Frees all resources allocated from test methods.
       
   155         * @since ?Series60_version
       
   156         */
       
   157         void Delete();
       
   158 
       
   159         /**
       
   160         * Test methods are listed below. 
       
   161         */
       
   162 
       
   163         virtual TInt ExecuteApiTest( CStifItemParser& aItem );
       
   164         virtual TInt ExecuteModuleTest( CStifItemParser& aItem );
       
   165         virtual TInt ExecuteBranchTest( CStifItemParser& aItem );
       
   166         
       
   167         /**
       
   168          * Method used to log version of test class
       
   169          */
       
   170         void SendTestClassVersion();
       
   171 
       
   172         //ADD NEW METHOD DEC HERE
       
   173         //[TestMethods] - Do not remove
       
   174 
       
   175 	void DoExecuteApiTestL( TPtrC aApiTestName, TUSBLocodPluginTestResult& aTestResult );
       
   176 
       
   177 	void InitializationTestL( TUSBLocodPluginTestResult& aTestResult );
       
   178 	void ImplementatiationIdTestL( TUSBLocodPluginTestResult& aTestResult );
       
   179 	void USBPCSuitePersonalityTestL( TUSBLocodPluginTestResult& aTestResult );
       
   180 	void USBDefaultPersonalityTestL( TUSBLocodPluginTestResult& aTestResult );
       
   181 	
       
   182 	void DoExecuteModuleTestL( TPtrC aModuleTestName, TUSBLocodPluginTestResult& aTestResult );
       
   183 
       
   184     void USBMSPersonalityTestL( TUSBLocodPluginTestResult& aTestResult );
       
   185     void USBPTPPersonalityTestL( TUSBLocodPluginTestResult& aTestResult );
       
   186     void USBMTPPersonalityTestL( TUSBLocodPluginTestResult& aTestResult );
       
   187 
       
   188 	void DoExecuteBranchTestL( TPtrC aBranchTestName, TUSBLocodPluginTestResult& aTestResult );
       
   189 
       
   190 	void USBPCSuiteMTPPersonalityTestL( TUSBLocodPluginTestResult& aTestResult );
       
   191 	
       
   192     public:     // Data
       
   193         // ?one_line_short_description_of_data
       
   194         //?data_declaration;
       
   195 
       
   196     protected:  // Data
       
   197         // ?one_line_short_description_of_data
       
   198         //?data_declaration;
       
   199 
       
   200     private:    // Data
       
   201         RProperty* iSelectedPersProperty;
       
   202         
       
   203         CLocodBearerPlugin* iLocodBearerPlugin;
       
   204         CLocodBearerPluginObs* iLocodBearerPluginObs;
       
   205         CActiveSchedulerWait *iWaiter;
       
   206         TBool iDeleteProperty;
       
   207         TBool iBearerAvailable;
       
   208 
       
   209         // Reserved pointer for future extension
       
   210         //TAny* iReserved;
       
   211 
       
   212     public:     // Friend classes
       
   213         //?friend_class_declaration;
       
   214     protected:  // Friend classes
       
   215         //?friend_class_declaration;
       
   216     private:    // Friend classes
       
   217         //?friend_class_declaration;
       
   218 
       
   219     };
       
   220 
       
   221 #endif      // USBLOCODPLUGINTEST_H
       
   222 
       
   223 // End of File