2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dpl/application.h>
20 #include <dpl/generic_event.h>
21 #include <dpl/event/controller.h>
22 #include <dpl/type_list.h>
24 #include <dpl/log/log.h>
31 DECLARE_GENERIC_EVENT_0(QuitEvent)
32 DECLARE_GENERIC_EVENT_0(NextStepEvent)
35 public DPL::Application,
36 private DPL::Event::Controller<DPL::TypeListDecl<QuitEvent,
37 NextStepEvent>::Type>,
38 public DPL::TaskDecl<WrtClient>
55 ReturnStatus::Type getReturnStatus() const;
58 virtual void OnStop();
59 virtual void OnCreate();
60 virtual void OnResume();
61 virtual void OnPause();
62 virtual void OnReset(bundle *b);
63 virtual void OnTerminate();
65 void showHelpAndQuit();
67 void setSdkLauncherDebugData();
70 virtual void OnEventReceived(const QuitEvent &event);
71 virtual void OnEventReceived(const NextStepEvent& event);
76 void installNewPlugins();
77 void launchNameStep();
78 void launchGUIDStep();
79 void killWidgetStep();
80 void finalizeLaunchStep();
82 void setDeveloperModeStep();
83 void setComplianceModeStep();
84 void setComplianceImeiStep();
85 void setComplianceMeidStep();
89 static void staticWrtInitCallback(WrtErrStatus status,
91 static void staticWrtLaunchWidgetCallback(void*,
96 static void staticWrtStatusCallback(int handle,
99 static void staticWrtPluginInstallationCallback(
102 static void staticWrtPluginInstallProgressCb(
104 const char* description,
106 static void staticWrtResumeStatusCallback(int handle,
109 static void staticWrtSuspendStatusCallback(int handle,
112 static void staticWrtResetStatusCallback(int handle,
115 static void staticCloseWidgetCallback(int widget_handle,
117 static void staticSetDeveloperModeCallback(void *userParam);
118 static void staticSetComplianceModeCallback(void *userParam);
119 static void staticSetComplianceImeiCallback(void *userParam);
120 static void staticSetComplianceMeidCallback(void *userParam);
123 std::string m_packagePath;
128 int m_sdkLauncherPid;
131 unsigned short m_debuggerPort;
132 bool m_developerMode;
133 bool m_complianceMode;
134 std::string m_complianceIMEI;
135 std::string m_complianceMEID;
136 size_t m_numPluginsToInstall;
137 ReturnStatus::Type m_returnStatus;
138 bool m_startupPluginInstallation;
141 struct WrtClientUserData
148 WrtClientUserData() :
156 WrtClientUserData(WrtClient *currentClient,
157 unsigned long *pidNum,
159 bool currentDebugMode) :
163 debugMode(currentDebugMode)
168 #endif // WRT_CLIENT_H