equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 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: AppLauncher can be used to start and stop Java application |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef APPLAUNCHER_H |
|
20 #define APPLAUNCHER_H |
|
21 |
|
22 #include <string> |
|
23 #include <unistd.h> |
|
24 |
|
25 #include "javauid.h" |
|
26 #include "javaosheaders.h" |
|
27 |
|
28 namespace java |
|
29 { |
|
30 // forward declarations |
|
31 namespace comms |
|
32 { |
|
33 class CommsMessage; |
|
34 } |
|
35 |
|
36 namespace debug |
|
37 { |
|
38 OS_NONSHARABLE_CLASS(AppLauncher) |
|
39 { |
|
40 public: |
|
41 AppLauncher(const java::util::Uid& aAppUid); |
|
42 virtual ~AppLauncher(); |
|
43 |
|
44 int startApp(const std::wstring& aJvmArgs); |
|
45 int stopApp(); |
|
46 pid_t getPid(); |
|
47 |
|
48 protected: |
|
49 virtual java::comms::CommsMessage createStartAppMessage(const std::wstring& aJvmArgs); |
|
50 virtual java::comms::CommsMessage createStopAppMessage(); |
|
51 virtual int sendToJavaCaptain(java::comms::CommsMessage& aMessage); |
|
52 |
|
53 private: |
|
54 java::util::Uid mUid; |
|
55 pid_t mPid; |
|
56 }; |
|
57 |
|
58 } // end namespace debug |
|
59 } // end namespace java |
|
60 |
|
61 |
|
62 #endif // APPLAUNCHER_H |