testexecmdw/tef/tef/scriptengine/inc/testwatcher.h
branchRCL_3
changeset 3 9397a16b6eb8
parent 1 6edeef394eb7
equal deleted inserted replaced
1:6edeef394eb7 3:9397a16b6eb8
     1 /*
       
     2 * Copyright (c) 2005-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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file TestWatcher.h
       
    22 */
       
    23 
       
    24 #if !(defined __TEST_WATCHER_H__)
       
    25 #define __TEST_WATCHER_H__
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <e32std.h>
       
    29 
       
    30 /////////
       
    31 // Remote Panic Detection
       
    32 ////////
       
    33 class TThreadPanicDetails
       
    34 	{
       
    35 public:
       
    36 	TThreadPanicDetails(TName aThreadName, TInt aReason, TExitCategoryName aCategory, TTime aTime);
       
    37 	TName iThreadName;
       
    38 	TInt iReason;
       
    39 	TExitCategoryName iCategory;
       
    40 	TTime iTime;
       
    41 	};
       
    42 
       
    43 /** Provides access to shared data between the threads. Because of the nature of construction	
       
    44  *	it is too complicated to generate mutexes, and as such you MUST NOT
       
    45  *  use this class inside TestWatcher whilst the UndertakerWatcher thread is running.
       
    46  *  Kill it before you access this data, and construct the object before that thread
       
    47  *  is running. YHBW.
       
    48  */	
       
    49 class CSharedData : public CBase
       
    50 	{
       
    51 public:
       
    52 	RPointerArray<TThreadPanicDetails> iPanicDetails;
       
    53 	};
       
    54 
       
    55 class CTestWatcher : public CBase
       
    56 	{
       
    57 public:
       
    58 	CTestWatcher();
       
    59 	~CTestWatcher();
       
    60 	void ConstructL();
       
    61 	void StartL();
       
    62 	void Stop();
       
    63 	static CTestWatcher* NewL();
       
    64 	CSharedData* iSharedData;
       
    65 private:
       
    66 	RThread iWorker;
       
    67 	};
       
    68 
       
    69 #endif