uifw/AvKon/tsrc/bc/bctestlauncher/inc/bctestrunner.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2006-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:  Handles test application runs.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CBCTESTRUNNER_H
       
    20 #define C_CBCTESTRUNNER_H
       
    21 
       
    22 #include <eikenv.h>
       
    23 
       
    24 class CAknAtLogWriter;
       
    25 class CBCTestApplication;
       
    26 
       
    27 /**
       
    28  * TestRunner, manage all test applications
       
    29  */
       
    30 class CBCTestRunner : public CBase
       
    31     {
       
    32 public:  // Constructors and destructor
       
    33     
       
    34     /**
       
    35     * Two-phased constructor.
       
    36     */
       
    37     static CBCTestRunner* NewL();
       
    38     
       
    39     /**
       
    40     * Destructor.
       
    41     */
       
    42     virtual ~CBCTestRunner();
       
    43 
       
    44 // New methods
       
    45 
       
    46     /**
       
    47     * Starts test application and returns after test is over
       
    48 	* @param aCommand, a command to indicate run full test, partial test,
       
    49 	* or selected test.
       
    50 	* @return ETrue if run sucessfully, else it will return EFalse.
       
    51     */
       
    52     TBool RunL( TInt aCommand );
       
    53 
       
    54 	/**
       
    55 	* Add new BC test application to the test runner.
       
    56 	* @param aApp, the pointer to the bc test application.
       
    57 	*/
       
    58     void AddTestAppL(CBCTestApplication* aApp);
       
    59 
       
    60 	/**
       
    61 	* return the BC test application list
       
    62 	*/
       
    63 	RArray<CBCTestApplication*>* Apps();
       
    64 
       
    65 private:
       
    66 
       
    67     /**
       
    68     * C++ default constructor.
       
    69     */
       
    70     CBCTestRunner();
       
    71 
       
    72     /**
       
    73     * By default Symbian 2nd phase constructor is private.
       
    74     */
       
    75     void ConstructL();
       
    76 
       
    77     /**
       
    78     * Creates time stamp for log file
       
    79     */
       
    80     void CreateTimeStamp();
       
    81 
       
    82 
       
    83 private: // data
       
    84 
       
    85     RArray<CBCTestApplication*> iTestApps;
       
    86     TBuf8<1024> iBuf;   // temp storage for log writing
       
    87     TBuf<50> iTempBuf;   // for timestamp creating
       
    88     
       
    89     };
       
    90 
       
    91 #endif //C_CBCTESTRUNNER_H