|
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 #ifndef __CTESTDRIVERSERVICE_H__ |
|
21 #define __CTESTDRIVERSERVICE_H__ |
|
22 |
|
23 #include <string> |
|
24 #include "CService.h" |
|
25 |
|
26 // Define some error codes specific to this service |
|
27 #define ERR_TEST_DRIVER_BUILD -110 |
|
28 #define ERR_TEST_DRIVER_RUN -111 |
|
29 #define ERR_TEST_DRIVER_RUN_COMPLETE -112 |
|
30 #define ERR_TEST_DRIVER_ALREADY_RUNNING -113 |
|
31 |
|
32 class CTestDriverService : public CService |
|
33 { |
|
34 public: |
|
35 CTestDriverService(); |
|
36 ~CTestDriverService(); |
|
37 |
|
38 virtual bool Setup(); |
|
39 |
|
40 // Handle the parsing/running of particular commands |
|
41 virtual int RunCommand( const CCall& aCall ); |
|
42 |
|
43 private: |
|
44 int BuildAndRunTestDriver( const CCall& aCall ); |
|
45 int RetrieveTestDriverRunResult(); |
|
46 void RetrieveConfig(); |
|
47 int AppendCmdLineParams( const CCall& aCall, string &aCmdLine ); |
|
48 |
|
49 static void ListeningServer( void ); |
|
50 static void TestDriverRun( void ); |
|
51 static void Wait( HANDLE aMutexHandle ); |
|
52 static void Release( HANDLE aMutexHandle ); |
|
53 }; |
|
54 |
|
55 #endif // __CTESTDRIVERSERVICE_H__ |