|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef JAVASTARTERIMPL_H |
|
19 #define JAVASTARTERIMPL_H |
|
20 |
|
21 #include <memory> |
|
22 |
|
23 #include "midpruntimeinternalsupport.h" |
|
24 #include "monitor.h" |
|
25 |
|
26 namespace java // codescanner::namespace |
|
27 { |
|
28 |
|
29 OS_NONSHARABLE_CLASS(JavaStarterImpl) : |
|
30 public java::runtime::MidpStarterInternalSupport |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Constructor of the JavaStarterImpl. |
|
35 */ |
|
36 JavaStarterImpl(const std::list<std::wstring>& args); |
|
37 |
|
38 /** |
|
39 * Destructor of the JavaStarterImpl. |
|
40 */ |
|
41 ~JavaStarterImpl(); |
|
42 |
|
43 /** |
|
44 * Implementation of method closeRuntimeInd from interface |
|
45 * MidpStarterInternalSupport |
|
46 * @see midpruntimeinternalsupport.h. |
|
47 */ |
|
48 virtual void closeRuntimeInd(); |
|
49 |
|
50 /** |
|
51 * Implementation of method setUid from interface |
|
52 * MidpStarterInternalSupport |
|
53 * @see midpruntimeinternalsupport.h. |
|
54 */ |
|
55 virtual void setUids(const java::util::Uid& uid, |
|
56 const java::util::Uid& suiteUid); |
|
57 |
|
58 int start(int argc, const char** argv); |
|
59 int start(); |
|
60 |
|
61 static void getArgsFromFile(const char* file, |
|
62 std::list<std::wstring>& args); |
|
63 |
|
64 private: |
|
65 static void* ensureExit(void* ptr); |
|
66 |
|
67 void parseFlags(); |
|
68 void setConfigration(const std::wstring& conf); |
|
69 void setProfile(const std::wstring& profile); |
|
70 void setOrientation(const std::wstring& orientation); |
|
71 void setStartScreen(const std::wstring& startscreen); |
|
72 void createJvmStarter(); |
|
73 void handleJadJarCpArgs(); |
|
74 void setUidAndRootPath(); |
|
75 void addHandle(); |
|
76 void addApplicationArgs(); |
|
77 void storeNextArgument(std::wstring& arg); |
|
78 std::wstring getArgValue(const std::wstring& arg); |
|
79 |
|
80 /** |
|
81 * No default constructor. |
|
82 */ |
|
83 JavaStarterImpl(); |
|
84 |
|
85 private: |
|
86 java::runtime::JvmStarter* mJvmStarter; |
|
87 java::runtime::RuntimeStarterUtils* mRuntimeStarterUtils; |
|
88 const std::list<std::wstring>& mOriginalArgs; |
|
89 std::list<std::wstring>::const_iterator mOriginalArgsIter; |
|
90 std::list<std::wstring> mFlagArgs; |
|
91 std::wstring mJarFile; |
|
92 std::wstring mJadFile; |
|
93 std::wstring mClassPath; |
|
94 java::ui::CoreUiParams mUiParams; |
|
95 std::auto_ptr<java::util::Monitor> mMonitor; |
|
96 bool mShudownOk; |
|
97 bool mIsMainApp; |
|
98 java::runtime::JvmStarter::Configuration mConfiguration; |
|
99 java::util::Uid mAppUid; |
|
100 }; |
|
101 |
|
102 } // end namespace java |
|
103 |
|
104 #endif // JAVASTARTERIMPL_H |