719
|
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 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 |
* @file
|
|
16 |
* This contains the header file for the Msg server from which other servers
|
|
17 |
* would be derived
|
|
18 |
*
|
|
19 |
*
|
|
20 |
*/
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
#ifndef __T_MSG_SERVER_H__
|
|
27 |
#define __T_MSG_SERVER_H__
|
|
28 |
|
|
29 |
|
|
30 |
/* User defined classes */
|
|
31 |
#include "testexecuteserverbase.h"
|
|
32 |
#include "T_MsgSharedDataBase.h"
|
|
33 |
|
|
34 |
#include "mmsgtestpropertywatcher.h"
|
|
35 |
#include "cmsgtestpropertywatcher.h"
|
|
36 |
|
|
37 |
/*
|
|
38 |
* Implements a base server from which other servers would be
|
|
39 |
* derived
|
|
40 |
*/
|
|
41 |
class CT_MsgServer : public CTestServer, public MMsgTestPropertyWatcher
|
|
42 |
{
|
|
43 |
protected:
|
|
44 |
CT_MsgServer();
|
|
45 |
virtual ~CT_MsgServer();
|
|
46 |
|
|
47 |
/*
|
|
48 |
* Derived from CTestStep
|
|
49 |
* This wraps CTestServer::CreateTestStep() with a leave-trap
|
|
50 |
*/
|
|
51 |
virtual CTestStep* CreateTestStepL(const TDesC& aStepName);
|
|
52 |
|
|
53 |
/*
|
|
54 |
* To be implemented by the derived classes
|
|
55 |
* Creates the required shared data object
|
|
56 |
*/
|
|
57 |
virtual CT_MsgSharedDataBase* NewSharedDataL() = 0;
|
|
58 |
|
|
59 |
//From MMsgTestPropertyWatcher
|
|
60 |
void HandleEventL(RProperty& aProperty, TUint /*aKey*/);
|
|
61 |
|
|
62 |
private:
|
|
63 |
/* Calls the function CreateTestStepL to create the required test step */
|
|
64 |
CTestStep* CreateTestStep(const TDesC& aStepName);
|
|
65 |
|
|
66 |
/* Creates the active scheduler and the base shared data object */
|
|
67 |
void StartupServerL();
|
|
68 |
|
|
69 |
/* Destroys the shared data object and the active scheduler object */
|
|
70 |
void ShutdownServer();
|
|
71 |
|
|
72 |
protected:
|
|
73 |
/* For use by generic Mtm test steps */
|
|
74 |
CT_MsgSharedDataBase* iSharedDataBase;
|
|
75 |
|
|
76 |
private:
|
|
77 |
/* Active scheduler object */
|
|
78 |
CActiveScheduler* iActiveScheduler;
|
|
79 |
|
|
80 |
//TBD: Remove this...
|
|
81 |
CMsgTestPropertyWatcher* iPropertyWatcher;
|
|
82 |
};
|
|
83 |
|
|
84 |
#endif /*__T_MSG_SERVER_H__ */
|