landmarks/locationlandmarks/tsrc/LandmarkTestModule/inc/FT_CPosTp127.h
changeset 33 834e27cad510
child 35 1a92308afc46
equal deleted inserted replaced
32:b12ea03c50a3 33:834e27cad510
       
     1 /*
       
     2 * Copyright (c) 2005 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 the License "Symbian Foundation License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *   ?description_line
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPOSTP127_H
       
    21 #define CPOSTP127_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "FT_CLandmarkTestProcedureBase.h"
       
    25 #include <ss_std.h>
       
    26 #include <e32std.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class CPosLandmarkParser;
       
    30 class CPosTp127;
       
    31 
       
    32 // Data types
       
    33 struct TThreadParam
       
    34     {
       
    35     void (*iTestFunction)(TDes*);
       
    36     TDes* iMessage;
       
    37     RThread* iThread;
       
    38     };
       
    39 
       
    40 class CThreadMonitor : public CActive
       
    41     {
       
    42     public:
       
    43 
       
    44         static CThreadMonitor* NewL(RThread* aThread);
       
    45 
       
    46         ~CThreadMonitor();
       
    47 
       
    48     protected:
       
    49 
       
    50         void DoCancel();
       
    51 
       
    52         void RunL();
       
    53 
       
    54     private:
       
    55 
       
    56         CThreadMonitor(RThread* aThread);
       
    57 
       
    58         void ConstructL();
       
    59 
       
    60     private:
       
    61 
       
    62         RThread*    iThread;
       
    63 
       
    64     };
       
    65 
       
    66 /**
       
    67 *  Test procedure 127
       
    68 */
       
    69 class CPosTp127 :public CLandmarkTestProcedureBase
       
    70     {
       
    71     public:  // Constructors and destructor
       
    72         
       
    73         /**
       
    74         * C++ default constructor.
       
    75         */
       
    76         CPosTp127() : CLandmarkTestProcedureBase(127) {};
       
    77         
       
    78         /**
       
    79         * Destructor.
       
    80         */
       
    81         ~CPosTp127() {};
       
    82 
       
    83     public: // Functions from base classes
       
    84 
       
    85         /**
       
    86         * From CUtfwTestBase
       
    87         * Retrieves the test module name
       
    88         * @param aName The name of the test module.
       
    89         */
       
    90         void GetName(
       
    91             TDes&   aName
       
    92             ) const;
       
    93 
       
    94         /**
       
    95         * From CUtfwTestBase
       
    96         * Always called before StartL()
       
    97         */
       
    98         void InitTestL();
       
    99 
       
   100         /**
       
   101         * From CUtfwTestBase
       
   102         * Always called, even if test leaves
       
   103         */
       
   104         void CloseTest();
       
   105 
       
   106         /**
       
   107         * From CLandmarkTestProcedureBase
       
   108         * Runs the test in the module
       
   109         */
       
   110         void StartL();
       
   111 
       
   112     public: // New functions
       
   113        
       
   114         static void MultipleDbCategorySearchL(TDes* aMessage);
       
   115 
       
   116         static void MultipleDbLandmarkSearchL(TDes* aMessage);
       
   117 
       
   118         static void MultipleDbLandmarkWithoutCategorySearchL(TDes* aMessage);
       
   119 
       
   120         static void LockDatabaseL(TDes* aMessage);
       
   121         
       
   122         static void DbManagementL(TDes* aMessage);
       
   123 
       
   124         static void DbAccessL(TDes* aMessage);
       
   125 
       
   126         static void SingleDbSearchL(TDes* aMessage);
       
   127         
       
   128         static void MultipleDbSearchL(TDes* aMessage);        
       
   129 
       
   130         static void CopyLockedDatabaseL(TDes* aMessage);        
       
   131 
       
   132         static void CopyDatabaseL(TDes* aMessage);        
       
   133 
       
   134     private:
       
   135 
       
   136         TBool ResumeThreadsAndVerifyExitL(const RArray<TThreadParam>& aThreadParams);
       
   137         
       
   138         TBool MultipleDbSearchClientsL(TBool aLockDb);
       
   139         
       
   140         TBool MultipleLmClientsL();
       
   141         
       
   142         TBool VerifyInUseWhenCopyL();
       
   143 
       
   144         TBool VerifyCopyStressL();
       
   145 
       
   146     private:
       
   147 
       
   148         TBuf<100>               iBuf;
       
   149 
       
   150     };
       
   151 
       
   152 #endif      // CPOSTP127_H
       
   153             
       
   154 // End of File