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>
30 DECLARE_GENERIC_EVENT_0(QuitEvent)
31 DECLARE_GENERIC_EVENT_0(NextStepEvent)
34 public DPL::Application,
35 private DPL::Event::Controller<DPL::TypeListDecl<QuitEvent,
36 NextStepEvent>::Type>,
37 public DPL::TaskDecl<WrtClient>
54 ReturnStatus::Type getReturnStatus() const;
57 virtual void OnStop();
58 virtual void OnCreate();
59 virtual void OnResume();
60 virtual void OnPause();
61 virtual void OnReset(bundle *b);
62 virtual void OnTerminate();
64 void showHelpAndQuit();
66 void setSdkLauncherDebugData();
69 virtual void OnEventReceived(const QuitEvent &event);
70 virtual void OnEventReceived(const NextStepEvent& event);
75 void installNewPlugins();
76 void launchNameStep();
77 void launchGUIDStep();
78 void killWidgetStep();
79 void finalizeLaunchStep();
81 void setDeveloperModeStep();
82 void setComplianceModeStep();
83 void setComplianceImeiStep();
84 void setComplianceMeidStep();
88 static void staticWrtInitCallback(WrtErrStatus status,
90 static void staticWrtLaunchWidgetCallback(void*,
95 static void staticWrtStatusCallback(int handle,
98 static void staticWrtPluginInstallationCallback(
101 static void staticWrtPluginInstallProgressCb(
103 const char* description,
105 static void staticWrtResumeStatusCallback(int handle,
108 static void staticWrtSuspendStatusCallback(int handle,
111 static void staticCloseWidgetCallback(int widget_handle,
113 static void staticSetDeveloperModeCallback(void *userParam);
114 static void staticSetComplianceModeCallback(void *userParam);
115 static void staticSetComplianceImeiCallback(void *userParam);
116 static void staticSetComplianceMeidCallback(void *userParam);
117 static void staticSetAppServiceData(const char *key,
122 std::string m_bundleValue;
123 std::string m_packagePath;
128 int m_sdkLauncherPid;
130 unsigned short m_debuggerPort;
131 bool m_developerMode;
132 bool m_complianceMode;
133 std::string m_complianceIMEI;
134 std::string m_complianceMEID;
135 size_t m_numPluginsToInstall;
136 ReturnStatus::Type m_returnStatus;
137 bool m_startupPluginInstallation;
140 struct WrtClientUserData
148 #endif // WRT_CLIENT_H