classicui_pub/tsrc/bc/apps/S60_SDK3.0/bctestcmdlg/inc/bctestcommondlg.h
changeset 22 75713bee6484
parent 21 558113899881
child 26 62ef28f7b435
child 28 d33307312dfe
equal deleted inserted replaced
21:558113899881 22:75713bee6484
     1 /*
       
     2 * Copyright (c) 2006-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:         test case
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef BCTEST_COMMON_DLG_H
       
    27 #define BCTEST_COMMON_DLG_H
       
    28 
       
    29 #include "bctestcase.h"
       
    30 
       
    31 class MAknFileFilter;
       
    32 
       
    33 /**
       
    34 * test case for various list classes
       
    35 */
       
    36 class CBCTestCommonDlg: public CBCTestCase
       
    37     {
       
    38 public: // constructor and destructor
       
    39     
       
    40     /**
       
    41     * Symbian 2nd static constructor
       
    42     */
       
    43     static CBCTestCommonDlg* NewL();
       
    44     
       
    45     /**
       
    46     * Destructor
       
    47     */
       
    48     virtual ~CBCTestCommonDlg();
       
    49     
       
    50 public: // from CBCTestCase
       
    51     
       
    52     /**
       
    53     * Execute corresponding test functions for UI command
       
    54     * @param aCmd, UI command
       
    55     */
       
    56     void RunL( TInt aCmd );
       
    57 
       
    58 protected: // new functions
       
    59     
       
    60     /**
       
    61     * Build autotest script
       
    62     */
       
    63     void BuildScriptL();
       
    64     
       
    65     /**
       
    66      * Create control or allocate resource for test
       
    67      * @param aCmd UI command, maybe you need to do some work 
       
    68      * for different outline
       
    69      */
       
    70     
       
    71     /**
       
    72      * Release resource used in test
       
    73      */
       
    74     void Teardown();
       
    75     
       
    76     /**
       
    77      * Test functions
       
    78      */
       
    79         
       
    80 private: // constructor
       
    81     
       
    82     /**
       
    83      * C++ default constructor
       
    84      */
       
    85     CBCTestCommonDlg();
       
    86     
       
    87     /**
       
    88      * Symbian 2nd constructor
       
    89      */
       
    90     void ConstructL();
       
    91     
       
    92 private: // data
       
    93     void RunCopyL(TInt aCmd);
       
    94     void RunSaveL(TInt aCmd);
       
    95     void RunMoveL(TInt aCmd);
       
    96     void RunSelectL(TInt aCmd);
       
    97 
       
    98     void BuildCopyScriptL(int i);
       
    99     void BuildSaveScriptL(int i);
       
   100     void BuildMoveScriptL(int i);
       
   101     void BuildSelectScriptL(int i);
       
   102 
       
   103     void SetupL();
       
   104     void AddCancelL();
       
   105     void AddOKL();
       
   106     
       
   107     void TestSelectL();
       
   108     void TestSelectL(const TDesC& aTitle);
       
   109     void TestSelectL(MAknFileFilter* aFilter);
       
   110     void TestSelectL(TInt aFileSelResID);
       
   111     void TestSelectL(const TDesC& aStartFolder, TInt aMemSelResID);
       
   112     void TestSelectL(const TDesC& aStartFolder, MAknFileFilter* aFilter);
       
   113     void TestSelectL(const TDesC& aStartFolder, TInt aMemSelResID, TInt aFileSelResID);
       
   114     void TestSelectL(const TDesC& aStartFolder, const TDesC& aTitle);
       
   115 
       
   116     void TestMoveL(TInt aFileSelResID);
       
   117     void TestMoveL(MAknFileFilter* aFilter);
       
   118     void TestMoveL(const TDesC& aTitle);
       
   119     void TestMoveL();
       
   120 
       
   121     void TestSaveL(TBool aDirFlag, TInt aMemSelResID, const TDesC& aPrompt);
       
   122     void TestSaveL(TBool aDirFlag, TInt aMemSelResID);
       
   123     void TestSaveL(TInt aFileSelResID, const TDesC& aPrompt);
       
   124     void TestSaveL(TInt aFileSelResID);
       
   125     void TestSaveL(const TDesC& aFileTitle, const TDesC& aPromptTitle);
       
   126     void TestSaveL(MAknFileFilter* aFilter);
       
   127     void TestSaveL();
       
   128 
       
   129     void TestCopyL(TInt aFileSelResID);
       
   130     void TestCopyL(MAknFileFilter* aFilter);
       
   131     void TestCopyL();
       
   132     };
       
   133 
       
   134 #endif // BCTEST_COMMON_DLG_H