uifw/AvKon/tsrc/bc/S60_SDK5.0/bctestdocandinit/inc/bctestDocAndInitcase.h
changeset 0 2f259fa3e83a
child 10 3d340a0166ff
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2006 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:  test case
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BCTEST_DOCANDINITCASE_H
       
    20 #define BCTEST_DOCANDINITCASE_H
       
    21 
       
    22 #include <documenthandler.h>
       
    23 #include <eikcolib.h>
       
    24 #include <eikctlib.h>
       
    25 #include <aknserverapp.h> 
       
    26 
       
    27 #include "bctestcase.h"
       
    28 
       
    29 class CBCTestDocAndInitContainer;
       
    30 class CCoeControl;
       
    31 class CDocumentHandler;
       
    32 
       
    33 
       
    34 /**
       
    35 * Drive status. This affects functionality and appearance of lbx drive item.
       
    36 * Instead of numerous 'system wide error codes' CFD is interested only in these
       
    37 * states of a drive. If adding more states, add to the end of this enum - do
       
    38 * not alter the order.
       
    39 */
       
    40 enum TCFDDriveStatus
       
    41     {
       
    42     EDriveOK = 0,   // drive is available, unlocked and formatted
       
    43     EDriveLocked,   // drive is locked
       
    44     EDriveNotReady  // drive is not inserted or the drive is corrupted or unformatted
       
    45     };
       
    46 /**
       
    47 * test case for various list classes
       
    48 */
       
    49 class CBCTestDocAndInitCase: public CBCTestCase, public MAknServerAppExitObserver
       
    50     {
       
    51 public: // constructor and destructor
       
    52     
       
    53     /**
       
    54     * Symbian 2nd static constructor
       
    55     */
       
    56     static CBCTestDocAndInitCase* NewL( CBCTestDocAndInitContainer* aContainer );
       
    57     
       
    58     /**
       
    59     * Destructor
       
    60     */
       
    61     virtual ~CBCTestDocAndInitCase();
       
    62     
       
    63 public: // from CBCTestCase
       
    64     
       
    65     /**
       
    66     * Execute corresponding test functions for UI command
       
    67     * @param aCmd, UI command
       
    68     */
       
    69     void RunL( TInt aCmd );
       
    70     
       
    71     /**
       
    72     * Method for checking drive status. This is more efficient and simple
       
    73     * method to get drive status than DriveInfo() and should be used for
       
    74     * performance reasons and to maintain code simplicity. Only drive
       
    75     * status is checked in many places where any other drive information
       
    76     * is not needed and would be overkill.
       
    77     *
       
    78     * @param aDriveNumber Drive number of the drive, status is checked.
       
    79     * @return Status of the drive.
       
    80     */
       
    81     TCFDDriveStatus DriveStatus( const TDriveNumber aDriveNumber );    
       
    82 
       
    83 protected: // new functions
       
    84     
       
    85     /**
       
    86     * Build autotest script
       
    87     */
       
    88     void BuildScriptL();
       
    89     
       
    90     /**
       
    91      * Test functions
       
    92      */
       
    93     void    TestDocument1L();
       
    94     void    TestDocument2L();
       
    95     void    TestInitializationL();
       
    96     void    TestAppUiFactoryL();
       
    97     void    TestCoCtlLibraryL();
       
    98     void    TestCtlLibraryL();    
       
    99     
       
   100 private: // constructor
       
   101     
       
   102     /**
       
   103      * C++ default constructor
       
   104      */
       
   105     CBCTestDocAndInitCase( CBCTestDocAndInitContainer* aContainer );
       
   106     
       
   107     /**
       
   108      * Symbian 2nd constructor
       
   109      */
       
   110     void ConstructL();
       
   111 private: // from MAknServerAppExitObserver
       
   112     void HandleServerAppExit( TInt aReason );
       
   113        
       
   114 private: // data
       
   115 
       
   116     /**
       
   117      * Pointer to container.
       
   118      * not own
       
   119      */
       
   120     CBCTestDocAndInitContainer* iContainer;
       
   121 
       
   122     };
       
   123 
       
   124 #endif // BCTEST_DOCANDINITCASE_H