commsconfig/commsdatabaseshim/ts_commdb/Step_046_xx.h
changeset 72 ae47d0499bee
parent 68 5da8188e392b
child 77 c9776eadbffd
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This is the header file for CommDb test 046.XX group of scenarios 
       
    15 // 
       
    16 //
       
    17 
       
    18 #if (!defined __STEP_046_XX_H__)
       
    19 #define __STEP_046_XX_H__
       
    20 
       
    21 
       
    22 //
       
    23 //	Test step 046.01
       
    24 //
       
    25 
       
    26 NONSHARABLE_CLASS(CCommDbTest046_01) : public CTestStepCommDb
       
    27 {
       
    28 public:
       
    29 	CCommDbTest046_01();
       
    30 	~CCommDbTest046_01();
       
    31 
       
    32 	virtual enum TVerdict doTestStepL( void );
       
    33 	TInt executeStepL();
       
    34 	TVerdict doTestStepPreambleL();
       
    35 
       
    36 private:
       
    37 
       
    38 };
       
    39 
       
    40 
       
    41 //
       
    42 //	Test step 046.02
       
    43 //
       
    44 
       
    45 NONSHARABLE_CLASS(CCommDbTest046_02) : public CTestStepCommDb
       
    46 {
       
    47 public:
       
    48 	CCommDbTest046_02();
       
    49 	~CCommDbTest046_02();
       
    50 
       
    51 	virtual enum TVerdict doTestStepL( void );
       
    52 	TInt executeStepL();
       
    53 	TVerdict doTestStepPreambleL();
       
    54 
       
    55 private:
       
    56 	void insertTestRecordsL( TUint aQuantity );
       
    57 	void deleteLastRecordsL( TUint aQuantity );
       
    58 
       
    59 };
       
    60 
       
    61 //
       
    62 //	Test step 046.03
       
    63 //
       
    64 
       
    65 NONSHARABLE_CLASS(CCommDbTest046_03) : public CTestStepCommDb
       
    66 {
       
    67 public:
       
    68 	struct TThreadInfo
       
    69 	{
       
    70 	TRequestStatus* iThread1Status;
       
    71 	TRequestStatus* iMainThreadStatus;
       
    72 	RThread iMainThread;
       
    73 	};
       
    74 
       
    75 	static void DoThread1TestL(TAny* aPtr);
       
    76 	CCommDbTest046_03();
       
    77 	~CCommDbTest046_03();
       
    78 
       
    79 	static TInt Thread1Function(TAny* aPtr);
       
    80 
       
    81 	virtual enum TVerdict doTestStepL( void );
       
    82 	TInt executeStepL();
       
    83 	TVerdict doTestStepPreambleL();
       
    84 	TVerdict doTestStepPostambleL();
       
    85 
       
    86 };
       
    87 
       
    88 //
       
    89 //	Test step 046.04
       
    90 //
       
    91 
       
    92 NONSHARABLE_CLASS(CCommDbTest046_04) : public CTestStepCommDb
       
    93 {
       
    94 public:
       
    95 	struct TThreadInfo
       
    96 	{
       
    97 	TRequestStatus* iStatus1;
       
    98 	TRequestStatus* iStatus2;
       
    99 	RThread iCaller;
       
   100 	};
       
   101 
       
   102 	static TInt Thread1Function(TAny* aPtr);
       
   103 	static void DoThread1TestL(TAny* aPtr);
       
   104 
       
   105 	CCommDbTest046_04();
       
   106 	~CCommDbTest046_04();
       
   107 
       
   108 	virtual enum TVerdict doTestStepL( void );
       
   109 	TInt executeStepL();
       
   110 	TVerdict doTestStepPreambleL();
       
   111 	TVerdict doTestStepPostambleL();
       
   112 
       
   113 };
       
   114 
       
   115 //
       
   116 //	Test step 046.05
       
   117 //
       
   118 
       
   119 NONSHARABLE_CLASS(CCommDbTest046_05) : public CTestStepCommDb
       
   120 {
       
   121 public:
       
   122 	struct TThreadInfo
       
   123 	{
       
   124 	TRequestStatus* iStatus1;
       
   125 	RThread iCaller;
       
   126 	};
       
   127 
       
   128 	static TInt Thread1Function(TAny* aPtr);
       
   129 	static void DoThread1TestL(TAny* aPtr);
       
   130 
       
   131 	CCommDbTest046_05();
       
   132 	~CCommDbTest046_05();
       
   133 
       
   134 	virtual enum TVerdict doTestStepL( void );
       
   135 	TInt executeStepL();
       
   136 	TVerdict doTestStepPreambleL();
       
   137 	TVerdict doTestStepPostambleL();
       
   138 
       
   139 private:
       
   140 	static TBool InsertTestRecordsL(TBool aCallerIsMainThread, TUint aQuantity, CCommsDatabase& aDb );
       
   141 	static void DeleteLastRecordsL( TBool aCallerIsMainThread, TUint aQuantity, CCommsDatabase& aDb );
       
   142 	static void RandomDelay(TInt64 &aSeed);
       
   143 	static void PrintDebug(TPtrC aString);
       
   144 };
       
   145 #endif //__STEP_046_XX_H__