smsprotocols/smsstack/smsprot/Test/TE_Smsprt/logcheck.h
changeset 0 3553901f7fa8
child 5 7ef16719d8cb
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1999-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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent 
       
    19 */
       
    20 
       
    21 #ifndef LOGCHECK_H__
       
    22 #define LOGCHECK_H__
       
    23 
       
    24 
       
    25 #include <logwrap.h>
       
    26 #include <logview.h>
       
    27 #include <logcli.h>
       
    28 #include <e32test.h>
       
    29 #include "TE_smsprt.h"
       
    30 
       
    31 
       
    32 class CSmsLogChecker : public CActive
       
    33 	{
       
    34 	public:
       
    35 		static CSmsLogChecker* NewL(RFs& aFs, CSmsPrtTestStep* aTest, TInt aPriority);
       
    36 		~CSmsLogChecker();
       
    37 
       
    38 		void CountOriginalIdsL(TRequestStatus& aStatus);
       
    39 		void CompareNewIdsL(const RArray<TLogId>& aMessageLogIds, TRequestStatus& aStatus);
       
    40 
       
    41 	private:
       
    42 		enum TTask
       
    43 			{
       
    44 			ENone,
       
    45 			ECountOriginal,
       
    46 			ECountNew
       
    47 			} iTask;
       
    48 
       
    49 		enum TState
       
    50 			{
       
    51 			EIdle,
       
    52 			EFilter,
       
    53 			EFirst,
       
    54 			ENext
       
    55 			} iState;
       
    56 
       
    57 		CSmsLogChecker(RFs& aFs, CSmsPrtTestStep* aTest, TInt aPriority);
       
    58 		void ConstructL();
       
    59 		void RunL();
       
    60 		TInt RunError(TInt aError);
       
    61 		void DoCancel();
       
    62 
       
    63 		void Complete(TInt aStatus);
       
    64 		void StartTaskL(TTask aTask, RArray<TLogId>& aIds, TRequestStatus& aStatus);
       
    65 		void CompleteTaskL();
       
    66 
       
    67 	private:
       
    68 
       
    69 		RFs& iFs;
       
    70 		CSmsPrtTestStep* iTest;
       
    71 
       
    72 		const RArray<TLogId>* iMessageLogIds;
       
    73 		RArray<TLogId> iOriginalIds;
       
    74 		RArray<TLogId> iNewIds;
       
    75 		RArray<TLogId>* iCurrentArray;
       
    76 		TRequestStatus* iReport;
       
    77 
       
    78 		CLogClient* iClient;
       
    79 		CLogViewEvent* iView;
       
    80 		CLogFilter* iFilter;
       
    81 
       
    82 		TBuf<32> iDirection;
       
    83 	};
       
    84 
       
    85 #endif