Add ODE base interface and layout for rework 35/137735/5
authors414kim <s414.kim@samsung.com>
Fri, 7 Jul 2017 08:46:32 +0000 (17:46 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 31 Jul 2017 03:18:53 +0000 (03:18 +0000)
Change-Id: Ia0373341142148d55b014547c91576a0032854ed
Signed-off-by: s414kim <s414.kim@samsung.com>
12 files changed:
tools/apps/ode/CMakeLists.txt
tools/apps/ode/rework/application.cpp [new file with mode: 0644]
tools/apps/ode/rework/application.h [new file with mode: 0644]
tools/apps/ode/rework/interface/interface.cpp [new file with mode: 0644]
tools/apps/ode/rework/interface/interface.h [new file with mode: 0644]
tools/apps/ode/rework/interface/page.cpp [new file with mode: 0644]
tools/apps/ode/rework/interface/page.h [new file with mode: 0644]
tools/apps/ode/rework/language.h [new file with mode: 0644]
tools/apps/ode/rework/main.cpp [new file with mode: 0644]
tools/apps/ode/rework/ode.cpp [new file with mode: 0644]
tools/apps/ode/rework/ode.h [new file with mode: 0644]
tools/apps/ode/rework/widgets/window.h

index 3146eed..988f48d 100755 (executable)
@@ -39,6 +39,12 @@ SET(PKG_SRC ./src/ode-app.c
                        ./src/external-encrypt/confirm.c
                        ./src/external-decrypt/main.c
                        ./src/external-decrypt/confirm.c)
+SET(REWORK_SRC
+                       ./rework/main.cpp
+                       ./rework/ode.cpp
+                       ./rework/application.cpp
+                       ./rework/interface/interface.cpp
+                       ./rework/interface/page.cpp)
 
 SET(WIDGET_SRC         ./rework/widgets/widget.cpp
                        ./rework/widgets/window.cpp
@@ -59,7 +65,7 @@ SET(WIDGET_SRC                ./rework/widgets/widget.cpp
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
 
-ADD_EXECUTABLE(${PKG_NAME} ${PKG_SRC} ${WIDGET_SRC})
+ADD_EXECUTABLE(${PKG_NAME} ${REWORK_SRC} ${WIDGET_SRC})
 INSTALL(TARGETS ${PKG_NAME} DESTINATION ${APP_INSTALL_PREFIX}/${PKG_NAME}/bin)
 
 TARGET_LINK_LIBRARIES(${PKG_NAME} ${EFL_APP_LIBRARIES} ${tools_pkgs_LIBRARIES} ode)
diff --git a/tools/apps/ode/rework/application.cpp b/tools/apps/ode/rework/application.cpp
new file mode 100644 (file)
index 0000000..0a3d982
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "application.h"
+
+Application::Application(const std::string &name)
+       : packageName(name), appControl(nullptr)
+{
+}
+
+Application::~Application()
+{
+}
+
+bool Application::createDispatcher(void *data)
+{
+       Application *application = reinterpret_cast<Application *>(data);
+       return application->onCreate();
+}
+
+void Application::terminateDispatcher(void *data)
+{
+       Application *application = reinterpret_cast<Application *>(data);
+       return application->onTerminate();
+}
+
+void Application::pauseDispatcher(void *data)
+{
+       Application *application = reinterpret_cast<Application *>(data);
+       return application->onPause();
+}
+
+void Application::resumeDispatcher(void *data)
+{
+       Application *application = reinterpret_cast<Application *>(data);
+       return application->onResume();
+}
+
+void Application::appControlDispatcher(app_control_h app_control, void *data)
+{
+       Application *application = reinterpret_cast<Application *>(data);
+       application->appControl.reset(new AppControl {app_control});
+
+       return application->onAppControl();
+}
+
+void Application::languageChangedDispatcher(app_event_info_h event_info, void *user_data)
+{
+       int ret = 0;
+       char *locale = NULL;
+
+       ret = ::system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
+       if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
+               throw runtime::Exception("failed to get language");
+       }
+
+       ::elm_language_set(locale);
+       ::free(locale);
+}
+
+int Application::run(int argc, char *argv[])
+{
+       int ret = 0;
+       ui_app_lifecycle_callback_s event_callback = { 0, };
+       app_event_handler_h handlers[5] = { NULL, };
+
+       event_callback.create = createDispatcher;
+       event_callback.terminate = terminateDispatcher;
+       event_callback.pause = pauseDispatcher;
+       event_callback.resume = resumeDispatcher;
+       event_callback.app_control = appControlDispatcher;
+
+       try {
+               ::ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED],
+                                                                  APP_EVENT_LANGUAGE_CHANGED,
+                                                                  languageChangedDispatcher, NULL);
+
+               ret = ::ui_app_main(argc, argv, &event_callback, this);
+               if (ret != APP_ERROR_NONE)
+                       throw runtime::Exception("app_main() is failed");
+       } catch (runtime::Exception &e) {
+               dlog_print(DLOG_ERROR, packageName.c_str(), "%s", e.what());
+               ::ui_app_exit();
+       }
+
+       return ret;
+}
+
+bool Application::onCreate()
+{
+       return true;
+}
+
+void Application::onTerminate()
+{
+}
+
+void Application::onPause()
+{
+}
+
+void Application::onResume()
+{
+}
+
+void Application::onAppControl()
+{
+}
diff --git a/tools/apps/ode/rework/application.h b/tools/apps/ode/rework/application.h
new file mode 100644 (file)
index 0000000..d12d122
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __APPLICATION_H__
+#define __APPLICATION_H__
+
+#include <memory>
+
+#include <app.h>
+#include <app_common.h>
+#include <Elementary.h>
+#include <efl_util.h>
+
+#include <dlog.h>
+#include <system_info.h>
+#include <system_settings.h>
+#include <klay/exception.h>
+
+#include "widgets/appcontrol.h"
+
+class Application {
+public:
+       Application(const std::string &name);
+       virtual ~Application();
+
+       virtual int run(int argc, char *argv[]);
+protected:
+       virtual bool onCreate();
+       virtual void onResume();
+       virtual void onPause();
+       virtual void onTerminate();
+       virtual void onAppControl();
+
+protected:
+       std::string packageName;
+       std::unique_ptr<AppControl> appControl;
+
+private:
+       static bool createDispatcher(void *data);
+       static void resumeDispatcher(void *data);
+       static void pauseDispatcher(void *data);
+       static void terminateDispatcher(void *data);
+       static void appControlDispatcher(app_control_h app_control, void *data);
+       static void languageChangedDispatcher(app_event_info_h event_info, void *user_data);
+};
+
+#endif /*__APPLICATION_H__*/
diff --git a/tools/apps/ode/rework/interface/interface.cpp b/tools/apps/ode/rework/interface/interface.cpp
new file mode 100644 (file)
index 0000000..8a09fd8
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <dlog.h>
+#include "interface.h"
+
+ODEInterface::ODEInterface()
+       : window(new ConformantWindow{"ode", ELM_WIN_BASIC}),
+         naviframe(nullptr),
+         base(nullptr)
+{
+       window->show();
+}
+
+ODEInterface::~ODEInterface()
+{
+       if (base)
+               delete base;
+       if (naviframe)
+               delete naviframe;
+       if (window)
+               delete window;
+}
+
+void ODEInterface::create()
+{
+}
+
+void ODEInterface::dispose()
+{
+       ::ui_app_exit();
+}
+
+void ODEInterface::setNaviframe()
+{
+       if (naviframe == nullptr)
+               naviframe = new Naviframe(window);
+
+       naviframe->show();
+       naviframe->setFocus(true);
+       naviframe->setAutoPrevButton(true);
+       window->setContent(naviframe);
+}
+
+void ODEInterface::setBaseLayout()
+{
+       if (base == nullptr)
+               base =  new Layout(window);
+       window->setContent(base);
+}
+
+void ODEInterface::setFullContent(Widget *content)
+{
+       window->setIndicatorOpacity(ELM_WIN_INDICATOR_BG_TRANSPARENT);
+       window->setIndicatorOverlap(true);
+       window->setContent(content);
+}
+
+Widget *ODEInterface::getWindow()
+{
+       return window ? window : nullptr;
+}
diff --git a/tools/apps/ode/rework/interface/interface.h b/tools/apps/ode/rework/interface/interface.h
new file mode 100644 (file)
index 0000000..0ce6526
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __ODE_INTERFACE_H__
+#define __ODE_INTERFACE_H__
+
+#include "../widgets/window.h"
+#include "../widgets/layout.h"
+#include "../language.h"
+#include "page.h"
+
+class ODEInterface {
+public:
+       ODEInterface();
+       virtual ~ODEInterface();
+
+       virtual void create();
+       virtual void dispose();
+
+       void setBaseLayout();
+       void setFullContent(Widget *content);
+
+       Widget *getWindow();
+
+protected:
+       void setNaviframe();
+
+       Window *window;
+       Naviframe *naviframe;
+       Layout *base;
+};
+#endif
diff --git a/tools/apps/ode/rework/interface/page.cpp b/tools/apps/ode/rework/interface/page.cpp
new file mode 100644 (file)
index 0000000..055195e
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include "dlog.h"
+#include "page.h"
+
+Page::Page(Widget *parent, const std::string &name, int type)
+       : Layout(parent), nextButton(nullptr), prevButton(nullptr), content(nullptr), bottom(nullptr)
+{
+       setEDJPath("org.tizen.ode.edj");
+       setFile(edjFile, "base_layout");
+       initialize(name, type);
+       show();
+}
+
+Page::~Page()
+{
+}
+
+void Page::setEDJPath(const std::string &name)
+{
+       char *resPath = nullptr;
+       resPath = ::app_get_resource_path();
+       if (resPath) {
+               edjFile.append(resPath);
+               edjFile.append("/");
+               edjFile.append(name);
+       }
+       ::free(resPath);
+}
+
+void Page::initialize(const std::string &name, int type)
+{
+       content.reset(new Layout(this));
+       content->setFile(edjFile, name);
+       setContent("content_layout", content.get());
+
+       bottom.reset(new Layout(this));
+
+       if (type & Type::SetOneButton) {
+               bottom->setFile(edjFile, "next_button_layout");
+       } else  if (type & Type::SetTwoButton) {
+               bottom->setFile(edjFile, "two_button_layout");
+       }
+       setContent("bottom_layout", bottom.get());
+
+       nextButton.reset(new Button(this));
+       nextButton->setText(dgetText("IDS_ST_BUTTON_NEXT"));
+       nextButton->setStyle("bottom");
+       bottom->setContent("next_button", nextButton.get());
+
+       if (type & Type::SetTwoButton) {
+               prevButton.reset(new Button(this));
+               prevButton->setText(dgetText("IDS_ST_BUTTON_BACK"));
+               prevButton->setStyle("bottom");
+               bottom->setContent("prev_button", prevButton.get());
+       }
+}
+
+void Page::setPartContent()
+{
+}
diff --git a/tools/apps/ode/rework/interface/page.h b/tools/apps/ode/rework/interface/page.h
new file mode 100644 (file)
index 0000000..543af40
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __ODE_PAGE_H__
+#define __ODE_PAGE_H__
+
+#include <memory>
+#include <vector>
+
+#include "../widgets/signal.h"
+#include "../widgets/layout.h"
+#include "../widgets/button.h"
+#include "../widgets/naviframe.h"
+#include "../language.h"
+
+class Page : public Layout {
+public:
+       enum Type {
+               SetOneButton = (1 << 0),
+               SetTwoButton = (1 << 1),
+       };
+
+       Page(Widget *parent, const std::string &name, int type);
+       virtual ~Page();
+
+public:
+       std::unique_ptr<Button> nextButton;
+       std::unique_ptr<Button> prevButton;
+protected:
+       void setEDJPath(const std::string &name);
+       virtual void setPartContent(void);
+protected:
+       std::unique_ptr<Layout> content;
+       std::unique_ptr<Layout> bottom;
+       std::string edjFile;
+private:
+       void initialize(const std::string &name, int type);
+};
+
+#endif
diff --git a/tools/apps/ode/rework/language.h b/tools/apps/ode/rework/language.h
new file mode 100644 (file)
index 0000000..1de02f4
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __ODE_LANGUAGE_H__
+#define __ODE_LANGUAGE_H__
+
+const std::string moFile("ode");
+
+inline char *dgetText(const std::string &text)
+{
+       return ::dgettext(moFile.c_str(), text.c_str());
+}
+
+template <typename ...Args>
+std::string formatString(const std::string &format, Args &&...args)
+{
+       char buff[PATH_MAX] = "";
+       snprintf(buff, sizeof(buff), dgetText(format), std::forward<Args>(args)...);
+       return buff;
+}
+
+#endif
diff --git a/tools/apps/ode/rework/main.cpp b/tools/apps/ode/rework/main.cpp
new file mode 100644 (file)
index 0000000..b2560f5
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include "ode.h"
+
+int main(int argc, char *argv[])
+{
+       std::unique_ptr<Application> application;
+       char *name = nullptr;
+
+       name = strrchr(argv[0], '/');
+       name = name ? name + 1 : argv[0];
+
+       if (!strcmp(name, "ode")) {
+               application.reset(new ODEStandAlone{});
+       } else {
+               application.reset(new ODELaunchPad{});
+       }
+
+       return application->run(argc, argv);
+}
diff --git a/tools/apps/ode/rework/ode.cpp b/tools/apps/ode/rework/ode.cpp
new file mode 100644 (file)
index 0000000..3d7946c
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <dlog.h>
+#include "ode.h"
+
+ODELaunchPad::ODELaunchPad()
+       : Application("org.tizen.ode"), viewtype(""), mode(0), interface(nullptr)
+{
+}
+
+ODELaunchPad::~ODELaunchPad()
+{
+}
+
+int ODELaunchPad::getMode(const std::string &type)
+{
+       if (!type.compare("ENCRYPT_DEVICE")) {
+               return Type::ENCRYPT_DEVICE;
+       } else if (!type.compare("DECRYPT_DEVICE")) {
+               return Type::DECRYPT_DEVICE;
+       } else if (!type.compare("ENCRYPT_SD_CARD")) {
+               return Type::ENCRYPT_SD_CARD;
+       } else if (!type.compare("DECRYPT_SD_CARD")) {
+               return Type::DECRYPT_SD_CARD;
+       } else if (!type.compare("INSERT_SD_CARD")) {
+               return Type::INSERT_SD_CARD;
+       } else if (!type.compare("SD_CARD_PASSWORD")) {
+               return Type::SD_CARD_PASSWORD;
+       }
+       return Type::DO_NOT_SUPPORTED;
+}
+
+void ODELaunchPad::onAppControl()
+{
+       viewtype = appControl->getData("viewtype");
+       mode = getMode(viewtype);
+
+       switch (mode) {
+       case Type::ENCRYPT_DEVICE:
+               /* TBD create interface */
+               break;
+       case Type::DECRYPT_DEVICE:
+               /* TBD create interface */
+               break;
+       case Type::ENCRYPT_SD_CARD:
+               /* TBD create interface */
+               break;
+       case Type::DECRYPT_SD_CARD:
+               /* TBD create interface */
+               break;
+       case Type::INSERT_SD_CARD:
+               /* TBD create interface */
+               break;
+       case Type::SD_CARD_PASSWORD:
+               /* TBD create interface */
+               break;
+       default:
+               throw runtime::Exception("Do not supported viewtype");
+               break;
+       }
+
+       if (interface)
+               interface->create();
+}
+
+void ODELaunchPad::onTerminate()
+{
+       if (interface) {
+               delete interface;
+       }
+}
+
+ODEStandAlone::ODEStandAlone()
+       : Application("ode"), interface(nullptr)
+{
+}
+
+ODEStandAlone::~ODEStandAlone()
+{
+}
+
+void ODEStandAlone::createProgressInterface(const std::string &type, const std::string &target)
+{
+       if (!type.compare("Encrypting") && !target.compare("External")) {
+               /* TBD create interface */
+       } else if (!type.compare("Decrypting") && !target.compare("External")) {
+               /* TBD create interface */
+       } else if (!type.compare("Encrypting") && !target.compare("Internal")) {
+               /* TBD create interface */
+       } else {
+               /* TBD create interface */
+       }
+}
+
+int ODEStandAlone::run(int argc, char *argv[])
+{
+       char *lang = nullptr;
+       ::setenv("HOME", "/opt/home/root", 1);
+       if (argc < 2) {
+               return -1;
+       }
+
+       lang = ::vconf_get_str(VCONFKEY_LANGSET);
+       ::setlocale(LC_ALL, lang);
+       if (lang) {
+               ::free(lang);
+       }
+       ::bindtextdomain("ode", "/usr/apps/org.tizen.ode/res/locale");
+
+       ::elm_init(argc, argv);
+       ::elm_scale_set(1.8);
+       if (!strncmp(argv[1], "progress", sizeof("progress"))) {
+               if (argc < 4) {
+                       return -1;
+               }
+               createProgressInterface(argv[2], argv[3]);
+       }
+
+       ::elm_run();
+       return EXIT_SUCCESS;
+}
diff --git a/tools/apps/ode/rework/ode.h b/tools/apps/ode/rework/ode.h
new file mode 100644 (file)
index 0000000..0fc2a77
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __ODE_APPLICATION_H__
+#define __ODE_APPLICATION_H__
+
+#include <vconf.h>
+
+#include "application.h"
+#include "interface/interface.h"
+
+class ODELaunchPad : public Application {
+public:
+       enum Type {
+               ENCRYPT_DEVICE = 1,
+               DECRYPT_DEVICE,
+               ENCRYPT_SD_CARD,
+               DECRYPT_SD_CARD,
+               INSERT_SD_CARD,
+               SD_CARD_PASSWORD,
+               DO_NOT_SUPPORTED,
+       };
+
+       ODELaunchPad();
+       ~ODELaunchPad();
+
+       void onAppControl();
+       void onTerminate();
+
+private:
+       int getMode(const std::string &type);
+       std::string viewtype;
+       int mode;
+       ODEInterface *interface;
+};
+
+class ODEStandAlone : public Application {
+public:
+       ODEStandAlone();
+       ~ODEStandAlone();
+
+       int run(int argc, char *argv[]);
+       void createProgressInterface(const std::string &type, const std::string &target);
+private:
+       std::unique_ptr<ODEInterface> interface;
+};
+
+#endif
index 27010cf..d9f6c52 100644 (file)
@@ -38,6 +38,7 @@ public:
        void setConfig(int config);
        void setNotificationLevel(efl_util_notification_level_e level);
        void setIndicatorOpacity(Elm_Win_Indicator_Opacity_Mode mode);
+       virtual void setIndicatorOverlap(bool set) = 0;
        void resize(Widget *widget);
 
 protected: