tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.031708 submit/tizen_2.4/20151028.064712 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:06:09 +0000 (17:06 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:06:09 +0000 (17:06 +0900)
198 files changed:
CMakeLists.txt
LICENSE.Apache_v2 [moved from LICENSE with 100% similarity]
NOTICE
crash-popup/CMakeLists.txt [deleted file]
crash-popup/micro-src/CMakeLists.txt [deleted file]
crash-popup/micro-src/crash.c [deleted file]
crash-popup/micro-src/crash.h [deleted file]
crash-popup/src/CMakeLists.txt [deleted file]
crash-popup/src/crash.c [deleted file]
crash-popup/src/crash.h [deleted file]
crash-popup/src/org.tizen.crash-popup.efl [deleted file]
data/org.tizen.datausage-syspopup.xml [deleted file]
data/org.tizen.host-devices.xml [deleted file]
data/org.tizen.lowbat-syspopup.png [deleted file]
data/org.tizen.lowbat-syspopup.xml [deleted file]
data/org.tizen.lowmem-syspopup.png [deleted file]
data/org.tizen.lowmem-syspopup.xml [deleted file]
data/org.tizen.mmc-syspopup.xml [deleted file]
data/org.tizen.poweroff-syspopup.png [deleted file]
data/org.tizen.usb-syspopup.xml [deleted file]
data/org.tizen.usbotg-syspopup.xml [deleted file]
datausage-popup/CMakeLists.txt [deleted file]
datausage-popup/src/datausage.c [deleted file]
edcs/crash.edc [deleted file]
edcs/icons/accessibility.png [deleted file]
edcs/icons/battery_low_cover.png [deleted file]
edcs/icons/brightness_empty.png [deleted file]
edcs/icons/brightness_full.png [deleted file]
edcs/icons/circle-cancel.png [deleted file]
edcs/icons/circle-ok.png [deleted file]
edcs/icons/circle-setting.png [deleted file]
edcs/icons/emergency.png [deleted file]
edcs/icons/flightmode.png [deleted file]
edcs/icons/micro-flightmodeoff.png [deleted file]
edcs/icons/micro-flightmodeon.png [deleted file]
edcs/icons/micro-mobiledata-disabled.png [deleted file]
edcs/icons/micro-mobiledata-off.png [deleted file]
edcs/icons/micro-mobiledata-on.png [deleted file]
edcs/icons/micro-mute.png [deleted file]
edcs/icons/micro-outdooroff.png [deleted file]
edcs/icons/micro-outdooron.png [deleted file]
edcs/icons/micro-poweroff.png [deleted file]
edcs/icons/micro-restart.png [deleted file]
edcs/icons/micro-sound.png [deleted file]
edcs/icons/micro-vibration.png [deleted file]
edcs/icons/personal.png [deleted file]
edcs/icons/poweroff.png [deleted file]
edcs/icons/restart.png [deleted file]
edcs/icons/usb_icon_blue.png [deleted file]
edcs/icons/vibration.png [deleted file]
edcs/lite-poweroff.edc [deleted file]
edcs/lowbatt.edc [deleted file]
edcs/lowmem.edc [deleted file]
edcs/micro-common.edc [deleted file]
edcs/micro-poweroff.edc [deleted file]
edcs/poweroff.edc [deleted file]
edcs/system.edc [deleted file]
edcs/table/system-color.xml [deleted file]
edcs/table/system-font.xml [deleted file]
edcs/usbotg-unmount.edc [deleted file]
edcs/usbotg.edc [deleted file]
lowbatt-popup/CMakeLists.txt [deleted file]
lowbatt-popup/micro-src/CMakeLists.txt [deleted file]
lowbatt-popup/micro-src/lowbatt.c [deleted file]
lowbatt-popup/micro-src/lowbatt.h [deleted file]
lowbatt-popup/micro-src/org.tizen.lowbat-syspopup.efl [deleted file]
lowbatt-popup/src/CMakeLists.txt [deleted file]
lowbatt-popup/src/lowbatt.c [deleted file]
lowbatt-popup/src/lowbatt.h [deleted file]
lowbatt-popup/src/org.tizen.lowbat-syspopup.efl [deleted file]
lowmem-popup/CMakeLists.txt [deleted file]
lowmem-popup/micro-src/CMakeLists.txt [deleted file]
lowmem-popup/micro-src/lowmem.c [deleted file]
lowmem-popup/micro-src/org.tizen.lowmem-syspopup.efl [deleted file]
lowmem-popup/src/CMakeLists.txt [deleted file]
lowmem-popup/src/lowmem.c [deleted file]
lowmem-popup/src/lowmem.h [deleted file]
lowmem-popup/src/org.tizen.lowmem-syspopup.efl [deleted file]
mmc-popup/CMakeLists.txt [deleted file]
mmc-popup/src/mmc.c [deleted file]
mmc-popup/src/mmc.h [deleted file]
packaging/org.tizen.datausage-syspopup.efl [deleted file]
packaging/org.tizen.mmc-syspopup.efl [deleted file]
packaging/org.tizen.usb-syspopup.efl [deleted file]
packaging/org.tizen.usbotg-syspopup.efl [deleted file]
packaging/system-apps.manifest
packaging/system-popup.spec
po/CMakeLists.txt
po/src/ga.po
popup-launcher/CMakeLists.txt [deleted file]
popup-launcher/micro-src/CMakeLists.txt [deleted file]
popup-launcher/micro-src/app.c [deleted file]
popup-launcher/micro-src/launcher.c [deleted file]
popup-launcher/micro-src/launcher.h [deleted file]
popup-launcher/micro-src/popup.c [deleted file]
popup-launcher/micro-src/system-apps.efl [deleted file]
popup-launcher/src/launcher.c [deleted file]
popup-launcher/src/org.tizen.system.popup.service [deleted file]
popup-launcher/src/popup.c [deleted file]
poweroff-popup/CMakeLists.txt [deleted file]
poweroff-popup/src/CMakeLists.txt [deleted file]
poweroff-popup/src/poweroff.c [deleted file]
share/common.c [deleted file]
share/common.h [deleted file]
share/micro-common.c [deleted file]
share/micro-common.h [deleted file]
signal-sender/CMakeLists.txt
signal-sender/org.tizen.system-signal-sender.efl [moved from packaging/org.tizen.system-signal-sender.efl with 61% similarity]
signal-sender/org.tizen.system-signal-sender.xml [moved from data/org.tizen.system-signal-sender.xml with 75% similarity]
signal-sender/signal-sender.c
signal-sender/signal-sender.h
src/CMakeLists.txt [changed mode: 0644->0755]
src/README [new file with mode: 0644]
src/battery/lowbattery-micro.c [new file with mode: 0755]
src/battery/lowbattery-mobile.c [new file with mode: 0755]
src/battery/lowbattery.c [deleted file]
src/common/core.c
src/common/macro.h [new file with mode: 0755]
src/common/popup-common-internal.h
src/common/popup-common.c
src/common/popup-common.h
src/common/popup-ui-micro-b2.c [deleted file]
src/common/popup-ui-micro-circle.c [deleted file]
src/common/popup-ui-micro.c [deleted file]
src/common/popup-ui-normal.c [moved from src/common/popup-ui-micro-b3.c with 95% similarity]
src/common/popup-ui.c
src/common/popup-ui.h
src/cooldown/cooldown-micro.c [moved from src/cooldown/cooldown.c with 85% similarity]
src/cooldown/cooldown-mobile.c [new file with mode: 0755]
src/crash/CMakeLists.txt [new file with mode: 0755]
src/crash/crash.c [new file with mode: 0755]
src/crash/org.tizen.crash-popup.efl [moved from crash-popup/micro-src/org.tizen.crash-popup.efl with 77% similarity]
src/crash/org.tizen.crash-popup.xml [moved from data/org.tizen.crash-popup.xml with 71% similarity]
src/datausage/datausage-micro.c [moved from src/datausage/datausage.c with 96% similarity]
src/datausage/datausage-mobile.c [new file with mode: 0755]
src/flightmode/flightmode.c [deleted file]
src/launcher/CMakeLists.txt [moved from popup-launcher/src/CMakeLists.txt with 53% similarity]
src/launcher/app.c [moved from popup-launcher/src/app.c with 100% similarity]
src/launcher/launcher.c [new file with mode: 0755]
src/launcher/launcher.h [moved from popup-launcher/src/launcher.h with 52% similarity]
src/launcher/noti.c [moved from popup-launcher/src/noti.c with 93% similarity]
src/launcher/org.tizen.system.popup.service [moved from popup-launcher/micro-src/org.tizen.system.popup.service with 85% similarity]
src/launcher/popup.c [new file with mode: 0755]
src/launcher/system-apps.efl [moved from popup-launcher/src/system-apps.efl with 65% similarity]
src/mmc/mmc-mobile.c [new file with mode: 0755]
src/mobiledata/mobiledata.c [deleted file]
src/ode/ode-mobile.c [new file with mode: 0755]
src/org.tizen.system-syspopup.efl [moved from packaging/org.tizen.system-syspopup.efl with 79% similarity]
src/org.tizen.system-syspopup.xml [moved from data/org.tizen.system-syspopup.xml with 71% similarity, mode: 0644]
src/poweroff/CMakeLists.txt [new file with mode: 0755]
src/poweroff/org.tizen.poweroff-syspopup.efl [moved from poweroff-popup/src/org.tizen.poweroff-syspopup.efl with 79% similarity]
src/poweroff/org.tizen.poweroff-syspopup.xml [moved from data/org.tizen.poweroff-syspopup.xml with 76% similarity]
src/poweroff/poweroff.c [new file with mode: 0755]
src/recovery/recovery-mobile.c [new file with mode: 0755]
src/storage/lowstorage-micro.c [new file with mode: 0755]
src/storage/lowstorage-mobile.c [new file with mode: 0755]
src/usb/usb-device.c [new file with mode: 0755]
src/usb/usb-mobile.c [new file with mode: 0755]
src/usb/usbotg-mobile.c [new file with mode: 0755]
src/usbhost-devices/CMakeLists.txt [moved from usbhost-devices/CMakeLists.txt with 59% similarity]
src/usbhost-devices/edcs/host-devices.edc [moved from edcs/host-devices.edc with 100% similarity]
src/usbhost-devices/edcs/usb_icon_blue.png [moved from usbhost-devices/data/usb_icon_blue.png with 100% similarity, mode: 0644]
src/usbhost-devices/host-devices.c [moved from usbhost-devices/host-devices.c with 81% similarity]
src/usbhost-devices/org.tizen.host-devices.efl [moved from packaging/org.tizen.host-devices.efl with 72% similarity]
src/usbhost-devices/org.tizen.host-devices.xml [moved from usbhost-devices/data/org.tizen.host-devices.xml with 77% similarity]
src/watchdog/watchdog.c
sys-device-noti/CMakeLists.txt [deleted file]
sys-device-noti/sys-device-noti-micro.c [deleted file]
sys-device-noti/sys-device-noti.c [deleted file]
sys-device-noti/sys-device-noti.h [deleted file]
system-popup/CMakeLists.txt [deleted file]
system-popup/src/CMakeLists.txt [deleted file]
system-popup/src/acc-assistive-light.c [deleted file]
system-popup/src/acc-negative-colors.c [deleted file]
system-popup/src/acc-tts.c [deleted file]
system-popup/src/acc-zoom.c [deleted file]
system-popup/src/accessibility.c [deleted file]
system-popup/src/accessibility.h [deleted file]
system-popup/src/cooldown_poweroff.c [deleted file]
system-popup/src/cooldown_poweron.c [deleted file]
system-popup/src/core.c [deleted file]
system-popup/src/core.h [deleted file]
system-popup/src/ode_error.c [deleted file]
system-popup/src/recovery.c [deleted file]
system-popup/src/safemode.c [deleted file]
system-popup/src/usbotg_mount_failed.c [deleted file]
system-popup/src/usbotg_removed_unsafe.c [deleted file]
system-popup/src/watchdog.c [deleted file]
system-servant/CMakeLists.txt
system-servant/system-servant.c
test/CMakeLists.txt [deleted file]
test/test.c [deleted file]
usb-popup/CMakeLists.txt [deleted file]
usb-popup/src/usb-syspopup.c [deleted file]
usb-popup/src/usb-syspopup.h [deleted file]
usbotg-popup/CMakeLists.txt [deleted file]
usbotg-popup/src/usbotg-syspopup.c [deleted file]
usbotg-popup/src/usbotg-syspopup.h [deleted file]

index 2d4267c..6e8b94a 100644 (file)
@@ -5,60 +5,41 @@ PROJECT(system-popup C)
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(SYSTEM_RESDIR "${PREFIX}/share/system-apps/res")
 SET(SYSTEM_ICONDIR "${SYSTEM_RESDIR}/icons")
+SET(LICENSEDIR "${PREFIX}/share/license")
 
 SET(LOCALE_DIR "/usr/share/locale")
 SET(LANG_DOMAIN "system-apps")
 
+IF(PROFILE STREQUAL mobile)
+       OPTION(PROFILE_MOBILE "Mobile device" ON)
+ENDIF()
+IF(PROFILE STREQUAL wearable)
+       OPTION(PROFILE_WEARABLE "Wearable device" ON)
+ENDIF()
+IF(PROFILE STREQUAL tv)
+       OPTION(PROFILE_TV "TV device" ON)
+ENDIF()
+
 ADD_DEFINITIONS("-DLOCALE_DIR=\"${LOCALE_DIR}\"")
 ADD_DEFINITIONS("-DLANG_DOMAIN=\"${LANG_DOMAIN}\"")
 ADD_DEFINITIONS("-DSYSTEM_ICONDIR=\"${SYSTEM_ICONDIR}\"")
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ADD_DEFINITIONS("-DTIZEN_MICRO")
-ENDIF()
+ADD_DEFINITIONS("-DPROFILE=\"${PROFILE}\"")
 
-IF("$ENV{CFLAGS}" MATCHES "-DSYSTEM_APPS_CIRCLE")
-       ADD_DEFINITIONS("-DSYSTEM_APPS_CIRCLE")
-ENDIF()
+SET(COMMON_SRCS
+               ${CMAKE_SOURCE_DIR}/src/common/core.c
+               ${CMAKE_SOURCE_DIR}/src/common/popup-common.c
+               ${CMAKE_SOURCE_DIR}/src/common/popup-ui.c
+               ${CMAKE_SOURCE_DIR}/src/common/popup-ui-normal.c
+)
 
 # SUbmodules
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
 ADD_SUBDIRECTORY(src)
-ELSE()
-ADD_SUBDIRECTORY(usbhost-devices)
-ADD_SUBDIRECTORY(mmc-popup)
-ADD_SUBDIRECTORY(usb-popup)
-ADD_SUBDIRECTORY(usbotg-popup)
-ADD_SUBDIRECTORY(datausage-popup)
-ADD_SUBDIRECTORY(system-popup)
-ADD_SUBDIRECTORY(poweroff-popup)
-ADD_SUBDIRECTORY(signal-sender)
-ADD_SUBDIRECTORY(test)
-ENDIF()
-
-ADD_SUBDIRECTORY(lowbatt-popup)
-ADD_SUBDIRECTORY(lowmem-popup)
-ADD_SUBDIRECTORY(crash-popup)
-ADD_SUBDIRECTORY(popup-launcher)
+ADD_SUBDIRECTORY(src/poweroff)
+ADD_SUBDIRECTORY(src/crash)
+ADD_SUBDIRECTORY(src/usbhost-devices)
+ADD_SUBDIRECTORY(src/launcher)
 ADD_SUBDIRECTORY(po)
-ADD_SUBDIRECTORY(sys-device-noti)
 ADD_SUBDIRECTORY(system-servant)
-
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ELSE()
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.mmc-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.usb-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.usbotg-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.datausage-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.poweroff-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.host-devices)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.system-signal-sender)
-ENDIF()
-
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME system-popup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.lowbatt-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.lowmem-syspopup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.crash-popup)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME org.tizen.system-syspopup)
+ADD_SUBDIRECTORY(signal-sender)
 
 ############## END ##############
similarity index 100%
rename from LICENSE
rename to LICENSE.Apache_v2
diff --git a/NOTICE b/NOTICE
index 98d0da3..72d7f49 100644 (file)
--- a/NOTICE
+++ b/NOTICE
@@ -1,3 +1,3 @@
 Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
 Except as noted, This software is licensed under Apache License, Version 2.
-Please, see the LICENSE file for Apache License terms and conditions.
+Please, see the LICENSE.Apache_v2 file for Apache License terms and conditions.
diff --git a/crash-popup/CMakeLists.txt b/crash-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index cbeee07..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-########################### low memory ###########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(crash-popup C)
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ADD_SUBDIRECTORY(micro-src)
-ELSE()
-ADD_SUBDIRECTORY(src)
-ENDIF()
diff --git a/crash-popup/micro-src/CMakeLists.txt b/crash-popup/micro-src/CMakeLists.txt
deleted file mode 100755 (executable)
index 138bcd8..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-
-########################### crash popup ###########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(VENDOR "tizen")
-SET(PACKAGE "crash-popup")
-SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(TABLE_PATH ${CMAKE_SOURCE_DIR}/edcs/table)
-
-SET(SRCS
-               ${CMAKE_SOURCE_DIR}/crash-popup/micro-src/crash.c
-               ${CMAKE_SOURCE_DIR}/share/micro-common.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(crash_pkgs REQUIRED
-               appcore-efl
-               elementary
-               syspopup
-               ecore
-               deviced
-               pkgmgr-info
-               dlog
-               efl-assist
-               feedback
-)
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/crash-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-FOREACH(flag ${crash_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${crash_pkgs_LDFLAGS})
-
-SET(COMMON_EDC "micro-common.edc")
-ADD_CUSTOM_TARGET(crash.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/${COMMON_EDC} ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/crash.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/${COMMON_EDC}
-)
-ADD_DEPENDENCIES(${PACKAGE} crash.edj)
-
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/crash.edj DESTINATION ${RESDIR}/edje/crash)
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.crash-popup/bin)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.crash-popup.xml DESTINATION /usr/share/packages/)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PACKAGE}/micro-src/org.tizen.crash-popup.efl DESTINATION /etc/smack/accesses.d)
-
-INSTALL(FILES ${TABLE_PATH}/system-font.xml  DESTINATION ${RESDIR}/table)
-INSTALL(FILES ${TABLE_PATH}/system-color.xml DESTINATION ${RESDIR}/table)
-
-################################# End ##############################################
-
diff --git a/crash-popup/micro-src/crash.c b/crash-popup/micro-src/crash.c
deleted file mode 100755 (executable)
index c4a7bff..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <pkgmgr-info.h>
-#include <dd-display.h>
-#include <dd-deviced.h>
-#include "micro-common.h"
-#include "crash.h"
-
-#define DIRECT_LAUNCHED  3
-#define MAX_PROCESS_NAME NAME_MAX
-
-#define EDJ_PATH "/usr/apps/org.tizen.crash-popup/res/edje/crash"
-#define EDJ_NAME EDJ_PATH"/crash.edj"
-
-static int is_syspoup;
-static char process_name[NAME_MAX];
-static char exepath[PATH_MAX];
-
-/* pkgmgrinfo filter list function for getting application ID */
-static int appinfo_get_appname_func(pkgmgrinfo_appinfo_h handle,
-               void *user_data)
-{
-       char *str = NULL;
-       int ret = PMINFO_R_ERROR;
-       pkgmgrinfo_appinfo_get_label(handle, &str);
-       if (str) {
-               (*(char **)user_data) = strdup(str);
-               if (user_data)
-                       ret = PMINFO_R_OK;
-       }
-       return ret;
-}
-
-/* get application ID by ail filter */
-static char *get_app_name(const char *exepath)
-{
-       pkgmgrinfo_appinfo_filter_h handle = NULL;
-       int count, ret;
-       char *name = NULL;
-
-       ret = pkgmgrinfo_appinfo_filter_create(&handle);
-       if (ret != PMINFO_R_OK) {
-               goto out;
-       }
-
-       ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_EXEC, exepath);
-       if (ret != PMINFO_R_OK) {
-               goto out_free;
-       }
-
-       ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
-       if (ret != PMINFO_R_OK) {
-               goto out_free;
-       }
-
-       if (count < 1) {
-               goto out_free;
-       } else {
-               ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, appinfo_get_appname_func, &name);
-               if (ret != PMINFO_R_OK) {
-                       name = NULL;
-                       goto out_free;
-               }
-       }
-
-out_free:
-       pkgmgrinfo_appinfo_filter_destroy(handle);
-out:
-       return name;
-}
-
-void popup_ok_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       fflush(stdout);
-       popup_terminate();
-}
-
-static int load_crash_process_popup(struct appdata *ad, char *name)
-{
-       char buf[MAX_PROCESS_NAME] = {0, };
-       char *text, *subtext;
-       int len;
-
-       if (!ad)
-               return -EINVAL;
-
-       subtext = _("IDS_ST_BODY_PS_HAS_CLOSED_UNEXPECTEDLY");
-       snprintf(buf, sizeof(buf), subtext, name);
-
-       len = strlen(buf) + 3; /* 3: one period, one space, and one '\0' */
-       text = (char *)malloc(len);
-       if (!text) {
-               _E("FAIL: malloc()");
-               return -ENOMEM;
-       }
-
-       snprintf(text, len, "%s", buf);
-       _I("Popup content: %s", text);
-
-       evas_object_show(ad->win_main);
-
-#ifdef SYSTEM_APPS_CIRCLE
-       ad->popup = load_normal_popup(ad,
-                       EDJ_NAME,
-                       NULL,
-                       text,
-                       _("IDS_COM_SK_OK"),
-                       "circle-ok.png",
-                       popup_ok_cb,
-                       NULL, NULL, NULL);
-
-#else
-       ad->popup = load_normal_popup(ad,
-                       NULL,
-                       text,
-                       _("IDS_COM_SK_OK"),
-                       popup_ok_cb,
-                       NULL, NULL);
-#endif
-
-       FREE(text);
-
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-       reset_window_priority(win, UTILX_NOTIFICATION_LEVEL_HIGH);
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       const char *name, *path;
-       char *str;
-       char tname[NAME_MAX + 1] = {0,};
-       int ret;
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-
-       if (is_syspoup) {
-               if (syspopup_create(b, &(ad->handler), ad->win_main, ad) < 0) {
-                       _E("FAIL: syspopup_create()");
-                       ret = -ENOMEM;
-                       goto crash_reset_out;
-               }
-
-               name = bundle_get_val(b, "_PROCESS_NAME_");
-               if (!name) {
-                       _E("FAIL: bundle_get_val()");
-                       ret = -ENOMEM;
-                       goto crash_reset_out;
-               }
-               _D("bundle_get_val - process_name:%s", name);
-
-               path = bundle_get_val(b, "_EXEPATH_");
-               if (!path) {
-                       _E("FAIL: bundle_get_val()");
-                       ret = -ENOMEM;
-                       goto crash_reset_out;
-               }
-               _D("bundle_get_val - exepath:%s", path);
-
-       } else {
-               name = process_name;
-               path = exepath;
-       }
-
-       str = get_app_name(path);
-       if (str) {
-               snprintf(tname, sizeof(tname), "%s", str);
-       } else {
-               snprintf(tname, sizeof(tname), "%s", name);
-       }
-
-       ret = load_crash_process_popup(ad, tname);
-       if (ret < 0)
-               goto crash_reset_out;
-
-       if (display_change_state(LCD_NORMAL) < 0)
-               _E("Failed to set display");
-
-       return 0;
-
-crash_reset_out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       deviced_conf_set_mempolicy(OOM_IGNORE);
-
-       if (!ecore_x_init(NULL)) {
-               _E("Cannot connect to X11 display\n");
-               return -1;
-       }
-
-       if (argc == DIRECT_LAUNCHED) {
-               _I("direct launched - process_name:%s exepath:%s", argv[1], argv[2]);
-               snprintf(process_name, sizeof(process_name), "%s", argv[1]);
-               snprintf(exepath, sizeof(exepath), "%s", argv[2]);
-               is_syspoup = false;
-       } else {
-               is_syspoup = true;
-       }
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/crash-popup/micro-src/crash.h b/crash-popup/micro-src/crash.h
deleted file mode 100644 (file)
index 4b2426a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * CRASH-POPUP
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 __CRASH_POPUP_H__
-#define __CRASH_POPUP_H__
-
-#include <dlog.h>
-
-#undef LOG_TAG
-#define LOG_TAG "CRASH_POPUP"
-
-#undef _D
-#undef _I
-#undef _W
-#undef _E
-#undef _SD
-#undef _SI
-#undef _SW
-#undef _SE
-
-#define _D(fmt, arg...) LOGD(fmt, ##arg)
-#define _I(fmt, arg...) LOGI(fmt, ##arg)
-#define _W(fmt, arg...) LOGW(fmt, ##arg)
-#define _E(fmt, arg...) LOGE(fmt, ##arg)
-#define _SD(fmt, arg...) SECURE_LOGD(fmt, ##arg)
-#define _SI(fmt, arg...) SECURE_LOGI(fmt, ##arg)
-#define _SW(fmt, arg...) SECURE_LOGW(fmt, ##arg)
-#define _SE(fmt, arg...) SECURE_LOGE(fmt, ##arg)
-
-#endif
-/* __CRASH_POPUP_H__ */
diff --git a/crash-popup/src/CMakeLists.txt b/crash-popup/src/CMakeLists.txt
deleted file mode 100755 (executable)
index b6dd5af..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-
-########################### low memory ###########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(crash-popup C)
-
-SET(SRCS
-               ${CMAKE_SOURCE_DIR}/crash-popup/src/crash.c
-               ${CMAKE_SOURCE_DIR}/share/common.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(crash_pkgs REQUIRED
-               appcore-efl
-               elementary
-               syspopup
-               ecore
-               deviced
-               dlog
-               pkgmgr-info
-               efl-assist
-               feedback
-)
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/crash-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-FOREACH(flag ${crash_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g -I/usr/include/elementary-0 ")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${crash_pkgs_LDFLAGS})
-
-ADD_CUSTOM_TARGET(crash.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/crash.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/crash.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/crash.edc
-)
-ADD_DEPENDENCIES(${PROJECT_NAME} crash.edj)
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.crash-popup/bin)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/crash.edj DESTINATION /usr/apps/org.tizen.crash-popup/res/edje/crash)
-
-# install desktop file & icon
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.crash-popup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/crash-popup/src/org.tizen.crash-popup.efl DESTINATION /etc/smack/accesses.d)
-
-################################# End ##############################################
-
diff --git a/crash-popup/src/crash.c b/crash-popup/src/crash.c
deleted file mode 100755 (executable)
index 8b48b00..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include <Ecore_X.h>
-#include <utilX.h>
-#include <pkgmgr-info.h>
-#include <syspopup.h>
-#include <dd-display.h>
-#include <dd-deviced.h>
-#include "common.h"
-#include "crash.h"
-#define DIRECT_LAUNCHED 3
-
-static int is_syspoup;
-static char process_name[NAME_MAX];
-static char exepath[PATH_MAX];
-
-/* pkgmgrinfo filter list function for getting application ID */
-static int appinfo_get_appname_func(pkgmgrinfo_appinfo_h handle,
-               void *user_data)
-{
-       char *str = NULL;
-       char *label;
-       int ret = PMINFO_R_ERROR;
-
-       if (!user_data)
-               return ret;
-
-       ret = pkgmgrinfo_appinfo_get_label(handle, &str);
-       if (ret != PMINFO_R_OK)
-               return ret;
-
-       if (!str)
-               return PMINFO_R_ERROR;
-
-       label = strdup(str);
-       if (!label)
-               return PMINFO_R_ERROR;
-
-       (*(char**)user_data) = label;
-
-       return PMINFO_R_OK;
-}
-
-/* get application ID by ail filter */
-static char *get_app_name(char *exepath)
-{
-       pkgmgrinfo_appinfo_filter_h handle = NULL;
-       int count, ret;
-       char *name = NULL;
-
-       ret = pkgmgrinfo_appinfo_filter_create(&handle);
-       if (ret != PMINFO_R_OK) {
-               goto out;
-       }
-
-       ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_EXEC, exepath);
-       if (ret != PMINFO_R_OK) {
-               goto out_free;
-       }
-
-       ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
-       if (ret != PMINFO_R_OK) {
-               goto out_free;
-       }
-
-       if (count < 1) {
-               goto out_free;
-       } else {
-               ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, appinfo_get_appname_func, &name);
-               if (ret != PMINFO_R_OK) {
-                       name = NULL;
-                       goto out_free;
-               }
-       }
-
-out_free:
-       pkgmgrinfo_appinfo_filter_destroy(handle);
-out:
-       return name;
-}
-
-void popup_ok_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       fflush(stdout);
-       popup_terminate();
-}
-
-static int load_crash_process_popup(struct appdata *ad, char *name)
-{
-       char buf[MAX_PROCESS_NAME] = {0, };
-       char *title, *text, *subtext;
-       int len;
-
-       if (!ad)
-               return -EINVAL;
-
-       title = _("IDS_COM_HEADER_ATTENTION");
-       subtext = _("IDS_ST_BODY_PS_HAS_CLOSED_UNEXPECTEDLY");
-       snprintf(buf, sizeof(buf), subtext, name);
-
-       len = strlen(buf) + 3; /* 3: one period, one space, and one '\0' */
-       text = (char *)malloc(len);
-       if (!text) {
-               _E("FAIL: malloc()");
-               return -ENOMEM;
-       }
-
-       snprintf(text, len, "%s", buf);
-       _I("Popup content: %s", text);
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       title,
-                       text,
-                       _( "IDS_COM_SK_OK"),
-                       popup_ok_cb,
-                       NULL, NULL);
-
-       FREE(text);
-
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-       reset_window_priority(win, UTILX_NOTIFICATION_LEVEL_HIGH);
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       if (ad->layout_main)
-               evas_object_del(ad->layout_main);
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       const char *name, *path;
-       char *str;
-       char tname[NAME_MAX + 1] = {0,};
-       int ret;
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-       if (is_syspoup) {
-               if (syspopup_create(b, &(ad->handler), ad->win_main, ad) < 0) {
-                       _E("FAIL: syspopup_create()");
-                       ret = -ENOMEM;
-                       goto crash_reset_out;
-               }
-               name = bundle_get_val(b, "_PROCESS_NAME_");
-               if (!name) {
-                       _E("FAIL: bundle_get_val()");
-                       ret = -ENOMEM;
-                       goto crash_reset_out;
-               }
-               _D("bundle_get_val - process_name:%s", name);
-               path = bundle_get_val(b, "_EXEPATH_");
-               if (!path) {
-                       _E("FAIL: bundle_get_val()");
-                       ret = -ENOMEM;
-                       goto crash_reset_out;
-               }
-               _D("bundle_get_val - exepath:%s", path);
-       } else {
-               name = process_name;
-               path = exepath;
-       }
-
-       str = get_app_name(path);
-       if (str) {
-               snprintf(tname, sizeof(tname), "%s", str);
-       } else {
-               snprintf(tname, sizeof(tname), "%s", name);
-       }
-
-       ret = load_crash_process_popup(ad, tname);
-       if (ret < 0)
-               goto crash_reset_out;
-
-       if (set_display_feedback(-1) < 0)
-               _E("Failed to set display");
-
-       return 0;
-
-crash_reset_out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       deviced_conf_set_mempolicy(OOM_IGNORE);
-
-       if (!ecore_x_init(NULL)) {
-               _E("Cannot connect to X11 display\n");
-               return -1;
-       }
-
-       if (argc == DIRECT_LAUNCHED) {
-               _I("direct launched - process_name:%s exepath:%s", argv[1], argv[2]);
-               snprintf(process_name, sizeof(process_name), "%s", argv[1]);
-               snprintf(exepath, sizeof(exepath), "%s", argv[2]);
-               is_syspoup = false;
-       } else {
-               is_syspoup = true;
-       }
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/crash-popup/src/crash.h b/crash-popup/src/crash.h
deleted file mode 100644 (file)
index cfb3c6e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CRASH-POPUP
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 __CRASH_POPUP_H__
-#define __CRASH_POPUP_H__
-#include <Elementary.h>
-#include <Ecore_X.h>
-#include <dlog.h>
-
-#undef LOG_TAG
-#define LOG_TAG "CRASH_POPUP"
-
-#undef _D
-#undef _I
-#undef _W
-#undef _E
-#undef _SD
-#undef _SI
-#undef _SW
-#undef _SE
-
-#define _D(fmt, arg...) LOGD(fmt, ##arg)
-#define _I(fmt, arg...) LOGI(fmt, ##arg)
-#define _W(fmt, arg...) LOGW(fmt, ##arg)
-#define _E(fmt, arg...) LOGE(fmt, ##arg)
-#define _SD(fmt, arg...) SECURE_LOGD(fmt, ##arg)
-#define _SI(fmt, arg...) SECURE_LOGI(fmt, ##arg)
-#define _SW(fmt, arg...) SECURE_LOGW(fmt, ##arg)
-#define _SE(fmt, arg...) SECURE_LOGE(fmt, ##arg)
-
-#ifndef PREFIX
-#define PREFIX "/usr"
-#endif
-#define PACKAGE "crash-popup"
-#define APPNAME "crash-popup"
-#define EDJ_PATH "/usr/apps/org.tizen.crash-popup/res/edje/crash"
-#define EDJ_NAME EDJ_PATH"/crash.edj"
-#define GRP_MAIN "main"
-#define MAX_PROCESS_NAME NAME_MAX
-
-#endif
-/* __CRASH_POPUP_H__ */
diff --git a/crash-popup/src/org.tizen.crash-popup.efl b/crash-popup/src/org.tizen.crash-popup.efl
deleted file mode 100644 (file)
index 8f5e97d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-org.tizen.crash-popup ail::db rw---- ------
-org.tizen.crash-popup aul::db r-x--- ------
-org.tizen.crash-popup org.tizen.setting --x--- ------
-org.tizen.crash-popup org.tizen.indicator rw---- ------
-org.tizen.crash-popup dbus rwx--- ------
-org.tizen.crash-popup device::app_logging -w---- ------
-org.tizen.crash-popup deviced::display rw---- ------
-org.tizen.crash-popup deviced::haptic rwx--- ------
-org.tizen.crash-popup isf r-x--- ------
-org.tizen.crash-popup sound_server rwxa-- ------
-org.tizen.crash-popup syslogd -w---- ------
-org.tizen.crash-popup syspopup::db rw---- ------
-org.tizen.crash-popup system r-x--- ------
-org.tizen.crash-popup system::use_internet rw---- ------
-org.tizen.crash-popup stest-service -w---- ------
-org.tizen.crash-popup svi-data r-x--- ------
-org.tizen.crash-popup tts-server rwx--- ------
-org.tizen.crash-popup xorg rwx--- ------
-org.tizen.crash-popup system-apps rw---- ------
-org.tizen.crash-popup org.tizen.setting::system rw---- ------
-org.tizen.crash-popup e17::notification rw---- ------
-dbus org.tizen.crash-popup -w---- ------
-org.tizen.app-tray org.tizen.crash-popup r-x--- ------
-org.tizen.crash-popup system::homedir rwxat- ------
-org.tizen.crash-popup system::vconf rwxat- ------
-org.tizen.crash-popup system::media rwxat- ------
-org.tizen.crash-popup system::share rwxat- ------
-org.tizen.crash-popup pulseaudio rwxat- ------
-e17 org.tizen.crash-popup -w---- ------
-org.tizen.crash-popup sys-assert::core rwxat- ------
-stest-service org.tizen.crash-popup r-x--- ------
-org.tizen.crash-popup privacy-manager::db r----l ------
-org.tizen.crash-popup pkgmgr::db r----l ------
-org.tizen.crash-popup system::vconf_inhouse rw---- ------
-org.tizen.crash-popup system::vconf_setting rw---- ------
-org.tizen.crash-popup system::vconf_privacy rw---- ------
-org.tizen.crash-popup system::vconf_system rw---- ------
-org.tizen.crash-popup system::vconf_multimedia rw---- ------
-org.tizen.crash-popup system::vconf_network rw---- ------
-org.tizen.crash-popup system::vconf_misc rw---- ------
-org.tizen.crash-popup ecore::lock rwxat- ------
diff --git a/data/org.tizen.datausage-syspopup.xml b/data/org.tizen.datausage-syspopup.xml
deleted file mode 100755 (executable)
index e6873f0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.datausage-syspopup" version="0.1.7" install-location="internal-only">
-       <label>Data usage system popup</label>
-       <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
-       <description>System popup application (data usage system popup)</description>
-       <ui-application appid="org.tizen.datausage-syspopup" exec="/usr/apps/org.tizen.datausage-syspopup/bin/datausage-popup" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <label>Data usage system popup</label>
-       </ui-application>
-</manifest>
diff --git a/data/org.tizen.host-devices.xml b/data/org.tizen.host-devices.xml
deleted file mode 100644 (file)
index 4dbac80..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.host-devices" version="0.0.1" install-location="internal-only">
-       <label>USB host device list application</label>
-       <author email="ty317.kim@samsung.com" href="www.samsung.com">Taeyoung Kim</author>
-       <description>USB host device list Application</description>
-       <ui-application appid="org.tizen.host-devices" exec="/usr/apps/org.tizen.host-devices/bin/org.tizen.host-devices" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <label>USB host device list Application</label>
-       </ui-application>
-</manifest>
diff --git a/data/org.tizen.lowbat-syspopup.png b/data/org.tizen.lowbat-syspopup.png
deleted file mode 100644 (file)
index ef74fd1..0000000
Binary files a/data/org.tizen.lowbat-syspopup.png and /dev/null differ
diff --git a/data/org.tizen.lowbat-syspopup.xml b/data/org.tizen.lowbat-syspopup.xml
deleted file mode 100755 (executable)
index 17407db..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.lowbat-syspopup" version="0.1.7" install-location="internal-only" support-mode="screen-reader">
-       <label>Low battery system popup</label>
-       <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
-       <description>System popup application (low battery system popup)</description>
-       <ui-application appid="org.tizen.lowbat-syspopup" exec="/usr/apps/org.tizen.lowbat-syspopup/bin/lowbatt-popup" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <label>Low battery system popup</label>
-       </ui-application>
-</manifest>
diff --git a/data/org.tizen.lowmem-syspopup.png b/data/org.tizen.lowmem-syspopup.png
deleted file mode 100644 (file)
index ef74fd1..0000000
Binary files a/data/org.tizen.lowmem-syspopup.png and /dev/null differ
diff --git a/data/org.tizen.lowmem-syspopup.xml b/data/org.tizen.lowmem-syspopup.xml
deleted file mode 100755 (executable)
index c09b2aa..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.lowmem-syspopup" version="0.1.7" install-location="internal-only" support-mode="screen-reader">
-       <label>Low memory system popup</label>
-       <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
-       <description>System popup application (low memory system popup)</description>
-       <ui-application appid="org.tizen.lowmem-syspopup" exec="/usr/apps/org.tizen.lowmem-syspopup/bin/lowmem-popup" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <label>Low memory system popup</label>
-       </ui-application>
-</manifest>
diff --git a/data/org.tizen.mmc-syspopup.xml b/data/org.tizen.mmc-syspopup.xml
deleted file mode 100755 (executable)
index 158cf9d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.mmc-syspopup" version="0.1.7" install-location="internal-only">
-       <label>Mmc system popup</label>
-       <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
-       <description>System popup application (Mmc system popup)</description>
-       <ui-application appid="org.tizen.mmc-syspopup" exec="/usr/apps/org.tizen.mmc-syspopup/bin/mmc-popup" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <label>Mmc system popup</label>
-       </ui-application>
-</manifest>
diff --git a/data/org.tizen.poweroff-syspopup.png b/data/org.tizen.poweroff-syspopup.png
deleted file mode 100644 (file)
index ef74fd1..0000000
Binary files a/data/org.tizen.poweroff-syspopup.png and /dev/null differ
diff --git a/data/org.tizen.usb-syspopup.xml b/data/org.tizen.usb-syspopup.xml
deleted file mode 100644 (file)
index c878b36..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.usb-syspopup" version="0.0.1" install-location="internal-only">
-       <label>Usb system popup</label>
-       <author email="ty317.kim@samsung.com" href="www.samsung.com">Taeyoung Kim</author>
-       <description>Usb system popup application</description>
-       <ui-application appid="org.tizen.usb-syspopup" exec="/usr/apps/org.tizen.usb-syspopup/bin/usb-syspopup" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <icon>usb_icon.png</icon>
-               <label>Usb system popup</label>
-               <label xml:lang="en-us">Usb system popup</label>
-               <label xml:lang="nl-nl">Usb-systeem pop-up</label>
-               <label xml:lang="de-de">USB-System popup</label>
-               <label xml:lang="zh-hk">USB系統彈出</label>
-               <label xml:lang="zh-cn">USB系统弹出</label>
-               <label xml:lang="ru-ru">Usb система всплывающих</label>
-               <label xml:lang="zh-tw">USB系統彈出</label>
-               <label xml:lang="ja-jp">USBシステムのポップアップ</label>
-               <label xml:lang="es-es">USB del sistema emergente</label>
-               <label xml:lang="el-gr">Usb σύστημα popup</label>
-               <label xml:lang="it-it">Usb sistema popup</label>
-               <label xml:lang="tr-tr">Usb sistemi açılır</label>
-               <label xml:lang="pt-pt">Usb sistema pop-up</label>
-               <label xml:lang="fr-fr">Usb système contextuel</label>
-               <label xml:lang="ko-kr">USB 시스템 팝업</label>
-       </ui-application>
-</manifest>
diff --git a/data/org.tizen.usbotg-syspopup.xml b/data/org.tizen.usbotg-syspopup.xml
deleted file mode 100644 (file)
index e611e6b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.usbotg-syspopup" version="0.0.1" install-location="internal-only">
-       <label>Usb otg system popup</label>
-       <author email="ty317.kim@samsung.com" href="www.samsung.com">Taeyoung Kim</author>
-       <description>Usb otg system popup application</description>
-       <ui-application appid="org.tizen.usbotg-syspopup" exec="/usr/apps/org.tizen.usbotg-syspopup/bin/usbotg-syspopup" nodisplay="true" multiple="false" type="capp" taskmanage="false">
-               <icon>usb_icon.png</icon>
-               <label>Usb otg system popup</label>
-               <label xml:lang="en-us">Usb otg system popup</label>
-               <label xml:lang="nl-nl">Usb otg systeem pop-up</label>
-               <label xml:lang="de-de">USB otg system popup</label>
-               <label xml:lang="zh-hk">USB otg 系統彈出</label>
-               <label xml:lang="zh-cn">USB otg 系统弹出</label>
-               <label xml:lang="ru-ru">Usb otg система всплывающих</label>
-               <label xml:lang="zh-tw">USB otg 系統彈出</label>
-               <label xml:lang="ja-jp">USB otg システムのポップアップ</label>
-               <label xml:lang="es-es">USB otg del sistema emergente</label>
-               <label xml:lang="el-gr">Usb otg σύστημα popup</label>
-               <label xml:lang="it-it">Usb otg sistema popup</label>
-               <label xml:lang="tr-tr">Usb otg sistemi açılır</label>
-               <label xml:lang="pt-pt">Usb otg sistema pop-up</label>
-               <label xml:lang="fr-fr">Usb otg système contextuel</label>
-               <label xml:lang="ko-kr">USB otg 시스템 팝업</label>
-       </ui-application>
-</manifest>
diff --git a/datausage-popup/CMakeLists.txt b/datausage-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index a7202f8..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-
-#################### Data Usage ###############################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(datausage-popup C)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/datausage-popup/src/datausage.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/datausage-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(datausage_pkgs REQUIRED
-               appcore-efl
-               elementary
-               dlog
-               deviced
-               syspopup
-               feedback
-)
-
-FOREACH(flag ${datausage_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g ")
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${datausage_pkgs_LDFLAGS})
-
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.datausage-syspopup/bin)
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.datausage-syspopup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.datausage-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
-###############################################################
diff --git a/datausage-popup/src/datausage.c b/datausage-popup/src/datausage.c
deleted file mode 100755 (executable)
index 6001bcb..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2013 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 <stdio.h>
-#include "common.h"
-#include <aul.h>
-#include <dd-display.h>
-
-#define PACKAGE "datausage-popup"
-#define SETTING_DATA_USAGE_UG  "setting-datausage-efl"
-
-#define SYSPOPUP_CONTENT       "_SYSPOPUP_CONTENT_"
-#define DATAUSAGE_DATA_BLOCKED "data_blocked"
-#define DATAUSAGE_LIMIT        "_DATAUSAGE_LIMIT_"
-
-#define DATA_BLOCKED_POPUP_CONTENT \
-       "IDS_QP_BODY_MAXIMUM_DATA_USAGE_LIMIT_HPS_EXCEEDED_MOBILE_DATA_DISABLED_ENABLING_MOBILE_DATA_MAY_INCUR_ADDITIONAL_CHARGES"
-
-#define BUF_MAX 256
-
-static void datausage_cancel_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("Button 'Cancel' selected");
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static void launch_settings_data_usage_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       int ret;
-       bundle *b;
-
-       _I("Button 'Settings' selected");
-
-       object_cleanup(data);
-
-       b = bundle_create();
-       if (!b) {
-               _E("FAIL: bundle_create()");
-               return;
-       }
-
-       ret = aul_launch_app(SETTING_DATA_USAGE_UG, b);
-       if (ret != AUL_R_OK) {
-               _E("FAIL: aul_launch_app()");
-       }
-
-       if (bundle_free(b) != 0)
-               _E("FAIL: bundle_free(b);");
-
-       popup_terminate();
-}
-
-static int load_data_blocked_popup(struct appdata *ad, bundle *b)
-{
-       const char *limit;
-       char *transtext;
-       char content[BUF_MAX];
-       char buf[BUF_MAX];
-
-       if (!ad || !b)
-               return -EINVAL;
-
-       limit = bundle_get_val(b, DATAUSAGE_LIMIT);
-       if (!limit) {
-               _E("FAIL: bundle_get_val()");
-               return -ENOMEM;
-       }
-
-       snprintf(buf, sizeof(buf), "%sMB", limit);
-       transtext = _(DATA_BLOCKED_POPUP_CONTENT);
-       snprintf(content, sizeof(content), transtext, buf);
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _("IDS_COM_HEADER_MOBILE_DATA_DISABLED"),
-                       content,
-                       _("IDS_COM_SK_CANCEL"),
-                       datausage_cancel_cb,
-                       _("IDS_COM_BODY_SETTINGS"),
-                       launch_settings_data_usage_cb);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-/* App init */
-static int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -ENOMEM;
-
-       ad->win_main = win;
-
-       if (appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR) != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       object_cleanup(data);
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       const char *opt;
-       int ret;
-
-       if (!ad || !b) {
-               ret = -EINVAL;
-               goto datausage_reset_out;
-       }
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-
-       opt = bundle_get_val(b, "_SYSPOPUP_CONTENT_");
-       if (!opt) {
-               _E("FAIL: bundle_get_val()");
-               ret = -EINVAL;
-               goto datausage_reset_out;
-       }
-
-       ret = syspopup_create(b, &(ad->handler), ad->win_main, ad);
-       if (ret < 0) {
-               _E("FAIL: syspopup_create()");
-               goto datausage_reset_out;
-       }
-
-       if (!strcmp(opt, DATAUSAGE_DATA_BLOCKED)) {
-               _I("Launching datausage-syspopup (data blocked)");
-               ret = load_data_blocked_popup(ad, b);
-               if (ret < 0) {
-                       _E("FAIL: load_data_blocked_popup()");
-                       goto datausage_reset_out;
-               }
-
-       } else {
-               _E("Option is unknown");
-               ret = -EINVAL;
-               goto datausage_reset_out;
-       }
-
-       if (set_display_feedback(-1) < 0)
-               _E("Failed to set display");
-
-       return 0;
-
-datausage_reset_out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/edcs/crash.edc b/edcs/crash.edc
deleted file mode 100644 (file)
index 4f4b21a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#define RESOURCE_CIRCLE_IMAGE( FILE_NAME ) \
-       group { \
-               name: FILE_NAME; \
-               images.image: FILE_NAME COMP; \
-               parts { \
-                       part { name: "image"; \
-                               scale: 1; \
-                               mouse_events: 0; \
-                               description { \
-                                       min: 48 48; \
-                                       state: "default" 0.0; \
-                                       image.normal: FILE_NAME; \
-                                       aspect: 1 1; \
-                                       aspect_preference: BOTH; \
-                               } \
-                       } \
-               } \
-       }
-collections {
-       RESOURCE_CIRCLE_IMAGE("circle-ok.png");
-}
diff --git a/edcs/icons/accessibility.png b/edcs/icons/accessibility.png
deleted file mode 100644 (file)
index 45c87e0..0000000
Binary files a/edcs/icons/accessibility.png and /dev/null differ
diff --git a/edcs/icons/battery_low_cover.png b/edcs/icons/battery_low_cover.png
deleted file mode 100755 (executable)
index 09a978c..0000000
Binary files a/edcs/icons/battery_low_cover.png and /dev/null differ
diff --git a/edcs/icons/brightness_empty.png b/edcs/icons/brightness_empty.png
deleted file mode 100644 (file)
index 8f9214f..0000000
Binary files a/edcs/icons/brightness_empty.png and /dev/null differ
diff --git a/edcs/icons/brightness_full.png b/edcs/icons/brightness_full.png
deleted file mode 100644 (file)
index 0df85e0..0000000
Binary files a/edcs/icons/brightness_full.png and /dev/null differ
diff --git a/edcs/icons/circle-cancel.png b/edcs/icons/circle-cancel.png
deleted file mode 100755 (executable)
index 5f346cb..0000000
Binary files a/edcs/icons/circle-cancel.png and /dev/null differ
diff --git a/edcs/icons/circle-ok.png b/edcs/icons/circle-ok.png
deleted file mode 100755 (executable)
index f20f62e..0000000
Binary files a/edcs/icons/circle-ok.png and /dev/null differ
diff --git a/edcs/icons/circle-setting.png b/edcs/icons/circle-setting.png
deleted file mode 100755 (executable)
index ac66d3b..0000000
Binary files a/edcs/icons/circle-setting.png and /dev/null differ
diff --git a/edcs/icons/emergency.png b/edcs/icons/emergency.png
deleted file mode 100755 (executable)
index 7816401..0000000
Binary files a/edcs/icons/emergency.png and /dev/null differ
diff --git a/edcs/icons/flightmode.png b/edcs/icons/flightmode.png
deleted file mode 100755 (executable)
index 31048e5..0000000
Binary files a/edcs/icons/flightmode.png and /dev/null differ
diff --git a/edcs/icons/micro-flightmodeoff.png b/edcs/icons/micro-flightmodeoff.png
deleted file mode 100644 (file)
index 82fe7ca..0000000
Binary files a/edcs/icons/micro-flightmodeoff.png and /dev/null differ
diff --git a/edcs/icons/micro-flightmodeon.png b/edcs/icons/micro-flightmodeon.png
deleted file mode 100644 (file)
index 21ac529..0000000
Binary files a/edcs/icons/micro-flightmodeon.png and /dev/null differ
diff --git a/edcs/icons/micro-mobiledata-disabled.png b/edcs/icons/micro-mobiledata-disabled.png
deleted file mode 100644 (file)
index fb74a82..0000000
Binary files a/edcs/icons/micro-mobiledata-disabled.png and /dev/null differ
diff --git a/edcs/icons/micro-mobiledata-off.png b/edcs/icons/micro-mobiledata-off.png
deleted file mode 100644 (file)
index 6dd13d9..0000000
Binary files a/edcs/icons/micro-mobiledata-off.png and /dev/null differ
diff --git a/edcs/icons/micro-mobiledata-on.png b/edcs/icons/micro-mobiledata-on.png
deleted file mode 100644 (file)
index 64f84f5..0000000
Binary files a/edcs/icons/micro-mobiledata-on.png and /dev/null differ
diff --git a/edcs/icons/micro-mute.png b/edcs/icons/micro-mute.png
deleted file mode 100644 (file)
index 548701d..0000000
Binary files a/edcs/icons/micro-mute.png and /dev/null differ
diff --git a/edcs/icons/micro-outdooroff.png b/edcs/icons/micro-outdooroff.png
deleted file mode 100644 (file)
index 2cb2237..0000000
Binary files a/edcs/icons/micro-outdooroff.png and /dev/null differ
diff --git a/edcs/icons/micro-outdooron.png b/edcs/icons/micro-outdooron.png
deleted file mode 100644 (file)
index a2500ce..0000000
Binary files a/edcs/icons/micro-outdooron.png and /dev/null differ
diff --git a/edcs/icons/micro-poweroff.png b/edcs/icons/micro-poweroff.png
deleted file mode 100755 (executable)
index 7049f23..0000000
Binary files a/edcs/icons/micro-poweroff.png and /dev/null differ
diff --git a/edcs/icons/micro-restart.png b/edcs/icons/micro-restart.png
deleted file mode 100755 (executable)
index fa5c8bc..0000000
Binary files a/edcs/icons/micro-restart.png and /dev/null differ
diff --git a/edcs/icons/micro-sound.png b/edcs/icons/micro-sound.png
deleted file mode 100644 (file)
index 91f9293..0000000
Binary files a/edcs/icons/micro-sound.png and /dev/null differ
diff --git a/edcs/icons/micro-vibration.png b/edcs/icons/micro-vibration.png
deleted file mode 100644 (file)
index 2a55b33..0000000
Binary files a/edcs/icons/micro-vibration.png and /dev/null differ
diff --git a/edcs/icons/personal.png b/edcs/icons/personal.png
deleted file mode 100644 (file)
index 8077d5d..0000000
Binary files a/edcs/icons/personal.png and /dev/null differ
diff --git a/edcs/icons/poweroff.png b/edcs/icons/poweroff.png
deleted file mode 100755 (executable)
index b744f24..0000000
Binary files a/edcs/icons/poweroff.png and /dev/null differ
diff --git a/edcs/icons/restart.png b/edcs/icons/restart.png
deleted file mode 100755 (executable)
index 59df79f..0000000
Binary files a/edcs/icons/restart.png and /dev/null differ
diff --git a/edcs/icons/usb_icon_blue.png b/edcs/icons/usb_icon_blue.png
deleted file mode 100644 (file)
index 7961c0d..0000000
Binary files a/edcs/icons/usb_icon_blue.png and /dev/null differ
diff --git a/edcs/icons/vibration.png b/edcs/icons/vibration.png
deleted file mode 100644 (file)
index 7b0dfa9..0000000
Binary files a/edcs/icons/vibration.png and /dev/null differ
diff --git a/edcs/lite-poweroff.edc b/edcs/lite-poweroff.edc
deleted file mode 100644 (file)
index b3df291..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#define RESOURCE_IMAGE( FILE_NAME ) \
-   group { \
-      name: FILE_NAME; \
-      images.image: FILE_NAME COMP; \
-      parts { \
-         part { name: "image"; \
-            scale: 1; \
-            description { \
-               min: 22 22; \
-                          max: 22 22; \
-               state: "default" 0.0; \
-               image.normal: FILE_NAME; \
-               aspect: 1 1; \
-               aspect_preference: BOTH; \
-            } \
-         } \
-      } \
-   }
-
-collections {
-    RESOURCE_IMAGE("accessibility.png");
-    RESOURCE_IMAGE("flightmode.png");
-    RESOURCE_IMAGE("poweroff.png");
-    RESOURCE_IMAGE("restart.png");
-       RESOURCE_IMAGE("vibration.png");
-       RESOURCE_IMAGE("emergency.png");
-}
diff --git a/edcs/lowbatt.edc b/edcs/lowbatt.edc
deleted file mode 100644 (file)
index 18fd4e9..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-#define LOCK_WIDTH 720
-#define LOCK_HEIGHT 1280
-#define SVIEW_LOCK_HEIGHT 300
-#define SVIEW_LOCK_WIDTH 720
-#define SVIEW_INFO_BOX_HEIGHT 104
-#define SVIEW_INFO_BOX_WIDTH 590
-
-#define RESOURCE_CIRCLE_IMAGE( FILE_NAME ) \
-       group { \
-               name: FILE_NAME; \
-               images.image: FILE_NAME COMP; \
-               parts { \
-                       part { name: "image"; \
-                               scale: 1; \
-                               mouse_events: 0; \
-                               description { \
-                                       min: 48 48; \
-                                       state: "default" 0.0; \
-                                       image.normal: FILE_NAME; \
-                                       aspect: 1 1; \
-                                       aspect_preference: BOTH; \
-                               } \
-                       } \
-               } \
-       }
-
-collections {
-       RESOURCE_CIRCLE_IMAGE("circle-ok.png");
-       RESOURCE_CIRCLE_IMAGE("circle-cancel.png");
-
-       group{
-               name: "scover-main";
-
-               parts{
-                       part{
-                               name: "bg";
-                               type: RECT;
-                               description{
-                                       state : "default" 0.0;
-                                       color: 8 8 8 255;
-                               }
-                       }
-                       part{
-                               name: "scover.sw.content";
-                               type: SWALLOW;
-                               scale: 1;
-                               mouse_events : 1;
-                               description{
-                                       state: "default" 0.0;
-                                       rel1{
-                                               relative: 0 0;
-                                               to: "bg";
-                                       }
-                                       rel2{
-                                               relative: 1 300/LOCK_HEIGHT;
-                                               to: "bg";
-                                       }
-                               }
-                       }
-               }/* parts end */
-       }
-       group{
-               name: "scover-home";
-               images {
-                       image: "battery_low_cover.png" COMP;
-               }
-
-               parts{
-                       part{
-                               name: "bg";
-                               type: RECT;
-                               description{
-                                       state : "default" 0.0;
-                                       color: 8 8 8 255;
-                               }
-                       }
-                       part{
-                               name: "scover.box";
-                               type: RECT;
-                               scale: 1;
-                               mouse_events: 0;
-                               description{
-                                       state: "default" 0.0;
-                                       color: 0 0 0 0;
-                                       rel1{
-                                               relative: 150/SVIEW_LOCK_WIDTH 108/SVIEW_LOCK_HEIGHT;
-                                               to: "bg";
-                                       }
-                                       rel2{
-                                               relative: (150 + 500)/SVIEW_LOCK_WIDTH (108 + 140)/SVIEW_LOCK_HEIGHT;
-                                               to: "bg";
-                                       }
-                               }
-                       }
-                       part{
-                               name: "scover.image";
-                               type: IMAGE;
-                               scale: 1;
-                               mouse_events: 0;
-                               description{
-                                       state: "default" 0.0;
-                                       color: 250 250 250 255;
-                                       fixed : 1 1;
-                                       rel1{
-                                               relative: 0/SVIEW_INFO_BOX_WIDTH 0/SVIEW_INFO_BOX_HEIGHT;
-                                               to: "scover.box";
-                                       }
-                                       rel2{
-                                               relative: 500/SVIEW_INFO_BOX_WIDTH 140/SVIEW_INFO_BOX_HEIGHT;
-                                               to: "scover.box";
-                                       }
-                                       image{
-                                               normal: "battery_low_cover.png";
-                                       }
-                               }
-                       }
-               }
-       }
-}
diff --git a/edcs/lowmem.edc b/edcs/lowmem.edc
deleted file mode 100644 (file)
index f890d87..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#define MAIN_W 480
-#define MAIN_H 800
-#define POPUP_MAIN_W 458 
-#define POPUP_MAIN_H 240
-
-collections 
-{
-       group 
-       {
-
-                       name: "main";
-                       min: MAIN_W MAIN_H;
-                       parts {
-                                       part 
-                                       { 
-                                         name: "background";
-                                         type: RECT;
-                                         mouse_events: 1;
-                                         description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0 0; offset: 0 0; }
-                                                       rel2 { relative: 1 1; offset: -1 -1; }
-                                                       color: 0 0 0 100;
-                                               }
-                                       }
-
-                                       part 
-                                       { 
-                                               name: "txt_title";
-                                               type: TEXT;
-                                               mouse_events: 1;
-                                               description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0.0 0.0; to: background; }
-                                                       rel2 { relative: 1.0 0.5; to: background; }
-                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                                       color: 255 255 255 255;
-                                               }
-                                       }
-
-                                       part 
-                                       { 
-                                               name: "txt_mesg";
-                                               type: TEXT;
-                                               mouse_events: 1;
-                                               description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0.0 0.5; to: background; }
-                                                       rel2 { relative: 1.0 1.0; to: background; }
-                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                                       color: 255 255 255 255;
-                                               }
-                                       }
-               }
-
-               programs {
-                                       program 
-                                       {
-                                               name: "click_exit";
-                                               source: "background";
-                                               signal: "mouse,clicked,1";
-                                               action: SIGNAL_EMIT "update_clicked" "background";
-                                       }
-                               }
-       }
-       
-       
-   group 
-   {
-                       name: "popup";
-                       min: POPUP_MAIN_W POPUP_MAIN_H;
-                       parts 
-                       {
-                               part { 
-                               name: "background";
-                               type: RECT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; offset: 0 0; }
-                                       rel2 { relative: 1.0 1.0; offset: -1 -1; }
-                                       color: 0 0 0 0;
-                                       }
-                               }
-
-                               part { 
-                               name: "txt_title";
-                               type: TEXT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; to: background; }
-                                       rel2 { relative: 1.0 0.5; to: background; }
-                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                       color: 0 0 0 0;
-                                       }
-                               }
-
-                               part { 
-                               name: "txt_mesg";
-                               type: TEXT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.5; to: background; }
-                                       rel2 { relative: 1.0 1.0; to: background; }
-                                       text { text_class: "GP_Latin"; align: 0.5 0.5; }
-                                       color: 255 255 255 255;
-                                       }
-                               }
-               }
-
-               programs 
-               {
-                               program
-                               {
-                                       name: "bg_click";
-                                       signal: "mouse,down,1";
-                                       source: "bg";
-                                       action, SIGNAL_EMIT "background_click" "background";
-                               }
-                               
-               }
-               
-       }
-       
-}
diff --git a/edcs/micro-common.edc b/edcs/micro-common.edc
deleted file mode 100644 (file)
index 331dd5b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#define RESOURCE_CIRCLE_IMAGE( FILE_NAME ) \
-       group { \
-               name: FILE_NAME; \
-               images.image: FILE_NAME COMP; \
-               parts { \
-                       part { name: "image"; \
-                               scale: 1; \
-                               mouse_events: 0; \
-                               description { \
-                                       min: 48 48; \
-                                       state: "default" 0.0; \
-                                       image.normal: FILE_NAME; \
-                                       aspect: 1 1; \
-                                       aspect_preference: BOTH; \
-                               } \
-                       } \
-               } \
-       }
-
-collections {
-       RESOURCE_CIRCLE_IMAGE("circle-ok.png");
-       RESOURCE_CIRCLE_IMAGE("circle-cancel.png");
-
-       group { name: "micro_3_title_content_button";
-               parts {
-                       part { name: "elm.swallow.content";
-                               scale: 1;
-                               type: SWALLOW;
-                               description { state: "default" 0.0;
-                                       min: 0 255;
-                                       max: -1 255;
-                               }
-                       }
-               }
-       }
-
-       group { name: "micro_3_default";
-               parts {
-                       part { name: "elm.swallow.content";
-                               scale: 1;
-                               type: SWALLOW;
-                               description { state: "default" 0.0;
-                                       min: 0 406;
-                                       max: -1 406;
-                               }
-                       }
-               }
-       }
-}
diff --git a/edcs/micro-poweroff.edc b/edcs/micro-poweroff.edc
deleted file mode 100644 (file)
index e651a30..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-#define RESOURCE_IMAGE( FILE_NAME ) \
-   group { \
-      name: FILE_NAME; \
-      images.image: FILE_NAME COMP; \
-      parts { \
-         part { name: "image"; \
-            scale: 1; \
-            description { \
-               min: 50 50; \
-               state: "default" 0.0; \
-               image.normal: FILE_NAME; \
-               aspect: 1 1; \
-               aspect_preference: BOTH; \
-            } \
-         } \
-      } \
-   }
-#define RESOURCE_IMAGE_IGNORE_EVENT( FILE_NAME ) \
-   group { \
-      name: FILE_NAME; \
-      images.image: FILE_NAME COMP; \
-      parts { \
-         part { name: "image"; \
-            scale: 1; \
-                       mouse_events: 0; \
-            description { \
-               min: 50 36; \
-               state: "default" 0.0; \
-               image.normal: FILE_NAME; \
-               aspect_preference: BOTH; \
-            } \
-         } \
-      } \
-   }
-
-collections {
-       RESOURCE_IMAGE("micro-poweroff.png");
-       RESOURCE_IMAGE("micro-restart.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-flightmodeon.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-flightmodeoff.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-mobiledata-on.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-mobiledata-disabled.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-mobiledata-off.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-outdooron.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-outdooroff.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-sound.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-vibration.png");
-       RESOURCE_IMAGE_IGNORE_EVENT("micro-mute.png");
-
-       group { name: "popup_checkview";
-          parts {
-             part { name: "pad_t";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.5 0.0;
-                   min: 0 0;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 1.0 0.0;
-                      to_x: "pad_l";
-                   }
-                   rel2 {
-                      relative: 0.0 0.0;
-                      to_x: "pad_r";
-                   }
-                }
-             }
-             part { name: "pad_l";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   min: 0 0;
-                   fixed: 1 0;
-                   rel2.relative: 0.0 1.0;
-                   align: 0.0 0.0;
-                }
-             }
-             part { name: "pad_r";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   min: 0 0;
-                   fixed: 1 0;
-                   rel1.relative: 1.0 0.0;
-                   align: 1.0 0.0;
-                }
-             }
-             part { name: "elm.swallow.content";
-                type: SWALLOW;
-                scale: 1;
-                description { state: "default" 0.0;
-                   fixed: 1 1;
-                   rel1 {
-                      relative: 1.0 1.0;
-                      to_x: "pad_l";
-                      to_y: "pad_t";
-                   }
-                   rel2 {
-                      relative: 0.0 0.0;
-                      to_x: "pad_r";
-                      to_y: "pad_b";
-                   }
-                }
-             }
-             part { name: "pad_b";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 0;
-                   fixed: 0 1;
-                   rel1.relative: 0.0 1.0;
-                }
-             }
-          }
-       }
-
-       group { name: "popup_checkview_internal";
-          parts {
-             part { name: "label";
-                scale: 1;
-                type: SWALLOW;
-                description { state: "default" 0.0;
-                   fixed: 1 0;
-                   rel2 {
-                      relative: 1.0 0.0;
-                      to_y: "end_field";
-                   }
-                }
-             }
-             part { name: "bottom_pad";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 4;
-                   fixed: 0 1;
-                   rel1.relative: 0.0 1.0;
-                }
-             }
-             part { name: "pad_b";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 82;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 0.0 0.0;
-                      to: "bottom_pad";
-                   }
-                   rel2 {
-                      relative: 1.0 0.0;
-                      to: "bottom_pad";
-                   }
-                }
-             }
-             part { name: "end_field";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 82;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 0.0 1.0;
-                      to: "pad_b";
-                   }
-                   rel2 {
-                      relative: 1.0 1.0;
-                      to: "pad_b";
-                   }
-                }
-             }
-             part { name: "check_bottom";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 4;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 0.0 0.0;
-                      to: "end_field";
-                   }
-                   rel2 {
-                      relative: 1.0 0.0;
-                      to: "end_field";
-                   }
-                }
-             }
-             part { name: "elm.swallow.end";
-                type: SWALLOW;
-                scale: 1;
-                description { state: "default" 0.0;
-                   fixed: 1 1;
-                   align: 0.0 0.5;
-                   rel1.to: "end_field";
-                   rel1.offset: 1 0;
-                   rel2.to: "end_field";
-                }
-             }
-          }
-       }
-
-       group { name: "micro_3_title_content_button";
-               parts {
-                       part { name: "elm.swallow.content";
-                               scale: 1;
-                               type: SWALLOW;
-                               description { state: "default" 0.0;
-                                       min: 0 255;
-                                       max: -1 255;
-                               }
-                       }
-               }
-       }
-
-       group { name: "micro_3_default";
-               parts {
-                       part { name: "elm.swallow.content";
-                               scale: 1;
-                               type: SWALLOW;
-                               description { state: "default" 0.0;
-                                       min: 0 406;
-                                       max: -1 406;
-                               }
-                       }
-               }
-       }
-}
diff --git a/edcs/poweroff.edc b/edcs/poweroff.edc
deleted file mode 100644 (file)
index d84147a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#define RESOURCE_IMAGE( FILE_NAME ) \
-   group { \
-      name: FILE_NAME; \
-      images.image: FILE_NAME COMP; \
-      parts { \
-         part { name: "image"; \
-            scale: 1; \
-            description { \
-               min: 80 80; \
-               state: "default" 0.0; \
-               image.normal: FILE_NAME; \
-               aspect: 1 1; \
-               aspect_preference: BOTH; \
-            } \
-         } \
-      } \
-   }
-
-#define RESOURCE_IMAGE_LOSSY( FILE_NAME ) \
-   group { \
-      name: FILE_NAME; \
-      images.image: FILE_NAME LOSSY 85; \
-      parts { \
-         part { name: "image"; \
-            description { \
-               state: "default" 0.0; \
-               image.normal: FILE_NAME; \
-               aspect: 1 1; \
-               aspect_preference: BOTH; \
-            } \
-         } \
-      } \
-   }
-
-collections {
-    RESOURCE_IMAGE("accessibility.png");
-    RESOURCE_IMAGE("flightmode.png");
-    RESOURCE_IMAGE("poweroff.png");
-    RESOURCE_IMAGE("restart.png");
-       RESOURCE_IMAGE("vibration.png");
-       RESOURCE_IMAGE("emergency.png");
-}
diff --git a/edcs/system.edc b/edcs/system.edc
deleted file mode 100644 (file)
index 06f0b95..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-#define RESOURCE_IMAGE( FILE_NAME ) \
-       group { \
-               name: FILE_NAME; \
-               images.image: FILE_NAME COMP; \
-               parts { \
-                       part { name: "image"; \
-                               scale: 1; \
-                               description { \
-                                       min: 62 62; \
-                                       state: "default" 0.0; \
-                                       image.normal: FILE_NAME; \
-                                       aspect: 1 1; \
-                                       aspect_preference: BOTH; \
-                               } \
-                       } \
-               } \
-       }
-#define RESOURCE_CIRCLE_IMAGE( FILE_NAME ) \
-       group { \
-               name: FILE_NAME; \
-               images.image: FILE_NAME COMP; \
-               parts { \
-                       part { name: "image"; \
-                               scale: 1; \
-                               mouse_events: 0; \
-                               description { \
-                                       min: 48 48; \
-                                       state: "default" 0.0; \
-                                       image.normal: FILE_NAME; \
-                                       aspect: 1 1; \
-                                       aspect_preference: BOTH; \
-                               } \
-                       } \
-               } \
-       }
-collections {
-       RESOURCE_CIRCLE_IMAGE("circle-ok.png");
-       RESOURCE_CIRCLE_IMAGE("circle-cancel.png");
-       RESOURCE_CIRCLE_IMAGE("circle-setting.png");
-
-       group { name: "popup_checkview";
-          parts {
-             part { name: "pad_t";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.5 0.0;
-                   min: 0 0;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 1.0 0.0;
-                      to_x: "pad_l";
-                   }
-                   rel2 {
-                      relative: 0.0 0.0;
-                      to_x: "pad_r";
-                   }
-                }
-             }
-             part { name: "pad_l";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   min: 0 0;
-                   fixed: 1 0;
-                   rel2.relative: 0.0 1.0;
-                   align: 0.0 0.0;
-                }
-             }
-             part { name: "pad_r";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   min: 0 0;
-                   fixed: 1 0;
-                   rel1.relative: 1.0 0.0;
-                   align: 1.0 0.0;
-                }
-             }
-             part { name: "elm.swallow.content";
-                type: SWALLOW;
-                scale: 1;
-                description { state: "default" 0.0;
-                   fixed: 1 1;
-                   rel1 {
-                      relative: 1.0 1.0;
-                      to_x: "pad_l";
-                      to_y: "pad_t";
-                   }
-                   rel2 {
-                      relative: 0.0 0.0;
-                      to_x: "pad_r";
-                      to_y: "pad_b";
-                   }
-                }
-             }
-             part { name: "pad_b";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 0;
-                   fixed: 0 1;
-                   rel1.relative: 0.0 1.0;
-                }
-             }
-          }
-       }
-
-       group { name: "popup_checkview_internal";
-          parts {
-             part { name: "label";
-                scale: 1;
-                type: SWALLOW;
-                description { state: "default" 0.0;
-                   fixed: 1 0;
-                   rel2 {
-                      relative: 1.0 0.0;
-                      to_y: "end_field";
-                   }
-                }
-             }
-             part { name: "bottom_pad";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 4;
-                   fixed: 0 1;
-                   rel1.relative: 0.0 1.0;
-                }
-             }
-             part { name: "pad_b";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 82;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 0.0 0.0;
-                      to: "bottom_pad";
-                   }
-                   rel2 {
-                      relative: 1.0 0.0;
-                      to: "bottom_pad";
-                   }
-                }
-             }
-             part { name: "end_field";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 82;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 0.0 1.0;
-                      to: "pad_b";
-                   }
-                   rel2 {
-                      relative: 1.0 1.0;
-                      to: "pad_b";
-                   }
-                }
-             }
-             part { name: "check_bottom";
-                type: SPACER;
-                scale: 1;
-                description { state: "default" 0.0;
-                   align: 0.0 1.0;
-                   min: 0 4;
-                   fixed: 0 1;
-                   rel1 {
-                      relative: 0.0 0.0;
-                      to: "end_field";
-                   }
-                   rel2 {
-                      relative: 1.0 0.0;
-                      to: "end_field";
-                   }
-                }
-             }
-             part { name: "elm.swallow.end";
-                type: SWALLOW;
-                scale: 1;
-                description { state: "default" 0.0;
-                   fixed: 1 1;
-                   align: 0.0 0.5;
-                   rel1.to: "end_field";
-                   rel1.offset: 1 0;
-                   rel2.to: "end_field";
-                }
-             }
-          }
-       }
-
-       group { name: "micro_3_title_content_button";
-               parts {
-                       part { name: "elm.swallow.content";
-                               scale: 1;
-                               type: SWALLOW;
-                               description { state: "default" 0.0;
-                                       min: 0 255;
-                                       max: -1 255;
-                               }
-                       }
-               }
-       }
-
-       group { name: "micro_3_default";
-               parts {
-                       part { name: "elm.swallow.content";
-                               scale: 1;
-                               type: SWALLOW;
-                               description { state: "default" 0.0;
-                                       min: 0 406;
-                                       max: -1 406;
-                               }
-                       }
-               }
-       }
-}
diff --git a/edcs/table/system-color.xml b/edcs/table/system-color.xml
deleted file mode 100644 (file)
index 1e2e268..0000000
+++ /dev/null
@@ -1,505 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ChangeableColorTables>
-       <ChangeableColorTable num="1">
-               <Theme style="Dark">
-                       <ChangeableColorInfo id="B011" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B012" inputColor="1" hue="-3" saturation="-6" value="17" alpha="100" />
-                       <ChangeableColorInfo id="B012P" inputColor="3" hue="-12" saturation="-26" value="7" alpha="100" />
-                       <ChangeableColorInfo id="B018E" inputColor="3" hue="4" saturation="66" value="65" alpha="40" />
-                       <ChangeableColorInfo id="B019" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B0211" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B0211D" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B0221L1" inputColor="K" hue="0" saturation="0" value="19" alpha="100" />
-                       <ChangeableColorInfo id="B0221L2" inputColor="K" hue="0" saturation="0" value="5" alpha="100" />
-                       <ChangeableColorInfo id="B0222" inputColor="1" hue="0" saturation="0" value="18" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B0232" inputColor="3" hue="-4" saturation="-17" value="-5" alpha="100" />
-                       <ChangeableColorInfo id="B0241" inputColor="-" hue="40" saturation="90" value="92" alpha="100" />
-                       <ChangeableColorInfo id="B0242" inputColor="-" hue="89" saturation="86" value="66" alpha="100" />
-                       <ChangeableColorInfo id="B041P" inputColor="3" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B0511" inputColor="1" hue="0" saturation="25" value="6" alpha="100" />
-                       <ChangeableColorInfo id="B0511P" inputColor="1" hue="4" saturation="-3" value="30" alpha="100" />
-                       <ChangeableColorInfo id="B0513" inputColor="1" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B0514" inputColor="1" hue="-3" saturation="0" value="11" alpha="100" />
-                       <ChangeableColorInfo id="B0514P1" inputColor="3" hue="4" saturation="63" value="63" alpha="100" />
-                       <ChangeableColorInfo id="B052L1" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B052L1D" inputColor="3" hue="4" saturation="66" value="65" alpha="20" />
-                       <ChangeableColorInfo id="B052L4" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B052L4P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B052L4D" inputColor="W" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B052L6" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B052L6D" inputColor="3" hue="4" saturation="66" value="65" alpha="20" />
-                       <ChangeableColorInfo id="B052L6P2" inputColor="3" hue="4" saturation="66" value="65" alpha="70" />
-                       <ChangeableColorInfo id="B0543" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B05521" inputColor="K" hue="0" saturation="0" value="15" alpha="100" />
-                       <ChangeableColorInfo id="B05522" inputColor="K" hue="0" saturation="0" value="15" alpha="100" />
-                       <ChangeableColorInfo id="B0553" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B0555" inputColor="W" hue="0" saturation="0" value="0" alpha="25" />
-                       <ChangeableColorInfo id="B056" inputColor="2" hue="-5" saturation="-2" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B056P" inputColor="3" hue="0" saturation="5" value="8" alpha="100" />
-                       <ChangeableColorInfo id="B056D" inputColor="2" hue="-9" saturation="-17" value="-24" alpha="100" />
-                       <ChangeableColorInfo id="B061L1E" inputColor="K" hue="0" saturation="0" value="13" alpha="100" />
-                       <ChangeableColorInfo id="B061L2" inputColor="1" hue="3" saturation="9" value="-6" alpha="100" />
-                       <ChangeableColorInfo id="B061L7" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B065L3" inputColor="K" hue="0" saturation="0" value="28" alpha="100" />
-                       <ChangeableColorInfo id="B065L2" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B0651L2" inputColor="3" hue="4" saturation="66" value="65" alpha="15" />
-                       <ChangeableColorInfo id="B0652L2" inputColor="3" hue="4" saturation="66" value="25" alpha="100" />
-                       <ChangeableColorInfo id="B065L1" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B065L1P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B065L1D" inputColor="W" hue="0" saturation="0" value="-42" alpha="100" />
-                       <ChangeableColorInfo id="B065L4" inputColor="2" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B065L4P" inputColor="3" hue="-6" saturation="-24" value="4" alpha="100" />
-                       <ChangeableColorInfo id="B065L4D" inputColor="2" hue="-9" saturation="-17" value="-24" alpha="100" />
-                       <ChangeableColorInfo id="B065L6" inputColor="2" hue="0" saturation="43" value="7" alpha="100" />
-                       <ChangeableColorInfo id="B071" inputColor="K" hue="0" saturation="0" value="40" alpha="100" />
-                       <ChangeableColorInfo id="B0712" inputColor="K" hue="0" saturation="0" value="48" alpha="100" />
-                       <ChangeableColorInfo id="B0722" inputColor="K" hue="0" saturation="0" value="13" alpha="100" />
-                       <ChangeableColorInfo id="B0723" inputColor="K" hue="0" saturation="0" value="17" alpha="100" />
-                       <ChangeableColorInfo id="B0724" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B0725" inputColor="W" hue="0" saturation="0" value="-62" alpha="20" />
-                       <ChangeableColorInfo id="B0731" inputColor="2" hue="-3" saturation="7" value="6" alpha="95" />
-                       <ChangeableColorInfo id="B066L1" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B081" inputColor="3" hue="0" saturation="0" value="20" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B082L1" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B082L1D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B082L1S" inputColor="3" hue="0" saturation="0" value="0" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B082L2" inputColor="K" hue="0" saturation="0" value="40" alpha="100" />
-                       <ChangeableColorInfo id="B082L2D" inputColor="K" hue="0" saturation="0" value="40" alpha="20" />
-                       <ChangeableColorInfo id="B082L2S" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B083" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B083D" inputColor="W" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B083S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B084" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B085" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B085P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B085D" inputColor="W" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B091" inputColor="K" hue="0" saturation="0" value="0" alpha="60" />
-                       <ChangeableColorInfo id="B092L1" inputColor="W" hue="0" saturation="0" value="-4" alpha="100" />
-                       <ChangeableColorInfo id="B092L2" inputColor="W" hue="0" saturation="0" value="-54" alpha="90" />
-                       <ChangeableColorInfo id="B093P" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B093D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B094" inputColor="1" hue="0" saturation="0" value="80" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B095" inputColor="K" hue="0" saturation="0" value="39" alpha="90" />
-                       <ChangeableColorInfo id="B095P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B095D" inputColor="K" hue="0" saturation="0" value="39" alpha="20" />
-                       <ChangeableColorInfo id="B096" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B096P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B096D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B097" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B099L1" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B099L1D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B099L1P" inputColor="3" hue="3" saturation="-7" value="-6" alpha="100" />
-                       <ChangeableColorInfo id="B099L1S" inputColor="3" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B099L2" inputColor="K" hue="0" saturation="0" value="40" alpha="100" />
-                       <ChangeableColorInfo id="B099L2D" inputColor="K" hue="0" saturation="0" value="40" alpha="20" />
-                       <ChangeableColorInfo id="B099L2P" inputColor="K" hue="0" saturation="0" value="40" alpha="100" />
-                       <ChangeableColorInfo id="B099LS" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B101" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B102" inputColor="3" hue="4" saturation="66" value="65" alpha="36" />
-                       <ChangeableColorInfo id="B103L1" inputColor="-" hue="204" saturation="55" value="87" alpha="100" />
-                       <ChangeableColorInfo id="B103L2" inputColor="-" hue="0" saturation="0" value="100" alpha="100" />
-                       <ChangeableColorInfo id="B104L1D" inputColor="K" hue="0" saturation="0" value="28" alpha="50" />
-                       <ChangeableColorInfo id="B104L2D" inputColor="3" hue="4" saturation="66" value="65" alpha="20" />
-                       <ChangeableColorInfo id="B131" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B132" inputColor="3" hue="4" saturation="66" value="65" alpha="36" />
-                       <ChangeableColorInfo id="B141" inputColor="W" hue="0" saturation="0" value="0" alpha="0" />
-                       <ChangeableColorInfo id="B151" inputColor="2" hue="-3" saturation="7" value="6" alpha="95" />
-                       <ChangeableColorInfo id="B161" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B171" inputColor="K" hue="0" saturation="0" value="19" alpha="100" />
-                       <ChangeableColorInfo id="F021L1i" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="F021L1iP" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="F022L1i" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="F022L1iD" inputColor="W" hue="0" saturation="0" value="-4" alpha="40" />
-                       <ChangeableColorInfo id="F071" inputColor="W" hue="0" saturation="0" value="-4" alpha="100" />
-                       <ChangeableColorInfo id="F072" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W011" inputColor="2" hue="-5" saturation="-2" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W011P" inputColor="3" hue="0" saturation="5" value="8" alpha="100" />
-                       <ChangeableColorInfo id="W011D" inputColor="2" hue="-9" saturation="-17" value="-24" alpha="100" />
-                       <ChangeableColorInfo id="W012" inputColor="2" hue="-23" saturation="72" value="52" alpha="100" />
-                       <ChangeableColorInfo id="W012P" inputColor="3" hue="-20" saturation="31" value="52" alpha="100" />
-                       <ChangeableColorInfo id="W012D" inputColor="2" hue="-24" saturation="52" value="2" alpha="100" />
-                       <ChangeableColorInfo id="W012L1" inputColor="2" hue="-3" saturation="73" value="-22" alpha="100" />
-                       <ChangeableColorInfo id="W012L1P" inputColor="3" hue="-3" saturation="66" value="-4" alpha="100" />
-                       <ChangeableColorInfo id="W012L1D" inputColor="W" hue="0" saturation="0" value="-81" alpha="100" />
-                       <ChangeableColorInfo id="W012L2" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W012L2P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W012L2D" inputColor="W" hue="0" saturation="0" value="-77" alpha="100" />
-                       <ChangeableColorInfo id="W013" inputColor="2" hue="1" saturation="73" value="64" alpha="100" />
-                       <ChangeableColorInfo id="W013P" inputColor="3" hue="4" saturation="34" value="60" alpha="100" />
-                       <ChangeableColorInfo id="W013D" inputColor="2" hue="-1" saturation="66" value="-2" alpha="100" />
-                       <ChangeableColorInfo id="W013L1" inputColor="2" hue="-3" saturation="73" value="-22" alpha="100" />
-                       <ChangeableColorInfo id="W013L1P" inputColor="3" hue="-3" saturation="66" value="-4" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="W013L1D" inputColor="W" hue="0" saturation="0" value="-81" alpha="100" />
-                       <ChangeableColorInfo id="W013L2" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W013L2P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W013L2D" inputColor="W" hue="0" saturation="0" value="-77" alpha="100" />
-                       <ChangeableColorInfo id="W014" inputColor="2" hue="54" saturation="63" value="35" alpha="100" />
-                       <ChangeableColorInfo id="W014P" inputColor="3" hue="57" saturation="19" value="40" alpha="100" />
-                       <ChangeableColorInfo id="W014D" inputColor="2" hue="66" saturation="16" value="-8" alpha="100" />
-                       <ChangeableColorInfo id="W014L1" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W014L1P" inputColor="W" hue="86" saturation="62" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L1D" inputColor="W" hue="86" saturation="45" value="-85" alpha="100" />
-                       <ChangeableColorInfo id="W014L2" inputColor="W" hue="0" saturation="0" value="-48" alpha="100" />
-                       <ChangeableColorInfo id="W014L2P" inputColor="W" hue="0" saturation="1" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L2D" inputColor="W" hue="0" saturation="0" value="-75" alpha="100" />
-                       <ChangeableColorInfo id="W014L3" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W014L3P" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="W014L3D" inputColor="W" hue="0" saturation="0" value="-70" alpha="100" />
-                       <ChangeableColorInfo id="W014L4" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W014L4P" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="W014L4D" inputColor="W" hue="0" saturation="0" value="-70" alpha="100" />
-                       <ChangeableColorInfo id="W014L5" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W014L5P" inputColor="W" hue="86" saturation="62" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L5D" inputColor="W" hue="86" saturation="45" value="-85" alpha="100" />
-                       <ChangeableColorInfo id="W014L6" inputColor="W" hue="0" saturation="0" value="-48" alpha="100" />
-                       <ChangeableColorInfo id="W014L6P" inputColor="W" hue="0" saturation="1" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L6D" inputColor="W" hue="0" saturation="0" value="-75" alpha="100" />
-                       <ChangeableColorInfo id="W015" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W015P" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W015D" inputColor="W" hue="0" saturation="0" value="-77" alpha="100" />
-                       <ChangeableColorInfo id="W0811" inputColor="2" hue="-3" saturation="-10" value="-9" alpha="100" />
-                       <ChangeableColorInfo id="W0812" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W089" inputColor="1" hue="0" saturation="0" value="100" alpha="80" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="W089P" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W131" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W132" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W132D" inputColor="3" hue="4" saturation="66" value="65" alpha="20" />
-                       <ChangeableColorInfo id="W1711" inputColor="1" hue="-2" saturation="29" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W1712" inputColor="1" hue="-2" saturation="29" value="0" alpha="70" />
-                       <ChangeableColorInfo id="W172L1" inputColor="W" hue="4" saturation="86" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W173L1" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W1911" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W1912" inputColor="W" hue="0" saturation="0" value="0" alpha="50" />
-                       <ChangeableColorInfo id="W201" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W211" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W221" inputColor="K" hue="0" saturation="0" value="0" alpha="25" />
-                       <ChangeableColorInfo id="W222" inputColor="K" hue="0" saturation="0" value="0" alpha="50" />
-                       <ChangeableColorInfo id="W231" inputColor="W" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="W231P" inputColor="W" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="W231D" inputColor="W" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="W241" inputColor="W" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="W241P" inputColor="W" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="W241D" inputColor="W" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="T011" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T012" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T0211" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0211P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0211D" inputColor="W" hue="0" saturation="0" value="-4" alpha="40" />
-                       <ChangeableColorInfo id="T0211S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0212" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T022" inputColor="2" hue="-4" saturation="18" value="27" alpha="100" />
-                       <ChangeableColorInfo id="T022P" inputColor="2" hue="-4" saturation="18" value="27" alpha="100" />
-                       <ChangeableColorInfo id="T022D" inputColor="W" hue="0" saturation="0" value="-4" alpha="40" />
-                       <ChangeableColorInfo id="T022S" inputColor="2" hue="-4" saturation="18" value="27" alpha="100" />
-                       <ChangeableColorInfo id="T0231" inputColor="2" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="T0232" inputColor="2" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="T024" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T024P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T024S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T025" inputColor="W" hue="0" saturation="0" value="-4" alpha="100" />
-                       <ChangeableColorInfo id="T0311" inputColor="W" hue="0" saturation="0" value="-65" alpha="100" />
-                       <ChangeableColorInfo id="T0311P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0312" inputColor="2" hue="0" saturation="0" value="0" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="T0312P" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T0313" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T041" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T041P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T041D" inputColor="W" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="T041S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T051" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T051P" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T051D" inputColor="W" hue="0" saturation="0" value="-62" alpha="100" />
-                       <ChangeableColorInfo id="T052" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T052P" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T052D" inputColor="W" hue="0" saturation="0" value="-62" alpha="100" />
-                       <ChangeableColorInfo id="T063" inputColor="3" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T071" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0811" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0812" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T082" inputColor="3" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T091" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T092" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T093" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T093P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T093D" inputColor="W" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="T093S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T094" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T094P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T094D" inputColor="W" hue="0" saturation="0" value="-4" alpha="40" />
-                       <ChangeableColorInfo id="T094S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0961" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0962" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T097" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T101" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="T101D" inputColor="W" hue="0" saturation="0" value="-20" alpha="20" />
-                       <ChangeableColorInfo id="T101S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T111" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T111P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T111D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="T111S" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T112" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T112P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T112D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="T112S" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T121" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="T121P" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="T121D" inputColor="W" hue="0" saturation="0" value="-20" alpha="20" />
-                       <ChangeableColorInfo id="T121S" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="T131" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-               </Theme>
-               <Theme style="Light">
-                       <ChangeableColorInfo id="B011" inputColor="1" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B012" inputColor="1" hue="3" saturation="3" value="76" alpha="100" />
-                       <ChangeableColorInfo id="B012P" inputColor="3" hue="3" saturation="-3" value="60" alpha="100" />
-                       <ChangeableColorInfo id="B018E" inputColor="3" hue="4" saturation="66" value="65" alpha="95" />
-                       <ChangeableColorInfo id="B019" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B0211" inputColor="1" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B0211D" inputColor="1" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B0221L1" inputColor="K" hue="0" saturation="0" value="70" alpha="100" />
-                       <ChangeableColorInfo id="B0221L2" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B0222" inputColor="1" hue="0" saturation="-13" value="71" alpha="100" />
-                       <ChangeableColorInfo id="B0232" inputColor="3" hue="7" saturation="20" value="48" alpha="100" />
-                       <ChangeableColorInfo id="B0241" inputColor="-" hue="40" saturation="90" value="92" alpha="100" />
-                       <ChangeableColorInfo id="B0242" inputColor="-" hue="89" saturation="86" value="66" alpha="100" />
-                       <ChangeableColorInfo id="B041P" inputColor="3" hue="7" saturation="11" value="59" alpha="100" />
-                       <ChangeableColorInfo id="B0511" inputColor="1" hue="-2" saturation="56" value="38" alpha="100" />
-                       <ChangeableColorInfo id="B0511P" inputColor="1" hue="-2" saturation="16" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B0513" inputColor="1" hue="-2" saturation="41" value="49" alpha="100" />
-                       <ChangeableColorInfo id="B0514" inputColor="1" hue="-4" saturation="-7" value="66" alpha="100" />
-                       <ChangeableColorInfo id="B0514P1" inputColor="3" hue="4" saturation="63" value="63" alpha="100" />
-                       <ChangeableColorInfo id="B052L1" inputColor="3" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B052L1D" inputColor="3" hue="0" saturation="0" value="100" alpha="20" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B052L4" inputColor="W" hue="0" saturation="0" value="-80" alpha="100" />
-                       <ChangeableColorInfo id="B052L4P" inputColor="W" hue="0" saturation="0" value="-80" alpha="100" />
-                       <ChangeableColorInfo id="B052L4D" inputColor="W" hue="0" saturation="0" value="-80" alpha="20" />
-                       <ChangeableColorInfo id="B052L6" inputColor="3" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B052L6D" inputColor="3" hue="0" saturation="0" value="100" alpha="50" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B052L6P2" inputColor="3" hue="0" saturation="0" value="100" alpha="70" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B0543" inputColor="K" hue="0" saturation="0" value="96" alpha="100" />
-                       <ChangeableColorInfo id="B05521" inputColor="K" hue="0" saturation="0" value="80" alpha="100" />
-                       <ChangeableColorInfo id="B05522" inputColor="K" hue="0" saturation="0" value="80" alpha="100" />
-                       <ChangeableColorInfo id="B0553" inputColor="1" hue="3" saturation="27" value="63" alpha="100" />
-                       <ChangeableColorInfo id="B0555" inputColor="W" hue="0" saturation="0" value="0" alpha="25" />
-                       <ChangeableColorInfo id="B056" inputColor="2" hue="4" saturation="18" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B056P" inputColor="3" hue="5" saturation="1" value="55" alpha="100" />
-                       <ChangeableColorInfo id="B056D" inputColor="2" hue="2" saturation="-11" value="62" alpha="100" />
-                       <ChangeableColorInfo id="B061L1E" inputColor="K" hue="0" saturation="0" value="96" alpha="100" />
-                       <ChangeableColorInfo id="B061L2" inputColor="1" hue="-2" saturation="-4" value="78" alpha="100" />
-                       <ChangeableColorInfo id="B061L7" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B065L3" inputColor="K" hue="0" saturation="0" value="80" alpha="100" />
-                       <ChangeableColorInfo id="B065L2" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B0651L2" inputColor="3" hue="4" saturation="66" value="65" alpha="25" />
-                       <ChangeableColorInfo id="B0652L2" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B065L1" inputColor="W" hue="0" saturation="0" value="-8" alpha="100" />
-                       <ChangeableColorInfo id="B065L1P" inputColor="W" hue="0" saturation="0" value="-8" alpha="100" />
-                       <ChangeableColorInfo id="B065L1D" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="B065L4" inputColor="2" hue="4" saturation="18" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B065L4P" inputColor="3" hue="5" saturation="1" value="55" alpha="100" />
-                       <ChangeableColorInfo id="B065L4D" inputColor="2" hue="2" saturation="-11" value="62" alpha="100" />
-                       <ChangeableColorInfo id="B065L6" inputColor="2" hue="0" saturation="43" value="7" alpha="100" />
-                       <ChangeableColorInfo id="B071" inputColor="K" hue="0" saturation="0" value="60" alpha="100" />
-                       <ChangeableColorInfo id="B0712" inputColor="K" hue="0" saturation="0" value="60" alpha="100" />
-                       <ChangeableColorInfo id="B0722" inputColor="K" hue="0" saturation="0" value="86" alpha="100" />
-                       <ChangeableColorInfo id="B0723" inputColor="K" hue="0" saturation="0" value="91" alpha="100" />
-                       <ChangeableColorInfo id="B0724" inputColor="1" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B0731" inputColor="2" hue="0" saturation="0" value="100" alpha="95" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B066L1" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B081" inputColor="3" hue="3" saturation="22" value="45" alpha="100" />
-                       <ChangeableColorInfo id="B082L1" inputColor="K" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="B082L1D" inputColor="K" hue="0" saturation="0" value="0" alpha="15" />
-                       <ChangeableColorInfo id="B082L1S" inputColor="3" hue="3" saturation="36" value="21" alpha="100" />
-                       <ChangeableColorInfo id="B082L2" inputColor="K" hue="0" saturation="0" value="100" alpha="40" />
-                       <ChangeableColorInfo id="B082L2D" inputColor="K" hue="0" saturation="0" value="100" alpha="20" />
-                       <ChangeableColorInfo id="B082L2S" inputColor="3" hue="20" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B083" inputColor="W" hue="0" saturation="0" value="-4" alpha="70" />
-                       <ChangeableColorInfo id="B083D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="B083S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B084" inputColor="3" hue="19" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B085" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B085P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B085D" inputColor="W" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B091" inputColor="K" hue="0" saturation="0" value="0" alpha="60" />
-                       <ChangeableColorInfo id="B092L1" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B092L2" inputColor="W" hue="0" saturation="0" value="-56" alpha="100" />
-                       <ChangeableColorInfo id="B093P" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B093D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="B094" inputColor="1" hue="0" saturation="-13" value="71" alpha="100" />
-                       <ChangeableColorInfo id="B095" inputColor="K" hue="0" saturation="0" value="39" alpha="90" />
-                       <ChangeableColorInfo id="B095P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B095D" inputColor="K" hue="0" saturation="0" value="39" alpha="20" />
-                       <ChangeableColorInfo id="B096" inputColor="K" hue="0" saturation="0" value="20" alpha="100" />
-                       <ChangeableColorInfo id="B096P" inputColor="W" hue="0" saturation="0" value="100" alpha="100" />
-                       <ChangeableColorInfo id="B096D" inputColor="K" hue="0" saturation="0" value="20" alpha="20" />
-                       <ChangeableColorInfo id="B097" inputColor="K" hue="0" saturation="0" value="46" alpha="100" />
-                       <ChangeableColorInfo id="B099L1" inputColor="K" hue="0" saturation="0" value="0" alpha="30" />
-                       <ChangeableColorInfo id="B099L1D" inputColor="K" hue="0" saturation="0" value="0" alpha="15" />
-                       <ChangeableColorInfo id="B099L1P" inputColor="3" hue="3" saturation="36" value="21" alpha="100" />
-                       <ChangeableColorInfo id="B099L1S" inputColor="3" hue="3" saturation="36" value="21" alpha="100" />
-                       <ChangeableColorInfo id="B099L2" inputColor="K" hue="0" saturation="0" value="100" alpha="40" />
-                       <ChangeableColorInfo id="B099L2D" inputColor="K" hue="0" saturation="0" value="100" alpha="20" />
-                       <ChangeableColorInfo id="B099L2P" inputColor="K" hue="0" saturation="0" value="100" alpha="40" />
-                       <ChangeableColorInfo id="B099LS" inputColor="3" hue="20" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="B101" inputColor="1" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B102" inputColor="3" hue="4" saturation="66" value="65" alpha="36" />
-                       <ChangeableColorInfo id="B103L1" inputColor="-" hue="204" saturation="55" value="87" alpha="100" />
-                       <ChangeableColorInfo id="B103L2" inputColor="-" hue="0" saturation="0" value="100" alpha="100" />
-                       <ChangeableColorInfo id="B104L1D" inputColor="K" hue="0" saturation="0" value="80" alpha="40" />
-                       <ChangeableColorInfo id="B104L2D" inputColor="3" hue="4" saturation="66" value="65" alpha="15" />
-                       <ChangeableColorInfo id="B131" inputColor="1" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B132" inputColor="3" hue="4" saturation="66" value="65" alpha="36" />
-                       <ChangeableColorInfo id="B141" inputColor="W" hue="207" saturation="23" value="31" alpha="40" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B151" inputColor="2" hue="0" saturation="0" value="78" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="B161" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="B171" inputColor="K" hue="0" saturation="0" value="19" alpha="100" />
-                       <ChangeableColorInfo id="F021L1i" inputColor="W" hue="0" saturation="0" value="-80" alpha="100" />
-                       <ChangeableColorInfo id="F021L1iP" inputColor="W" hue="0" saturation="0" value="-80" alpha="100" />
-                       <ChangeableColorInfo id="F022L1i" inputColor="W" hue="0" saturation="0" value="-80" alpha="100" />
-                       <ChangeableColorInfo id="F022L1iD" inputColor="W" hue="0" saturation="0" value="-80" alpha="20" />
-                       <ChangeableColorInfo id="F071" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="F072" inputColor="K" hue="0" saturation="0" value="100" alpha="0" />
-                       <ChangeableColorInfo id="W011" inputColor="2" hue="4" saturation="18" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W011P" inputColor="3" hue="5" saturation="1" value="55" alpha="100" />
-                       <ChangeableColorInfo id="W011D" inputColor="2" hue="2" saturation="-11" value="62" alpha="100" />
-                       <ChangeableColorInfo id="W012" inputColor="2" hue="-23" saturation="72" value="52" alpha="100" />
-                       <ChangeableColorInfo id="W012P" inputColor="3" hue="-20" saturation="31" value="52" alpha="100" />
-                       <ChangeableColorInfo id="W012D" inputColor="2" hue="-24" saturation="52" value="2" alpha="100" />
-                       <ChangeableColorInfo id="W012L1" inputColor="2" hue="0" saturation="0" value="90" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="W012L1P" inputColor="3" hue="-3" saturation="66" value="-4" alpha="100" />
-                       <ChangeableColorInfo id="W012L1D" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="W012L2" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W012L2P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W012L2D" inputColor="W" hue="0" saturation="0" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W013" inputColor="2" hue="1" saturation="73" value="64" alpha="100" />
-                       <ChangeableColorInfo id="W013P" inputColor="3" hue="4" saturation="34" value="60" alpha="100" />
-                       <ChangeableColorInfo id="W013D" inputColor="2" hue="-1" saturation="66" value="-2" alpha="100" />
-                       <ChangeableColorInfo id="W013L1" inputColor="2" hue="0" saturation="0" value="90" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="W013L1P" inputColor="3" hue="-3" saturation="66" value="-4" alpha="100" />
-                       <ChangeableColorInfo id="W013L1D" inputColor="W" hue="0" saturation="0" value="-20" alpha="100" />
-                       <ChangeableColorInfo id="W013L2" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W013L2P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W013L2D" inputColor="W" hue="0" saturation="0" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014" inputColor="2" hue="54" saturation="63" value="35" alpha="100" />
-                       <ChangeableColorInfo id="W014P" inputColor="3" hue="57" saturation="19" value="40" alpha="100" />
-                       <ChangeableColorInfo id="W014D" inputColor="2" hue="66" saturation="16" value="-8" alpha="100" />
-                       <ChangeableColorInfo id="W014L1" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W014L1P" inputColor="W" hue="86" saturation="62" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L1D" inputColor="W" hue="86" saturation="45" value="-85" alpha="100" />
-                       <ChangeableColorInfo id="W014L2" inputColor="W" hue="0" saturation="0" value="-48" alpha="100" />
-                       <ChangeableColorInfo id="W014L2P" inputColor="W" hue="0" saturation="1" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L2D" inputColor="W" hue="0" saturation="0" value="-75" alpha="100" />
-                       <ChangeableColorInfo id="W014L3" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W014L3P" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="W014L3D" inputColor="W" hue="0" saturation="0" value="-70" alpha="100" />
-                       <ChangeableColorInfo id="W014L4" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W014L4P" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="W014L4D" inputColor="W" hue="0" saturation="0" value="-70" alpha="100" />
-                       <ChangeableColorInfo id="W014L5" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W014L5P" inputColor="W" hue="86" saturation="62" value="-60" alpha="100" />
-                       <ChangeableColorInfo id="W014L5D" inputColor="W" hue="86" saturation="45" value="-85" alpha="100" />
-                       <ChangeableColorInfo id="W014L6" inputColor="W" hue="0" saturation="0" value="-48" alpha="100" />
-                       <ChangeableColorInfo id="W014L6P" inputColor="W" hue="0" saturation="1" value="-48" alpha="100" />
-                       <ChangeableColorInfo id="W014L6D" inputColor="W" hue="0" saturation="0" value="-75" alpha="100" />
-                       <ChangeableColorInfo id="W015" inputColor="W" hue="0" saturation="0" value="-80" alpha="100" />
-                       <ChangeableColorInfo id="W015P" inputColor="W" hue="86" saturation="92" value="-25" alpha="100" />
-                       <ChangeableColorInfo id="W015D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="W0811" inputColor="2" hue="-3" saturation="-22" value="63" alpha="100" />
-                       <ChangeableColorInfo id="W0812" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W089" inputColor="1" hue="-3" saturation="-2" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W089P" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W131" inputColor="K" hue="0" saturation="0" value="96" alpha="100" />
-                       <ChangeableColorInfo id="W132" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W132D" inputColor="3" hue="4" saturation="66" value="65" alpha="40" />
-                       <ChangeableColorInfo id="W1711" inputColor="1" hue="0" saturation="0" value="96" alpha="100" />
-                       <ChangeableColorInfo id="W1712" inputColor="1" hue="0" saturation="0" value="0" alpha="70" />
-                       <ChangeableColorInfo id="W172L1" inputColor="W" hue="4" saturation="86" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W173L1" inputColor="W" hue="0" saturation="0" value="-74" alpha="100" />
-                       <ChangeableColorInfo id="W1911" inputColor="W" hue="0" saturation="0" value="-75" alpha="100" />
-                       <ChangeableColorInfo id="W1912" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="W201" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="W211" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="W221" inputColor="K" hue="0" saturation="0" value="0" alpha="25" />
-                       <ChangeableColorInfo id="W222" inputColor="K" hue="0" saturation="0" value="0" alpha="50" />
-                       <ChangeableColorInfo id="W231" inputColor="W" hue="0" saturation="0" value="-100" alpha="30" />
-                       <ChangeableColorInfo id="W231P" inputColor="W" hue="0" saturation="0" value="-100" alpha="30" />
-                       <ChangeableColorInfo id="W231D" inputColor="W" hue="0" saturation="0" value="-100" alpha="30" />
-                       <ChangeableColorInfo id="T011" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T012" inputColor="3" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
-                       <ChangeableColorInfo id="T0211" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0211P" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0211D" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="T0211S" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0212" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T022" inputColor="2" hue="-3" saturation="56" value="15" alpha="100" />
-                       <ChangeableColorInfo id="T022P" inputColor="2" hue="-3" saturation="56" value="15" alpha="100" />
-                       <ChangeableColorInfo id="T022D" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="T022S" inputColor="2" hue="-3" saturation="56" value="15" alpha="100" />
-                       <ChangeableColorInfo id="T0231" inputColor="2" hue="-3" saturation="20" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0232" inputColor="2" hue="-3" saturation="20" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T024" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T024P" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T024S" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T025" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0311" inputColor="W" hue="0" saturation="0" value="-55" alpha="100" />
-                       <ChangeableColorInfo id="T0311P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T0312" inputColor="2" hue="1" saturation="29" value="71" alpha="100" />
-                       <ChangeableColorInfo id="T0312P" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T0313" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T041" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T041P" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T041D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="T041S" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T051" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T051P" inputColor="K" hue="0" saturation="0" value="100" alpha="100" />
-                       <ChangeableColorInfo id="T051D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="T052" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T052P" inputColor="K" hue="0" saturation="0" value="100" alpha="100" />
-                       <ChangeableColorInfo id="T052D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="T063" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T071" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0811" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0812" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T082" inputColor="3" hue="4" saturation="66" value="65" alpha="100" />
-                       <ChangeableColorInfo id="T091" inputColor="3" hue="0" saturation="12" value="5" alpha="100" />
-                       <ChangeableColorInfo id="T092" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T093" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T093P" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T093D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="T093S" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T094" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T094P" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T094D" inputColor="W" hue="0" saturation="0" value="-30" alpha="100" />
-                       <ChangeableColorInfo id="T094S" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0961" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T0962" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T097" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-                       <ChangeableColorInfo id="T101" inputColor="W" hue="0" saturation="0" value="0" alpha="70" />
-                       <ChangeableColorInfo id="T101D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="T101S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T111" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T111P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T111D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="T111S" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T112" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T112P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T112D" inputColor="K" hue="0" saturation="0" value="0" alpha="20" />
-                       <ChangeableColorInfo id="T112S" inputColor="K" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T121" inputColor="W" hue="0" saturation="0" value="0" alpha="70" />
-                       <ChangeableColorInfo id="T121P" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T121D" inputColor="W" hue="0" saturation="0" value="-100" alpha="20" />
-                       <ChangeableColorInfo id="T121S" inputColor="W" hue="0" saturation="0" value="0" alpha="100" />
-                       <ChangeableColorInfo id="T131" inputColor="W" hue="0" saturation="0" value="-100" alpha="100" />
-               </Theme>
-       </ChangeableColorTable>
-       <ChangeableColorTable num="2">
-               <Theme style="Dark">
-               </Theme>
-               <Theme style="Light">
-               </Theme>
-       </ChangeableColorTable>
-       <ChangeableColorTable num="3">
-               <Theme style="Dark">
-               </Theme>
-               <Theme style="Light">
-               </Theme>
-       </ChangeableColorTable>
-</ChangeableColorTables>
diff --git a/edcs/table/system-font.xml b/edcs/table/system-font.xml
deleted file mode 100644 (file)
index 573b1b7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<FontInfoTable>
-</FontInfoTable>
diff --git a/edcs/usbotg-unmount.edc b/edcs/usbotg-unmount.edc
deleted file mode 100644 (file)
index c82923c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-#define MAIN_W 480
-#define MAIN_H 800
-#define POPUP_MAIN_W 458
-#define POPUP_MAIN_H 240
-
-collections
-{
-       group
-       {
-
-                       name: "main";
-                       min: MAIN_W MAIN_H;
-                       parts {
-                                       part
-                                       {
-                                         name: "background";
-                                         type: RECT;
-                                         mouse_events: 1;
-                                         description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0 0; offset: 0 0; }
-                                                       rel2 { relative: 1 1; offset: -1 -1; }
-                                                       color: 0 0 0 100;
-                                               }
-                                       }
-
-                                       part
-                                       {
-                                               name: "txt_title";
-                                               type: TEXT;
-                                               mouse_events: 1;
-                                               description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0.0 0.0; to: background; }
-                                                       rel2 { relative: 1.0 0.5; to: background; }
-                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                                       color: 255 255 255 255;
-                                               }
-                                       }
-
-                                       part
-                                       {
-                                               name: "txt_mesg";
-                                               type: TEXT;
-                                               mouse_events: 1;
-                                               description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0.0 0.5; to: background; }
-                                                       rel2 { relative: 1.0 1.0; to: background; }
-                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                                       color: 255 255 255 255;
-                                               }
-                                       }
-               }
-
-               programs {
-                                       program
-                                       {
-                                               name: "click_exit";
-                                               source: "background";
-                                               signal: "mouse,clicked,1";
-                                               action: SIGNAL_EMIT "update_clicked" "background";
-                                       }
-                               }
-       }
-
-
-   group
-   {
-                       name: "popup";
-                       min: POPUP_MAIN_W POPUP_MAIN_H;
-                       parts
-                       {
-                               part {
-                               name: "background";
-                               type: RECT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; offset: 0 0; }
-                                       rel2 { relative: 1.0 1.0; offset: -1 -1; }
-                                       color: 0 0 0 0;
-                                       }
-                               }
-
-                               part {
-                               name: "txt_title";
-                               type: TEXT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; to: background; }
-                                       rel2 { relative: 1.0 0.5; to: background; }
-                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                       color: 0 0 0 0;
-                                       }
-                               }
-
-                               part {
-                               name: "txt_mesg";
-                               type: TEXT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.5; to: background; }
-                                       rel2 { relative: 1.0 1.0; to: background; }
-                                       text { text_class: "GP_Latin"; align: 0.5 0.5; }
-                                       color: 255 255 255 255;
-                                       }
-                               }
-               }
-
-               programs
-               {
-                               program
-                               {
-                                       name: "bg_click";
-                                       signal: "mouse,down,1";
-                                       source: "bg";
-                                       action, SIGNAL_EMIT "background_click" "background";
-                               }
-               }
-       }
-}
diff --git a/edcs/usbotg.edc b/edcs/usbotg.edc
deleted file mode 100644 (file)
index c82923c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-#define MAIN_W 480
-#define MAIN_H 800
-#define POPUP_MAIN_W 458
-#define POPUP_MAIN_H 240
-
-collections
-{
-       group
-       {
-
-                       name: "main";
-                       min: MAIN_W MAIN_H;
-                       parts {
-                                       part
-                                       {
-                                         name: "background";
-                                         type: RECT;
-                                         mouse_events: 1;
-                                         description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0 0; offset: 0 0; }
-                                                       rel2 { relative: 1 1; offset: -1 -1; }
-                                                       color: 0 0 0 100;
-                                               }
-                                       }
-
-                                       part
-                                       {
-                                               name: "txt_title";
-                                               type: TEXT;
-                                               mouse_events: 1;
-                                               description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0.0 0.0; to: background; }
-                                                       rel2 { relative: 1.0 0.5; to: background; }
-                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                                       color: 255 255 255 255;
-                                               }
-                                       }
-
-                                       part
-                                       {
-                                               name: "txt_mesg";
-                                               type: TEXT;
-                                               mouse_events: 1;
-                                               description {
-                                                       state: "default" 0.0;
-                                                       rel1 { relative: 0.0 0.5; to: background; }
-                                                       rel2 { relative: 1.0 1.0; to: background; }
-                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                                       color: 255 255 255 255;
-                                               }
-                                       }
-               }
-
-               programs {
-                                       program
-                                       {
-                                               name: "click_exit";
-                                               source: "background";
-                                               signal: "mouse,clicked,1";
-                                               action: SIGNAL_EMIT "update_clicked" "background";
-                                       }
-                               }
-       }
-
-
-   group
-   {
-                       name: "popup";
-                       min: POPUP_MAIN_W POPUP_MAIN_H;
-                       parts
-                       {
-                               part {
-                               name: "background";
-                               type: RECT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; offset: 0 0; }
-                                       rel2 { relative: 1.0 1.0; offset: -1 -1; }
-                                       color: 0 0 0 0;
-                                       }
-                               }
-
-                               part {
-                               name: "txt_title";
-                               type: TEXT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.0; to: background; }
-                                       rel2 { relative: 1.0 0.5; to: background; }
-                                       text { text_class: "tc_default"; align: 0.5 0.5; }
-                                       color: 0 0 0 0;
-                                       }
-                               }
-
-                               part {
-                               name: "txt_mesg";
-                               type: TEXT;
-                               mouse_events: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       rel1 { relative: 0.0 0.5; to: background; }
-                                       rel2 { relative: 1.0 1.0; to: background; }
-                                       text { text_class: "GP_Latin"; align: 0.5 0.5; }
-                                       color: 255 255 255 255;
-                                       }
-                               }
-               }
-
-               programs
-               {
-                               program
-                               {
-                                       name: "bg_click";
-                                       signal: "mouse,down,1";
-                                       source: "bg";
-                                       action, SIGNAL_EMIT "background_click" "background";
-                               }
-               }
-       }
-}
diff --git a/lowbatt-popup/CMakeLists.txt b/lowbatt-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index 1cfd2b6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-#################### Low-battery ###############################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(lowbatt-popup C)
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ADD_SUBDIRECTORY(micro-src)
-ELSE()
-ADD_SUBDIRECTORY(src)
-ENDIF()
diff --git a/lowbatt-popup/micro-src/CMakeLists.txt b/lowbatt-popup/micro-src/CMakeLists.txt
deleted file mode 100755 (executable)
index 9726fb8..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-#################### Low-battery ###############################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(VENDOR "tizen")
-SET(PACKAGE "lowbat-syspopup")
-SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(TABLE_PATH ${CMAKE_SOURCE_DIR}/edcs/table)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/lowbatt-popup/micro-src/lowbatt.c
-                ${CMAKE_SOURCE_DIR}/share/micro-common.c)
-
-SET(PACKAGE ${PROJECT_NAME})
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lowbatt-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/popup-launcher/src)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
-               appcore-efl
-               elementary
-               deviced
-               dlog
-               feedback
-               syspopup
-               efl-assist
-               syspopup-caller
-               capi-media-sound-manager
-               capi-media-wav-player
-)
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-
-SET(COMMON_EDC "micro-common.edc")
-ADD_CUSTOM_TARGET(lowbatt.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/${COMMON_EDC} ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowbatt.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/${COMMON_EDC}
-)
-ADD_DEPENDENCIES(${PROJECT_NAME} lowbatt.edj)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowbatt.edj DESTINATION /usr/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt/)
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.lowbat-syspopup/bin)
-
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowbat-syspopup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}/micro-src/org.tizen.lowbat-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
-INSTALL(FILES ${TABLE_PATH}/system-font.xml  DESTINATION ${RESDIR}/table)
-INSTALL(FILES ${TABLE_PATH}/system-color.xml DESTINATION ${RESDIR}/table)
-###############################################################
-
-
diff --git a/lowbatt-popup/micro-src/lowbatt.c b/lowbatt-popup/micro-src/lowbatt.c
deleted file mode 100644 (file)
index b7414ab..0000000
+++ /dev/null
@@ -1,1097 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <vconf.h>
-#include <efl_assist.h>
-#include <sound_manager.h>
-#include <wav_player.h>
-#include "micro-common.h"
-#include "launcher.h"
-
-#define DEVICED_PATH_SYSNOTI        "/Org/Tizen/System/DeviceD/SysNoti"
-#define DEVICED_INTERFACE_SYSNOTI   "org.tizen.system.deviced.SysNoti"
-#define SIGNAL_CHARGEERR_RESPONSE   "ChargeErrResponse"
-
-#define DEVICED_PATH_BATTERY   "/Org/Tizen/System/DeviceD/Battery"
-#define DEVICED_INTERFACE_BATTERY  "org.tizen.system.deviced.Battery"
-#define SIGNAL_TEMP_GOOD   "TempGood"
-
-#define SIGNAL_LOWBAT_EXTREME       "Extreme"
-#define SIGNAL_LOWBAT_NOT_EXTREME   "NotExtreme"
-
-#define BUF_MAX 256
-#define LOWBAT_SOUND_PATH          "/usr/share/feedback/sound/operation/low_battery.ogg"
-
-#define LOWBATT_WARNING_TITLE      "IDS_COM_HEADER_BATTERY_LOW_ABB"
-#define LOWBATT_WARNING_CONTENT    "IDS_ST_POP_THE_BATTERY_POWER_IS_LOW_RECHARGE_YOUR_GEAR_SOON_TO_KEEP_USING_IT"
-#define LOWBATT_POWEROFF_TITLE     "IDS_ST_BODY_LEDOT_LOW_BATTERY"
-#define LOWBATT_POWEROFF_CONTENT   "IDS_VR_POP_BATTERY_CRITICALLY_LOW_DEVICE_WILL_NOW_SHUT_DOWN"
-#define LOWBATT_CRITICAL_TITLE     "IDS_COM_HEADER_BATTERY_CRITICALLY_LOW"
-#define LOWBATT_CRITICAL_CONTENT   "IDS_ST_POP_THE_BATTERY_POWER_IS_CRITICALLY_LOW_RECHARGE_YOUR_GEAR_NOW_TO_KEEP_USING_IT"
-#define LOWBATT_EXTREME_TITLE      LOWBATT_CRITICAL_TITLE
-#define LOWBATT_EXTREME_CONTENT    "IDS_ST_POP_THE_BATTERY_POWER_IS_CRITICALLY_LOW_MSG"
-#define LOWBATT_NO_TOUCH_TITLE     LOWBATT_CRITICAL_TITLE
-#define LOWBATT_NO_TOUCH_CONTENT   "IDS_ST_POP_THE_BATTERY_POWER_IS_CRITICALLY_LOW_YOU_CAN_ONLY_USE_THE_DEFAULT_CLOCK_RECHARGE_YOUR_GEAR_NOW_TO_KEEP_USING_IT"
-#define CHARGE_ERR_TITLE           "IDS_COM_POP_ERROR"
-#define CHARGE_ERR_CONTENT         "IDS_COM_POP_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_HIGH_OR_LOW"
-#define CHARGE_ERR_LOW_TITLE       CHARGE_ERR_TITLE
-#define CHARGE_ERR_LOW_CONTENT     "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_LOW"
-#define CHARGE_ERR_HIGH_TITLE      CHARGE_ERR_TITLE
-#define CHARGE_ERR_HIGH_CONTENT    "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_HIGH"
-#define CHARGE_ERR_OVP_TITLE       CHARGE_ERR_TITLE
-#define CHARGE_ERR_OVP_CONTENT     "IDS_COM_POP_CHARGING_PAUSED_VOLTAGE_TOO_HIGH"
-#define BATT_DISCONNECTED_TITLE    CHARGE_ERR_TITLE
-#define BATT_DISCONNECTED_CONTENT  "IDS_COM_POP_BATTERY_DISCONNECTED_ABB"
-
-#define DBUS_PATH_HOME_RAISE  "/Org/Tizen/Coreapps/home/raise"
-#define DBUS_IFACE_HOME_RAISE "org.tizen.coreapps.home.raise"
-#define HOME_RAISE_SIGNAL     "homeraise"
-
-#define VCONFKEY_DO_NOT_DISTURB "memory/shealth/sleep/do_not_disturb"
-
-#define EDJ_PATH "/usr/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt"
-#define EDJ_NAME EDJ_PATH"/lowbatt.edj"
-
-#ifdef SYSTEM_APPS_MICRO_3
-#define LAYOUT_STYLE "micro_3_title_content_button"
-#else
-#define LAYOUT_STYLE NULL
-#endif
-
-enum lowbat_options {
-       LOWBAT_NONE,
-       LOWBAT_WARNING,
-       LOWBAT_POWEROFF,
-       LOWBAT_CRITICAL,
-       LOWBAT_EXTREME,
-       LOWBAT_NO_TOUCH,
-       LOWBAT_CHARGE_ERR,
-       LOWBAT_CHARGE_ERR_LOW,
-       LOWBAT_CHARGE_ERR_HIGH,
-       LOWBAT_CHARGE_ERR_OVP,
-       LOWBAT_BATT_DISCONNECT,
-};
-
-struct popup_type {
-       char *name;
-       int type;
-};
-
-static const struct popup_type lowbat_type[] = {
-       { "warning"           , LOWBAT_WARNING            },
-       { "poweroff"          , LOWBAT_POWEROFF           },
-       { "critical"          , LOWBAT_CRITICAL           },
-       { "extreme"           , LOWBAT_EXTREME            },
-       { "notouch"           , LOWBAT_NO_TOUCH           },
-       { "chargeerr"         , LOWBAT_CHARGE_ERR         },
-       { "chargeerrlow"      , LOWBAT_CHARGE_ERR_LOW     },
-       { "chargeerrhigh"     , LOWBAT_CHARGE_ERR_HIGH    },
-       { "chargeerrovp"      , LOWBAT_CHARGE_ERR_OVP     },
-       { "battdisconnect"    , LOWBAT_BATT_DISCONNECT    },
-};
-
-enum lowbat_threshold {
-       THRESHOLD_WARNING  = VCONFKEY_SYSMAN_BAT_WARNING_LOW, /* Below 15% */
-       THRESHOLD_CRITICAL = VCONFKEY_SYSMAN_BAT_CRITICAL_LOW, /* Below 5% */
-       THRESHOLD_EXTREME  = VCONFKEY_SYSMAN_BAT_POWER_OFF, /* Below 3% */
-};
-
-enum lowbat_extreme_state {
-       LOWBAT_STATE_UNKNOWN     = -1,
-       LOWBAT_STATE_NOT_EXTREME = 0,
-       LOWBAT_STATE_EXTREME     = 1,
-};
-
-static int type = LOWBAT_NONE;
-static Ecore_Event_Handler *mouse_up_handler = NULL;
-static E_DBus_Signal_Handler *powerkey_handler = NULL;
-
-static E_DBus_Signal_Handler *temp_handler = NULL;
-
-static Eina_Bool mouse_up_response(void *data, int type, void *event);
-static void unregister_main_handlers(struct appdata *ad);
-static void register_mouse_up_handler(struct appdata *ad);
-
-static bool (*change_sound_to_vibration)(void) = NULL;
-
-void register_sound_to_vibration(bool (*func)(void))
-{
-       change_sound_to_vibration = func;
-}
-
-static bool get_call_state(void)
-{
-       int state;
-
-       if (vconf_get_int(VCONFKEY_CALL_STATE, &state) == 0
-                       && state != VCONFKEY_CALL_OFF)
-               return true;
-       return false;
-}
-
-static bool get_voice_recording_state(void)
-{
-       int state;
-
-       if (vconf_get_int(VCONFKEY_SOUND_STATUS, &state) == 0
-                       && (state & VCONFKEY_SOUND_STATUS_AVRECORDING))
-               return true;
-       return false;
-}
-
-static bool get_do_not_disturb_state(void)
-{
-       int state, blockmode;
-
-       if (vconf_get_int(VCONFKEY_DO_NOT_DISTURB, &state) == 0
-                       && state == 1) {
-               _I("Do not disturb on");
-               return true;
-       }
-
-       if (vconf_get_bool(VCONFKEY_SETAPPL_BLOCKMODE_WEARABLE_BOOL, &blockmode) == 0
-                       && blockmode == 1) {
-               _I("Do not disturb on");
-               return true;
-       }
-
-       _I("Do not disturb off");
-       return false;
-}
-
-static void play_notification_feedback(void)
-{
-       if (get_do_not_disturb_state())
-               return;
-       play_feedback(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_LOWBATT);
-}
-
-static void play_silence(void)
-{
-       if (!change_sound_to_vibration)
-               return;
-       if (change_sound_to_vibration())
-               play_notification_feedback();
-}
-
-static void play_notification_sound(void)
-{
-       int ret, sound;
-       static bool session = false;
-
-       if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sound) != 0) {
-               _E("Failed to get sound status");
-               return;
-       }
-
-       if (sound == 0)
-               return;
-
-       if (get_call_state() || get_voice_recording_state()) {
-               play_silence();
-               return;
-       }
-
-       if (get_do_not_disturb_state())
-               return;
-
-       if (!session) {
-               ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_NOTIFICATION);
-               if (ret != SOUND_MANAGER_ERROR_NONE) {
-                       _E("Failed to set session to play sound(%d)", ret);
-                       return;
-               }
-               session = true;
-       }
-
-       if (access(LOWBAT_SOUND_PATH, F_OK) != 0) {
-               _E("The sound file does not exist (%d)", LOWBAT_SOUND_PATH);
-               return;
-       }
-
-
-       ret = wav_player_start(LOWBAT_SOUND_PATH, SOUND_TYPE_NOTIFICATION, NULL, NULL, NULL);
-       if (ret != WAV_PLAYER_ERROR_NONE)
-               _E("Failed to play sound file (%d, %s)", ret, LOWBAT_SOUND_PATH);
-}
-
-static void send_lowbat_extreme_signal(int extreme)
-{
-       static int state = LOWBAT_STATE_UNKNOWN;
-       char *signal;
-
-       if (state == extreme)
-               return;
-
-       switch (extreme) {
-       case LOWBAT_STATE_NOT_EXTREME:
-               signal = SIGNAL_LOWBAT_NOT_EXTREME;
-               break;
-       case LOWBAT_STATE_EXTREME:
-               signal = SIGNAL_LOWBAT_EXTREME;
-               break;
-       default:
-               _E("Unknown extreme status(%d)", extreme);
-               return;
-       }
-
-       state = extreme;
-
-       if (broadcast_dbus_signal(POPUP_PATH_LOWBAT,
-                               POPUP_IFACE_LOWBAT,
-                               signal, NULL, NULL) < 0)
-               _E("Failed to send signal for battery extremely low");
-}
-
-static void show_invisible_layer(struct appdata *ad)
-{
-       if (!ad)
-               return;
-
-       type = LOWBAT_NONE;
-
-       unregister_main_handlers(ad);
-       release_evas_object(&(ad->popup));
-       elm_win_role_set(ad->win_main, "no-dim");
-
-       register_mouse_up_handler(ad);
-
-       send_lowbat_extreme_signal(LOWBAT_STATE_EXTREME);
-}
-
-static void event_back_key_up(void *data, Evas_Object *obj, void *event_info)
-{
-       struct appdata *ad = data;
-       if (type == LOWBAT_NO_TOUCH)
-               show_invisible_layer(ad);
-       else
-               popup_terminate();
-}
-
-static void register_main_handlers(struct appdata *ad)
-{
-       if (ad && ad->win_main)
-               ea_object_event_callback_add(ad->win_main, EA_CALLBACK_BACK, event_back_key_up, ad);
-}
-
-static void unregister_main_handlers(struct appdata *ad)
-{
-       if (ad && ad->win_main)
-               ea_object_event_callback_del(ad->win_main, EA_CALLBACK_BACK, event_back_key_up);
-}
-
-static bool get_charge_state(void)
-{
-       int val;
-       if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &val) == 0
-                       && val == 1)
-               return true;
-       return false;
-}
-
-static void lowbat_terminate_popup(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("Terminate low battery popup");
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static void lowbatt_error_response(void *data, Evas_Object *obj, void *event_info)
-{
-       static bool terminate = false;
-       if (terminate)
-               return;
-       terminate = true;
-       _I("Terminate battery error popup");
-       if (broadcast_dbus_signal(DEVICED_PATH_SYSNOTI,
-                               DEVICED_INTERFACE_SYSNOTI,
-                               SIGNAL_CHARGEERR_RESPONSE,
-                               NULL, NULL) < 0)
-               _E("Failed to send signal for error popup button");
-
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static Evas_Object *load_popup(struct appdata *ad,
-               char *title, char *content,
-               char *lbtn_text,
-               void (*lbtn)(void *data, Evas_Object *obj, void *event_info),
-               char *rbtn_text,
-               void (*rbtn)(void *data, Evas_Object *obj, void *event_info))
-{
-#ifdef SYSTEM_APPS_CIRCLE
-       char *licon, *ricon;
-       if (rbtn) {
-               licon = "circle-cancel.png";
-               ricon = "circle-ok.png";
-       } else {
-               licon = "circle-ok.png";
-               ricon = NULL;
-       }
-
-       return load_normal_popup(ad,
-                       EDJ_NAME,
-                       title, content,
-                       lbtn_text, licon, lbtn,
-                       rbtn_text, ricon, rbtn);
-#else
-       return load_normal_popup(ad,
-                       title, content,
-                       lbtn_text, lbtn,
-                       rbtn_text, rbtn);
-#endif
-}
-
-static int load_charge_error_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       _(CHARGE_ERR_TITLE),
-                       _(CHARGE_ERR_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_error_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       return 0;
-}
-
-static void unregister_edbus_signal_handler(void)
-{
-       static E_DBus_Connection *conn = NULL;
-
-       conn = get_dbus_connection();
-       if (conn && temp_handler) {
-               e_dbus_signal_handler_del(conn, temp_handler);
-               temp_handler = NULL;
-       }
-}
-
-static void temp_status_changed(void *data, DBusMessage *msg)
-{
-       int r;
-
-       _I("edbus signal Received");
-
-       r = dbus_message_is_signal(msg, DEVICED_INTERFACE_BATTERY, SIGNAL_TEMP_GOOD);
-       if (!r) {
-               _E("dbus_message_is_signal error");
-               return;
-       }
-
-       unregister_edbus_signal_handler();
-
-       object_cleanup(data);
-       popup_terminate();
-       _I("%s - %s", DEVICED_INTERFACE_BATTERY, SIGNAL_TEMP_GOOD);
-}
-
-static int register_edbus_signal_handler(struct appdata *ad)
-{
-       int ret;
-       static E_DBus_Connection *conn = NULL;
-
-       conn = get_dbus_connection();
-       if (!conn) {
-               _E("Failed to get dbus connection");
-               return -ENOMEM;
-       }
-
-       temp_handler = e_dbus_signal_handler_add(conn, NULL, DEVICED_PATH_BATTERY,
-                       DEVICED_INTERFACE_BATTERY, SIGNAL_TEMP_GOOD, temp_status_changed, ad);
-       if (!temp_handler) {
-               _E("Failed to register handler");
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       ret = 0;
-out:
-       if (ret < 0)
-               unregister_edbus_signal_handler();
-       return ret;
-}
-
-static int load_charge_error_low_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       reset_window_priority(ad->win_main, 2);
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       _(CHARGE_ERR_LOW_TITLE),
-                       _(CHARGE_ERR_LOW_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_error_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       register_edbus_signal_handler(ad);
-       return 0;
-}
-
-static int load_charge_error_high_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       reset_window_priority(ad->win_main, 2);
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       _(CHARGE_ERR_HIGH_TITLE),
-                       _(CHARGE_ERR_HIGH_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_error_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       register_edbus_signal_handler(ad);
-       return 0;
-}
-
-static void charger_changed(keynode_t *key, void *data)
-{
-       int status;
-
-       status = vconf_keynode_get_int(key);
-       if (status != VCONFKEY_SYSMAN_CHARGER_DISCONNECTED)
-               return;
-
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                               charger_changed) < 0)
-               _E("Failed to release vconf key handler");
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static void charge_now_changed(keynode_t *key, void *data)
-{
-       int status;
-
-       status = vconf_keynode_get_int(key);
-       if (status != 1)
-               return;
-
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
-                               charge_now_changed) < 0)
-               _E("Failed to release vconf key handler");
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static int load_charge_error_ovp_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       _(CHARGE_ERR_OVP_TITLE),
-                       _(CHARGE_ERR_OVP_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbat_terminate_popup,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                       charger_changed, ad) < 0)
-               _E("Failed to register vconf key handler");
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
-                       charge_now_changed, ad) < 0)
-               _E("Failed to register vconf key handler");
-       return 0;
-}
-
-static int load_battery_disconnected_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       reset_window_priority(ad->win_main, 2);
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       _(BATT_DISCONNECTED_TITLE),
-                       _(BATT_DISCONNECTED_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbat_terminate_popup,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                       charger_changed, ad) < 0)
-               _E("Failed to register vconf key handler");
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
-                       charge_now_changed, ad) < 0)
-               _E("Failed to register vconf key handler");
-       return 0;
-}
-
-static int load_low_battery_warning_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       type = LOWBAT_WARNING;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       NULL,
-                       _(LOWBATT_WARNING_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbat_terminate_popup,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       send_lowbat_extreme_signal(LOWBAT_STATE_NOT_EXTREME);
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       return 0;
-}
-
-static void unregister_mouse_up_handler(struct appdata *ad)
-{
-       if (mouse_up_handler) {
-               ecore_event_handler_del(mouse_up_handler);
-               mouse_up_handler = NULL;
-       }
-}
-
-static void register_mouse_up_handler(struct appdata *ad)
-{
-       unregister_mouse_up_handler(ad);
-       mouse_up_handler = ecore_event_handler_add(
-                       ECORE_EVENT_MOUSE_BUTTON_UP, mouse_up_response, ad);
-       if (!mouse_up_handler)
-               _E("Failed to register mouse up handler");
-}
-
-static void lowbatt_extreme_response(void *data, Evas_Object *obj, void *event_info)
-{
-       struct appdata *ad = data;
-       show_invisible_layer(ad);
-}
-
-static int load_low_battery_critical_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       type = LOWBAT_CRITICAL;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       NULL,
-                       _(LOWBATT_CRITICAL_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbat_terminate_popup,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       send_lowbat_extreme_signal(LOWBAT_STATE_NOT_EXTREME);
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       return 0;
-}
-
-static int load_low_battery_extreme_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       type = LOWBAT_EXTREME;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       NULL,
-                       _(LOWBATT_EXTREME_CONTENT),
-                       _("IDS_COM_SK_CANCEL"),
-                       lowbat_terminate_popup,
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_extreme_response);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       send_lowbat_extreme_signal(LOWBAT_STATE_NOT_EXTREME);
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       return 0;
-}
-
-static int load_low_battery_no_touch_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       type = LOWBAT_NO_TOUCH;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_popup(ad,
-                       NULL,
-                       _(LOWBATT_NO_TOUCH_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_extreme_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_popup()");
-               return -ENOMEM;
-       }
-
-       send_lowbat_extreme_signal(LOWBAT_STATE_EXTREME);
-
-       play_notification_feedback();
-       play_notification_sound();
-
-       return 0;
-}
-
-static Eina_Bool mouse_up_response(void *data, int e_type, void *event)
-{
-       struct appdata *ad = data;
-       int ret;
-
-       if (type != LOWBAT_NONE)
-               return ECORE_CALLBACK_PASS_ON;
-
-       register_main_handlers(ad);
-       unregister_mouse_up_handler(ad);
-
-       ret = load_low_battery_no_touch_popup(ad);
-       if (ret < 0) {
-               _E("Failed to load no touch popup");
-               popup_terminate();
-       }
-
-       return ECORE_CALLBACK_DONE;
-}
-
-static int get_low_battery_status(void)
-{
-       int status;
-       if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &status) != 0)
-               return -ENOMEM;
-       return status;
-}
-
-static int load_low_battery_popup(struct appdata *ad)
-{
-       int status;
-
-       if (!ad)
-               return -EINVAL;
-
-       if (get_charge_state()) {
-               popup_terminate();
-               return 0;
-       }
-
-       status = get_low_battery_status();
-
-       switch (status) {
-       case THRESHOLD_EXTREME:
-               if (type == LOWBAT_EXTREME || type == LOWBAT_POWEROFF)
-                       goto same_popup_out;
-
-               return load_low_battery_extreme_popup(ad);
-
-       case THRESHOLD_CRITICAL:
-               if (type == LOWBAT_CRITICAL)
-                       goto same_popup_out;
-
-               return load_low_battery_critical_popup(ad);
-
-       case THRESHOLD_WARNING:
-               if (type == LOWBAT_WARNING)
-                       goto same_popup_out;
-
-               return load_low_battery_warning_popup(ad);
-
-       default:
-               _I("Low battery status: (%d)", status);
-               popup_terminate();
-               return 0;
-       }
-
-same_popup_out:
-       _I("Low battery status is same with previous status (%d)", type);
-       return 0;
-}
-
-static void low_battery_status_changed(keynode_t *key, void *data)
-{
-       int ret;
-       struct appdata *ad = data;
-
-       if (!ad)
-               return;
-
-       unregister_main_handlers(ad);
-       register_main_handlers(ad);
-
-       release_evas_object(&(ad->popup));
-
-       ret = load_low_battery_popup(ad);
-       if (ret < 0) {
-               _E("Failed to load low battery popup (%d)", ret);
-               popup_terminate();
-       }
-}
-
-static void unregister_low_battery_status_handler(void)
-{
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                       low_battery_status_changed) < 0)
-               _E("Falied to release vconf key handler");
-}
-
-static void register_low_battery_status_handler(struct appdata *ad)
-{
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                       low_battery_status_changed, ad) < 0)
-               _E("Failed to register vconf key handler");
-}
-
-static void charger_status_changed(keynode_t *key, void *data)
-{
-       /* Charging: 1, not charging: 0 */
-       if (vconf_keynode_get_int(key) == 1) {
-               popup_terminate();
-               return;
-       }
-}
-
-static void unregister_charger_status_handler(void)
-{
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
-                       charger_status_changed) < 0)
-               _E("Falied to release vconf key handler");
-}
-
-static void register_charger_status_handler(struct appdata *ad)
-{
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
-                       charger_status_changed, ad) < 0)
-               _E("Failed to register vconf key handler");
-}
-
-static void powerkey_pushed(void *data, DBusMessage *msg)
-{
-       int ret;
-       struct appdata *ad = data;
-
-       ret = dbus_message_is_signal(msg, DBUS_IFACE_HOME_RAISE, HOME_RAISE_SIGNAL);
-       if (ret == 0)
-               return;
-
-       switch (type) {
-       case LOWBAT_NONE:
-               return;
-       case LOWBAT_NO_TOUCH:
-               show_invisible_layer(ad);
-               return;
-       default:
-               break;
-       }
-
-       popup_terminate();
-}
-
-static void unregister_power_key_handler(void)
-{
-       E_DBus_Connection *conn;
-
-       conn = get_dbus_connection();
-       if (conn && powerkey_handler) {
-               e_dbus_signal_handler_del(conn, powerkey_handler);
-               powerkey_handler = NULL;
-       }
-}
-
-static int register_power_key_handler(struct appdata *ad)
-{
-       E_DBus_Connection *conn;
-       int ret;
-
-       conn = get_dbus_connection();
-       if (!conn) {
-               _E("Failed to get dbus connection");
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       powerkey_handler = e_dbus_signal_handler_add(conn, NULL, DBUS_PATH_HOME_RAISE,
-                       DBUS_IFACE_HOME_RAISE, HOME_RAISE_SIGNAL, powerkey_pushed, ad);
-       if (!powerkey_handler) {
-               _E("Failed to register handler");
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       ret = 0;
-
-out:
-       if (ret < 0)
-               unregister_power_key_handler();
-       return ret;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-
-       ecore_x_netwm_window_type_set(elm_win_xwindow_get(ad->win_main),
-                       ECORE_X_WINDOW_TYPE_NOTIFICATION);
-
-       elm_theme_overlay_add(NULL,EDJ_NAME);
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       ret = set_dbus_connection();
-       if (ret < 0)
-               _E("Failed to set dbus connection(%d)", ret);
-
-       ret = register_power_key_handler(ad);
-       if (ret < 0)
-               _E("Failed to register power key handler(%d)", ret);
-
-       return 0;
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       switch (type) {
-       case LOWBAT_NONE:
-       case LOWBAT_WARNING:
-       case LOWBAT_POWEROFF:
-       case LOWBAT_CRITICAL:
-       case LOWBAT_EXTREME:
-       case LOWBAT_NO_TOUCH:
-               unregister_charger_status_handler();
-               unregister_low_battery_status_handler();
-               send_lowbat_extreme_signal(LOWBAT_STATE_NOT_EXTREME);
-               break;
-       case LOWBAT_CHARGE_ERR:
-       case LOWBAT_CHARGE_ERR_LOW:
-       case LOWBAT_CHARGE_ERR_HIGH:
-               lowbatt_error_response(data, NULL, NULL);
-               break;
-       default:
-               break;
-       }
-
-       unregister_mouse_up_handler(ad);
-       unregister_main_handlers(ad);
-       unregister_power_key_handler();
-       unset_dbus_connection();
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       const char *opt;
-       int ret, i;
-
-       if (!ad || !b) {
-               ret = -EINVAL;
-               goto lowbatt_reset_out;
-       }
-
-       if (ad->popup) {
-               _I("low battery popup already exists");
-               return 0;
-       }
-
-       opt = bundle_get_val(b, "_SYSPOPUP_CONTENT_");
-       if (!opt) {
-               _E("FAIL: bundle_get_val()");
-               ret = -EINVAL;
-               goto lowbatt_reset_out;
-       }
-
-       type = -1;
-       for (i = 0 ; i < ARRAY_SIZE(lowbat_type) ; i++) {
-               if (!strncmp(opt, lowbat_type[i].name, strlen(opt))) {
-                       type = lowbat_type[i].type;
-                       break;
-               }
-       }
-       if (type < 0) {
-               _E("Failed to get popup type(%d)", type);
-               ret = -EINVAL;
-               goto lowbatt_reset_out;
-       }
-
-       register_main_handlers(ad);
-
-       switch (type) {
-       case LOWBAT_WARNING:
-       case LOWBAT_CRITICAL:
-       case LOWBAT_POWEROFF:
-       case LOWBAT_EXTREME:
-               type = LOWBAT_NONE;
-               register_low_battery_status_handler(ad);
-               register_charger_status_handler(ad);
-               ret = load_low_battery_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR:
-               ret = load_charge_error_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR_LOW:
-               ret = load_charge_error_low_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR_HIGH:
-               ret = load_charge_error_high_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR_OVP:
-               ret = load_charge_error_ovp_popup(ad);
-               break;
-       case LOWBAT_BATT_DISCONNECT:
-               ret = load_battery_disconnected_popup(ad);
-               break;
-       default:
-               _E("Unknown popup type (%d)", type);
-               ret = -EINVAL;
-               break;
-       }
-       if (ret < 0)
-               goto lowbatt_reset_out;
-
-       return 0;
-
-lowbatt_reset_out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-       int val = -1, ret = -1;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       ret = vconf_get_int(VCONFKEY_TESTMODE_LOW_BATT_POPUP, &val);
-       if(ret == 0 && val == 1) {
-               _D("Testmode without launching popup");
-               return 0;
-       }
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/lowbatt-popup/micro-src/lowbatt.h b/lowbatt-popup/micro-src/lowbatt.h
deleted file mode 100644 (file)
index f7cfcda..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2014 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 _LOWBAT_H_
-#define _LOWBAT_H_
-
-void register_sound_to_vibration(bool (*func)(void));
-
-#endif /* _LOWBAT_H_ */
diff --git a/lowbatt-popup/micro-src/org.tizen.lowbat-syspopup.efl b/lowbatt-popup/micro-src/org.tizen.lowbat-syspopup.efl
deleted file mode 100644 (file)
index da2d070..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-org.tizen.lowbat-syspopup system r-x--- ------
-org.tizen.lowbat-syspopup svi-data r-x--- ------
-org.tizen.lowbat-syspopup aul::db r-x--- ------
-org.tizen.lowbat-syspopup isf r-x--- ------
-org.tizen.lowbat-syspopup ail::db rw---- ------
-org.tizen.lowbat-syspopup immvibed rw---- ------
-org.tizen.lowbat-syspopup syspopup::db rw---- ------
-org.tizen.lowbat-syspopup xorg rw---- ------
-org.tizen.lowbat-syspopup system::system_bklight -w---- ------
-org.tizen.lowbat-syspopup deviced rwx--- ------
-org.tizen.lowbat-syspopup sound_server rwxa-- ------
-org.tizen.lowbat-syspopup dbus rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.data-provider-master rw---- ------
-org.tizen.lowbat-syspopup data-provider-master rw---- ------
-org.tizen.lowbat-syspopup data-provider-master::share --x--- ------
-org.tizen.lowbat-syspopup _ -wx--- ------
-org.tizen.lowbat-syspopup stest-service -w---- ------
-org.tizen.lowbat-syspopup tts-server rwx--- ------
-org.tizen.lowbat-syspopup syslogd -w---- ------
-org.tizen.lowbat-syspopup device::app_logging -w---- ------
-org.tizen.lowbat-syspopup device::led r----- ------
-org.tizen.lowbat-syspopup org.tizen.svoice rw---- ------
-org.tizen.lowbat-syspopup org.tizen.voicerecorder rw---- ------
-org.tizen.lowbat-syspopup system::vconf_setting rw---- ------
-org.tizen.lowbat-syspopup system::vconf_system rw---- ------
-org.tizen.lowbat-syspopup system::vconf_deviced rw---- ------
-org.tizen.lowbat-syspopup deviced::display rw---- ------
-org.tizen.lowbat-syspopup deviced::haptic rwx--- ------
-org.tizen.lowbat-syspopup system-apps rw---- ------
-org.tizen.lowbat-syspopup testmode::vconf r----l ------
-org.tizen.lowbat-syspopup org.tizen.setting::system rw---- ------
-org.tizen.lowbat-syspopup org.tizen.shealth::vconf rw---- ------
-org.tizen.lowbat-syspopup csc-feature r----- ------
-stest-service org.tizen.lowbat-syspopup r-x--- ------
-deviced org.tizen.lowbat-syspopup -w---- ------
-dbus org.tizen.lowbat-syspopup -w---- ------
-pulseaudio org.tizen.lowbat-syspopup -w---- ------
-org.tizen.app-tray org.tizen.lowbat-syspopup r-x--- ------
-tts-server org.tizen.lowbat-syspopup rw---- ------
-_ org.tizen.lowbat-syspopup -w---- ------
-org.tizen.lowbat-syspopup system::homedir rwxat- ------
-org.tizen.lowbat-syspopup system::vconf rwxat- ------
-org.tizen.lowbat-syspopup system::media rwxat- ------
-org.tizen.lowbat-syspopup system::share rwxat- ------
-org.tizen.lowbat-syspopup pulseaudio rwxat- ------
-e17 org.tizen.lowbat-syspopup -w---- ------
-org.tizen.lowbat-syspopup sys-assert::core rwxat- ------
-org.tizen.lowbat-syspopup privacy-manager::db r----l ------
-org.tizen.lowbat-syspopup pkgmgr::db r----l ------
-org.tizen.lowbat-syspopup system::vconf_inhouse rw---- ------
-org.tizen.lowbat-syspopup system::vconf_privacy rw---- ------
-org.tizen.lowbat-syspopup system::vconf_multimedia rw---- ------
-org.tizen.lowbat-syspopup system::vconf_network rw---- ------
-org.tizen.lowbat-syspopup system::vconf_misc rw---- ------
-org.tizen.lowbat-syspopup device::sys_logging -w---- ------
-org.tizen.lowbat-syspopup org.tizen.w-idle-clock-weather2 rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.idle-clock-pedometer rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.w-idle-clock-shortcut2 rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.idle-clock-event rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.idle-clock-dual rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.w-idle-clock-analog3 rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.w-idle-clock-analog1 rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.idle-clock-digital rwx--- ------
-org.tizen.lowbat-syspopup org.tizen.w-idle-clock-analog2 rwx--- ------
-org.tizen.lowbat-syspopup e17::notification rw--- -----
diff --git a/lowbatt-popup/src/CMakeLists.txt b/lowbatt-popup/src/CMakeLists.txt
deleted file mode 100755 (executable)
index 3697595..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-
-#################### Low-battery ###############################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/lowbatt-popup/src/lowbatt.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lowbatt-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(lowbat_pkgs REQUIRED
-               appcore-efl
-               elementary
-               deviced
-               dlog
-               feedback
-               syspopup
-               efl-assist
-               syspopup-caller
-               capi-media-sound-manager
-               capi-media-wav-player
-)
-
-FOREACH(flag ${lowbat_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${lowbat_pkgs_LDFLAGS})
-
-ADD_CUSTOM_TARGET(lowbatt.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/lowbatt.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowbatt.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/lowbatt.edc
-)
-ADD_DEPENDENCIES(${PROJECT_NAME} lowbatt.edj)
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.lowbat-syspopup/bin)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowbatt.edj DESTINATION /usr/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt)
-
-# install desktop file & icon
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowbat-syspopup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}/src/org.tizen.lowbat-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
-###############################################################
-
-
diff --git a/lowbatt-popup/src/lowbatt.c b/lowbatt-popup/src/lowbatt.c
deleted file mode 100755 (executable)
index 28a0476..0000000
+++ /dev/null
@@ -1,840 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include "lowbatt.h"
-#include <vconf.h>
-#include <vconf-keys.h>
-#include <Ecore_X.h>
-#include <utilX.h>
-#include <syspopup.h>
-#include <dd-display.h>
-#include <aul.h>
-#include <sound_manager.h>
-#include <wav_player.h>
-#include "common.h"
-
-#define DEVICED_PATH_SYSNOTI        "/Org/Tizen/System/DeviceD/SysNoti"
-#define DEVICED_INTERFACE_SYSNOTI   "org.tizen.system.deviced.SysNoti"
-#define SIGNAL_CHARGEERR_RESPONSE   "ChargeErrResponse"
-
-#define EDJ_PATH "/usr/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt"
-#define EDJ_NAME EDJ_PATH"/lowbatt.edj"
-
-#define BUF_MAX 256
-#define RETRY_MAX 5
-
-#define LOWBAT_SOUND_PATH          "/usr/share/feedback/sound/operation/system.ogg"
-
-#define LOWBATT_WARNING_TITLE      "IDS_ST_BODY_LEDOT_LOW_BATTERY"
-#define LOWBATT_WARNING_CHARGE_NOW_TITLE LOWBATT_WARNING_TITLE
-#define LOWBATT_WARNING_CONTENT    "IDS_COM_POP_CONNECT_TO_A_PLUG_SOCKET_TO_CHARGE_DEVICE_AND_EXIT_UNUSED_APPLICATIONS_IN_TASK_MANAGER_MSG"
-#define LOWBATT_WARNING_CHARGE_NOW_CONTENT "IDS_COM_POP_BATTERYLOW"
-#define LOWBATT_POWEROFF_TITLE     "IDS_ST_BODY_LEDOT_LOW_BATTERY"
-#define LOWBATT_POWEROFF_CONTENT   "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
-#define CHARGE_ERR_TITLE           "IDS_ST_POP_WARNING_MSG"
-#define CHARGE_ERR_CONTENT         "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
-#define CHARGE_ERR_LOW_TITLE       "IDS_ST_POP_WARNING_MSG"
-#define CHARGE_ERR_LOW_CONTENT     "IDS_IDLE_POP_UNABLE_CHANGE_BATTERY_TEMA_LOW"
-#define CHARGE_ERR_HIGH_TITLE      "IDS_ST_POP_WARNING_MSG"
-#define CHARGE_ERR_HIGH_CONTENT    "IDS_IDLE_POP_UNABLE_CHANGE_BATTERY_TEMA_HIGH"
-#define CHARGE_ERR_OVP_TITLE       "IDS_ST_POP_WARNING_MSG"
-#define CHARGE_ERR_OVP_CONTENT     "IDS_COM_POP_CHARGING_PAUSED_VOLTAGE_TOO_HIGH"
-#define BATT_DISCONNECTED_TITLE    "IDS_COM_BODY_NO_BATTERY"
-#define BATT_DISCONNECTED_CONTENT  "IDS_COM_POP_BATTERY_DISCONNECTED_ABB"
-
-enum lowbat_options {
-       LOWBAT_WARNING,
-       LOWBAT_POWEROFF,
-       LOWBAT_CRITICAL,
-       LOWBAT_EXETREME,
-       LOWBAT_NO_TOUCH,
-       LOWBAT_CHARGE_ERR,
-       LOWBAT_CHARGE_ERR_LOW,
-       LOWBAT_CHARGE_ERR_HIGH,
-       LOWBAT_CHARGE_ERR_OVP,
-       LOWBAT_BATT_DISCONNECT,
-};
-
-struct popup_type {
-       char *name;
-       int type;
-};
-
-static const struct popup_type lowbat_type[] = {
-       { "warning"           , LOWBAT_WARNING            },
-       { "poweroff"          , LOWBAT_POWEROFF           },
-       { "critical"          , LOWBAT_CRITICAL           },
-       { "exetreme"          , LOWBAT_EXETREME           },
-       { "notouch"           , LOWBAT_NO_TOUCH           },
-       { "chargeerr"         , LOWBAT_CHARGE_ERR         },
-       { "chargeerrlow"      , LOWBAT_CHARGE_ERR_LOW     },
-       { "chargeerrhigh"     , LOWBAT_CHARGE_ERR_HIGH    },
-       { "chargeerrovp"      , LOWBAT_CHARGE_ERR_OVP     },
-       { "battdisconnect"    , LOWBAT_BATT_DISCONNECT    },
-};
-
-static int type;
-static int hall_ic = 1;
-static E_DBus_Connection *edbus_conn = NULL;
-static E_DBus_Signal_Handler *hallic_handler = NULL;
-
-static void hall_state_changed(void *data, DBusMessage *msg);
-
-static bool get_call_state(void)
-{
-       int state;
-       if (vconf_get_int(VCONFKEY_CALL_STATE, &state) == 0
-                       && state != VCONFKEY_CALL_OFF)
-               return true;
-       return false;
-}
-
-static bool get_voice_recording_state(void)
-{
-       int state;
-       if (vconf_get_int(VCONFKEY_SOUND_STATUS, &state) == 0
-                       && (state & VCONFKEY_SOUND_STATUS_AVRECORDING))
-               return true;
-       return false;
-}
-
-static void play_notification_sound(void)
-{
-       int ret, sound;
-       static bool session = false;
-
-       if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sound) != 0) {
-               _E("Failed to get sound status");
-               return;
-       }
-
-       if (sound == 0)
-               return;
-
-       if (get_call_state())
-               return;
-       if (get_voice_recording_state())
-               return;
-
-       if (!session) {
-               ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_NOTIFICATION);
-               if (ret != SOUND_MANAGER_ERROR_NONE) {
-                       _E("Failed to set session to play sound(%d)", ret);
-                       return;
-               }
-       }
-
-       if (access(LOWBAT_SOUND_PATH, F_OK) != 0) {
-               _E("The sound file does not exist (%d)", LOWBAT_SOUND_PATH);
-               return;
-       }
-
-       ret = wav_player_start(LOWBAT_SOUND_PATH, SOUND_TYPE_NOTIFICATION, NULL, NULL, NULL);
-       if (ret != WAV_PLAYER_ERROR_NONE)
-               _E("Failed to play sound file (%d, %s)", ret, LOWBAT_SOUND_PATH);
-}
-
-static bool get_charge_state(void)
-{
-       int val;
-       if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &val) == 0
-                       && val == 1)
-               return true;
-       return false;
-}
-
-
-static void unregister_edbus_signal_handler(void)
-{
-       if (edbus_conn) {
-               if (hallic_handler)
-                       e_dbus_signal_handler_del(edbus_conn, hallic_handler);
-               e_dbus_connection_close(edbus_conn);
-       }
-       e_dbus_shutdown();
-}
-
-static int register_edbus_signal_handler(struct appdata *ad)
-{
-       int retry, ret;
-
-       retry = 0;
-       while (e_dbus_init() == 0) {
-               if (retry++ >= RETRY_MAX)
-                       return -ENOMEM;
-       }
-
-       edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-       if (!edbus_conn) {
-               _E("Failed to get dbus bus");
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       hallic_handler = e_dbus_signal_handler_add(edbus_conn, NULL, DEVICED_PATH_HALL,
-                       DEVICED_IFACE_HALL, HALL_STATE_SIGNAL, hall_state_changed, ad);
-       if (!hallic_handler) {
-               _E("Failed to register handler");
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       ret = 0;
-out:
-       if (ret < 0)
-               unregister_edbus_signal_handler();
-       return ret;
-}
-
-static void charger_status_changed(keynode_t *key, void *data)
-{
-       int status;
-
-       status = vconf_keynode_get_int(key);
-       if (status != VCONFKEY_SYSMAN_CHARGER_CONNECTED)
-               return;
-
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                               charger_status_changed) < 0)
-               _E("Failed to release vconf key handler");
-       popup_terminate();
-}
-
-static void unregister_charger_status_handler(void)
-{
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                       charger_status_changed) < 0)
-               _E("Falied to release vconf key handler");
-}
-
-static void register_charger_status_handler(void)
-{
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                       charger_status_changed, NULL) < 0)
-               _E("Failed to register vconf key handler");
-}
-
-static void battery_status_changed(keynode_t *key, void *data)
-{
-       int status;
-
-       status = vconf_keynode_get_int(key);
-       _I("BATTERY status: %d", status);
-       if (status != VCONFKEY_SYSMAN_BAT_NORMAL &&
-               status != VCONFKEY_SYSMAN_BAT_FULL)
-               return;
-
-       vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                       battery_status_changed);
-       popup_terminate();
-}
-
-static void register_battery_status_handler(void)
-{
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                               battery_status_changed, NULL) < 0)
-               _E("Falied to add vconf key handler");
-}
-
-static void unregister_battery_status_handler(void)
-{
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                               battery_status_changed) < 0)
-               _E("Falied to release vconf key handler");
-}
-
-static void lowbatt_timeout_func(void *data, Evas_Object *obj, void *event_info)
-{
-       _D("System-popup : In Lowbatt timeout");
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static void lowbatt_error_response(void *data, Evas_Object *obj, void *event_info)
-{
-       if (broadcast_dbus_signal(DEVICED_PATH_SYSNOTI,
-                               DEVICED_INTERFACE_SYSNOTI,
-                               SIGNAL_CHARGEERR_RESPONSE,
-                               NULL, NULL) < 0)
-               _E("Failed to send signal for error popup button");
-
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static void lowbatt_shutdown_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       int ret;
-
-       _D("Device shutdown");
-       object_cleanup(data);
-
-       ret = device_poweroff();
-       if (ret < 0)
-               _E("Failed to power off (%d)", ret);
-
-       popup_terminate();
-}
-
-static int load_charge_error_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       if (hall_ic == 0)
-               return -ECANCELED;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _(CHARGE_ERR_TITLE),
-                       _(CHARGE_ERR_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_error_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_charge_error_low_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       if (hall_ic == 0)
-               return -ECANCELED;
-
-       reset_window_priority(ad->win_main, 2);
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _(CHARGE_ERR_LOW_TITLE),
-                       _(CHARGE_ERR_LOW_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_error_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_charge_error_high_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       if (hall_ic == 0)
-               return -ECANCELED;
-
-       reset_window_priority(ad->win_main, 2);
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _(CHARGE_ERR_HIGH_TITLE),
-                       _(CHARGE_ERR_HIGH_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_error_response,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_charge_error_ovp_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       if (hall_ic == 0)
-               return -ECANCELED;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _(CHARGE_ERR_OVP_TITLE),
-                       _(CHARGE_ERR_OVP_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_timeout_func,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_battery_disconnected_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       if (hall_ic == 0)
-               return -ECANCELED;
-
-       reset_window_priority(ad->win_main, 2);
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _(BATT_DISCONNECTED_TITLE),
-                       _(BATT_DISCONNECTED_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_timeout_func,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int scover_show_warning_popup(struct appdata *ad)
-{
-       Evas_Object *conform = NULL;
-       Evas_Object *ly = NULL;
-       Evas_Object *ly_content = NULL;
-
-       if (!ad)
-               return -EINVAL;
-
-       conform = elm_conformant_add(ad->win_main);
-       if (!conform) {
-               _E("Failed to add conformant");
-               return -ENOMEM;
-       }
-
-       /* TODO Show indicator */
-       /*elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_SHOW);*/
-       elm_win_resize_object_add(ad->win_main, conform);
-       evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       ly = elm_layout_add(conform);
-       if (!ly) {
-               _E("Failed to add layout");
-               evas_object_del(conform);
-               return -ENOMEM;
-       }
-
-       elm_layout_file_set(ly, EDJ_NAME, "scover-main");
-       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_show(ly);
-
-       elm_object_content_set(conform, ly);
-
-       ly_content = elm_layout_add(conform);
-       if (!ly_content) {
-               _E("Failed to add layout");
-               evas_object_del(conform);
-               return -ENOMEM;
-       }
-
-       elm_layout_file_set(ly_content, EDJ_NAME, "scover-home");
-       evas_object_size_hint_weight_set(ly_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_show(ly_content);
-
-       elm_object_part_content_set(ly, "scover.sw.content", ly_content);
-       evas_object_show(ly_content);
-
-       ad->popup = conform;
-       evas_object_show(ad->popup);
-
-       return 0;
-}
-
-static int load_battery_warning_popup(struct appdata *ad)
-{
-       char *content, *title;
-
-       if (!ad)
-               return -EINVAL;
-
-       if (get_charge_state()) {
-               title = NULL;
-               content = _(LOWBATT_WARNING_CHARGE_NOW_CONTENT);
-       } else {
-               title = _(LOWBATT_WARNING_TITLE);
-               content = _(LOWBATT_WARNING_CONTENT);
-       }
-
-       ad->popup = load_normal_popup(ad,
-                       title,
-                       content,
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_timeout_func,
-                       NULL,
-                       NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_battery_shutdown_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       ad->popup = load_normal_popup(ad,
-                       _(LOWBATT_POWEROFF_TITLE),
-                       _(LOWBATT_POWEROFF_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       lowbatt_shutdown_cb,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int show_low_battery_popup(struct appdata *ad)
-{
-       int ret ;
-
-       if (!ad)
-               return -EINVAL;
-
-       if (hall_ic == 0) { /* S-cover is closed */
-               reset_window_priority(ad->win_main, 2);
-               ret = scover_show_warning_popup(ad);
-
-       } else { /* S-cover is opened */
-               reset_window_priority(ad->win_main, 1);
-               switch (type) {
-               case LOWBAT_WARNING:
-                       ret = load_battery_warning_popup(ad);
-                       break;
-               case LOWBAT_POWEROFF:
-                       ret = load_battery_shutdown_popup(ad);
-                       break;
-               default:
-                       return -EINVAL;
-               }
-       }
-
-       if (ret < 0)
-               _E("Failed to show los battery popup (%d)", ret);
-       else {
-               /* If there is no sleep, Volume app will be on the popup */
-               usleep(500000);
-               evas_object_show(ad->win_main);
-       }
-       return ret;
-}
-
-static int load_low_battery_popup(struct appdata *ad)
-{
-       int ret, status;
-
-       if (!ad)
-               return -EINVAL;
-
-       register_charger_status_handler();
-       register_battery_status_handler();
-
-       if (vconf_get_int(VCONFKEY_SYSMAN_CHARGER_STATUS, &status) == 0
-                       && status == VCONFKEY_SYSMAN_CHARGER_CONNECTED) {
-               _I("Charger is connected so that lowbat popup is terminated");
-               return -ECANCELED;
-       }
-
-       ret = register_edbus_signal_handler(ad);
-       if (ret < 0) {
-               _E("Failed to register edbus signal handler(%d)", ret);
-               return ret;
-       }
-
-       ret = show_low_battery_popup(ad);
-       if (ret < 0)
-               _E("Failed to show low battery popup(%d)", ret);
-
-       return ret;
-}
-
-static void hall_state_changed(void *data, DBusMessage *msg)
-{
-       DBusError err;
-       int state, ret;
-       struct appdata *ad = data;
-
-       if (!ad)
-               return;
-
-       if (dbus_message_is_signal(msg, DEVICED_IFACE_HALL, HALL_STATE_SIGNAL) == 0)
-               return;
-
-       dbus_error_init(&err);
-       if (dbus_message_get_args(msg, &err,
-                               DBUS_TYPE_INT32, &state,
-                               DBUS_TYPE_INVALID) == 0) {
-               dbus_error_free(&err);
-               return;
-       }
-       dbus_error_free(&err);
-
-       _I("Hall state(%d)", state);
-
-       if (hall_ic == state)
-               return;
-
-       hall_ic = state;
-       release_evas_object(&(ad->popup));
-       evas_object_hide(ad->win_main);
-
-       ret = show_low_battery_popup(ad);
-       if (ret < 0)
-               _E("Failed to show low battery popup(%d)", ret);
-}
-
-static int load_low_battery_critical_popup(struct appdata *ad)
-{
-       type = LOWBAT_WARNING;
-       return load_low_battery_popup(ad);
-}
-
-static int load_low_battery_exetreme_popup(struct appdata *ad)
-{
-       type = LOWBAT_WARNING;
-       return load_low_battery_popup(ad);
-}
-
-static int load_low_battery_no_touch_popup(struct appdata *ad)
-{
-       return -ECANCELED;
-}
-
-static int handle_err_term_event(bundle *b, void *data)
-{
-       switch (type) {
-       case LOWBAT_CHARGE_ERR:
-       case LOWBAT_CHARGE_ERR_LOW:
-       case LOWBAT_CHARGE_ERR_HIGH:
-               lowbatt_error_response(data, NULL, NULL);
-               break;
-       default:
-               break;
-       }
-
-       return 0;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = handle_err_term_event;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-
-       elm_theme_overlay_add(NULL,EDJ_NAME);
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       if (type == LOWBAT_WARNING
-                       || type == LOWBAT_POWEROFF) {
-               unregister_edbus_signal_handler();
-               unregister_charger_status_handler();
-               unregister_battery_status_handler();
-                       _E("Failed to release vconf key handler");
-       }
-
-       if (ad->layout_main)
-               evas_object_del(ad->layout_main);
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       const char *opt;
-       int ret, i;
-
-       if (!ad || !b) {
-               ret = -EINVAL;
-               goto lowbatt_reset_out;
-       }
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-
-       opt = bundle_get_val(b, "_SYSPOPUP_CONTENT_");
-       if (!opt) {
-               _E("FAIL: bundle_get_val()");
-               ret = -EINVAL;
-               goto lowbatt_reset_out;
-       }
-
-       hall_ic = get_hallic_status();
-       if (hall_ic < 0) {
-               _E("Getting hall_ic status (%d)", hall_ic);
-               hall_ic = 1; /* Cover is opened */
-       }
-       _I("Hall ic status(%d)", hall_ic);
-
-       if (syspopup_create(b, &(ad->handler), ad->win_main, ad) < 0) {
-               _E("FAIL: syspopup_create()");
-               ret = -ENOMEM;
-               goto lowbatt_reset_out;
-       }
-
-       syspopup_reset_timeout(b, -1);
-
-       type = -1;
-       for (i = 0 ; i < ARRAY_SIZE(lowbat_type) ; i++) {
-               if (!strncmp(opt, lowbat_type[i].name, strlen(opt))) {
-                       type = lowbat_type[i].type;
-                       break;
-               }
-       }
-       if (type < 0) {
-               _E("Failed to get popup type(%d)", type);
-               ret = -EINVAL;
-               goto lowbatt_reset_out;
-       }
-
-       switch (type) {
-       case LOWBAT_WARNING:
-       case LOWBAT_POWEROFF:
-               ret = load_low_battery_popup(ad);
-               break;
-       case LOWBAT_CRITICAL:
-               ret = load_low_battery_critical_popup(ad);
-               break;
-       case LOWBAT_EXETREME:
-               ret = load_low_battery_exetreme_popup(ad);
-               break;
-       case LOWBAT_NO_TOUCH:
-               ret = load_low_battery_no_touch_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR:
-               ret = load_charge_error_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR_LOW:
-               ret = load_charge_error_low_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR_HIGH:
-               ret = load_charge_error_high_popup(ad);
-               break;
-       case LOWBAT_CHARGE_ERR_OVP:
-               ret = load_charge_error_ovp_popup(ad);
-               break;
-       case LOWBAT_BATT_DISCONNECT:
-               ret = load_battery_disconnected_popup(ad);
-               break;
-       default:
-               _E("Unknown popup type (%d)", type);
-               ret = -EINVAL;
-               break;
-       }
-       if (ret < 0)
-               goto lowbatt_reset_out;
-
-       if (set_display_feedback(-1) < 0)
-               _E("Failed to set display");
-
-       play_notification_sound();
-
-       return 0;
-
-lowbatt_reset_out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       int val = -1, ret = -1;
-
-       ret = vconf_get_int(VCONFKEY_TESTMODE_LOW_BATT_POPUP, &val);
-       if(ret == 0 && val == 1) {
-               _D("Testmode without launching popup");
-               return 0;
-       }
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/lowbatt-popup/src/lowbatt.h b/lowbatt-popup/src/lowbatt.h
deleted file mode 100644 (file)
index 22ce1a7..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 __DEF_lowbatt_H_
-#define __DEF_lowbatt_H_
-
-#include <Elementary.h>
-
-#ifndef PREFIX
-#define PREFIX "/usr"
-#endif /* PREFIX */
-
-#define TEMP_DIR                       "/tmp"
-#define PACKAGE                                "lowbatt-popup"
-#define APPNAME                                "lowbatt-popup"
-#define MAIN_W                         (480)
-#define MAIN_H                         (800)
-#define EDJ_PATH                       "/usr/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt"
-#define EDJ_NAME                       EDJ_PATH"/lowbatt.edj"
-#define GRP_MAIN                       "main"
-#define GRP_POPUP                      "popup"
-#define NEW_INDI
-#define APPLICATION_BG                 1
-#define INDICATOR_HEIGHT               (38)
-
-#ifndef PREDEF_POWEROFF
-#define PREDEF_POWEROFF                        "poweroff"
-#endif /* PREFEF_POWEROFF */
-
-#define BEAT
-
-/* Acct profiling support */
-#define  ACCT_PROF
-#ifdef   ACCT_PROF
-#include <sys/acct.h>
-#endif /* ACCT_PROF */
-
-#endif                         /* __DEF_lowbatt_H__ */
diff --git a/lowbatt-popup/src/org.tizen.lowbat-syspopup.efl b/lowbatt-popup/src/org.tizen.lowbat-syspopup.efl
deleted file mode 100644 (file)
index 7dc86c8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-org.tizen.lowbat-syspopup system r-x--- ------
-org.tizen.lowbat-syspopup aul::launch rwx--- ------
-org.tizen.lowbat-syspopup system::use_internet r----- ------
-org.tizen.lowbat-syspopup system::app_logging -w---- ------
-org.tizen.lowbat-syspopup isf r-x--- ------
-org.tizen.lowbat-syspopup ail::db rw---- ------
-org.tizen.lowbat-syspopup immvibed rw---- ------
-org.tizen.lowbat-syspopup syspopup::db rw---- ------
-org.tizen.lowbat-syspopup power_manager -w---- ------
-org.tizen.lowbat-syspopup xorg rw---- ------
-org.tizen.lowbat-syspopup system::system_bklight -w---- ------
-org.tizen.lowbat-syspopup system-server r-x--- ------
-org.tizen.lowbat-syspopup deviced rwx--- ------
-org.tizen.lowbat-syspopup display_wd r-x--- ------
-org.tizen.lowbat-syspopup live-magazine::data --x--- ------
-org.tizen.lowbat-syspopup sound_server rwxa-- ------
-org.tizen.lowbat-syspopup dbus rwx--- ------
-org.tizen.lowbat-syspopup devman -wx--- ------
-org.tizen.lowbat-syspopup org.tizen.data-provider-master rw---- ------
-org.tizen.lowbat-syspopup data-provider-master rw---- ------
-org.tizen.lowbat-syspopup data-provider-master::share --x--- ------
-org.tizen.lowbat-syspopup _ -wx--- ------
-org.tizen.lowbat-syspopup stest-service -w---- ------
-org.tizen.lowbat-syspopup tts-server rwx--- ------
-org.tizen.lowbat-syspopup syslogd -w---- ------
-org.tizen.lowbat-syspopup device::app_logging -w---- ------
-org.tizen.lowbat-syspopup device::led r----- ------
-org.tizen.lowbat-syspopup org.tizen.svoice rw---- ------
-org.tizen.lowbat-syspopup org.tizen.voicerecorder rw---- ------
-org.tizen.lowbat-syspopup system::vconf_setting rw---- ------
-org.tizen.lowbat-syspopup system::vconf_system rw---- ------
-org.tizen.lowbat-syspopup system::vconf_deviced rw---- ------
-org.tizen.lowbat-syspopup deviced::display rw---- ------
-org.tizen.lowbat-syspopup deviced::haptic rwx--- ------
-org.tizen.lowbat-syspopup system-apps rw---- ------
-org.tizen.lowbat-syspopup testmode::vconf r----l ------
-org.tizen.lowbat-syspopup org.tizen.setting::system rw---- ------
-org.tizen.lowbat-syspopup e17::notification rw---- ------
-stest-service org.tizen.lowbat-syspopup r-x--- ------
-system-server org.tizen.lowbat-syspopup -w---- ------
-deviced org.tizen.lowbat-syspopup -w---- ------
-display_wd org.tizen.lowbat-syspopup -w---- ------
-dbus org.tizen.lowbat-syspopup -w---- ------
-pulseaudio org.tizen.lowbat-syspopup -w---- ------
-org.tizen.app-tray org.tizen.lowbat-syspopup r-x--- ------
-tts-server org.tizen.lowbat-syspopup rw---- ------
-_ org.tizen.lowbat-syspopup -w---- ------
-org.tizen.lowbat-syspopup system::homedir rwxat- ------
-org.tizen.lowbat-syspopup system::vconf rwxat- ------
-org.tizen.lowbat-syspopup system::media rwxat- ------
-org.tizen.lowbat-syspopup system::share rwxat- ------
-org.tizen.lowbat-syspopup pulseaudio rwxat- ------
-e17 org.tizen.lowbat-syspopup -w---- ------
-org.tizen.lowbat-syspopup sys-assert::core rwxat- ------
-org.tizen.lowbat-syspopup privacy-manager::db r----l ------
-org.tizen.lowbat-syspopup pkgmgr::db r----l ------
-org.tizen.lowbat-syspopup system::vconf_inhouse rw---- ------
-org.tizen.lowbat-syspopup system::vconf_privacy rw---- ------
-org.tizen.lowbat-syspopup system::vconf_multimedia rw---- ------
-org.tizen.lowbat-syspopup system::vconf_network rw---- ------
-org.tizen.lowbat-syspopup system::vconf_misc rw---- ------
-org.tizen.lowbat-syspopup ecore::lock rwxat- ------
-org.tizen.lowbat-syspopup deviced::reboot rwx--- ------
diff --git a/lowmem-popup/CMakeLists.txt b/lowmem-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index 502d5dd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-########################### low memory ###########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(lowmem-popup C)
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ADD_SUBDIRECTORY(micro-src)
-ELSE()
-ADD_SUBDIRECTORY(src)
-ENDIF()
-
-################################# End ##############################################
-
diff --git a/lowmem-popup/micro-src/CMakeLists.txt b/lowmem-popup/micro-src/CMakeLists.txt
deleted file mode 100755 (executable)
index 55dbb2d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-
-########################### low memory ###########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(VENDOR "tizen")
-SET(PACKAGE "lowmem-syspopup")
-SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(TABLE_PATH ${CMAKE_SOURCE_DIR}/edcs/table)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/lowmem-popup/micro-src/lowmem.c
-                ${CMAKE_SOURCE_DIR}/share/micro-common.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lowmem-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
-               appcore-efl
-               elementary
-               syspopup
-               ecore
-               deviced
-               dlog
-               feedback
-)
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-
-SET(COMMON_EDC "micro-common.edc")
-ADD_CUSTOM_TARGET(lowmem.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/${COMMON_EDC} ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowmem.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/${COMMON_EDC}
-)
-ADD_DEPENDENCIES(${PROJECT_NAME} lowmem.edj)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowmem.edj DESTINATION /usr/apps/org.tizen.lowmem-syspopup/res/edje/lowmem/)
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.lowmem-syspopup/bin)
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowmem-syspopup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}/micro-src/org.tizen.lowmem-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
-INSTALL(FILES ${TABLE_PATH}/system-font.xml  DESTINATION ${RESDIR}/table)
-INSTALL(FILES ${TABLE_PATH}/system-color.xml DESTINATION ${RESDIR}/table)
-
-################################# End ##############################################
-
diff --git a/lowmem-popup/micro-src/lowmem.c b/lowmem-popup/micro-src/lowmem.c
deleted file mode 100755 (executable)
index 4310754..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <dd-deviced.h>
-#include "micro-common.h"
-
-#define LOW_STORAGE_TYPE_KEY                "_MEM_NOTI_"
-
-#define LOW_STORAGE_WARNING_TITLE       "IDS_COM_POP_NOT_ENOUGH_MEMORY"
-#define LOW_STORAGE_WARNING_CONTENT     "IDS_DAV_BODY_LOW_MEMORY_LEFT_ORANGE"
-#define LOW_STORAGE_CRITICAL_TITLE      LOW_STORAGE_WARNING_TITLE
-#define LOW_STORAGE_CRITICAL_CONTENT    LOW_STORAGE_WARNING_CONTENT
-#define LOW_STORAGE_FULL_TITLE          "IDS_ST_HEADER_STORAGE_FULL_ABB"
-#define LOW_STORAGE_FULL_CONTENT        "IDS_ST_POP_UNABLE_TO_RECORD_THERE_IS_NOT_ENOUGH_SPACE_IN_YOUR_GEAR_STORAGE"
-
-#define EDJ_PATH "/usr/apps/org.tizen.lowmem-syspopup/res/edje/lowmem"
-#define EDJ_NAME EDJ_PATH"/lowmem.edj"
-
-#ifdef SYSTEM_APPS_MICRO_3
-#define LAYOUT_STYLE "micro_3_title_content_button"
-#else
-#define LAYOUT_STYLE NULL
-#endif
-
-enum low_memory_options {
-       LOW_STORAGE_WARNING,
-       LOW_STORAGE_CRITICAL,
-       LOW_STORAGE_FULL,
-};
-
-struct popup_type {
-       char *name;
-       int type;
-};
-
-static const struct popup_type low_memory_type[] = {
-       { "warning"   , LOW_STORAGE_WARNING     },
-       { "critical"  , LOW_STORAGE_CRITICAL    },
-       { "full"      , LOW_STORAGE_FULL        },
-};
-
-static void low_storage_response(void *data, Evas_Object * obj, void *event_info)
-{
-       _I("Low storage popup OK button clicked");
-       popup_terminate();
-}
-
-static int load_low_storage_warning_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       evas_object_show(ad->win_main);
-
-#ifdef SYSTEM_APPS_CIRCLE
-       ad->popup = load_normal_popup(ad,
-                       EDJ_NAME,
-                       _(LOW_STORAGE_WARNING_TITLE),
-                       _(LOW_STORAGE_WARNING_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       "circle-ok.png",
-                       low_storage_response,
-                       NULL, NULL, NULL);
-#else
-       ad->popup = load_normal_popup(ad,
-                       _(LOW_STORAGE_WARNING_TITLE),
-                       _(LOW_STORAGE_WARNING_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       low_storage_response,
-                       NULL, NULL);
-#endif
-
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_low_storage_full_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       evas_object_show(ad->win_main);
-
-#ifdef SYSTEM_APPS_CIRCLE
-       ad->popup = load_normal_popup(ad,
-                       EDJ_NAME,
-                       _(LOW_STORAGE_FULL_TITLE),
-                       _(LOW_STORAGE_FULL_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       "circle-ok.png",
-                       low_storage_response,
-                       NULL, NULL, NULL);
-#else
-       ad->popup = load_normal_popup(ad,
-                       _(LOW_STORAGE_FULL_TITLE),
-                       _(LOW_STORAGE_FULL_CONTENT),
-                       _("IDS_COM_SK_OK"),
-                       low_storage_response,
-                       NULL, NULL);
-#endif
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_low_storage_popup(struct appdata *ad, bundle *b)
-{
-       int type, i, ret;
-       const char *opt;
-
-       if (!ad || !b)
-               return -EINVAL;
-
-       opt = bundle_get_val(b, LOW_STORAGE_TYPE_KEY);
-       if (!opt) {
-               _E("Failed to get storage status");
-               return -ENOMEM;
-       }
-
-       type = -1;
-       for (i = 0 ; i < ARRAY_SIZE(low_memory_type) ; i++) {
-               if (!strncmp(opt, low_memory_type[i].name, strlen(opt))) {
-                       type = low_memory_type[i].type;
-                       break;
-               }
-       }
-       if (type < 0) {
-               _E("Failed to get popup type(%d)", type);
-               return -EINVAL;
-       }
-
-       switch (type) {
-       case LOW_STORAGE_WARNING:
-       case LOW_STORAGE_CRITICAL:
-               ret = load_low_storage_warning_popup(ad);
-               break;
-       case LOW_STORAGE_FULL:
-               ret = load_low_storage_full_popup(ad);
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       play_feedback(FEEDBACK_TYPE_NONE, FEEDBACK_PATTERN_LOWBATT);
-
-       return ret;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-
-       elm_theme_overlay_add(NULL,EDJ_NAME);
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       if (ad && ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       int ret;
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-
-       if (syspopup_create(b, &(ad->handler), ad->win_main, ad) < 0) {
-               _E("FAIL: syspopup_create()");
-               ret = -ENOMEM;
-               goto lowmem_reset_out;
-       }
-
-       syspopup_reset_timeout(b, -1);
-
-       ret = load_low_storage_popup(ad, b);
-
-lowmem_reset_out:
-       if (ret < 0)
-               popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       deviced_conf_set_mempolicy(OOM_IGNORE);
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/lowmem-popup/micro-src/org.tizen.lowmem-syspopup.efl b/lowmem-popup/micro-src/org.tizen.lowmem-syspopup.efl
deleted file mode 100644 (file)
index 1d87d95..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-org.tizen.lowmem-syspopup aul::db r-x--- ------
-org.tizen.lowmem-syspopup system::use_internet r----- ------
-org.tizen.lowmem-syspopup system::app_logging -w---- ------
-org.tizen.lowmem-syspopup isf r-x--- ------
-org.tizen.lowmem-syspopup ail::db rw---- ------
-org.tizen.lowmem-syspopup immvibed rw---- ------
-org.tizen.lowmem-syspopup syspopup::db rw---- ------
-org.tizen.lowmem-syspopup xorg rw---- ------
-org.tizen.lowmem-syspopup system::system_bklight -w---- ------
-org.tizen.lowmem-syspopup deviced rwx--- ------
-org.tizen.lowmem-syspopup sound_server rwxa-- ------
-org.tizen.lowmem-syspopup dbus rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.data-provider-master rw---- ------
-org.tizen.lowmem-syspopup data-provider-master rw---- ------
-org.tizen.lowmem-syspopup data-provider-master::share --x--- ------
-org.tizen.lowmem-syspopup _ -wx--- ------
-org.tizen.lowmem-syspopup stest-service -w---- ------
-org.tizen.lowmem-syspopup tts-server rwx--- ------
-org.tizen.lowmem-syspopup syslogd -w---- ------
-org.tizen.lowmem-syspopup device::app_logging -w---- ------
-org.tizen.lowmem-syspopup device::led r----- ------
-org.tizen.lowmem-syspopup org.tizen.svoice rw---- ------
-org.tizen.lowmem-syspopup org.tizen.voicerecorder rw---- ------
-org.tizen.lowmem-syspopup system::vconf_setting rw---- ------
-org.tizen.lowmem-syspopup system::vconf_system rw---- ------
-org.tizen.lowmem-syspopup system::vconf_deviced rw---- ------
-org.tizen.lowmem-syspopup deviced::display rw---- ------
-org.tizen.lowmem-syspopup deviced::haptic rwx--- ------
-org.tizen.lowmem-syspopup system-apps rw---- ------
-org.tizen.lowmem-syspopup org.tizen.setting::system rw---- ------
-stest-service org.tizen.lowmem-syspopup r-x--- ------
-deviced org.tizen.lowmem-syspopup -w---- ------
-dbus org.tizen.lowmem-syspopup -w---- ------
-pulseaudio org.tizen.lowmem-syspopup -w---- ------
-org.tizen.app-tray org.tizen.lowmem-syspopup r-x--- ------
-tts-server org.tizen.lowmem-syspopup rw---- ------
-_ org.tizen.lowmem-syspopup -w---- ------
-org.tizen.lowmem-syspopup system::homedir rwxat- ------
-org.tizen.lowmem-syspopup system::vconf rwxat- ------
-org.tizen.lowmem-syspopup system::media rwxat- ------
-org.tizen.lowmem-syspopup system::share rwxat- ------
-org.tizen.lowmem-syspopup pulseaudio rwxat- ------
-e17 org.tizen.lowmem-syspopup -w---- ------
-org.tizen.lowmem-syspopup sys-assert::core rwxat- ------
-org.tizen.lowmem-syspopup privacy-manager::db r----l ------
-org.tizen.lowmem-syspopup pkgmgr::db r----l ------
-org.tizen.lowmem-syspopup system::vconf_inhouse rw---- ------
-org.tizen.lowmem-syspopup system::vconf_privacy rw---- ------
-org.tizen.lowmem-syspopup system::vconf_multimedia rw---- ------
-org.tizen.lowmem-syspopup system::vconf_network rw---- ------
-org.tizen.lowmem-syspopup system::vconf_misc rw---- ------
-org.tizen.lowmem-syspopup device::sys_logging -w---- ------
-org.tizen.lowmem-syspopup org.tizen.w-idle-clock-weather2 rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.idle-clock-pedometer rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.w-idle-clock-shortcut2 rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.idle-clock-event rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.idle-clock-dual rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.w-idle-clock-analog3 rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.w-idle-clock-analog1 rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.idle-clock-digital rwx--- ------
-org.tizen.lowmem-syspopup org.tizen.w-idle-clock-analog2 rwx--- ------
-org.tizen.lowmem-syspopup e17::notification rw--- -----
diff --git a/lowmem-popup/src/CMakeLists.txt b/lowmem-popup/src/CMakeLists.txt
deleted file mode 100755 (executable)
index dd56b84..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-
-########################### low memory ###########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/lowmem-popup/src/lowmem.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lowmem-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(lowmem_pkgs REQUIRED
-               appcore-efl
-               elementary
-               syspopup
-               ecore
-               deviced
-               dlog
-               feedback
-)
-
-FOREACH(flag ${lowmem_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g -I/usr/include/elementary-0 ")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${lowmem_pkgs_LDFLAGS})
-
-ADD_CUSTOM_TARGET(lowmem.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/lowmem.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowmem.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/lowmem.edc
-)
-ADD_DEPENDENCIES(${PROJECT_NAME} lowmem.edj)
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.lowmem-syspopup/bin)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowmem.edj DESTINATION /usr/apps/org.tizen.lowmem-syspopup/res/edje/lowmem)
-
-# install desktop file & icon
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowmem-syspopup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}/src/org.tizen.lowmem-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
-################################# End ##############################################
-
diff --git a/lowmem-popup/src/lowmem.c b/lowmem-popup/src/lowmem.c
deleted file mode 100755 (executable)
index b912c5d..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include "lowmem.h"
-#include <Ecore_X.h>
-#include <utilX.h>
-#include <syspopup.h>
-#include <dd-display.h>
-#include <dd-deviced.h>
-#include <vconf.h>
-#include "common.h"
-
-#define LOWMEM_LEVEL_WARNING   "warning"
-#define LOWMEM_LEVEL_CRITICAL  "critical"
-
-static const char *process_name = NULL;
-static const char *memnoti_level = NULL;
-static const char *memnoti_size = NULL;
-
-/* Background clicked noti */
-void bg_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       _D("system-popup : In BG Noti ");
-       fflush(stdout);
-       popup_terminate();
-}
-
-void lowmem_clicked_cb(void *data, Evas * e, Evas_Object * obj,
-                      void *event_info)
-{
-       _D("system-popup : Screen clicked ");
-       fflush(stdout);
-       popup_terminate();
-}
-
-/* Create indicator bar */
-int lowmem_create_indicator(struct appdata *ad)
-{
-       elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_HIDE);
-       return 0;
-}
-
-void lowmem_timeout_func(void *data)
-{
-       _D(" System-popup : In Lowmem timeout");
-
-       /* Cleanup */
-       object_cleanup(data);
-
-       /* Now get lost */
-       popup_terminate();
-}
-
-static void get_lowmem_storage_popup_title_text(char **title, char **text)
-{
-       int ret;
-       int operator;
-
-       _I("lowmem noti is %s ", memnoti_level);
-
-       ret = vconf_get_int(VCONFKEY_CSC_OPERATOR, &operator);
-       if (ret != 0)
-               operator = -1;
-
-       if (!strncmp(memnoti_level, LOWMEM_LEVEL_WARNING, strlen(LOWMEM_LEVEL_WARNING))) {
-               switch (operator) {
-               case VCONFKEY_CSC_OPERATOR_DOCOMO:
-                       *title = _("IDS_PN_FREE_SPACE_DECREASES");
-                       *text = _("IDS_PN_FREE_SPACE_OF_THE_DEVICE_IS_LOW");
-                       break;
-               default:
-                       *title = NULL;
-                       *text = _("IDS_DAV_BODY_LOW_MEMORY_LEFT_ORANGE");
-                       break;
-               }
-
-               return;
-       }
-
-       if (!strncmp(memnoti_level, LOWMEM_LEVEL_CRITICAL, strlen(LOWMEM_LEVEL_CRITICAL))) {
-               switch (operator) {
-               case VCONFKEY_CSC_OPERATOR_DOCOMO:
-                       *title = _("IDS_PN_BODY_THE_DEVICE_MEMORY_IS_FULL_JPN_DCM");
-                       *text = _("IDS_PN_BODY_NOT_ENOUGH_STORAGE_AVAILABLE_SOME_FUNCTIONS_"
-                                       "AND_APPLICATIONS_MAY_NOT_BE_AVAILABLE_NOTI_MSG_JPN_DCM");
-                       break;
-               default:
-                       *title = NULL;
-                       *text = _("IDS_COM_POP_NOT_ENOUGH_MEMORY");
-                       break;
-               }
-
-               return;
-       }
-
-       _E("Low memory level is unknown (%s)", memnoti_level);
-
-       *title = NULL;
-       *text = _("IDS_COM_POP_NOT_ENOUGH_MEMORY");
-}
-
-static int get_lowmem_process_popup_text(char **text)
-{
-       char *note;
-       char note_buf[MAX_PROCESS_NAME] = {0, };
-       char *subtext1;
-       char *subtext2;
-       int noteLen;
-
-       subtext1 = _("IDS_IDLE_POP_PS_CLOSED");
-       subtext2 = _("IDS_COM_POP_NOT_ENOUGH_MEMORY");
-       snprintf(note_buf, sizeof(note_buf), subtext1, process_name);
-
-       noteLen = strlen(note_buf) + strlen(subtext2) + 3; /* 3: one period, one space, and one '\0' */
-
-       note = (char *)malloc(noteLen);
-       if (!note) {
-               _E("FAIL: malloc()");
-               return -ENOMEM;
-       }
-
-       snprintf(note, noteLen, "%s. %s", subtext2, note_buf);
-       _I("Popup content: %s", note);
-
-       *text = strdup(note);
-       FREE(note);
-
-       return 0;
-}
-
-
-static int load_lowmem_storage_popup(struct appdata *ad)
-{
-       char *text = NULL;
-       char *title = NULL;
-
-       if (!ad)
-               return -EINVAL;
-
-       get_lowmem_storage_popup_title_text(&title, &text);
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       title,
-                       text,
-                       _("IDS_COM_SK_OK"),
-                       bg_clicked_cb,
-                       NULL, NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_lowmem_process_popup(struct appdata *ad)
-{
-       char *text = NULL;
-       int ret;
-
-       if (!ad)
-               return -EINVAL;
-
-       ret = get_lowmem_process_popup_text(&text);
-       if (ret < 0) {
-               _E("FAIL: get_lowmem_process_popup_text()");
-               return ret;
-       }
-
-       if (!text)
-               return -ENOMEM;
-
-       evas_object_show(ad->win_main);
-
-       ad->popup = load_normal_popup(ad,
-                       _("IDS_IDLE_BODY_LOW_MEMORY"),
-                       text,
-                       _("IDS_COM_SK_OK"),
-                       bg_clicked_cb,
-                       NULL, NULL);
-
-       FREE(text);
-
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       if (ad->layout_main)
-               evas_object_del(ad->layout_main);
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       int ret;
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-
-       if (syspopup_create(b, &(ad->handler), ad->win_main, ad) < 0) {
-               _E("FAIL: syspopup_create()");
-               ret = -ENOMEM;
-               goto lowmem_reset_out;
-       }
-
-       memnoti_level = bundle_get_val(b, "_MEM_NOTI_");
-       if (memnoti_level) {
-               memnoti_size = bundle_get_val(b, "_MEM_SIZE_");
-               ret = load_lowmem_storage_popup(ad);
-               if (ret < 0)
-                       goto lowmem_reset_out;
-
-               syspopup_reset_timeout(b, -1);
-
-       } else {
-               process_name = bundle_get_val(b, "_APP_NAME_");
-               if (process_name == NULL)
-                       process_name = "unknown_app";
-               ret = load_lowmem_process_popup(ad);
-               if (ret < 0)
-                       goto lowmem_reset_out;
-       }
-
-       if (set_display_feedback(PATTERN_LOWMEM) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-
-lowmem_reset_out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       deviced_conf_set_mempolicy(OOM_IGNORE);
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/lowmem-popup/src/lowmem.h b/lowmem-popup/src/lowmem.h
deleted file mode 100644 (file)
index c9c97b1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 __DEF_lowmem_H_
-#define __DEF_lowmem_H_
-
-#include <Elementary.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#ifndef PREFIX
-#define PREFIX "/usr"
-#endif /* PREFIX */
-
-#define TEMP_DIR               "/tmp"
-#define PACKAGE                        "lowmem-popup"
-#define APPNAME                        "lowmem-popup"
-#define MAIN_W                 (480)
-#define MAIN_H                 (800)
-#define EDJ_PATH               "/usr/apps/org.tizen.lowmem-syspopup/res/edje/lowmem"
-#define EDJ_NAME               EDJ_PATH"/lowmem.edj"
-#define EDJ_POPUP_NAME         EDJ_PATH"/lowmem_popup.edj"
-#define GRP_MAIN               "main"
-#define GRP_POPUP              "popup"
-#define MAX_PROCESS_NAME       512
-#define PROCESS_NAME_FILE      "/tmp/processname.txt"
-#define BEAT
-
-#endif                         /* __DEF_lowmem_H__ */
diff --git a/lowmem-popup/src/org.tizen.lowmem-syspopup.efl b/lowmem-popup/src/org.tizen.lowmem-syspopup.efl
deleted file mode 100644 (file)
index 96715ad..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-org.tizen.lowmem-syspopup svi-data r-x--- ------
-org.tizen.lowmem-syspopup aul::db r-x--- ------
-org.tizen.lowmem-syspopup system::use_internet r----- ------
-org.tizen.lowmem-syspopup system::app_logging -w---- ------
-org.tizen.lowmem-syspopup isf r-x--- ------
-org.tizen.lowmem-syspopup ail::db rw---- ------
-org.tizen.lowmem-syspopup immvibed rw---- ------
-org.tizen.lowmem-syspopup syspopup::db rw---- ------
-org.tizen.lowmem-syspopup power_manager -w---- ------
-org.tizen.lowmem-syspopup xorg rw---- ------
-org.tizen.lowmem-syspopup system::system_bklight -w---- ------
-org.tizen.lowmem-syspopup system-server r-x--- ------
-org.tizen.lowmem-syspopup deviced rwx--- ------
-org.tizen.lowmem-syspopup display_wd r-x--- ------
-org.tizen.lowmem-syspopup live-magazine::data --x--- ------
-org.tizen.lowmem-syspopup sound_server rwxa-- ------
-org.tizen.lowmem-syspopup dbus rwx--- ------
-org.tizen.lowmem-syspopup devman -wx--- ------
-org.tizen.lowmem-syspopup org.tizen.data-provider-master rw---- ------
-org.tizen.lowmem-syspopup data-provider-master rw---- ------
-org.tizen.lowmem-syspopup data-provider-master::share --x--- ------
-org.tizen.lowmem-syspopup _ -wx--- ------
-org.tizen.lowmem-syspopup stest-service -w---- ------
-org.tizen.lowmem-syspopup tts-server rwx--- ------
-org.tizen.lowmem-syspopup syslogd -w---- ------
-org.tizen.lowmem-syspopup device::app_logging -w---- ------
-org.tizen.lowmem-syspopup device::led r----- ------
-org.tizen.lowmem-syspopup org.tizen.svoice rw---- ------
-org.tizen.lowmem-syspopup org.tizen.voicerecorder rw---- ------
-org.tizen.lowmem-syspopup system::vconf_setting rw---- ------
-org.tizen.lowmem-syspopup system::vconf_system rw---- ------
-org.tizen.lowmem-syspopup system::vconf_deviced rw---- ------
-org.tizen.lowmem-syspopup deviced::display rw---- ------
-org.tizen.lowmem-syspopup deviced::haptic rwx--- ------
-org.tizen.lowmem-syspopup system-apps rw---- ------
-org.tizen.lowmem-syspopup org.tizen.setting::system rw---- ------
-org.tizen.lowmem-syspopup e17::notification rw---- ------
-stest-service org.tizen.lowmem-syspopup r-x--- ------
-system-server org.tizen.lowmem-syspopup -w---- ------
-deviced org.tizen.lowmem-syspopup -w---- ------
-display_wd org.tizen.lowmem-syspopup -w---- ------
-dbus org.tizen.lowmem-syspopup -w---- ------
-pulseaudio org.tizen.lowmem-syspopup -w---- ------
-org.tizen.app-tray org.tizen.lowmem-syspopup r-x--- ------
-tts-server org.tizen.lowmem-syspopup rw---- ------
-_ org.tizen.lowmem-syspopup -w---- ------
-org.tizen.lowmem-syspopup system::homedir rwxat- ------
-org.tizen.lowmem-syspopup system::vconf rwxat- ------
-org.tizen.lowmem-syspopup system::media rwxat- ------
-org.tizen.lowmem-syspopup system::share rwxat- ------
-org.tizen.lowmem-syspopup pulseaudio rwxat- ------
-e17 org.tizen.lowmem-syspopup -w---- ------
-org.tizen.lowmem-syspopup sys-assert::core rwxat- ------
-org.tizen.lowmem-syspopup privacy-manager::db r----l ------
-org.tizen.lowmem-syspopup pkgmgr::db r----l ------
-org.tizen.lowmem-syspopup system::vconf_inhouse rw---- ------
-org.tizen.lowmem-syspopup system::vconf_privacy rw---- ------
-org.tizen.lowmem-syspopup system::vconf_multimedia rw---- ------
-org.tizen.lowmem-syspopup system::vconf_network rw---- ------
-org.tizen.lowmem-syspopup system::vconf_misc rw---- ------
-org.tizen.lowmem-syspopup ecore::lock rwxat- ------
diff --git a/mmc-popup/CMakeLists.txt b/mmc-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index 9db39c9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-
-#################### Memory-card ###############################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(mmc-popup C)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/mmc-popup/src/mmc.c
-                ${CMAKE_SOURCE_DIR}/share/common.c
-)
-
-SET(PKG_MODULES
-               appcore-efl
-               elementary
-               ecore
-               notification
-               deviced
-               dlog
-               edbus
-               feedback
-               syspopup
-)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/mmc-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(mmc_pkgs REQUIRED ${PKG_MODULES})
-
-FOREACH(flag ${mmc_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g ")
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${mmc_pkgs_LDFLAGS})
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.mmc-syspopup/bin)
-
-# install desktop file & icon
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.mmc-syspopup.xml DESTINATION /usr/share/packages/)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.mmc-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
-###############################################################
-
-
diff --git a/mmc-popup/src/mmc.c b/mmc-popup/src/mmc.c
deleted file mode 100755 (executable)
index 3e2bb77..0000000
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include "mmc.h"
-#include <vconf.h>
-#include <vconf-keys.h>
-#include <Ecore_X.h>
-#include <utilX.h>
-#include <notification.h>
-#include <syspopup.h>
-#include <dd-deviced.h>
-#include <dd-display.h>
-#include <dd-mmc.h>
-#include <aul.h>
-#include "common.h"
-
-#define CHECK_ACT                      0
-#define MOUNT_ERROR_ACT                1
-#define MOUNT_RDONLY_ACT       2
-#define MOUNT_CHECK_SMACK_ACT  3
-#define MMC_ODE_ENCRYPT                4
-#define MMC_ODE_DECRYPT                5
-
-#define RETRY_MAX 10
-
-#define SETTING_MMC_ENCRYPTION_UG  "setting-mmc-encryption-efl"
-
-/* IPC to continue mounting mmc without encription/decryption */
-#define DD_BUS_NAME             "org.tizen.system.deviced"
-#define DD_OBJECT_PATH_ODE      "/Org/Tizen/System/DeviceD/Ode"
-#define DD_INTERFACE_NAME_ODE   DD_BUS_NAME".ode"
-#define DD_SIGNAL_GENERAL_MOUNT "RequestGeneralMount"
-#define DD_SIGNAL_ODE_MOUNT     "RequestOdeMount"
-#define DD_SIGNAL_REMOVE_MMC    "RemoveMmc"
-
-static int option = -1;
-
-static bool (*is_encryption_restricted)(void) = NULL;
-
-void register_encryption_restricted_function(bool (*func)(void))
-{
-       if (func)
-               is_encryption_restricted = func;
-}
-
-static bool is_mmc_inserted(void)
-{
-       int status;
-       if (vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &status) == 0
-                       && status != VCONFKEY_SYSMAN_MMC_REMOVED) {
-               return true;
-       }
-       return false;
-}
-
-static bool is_mmc_mounted(void)
-{
-       int status;
-       if (vconf_get_int(VCONFKEY_SYSMAN_MMC_MOUNT, &status) == 0
-                       && status == VCONFKEY_SYSMAN_MMC_MOUNT_FAILED) {
-               return false;
-       }
-       return true;
-}
-
-static void unregister_edbus_signal_handler(struct appdata *ad)
-{
-       if (!ad)
-               return;
-
-       e_dbus_signal_handler_del(ad->edbus_conn, ad->edbus_handler);
-       e_dbus_connection_close(ad->edbus_conn);
-       e_dbus_shutdown();
-}
-
-static void mmc_removed_signal_cb(void *data, DBusMessage *msg)
-{
-       unregister_edbus_signal_handler(data);
-       popup_terminate();
-}
-
-static int register_edbus_signal_handler(struct appdata *ad)
-{
-       int retry;
-       int ret;
-
-       if (!ad)
-               return -EINVAL;
-
-       retry = 0;
-       while (e_dbus_init() == 0) {
-               retry++;
-               if (retry >= RETRY_MAX) {
-                       return -ECONNREFUSED;
-               }
-       }
-
-       ad->edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-       if (!(ad->edbus_conn)) {
-               ret = -ECONNREFUSED;
-               goto edbus_handler_out;
-       }
-
-       ad->edbus_handler = e_dbus_signal_handler_add(ad->edbus_conn, NULL, DD_OBJECT_PATH_ODE,
-                       DD_INTERFACE_NAME_ODE, DD_SIGNAL_REMOVE_MMC, mmc_removed_signal_cb, ad);
-       if (!(ad->edbus_handler)) {
-               ret = -ECONNREFUSED;
-               goto edbus_handler_connection_out;
-       }
-
-       return 0;
-
-edbus_handler_connection_out:
-       e_dbus_connection_close(ad->edbus_conn);
-edbus_handler_out:
-       e_dbus_shutdown();
-       return ret;
-}
-
-static void mmc_mount_status_changed_cb(keynode_t *in_key, void *data)
-{
-       if (vconf_keynode_get_int(in_key) != VCONFKEY_SYSMAN_MMC_MOUNT_FAILED)
-               popup_terminate();
-}
-
-static void unregister_vconf_mmc_mount(void)
-{
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_MOUNT, mmc_mount_status_changed_cb) != 0)
-               _E("FAIL: vconf_ignore_key_changed()");
-}
-
-static int register_vconf_mmc_mount(struct appdata *ad)
-{
-       int ret;
-
-       if (!ad)
-               return -EINVAL;
-
-       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_MOUNT, mmc_mount_status_changed_cb, ad);
-       if (ret < 0) {
-               _E("FAIL: vconf_notify_key_changed()");
-               return ret;
-       }
-
-       return 0;
-}
-
-void mmc_response(void *data, Evas_Object *obj, void *event_info)
-{
-       if (option == MOUNT_CHECK_SMACK_ACT)
-               deviced_call_predef_action(PREDEF_CHECK_SMACK_MMC, 0);
-
-       if (data != NULL)
-               object_cleanup(data);
-
-       popup_terminate();
-}
-
-static void mmc_err_response (void *data, Evas_Object *obj, void *event_info)
-{
-       unregister_vconf_mmc_mount();
-       object_cleanup(data);
-       popup_terminate();
-}
-
-static void launch_setting_encryption_ug(void)
-{
-       int ret;
-       bundle *b;
-
-       b = bundle_create();
-       if (!b) {
-               _E("FAIL: bundle_create()");
-               return;
-       }
-
-       ret = aul_launch_app(SETTING_MMC_ENCRYPTION_UG, b);
-       if (ret != AUL_R_OK) {
-               _E("FAIL: aul_launch_app()");
-       }
-
-       if (bundle_free(b) != 0)
-               _E("FAIL: bundle_free(b);");
-}
-
-static void ode_launch_setting_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       if (data) {
-               unregister_edbus_signal_handler(data);
-               object_cleanup(data);
-       }
-
-       launch_setting_encryption_ug();
-
-       popup_terminate();
-}
-
-static void send_general_mount_signal_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       int ret;
-
-       if (data) {
-               unregister_edbus_signal_handler(data);
-               object_cleanup(data);
-       }
-
-       ret = broadcast_dbus_signal(DD_OBJECT_PATH_ODE,
-                       DD_INTERFACE_NAME_ODE,
-                       DD_SIGNAL_GENERAL_MOUNT,
-                       NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: broadcast_dbus_signal()");
-
-       popup_terminate();
-}
-
-static void send_ode_mount_signal_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       int ret;
-
-       if (data) {
-               unregister_edbus_signal_handler(data);
-               object_cleanup(data);
-       }
-
-       ret = broadcast_dbus_signal(DD_OBJECT_PATH_ODE,
-                       DD_INTERFACE_NAME_ODE,
-                       DD_SIGNAL_ODE_MOUNT,
-                       NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: broadcast_dbus_signal()");
-
-       popup_terminate();
-}
-
-static void ode_later_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       if (data) {
-               unregister_edbus_signal_handler(data);
-               object_cleanup(data);
-       }
-
-       /* remove the mounted sdcard */
-       deviced_request_unmount_mmc(NULL, true);
-
-       /* Turn on the "Encrypt SD card" option on the Settings app */
-       if (vconf_set_bool(VCONFKEY_SETAPPL_MMC_ENCRYPTION_STATUS_BOOL, 1) != 0)
-               _E("Failed to set MMC encryption status to true");
-
-       popup_terminate();
-}
-
-static Evas_Object *load_encrypt_popup(struct appdata *ad)
-{
-       return load_popup_with_vertical_buttons(ad,
-                       _("IDS_DN_BODY_ENCRYPT_SD_CARD"),
-                       _("IDS_ST_POP_TO_USE_YOUR_SD_CARD_IT_MUST_BE_ENCRYPTED_ENCRYPT_SD_CARD_OR_DISABLE_DEVICE_ENCRYPTION_Q"),
-                       _("IDS_ST_BUTTON_ENCRYPT_SD_CARD_ABB"),
-                       ode_launch_setting_cb,
-                       _("IDS_ST_BUTTON_DISABLE_ENCRYPTION_ABB"),
-                       send_general_mount_signal_cb);
-}
-
-static Evas_Object *load_encrypt_popup_restricted(struct appdata *ad)
-{
-       return load_popup_with_vertical_buttons(ad,
-                       _("IDS_DN_BODY_ENCRYPT_SD_CARD"),
-                       _("IDS_ST_POP_THIS_SD_CARD_IS_NOT_ENCRYPTED_YOU_CANNOT_DISABLE_ENCRYPT_SD_CARD_BECAUSE_IT_HAS_BEEN_ENABLED_BY_AN_ADMINISTRATOR_ENCRYPT_Q"),
-                       _("IDS_HEALTH_BUTTON_LATER_ABB"),
-                       ode_later_clicked,
-                       _("IDS_ST_BUTTON_ENCRYPT_SD_CARD_ABB"),
-                       ode_launch_setting_cb);
-}
-
-static int launch_mmc_ode_encrypt_popup(struct appdata *ad)
-{
-       int ret;
-
-       if (!ad)
-               return -EINVAL;
-
-       ret = register_edbus_signal_handler(ad);
-       if (ret < 0) {
-               return ret;
-       }
-
-       if (is_encryption_restricted && is_encryption_restricted()) {
-               ad->popup = load_encrypt_popup_restricted(ad);
-       } else {
-               ad->popup = load_encrypt_popup(ad);
-       }
-
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               ret = -ENOMEM;
-               goto mmc_ode_encrypt_out;
-       }
-
-       if (is_mmc_inserted() == false) {
-               _E("mmc is not inserted");
-               ret = -ENODEV;
-               goto mmc_ode_encrypt_out;
-       }
-
-       return 0;
-
-mmc_ode_encrypt_out:
-       unregister_edbus_signal_handler(ad);
-       return ret;
-}
-
-static int launch_mmc_ode_decrypt_popup(struct appdata *ad)
-{
-       int ret;
-
-       if (!ad)
-               return -EINVAL;
-
-       ret = register_edbus_signal_handler(ad);
-       if (ret < 0) {
-               return ret;
-       }
-
-       ad->popup = load_popup_with_vertical_buttons(ad,
-                       _("IDS_DN_BODY_DECRYPT_SD_CARD"),
-                       _("IDS_ST_POP_TO_USE_YOUR_SD_CARD_IT_MUST_BE_DECRYPTED_DECRYPT_SD_CARD_OR_ENABLE_DEVICE_ENCRYPTION_Q"),
-                       _("IDS_ST_BUTTON_DECRYPT_SD_CARD_ABB"),
-                       ode_launch_setting_cb,
-                       _("IDS_ST_BUTTON_ENABLE_ENCRYPTION_ABB"),
-                       send_ode_mount_signal_cb);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               ret = -ENOMEM;
-               goto mmc_ode_decrypt_out;
-       }
-
-       if (is_mmc_inserted() == false) {
-               _E("mmc is not inserted");
-               ret = -ENODEV;
-               goto mmc_ode_decrypt_out;
-       }
-
-       return 0;
-
-mmc_ode_decrypt_out:
-       unregister_edbus_signal_handler(ad);
-       return ret;
-}
-
-static int launch_mount_error_popup(struct appdata *ad)
-{
-       int ret;
-
-       if (!ad)
-               return -EINVAL;
-
-       ret = register_vconf_mmc_mount(ad);
-       if (ret < 0) {
-               return ret;
-       }
-
-       if (is_mmc_mounted() != false) {
-               _E("mmc is mounted successfully");
-               ret = -EEXIST;
-               goto mount_error_out;
-       }
-
-       ad->popup = load_normal_popup(ad,
-                       NULL,
-                       _("IDS_DN_POP_FAILED_TO_MOUNT_SD_CARD_REINSERT_OR_FORMAT_SD_CARD"),
-                       _("IDS_COM_SK_OK"),
-                       mmc_err_response,
-                       NULL,
-                       NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               ret = -ENOMEM;
-               goto mount_error_out;
-       }
-
-       return 0;
-
-mount_error_out:
-       unregister_vconf_mmc_mount();
-       return ret;
-}
-
-static int launch_mount_rdonly_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       ad->popup = load_normal_popup(ad,
-                       NULL,
-                       _("IDS_ST_BODY_SD_CARD_MOUNTED_READ_ONLY"),
-                       _("IDS_COM_SK_OK"),
-                       mmc_response,
-                       NULL,
-                       NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int launch_mount_check_smack_popup(struct appdata *ad)
-{
-       if (!ad)
-               return -EINVAL;
-
-       ad->popup = load_normal_popup(ad,
-                       NULL,
-                       _("IDS_MF_BODY_MMC_DATA_IS_INITIALIZING_ING"),
-                       NULL,
-                       NULL,
-                       NULL,
-                       NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-int mmc_popup_start(void *data)
-{
-       struct appdata *ad = data;
-       int ret;
-
-       switch (option) {
-       case MMC_ODE_ENCRYPT:
-               ret = launch_mmc_ode_encrypt_popup(ad);
-               break;
-       case MMC_ODE_DECRYPT:
-               ret = launch_mmc_ode_decrypt_popup(ad);
-               break;
-       case MOUNT_ERROR_ACT:
-               ret = launch_mount_error_popup(ad);
-               break;
-       case MOUNT_RDONLY_ACT:
-               ret = launch_mount_rdonly_popup(ad);
-               break;
-       case MOUNT_CHECK_SMACK_ACT:
-               ret = launch_mount_check_smack_popup(ad);
-               break;
-       default:
-               _E("Option is unknown");
-               ret = -EINVAL;
-               break;
-       }
-
-       if (ret < 0)
-               goto mmc_popup_start_out;
-
-       if (option == MOUNT_ERROR_ACT || option == MOUNT_RDONLY_ACT) {
-               if (set_display_feedback(PATTERN_LOWBAT) < 0)
-                       _E("Failed to set display and feedback");
-       } else {
-               if (set_display_feedback(-1) < 0)
-                       _E("Failed to set display");
-       }
-
-       return 0;
-
-mmc_popup_start_out:
-       popup_terminate();
-       return ret;
-}
-
-/* App init */
-int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       if (ad->layout_main)
-               evas_object_del(ad->layout_main);
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       const char *opt;
-       int ret;
-
-       opt = bundle_get_val(b, "_SYSPOPUP_CONTENT_");
-       if (!opt) {
-               _E("Failed to get conent");
-               popup_terminate();
-               return -ENOENT;
-       }
-
-       if (!strcmp(opt,"mounterr"))
-               option = MOUNT_ERROR_ACT;
-       else if (!strcmp(opt, "mountrdonly"))
-               option = MOUNT_RDONLY_ACT;
-       else if (!strcmp(opt, "checksmack"))
-               option = MOUNT_CHECK_SMACK_ACT;
-       else if (!strcmp(opt, "odeencrypt"))
-               option = MMC_ODE_ENCRYPT;
-       else if (!strcmp(opt, "odedecrypt"))
-               option = MMC_ODE_DECRYPT;
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-       } else {
-               ret = syspopup_create(b, &(ad->handler), ad->win_main, ad);
-               if (ret < 0) {
-                       _E("Failed to create syspopup");
-                       popup_terminate();
-                       return ret;
-               }
-
-               evas_object_show(ad->win_main);
-               /* Start Main UI */
-               mmc_popup_start((void *)ad);
-       }
-
-       return 0;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/mmc-popup/src/mmc.h b/mmc-popup/src/mmc.h
deleted file mode 100644 (file)
index 00c9a18..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 __DEF_mmc_H_
-#define __DEF_mmc_H_
-
-#include <Elementary.h>
-#include <stdbool.h>
-
-#ifndef PREFIX
-#define PREFIX "/usr"
-#endif /* PREFIX */
-
-#define TEMP_DIR                       "/tmp"
-#define PACKAGE                                "mmc-popup"
-#define APPNAME                                "mmc-popup"
-#define MAIN_W                         (480)
-#define MAIN_H                         (800)
-#define GRP_MAIN                       "main"
-#define GRP_POPUP                      "popup"
-#define NEW_INDI
-#define APPLICATION_BG                 1
-#define INDICATOR_HEIGHT               (38)
-#define PREDEF_CHECK_SMACK_MMC         "checksmackmmc"
-
-#define BEAT
-
-/* Acct profiling support */
-#define  ACCT_PROF
-#ifdef   ACCT_PROF
-#include <sys/acct.h>
-#endif /* ACCT_PROF */
-
-void register_encryption_restricted_function(bool (*func)(void));
-
-#endif                         /* __DEF_mmc_H__ */
diff --git a/packaging/org.tizen.datausage-syspopup.efl b/packaging/org.tizen.datausage-syspopup.efl
deleted file mode 100644 (file)
index d7ba648..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-org.tizen.datausage-syspopup system r-x--- ------
-org.tizen.datausage-syspopup aul::db r-x--- ------
-org.tizen.datausage-syspopup isf r-x--- ------
-org.tizen.datausage-syspopup ail::db rw---- ------
-org.tizen.datausage-syspopup syspopup::db rw---- ------
-org.tizen.datausage-syspopup xorg rw---- ------
-org.tizen.datausage-syspopup sound_server rwxa-- ------
-org.tizen.datausage-syspopup dbus rwx--- ------
-org.tizen.datausage-syspopup org.tizen.data-provider-master rw---- ------
-org.tizen.datausage-syspopup tts-server rwx--- ------
-org.tizen.datausage-syspopup device::app_logging -w---- ------
-org.tizen.datausage-syspopup syslogd -w---- ------
-org.tizen.datausage-syspopup org.tizen.setting --x--- ------
-org.tizen.datausage-syspopup deviced::display rw---- ------
-org.tizen.datausage-syspopup deviced::haptic rwx--- ------
-org.tizen.datausage-syspopup aul::launch r-x--- ------
-org.tizen.datausage-syspopup system-apps rw---- ------
-org.tizen.datausage-syspopup e17::notification rw---- ------
-dbus org.tizen.datausage-syspopup -w---- ------
-org.tizen.datausage-syspopup system::homedir rwxat- ------
-org.tizen.datausage-syspopup system::vconf rwxat- ------
-org.tizen.datausage-syspopup system::media rwxat- ------
-org.tizen.datausage-syspopup system::share rwxat- ------
-org.tizen.datausage-syspopup pulseaudio rwxat- ------
-e17 org.tizen.datausage-syspopup -w---- ------
-org.tizen.datausage-syspopup sys-assert::core rwxat- ------
-stest-service org.tizen.datausage-syspopup r-x--- ------
-org.tizen.datausage-syspopup stest-service -w---- ------
-org.tizen.datausage-syspopup privacy-manager::db r----l ------
-org.tizen.datausage-syspopup pkgmgr::db r----l ------
-org.tizen.datausage-syspopup system::vconf_inhouse rw---- ------
-org.tizen.datausage-syspopup system::vconf_setting rw---- ------
-org.tizen.datausage-syspopup system::vconf_privacy rw---- ------
-org.tizen.datausage-syspopup system::vconf_system rw---- ------
-org.tizen.datausage-syspopup system::vconf_multimedia rw---- ------
-org.tizen.datausage-syspopup system::vconf_network rw---- ------
-org.tizen.datausage-syspopup system::vconf_misc rw---- ------
-org.tizen.datausage-syspopup ecore::lock rwxat- ------
diff --git a/packaging/org.tizen.mmc-syspopup.efl b/packaging/org.tizen.mmc-syspopup.efl
deleted file mode 100644 (file)
index 81ed3d4..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-org.tizen.mmc-syspopup system r-x--- ------
-org.tizen.mmc-syspopup svi-data r-x--- ------
-org.tizen.mmc-syspopup system::app_logging -w---- ------
-org.tizen.mmc-syspopup isf r-x--- ------
-org.tizen.mmc-syspopup ail::db rw---- ------
-org.tizen.mmc-syspopup immvibed rw---- ------
-org.tizen.mmc-syspopup syspopup::db rw---- ------
-org.tizen.mmc-syspopup power_manager -w---- ------
-org.tizen.mmc-syspopup xorg rw---- ------
-org.tizen.mmc-syspopup system::system_bklight -w---- ------
-org.tizen.mmc-syspopup system-server r-x--- ------
-org.tizen.mmc-syspopup deviced rwx--- ------
-org.tizen.mmc-syspopup display_wd r-x--- ------
-org.tizen.mmc-syspopup live-magazine::data --x--- ------
-org.tizen.mmc-syspopup sound_server rwxa-- ------
-org.tizen.mmc-syspopup dbus rwx--- ------
-org.tizen.mmc-syspopup devman -wx--- ------
-org.tizen.mmc-syspopup org.tizen.data-provider-master rw---- ------
-org.tizen.mmc-syspopup data-provider-master rw---- ------
-org.tizen.mmc-syspopup data-provider-master::share --x--- ------
-org.tizen.mmc-syspopup _ -wx--- ------
-org.tizen.mmc-syspopup stest-service -w---- ------
-org.tizen.mmc-syspopup tts-server rwx--- ------
-org.tizen.mmc-syspopup syslogd -w---- ------
-org.tizen.mmc-syspopup device::app_logging -w---- ------
-org.tizen.mmc-syspopup device::led r----- ------
-org.tizen.mmc-syspopup org.tizen.svoice rw---- ------
-org.tizen.mmc-syspopup org.tizen.voicerecorder rw---- ------
-org.tizen.mmc-syspopup system::vconf_setting rw---- ------
-org.tizen.mmc-syspopup system::vconf_system rw---- ------
-org.tizen.mmc-syspopup system::vconf_deviced rw---- ------
-org.tizen.mmc-syspopup deviced::display rw---- ------
-org.tizen.mmc-syspopup deviced::haptic rwx--- ------
-org.tizen.mmc-syspopup aul::launch r-x--- ------
-org.tizen.mmc-syspopup system-apps rw---- ------
-org.tizen.mmc-syspopup mdm-server::security r----- ------
-org.tizen.mmc-syspopup mdm-server::admin r----- ------
-org.tizen.mmc-syspopup mdm-server rw---- ------
-org.tizen.mmc-syspopup e17::notification rw---- ------
-stest-service org.tizen.mmc-syspopup r-x--- ------
-system-server org.tizen.mmc-syspopup -w---- ------
-deviced org.tizen.mmc-syspopup -w---- ------
-display_wd org.tizen.mmc-syspopup -w---- ------
-dbus org.tizen.mmc-syspopup -w---- ------
-pulseaudio org.tizen.mmc-syspopup -w---- ------
-org.tizen.app-tray org.tizen.mmc-syspopup r-x--- ------
-tts-server org.tizen.mmc-syspopup rw---- ------
-_ org.tizen.mmc-syspopup -w---- ------
-org.tizen.mmc-syspopup system::homedir rwxat- ------
-org.tizen.mmc-syspopup system::vconf rwxat- ------
-org.tizen.mmc-syspopup system::media rwxat- ------
-org.tizen.mmc-syspopup system::share rwxat- ------
-org.tizen.mmc-syspopup pulseaudio rwxat- ------
-e17 org.tizen.mmc-syspopup -w---- ------
-org.tizen.mmc-syspopup sys-assert::core rwxat- ------
-org.tizen.mmc-syspopup privacy-manager::db r----l ------
-org.tizen.mmc-syspopup pkgmgr::db r----l ------
-org.tizen.mmc-syspopup system::vconf_inhouse rw---- ------
-org.tizen.mmc-syspopup system::vconf_privacy rw---- ------
-org.tizen.mmc-syspopup system::vconf_multimedia rw---- ------
-org.tizen.mmc-syspopup system::vconf_network rw---- ------
-org.tizen.mmc-syspopup system::vconf_misc rw---- ------
-org.tizen.mmc-syspopup ecore::lock rwxat- ------
diff --git a/packaging/org.tizen.usb-syspopup.efl b/packaging/org.tizen.usb-syspopup.efl
deleted file mode 100644 (file)
index 7829be2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-usb-syspopup device::app_logging -w---- ------
-usb-syspopup system::use_internet r----- ------
-usb-syspopup xorg rw---- ------
-usb-syspopup isf r-x--- ------
-usb-syspopup ail::db rw---- ------
-usb-syspopup sound_server rw---- ------
-usb-syspopup dbus rwx--- ------
-usb-syspopup org.tizen.add-viewer r-x--- ------
-usb-syspopup usb-server -w---- ------
-usb-syspopup syspopup::db rw---- ------
-usb-syspopup cbhm r----- ------
-usb-syspopup mobileprint --x--- ------
-usb-syspopup wrt_launchpad_daemon r----- ------
-usb-syspopup system::vconf_setting rw---- ------
-usb-syspopup system::vconf_system rw---- ------
-usb-syspopup system::vconf_deviced rw---- ------
-usb-syspopup system::vconf_network r----- ------
-usb-syspopup deviced::display rw---- ------
-usb-syspopup system-apps rw---- ------
-usb-syspopup org.tizen.system-syspopup r-x--- ------
-org.tizen.app-tray usb-syspopup r-x--- ------
-usb-syspopup system::homedir rwxat- ------
-usb-syspopup system::vconf rwxat- ------
-usb-syspopup system::media rwxat- ------
-usb-syspopup system::share rwxat- ------
-usb-syspopup pulseaudio rwxat- ------
-e17 usb-syspopup -w---- ------
-usb-syspopup sys-assert::core rwxat- ------
-usb-syspopup privacy-manager::db r----l ------
-usb-syspopup pkgmgr::db r----l ------
-usb-syspopup system::vconf_inhouse rw---- ------
-usb-syspopup system::vconf_privacy rw---- ------
-usb-syspopup system::vconf_multimedia rw---- ------
-usb-syspopup system::vconf_network rw---- ------
-usb-syspopup system::vconf_misc rw---- ------
-usb-syspopup device::sys_logging -w---- ------
-usb-syspopup org.tizen.w-idle-clock-weather2 rwx--- ------
-usb-syspopup org.tizen.idle-clock-pedometer rwx--- ------
-usb-syspopup org.tizen.w-idle-clock-shortcut2 rwx--- ------
-usb-syspopup org.tizen.idle-clock-event rwx--- ------
-usb-syspopup org.tizen.idle-clock-dual rwx--- ------
-usb-syspopup org.tizen.w-idle-clock-analog3 rwx--- ------
-usb-syspopup org.tizen.w-idle-clock-analog1 rwx--- ------
-usb-syspopup org.tizen.idle-clock-digital rwx--- ------
-usb-syspopup org.tizen.w-idle-clock-analog2 rwx--- ------
-usb-syspopup e17::notification rw--- -----
diff --git a/packaging/org.tizen.usbotg-syspopup.efl b/packaging/org.tizen.usbotg-syspopup.efl
deleted file mode 100644 (file)
index 67a8363..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-usbotg-syspopup device::app_logging -w---- ------
-usbotg-syspopup system::use_internet r----- ------
-usbotg-syspopup syspopup::db rw---- ------
-usbotg-syspopup xorg rw---- ------
-usbotg-syspopup sound_server rw---- ------
-usbotg-syspopup power_manager -w---- ------
-usbotg-syspopup deviced -w---- ------
-usbotg-syspopup isf r-x--- ------
-usbotg-syspopup ail::db rw---- ------
-usbotg-syspopup dbus rwx--- ------
-usbotg-syspopup org.tizen.add-viewer r-x--- ------
-usbotg-syspopup cbhm r----- ------
-usbotg-syspopup mobileprint --x--- ------
-usbotg-syspopup wrt_launchpad_daemon r----- ------
-usbotg-syspopup system::vconf_setting rw---- ------
-usbotg-syspopup system::vconf_system rw---- ------
-usbotg-syspopup system::vconf_deviced rw---- ------
-usbotg-syspopup aul::launch r-x--- ------
-usbotg-syspopup deviced::display rw---- ------
-usbotg-syspopup system-apps rw---- ------
-usbotg-syspopup org.tizen.system-syspopup r-x--- ------
-org.tizen.app-tray usbotg-syspopup r-x--- ------
-usbotg-syspopup system::homedir rwxat- ------
-usbotg-syspopup system::vconf rwxat- ------
-usbotg-syspopup system::media rwxat- ------
-usbotg-syspopup system::share rwxat- ------
-usbotg-syspopup pulseaudio rwxat- ------
-e17 usbotg-syspopup -w---- ------
-usbotg-syspopup sys-assert::core rwxat- ------
-usbotg-syspopup privacy-manager::db r----l ------
-usbotg-syspopup pkgmgr::db r----l ------
-usbotg-syspopup system::vconf_inhouse rw---- ------
-usbotg-syspopup system::vconf_privacy rw---- ------
-usbotg-syspopup system::vconf_multimedia rw---- ------
-usbotg-syspopup system::vconf_network rw---- ------
-usbotg-syspopup system::vconf_misc rw---- ------
-usbotg-syspopup device::sys_logging -w---- ------
-usbotg-syspopup org.tizen.w-idle-clock-weather2 rwx--- ------
-usbotg-syspopup org.tizen.idle-clock-pedometer rwx--- ------
-usbotg-syspopup org.tizen.w-idle-clock-shortcut2 rwx--- ------
-usbotg-syspopup org.tizen.idle-clock-event rwx--- ------
-usbotg-syspopup org.tizen.idle-clock-dual rwx--- ------
-usbotg-syspopup org.tizen.w-idle-clock-analog3 rwx--- ------
-usbotg-syspopup org.tizen.w-idle-clock-analog1 rwx--- ------
-usbotg-syspopup org.tizen.idle-clock-digital rwx--- ------
-usbotg-syspopup org.tizen.w-idle-clock-analog2 rwx--- ------
-usbotg-syspopup e17::notification rw--- -----
index cb4f5c7..69d406f 100644 (file)
@@ -3,9 +3,8 @@
         <domain name="system-apps"/>
     </define>
        <assign>
-               <filesystem path="/usr/bin/popup-launcher" label="_" exec_label="none" />
-               <filesystem path="/usr/bin/sys_device_noti" label="_" exec_label="none" />
-               <filesystem path="/usr/bin/systemfw-app-test" label="_" exec_label="none" />
+               <filesystem path="/usr/bin/popup-launcher" label="_" exec_label="system-apps" />
+               <filesystem path="/usr/share/dbus-1/system-services/org.tizen.system.popup.service" label="_" exec_label="none" />
        </assign>
     <request>
         <domain name="system-apps"/>
index 0c9686f..01e4a24 100755 (executable)
@@ -1,31 +1,78 @@
-#sbs-git:slp/pkgs/s/system-popup system-popup 0.1.7 c9f24c4ffe1f2306a5ad3ffef4074e6f65bff6a3
+
+%define PROFILE none
+#Main applications
+%define poweroff_popup off
+%define crash_popup off
+%define system_popup off
+%define signal_sender off
+%define system_servant off
+%define notification_service off
+%define usbhost_list_app off
+
+#sub-popups of system-popup
+%define battery_popup off
+%define cooldown_popup off
+%define datausage_popup off
+%define mmc_popup off
+%define ode_popup off
+%define recovery_popup off
+%define storage_popup off
+%define usb_popup off
+%define watchdog_popup off
+
+%if "%{?tizen_profile_name}" == "mobile"
+%define PROFILE mobile
+#Main applicaitons
+%define poweroff_popup on
+%define crash_popup on
+%define system_popup on
+%define signal_sender on
+%define system_servant on
+%define notification_service on
+%define usbhost_list_app on
+#sub-popups of system-popup
+%define battery_popup on
+%define cooldown_popup on
+%define datausage_popup on
+%define mmc_popup on
+%define storage_popup on
+%define usb_popup on
+%define watchdog_popup on
+%endif
+
+%if "%{?tizen_profile_name}" == "wearable"
+%define PROFILE wearable
+#Main applicaitons
+%define poweroff_popup on
+%define crash_popup on
+%define system_popup on
+%define system_servant on
+#sub-popups of system-popup
+%define battery_popup on
+%define cooldown_popup on
+%define storage_popup on
+%define watchdog_popup on
+%endif
+
+%if "%{?tizen_profile_name}" == "tv"
+%define PROFILE tv
+#Main applications
+%define crash_popup on
+%endif
+
 Name:       system-popup
-Summary:    system-popup application (poweroff popup,sysevent-alert)
+Summary:    system-popup application
 Version:    0.1.31
 Release:    1
-VCS:        magnolia/framework/system/system-popup#submit/master/20130425.080357-328-g0cfacbaf9ebfb672f3c4b76263635c18e19a3b67
 Group:      Framework/system
 License:    Apache-2.0
 Source0:    system-popup-%{version}.tar.gz
 Source1:    system-apps.manifest
 Source1001:    org.tizen.poweroff-syspopup.manifest
-Source1003:    org.tizen.lowmem-syspopup.manifest
-Source1005:    org.tizen.lowbat-syspopup.manifest
 Source1015:    org.tizen.crash-popup.manifest
-Source1007:    org.tizen.mmc-syspopup.manifest
-Source1008:    org.tizen.mmc-syspopup.efl
-Source1009:    org.tizen.usb-syspopup.manifest
-Source1010:    org.tizen.usb-syspopup.efl
-Source1011:    org.tizen.usbotg-syspopup.manifest
-Source1012:    org.tizen.usbotg-syspopup.efl
-Source1013:    org.tizen.datausage-syspopup.manifest
-Source1014:    org.tizen.datausage-syspopup.efl
 Source2001:    org.tizen.system-syspopup.manifest
-Source2002:    org.tizen.system-syspopup.efl
 Source2003:    org.tizen.system-signal-sender.manifest
-Source2004:    org.tizen.system-signal-sender.efl
 Source2005:    org.tizen.host-devices.manifest
-Source2006:    org.tizen.host-devices.efl
 
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(ecore-input)
@@ -39,7 +86,7 @@ BuildRequires:  pkgconfig(edbus)
 BuildRequires:  pkgconfig(syspopup)
 BuildRequires:  pkgconfig(syspopup-caller)
 BuildRequires:  pkgconfig(feedback)
-BuildRequires:  pkgconfig(efl-assist)
+BuildRequires:  pkgconfig(efl-extension)
 BuildRequires:  pkgconfig(capi-media-sound-manager)
 BuildRequires:  pkgconfig(capi-media-wav-player)
 BuildRequires:  pkgconfig(utilX)
@@ -48,7 +95,7 @@ BuildRequires:  pkgconfig(notification)
 BuildRequires:  pkgconfig(appsvc)
 BuildRequires:  pkgconfig(tts)
 BuildRequires:  pkgconfig(ui-gadget-1)
-BuildRequires:  model-build-features
+BuildRequires:  pkgconfig(bundle)
 BuildRequires:  cmake
 BuildRequires:  edje-bin
 BuildRequires:  gettext-devel
@@ -58,30 +105,49 @@ Requires(post): /usr/bin/vconftool
 %description
 system-popup application (poweroff popup,sysevent-alert).
 
-%package -n org.tizen.lowbat-syspopup
-Summary:    system-popup application (lowbat popup)
+%if %{?crash_popup} == on
+%package -n org.tizen.crash-popup
+Summary:    system popup application (crash system popup)
 Group:      main
 Requires:   %{name} = %{version}-%{release}
 
-%description -n org.tizen.lowbat-syspopup
-system-popup application (lowbat popup).
+%description -n org.tizen.crash-popup
+system popup application (crash system popup)
+%endif
 
-%package -n org.tizen.lowmem-syspopup
-Summary:    system-popup application (lowmem popup)
+%if %{?poweroff_popup} == on
+%package -n org.tizen.poweroff-syspopup
+Summary:    poweroff-popup application
 Group:      main
 Requires:   %{name} = %{version}-%{release}
 
-%description -n org.tizen.lowmem-syspopup
-system-popup application (lowmem popup).
+%description -n org.tizen.poweroff-syspopup
+poweroff-popup application.
+%endif
 
-%package -n org.tizen.crash-popup
-Summary:    system popup application (crash system popup)
+%if %{?signal_sender} == on
+%package -n org.tizen.system-signal-sender
+Summary:    system FW signal sender
 Group:      main
 Requires:   %{name} = %{version}-%{release}
 
-%description -n org.tizen.crash-popup
-system popup application (crash system popup)
+%description -n org.tizen.system-signal-sender
+system FW signal sender
+%endif
+
+%if %{?usbhost_list_app} == on
+%package -n org.tizen.host-devices
+Summary:    Show usb host device list
+Group:      main
+Requires:   %{name} = %{version}-%{release}
+
+%description -n org.tizen.host-devices
+Show usb host device list
+%endif
+
 
+
+%if %{?system_popup} == on
 %package -n org.tizen.system-syspopup
 Summary:    system popup application
 Group:      main
@@ -90,16 +156,27 @@ Requires:   %{name} = %{version}-%{release}
 %description -n org.tizen.system-syspopup
 system popup application
 
-%if "%{?tizen_profile_name}" == "mobile"
+%if %{?battery_popup} == on
+%package -n org.tizen.lowbat-syspopup
+Summary:    system-popup application (lowbat popup)
+Group:      main
+Requires:   %{name} = %{version}-%{release}
 
-%package -n org.tizen.poweroff-syspopup
-Summary:    poweroff-popup application
+%description -n org.tizen.lowbat-syspopup
+system-popup application (lowbat popup).
+%endif
+
+%if %{?storage_popup} == on
+%package -n org.tizen.lowmem-syspopup
+Summary:    system-popup application (lowmem popup)
 Group:      main
 Requires:   %{name} = %{version}-%{release}
 
-%description -n org.tizen.poweroff-syspopup
-poweroff-popup application.
+%description -n org.tizen.lowmem-syspopup
+system-popup application (lowmem popup).
+%endif
 
+%if %{?mmc_popup} == on
 %package -n org.tizen.mmc-syspopup
 Summary:    system-popup application (mmc  popup)
 Group:      main
@@ -107,7 +184,9 @@ Requires:   %{name} = %{version}-%{release}
 
 %description -n org.tizen.mmc-syspopup
 system-popup application (mmc  popup).
+%endif
 
+%if %{?usb_popup} == on
 %package -n org.tizen.usb-syspopup
 Summary:    system-popup application (usb popup)
 Group:      main
@@ -123,7 +202,9 @@ Requires:   %{name} = %{version}-%{release}
 
 %description -n org.tizen.usbotg-syspopup
 system-popup application (usb otg popup).
+%endif
 
+%if %{?datausage_popup} == on
 %package -n org.tizen.datausage-syspopup
 Summary:    system popup application (data usage popup)
 Group:      main
@@ -131,25 +212,10 @@ Requires:   %{name} = %{version}-%{release}
 
 %description -n org.tizen.datausage-syspopup
 system popup application (data usage popup)
-
-%package -n org.tizen.system-signal-sender
-Summary:    system FW signal sender
-Group:      main
-Requires:   %{name} = %{version}-%{release}
-
-%description -n org.tizen.system-signal-sender
-system FW signal sender
-
-%package -n org.tizen.host-devices
-Summary:    Show usb host device list
-Group:      main
-Requires:   %{name} = %{version}-%{release}
-
-%description -n org.tizen.host-devices
-Show usb host device list
-
 %endif
 
+%endif # system_popup
+
 %prep
 %setup -q
 
@@ -161,78 +227,66 @@ Show usb host device list
 
 %build
 
-%if 0%{?tizen_build_binary_release_type_eng}
-export CFLAGS+=" -DTIZEN_ENGINEER_MODE"
-%endif
-
-%if "%{?tizen_profile_name}" == "wearable"
-export CFLAGS+=" -DSYSTEM_APPS_MICRO"
-export CFLAGS+=" -DSYSTEM_APPS_MICRO_3"
-%endif
-
-%if "%{?tizen_profile_name}" == "mobile"
-export CFLAGS+=" -DSYSTEM_APPS_LITE"
-%endif
+cp %{SOURCE1} .
 
-%if "%{?model_build_feature_formfactor}" == "rectangle"
-export CFLAGS+=" -DSYSTEM_APPS_RECTANGLE"
+%if %{poweroff_popup} == on
+cp %{SOURCE1001} .
 %endif
 
-%if "%{?model_build_feature_formfactor}" == "circle"
-export CFLAGS+=" -DSYSTEM_APPS_CIRCLE"
+%if %{crash_popup} == on
+cp %{SOURCE1015} .
 %endif
 
-
-cp %{SOURCE1} .
-cp %{SOURCE1003} .
-cp %{SOURCE1005} .
-cp %{SOURCE1015} .
+%if %{system_popup} == on
 cp %{SOURCE2001} .
-
-
-%if "%{?tizen_profile_name}" == "wearable"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSTEM_APPS_MICRO=yes -DSIMULATOR=%{simulator_state}
 %endif
 
-%if "%{?tizen_profile_name}" == "mobile"
-cp %{SOURCE1001} .
-cp %{SOURCE1007} .
-cp %{SOURCE1008} .
-cp %{SOURCE1009} .
-cp %{SOURCE1010} .
-cp %{SOURCE1011} .
-cp %{SOURCE1012} .
-cp %{SOURCE1013} .
-cp %{SOURCE1014} .
-cp %{SOURCE2002} .
+%if %{signal_sender} == on
 cp %{SOURCE2003} .
-cp %{SOURCE2004} .
-cp %{SOURCE2005} .
-cp %{SOURCE2006} .
+%endif
 
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSTEM_APPS_MICRO=no  -DSIMULATOR=%{simulator_state}
+%if %{usbhost_list_app} == on
+cp %{SOURCE2005} .
 %endif
 
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSIMULATOR=%{simulator_state} \
+               -DPROFILE=%{PROFILE} \
+               -DPOWEROFF_POPUP=%{poweroff_popup} \
+               -DCRASH_POPUP=%{crash_popup} \
+               -DSYSTEM_POPUP=%{system_popup} \
+               -DSIGNAL_SENDER=%{signal_sender} \
+               -DSYSTEM_SERVANT=%{system_servant} \
+               -DNOTIFICATION_SERVICE=%{notification_service} \
+               -DUSBHOST_LIST_APP=%{usbhost_list_app} \
+               -DBATTERY_POPUP=%{battery_popup} \
+               -DCOOLDOWN_POPUP=%{cooldown_popup} \
+               -DDATAUSAGE_POPUP=%{datausage_popup} \
+               -DMMC_POPUP=%{mmc_popup} \
+               -DODE_POPUP=%{ode_popup} \
+               -DRECOVERY_POPUP=%{recovery_popup} \
+               -DSTORAGE_POPUP=%{storage_popup} \
+               -DUSB_POPUP=%{usb_popup} \
+               -DWATCHDOG_POPUP=%{watchdog_popup}
+
 make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
 %make_install
 
-
 mkdir -p %{buildroot}/usr/share/license
 
-%if "%{?tizen_profile_name}" == "wearable"
-%post
-vconftool set -t bool db/private/mobiledata/on_popup/check 0 -u 5000 -s system::vconf_system
-vconftool set -t bool db/private/mobiledata/off_popup/check 0 -u 5000 -s system::vconf_system
-%endif
-
 
 %files
 %manifest system-apps.manifest
-%defattr(-,root,root,-)
-%if "%{?tizen_profile_name}" == "mobile"
+%defattr(-,system,system,-)
+%{_datadir}/locale/*/LC_MESSAGES/*.mo
+%{_bindir}/popup-launcher
+%{_datadir}/license/system-popup
+/usr/share/dbus-1/system-services/org.tizen.system.popup.service
+/etc/smack/accesses.d/system-apps.efl
+
+%if %{notification_service} == on
 %{_datadir}/system-apps/res/icons/batt_full_icon.png
 %{_datadir}/system-apps/res/icons/batt_full_indicator.png
 /usr/share/system-apps/res/icons/datausage_warning.png
@@ -243,42 +297,13 @@ vconftool set -t bool db/private/mobiledata/off_popup/check 0 -u 5000 -s system:
 /usr/share/system-apps/res/icons/sdcard_decryption_error.png
 /usr/share/system-apps/res/icons/tima.png
 /usr/share/system-apps/res/icons/usb.png
-%{_bindir}/systemfw-app-test
-%endif
-%{_bindir}/sys_device_noti
-%{_datadir}/locale/*/LC_MESSAGES/*.mo
-%{_bindir}/popup-launcher
-%{_bindir}/system-servant
-%{_datadir}/license/system-popup
-/usr/share/dbus-1/services/org.tizen.system.popup.service
-/etc/smack/accesses.d/system-apps.efl
-
-%files -n org.tizen.lowbat-syspopup
-%manifest org.tizen.lowbat-syspopup.manifest
-%defattr(-,root,root,-)
-/usr/apps/org.tizen.lowbat-syspopup/bin/lowbatt-popup
-/usr/share/packages/org.tizen.lowbat-syspopup.xml
-/usr/share/license/org.tizen.lowbatt-syspopup
-/etc/smack/accesses.d/org.tizen.lowbat-syspopup.efl
-/usr/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt/lowbatt.edj
-%if "%{?tizen_profile_name}" == "wearable"
-/usr/apps/org.tizen.lowbat-syspopup/res/table/system-color.xml
-/usr/apps/org.tizen.lowbat-syspopup/res/table/system-font.xml
 %endif
 
-%files -n org.tizen.lowmem-syspopup
-%manifest org.tizen.lowmem-syspopup.manifest
-%defattr(-,root,root,-)
-/usr/apps/org.tizen.lowmem-syspopup/bin/lowmem-popup
-/usr/share/packages/org.tizen.lowmem-syspopup.xml
-/usr/share/license/org.tizen.lowmem-syspopup
-/etc/smack/accesses.d/org.tizen.lowmem-syspopup.efl
-/usr/apps/org.tizen.lowmem-syspopup/res/edje/lowmem/lowmem.edj
-%if "%{?tizen_profile_name}" == "wearable"
-/usr/apps/org.tizen.lowmem-syspopup/res/table/system-color.xml
-/usr/apps/org.tizen.lowmem-syspopup/res/table/system-font.xml
+%if %{system_servant} == on
+%{_bindir}/system-servant
 %endif
 
+%if %{crash_popup} == on
 %files -n org.tizen.crash-popup
 %manifest org.tizen.crash-popup.manifest
 %defattr(-,root,root,-)
@@ -286,26 +311,37 @@ vconftool set -t bool db/private/mobiledata/off_popup/check 0 -u 5000 -s system:
 /usr/share/packages/org.tizen.crash-popup.xml
 /usr/share/license/org.tizen.crash-popup
 /etc/smack/accesses.d/org.tizen.crash-popup.efl
-%if "%{?tizen_profile_name}" == "wearable"
-/usr/apps/org.tizen.crash-popup/res/table/system-color.xml
-/usr/apps/org.tizen.crash-popup/res/table/system-font.xml
 %endif
-/usr/apps/org.tizen.crash-popup/res/edje/crash/crash.edj
 
+%if %{system_popup} == on
 %files -n org.tizen.system-syspopup
 %manifest org.tizen.system-syspopup.manifest
 %defattr(-,root,root,-)
 /usr/apps/org.tizen.system-syspopup/bin/system-syspopup
-/usr/apps/org.tizen.system-syspopup/res/edje/system/system.edj
 /usr/share/packages/org.tizen.system-syspopup.xml
 /usr/share/license/org.tizen.system-syspopup
 /etc/smack/accesses.d/org.tizen.system-syspopup.efl
-%if "%{?tizen_profile_name}" == "wearable"
-/usr/apps/org.tizen.system-syspopup/res/table/system-color.xml
-/usr/apps/org.tizen.system-syspopup/res/table/system-font.xml
+
+%if %{battery_popup} == on
+%files -n org.tizen.lowbat-syspopup
+%endif
+%if %{storage_popup} == on
+%files -n org.tizen.lowmem-syspopup
+%endif
+%if %{mmc_popup} == on
+%files -n org.tizen.mmc-syspopup
+%endif
+%if %{usb_popup} == on
+%files -n org.tizen.usb-syspopup
+%files -n org.tizen.usbotg-syspopup
+%endif
+%if %{datausage_popup} == on
+%files -n org.tizen.datausage-syspopup
 %endif
 
-%if "%{?tizen_profile_name}" == "mobile"
+%endif # system_popup
+
+%if %{poweroff_popup} == on
 %files -n org.tizen.poweroff-syspopup
 %manifest org.tizen.poweroff-syspopup.manifest
 %defattr(-,root,root,-)
@@ -313,41 +349,9 @@ vconftool set -t bool db/private/mobiledata/off_popup/check 0 -u 5000 -s system:
 /usr/share/packages/org.tizen.poweroff-syspopup.xml
 /usr/share/license/org.tizen.poweroff-syspopup
 /etc/smack/accesses.d/org.tizen.poweroff-syspopup.efl
+%endif
 
-%files -n org.tizen.mmc-syspopup
-%manifest org.tizen.mmc-syspopup.manifest
-%defattr(-,root,root,-)
-/usr/apps/org.tizen.mmc-syspopup/bin/mmc-popup
-/usr/share/packages/org.tizen.mmc-syspopup.xml
-/usr/share/license/org.tizen.mmc-syspopup
-/etc/smack/accesses.d/org.tizen.mmc-syspopup.efl
-
-%files -n org.tizen.usb-syspopup
-%manifest org.tizen.usb-syspopup.manifest
-%defattr(-,root,root,-)
-/usr/apps/org.tizen.usb-syspopup/bin/usb-syspopup
-/usr/share/packages/org.tizen.usb-syspopup.xml
-/usr/share/license/org.tizen.usb-syspopup
-/usr/apps/org.tizen.usb-syspopup/res/icons/usb_icon.png
-/etc/smack/accesses.d/org.tizen.usb-syspopup.efl
-
-%files -n org.tizen.usbotg-syspopup
-%manifest org.tizen.usbotg-syspopup.manifest
-%defattr(-,root,root,-)
-/usr/apps/org.tizen.usbotg-syspopup/bin/usbotg-syspopup
-/usr/share/packages/org.tizen.usbotg-syspopup.xml
-/usr/share/license/org.tizen.usbotg-syspopup
-/usr/apps/org.tizen.usbotg-syspopup/res/icons/usb_icon.png
-/etc/smack/accesses.d/org.tizen.usbotg-syspopup.efl
-
-%files -n org.tizen.datausage-syspopup
-%manifest org.tizen.datausage-syspopup.manifest
-%defattr(-,root,root,-)
-/usr/apps/org.tizen.datausage-syspopup/bin/datausage-popup
-/usr/share/packages/org.tizen.datausage-syspopup.xml
-/usr/share/license/org.tizen.datausage-syspopup
-/etc/smack/accesses.d/org.tizen.datausage-syspopup.efl
-
+%if %{signal_sender} == on
 %files -n org.tizen.system-signal-sender
 %manifest org.tizen.system-signal-sender.manifest
 %defattr(-,root,root,-)
@@ -355,7 +359,9 @@ vconftool set -t bool db/private/mobiledata/off_popup/check 0 -u 5000 -s system:
 /usr/share/packages/org.tizen.system-signal-sender.xml
 /usr/share/license/org.tizen.system-signal-sender
 /etc/smack/accesses.d/org.tizen.system-signal-sender.efl
+%endif
 
+%if %{usbhost_list_app} == on
 %files -n org.tizen.host-devices
 %manifest org.tizen.host-devices.manifest
 %defattr(-,root,root,-)
@@ -364,5 +370,4 @@ vconftool set -t bool db/private/mobiledata/off_popup/check 0 -u 5000 -s system:
 /usr/share/packages/org.tizen.host-devices.xml
 /usr/share/license/org.tizen.host-devices
 /etc/smack/accesses.d/org.tizen.host-devices.efl
-
 %endif
index 0b74a8f..24985ba 100644 (file)
@@ -1,6 +1,6 @@
 # for i18n
 
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
+IF(PROFILE_WEARABLE)
 ADD_SUBDIRECTORY(micro-src)
 ELSE()
 ADD_SUBDIRECTORY(src)
index fd1a0b6..9e0a927 100755 (executable)
@@ -313,6 +313,9 @@ msgstr "Díchriptigh an cárta SD"
 msgid "IDS_ST_BUTTON_ENABLE_ABB"
 msgstr "Cumasaigh"
 
+msgid "IDS_TPLATFORM_BODY_POWER_OFF_THE_DEVICE_Q"
+msgstr "Cas cumhacht an gléis as?"
+
 msgid "IDS_SIM_POP_DISABLE_FLIGHT_MODE_Q"
 msgstr "Díchumasaigh mód Eitilte?"
 
@@ -346,6 +349,9 @@ msgstr "Díchumasaigh Mód éigeandála"
 msgid "IDS_CST_OPT_WAIT"
 msgstr "Fan"
 
+msgid "IDS_PH_HEADER_ERROR_ABB"
+msgstr "Earráid"
+
 msgid "IDS_ST_BODY_USB_STORAGE_ABB"
 msgstr "Stóras USB"
 
diff --git a/popup-launcher/CMakeLists.txt b/popup-launcher/CMakeLists.txt
deleted file mode 100755 (executable)
index 21c0c44..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ADD_SUBDIRECTORY(micro-src)
-ELSE()
-ADD_SUBDIRECTORY(src)
-ENDIF()
diff --git a/popup-launcher/micro-src/CMakeLists.txt b/popup-launcher/micro-src/CMakeLists.txt
deleted file mode 100755 (executable)
index fb76352..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/popup-launcher/micro-src/launcher.c
-                ${CMAKE_SOURCE_DIR}/popup-launcher/micro-src/popup.c
-                ${CMAKE_SOURCE_DIR}/popup-launcher/micro-src/app.c
-)
-
-SET(APPNAME "popup-launcher")
-SET(SYSTEM_APPS "system-apps")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/popup-launcher/micro-src)
-
-SET(PKG_MODULES ${PKG_MODULES}
-               edbus
-               dlog
-               ecore
-               feedback
-               syspopup-caller
-)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(launcher_pkgs REQUIRED ${PKG_MODULES})
-
-FOREACH(flag ${launcher_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Wall")
-
-ADD_DEFINITIONS("-DAPPNAME=\"${APPNAME}\"")
-
-ADD_EXECUTABLE(${APPNAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${APPNAME} ${launcher_pkgs_LDFLAGS} "-ldl")
-
-INSTALL(TARGETS ${APPNAME} DESTINATION bin)
-
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${APPNAME}/micro-src/org.tizen.system.popup.service DESTINATION /usr/share/dbus-1/services)
-
-# instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${APPNAME}/micro-src/system-apps.efl DESTINATION /etc/smack/accesses.d)
diff --git a/popup-launcher/micro-src/app.c b/popup-launcher/micro-src/app.c
deleted file mode 100755 (executable)
index 33ec761..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * popup-launcher
- *
- * Copyright (c) 2013 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 <unistd.h>
-#include "launcher.h"
-
-static int launch_app_raw(char *path, char **argv)
-{
-       pid_t pid;
-       int ret;
-
-       if (!path || access(path, X_OK) != 0) {
-               _E("Cannot execute (%s)", path);
-               return -EINVAL;
-       }
-
-       pid = fork();
-       if (pid < 0) {
-               _E("Failed to fork (%d)", errno);
-               return -errno;
-       }
-
-       if (pid > 0) { /* Parent */
-               return pid;
-       }
-
-       /* Child */
-       ret = execvp(path, argv);
-
-       /* Failed */
-       _E("Failed execvp(ret: %d, errno: %d)", ret, errno);
-       return -errno;
-}
-
-DBusMessage *launch_system_servant_app(E_DBus_Object *obj,
-                               DBusMessage *msg, char **argv)
-{
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       int ret;
-
-       if (!argv) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch app raw(%s)", argv[0]);
-
-       ret = launch_app_raw(argv[0], argv);
-       if (ret < 0)
-               _E("FAIL: launch_app_raw: %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
diff --git a/popup-launcher/micro-src/launcher.c b/popup-launcher/micro-src/launcher.c
deleted file mode 100755 (executable)
index 0f00f72..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * popup-launcher
- *
- * Copyright (c) 2013 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 "launcher.h"
-#include <feedback.h>
-
-#define TERMINATE_TIMEOUT  5
-
-static E_DBus_Connection *edbus_conn;
-static DBusPendingCall *edbus_request_name;
-static Ecore_Timer *term_timer = NULL;
-
-static Eina_Bool exit_idler_cb(void *data)
-{
-       e_dbus_connection_close(edbus_conn);
-       e_dbus_shutdown();
-
-       ecore_main_loop_quit();
-       return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool terminate_launcher(void *data)
-{
-       if (term_timer)
-               ecore_timer_del(term_timer);
-
-       if (ecore_idler_add(exit_idler_cb, NULL))
-               return ECORE_CALLBACK_CANCEL;
-
-       exit_idler_cb(NULL);
-       return ECORE_CALLBACK_CANCEL;
-}
-
-static void set_timer_to_terminate(void)
-{
-       if (term_timer)
-               ecore_timer_reset(term_timer);
-       else {
-               term_timer = ecore_timer_add(TERMINATE_TIMEOUT, terminate_launcher, NULL);
-               if (!term_timer)
-                       terminate_launcher(NULL);
-       }
-}
-
-/* Poweroff popup */
-static DBusMessage *edbus_poweroff_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_no_param(obj, msg, POWEROFF_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_poweroff_methods[] = {
-       { "PopupLaunch" ,   NULL,  "i", edbus_poweroff_popup      },
-       /* Add methods here */
-};
-
-/* Lowbat popup */
-static DBusMessage *edbus_lowbat_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, LOWBAT_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_lowbat_methods[] = {
-       { "PopupLaunch" ,   "ss",  "i", edbus_lowbat_popup      },
-       /* Add methods here */
-};
-
-/* Lowmem popup */
-static DBusMessage *edbus_lowmem_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, LOWMEM_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_lowmem_methods[] = {
-       { "PopupLaunch" ,   "ss",  "i", edbus_lowmem_popup      },
-       /* Add methods here */
-};
-
-/* Crash popup */
-static DBusMessage *edbus_crash_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, CRASH_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_crash_methods[] = {
-       { "PopupLaunch"  ,     "ssss",  "i", edbus_crash_popup    },
-       /* Add methods here */
-};
-
-/* Battery notifications */
-static DBusMessage *play_notification(E_DBus_Object *obj, DBusMessage *msg, int type)
-{
-       char param[2];
-       char *args[3];
-
-       args[0] = SERVANT_APP_NAME;
-       snprintf(param, sizeof(param), "%d", type);
-       args[1] = param;
-       args[2] = NULL;
-
-       return launch_system_servant_app(obj, msg, args);
-}
-
-static DBusMessage *edbus_battery_full_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       int ret = 0;
-
-       set_timer_to_terminate();
-       /* Do nothing */
-
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-       return reply;
-}
-
-static DBusMessage *edbus_battery_charge_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return play_notification(obj, msg, CHARGER_CONNECTION);
-}
-
-static DBusMessage *edbus_battery_low_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_battery_methods[] = {
-       { "BatteryFullNotiOn"   ,   NULL,  "i", edbus_battery_full_noti_on         },
-       { "BatteryChargeNotiOn" ,   NULL,  "i", edbus_battery_charge_noti_on       },
-       { "BatteryLow"          ,   "ss",  "i", edbus_battery_low_popup            },
-       /* Add methods here */
-};
-
-/* Other popups */
-static DBusMessage *edbus_cooldown_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_watchdog_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_datausage_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_system_methods[] = {
-       { "CooldownPopupLaunch"   ,   "ss",  "i", edbus_cooldown_popup            },
-       { "WatchdogPopupLaunch"   , "ssss",  "i", edbus_watchdog_popup            },
-       { "DatausagePopupLaunch"  , "ssss",  "i", edbus_datausage_popup           },
-       /* Add methods here */
-};
-
-/* Servant application */
-static DBusMessage *load_system_servant(E_DBus_Object *obj, DBusMessage *msg, int type)
-{
-       char param[2];
-       char *args[3];
-
-       set_timer_to_terminate();
-
-       args[0] = SERVANT_APP_NAME;
-       snprintf(param, sizeof(param), "%d", type);
-       args[1] = param;
-       args[2] = NULL;
-       return launch_system_servant_app(obj, msg, args);
-}
-
-static DBusMessage *edbus_tts_screen_off(E_DBus_Object *obj, DBusMessage *msg)
-{
-       return load_system_servant(obj, msg, TTS_SCREENOFF);
-}
-
-static DBusMessage *edbus_tts_enabled(E_DBus_Object *obj, DBusMessage *msg)
-{
-       return load_system_servant(obj, msg, TTS_ENABLED);
-}
-
-static DBusMessage *edbus_tts_disabled(E_DBus_Object *obj, DBusMessage *msg)
-{
-       return load_system_servant(obj, msg, TTS_DISABLED);
-}
-
-static const struct edbus_method
-edbus_servant_methods[] = {
-       { "ScreenOffTts"       ,   NULL,  "i", edbus_tts_screen_off       },
-       { "TtsEnabled"         ,   NULL,  "i", edbus_tts_enabled          },
-       { "TtsDisabled"        ,   NULL,  "i", edbus_tts_disabled         },
-       /* Add methods here */
-};
-
-static struct edbus_object
-edbus_objects[]= {
-       { POPUP_PATH_POWEROFF    , POPUP_IFACE_POWEROFF    , NULL, NULL,
-               edbus_poweroff_methods   , ARRAY_SIZE(edbus_poweroff_methods)  },
-       { POPUP_PATH_LOWBAT      , POPUP_IFACE_LOWBAT      , NULL, NULL,
-               edbus_lowbat_methods     , ARRAY_SIZE(edbus_lowbat_methods)    },
-       { POPUP_PATH_LOWMEM      , POPUP_IFACE_LOWMEM      , NULL, NULL,
-               edbus_lowmem_methods     , ARRAY_SIZE(edbus_lowmem_methods)    },
-       { POPUP_PATH_CRASH       , POPUP_IFACE_CRASH       , NULL, NULL,
-               edbus_crash_methods      , ARRAY_SIZE(edbus_crash_methods)     },
-       { POPUP_PATH_BATTERY     , POPUP_IFACE_BATTERY     , NULL, NULL,
-               edbus_battery_methods    , ARRAY_SIZE(edbus_battery_methods)   },
-       { POPUP_PATH_SYSTEM      , POPUP_IFACE_SYSTEM      , NULL, NULL,
-               edbus_system_methods     , ARRAY_SIZE(edbus_system_methods)    },
-       { POPUP_PATH_SERVANT     , POPUP_IFACE_SERVANT     , NULL, NULL,
-               edbus_servant_methods    , ARRAY_SIZE(edbus_servant_methods)   },
-       /* Add new object & interface here*/
-};
-
-static int init_methods(void)
-{
-       int ret;
-       int i, j;
-
-       for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
-               for (j = 0; j < edbus_objects[i].methods_len; j++) {
-                       ret = e_dbus_interface_method_add(edbus_objects[i].iface,
-                                       edbus_objects[i].methods[j].member,
-                                       edbus_objects[i].methods[j].signature,
-                                       edbus_objects[i].methods[j].reply_signature,
-                                       edbus_objects[i].methods[j].func);
-                       if (!ret) {
-                               _E("fail to add method %s!", edbus_objects[i].methods[j].member);
-                               return -ECONNREFUSED;
-                       }
-               }
-       }
-       return 0;
-}
-
-static int register_dbus(void)
-{
-       DBusError error;
-       int retry, ret, i;
-
-       dbus_error_init(&error);
-
-       retry = 0;
-       do {
-               if (e_dbus_init())
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("fail to init edbus");
-                       return -ECONNREFUSED;
-               }
-       } while (retry <= RETRY_MAX);
-
-       retry = 0;
-       do {
-               edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-               if (edbus_conn)
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("fail to get edbus");
-                       ret = -ECONNREFUSED;
-                       goto out1;
-               }
-       } while (retry <= RETRY_MAX);
-
-       retry = 0;
-       do {
-               edbus_request_name = e_dbus_request_name(edbus_conn, BUS_NAME, 0, NULL, NULL);
-               if (edbus_request_name)
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("fail to request edbus name");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-       } while (retry <= RETRY_MAX);
-
-       for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
-               edbus_objects[i].obj = e_dbus_object_add(edbus_conn, edbus_objects[i].path, NULL);
-               if (!(edbus_objects[i].obj)) {
-                       _E("fail to add edbus obj");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-
-               edbus_objects[i].iface = e_dbus_interface_new(edbus_objects[i].interface);
-               if (!(edbus_objects[i].iface)) {
-                       _E("fail to add edbus interface");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-
-               e_dbus_object_interface_attach(edbus_objects[i].obj, edbus_objects[i].iface);
-       }
-
-       return 0;
-
-out2:
-       e_dbus_connection_close(edbus_conn);
-out1:
-       e_dbus_shutdown();
-
-       return ret;
-}
-
-int main (int argc, char *argv[])
-{
-       int ret;
-
-       ecore_init();
-
-       ret = register_dbus();
-       if (ret < 0)
-               return ret;
-
-       ret= init_methods();
-       if (ret < 0)
-               return ret;
-
-       ecore_main_loop_begin();
-       ecore_shutdown();
-       return 0;
-}
diff --git a/popup-launcher/micro-src/launcher.h b/popup-launcher/micro-src/launcher.h
deleted file mode 100755 (executable)
index 60ca66b..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * popup-launcher
- *
- * Copyright (c) 2013 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 __LAUNCHER_H__
-#define __LAUNCHER_H__
-
-#include <stdio.h>
-#include <bundle.h>
-#include <E_DBus.h>
-#include <aul.h>
-#include <Ecore.h>
-#include <dlog.h>
-
-#define RETRY_MAX 10
-#define SLEEP_USEC 200000
-
-/* DBus paths, interfaces */
-#define BUS_NAME              "org.tizen.system.popup"
-#define POPUP_DBUS_PATH       "/Org/Tizen/System/Popup"
-#define POPUP_DBUS_IFACE      BUS_NAME
-
-#define POPUP_PATH_POWEROFF   POPUP_DBUS_PATH"/Poweroff"
-#define POPUP_IFACE_POWEROFF  BUS_NAME".Poweroff"
-
-#define POPUP_PATH_LOWBAT     POPUP_DBUS_PATH"/Lowbat"
-#define POPUP_IFACE_LOWBAT    BUS_NAME".Lowbat"
-
-#define POPUP_PATH_LOWMEM     POPUP_DBUS_PATH"/Lowmem"
-#define POPUP_IFACE_LOWMEM    BUS_NAME".Lowmem"
-
-#define POPUP_PATH_CRASH      POPUP_DBUS_PATH"/Crash"
-#define POPUP_IFACE_CRASH     BUS_NAME".Crash"
-
-#define POPUP_PATH_BATTERY    POPUP_DBUS_PATH"/Battery"
-#define POPUP_IFACE_BATTERY   BUS_NAME".Battery"
-
-#define POPUP_PATH_SYSTEM     POPUP_DBUS_PATH"/System"
-#define POPUP_IFACE_SYSTEM    BUS_NAME".System"
-
-#define POPUP_PATH_SERVANT    POPUP_DBUS_PATH"/Servant"
-#define POPUP_IFACE_SERVANT   BUS_NAME".Servant"
-
-
-/* Popup names */
-#define POWEROFF_SYSPOPUP  "poweroff-syspopup"
-#define LOWBAT_SYSPOPUP    "lowbat-syspopup"
-#define LOWMEM_SYSPOPUP    "lowmem-syspopup"
-#define CRASH_SYSPOPUP     "crash-popup"
-#define SYSTEM_SYSPOPUP    "system-syspopup"
-
-#undef LOG_TAG
-#define LOG_TAG "SYSTEM_APPS"
-#define _D(fmt, args...)   SLOGD(fmt, ##args)
-#define _E(fmt, args...)   SLOGE(fmt, ##args)
-#define _I(fmt, args...)   SLOGI(fmt, ##args)
-
-#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
-
-#define SERVANT_APP_NAME "/usr/bin/system-servant"
-
-
-enum service_type {
-       TTS_SCREENOFF,
-       TTS_ENABLED,
-       TTS_DISABLED,
-       CHARGER_CONNECTION,
-       SERVICE_MAX,
-};
-
-struct edbus_method {
-       const char *member;
-       const char *signature;
-       const char *reply_signature;
-       E_DBus_Method_Cb func;
-};
-
-struct edbus_object {
-       const char *path;
-       const char *interface;
-       E_DBus_Object *obj;
-       E_DBus_Interface *iface;
-       const struct edbus_method *methods;
-       const int methods_len;
-};
-
-/* launch popup */
-DBusMessage *launch_popup_no_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-DBusMessage *launch_popup_single_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-DBusMessage *launch_popup_double_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-DBusMessage *launch_popup_triple_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-
-/* App */
-DBusMessage *launch_system_servant_app(E_DBus_Object *obj,
-                               DBusMessage *msg, char **argv);
-
-#endif /* __LAUNCHER_H__ */
-
diff --git a/popup-launcher/micro-src/popup.c b/popup-launcher/micro-src/popup.c
deleted file mode 100755 (executable)
index d86d932..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * popup-launcher
- *
- * Copyright (c) 2013 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 <syspopup_caller.h>
-#include "launcher.h"
-
-static int launch_popup(char *popup_name,
-                               char *key1, char *value1,
-                               char *key2, char *value2,
-                               char *key3, char *value3)
-{
-       int ret;
-       bundle *b;
-
-       if (!popup_name)
-               return -EINVAL;
-
-       b = bundle_create();
-       if (!b) {
-               return -ENOMEM;
-       }
-
-       if (key1 && value1) {
-               ret = bundle_add(b, key1, value1);
-               if (ret < 0)
-                       goto out;
-       }
-
-       if (key2 && value2) {
-               ret = bundle_add(b, key2, value2);
-               if (ret < 0)
-                       goto out;
-       }
-
-       if (key3 && value3) {
-               ret = bundle_add(b, key3, value3);
-               if (ret < 0)
-                       goto out;
-       }
-
-       ret = syspopup_launch(popup_name, b);
-       if (ret < 0)
-               _E("FAIL: syspopup_launch(): %d", ret);
-
-out:
-       bundle_free(b);
-       return ret;
-}
-
-DBusMessage *launch_popup_no_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       ret = launch_popup(popup_name, NULL, NULL, NULL, NULL, NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
-
-DBusMessage *launch_popup_single_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusError err;
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       char *key;
-       char *value;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       dbus_error_init(&err);
-
-       if (!dbus_message_get_args(msg, &err,
-                   DBUS_TYPE_STRING, &key,
-                   DBUS_TYPE_STRING, &value,
-                       DBUS_TYPE_INVALID)) {
-               _E("there is no message");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if (!key || !value) {
-               _E("message is invalid!");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       ret = launch_popup(popup_name, key, value, NULL, NULL, NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
-DBusMessage *launch_popup_double_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusError err;
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       char *key1, *key2;
-       char *value1, *value2;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       dbus_error_init(&err);
-
-       if (!dbus_message_get_args(msg, &err,
-                   DBUS_TYPE_STRING, &key1,
-                   DBUS_TYPE_STRING, &value1,
-                   DBUS_TYPE_STRING, &key2,
-                   DBUS_TYPE_STRING, &value2,
-                       DBUS_TYPE_INVALID)) {
-               _E("there is no message");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if (!key1 || !key2 || !value1 || !value2) {
-               _E("message is invalid!");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       ret = launch_popup(popup_name, key1, value1, key2, value2, NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
diff --git a/popup-launcher/micro-src/system-apps.efl b/popup-launcher/micro-src/system-apps.efl
deleted file mode 100644 (file)
index 8682e99..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-system-apps system::homedir rwxat- ------
-system-apps isf r-x--- ------
-system-apps ail::db rw---- ------
-system-apps dbus rwx--- ------
-system-apps xorg -w---- ------
-system-apps device::app_logging -w---- ------
-system-apps system::vconf rwxat- ------
-system-apps deviced::haptic rwx--- ------
-system-apps tts-server rwx--- ------
-dbus system-apps rw---- ------
-system-apps system::media rwxat- ------
-system-apps system::share rwxat- ------
-system-apps pulseaudio rwxat- ------
-e17 system-apps -w---- ------
-system-apps sys-assert::core rwxat- ------
-stest-service system-apps r-x--- ------
-system-apps stest-service -w---- ------
-system-apps privacy-manager::db r----l ------
-system-apps pkgmgr::db r----l ------
-system-apps system::vconf_inhouse rw---- ------
-system-apps system::vconf_setting rw---- ------
-system-apps system::vconf_privacy rw---- ------
-system-apps system::vconf_system rw---- ------
-system-apps system::vconf_multimedia rw---- ------
-system-apps system::vconf_network rw---- ------
-system-apps system::vconf_misc rw---- ------
-system-apps device::sys_logging -w---- ------
-system-apps org.tizen.w-idle-clock-weather2 rwx--- ------
-system-apps org.tizen.idle-clock-pedometer rwx--- ------
-system-apps org.tizen.w-idle-clock-shortcut2 rwx--- ------
-system-apps org.tizen.idle-clock-event rwx--- ------
-system-apps org.tizen.idle-clock-dual rwx--- ------
-system-apps org.tizen.w-idle-clock-analog3 rwx--- ------
-system-apps org.tizen.w-idle-clock-analog1 rwx--- ------
-system-apps org.tizen.idle-clock-digital rwx--- ------
-system-apps org.tizen.w-idle-clock-analog2 rwx--- ------
-system-apps e17::notification rw--- -----
diff --git a/popup-launcher/src/launcher.c b/popup-launcher/src/launcher.c
deleted file mode 100755 (executable)
index 0c16cbb..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-/*
- * popup-launcher
- *
- * Copyright (c) 2013 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 "launcher.h"
-
-#ifdef TIZEN_MICRO
-#define activate_notification_no_param(x,y,z)     0
-#define activate_notification_single_param(x,y,z) 0
-#define activate_notification_double_param(x,y,z) 0
-#define activate_notification_triple_param(x,y,z) 0
-#define update_notification_double_param(x,y,z)   0
-#define progress_update_notification(x,y)         0
-#define deactivate_notification(x,y)              0
-#endif
-
-#define TERMINATE_TIMEOUT  5
-
-static E_DBus_Connection *edbus_conn;
-static DBusPendingCall *edbus_request_name;
-static E_DBus_Object *obj;
-static E_DBus_Interface *iface;
-static Ecore_Timer *term_timer = NULL;
-
-static Eina_Bool exit_idler_cb(void *data)
-{
-       e_dbus_connection_close(edbus_conn);
-       e_dbus_shutdown();
-
-       ecore_main_loop_quit();
-       return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool terminate_launcher(void *data)
-{
-       if (term_timer)
-               ecore_timer_del(term_timer);
-
-       if (ecore_idler_add(exit_idler_cb, NULL))
-               return ECORE_CALLBACK_CANCEL;
-
-       exit_idler_cb(NULL);
-       return ECORE_CALLBACK_CANCEL;
-}
-
-static void set_timer_to_terminate(void)
-{
-       if (term_timer)
-               ecore_timer_reset(term_timer);
-       else {
-               term_timer = ecore_timer_add(TERMINATE_TIMEOUT, terminate_launcher, NULL);
-               if (!term_timer)
-                       terminate_launcher(NULL);
-       }
-}
-
-/* Legacy datausage popup and notification */
-static DBusMessage *edbus_datausage(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, DATAUSAGE_SYSPOPUP);
-}
-
-static DBusMessage *edbus_noti_off(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return deactivate_notification(obj, msg);
-}
-
-static DBusMessage *edbus_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, DATAUSAGE_WARNING);
-}
-
-static const struct edbus_method
-edbus_methods[] = {
-       { "DataUsage"          , "ssss",  "i", edbus_datausage },
-       { "NotiOn"             ,    "s",  "i", edbus_noti_on   },
-       { "NotiOff"            ,    "i",  "i", edbus_noti_off  },
-       /* Add methods here */
-};
-
-/* Poweroff popup */
-static DBusMessage *edbus_poweroff_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_no_param(obj, msg, POWEROFF_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_poweroff_methods[] = {
-       { "PopupLaunch" ,   NULL,  "i", edbus_poweroff_popup      },
-       /* Add methods here */
-};
-
-/* Lowbat popup */
-static DBusMessage *edbus_lowbat_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, LOWBAT_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_lowbat_methods[] = {
-       { "PopupLaunch" ,   "ss",  "i", edbus_lowbat_popup      },
-       /* Add methods here */
-};
-
-/* Lowmem popup */
-static DBusMessage *edbus_lowmem_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, LOWMEM_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_lowmem_methods[] = {
-       { "PopupLaunch" ,   "ss",  "i", edbus_lowmem_popup      },
-       /* Add methods here */
-};
-
-/* Mmc popup */
-static DBusMessage *edbus_mmc_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, MMC_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_mmc_methods[] = {
-       { "PopupLaunch" ,   "ss",  "i", edbus_mmc_popup      },
-       /* Add methods here */
-};
-
-/* Usb popup */
-static DBusMessage *edbus_usb_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, USB_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_usb_methods[] = {
-       { "PopupLaunch"        ,   "ss",  "i", edbus_usb_popup         },
-       /* Add methods here */
-};
-
-/* Usbotg popup */
-static DBusMessage *edbus_usbstorage_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, USBOTG_SYSPOPUP);
-}
-
-static DBusMessage *edbus_usbcamera_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, USBOTG_SYSPOPUP);
-}
-
-static DBusMessage *edbus_usbstorage_unmount_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, USBOTG_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_usbotg_methods[] = {
-       { "StoragePopupLaunch"        , "ssss",  "i", edbus_usbstorage_popup         },
-       { "CameraPopupLaunch"         ,   "ss",  "i", edbus_usbcamera_popup          },
-       { "StorageUnmountPopupLaunch" , "ssss",  "i", edbus_usbstorage_unmount_popup },
-       /* Add methods here */
-};
-
-/* DataUsage popups/notifications */
-static DBusMessage *edbus_datausage_blocked_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, DATAUSAGE_SYSPOPUP);
-}
-
-static DBusMessage *edbus_datausage_warning_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, DATAUSAGE_WARNING);
-}
-
-static DBusMessage *edbus_datausage_disabled_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, DATAUSAGE_DISABLED);
-}
-
-static const struct edbus_method
-edbus_datausage_methods[] = {
-       { "BlockedPopupLaunch" , "ssss",  "i", edbus_datausage_blocked_popup      },
-       { "WarningNotiOn"      ,   NULL,  "i", edbus_datausage_warning_noti_on    },
-       { "WarningNotiOff"     ,    "i",  "i", edbus_noti_off                     },
-       { "DisabledNotiOn"     ,   NULL,  "i", edbus_datausage_disabled_noti_on   },
-       { "DisabledNotiOff"    ,    "i",  "i", edbus_noti_off                     },
-       /* Add methods here */
-};
-
-/* LED torch notifications */
-static DBusMessage *edbus_led_torch_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, LED_TORCH);
-}
-
-static const struct edbus_method
-edbus_led_methods[] = {
-       { "TorchNotiOn"        ,   NULL,  "i", edbus_led_torch_noti_on            },
-       { "TorchNotiOff"       ,    "i",  "i", edbus_noti_off                     },
-       /* Add methods here */
-};
-
-/* Ode complete/progress notifications */
-static DBusMessage *edbus_ode_complete_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_single_param(obj, msg, ODE_COMPLETE);
-}
-
-static DBusMessage *edbus_ode_progress_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_single_param(obj, msg, ODE_PROGRESS);
-}
-
-static DBusMessage *edbus_ode_progress_noti_update(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return progress_update_notification(obj, msg);
-}
-
-static DBusMessage *edbus_ode_error_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_triple_param(obj, msg, ODE_ERROR);
-}
-
-static const struct edbus_method
-edbus_ode_methods[] = {
-       { "CompNotiOn"      ,    "s",  "i", edbus_ode_complete_noti_on     },
-       { "CompNotiOff"     ,    "i",  "i", edbus_noti_off                 },
-       { "ProgNotiOn"      ,    "s",  "i", edbus_ode_progress_noti_on     },
-       { "ProgNotiUpdate"  ,   "ii",  "i", edbus_ode_progress_noti_update },
-       { "ProgNotiOff"     ,    "i",  "i", edbus_noti_off                 },
-       { "ErrorNotiOn"     ,  "sii",  "i", edbus_ode_error_noti_on        },
-       { "ErrorNotiOff"    ,    "i",  "i", edbus_noti_off                 },
-       /* Add methods here */
-};
-
-/* System popup */
-static DBusMessage *edbus_recovery_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_watchdog_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_usbotg_warning_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_ode_error_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_triple_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_accessibility_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static DBusMessage *edbus_cooldown_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_single_param(obj, msg, SYSTEM_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_system_methods[] = {
-       { "RecoveryPopupLaunch"           ,     "ss",  "i", edbus_recovery_popup            },
-       { "WatchdogPopupLaunch"           ,   "ssss",  "i", edbus_watchdog_popup            },
-       { "UsbotgWarningPopupLaunch"      ,     "ss",  "i", edbus_usbotg_warning_popup      },
-       { "OdeErrorPopupLaunch"           , "ssssss",  "i", edbus_ode_error_popup           },
-       { "AccessibilityPopupLaunch"      ,     "ss",  "i", edbus_accessibility_popup       },
-       { "CooldownPopupLaunch"           ,     "ss",  "i", edbus_cooldown_popup            },
-       /* Add methods here */
-};
-
-/* Tima notification */
-static DBusMessage *edbus_lkm_prevention_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, TIMA_LKM_PREVENTION);
-}
-
-static DBusMessage *edbus_pkm_detection_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, TIMA_PKM_DETECTION);
-}
-
-static const struct edbus_method
-edbus_tima_methods[] = {
-       { "LKMPreventionNotiOn"  ,     NULL,  "i", edbus_lkm_prevention_noti_on    },
-       { "LKMPreventionNotiOff" ,      "i",  "i", edbus_noti_off                  },
-       { "PKMDetectionNotiOn"   ,     NULL,  "i", edbus_pkm_detection_noti_on     },
-       { "PKMDetectionNotiOff"  ,      "i",  "i", edbus_noti_off                  },
-       /* Add methods here */
-};
-
-/* Crash popup */
-static DBusMessage *edbus_crash_popup(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_popup_double_param(obj, msg, CRASH_SYSPOPUP);
-}
-
-static const struct edbus_method
-edbus_crash_methods[] = {
-       { "PopupLaunch"  ,     "ssss",  "i", edbus_crash_popup    },
-       /* Add methods here */
-};
-
-/* Ticker noti */
-static DBusMessage *edbus_ticker_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_single_param(obj, msg, TICKER);
-}
-
-static const struct edbus_method
-edbus_ticker_methods[] = {
-       { "TickerNotiOn"  ,     "s",  "i", edbus_ticker_noti_on    },
-       /* Add methods here */
-};
-
-/* App noti */
-static DBusMessage *edbus_cradle_app_launch(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_app_no_param(obj, msg, CRADLE_APP_NAME);
-}
-
-static DBusMessage *edbus_pwlock_app_launch(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return launch_app_single_param(obj, msg, PWLOCK_APP_NAME);
-}
-
-static DBusMessage *edbus_app_terminate_by_pid(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return terminate_app_by_pid(obj, msg);
-}
-
-static const struct edbus_method
-edbus_app_methods[] = {
-       { "CradleAppLaunch"  ,     NULL,  "i", edbus_cradle_app_launch    },
-       { "PWLockAppLaunch"  ,     "ss",  "i", edbus_pwlock_app_launch    },
-       { "AppTerminateByPid",      "i",  "i", edbus_app_terminate_by_pid },
-       /* Add methods here */
-};
-
-/* USB host notifications */
-static DBusMessage *edbus_usb_storage_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_single_param(obj, msg, USB_STORAGE);
-}
-
-static DBusMessage *edbus_usb_storage_ro_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_single_param(obj, msg, USB_STORAGE_RO);
-}
-
-static DBusMessage *edbus_usb_device_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_double_param(obj, msg, USB_DEVICE);
-}
-
-static DBusMessage *edbus_usb_device_noti_update(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return update_notification_double_param(obj, msg, USB_DEVICE);
-}
-
-static const struct edbus_method
-edbus_usbhost_methods[] = {
-       { "UsbStorageNotiOn"   ,    "s",  "i", edbus_usb_storage_noti_on          },
-       { "UsbStorageRoNotiOn" ,    "s",  "i", edbus_usb_storage_ro_noti_on       },
-       { "UsbStorageNotiOff"  ,    "i",  "i", edbus_noti_off                     },
-       { "UsbDeviceNotiOn"    ,   "ss",  "i", edbus_usb_device_noti_on           },
-       { "UsbDeviceNotiUpdate", "isss",  "i", edbus_usb_device_noti_update       },
-       { "UsbDeviceNotiOff"   ,    "i",  "i", edbus_noti_off                     },
-
-       /* Add methods here */
-};
-
-/* Battery notifications */
-static DBusMessage *edbus_battery_full_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       set_timer_to_terminate();
-       return activate_notification_no_param(obj, msg, BATTERY_FULL);
-}
-
-static DBusMessage *edbus_battery_charge_noti_on(E_DBus_Object *obj, DBusMessage *msg)
-{
-       char param[2];
-       char *args[3];
-
-       set_timer_to_terminate();
-
-       args[0] = SERVANT_APP_NAME;
-       snprintf(param, sizeof(param), "%d", CHARGER_CONNECTION);
-       args[1] = param;
-       args[2] = NULL;
-       return launch_system_servant_app(obj, msg, args);
-}
-
-static const struct edbus_method
-edbus_battery_methods[] = {
-       { "BatteryFullNotiOn"   ,   NULL,  "i", edbus_battery_full_noti_on         },
-       { "BatteryFullNotiOff"  ,    "i",  "i", edbus_noti_off                     },
-       { "BatteryChargeNotiOn" ,   NULL,  "i", edbus_battery_charge_noti_on       },
-       /* Add methods here */
-};
-
-/* Servant application */
-static DBusMessage *load_system_servant(E_DBus_Object *obj, DBusMessage *msg, int type)
-{
-       char param[2];
-       char *args[3];
-
-       set_timer_to_terminate();
-
-       args[0] = SERVANT_APP_NAME;
-       snprintf(param, sizeof(param), "%d", type);
-       args[1] = param;
-       args[2] = NULL;
-       return launch_system_servant_app(obj, msg, args);
-}
-
-static DBusMessage *edbus_tts_screen_off(E_DBus_Object *obj, DBusMessage *msg)
-{
-       return load_system_servant(obj, msg, TTS_SCREENOFF);
-}
-
-static DBusMessage *edbus_tts_enabled(E_DBus_Object *obj, DBusMessage *msg)
-{
-       return load_system_servant(obj, msg, TTS_ENABLED);
-}
-
-static DBusMessage *edbus_tts_disabled(E_DBus_Object *obj, DBusMessage *msg)
-{
-       return load_system_servant(obj, msg, TTS_DISABLED);
-}
-
-static const struct edbus_method
-edbus_servant_methods[] = {
-       { "ScreenOffTts"       ,   NULL,  "i", edbus_tts_screen_off       },
-       { "TtsEnabled"         ,   NULL,  "i", edbus_tts_enabled          },
-       { "TtsDisabled"        ,   NULL,  "i", edbus_tts_disabled         },
-       /* Add methods here */
-};
-
-static struct edbus_object
-edbus_objects[]= {
-       { POPUP_PATH_POWEROFF    , POPUP_IFACE_POWEROFF    , NULL, NULL,
-               edbus_poweroff_methods   , ARRAY_SIZE(edbus_poweroff_methods)  },
-       { POPUP_PATH_LOWBAT      , POPUP_IFACE_LOWBAT      , NULL, NULL,
-               edbus_lowbat_methods     , ARRAY_SIZE(edbus_lowbat_methods)    },
-       { POPUP_PATH_LOWMEM      , POPUP_IFACE_LOWMEM      , NULL, NULL,
-               edbus_lowmem_methods     , ARRAY_SIZE(edbus_lowmem_methods)    },
-       { POPUP_PATH_MMC         , POPUP_IFACE_MMC         , NULL, NULL,
-               edbus_mmc_methods        , ARRAY_SIZE(edbus_mmc_methods)       },
-       { POPUP_PATH_USB         , POPUP_IFACE_USB         , NULL, NULL,
-               edbus_usb_methods        , ARRAY_SIZE(edbus_usb_methods)       },
-       { POPUP_PATH_USBOTG      , POPUP_IFACE_USBOTG      , NULL, NULL,
-               edbus_usbotg_methods     , ARRAY_SIZE(edbus_usbotg_methods)    },
-       { POPUP_PATH_DATAUSAGE   , POPUP_IFACE_DATAUSAGE   , NULL, NULL,
-               edbus_datausage_methods  , ARRAY_SIZE(edbus_datausage_methods) },
-       { POPUP_PATH_LED         , POPUP_IFACE_LED         , NULL, NULL,
-               edbus_led_methods        , ARRAY_SIZE(edbus_led_methods)       },
-       { POPUP_PATH_ODE         , POPUP_IFACE_ODE         , NULL, NULL,
-               edbus_ode_methods        , ARRAY_SIZE(edbus_ode_methods)       },
-       { POPUP_PATH_SYSTEM      , POPUP_IFACE_SYSTEM      , NULL, NULL,
-               edbus_system_methods     , ARRAY_SIZE(edbus_system_methods)    },
-       { POPUP_PATH_TIMA        , POPUP_IFACE_TIMA        , NULL, NULL,
-               edbus_tima_methods       , ARRAY_SIZE(edbus_tima_methods)      },
-       { POPUP_PATH_CRASH       , POPUP_IFACE_CRASH       , NULL, NULL,
-               edbus_crash_methods      , ARRAY_SIZE(edbus_crash_methods)     },
-       { POPUP_PATH_TICKER      , POPUP_IFACE_TICKER      , NULL, NULL,
-               edbus_ticker_methods     , ARRAY_SIZE(edbus_ticker_methods)    },
-       { POPUP_PATH_APP         , POPUP_IFACE_APP         , NULL, NULL,
-               edbus_app_methods        , ARRAY_SIZE(edbus_app_methods)       },
-       { POPUP_PATH_USBHOST     , POPUP_IFACE_USBHOST     , NULL, NULL,
-               edbus_usbhost_methods    , ARRAY_SIZE(edbus_usbhost_methods)   },
-       { POPUP_PATH_BATTERY     , POPUP_IFACE_BATTERY     , NULL, NULL,
-               edbus_battery_methods    , ARRAY_SIZE(edbus_battery_methods)   },
-       { POPUP_PATH_SERVANT     , POPUP_IFACE_SERVANT     , NULL, NULL,
-               edbus_servant_methods    , ARRAY_SIZE(edbus_servant_methods)   },
-       /* Add new object & interface here*/
-};
-
-static int init_methods(void)
-{
-       int ret;
-       int i, j;
-
-       /***************************************************************************/
-       /* TODO                                                                    */
-       /* These codes are old and will be removed after other notis are developed */
-       /***************************************************************************/
-       for (i = 0; i < ARRAY_SIZE(edbus_methods); i++) {
-               ret = e_dbus_interface_method_add(iface,
-                               edbus_methods[i].member,
-                               edbus_methods[i].signature,
-                               edbus_methods[i].reply_signature,
-                               edbus_methods[i].func);
-               if (!ret) {
-                       _E("fail to add method %s!", edbus_methods[i].member);
-                       return -ECONNREFUSED;
-               }
-       }
-       /***************************************************************************/
-
-       for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
-               for (j = 0; j < edbus_objects[i].methods_len; j++) {
-                       ret = e_dbus_interface_method_add(edbus_objects[i].iface,
-                                       edbus_objects[i].methods[j].member,
-                                       edbus_objects[i].methods[j].signature,
-                                       edbus_objects[i].methods[j].reply_signature,
-                                       edbus_objects[i].methods[j].func);
-                       if (!ret) {
-                               _E("fail to add method %s!", edbus_objects[i].methods[j].member);
-                               return -ECONNREFUSED;
-                       }
-               }
-       }
-       return 0;
-}
-
-static int register_dbus(void)
-{
-       DBusError error;
-       int retry, ret, i;
-
-       dbus_error_init(&error);
-
-       retry = 0;
-       do {
-               if (e_dbus_init())
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("fail to init edbus");
-                       return -ECONNREFUSED;
-               }
-       } while (retry <= RETRY_MAX);
-
-       retry = 0;
-       do {
-               edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-               if (edbus_conn)
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("fail to get edbus");
-                       ret = -ECONNREFUSED;
-                       goto out1;
-               }
-       } while (retry <= RETRY_MAX);
-
-       retry = 0;
-       do {
-               edbus_request_name = e_dbus_request_name(edbus_conn, BUS_NAME, 0, NULL, NULL);
-               if (edbus_request_name)
-                       break;
-               if (++retry == RETRY_MAX) {
-                       _E("fail to request edbus name");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-       } while (retry <= RETRY_MAX);
-
-       /***************************************************************************/
-       /* TODO                                                                    */
-       /* These codes are old and will be removed after other notis are developed */
-       /***************************************************************************/
-       obj = e_dbus_object_add(edbus_conn, POPUP_DBUS_PATH, NULL);
-       if (!obj) {
-               _E("fail to add edbus obj");
-               ret = -ECONNREFUSED;
-               goto out2;
-       }
-
-       iface = e_dbus_interface_new(POPUP_DBUS_IFACE);
-       if (!iface) {
-               _E("fail to add edbus interface");
-               ret = -ECONNREFUSED;
-               goto out2;
-       }
-
-       e_dbus_object_interface_attach(obj, iface);
-       /***************************************************************************/
-
-       for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
-               edbus_objects[i].obj = e_dbus_object_add(edbus_conn, edbus_objects[i].path, NULL);
-               if (!(edbus_objects[i].obj)) {
-                       _E("fail to add edbus obj");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-
-               edbus_objects[i].iface = e_dbus_interface_new(edbus_objects[i].interface);
-               if (!(edbus_objects[i].iface)) {
-                       _E("fail to add edbus interface");
-                       ret = -ECONNREFUSED;
-                       goto out2;
-               }
-
-               e_dbus_object_interface_attach(edbus_objects[i].obj, edbus_objects[i].iface);
-       }
-
-       return 0;
-
-out2:
-       e_dbus_connection_close(edbus_conn);
-out1:
-       e_dbus_shutdown();
-
-       return ret;
-}
-
-int main (int argc, char *argv[])
-{
-       int ret;
-
-       ecore_init();
-
-       ret = register_dbus();
-       if (ret < 0)
-               return ret;
-
-       ret= init_methods();
-       if (ret < 0)
-               return ret;
-
-       ecore_main_loop_begin();
-       ecore_shutdown();
-       return 0;
-}
diff --git a/popup-launcher/src/org.tizen.system.popup.service b/popup-launcher/src/org.tizen.system.popup.service
deleted file mode 100644 (file)
index 86ed1df..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=org.tizen.system.popup
-Exec=/usr/bin/popup-launcher
diff --git a/popup-launcher/src/popup.c b/popup-launcher/src/popup.c
deleted file mode 100755 (executable)
index 4b3616d..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * popup-launcher
- *
- * Copyright (c) 2013 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 <syspopup_caller.h>
-#include "launcher.h"
-
-static int launch_popup(char *popup_name,
-                               char *key1, char *value1,
-                               char *key2, char *value2,
-                               char *key3, char *value3)
-{
-       int ret;
-       bundle *b;
-
-       if (!popup_name)
-               return -EINVAL;
-
-       b = bundle_create();
-       if (!b) {
-               return -ENOMEM;
-       }
-
-       if (key1 && value1) {
-               ret = bundle_add(b, key1, value1);
-               if (ret < 0)
-                       goto out;
-       }
-
-       if (key2 && value2) {
-               ret = bundle_add(b, key2, value2);
-               if (ret < 0)
-                       goto out;
-       }
-
-       if (key3 && value3) {
-               ret = bundle_add(b, key3, value3);
-               if (ret < 0)
-                       goto out;
-       }
-
-       ret = syspopup_launch(popup_name, b);
-       if (ret < 0)
-               _E("FAIL: syspopup_launch(): %d", ret);
-
-out:
-       bundle_free(b);
-       return ret;
-}
-
-DBusMessage *launch_popup_no_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       ret = launch_popup(popup_name, NULL, NULL, NULL, NULL, NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
-
-DBusMessage *launch_popup_single_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusError err;
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       char *key;
-       char *value;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       dbus_error_init(&err);
-
-       if (!dbus_message_get_args(msg, &err,
-                   DBUS_TYPE_STRING, &key,
-                   DBUS_TYPE_STRING, &value,
-                       DBUS_TYPE_INVALID)) {
-               _E("there is no message");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if (!key || !value) {
-               _E("message is invalid!");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       ret = launch_popup(popup_name, key, value, NULL, NULL, NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
-DBusMessage *launch_popup_double_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusError err;
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       char *key1, *key2;
-       char *value1, *value2;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       dbus_error_init(&err);
-
-       if (!dbus_message_get_args(msg, &err,
-                   DBUS_TYPE_STRING, &key1,
-                   DBUS_TYPE_STRING, &value1,
-                   DBUS_TYPE_STRING, &key2,
-                   DBUS_TYPE_STRING, &value2,
-                       DBUS_TYPE_INVALID)) {
-               _E("there is no message");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if (!key1 || !key2 || !value1 || !value2) {
-               _E("message is invalid!");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       ret = launch_popup(popup_name, key1, value1, key2, value2, NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
-DBusMessage *launch_popup_triple_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name)
-{
-       DBusError err;
-       DBusMessageIter iter;
-       DBusMessage *reply;
-       char *key1, *key2, *key3;
-       char *value1, *value2, *value3;
-       int ret;
-
-       if (!popup_name) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       _I("launch popup (%s)", popup_name);
-
-       dbus_error_init(&err);
-
-       if (!dbus_message_get_args(msg, &err,
-                   DBUS_TYPE_STRING, &key1,
-                   DBUS_TYPE_STRING, &value1,
-                   DBUS_TYPE_STRING, &key2,
-                   DBUS_TYPE_STRING, &value2,
-                       DBUS_TYPE_STRING, &key3,
-                   DBUS_TYPE_STRING, &value3,
-                       DBUS_TYPE_INVALID)) {
-               _E("there is no message");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if (!key1 || !key2 || !key3 || !value1 || !value2 || !value3) {
-               _E("message is invalid!");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       ret = launch_popup(popup_name, key1, value1, key2, value2, key3, value3);
-       if (ret < 0)
-               _E("FAIL: launch_popup(): %d", ret);
-
-out:
-       reply = dbus_message_new_method_return(msg);
-       dbus_message_iter_init_append(reply, &iter);
-       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
-
-       return reply;
-}
-
diff --git a/poweroff-popup/CMakeLists.txt b/poweroff-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index b3ff349..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-#################### Poweroff #########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(poweroff-popup C)
-
-ADD_SUBDIRECTORY(src)
diff --git a/poweroff-popup/src/CMakeLists.txt b/poweroff-popup/src/CMakeLists.txt
deleted file mode 100755 (executable)
index 62edb89..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#################### Poweroff #########################
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(poweroff-popup C)
-
-SET(PACKAGE ${PROJECT_NAME})
-
-SET(SRCS
-               ${CMAKE_SOURCE_DIR}/poweroff-popup/src/poweroff.c
-               ${CMAKE_SOURCE_DIR}/share/common.c
-)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/poweroff-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-SET(PKG_MODULES ${PKG_MODULES}
-               appcore-efl
-               elementary
-               dlog
-               deviced
-               utilX
-               evas
-               ecore
-               ecore-x
-               vconf
-               syspopup
-               syspopup-caller
-               feedback
-               appsvc
-)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(poweroff_pkgs REQUIRED ${PKG_MODULES})
-
-FOREACH(flag ${poweroff_pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
-SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${poweroff_pkgs_LDFLAGS})
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/org.tizen.poweroff-syspopup/bin)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.poweroff-syspopup.xml DESTINATION /usr/share/packages/)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}/src/org.tizen.poweroff-syspopup.efl DESTINATION /etc/smack/accesses.d)
-
diff --git a/poweroff-popup/src/poweroff.c b/poweroff-popup/src/poweroff.c
deleted file mode 100755 (executable)
index 279c5cd..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <vconf.h>
-#include <appcore-efl.h>
-#include "common.h"
-
-static void pm_state_changed(keynode_t *key, void *data)
-{
-       int state;
-       struct appdata *ad = data;
-
-       if (!key || !ad)
-               return;
-
-       state = vconf_keynode_get_int(key);
-       if (state != VCONFKEY_PM_STATE_LCDOFF)
-               return;
-
-       if (vconf_ignore_key_changed(VCONFKEY_PM_STATE, pm_state_changed) != 0)
-               _E("vconf key ignore failed");
-
-       popup_terminate();
-}
-
-static void register_handlers(struct appdata *ad)
-{
-       if (!ad)
-               return;
-
-       if (vconf_notify_key_changed(VCONFKEY_PM_STATE, pm_state_changed, ad) != 0)
-               _E("vconf key notify failed");
-}
-
-static void unregister_handlers(struct appdata *ad)
-{
-       if (!ad)
-               return;
-
-       if (vconf_ignore_key_changed(VCONFKEY_PM_STATE, pm_state_changed) != 0)
-               _E("vconf key ignore failed");
-}
-
-static void yes_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       struct appdata *ad = (struct appdata *)data;
-       Evas_Object *rect;
-       Evas_Coord w, h, size;
-       static int bPowerOff = 0;
-       int ret;
-
-       if (bPowerOff == 1)
-               return;
-       bPowerOff = 1;
-
-       if (ad && ad->popup && ad->win_main) {
-               unregister_handlers(ad);
-               release_evas_object(&(ad->popup));
-
-               rect = evas_object_rectangle_add(evas_object_evas_get(ad->win_main));
-               evas_object_geometry_get(ad->win_main, NULL, NULL, &w, &h);
-               size = max(w, h);
-               evas_object_resize(rect, size, size);
-               evas_object_color_set(rect, 0, 0, 0, 255);
-               evas_object_show(rect);
-       }
-
-       _I("Turning off the device !! Bye Bye ");
-
-       ret = device_poweroff();
-       if (ret < 0) {
-               _E("Failed to power off (%d)", ret);
-               popup_terminate();
-       }
-}
-
-static void no_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       _D("Cancel is selected");
-       unregister_handlers(data);
-       popup_terminate();
-}
-
-static int show_device_options(void *data)
-{
-       struct appdata *ad = data;
-
-       /* Create and show popup */
-       ad->popup = load_normal_popup(ad,
-                       _("IDS_ST_BODY_POWER_OFF"),
-                       _("IDS_TPLATFORM_BODY_POWER_OFF_THE_DEVICE_Q"),
-                       _("IDS_COM_SK_CANCEL"),
-                       no_clicked,
-                       _("IDS_HS_BUTTON_POWER_OFF_ABB2"),
-                       yes_clicked);
-       if (ad->popup == NULL) {
-               _E("FAIL: create_and_show_basic_popup()");
-               return -ENOMEM;
-       }
-
-       /* Change LCD brightness */
-       if (set_display_feedback(-1) < 0)
-               _E("Failed to set display");
-
-       return 0;
-}
-
-static int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* Create window (Reqd for sys-popup) */
-       win = create_win(PACKAGE);
-       if (win == NULL)
-               return -1;
-
-       ad->win_main = win;
-
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       register_handlers(ad);
-
-       return 0;
-}
-
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-
-       unregister_handlers(ad);
-
-       if (ad->win_main)
-               evas_object_del(ad->win_main);
-
-       return 0;
-}
-
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = data;
-       int ret;
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-               return 0;
-       }
-
-       ret = syspopup_create(b, &(ad->handler), ad->win_main, ad);
-       if (ret < 0) {
-               _E("Failed to create syspopup");
-               popup_terminate();
-               return ret;
-       }
-
-       evas_object_show(ad->win_main);
-
-       show_device_options((void *)ad);
-
-       return 0;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/share/common.c b/share/common.c
deleted file mode 100755 (executable)
index 5f73697..0000000
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <E_DBus.h>
-#include <pthread.h>
-#include <dd-display.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-#include "common.h"
-
-#define RETRY_MAX 10
-#define DBUS_REPLY_TIMEOUT  (-1)
-
-/* Terminate popup */
-static Eina_Bool exit_idler_cb(void *data)
-{
-       elm_exit();
-       return ECORE_CALLBACK_CANCEL;
-}
-
-void popup_terminate(void)
-{
-       if (ecore_idler_add(exit_idler_cb, NULL))
-               return;
-
-       exit_idler_cb(NULL);
-}
-
-/* Release evas object */
-void release_evas_object(Evas_Object **obj)
-{
-       if (!obj || !(*obj))
-               return;
-       evas_object_del(*obj);
-       *obj = NULL;
-}
-
-void object_cleanup(struct appdata *ad)
-{
-       if (!ad)
-               return;
-       release_evas_object(&(ad->popup));
-       release_evas_object(&(ad->layout_main));
-       release_evas_object(&(ad->win_main));
-}
-
-/* Create main window */
-static void win_del(void *data, Evas_Object * obj, void *event)
-{
-       popup_terminate();
-}
-
-Evas_Object *create_win(const char *name)
-{
-       Evas_Object *eo;
-       Ecore_X_Window xwin;
-       unsigned int val = 1;
-       int w;
-       int h;
-
-       if (!name)
-               return NULL;
-
-       eo = elm_win_add(NULL, name, ELM_WIN_DIALOG_BASIC);
-       if (!eo) {
-               _E("FAIL: elm_win_add()");
-               return NULL;
-       }
-
-       elm_win_title_set(eo, name);
-       elm_win_borderless_set(eo, EINA_TRUE);
-       elm_win_alpha_set(eo, EINA_TRUE);
-       elm_win_raise(eo);
-       evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
-       ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
-       evas_object_resize(eo, w, h);
-
-       xwin = elm_win_xwindow_get(eo);
-       ecore_x_window_prop_card32_set(xwin, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
-
-       return eo;
-}
-
-Evas_Object *load_scrollable_popup(struct appdata *ad,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       Evas_Object *label;
-       Evas_Object *scroller;
-       char *text;
-
-       if (!ad || !(ad->win_main) || !content)
-               return NULL;
-
-       evas_object_show(ad->win_main);
-       popup = elm_popup_add(ad->win_main);
-       if (!popup)
-               return NULL;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       if (title)
-               elm_object_part_text_set(popup, "title,text", title);
-
-       scroller = elm_scroller_add(popup);
-       if (!scroller)
-               return NULL;
-       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(popup, scroller);
-       evas_object_show(scroller);
-
-       label = elm_label_add(scroller);
-       if (!label)
-               return NULL;
-       elm_object_style_set(label, "popup/default");
-       elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
-
-       text = elm_entry_utf8_to_markup(content);
-       if (!text)
-               return NULL;
-       elm_object_text_set(label, text);
-       free(text);
-       evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_object_content_set(scroller, label);
-       evas_object_show(label);
-
-       if (lbtnText && lbtn_cb) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               if (lbtn) {
-                       elm_object_text_set(lbtn, lbtnText);
-                       elm_object_style_set(lbtn, "popup");
-                       elm_object_part_content_set(popup, "button1", lbtn);
-                       evas_object_smart_callback_add(lbtn, "clicked", lbtn_cb, ad);
-               }
-       }
-
-       if (rbtnText && rbtn_cb) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               if (rbtn) {
-                       elm_object_text_set(rbtn, rbtnText);
-                       elm_object_style_set(rbtn, "popup");
-                       elm_object_part_content_set(popup, "button2", rbtn);
-                       evas_object_smart_callback_add(rbtn, "clicked", rbtn_cb, ad);
-               }
-       }
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-/* normal popup with title(optional), main text, and two buttons(optional) */
-Evas_Object *load_popup_by_style(struct appdata *ad,
-                       char *style,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       Ecore_X_Window xwin;
-
-       if (!ad || !(ad->win_main) || !content)
-               return NULL;
-
-       evas_object_show(ad->win_main);
-       popup = elm_popup_add(ad->win_main);
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       if (style) {
-               elm_object_style_set(popup, style);
-               if (!strncmp(style, "verticalbuttonstyle", strlen(style)))
-                       elm_layout_signal_emit(popup, "elm,state,2button", "elm");
-       }
-
-       elm_object_text_set(popup, content);
-
-       if (title) {
-               /* Popup title */
-               elm_object_part_text_set(popup, "title,text", title);
-       }
-
-       if (lbtnText && lbtn_cb) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               elm_object_text_set(lbtn, lbtnText);
-               elm_object_style_set(lbtn, "popup");
-               elm_object_part_content_set(popup, "button1", lbtn);
-               evas_object_smart_callback_add(lbtn, "clicked", lbtn_cb, ad);
-       }
-
-       if (rbtnText && rbtn_cb) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               elm_object_text_set(rbtn, rbtnText);
-               elm_object_style_set(rbtn, "popup");
-               elm_object_part_content_set(popup, "button2", rbtn);
-               evas_object_smart_callback_add(rbtn, "clicked", rbtn_cb, ad);
-       }
-
-       xwin = elm_win_xwindow_get(popup);
-       ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-Evas_Object *load_normal_popup(struct appdata *ad,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       return load_popup_by_style(ad,
-                       "transparent",
-                       title, content,
-                       lbtnText, lbtn_cb,
-                       rbtnText, rbtn_cb);
-}
-
-Evas_Object *load_popup_with_vertical_buttons(struct appdata *ad,
-                       char *title,
-                       char *content,
-                       char *ubtnText,
-                       Evas_Smart_Cb ubtn_cb,
-                       char *dbtnText,
-                       Evas_Smart_Cb dbtn_cb)
-{
-       return load_popup_by_style(ad,
-                       "verticalbuttonstyle",
-                       title, content,
-                       ubtnText, ubtn_cb,
-                       dbtnText, dbtn_cb);
-}
-
-void play_feedback(int type, int pattern)
-{
-       int ret;
-
-       ret = feedback_initialize();
-       if (ret != FEEDBACK_ERROR_NONE) {
-               _E("Cannot initialize feedback");
-               return;
-       }
-
-       switch (type) {
-       case PLAY_SOUND_ONLY:
-       case PLAY_LED_ONLY:
-       case PLAY_VIBRATION_ONLY:
-               ret = feedback_play_type(type, pattern);
-               break;
-       case PLAY_ALL:
-               ret = feedback_play(pattern);
-               break;
-       default:
-               _E("Play type is unknown");
-               ret = 0;
-       }
-
-       if (ret != FEEDBACK_ERROR_NONE)
-               _E("Cannot play feedback: %d", pattern);
-
-       ret = feedback_deinitialize();
-       if (ret != FEEDBACK_ERROR_NONE)
-               _E("Cannot deinitialize feedback");
-}
-
-static int append_variant(DBusMessageIter *iter, const char *sig, char *param[])
-{
-       char *ch;
-       int i;
-       int iValue;
-
-       if (!sig || !param)
-               return 0;
-
-       for (ch = (char*)sig, i = 0; *ch != '\0'; ++i, ++ch) {
-               switch (*ch) {
-               case 'i':
-                       iValue = atoi(param[i]);
-                       dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &iValue);
-                       break;
-               case 's':
-                       dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &param[i]);
-                       break;
-               default:
-                       return -EINVAL;
-               }
-       }
-       return 0;
-}
-
-int broadcast_dbus_signal(const char *path, const char *interface,
-               const char *name, const char *sig, char *param[])
-{
-       E_DBus_Connection *conn = NULL;
-       DBusPendingCall *pc;
-       DBusMessageIter iter;
-       DBusMessage *msg;
-       int ret, retry;
-
-       retry = 0;
-       do {
-               ret = e_dbus_init();
-               if (ret > 0)
-                       break;
-               if (retry == RETRY_MAX) {
-                       _E("FAIL: e_dbus_init()");
-                       return -ENOMEM;
-               }
-               retry++;
-       } while (retry < RETRY_MAX);
-
-       if (!path || !interface || !name)
-               return -EINVAL;
-
-       conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-       if (!conn) {
-               _E("FAIL: e_dbus_bus_get()");
-               return -ENOENT;
-       }
-
-       msg = dbus_message_new_signal(path, interface, name);
-       if (!msg) {
-               _E("FAIL: dbus_message_new_signal()");
-               ret = -ENOMEM;
-               goto out_conn;
-       }
-
-       dbus_message_iter_init_append(msg, &iter);
-       ret = append_variant(&iter, sig, param);
-       if (ret < 0) {
-               _E("append_variant error(%d)", ret);
-               goto out_msg_conn;
-       }
-
-       pc = e_dbus_message_send(conn, msg, NULL, -1, NULL);
-       if (!pc) {
-               _E("FAIL: e_dbus_message_send()");
-               ret = -ECONNREFUSED;
-               goto out_msg_conn;
-       }
-
-       ret = 0;
-
-out_msg_conn:
-       dbus_message_unref(msg);
-out_conn:
-       e_dbus_connection_close(conn);
-       e_dbus_shutdown();
-       return ret;
-}
-
-static void *start_thread_display_feedback(void* data)
-{
-       int type = (int)data;
-       if (display_change_state(LCD_NORMAL) < 0)
-               _E("FAIL: display_change_state()");
-
-       if (type >= 0)
-               play_feedback(PLAY_ALL, type);
-       return NULL;
-}
-
-int set_display_feedback(int type)
-{
-       pthread_t th;
-       int ret;
-
-       ret = pthread_create(&th, NULL, start_thread_display_feedback, (void *)type);
-       if (ret < 0) {
-               _E("Failed to create pthread");
-               return ret;
-       }
-       pthread_detach(th);
-
-       return 0;
-}
-
-int dbus_method_sync(const char *dest, const char *path,
-               const char *interface, const char *method,
-               const char *sig, char *param[])
-{
-       DBusConnection *conn = NULL;
-       DBusMessage *msg = NULL;
-       DBusMessageIter iter;
-       DBusMessage *reply = NULL;
-       DBusError err;
-       int ret, result;
-
-       conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
-       if (!conn) {
-               _E("dbus_bus_get error");
-               return -EPERM;
-       }
-
-       msg = dbus_message_new_method_call(dest, path, interface, method);
-       if (!msg) {
-               _E("dbus_message_new_method_call(%s:%s-%s)", path, interface, method);
-               ret = -EBADMSG;
-               goto out;
-       }
-
-       dbus_message_iter_init_append(msg, &iter);
-       ret = append_variant(&iter, sig, param);
-       if (ret < 0) {
-               _E("append_variant error(%d)", ret);
-               goto out;
-       }
-
-       dbus_error_init(&err);
-
-       reply = dbus_connection_send_with_reply_and_block(conn, msg, DBUS_REPLY_TIMEOUT, &err);
-       if (!reply) {
-               _E("dbus_connection_send error(%s:%s)", err.name, err.message);
-               dbus_error_free(&err);
-               ret = -ECOMM;
-               goto out;
-       }
-
-       ret = dbus_message_get_args(reply, &err, DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID);
-       if (!ret) {
-               _E("no message : [%s:%s]", err.name, err.message);
-               dbus_error_free(&err);
-               ret = -ENOMSG;
-               goto out;
-       }
-
-       ret = result;
-
-out:
-       if (msg)
-               dbus_message_unref(msg);
-       if (reply)
-               dbus_message_unref(reply);
-       if (conn)
-               dbus_connection_unref(conn);
-       return ret;
-}
-
-int get_hallic_status(void)
-{
-       int ret, i;
-
-       i = 0;
-       do {
-               ret = dbus_method_sync(DEVICED_BUS_NAME,
-                               DEVICED_PATH_HALL,
-                               DEVICED_IFACE_HALL,
-                               "getstatus", NULL, NULL);
-               if (ret < 0)
-                       _E("Failed to request hall ic status: ret(%d), retry (%d)", ret, i);
-               else
-                       break;
-       } while (i++ < RETRY_MAX);
-
-       return ret;
-}
-
-int reset_window_priority(Evas_Object *win, int priority)
-{
-       Ecore_X_Window xwin;
-       Display *dpy;
-
-       if (priority < WIN_PRIORITY_LOW || priority > WIN_PRIORITY_HIGH)
-               return -EINVAL;
-
-       xwin = elm_win_xwindow_get(win);
-       dpy = ecore_x_display_get();
-
-       utilx_set_system_notification_level(dpy, xwin, priority);
-
-       return 0;
-}
-
-int set_popup_focus(Evas_Object *win, bool focus)
-{
-       XWMHints *hints;
-       Display *dpy;
-       Ecore_X_Window xwin;
-
-       hints = XAllocWMHints();
-       if (!hints) {
-               _E("Failed to allocate WWMHints");
-               return -ENOMEM;
-       }
-
-       dpy = ecore_x_display_get();
-       xwin = elm_win_xwindow_get(win);
-
-       hints->flags = InputHint | StateHint;
-       if (focus)
-               hints->input = 1;
-       else
-               hints->input = 0;
-       hints->initial_state = NormalState;
-       XSetWMHints(dpy, xwin, hints);
-       XFree(hints);
-
-       return 0;
-}
-
-#define DEVICED_OBJECT_PATH "/Org/Tizen/System/DeviceD"
-#define DEVICED_IFACE_NAME  DEVICED_BUS_NAME
-#define DEVICED_PATH_POWER  DEVICED_OBJECT_PATH"/Power"
-#define DEVICED_IFACE_POWER DEVICED_IFACE_NAME".power"
-#define METHOD_POWEROFF     "reboot"
-#define TYPE_POWEROFF       "poweroff"
-
-int device_poweroff(void)
-{
-       char *param[2];
-       char opt[4];
-
-       snprintf(opt, sizeof(opt), "0");
-       param[0] = TYPE_POWEROFF;
-       param[1] = opt;
-
-       return dbus_method_sync(
-                       DEVICED_BUS_NAME,
-                       DEVICED_PATH_POWER,
-                       DEVICED_IFACE_POWER,
-                       METHOD_POWEROFF,
-                       "si", param);
-}
diff --git a/share/common.h b/share/common.h
deleted file mode 100644 (file)
index fc289bc..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 __COMMON_H_
-#define __COMMON_H_
-
-#include <Ecore_X.h>
-#include <appcore-efl.h>
-#include <Elementary.h>
-#include <utilX.h>
-#include <dlog.h>
-#include <bundle.h>
-#include <glib.h>
-#include <syspopup.h>
-#include <syspopup_caller.h>
-#include <feedback.h>
-
-#undef LOG_TAG
-#define LOG_TAG "SYSTEM_APPS"
-#define _D(fmt, args...)   SLOGD(fmt, ##args)
-#define _E(fmt, args...)   SLOGE(fmt, ##args)
-#define _I(fmt, args...)   SLOGI(fmt, ##args)
-
-#define FREE(arg) \
-       do { \
-               if(arg) { \
-                       free((void *)arg); \
-                       arg = NULL; \
-               } \
-       } while (0);
-
-#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
-
-#define max(a,b) \
-       ({ __typeof__ (a) _a = (a); \
-          __typeof__ (b) _b = (b);  \
-          _a > _b ? _a : _b; })
-
-#define DEVICED_BUS_NAME    "org.tizen.system.deviced"
-#define DEVICED_PATH_HALL   "/Org/Tizen/System/DeviceD/Hall"
-#define DEVICED_IFACE_HALL  DEVICED_BUS_NAME".hall"
-#define HALL_STATE_SIGNAL   "ChangeState"
-
-enum win_priority {
-       WIN_PRIORITY_LOW    = UTILX_NOTIFICATION_LEVEL_LOW,
-       WIN_PRIORITY_NORMAL = UTILX_NOTIFICATION_LEVEL_NORMAL,
-       WIN_PRIORITY_HIGH   = UTILX_NOTIFICATION_LEVEL_HIGH,
-};
-
-enum play_feedback_type {
-       PLAY_ALL            = 0,
-       PLAY_LED_ONLY       = FEEDBACK_TYPE_LED,
-       PLAY_SOUND_ONLY     = FEEDBACK_TYPE_SOUND,
-       PLAY_VIBRATION_ONLY = FEEDBACK_TYPE_VIBRATION,
-       PLAY_END            = FEEDBACK_TYPE_END
-};
-
-enum play_feedback_pattern {
-       PATTERN_POWEROFF    = FEEDBACK_PATTERN_POWEROFF,
-       PATTERN_HW_TAP      = FEEDBACK_PATTERN_HW_TAP,
-       PATTERN_LOWBAT      = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_LOWMEM      = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_MMC         = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_USB         = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_USBOTG      = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_RECOVERY    = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_WATCHDOG    = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_DATAUSAGE   = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_CRASH       = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_WARNING     = FEEDBACK_PATTERN_LOWBATT,
-       PATTERN_CHARGERCONN = FEEDBACK_PATTERN_CHARGERCONN,
-       PATTERN_FULLCHARGED = FEEDBACK_PATTERN_FULLCHARGED,
-       PATTERN_VIBRATION   = FEEDBACK_PATTERN_VIBRATION_ON,
-       PATTERN_SOUND       = FEEDBACK_PATTERN_SILENT_OFF,
-       PATTERN_END         = FEEDBACK_PATTERN_END
-} ;
-
-struct appdata {
-       /* Common */
-       Evas_Object *win_main;
-       Evas_Object *layout_main;
-       Evas_Object *popup;
-       Evas_Object *list;
-       Evas_Object *popup_chk;
-       bundle      *b;
-
-       syspopup_handler handler;
-
-       GList       *options;
-
-       /* For usbotg popup */
-       Evas_Object *storage_added_popup;
-       Evas_Object *storage_unmount_popup;
-       Evas_Object *camera_added_popup;
-       char *storage_added_path;
-       char *storage_unmount_path;
-
-       /* IPC by dbus */
-       E_DBus_Signal_Handler *edbus_handler;
-       E_DBus_Connection     *edbus_conn;
-
-};
-
-void popup_terminate(void);
-void release_evas_object(Evas_Object **obj);
-void object_cleanup(struct appdata *ad);
-Evas_Object *create_win(const char *name);
-Evas_Object *load_normal_popup(struct appdata *ad,
-               char *title,
-               char *content,
-               char *lbtnText,
-               Evas_Smart_Cb lbtn_cb,
-               char *rbtnText,
-               Evas_Smart_Cb rbtn_cb);
-Evas_Object *load_popup_with_vertical_buttons(struct appdata *ad,
-               char *title,
-               char *content,
-               char *ubtnText,
-               Evas_Smart_Cb ubtn_cb,
-               char *dbtnText,
-               Evas_Smart_Cb dbtn_cb);
-Evas_Object *load_scrollable_popup(struct appdata *ad,
-               char *title,
-               char *content,
-               char *lbtnText,
-               Evas_Smart_Cb lbtn_cb,
-               char *rbtnText,
-               Evas_Smart_Cb rbtn_cb);
-
-void play_feedback(int type, int pattern);
-int set_display_feedback(int type);
-int device_poweroff(void);
-
-/* Send dbus signal */
-int broadcast_dbus_signal(const char *path,
-               const char *interface,
-               const char *name,
-               const char *sig,
-               char *param[]);
-
-int get_hallic_status(void);
-int reset_window_priority(Evas_Object *win, int priority);
-int set_popup_focus(Evas_Object *win, bool focus);
-
-int dbus_method_sync(const char *dest, const char *path,
-               const char *interface, const char *method,
-               const char *sig, char *param[]);
-
-
-#endif                         /* __COMMON_H__ */
diff --git a/share/micro-common.c b/share/micro-common.c
deleted file mode 100755 (executable)
index 04cc0e4..0000000
+++ /dev/null
@@ -1,798 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 "micro-common.h"
-#include <vconf.h>
-#include <efl_assist.h>
-#include <unicode/udat.h>
-#include <unicode/udatpg.h>
-#include <unicode/ustring.h>
-
-#define RETRY_MAX 10
-#define DBUS_REPLY_TIMEOUT  (-1)
-#define BUF_MAX 64
-
-#ifdef SYSTEM_APPS_MICRO_3
-#define TIZEN_MICRO_WIDTH  360
-#define TIZEN_MICRO_HEIGHT 480
-#define LAYOUT_CHECKVIEW   "micro_3_title_content_button"
-#else
-#define TIZEN_MICRO_WIDTH  320
-#define TIZEN_MICRO_HEIGHT 320
-#define LAYOUT_CHECKVIEW   "popup_checkview"
-#endif
-
-#define TABLE_COLOR "system-color.xml"
-#define TABLE_FONT  "system-font.xml"
-
-static E_DBus_Connection *edbus_conn = NULL;
-
-/* Terminate popup */
-static Eina_Bool exit_idler_cb(void *data)
-{
-       elm_exit();
-       return ECORE_CALLBACK_CANCEL;
-}
-
-void popup_terminate(void)
-{
-       if (ecore_idler_add(exit_idler_cb, NULL))
-               return;
-
-       exit_idler_cb(NULL);
-}
-
-/* Release evas object */
-void release_evas_object(Evas_Object **obj)
-{
-       if (!obj || !(*obj))
-               return;
-       evas_object_del(*obj);
-       *obj = NULL;
-}
-
-void object_cleanup(struct appdata *ad)
-{
-       if (!ad)
-               return;
-       release_evas_object(&(ad->popup));
-       release_evas_object(&(ad->win_main));
-}
-
-/* Create main window */
-static void win_del(void *data, Evas_Object * obj, void *event)
-{
-       popup_terminate();
-}
-
-Evas_Object *create_win(const char *name)
-{
-       Evas_Object *eo;
-       Ea_Theme_Color_Table *color;
-       Ea_Theme_Font_Table *font;
-
-       if (!name)
-               return NULL;
-
-       eo = elm_win_add(NULL, name, ELM_WIN_DIALOG_BASIC);
-       if (!eo) {
-               _E("FAIL: elm_win_add()");
-               return NULL;
-       }
-
-       elm_win_title_set(eo, name);
-       elm_win_borderless_set(eo, EINA_TRUE);
-       elm_win_alpha_set(eo, EINA_TRUE);
-       elm_win_raise(eo);
-       evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
-       evas_object_resize(eo,
-                       TIZEN_MICRO_WIDTH * elm_config_scale_get(),
-                       TIZEN_MICRO_HEIGHT * elm_config_scale_get());
-
-       ea_theme_changeable_ui_enabled_set(EINA_TRUE);
-
-       color = ea_theme_color_table_new(TABLE_COLOR);
-       if (color) {
-               ea_theme_colors_set(color, EA_THEME_STYLE_DEFAULT);
-               ea_theme_color_table_free(color);
-       }
-
-       font = ea_theme_font_table_new(TABLE_FONT);
-       if (font) {
-               ea_theme_fonts_set(font);
-               ea_theme_font_table_free(font);
-       }
-
-       return eo;
-}
-
-static Evas_Object *load_scrollable_style_popup(struct appdata *ad,
-                       char *ly_style,
-                       char *edj_name,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       char *text;
-
-       if (!ad || !(ad->win_main) || !content || !ly_style || !edj_name)
-               return NULL;
-
-       popup = elm_popup_add(ad->win_main);
-       if (!popup)
-               return NULL;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       if (title)
-               elm_object_part_text_set(popup, "title,text", title);
-
-       text = elm_entry_utf8_to_markup(content);
-       if (!text)
-               return NULL;
-       elm_object_text_set(popup, text);
-       free(text);
-
-       if (lbtnText && lbtn_cb) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               if (lbtn) {
-                       elm_object_text_set(lbtn, lbtnText);
-                       elm_object_style_set(lbtn, "popup");
-                       elm_object_part_content_set(popup, "button1", lbtn);
-                       evas_object_smart_callback_add(lbtn, "clicked", lbtn_cb, ad);
-               }
-       }
-
-       if (rbtnText && rbtn_cb) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               if (rbtn) {
-                       elm_object_text_set(rbtn, rbtnText);
-                       elm_object_style_set(rbtn, "popup");
-                       elm_object_part_content_set(popup, "button2", rbtn);
-                       evas_object_smart_callback_add(rbtn, "clicked", rbtn_cb, ad);
-               }
-       }
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-static Evas_Object *load_scrollable_no_style_popup(struct appdata *ad,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       Evas_Object *label;
-       Evas_Object *scroller;
-       char *text;
-
-       if (!ad || !(ad->win_main) || !content)
-               return NULL;
-
-       evas_object_show(ad->win_main);
-       popup = elm_popup_add(ad->win_main);
-       if (!popup)
-               return NULL;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       if (title)
-               elm_object_part_text_set(popup, "title,text", title);
-
-       scroller = elm_scroller_add(popup);
-       if (!scroller)
-               return NULL;
-       elm_object_style_set(scroller, "effect");
-       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(popup, scroller);
-       evas_object_show(scroller);
-
-       label = elm_label_add(scroller);
-       if (!label)
-               return NULL;
-       elm_object_style_set(label, "popup/default");
-       elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
-
-       text = elm_entry_utf8_to_markup(content);
-       if (!text)
-               return NULL;
-       elm_object_text_set(label, text);
-       free(text);
-       evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_object_content_set(scroller, label);
-       evas_object_show(label);
-
-       if (lbtnText && lbtn_cb) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               if (lbtn) {
-                       elm_object_text_set(lbtn, lbtnText);
-                       elm_object_style_set(lbtn, "popup");
-                       elm_object_part_content_set(popup, "button1", lbtn);
-                       evas_object_smart_callback_add(lbtn, "clicked", lbtn_cb, ad);
-               }
-       }
-
-       if (rbtnText && rbtn_cb) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               if (rbtn) {
-                       elm_object_text_set(rbtn, rbtnText);
-                       elm_object_style_set(rbtn, "popup");
-                       elm_object_part_content_set(popup, "button2", rbtn);
-                       evas_object_smart_callback_add(rbtn, "clicked", rbtn_cb, ad);
-               }
-       }
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-Evas_Object *load_scrollable_popup(struct appdata *ad,
-                       char *ly_style,
-                       char *edj_name,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       if (ly_style && edj_name)
-               return load_scrollable_style_popup(ad,
-                               ly_style, edj_name, title, content,
-                               lbtnText, lbtn_cb, rbtnText, rbtn_cb);
-       else
-               return load_scrollable_no_style_popup(ad,
-                               title, content,
-                               lbtnText, lbtn_cb, rbtnText, rbtn_cb);
-}
-
-bool get_check_state(Evas_Object *check)
-{
-       if (check && elm_check_state_get(check))
-               return true;
-       return false;
-}
-
-Evas_Object *load_scrollable_check_popup(struct appdata *ad,
-                       char *edj_name,
-                       char *title,
-                       char *content,
-                       char *text_check,
-                       Evas_Object **check,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       Evas_Object *label;
-       Evas_Object *scroller;
-       Evas_Object *layout, *layout_inner;
-       char *text;
-
-       if (!ad || !(ad->win_main) || !content || !edj_name || !text_check || !check)
-               return NULL;
-
-       evas_object_show(ad->win_main);
-       popup = elm_popup_add(ad->win_main);
-       if (!popup)
-               return NULL;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       if (title)
-               elm_object_part_text_set(popup, "title,text", title);
-
-       layout = elm_layout_add(popup);
-       if (!layout)
-               return NULL;
-       elm_layout_file_set(layout, edj_name, LAYOUT_CHECKVIEW);
-       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(popup, layout);
-
-       scroller = elm_scroller_add(popup);
-       if (!scroller)
-               return NULL;
-       elm_object_style_set(scroller, "effect");
-       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_part_content_set(layout, "elm.swallow.content", scroller);
-       evas_object_show(scroller);
-
-       layout_inner = elm_layout_add(layout);
-       elm_layout_file_set(layout_inner, edj_name, "popup_checkview_internal");
-       evas_object_size_hint_weight_set(layout_inner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(scroller, layout_inner);
-
-       label = elm_label_add(layout);
-       if (!label)
-               return NULL;
-       elm_object_style_set(label, "popup/default");
-       elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
-
-       text = elm_entry_utf8_to_markup(content);
-       if (!text)
-               return NULL;
-       elm_object_text_set(label, text);
-       free(text);
-       evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
-       elm_object_part_content_set(layout_inner, "label", label);
-       elm_object_part_content_set(layout, "elm.swallow.content", scroller);
-
-       *check = elm_check_add(popup);
-       if (!(*check))
-               return NULL;
-       elm_object_style_set(*check, "popup");
-       elm_object_text_set(*check, text_check);
-       elm_object_part_content_set(layout_inner, "elm.swallow.end", *check);
-       evas_object_show(*check);
-
-       if (lbtnText && lbtn_cb) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               if (lbtn) {
-                       elm_object_text_set(lbtn, lbtnText);
-                       elm_object_style_set(lbtn, "popup");
-                       elm_object_part_content_set(popup, "button1", lbtn);
-                       evas_object_smart_callback_add(lbtn, "clicked", lbtn_cb, ad);
-               }
-       }
-
-       if (rbtnText && rbtn_cb) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               if (rbtn) {
-                       elm_object_text_set(rbtn, rbtnText);
-                       elm_object_style_set(rbtn, "popup");
-                       elm_object_part_content_set(popup, "button2", rbtn);
-                       evas_object_smart_callback_add(rbtn, "clicked", rbtn_cb, ad);
-               }
-       }
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-Evas_Object *load_popup_by_style(struct appdata *ad,
-                       char *style,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-
-       if (!ad || !(ad->win_main) || !content)
-               return NULL;
-
-       evas_object_show(ad->win_main);
-       popup = elm_popup_add(ad->win_main);
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_text_set(popup, content);
-
-       if (title) {
-               /* Popup title */
-               elm_object_part_text_set(popup, "title,text", title);
-       }
-
-       if (lbtnText && lbtn_cb) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               elm_object_text_set(lbtn, lbtnText);
-               elm_object_style_set(lbtn, "popup");
-               elm_object_part_content_set(popup, "button1", lbtn);
-               evas_object_smart_callback_add(lbtn, "clicked", lbtn_cb, ad);
-       }
-
-       if (rbtnText && rbtn_cb) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               elm_object_text_set(rbtn, rbtnText);
-               elm_object_style_set(rbtn, "popup");
-               elm_object_part_content_set(popup, "button2", rbtn);
-               evas_object_smart_callback_add(rbtn, "clicked", rbtn_cb, ad);
-       }
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-#ifdef SYSTEM_APPS_CIRCLE
-Evas_Object *load_normal_popup(struct appdata *ad,
-               char *edj,
-               char *title,
-               char *content,
-               char *lbtn_text,
-               char *lbtn_icon,
-               Evas_Smart_Cb lbtn_clicked,
-               char *rbtn_text,
-               char *rbtn_icon,
-               Evas_Smart_Cb rbtn_clicked)
-{
-       Evas_Object *lbtn;
-       Evas_Object *licon;
-       Evas_Object *rbtn;
-       Evas_Object *ricon;
-       Evas_Object *popup;
-       Evas_Object *layout;
-
-       if (!ad || !(ad->win_main) || !content)
-               return NULL;
-
-       evas_object_show(ad->win_main);
-
-       popup = elm_popup_add(ad->win_main);
-       if (!popup)
-               return NULL;
-       elm_object_style_set(popup, "circle");
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       layout = elm_layout_add(popup);
-       if (title)
-               elm_object_part_text_set(layout, "elm.text.title", _(title));
-
-       elm_object_content_set(popup, layout);
-
-       if (lbtn_text && !rbtn_text) {
-               /* one button */
-               elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons1");
-               elm_object_part_text_set(layout, "elm.text", content);
-               elm_object_content_set(popup, layout);
-
-               if (lbtn_icon) {
-                       lbtn = elm_button_add(popup);
-                       if (lbtn) {
-                               elm_object_text_set(lbtn, _(lbtn_text));
-                               elm_object_style_set(lbtn, "popup/circle");
-                               elm_object_part_content_set(popup, "button1", lbtn);
-                               evas_object_smart_callback_add(lbtn, "clicked", lbtn_clicked, ad);
-                       }
-                       licon = elm_image_add(lbtn);
-                       if (licon) {
-                               elm_image_file_set(licon, edj, lbtn_icon);
-                               evas_object_size_hint_weight_set(licon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-                               elm_object_part_content_set(lbtn, "elm.swallow.content", licon);
-                               evas_object_show(licon);
-                       }
-               }
-       } else {
-               /* Two button */
-               elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2");
-               elm_object_part_text_set(layout, "elm.text", content);
-               elm_object_content_set(popup, layout);
-
-               if (lbtn_text && lbtn_icon) {
-                       /* Left button */
-                       lbtn = elm_button_add(popup);
-                       if (lbtn) {
-                               elm_object_text_set(lbtn, _(lbtn_text));
-                               elm_object_style_set(lbtn, "popup/circle/left");
-                               elm_object_part_content_set(popup, "button1", lbtn);
-                               evas_object_smart_callback_add(lbtn, "clicked", lbtn_clicked, ad);
-                       }
-                       licon = elm_image_add(lbtn);
-                       if (licon) {
-                               elm_image_file_set(licon, edj, lbtn_icon);
-                               evas_object_size_hint_weight_set(licon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-                               elm_object_part_content_set(lbtn, "elm.swallow.content", licon);
-                               evas_object_show(licon);
-                       }
-               }
-
-               if (rbtn_text && rbtn_icon) {
-                       /* Right button */
-                       rbtn = elm_button_add(popup);
-                       if (rbtn) {
-                               elm_object_text_set(rbtn, _(rbtn_text));
-                               elm_object_style_set(rbtn, "popup/circle/right");
-                               elm_object_part_content_set(popup, "button2", rbtn);
-                               evas_object_smart_callback_add(rbtn, "clicked", rbtn_clicked, ad);
-                       }
-                       ricon = elm_image_add(rbtn);
-                       if (ricon) {
-                               elm_image_file_set(ricon, edj, rbtn_icon);
-                               evas_object_size_hint_weight_set(ricon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-                               elm_object_part_content_set(rbtn, "elm.swallow.content", ricon);
-                               evas_object_show(ricon);
-                       }
-               }
-       }
-
-       evas_object_show(popup);
-
-       return popup;
-
-}
-#else
-Evas_Object *load_normal_popup(struct appdata *ad,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb)
-{
-       return load_popup_by_style(ad,
-                       "transparent",
-                       title, content,
-                       lbtnText, lbtn_cb,
-                       rbtnText, rbtn_cb);
-}
-#endif
-
-Evas_Object *load_popup_toast(struct appdata *ad,
-               char *content)
-{
-       Evas_Object *popup;
-
-       if (!ad || !(ad->win_main) || !content)
-               return NULL;
-
-       popup = elm_popup_add(ad->win_main);
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       elm_object_style_set(popup, "toast");
-       elm_popup_orient_set(popup, ELM_POPUP_ORIENT_BOTTOM);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
-       elm_object_part_text_set(popup, "elm.text", content);
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-int reset_window_priority(Evas_Object *win, int priority)
-{
-       Ecore_X_Window xwin;
-       Display *dpy;
-
-       if (priority < WIN_PRIORITY_LOW || priority > WIN_PRIORITY_HIGH)
-               return -EINVAL;
-
-       xwin = elm_win_xwindow_get(win);
-       dpy = ecore_x_display_get();
-
-       utilx_set_system_notification_level(dpy, xwin, priority);
-
-       return 0;
-}
-
-void play_feedback(int type, int pattern)
-{
-       int ret;
-
-       ret = feedback_initialize();
-       if (ret != FEEDBACK_ERROR_NONE) {
-               _E("Cannot initialize feedback");
-               return;
-       }
-
-       switch (type) {
-       case FEEDBACK_TYPE_LED:
-       case FEEDBACK_TYPE_SOUND:
-       case FEEDBACK_TYPE_VIBRATION:
-               ret = feedback_play_type(type, pattern);
-               break;
-       case FEEDBACK_TYPE_NONE:
-               ret = feedback_play(pattern);
-               break;
-       default:
-               _E("Play type is unknown");
-               ret = 0;
-       }
-       if (ret != FEEDBACK_ERROR_NONE)
-               _E("Cannot play feedback: %d", pattern);
-
-       ret = feedback_deinitialize();
-       if (ret != FEEDBACK_ERROR_NONE)
-               _E("Cannot deinitialize feedback");
-}
-
-int set_dbus_connection(void)
-{
-       int retry;
-
-       if (edbus_conn)
-               return 0;
-
-       retry = 0;
-       while (e_dbus_init() == 0) {
-               if (retry++ >= RETRY_MAX)
-                       return -ENOMEM;
-       }
-
-       edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
-       if (!edbus_conn) {
-               _E("Failed to get dbus bus");
-               e_dbus_shutdown();
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-E_DBus_Connection *get_dbus_connection(void)
-{
-       return edbus_conn;
-}
-
-void unset_dbus_connection(void)
-{
-       if (edbus_conn) {
-               e_dbus_connection_close(edbus_conn);
-               e_dbus_shutdown();
-               edbus_conn = NULL;
-       }
-}
-
-static int append_variant(DBusMessageIter *iter, const char *sig, char *param[])
-{
-       char *ch;
-       int i;
-       int iValue;
-
-       if (!sig || !param)
-               return 0;
-
-       for (ch = (char*)sig, i = 0; *ch != '\0'; ++i, ++ch) {
-               switch (*ch) {
-               case 'i':
-                       iValue = atoi(param[i]);
-                       dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &iValue);
-                       break;
-               case 's':
-                       dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &param[i]);
-                       break;
-               default:
-                       return -EINVAL;
-               }
-       }
-       return 0;
-}
-
-int broadcast_dbus_signal(const char *path, const char *interface,
-               const char *name, const char *sig, char *param[])
-{
-       E_DBus_Connection *conn = NULL;
-       DBusPendingCall *pc;
-       DBusMessageIter iter;
-       DBusMessage *msg;
-       int ret;
-
-       if (!path || !interface || !name)
-               return -EINVAL;
-
-       conn = get_dbus_connection();
-       if (!conn) {
-               _E("Failed to get dbus connection");
-               return -ENOMEM;
-       }
-
-       msg = dbus_message_new_signal(path, interface, name);
-       if (!msg) {
-               _E("FAIL: dbus_message_new_signal()");
-               return -ENOMEM;
-       }
-
-       dbus_message_iter_init_append(msg, &iter);
-       ret = append_variant(&iter, sig, param);
-       if (ret < 0) {
-               _E("append_variant error(%d)", ret);
-               goto out;
-       }
-
-       pc = e_dbus_message_send(conn, msg, NULL, -1, NULL);
-       if (!pc) {
-               _E("FAIL: e_dbus_message_send()");
-               ret = -ECONNREFUSED;
-               goto out;
-       }
-
-       ret = 0;
-
-out:
-       dbus_message_unref(msg);
-       return ret;
-}
-
-int change_pd_to_ps(char *text)
-{
-       char *p;
-
-       if (!text || strlen(text) == 0)
-               return -EINVAL;
-
-       _I("text: (%s)", text);
-
-       p = text;
-       do {
-               p = strstr(p, "$d");
-               if (!p)
-                       break;
-               *(p+1) = 's';
-       } while(p);
-
-       _I("text: (%s)", text);
-
-       return 0;
-}
-
-int get_str_from_icu(int number, char *buf, int buf_len)
-{
-       char locale[BUF_MAX];
-       char *p;
-       UErrorCode status = U_ZERO_ERROR;
-       UNumberFormat *num_fmt;
-       UChar result[BUF_MAX] = {0, };
-       char res[BUF_MAX] = {0, };
-       int32_t len = (int32_t) (sizeof(result) / sizeof((result)[0]));
-
-       if (!buf || buf_len <= 0)
-               return -EINVAL;
-
-       snprintf(locale, sizeof(locale), "%s", vconf_get_str(VCONFKEY_REGIONFORMAT));
-
-       if (locale[0] != '\0') {
-               p = strstr(locale, ".UTF-8");
-               if (p)
-                       *p = 0;
-       }
-
-       num_fmt = unum_open(UNUM_DEFAULT, NULL, -1, locale, NULL, &status);
-       unum_format(num_fmt, number, result, len, NULL, &status);
-
-       u_austrcpy(res, result);
-
-       unum_close(num_fmt);
-
-       _I("Number (%d) from ICU: (%s)", number, res);
-
-       snprintf(buf, buf_len, "%s", res);
-
-       return 0;
-}
diff --git a/share/micro-common.h b/share/micro-common.h
deleted file mode 100644 (file)
index 42ed51b..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 __COMMON_H_
-#define __COMMON_H_
-
-#include <Ecore_X.h>
-#include <appcore-efl.h>
-#include <Elementary.h>
-#include <dlog.h>
-#include <glib.h>
-#include <utilX.h>
-#include <syspopup.h>
-#include <syspopup_caller.h>
-#include <feedback.h>
-#include <E_DBus.h>
-
-#undef LOG_TAG
-#define LOG_TAG "SYSTEM_APPS"
-#define _D(fmt, args...)   SLOGD(fmt, ##args)
-#define _E(fmt, args...)   SLOGE(fmt, ##args)
-#define _I(fmt, args...)   SLOGI(fmt, ##args)
-
-#define FREE(arg) \
-       do { \
-               if(arg) { \
-                       free((void *)arg); \
-                       arg = NULL; \
-               } \
-       } while (0);
-
-#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
-
-#define max(a,b) \
-       ({ __typeof__ (a) _a = (a); \
-          __typeof__ (b) _b = (b);  \
-          _a > _b ? _a : _b; })
-
-enum win_priority {
-       WIN_PRIORITY_LOW    = UTILX_NOTIFICATION_LEVEL_LOW,
-       WIN_PRIORITY_NORMAL = UTILX_NOTIFICATION_LEVEL_NORMAL,
-       WIN_PRIORITY_HIGH   = UTILX_NOTIFICATION_LEVEL_HIGH,
-};
-
-struct appdata {
-       /* Common */
-       Evas_Object *win_main;
-       Evas_Object *popup;
-       Evas_Object *list;
-       bundle      *b;
-       GList       *options;
-
-       syspopup_handler handler;
-};
-
-void popup_terminate(void);
-void release_evas_object(Evas_Object **obj);
-void object_cleanup(struct appdata *ad);
-Evas_Object *create_win(const char *name);
-#ifdef SYSTEM_APPS_CIRCLE
-Evas_Object *load_normal_popup(struct appdata *ad,
-               char *edj,
-               char *title,
-               char *content,
-               char *lbtnText,
-               char *lbtn_icon,
-               Evas_Smart_Cb lbtn_cb,
-               char *rbtnText,
-               char *rbtn_icon,
-               Evas_Smart_Cb rbtn_cb);
-#else
-Evas_Object *load_normal_popup(struct appdata *ad,
-               char *title,
-               char *content,
-               char *lbtnText,
-               Evas_Smart_Cb lbtn_cb,
-               char *rbtnText,
-               Evas_Smart_Cb rbtn_cb);
-#endif
-
-Evas_Object *load_scrollable_popup(struct appdata *ad,
-                       char *ly_style,
-                       char *edj_name,
-                       char *title,
-                       char *content,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb);
-Evas_Object *load_popup_toast(struct appdata *ad,
-                       char *content);
-bool get_check_state(Evas_Object *check);
-Evas_Object *load_scrollable_check_popup(struct appdata *ad,
-                       char *edj_name,
-                       char *title,
-                       char *content,
-                       char *text_check,
-                       Evas_Object **check,
-                       char *lbtnText,
-                       Evas_Smart_Cb lbtn_cb,
-                       char *rbtnText,
-                       Evas_Smart_Cb rbtn_cb);
-
-
-/* dbus */
-int set_dbus_connection(void);
-void unset_dbus_connection(void);
-E_DBus_Connection *get_dbus_connection(void);
-
-int broadcast_dbus_signal(const char *path, const char *interface,
-               const char *name, const char *sig, char *param[]);
-
-int reset_window_priority(Evas_Object *win, int priority);
-
-/* feedback */
-void play_feedback(int type, int pattern);
-
-/* change integer to string */
-int change_pd_to_ps(char *text);
-int get_str_from_icu(int number, char *buf, int buf_len);
-
-#endif                         /* __COMMON_H__ */
index 5c7c3cd..ba8c0c1 100755 (executable)
@@ -1,11 +1,13 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
-SET(SRCS ${CMAKE_SOURCE_DIR}/signal-sender/signal-sender.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
+IF(SIGNAL_SENDER STREQUAL off)
+       RETURN()
+ENDIF(SIGNAL_SENDER STREQUAL off)
+
+SET(SRCS ${CMAKE_SOURCE_DIR}/signal-sender/signal-sender.c)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/signal-sender)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/popup-launcher/src)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/common)
 
 SET(VENDOR "tizen")
 SET(PACKAGE "system-signal-sender")
@@ -39,5 +41,6 @@ TARGET_LINK_LIBRARIES(${PACKAGE} ${pkgs_LDFLAGS} "-ldl")
 
 INSTALL(TARGETS ${PACKAGE} DESTINATION ${BINDIR})
 
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/signal-sender/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/signal-sender/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE.Apache_v2 DESTINATION ${LICENSEDIR} RENAME ${PKGNAME})
@@ -2,13 +2,8 @@ org.tizen.system-signal-sender aul::db r-x--- ------
 org.tizen.system-signal-sender aul::launch rwx--- ------
 org.tizen.system-signal-sender system::homedir rwxat- ------
 org.tizen.system-signal-sender isf r-x--- ------
-org.tizen.system-signal-sender ail::db rw---- ------
 org.tizen.system-signal-sender dbus rwx--- ------
 org.tizen.system-signal-sender xorg -w---- ------
 org.tizen.system-signal-sender device::app_logging -w---- ------
-org.tizen.system-signal-sender system::vconf rwxat- ------
 org.tizen.system-signal-sender system-apps rw---- ------
-org.tizen.system-signal-sender system::vconf_inhouse r----- ------
-org.tizen.system-signal-sender system::vconf_system r----- ------
-org.tizen.system-signal-sender system::vconf_setting r----- ------
 org.tizen.system-signal-sender e17::notification rw---- ------
similarity index 75%
rename from data/org.tizen.system-signal-sender.xml
rename to signal-sender/org.tizen.system-signal-sender.xml
index c9558d2..883df4e 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.system-signal-sender" version="0.1.7" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.tizen.system-signal-sender" version="0.1.7" install-location="internal-only">
        <label>System signal sender</label>
        <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
        <description>System signal sender application</description>
index 79fe361..24e65ca 100644 (file)
  * limitations under the License.
  */
 
-#include "common.h"
-#include "launcher.h"
+#include <dlog.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <bundle_internal.h>
+#include <aul.h>
+#include <appcore-efl.h>
+#include <Ecore.h>
+#include <Elementary.h>
+#include <syspopup_caller.h>
+#include <dbus/dbus.h>
+#include "macro.h"
 
 #define DBUS_REPLY_TIMEOUT  (120 * 1000)
 #define BUF_MAX 256
 #define MMC_ENCRYPTION_UG  "setting-mmc-encryption-efl"
 #define SECURITY_UG        "setting-security-efl"
 
+enum ode_error_type {
+       NOT_ENOUGH_SPACE,
+       OPERATION_FAILED,
+       ODE_ERROR_MAX,
+};
+
 static bool (*is_storage_encryption_restricted)(void) = NULL;
 
 void register_storage_encryption_restricted_function(bool (*func)(void))
@@ -32,6 +49,19 @@ void register_storage_encryption_restricted_function(bool (*func)(void))
                is_storage_encryption_restricted = func;
 }
 
+static Eina_Bool exit_idler_cb(void *data)
+{
+       elm_exit();
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void sender_terminate(void)
+{
+       if (ecore_idler_add(exit_idler_cb, NULL))
+               return;
+       exit_idler_cb(NULL);
+}
+
 static int append_variant(DBusMessageIter *iter, const char *sig, char *param[])
 {
        char *ch;
@@ -152,12 +182,12 @@ static int send_usbstorage_unmount_popup_signal(char *path)
        snprintf(buf, sizeof(buf), "%s", path);
 
        param[0] = "_SYSPOPUP_CONTENT_";
-       param[1] = "storage_unmount";
+       param[1] = "usbotg_unmount_storage";
        param[2] = "_DEVICE_PATH_";
        param[3] = buf;
 
-       return request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_USBOTG, POPUP_IFACE_USBOTG,
-                       "StorageUnmountPopupLaunch", "ssss", param);
+       return request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM, POPUP_IFACE_SYSTEM,
+                       "PopupLaunchDouble", "ssss", param);
 }
 
 static int get_err_and_space(bundle *b, char *type,
@@ -219,7 +249,7 @@ static int send_ode_error_popup_signal(bundle *b, char *type)
        param[5] = space;
 
        return request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM, POPUP_IFACE_SYSTEM,
-                       "OdeErrorPopupLaunch", "ssssss", param);
+                       "PopupLaunchTriple", "ssssss", param);
 }
 
 static int load_ode_setting_ug(void)
@@ -325,13 +355,12 @@ static int app_reset(bundle *b, void *data)
        ret = -EINVAL;
 
 out:
-       popup_terminate();
+       sender_terminate();
        return ret;
 }
 
 int main(int argc, char *argv[])
 {
-       struct appdata ad;
        struct appcore_ops ops = {
                .create = app_create,
                .terminate = app_terminate,
@@ -340,9 +369,5 @@ int main(int argc, char *argv[])
                .reset = app_reset,
        };
 
-       memset(&ad, 0x0, sizeof(struct appdata));
-
-       ops.data = &ad;
-
        return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
 }
index 37ec6b8..fe6a931 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __SIGNAL_SENDER_H__
 #define __SIGNAL_SENDER_H__
 
-#include "common.h"
+#include "macro.h"
 
 void register_storage_encryption_restricted_function(bool (*func)(void));
 
old mode 100644 (file)
new mode 100755 (executable)
index ca885e4..0191a40
@@ -1,33 +1,81 @@
 ####### System-popup #############
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
+IF(SYSTEM_POPUP STREQUAL off)
+       RETURN()
+ENDIF()
+
 SET(TABLE_PATH ${CMAKE_SOURCE_DIR}/edcs/table)
 
-SET(SRCS common/core.c
-                common/popup-common.c
-                common/popup-ui.c
-)
+#common module
+SET(SRCS ${COMMON_SRCS})
 
-IF("$ENV{CFLAGS}" MATCHES "-DSYSTEM_APPS_MICRO")
-       SET(SRCS ${SRCS} common/popup-ui-micro.c)
-       SET(SRCS ${SRCS} flightmode/flightmode.c)
-       SET(SRCS ${SRCS} mobiledata/mobiledata.c)
-       SET(SRCS ${SRCS} battery/lowbattery.c)
-#      SET(SRCS ${SRCS} cooldown/cooldown.c)
+IF(WATCHDOG_POPUP STREQUAL on)
        SET(SRCS ${SRCS} watchdog/watchdog.c)
-       SET(SRCS ${SRCS} datausage/datausage.c)
-
-       IF("$ENV{CFLAGS}" MATCHES "-DSYSTEM_APPS_CIRCLE")
-               SET(SRCS ${SRCS} common/popup-ui-micro-circle.c)
-       ELSE()
-               IF("$ENV{CFLAGS}" MATCHES "-DSYSTEM_APPS_MICRO_3")
-                       SET(SRCS ${SRCS} common/popup-ui-micro-b3.c)
-               ELSE()
-                       SET(SRCS ${SRCS} common/popup-ui-micro-b2.c)
-               ENDIF()
+ENDIF()
+
+IF(BATTERY_POPUP STREQUAL on)
+       IF(PROFILE_WEARABLE)
+               SET(SRCS ${SRCS} battery/lowbattery-micro.c)
+       ENDIF()
+       IF (PROFILE_MOBILE)
+               SET(SRCS ${SRCS} battery/lowbattery-mobile.c)
        ENDIF()
+ENDIF(BATTERY_POPUP STREQUAL on)
+
+IF(STORAGE_POPUP STREQUAL on)
+       IF(PROFILE_WEARABLE)
+               SET(SRCS ${SRCS} storage/lowstorage-micro.c)
+       ENDIF()
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} storage/lowstorage-mobile.c)
+       ENDIF()
+ENDIF(STORAGE_POPUP STREQUAL on)
+
+IF(COOLDOWN_POPUP STREQUAL on)
+       IF(PROFILE_WEARABLE)
+               SET(SRCS ${SRCS} cooldown/cooldown-micro.c)
+       ENDIF()
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} cooldown/cooldown-mobile.c)
+       ENDIF()
+ENDIF(COOLDOWN_POPUP STREQUAL on)
+
+IF(DATAUSAGE_POPUP STREQUAL on)
+       IF(PROFILE_WEARABLE)
+               SET(SRCS ${SRCS} datausage/datausage-micro.c)
+       ENDIF()
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} datausage/datausage-mobile.c)
+       ENDIF()
+ENDIF(DATAUSAGE_POPUP STREQUAL on)
+
+IF(MMC_POPUP STREQUAL on)
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} mmc/mmc-mobile.c)
+       ENDIF()
+ENDIF(MMC_POPUP STREQUAL on)
+
+IF(ODE_POPUP STREQUAL on)
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} ode/ode-mobile.c)
+       ENDIF()
+ENDIF(ODE_POPUP STREQUAL on)
+
+IF(USB_POPUP STREQUAL on)
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} usb/usb-mobile.c
+                                                usb/usbotg-mobile.c
+                                                usb/usb-device.c)
+       ENDIF()
+ENDIF(USB_POPUP STREQUAL on)
+
+IF(RECOVERY_POPUP STREQUAL on)
+       IF(PROFILE_MOBILE)
+               SET(SRCS ${SRCS} recovery/recovery-mobile.c)
+       ENDIF()
+ENDIF(RECOVERY_POPUP STREQUAL on)
 
-ENDIF()
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/common)
@@ -52,7 +100,7 @@ pkg_check_modules(system_pkgs REQUIRED
                elementary
                deviced
                feedback
-               efl-assist
+               efl-extension
                appsvc
 )
 
@@ -60,35 +108,24 @@ FOREACH(flag ${system_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall -fpie")
 
 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
 
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
 
 ADD_EXECUTABLE(${PACKAGE} ${SRCS})
 
 TARGET_LINK_LIBRARIES(${PACKAGE} syspopup ${system_pkgs_LDFLAGS})
 
-ADD_CUSTOM_TARGET(system.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/system.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/system.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/system.edc
-)
-ADD_DEPENDENCIES(${PACKAGE} system.edj)
-
 INSTALL(TARGETS ${PACKAGE} DESTINATION ${BINDIR})
 
 # install manifest file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
 
 # install smack efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
-
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/system.edj DESTINATION ${RESDIR}/edje/system)
-
-INSTALL(FILES ${TABLE_PATH}/system-font.xml  DESTINATION ${RESDIR}/table)
-INSTALL(FILES ${TABLE_PATH}/system-color.xml DESTINATION ${RESDIR}/table)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE.Apache_v2 DESTINATION ${LICENSEDIR} RENAME ${PKGNAME})
 
 ############## END ##############
diff --git a/src/README b/src/README
new file mode 100644 (file)
index 0000000..f3396db
--- /dev/null
@@ -0,0 +1,516 @@
+*************************
+** System applications **
+*************************
+
+1. System applications contain popups, notifications, and so on.
+
+2. System applications are launched by dbus activation.
+  - Normally, system daemons want to launch popups or shows notification on the quickpanel.
+  - But these applications should be launched by aul(Application Utility Library)
+       to be managed by the AMD(Application Management Daemon) and the package manager
+       since user applications should be managed by application framework.
+  - System daemons cannot use aul since system daemons are the low level applications.
+    Thus system daemons used dbus activation to launch user applications
+
+  deviced ----------------> launcher app ------------------> popups/notifications
+           dbus activation                      aul
+
+
+3. Test
+
+3.1 Popups
+
+3.1.1. Power off popup
+  $ dbus-send --system --type=method_call --print-reply --reply-timeout=120000 \
+                       --dest=org.tizen.system.popup \
+                       /Org/Tizen/System/Popup/Poweroff \
+                       org.tizen.system.popup.Poweroff.PopupLaunch
+
+3.1.2 Crash popup
+   $ dbus-send --system --type=method_call --print-reply --reply-timeout=120000 \
+                       --dest=org.tizen.system.popup \
+                       /Org/Tizen/System/Popup/Crash \
+                       org.tizen.system.popup.Crash.PopupLaunch \
+                       dict:string:string:"_SYSPOPUP_CONTENT_","crash","_PROCESS_NAME_","poweroff-popup","_EXEPATH_","/usr/apps/org.tizen.poweroff-syspopup/bin/poweroff-popup"
+
+3.1.3 Low storage popup
+   $ dbus-send --system --type=method_call --print-reply --reply-timeout=120000 \
+                       --dest=org.tizen.system.popup \
+                       /Org/Tizen/System/Popup/System \
+                       org.tizen.system.popup.System.PopupLaunch \
+                       dict:string:string:"_SYSPOPUP_CONTENT_","lowstorage_warning"
+
+3.1.4 USB otg popup
+   $ dbus-send --system --type=method_call --print-reply --reply-timeout=120000 \
+                       --dest=org.tizen.system.popup \
+                       /Org/Tizen/System/Popup/System \
+                       org.tizen.system.popup.System.PopupLaunch \
+                       dict:string:string:"_SYSPOPUP_CONTENT_","usbotg_unmount_storage","_DEVICE_PATH_","/opt/storage/usb/UsbDeviceA1"
+
+3.2 Notifications
+
+3.2.1. Battery full notification
+3.2.1.1. Notification On
+   $ dbus-send --system --type=method_call --print-reply --reply-timeout=120000 \
+                       --dest=org.tizen.system.popup \
+                       /Org/Tizen/System/Popup/Noti \
+                       org.tizen.system.popup.Noti.BatteryFullNotiOn
+
+3.2.1.2. Notification Off
+   $ dbus-send --system --type=method_call --print-reply --reply-timeout=120000 \
+                       --dest=org.tizen.system.popup \
+                       /Org/Tizen/System/Popup/Noti \
+                       org.tizen.system.popup.Noti.BatteryFullNotiOff \
+                       int32:1     /* This value is the return value of notification On operation */
+
+
+4. Interfaces
+
+4.1 Popups
+
+4.1.1 Special popups
+- Poweroff popup
+  bus: org.tizen.system.popup
+  object path: /Org/Tizen/System/Popup/Poweroff
+  interface name: org.tizen.system.popup.Poweroff
+  method name: PopupLaunch
+  parameters: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+         2) "poweroff"
+  return: pid of the popup
+
+- Crash popup
+  bus: org.tizen.system.popup
+  object path: /Org/Tizen/System/Popup/Crash
+  interface name: org.tizen.system.popup.Crash
+  method name: PopupLaunch
+  parameters: 6 strings
+      1) "_SYSPOPUP_CONTENT_"
+         2) "crash"
+         3) "_PROCESS_NAME_"
+         4) ${process name}
+         5) "_EXEPATH_"
+         6) ${path of executable file}
+  return: pid of the popup
+
+4.1.2. normal popups
+- common:
+  bus: org.tizen.system.popup
+  object path: /Org/Tizen/System/Popup/System
+  interface name: org.tizen.system.popup.System
+
+- Battery
+  : low battery warning
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "lowbattery_warning"
+    return: pid of the popup
+
+  : low battery critical
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "lowbattery_critical"
+    return: pid of the popup
+
+  : low battery poweroff
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "lowbattery_poweroff"
+    return: pid of the popup
+
+  : charge failed due to the low temperature
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "chargeerrlow"
+    return: pid of the popup
+
+  : charge failed due to the high temperature
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "chargeerrhigh"
+    return: pid of the popup
+
+  : battery disconnected
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "battdisconnect"
+    return: pid of the popup
+  : remove battery related popups
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "remove_battery_popups"
+    return: 0 if success
+
+
+- Cool down
+  : cool down power off
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "cooldown_poweroff"
+    return: pid of the popup
+
+  : cool down warning
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "cooldown_warning"
+    return: pid of the popup
+
+  : cool down power on
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "cooldown_poweron"
+    return: pid of the popup
+
+- Data usage
+  : data usage warning
+    method name: PopupLaunch
+    parameter: 4 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "datausage_warning"
+         3) "_DATAUSAGE_LIMIT_"
+         4) data limit (MB)
+    return: pid of the popup
+
+  : data usage disabled
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "datausage_disabled"
+    return: pid of the popup
+
+- MMC (SD card)
+  : mmc mount error
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "mounterr"
+    return: pid of the popup
+
+  : mmc mount read only
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "mountrdonly"
+    return: pid of the popup
+
+  : mmc check smack
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "checksmack"
+    return: pid of the popup
+
+  : ode encryption
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "odeencrypt"
+    return: pid of the popup
+
+  : ode decryption
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "odedecrypt"
+    return: pid of the popup
+
+- ODE
+  : ODE error
+    method name: PopupLaunch
+    parameter: 6 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "ode_error"
+      3) "_ERROR_TYPE_"
+      4) "encrypt" or "decrypt"
+      5) "_MEMORY_SPACE_"
+      6) memory space needed (MB)
+    return: pid of the popup
+
+- Recovery
+  : Recovery
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "recovery"
+    return: pid of the popup
+
+- Storage
+  : Low storage warning
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "lowstorage_warning"
+    return: pid of the popup
+
+  : Low storage critical
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "lowstorage_critical"
+    return: pid of the popup
+
+  : Low storage full
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "lowstorage_full"
+    return: pid of the popup
+
+- USB
+  : USB connection error
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usb_error"
+    return: pid of the popup
+
+  : USB connection restriction
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usb_restrict"
+    return: pid of the popup
+
+- USB otg
+  : USB storage mounted
+    method name: PopupLaunch
+    parameter: 4 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_storage_mounted"
+      3) "_DEVICE_PATH_"
+      4) device name (ex. sda1)
+    return: pid of the popup
+
+  : USB storage unmounted
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_storage_unmounted"
+    return: 0 if success
+
+  : Unmount USB storage
+    method name: PopupLaunch
+    parameter: 4 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_unmount_storage"
+      3) "_DEVICE_PATH_"
+      4) device name (ex. sda1)
+    return: pid of the popup
+
+  : USB storage mount failed
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_storage_mount_failed"
+    return: pid of the popup
+
+  : USB storage removed unsafe
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_storage_removed_unsafe"
+    return: pid of the popup
+
+  : USB camera added
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_camera_added"
+    return: pid of the popup
+
+  : USB camera removed
+    method name: PopupLaunch
+    parameter: 2 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "usbotg_camera_removed"
+    return: 0 if success
+
+- Watchdog
+  : Watchdog
+    method name: PopupLaunch
+    parameter: 4 strings
+      1) "_SYSPOPUP_CONTENT_"
+      2) "watchdog"
+      3) "_APP_NAME_"
+      4) application name
+    return: pid of the popup
+
+
+4.2. Notifications
+- Common
+  bus: org.tizen.system.popup
+  object path: /Org/Tizen/System/Popup/Noti
+  interface name: org.tizen.system.popup.Noti
+
+- Data warning
+  : On
+    method name: DataWarningNotiOn
+    parameter: No parameter
+    return: notification id
+  : Off
+    method name: DataWarningNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- Data disabled
+  : On
+    method name: DataDisabledNotiOn
+    parameter: No parameter
+       return: notification id
+  : Off
+    method name: DataDisabledNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- LED torch
+  : On
+    method name: LedTorchNotiOn
+    parameter: No parameter
+       return: notification id
+  : Off
+    method name: LedTorhNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- ODE complete
+  : On
+    method name: OdeCompNotiOn
+    parameter: 1 string
+         1) "encrypt" or "decrypt"
+    return: notification id
+  : Off
+    method name: OdeCompNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- ODE progress (encryption/decryption progress bar)
+  : On
+    method name: OdeProgNotiOn
+    parameter: 1 string
+         1) "encrypt" or "decrypt"
+    return: notification id
+  : update
+       method name: OdeProgNotiUpdate
+       parameter: 2 integers
+         1) notification id  /* the return value of notification On operation */
+         2) percentage of progress (ex. 100%->100, 23%->23)
+    return: notification id
+  : Off
+    method name: OdeProgNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+ - ODE error
+  : On
+    method name: OdeErrorNotiOn
+    parameter: 1 string, 2 integers
+         1) "encrypt" or "decrypt"
+         2) 0(not enough space) or 1(operation failed)
+         3) memory space (MB)
+    return: notification id
+  : Off
+    method name: OdeErrorNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- USB storage
+  : On
+    method name: UsbStorageNotiOn
+    parameter: 1 string
+         1) mount path (ex. /opt/storage/usb/UsbDeviceA1)
+    return: notification id
+  : Read only On
+    method name: UsbStorageRoNotiOn
+    parameter: 1 string
+         1) mount path (ex. /opt/storage/usb/UsbDeviceA1)
+    return: notification id
+  : Off
+    method name: UsbStorageNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- USB device
+  : On
+    method name: UsbDeviceNotiOn
+    parameter: 2 strings
+         1) device type (ex. keyboard, mouse, camera, and so on)
+         2) device name (from device information. ex. Samsung SM-750)
+    return: notification id
+  : update
+       method name: UsbDeviceNotiUpdate
+       parameter: 1 integer, 3 strings
+         1) notification id  /* the return value of notification On operation */
+         2) number of connected devices (ex. 0, 1, 2, ...)
+         3) device type (ex. keyboard, mouse, camera, and so on)
+         4) device name (from device information. ex. Samsung SM-750)
+    return: notification id
+  : Off
+    method name: UsbDeviceNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- Battery full
+  : On
+    method name: BatteryFullNotiOn
+    parameter: No parameter
+    return: notification id
+  : Off
+    method name: BatteryFullNotiOff
+    parameter: 1 integer
+      1) notification id  /* the return value of notification On operation */
+    return: 0 if success, negative value if error occurred
+
+- Battery start to charge
+  : On
+    method name: BatteryChargeNotiOn
+    parameter: No parameter
+    return: 0 if success, negative value if error occurred
+
+- Message post
+  : On
+    method name: MessagePostOn
+    parameter: 1 string
+         1) type (ex. "KeyboardConnected", "UsbClient", and so on)
+    return: 0 if success, negative value if error occurred
+
+4.3. Normal applications
+
+- Common
+  bus: org.tizen.system.popup
+  object path: /Org/Tizen/System/Popup/Apps
+  interface name: org.tizen.system.popup.Apps
+
+- Terminate app
+  method name: AppTerminateByPid
+  parameter: 1 integer
+    1) pid of the app
+  return: 0 if success, negative value if error occurred
+
+- Cradle app
+  method name: CradleAppLaunch
+  parameter: No parameter
+  return: 0 if success, negative value if error occurred
+
+- pwlock app
+  method name: PWLockAppLaunch
+  parameter: 2 strings
+    1) "launch-app"
+    2) "pwlock"
diff --git a/src/battery/lowbattery-micro.c b/src/battery/lowbattery-micro.c
new file mode 100755 (executable)
index 0000000..a5c8034
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+static const struct popup_ops lowbattery_warning_ops;
+static const struct popup_ops lowbattery_critical_ops;
+
+static void remove_other_lowbattery_popups(const struct popup_ops *ops)
+{
+       if (ops != &lowbattery_warning_ops)
+               unload_simple_popup(&lowbattery_warning_ops);
+
+       if (ops != &lowbattery_critical_ops)
+               unload_simple_popup(&lowbattery_critical_ops);
+}
+
+static const struct popup_ops lowbattery_warning_ops = {
+       .name           = "lowbattery_warning",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_ST_POP_THE_BATTERY_POWER_IS_LOW_RECHARGE_YOUR_GEAR_SOON_TO_KEEP_USING_IT",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowbattery_popups,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops lowbattery_critical_ops = {
+       .name           = "lowbattery_critical",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_ST_POP_THE_BATTERY_POWER_IS_CRITICALLY_LOW_RECHARGE_YOUR_GEAR_NOW_TO_KEEP_USING_IT",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowbattery_popups,
+       .flags          = SCROLLABLE,
+};
+
+/* Constructor to register lowbattery button */
+static __attribute__ ((constructor)) void lowbattery_register_popup(void)
+{
+       register_popup(&lowbattery_warning_ops);
+       register_popup(&lowbattery_critical_ops);
+}
diff --git a/src/battery/lowbattery-mobile.c b/src/battery/lowbattery-mobile.c
new file mode 100755 (executable)
index 0000000..d1306ea
--- /dev/null
@@ -0,0 +1,212 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+#define DEVICED_PATH_SYSNOTI        "/Org/Tizen/System/DeviceD/SysNoti"
+#define DEVICED_INTERFACE_SYSNOTI   "org.tizen.system.deviced.SysNoti"
+#define SIGNAL_CHARGEERR_RESPONSE   "ChargeErrResponse"
+
+static const struct popup_ops lowbattery_warning_ops;
+static const struct popup_ops lowbattery_critical_ops;
+static const struct popup_ops lowbattery_poweroff_ops;
+static const struct popup_ops charge_error_low_ops;
+static const struct popup_ops charge_error_high_ops;
+static const struct popup_ops battery_disconnected_ops;
+
+static void remove_other_lowbattery_popups(const struct popup_ops *ops)
+{
+       if (ops != &lowbattery_warning_ops)
+               unload_simple_popup(&lowbattery_warning_ops);
+
+       if (ops != &lowbattery_critical_ops)
+               unload_simple_popup(&lowbattery_critical_ops);
+
+       if (ops != &lowbattery_poweroff_ops)
+               unload_simple_popup(&lowbattery_poweroff_ops);
+}
+
+static void remove_other_charge_popups(const struct popup_ops *ops)
+{
+       if (ops != &charge_error_low_ops)
+               unload_simple_popup(&charge_error_low_ops);
+
+       if (ops != &charge_error_high_ops)
+               unload_simple_popup(&charge_error_high_ops);
+
+       if (ops != &battery_disconnected_ops)
+               unload_simple_popup(&battery_disconnected_ops);
+}
+
+static void charger_status_changed(keynode_t *key, void *data)
+{
+       int status;
+       const struct popup_ops *ops = data;
+
+       status = vconf_keynode_get_int(key);
+       if (status != VCONFKEY_SYSMAN_CHARGER_CONNECTED)
+               return;
+
+       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
+                               charger_status_changed) < 0)
+               _E("Failed to release vconf key handler");
+
+       unload_simple_popup(ops);
+
+       terminate_if_no_popup();
+}
+
+static void unregister_charger_status_handler(void)
+{
+       vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
+                               charger_status_changed);
+}
+
+static void register_charger_status_handler(const struct popup_ops *ops)
+{
+       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
+                               charger_status_changed, (void *)ops) < 0)
+               _E("Failed to register vconf key handler");
+}
+
+static void lowbattery_launch(const struct popup_ops *ops)
+{
+       unregister_charger_status_handler();
+       remove_other_lowbattery_popups(ops);
+       register_charger_status_handler(ops);
+}
+
+static void lowbattery_terminate(const struct popup_ops *ops)
+{
+       unregister_charger_status_handler();
+}
+
+static void poweroff_clicked(const struct popup_ops *ops)
+{
+       _I("Power off the phone");
+       unload_simple_popup(ops);
+
+       if (vconf_set_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS,
+                               VCONFKEY_SYSMAN_POWER_OFF_DIRECT) != 0)
+               _E("Failed to request poweroff to deviced");
+
+       terminate_if_no_popup();
+}
+
+static void charge_error_ok_clicked(const struct popup_ops *ops)
+{
+       _I("OK is selected");
+       unload_simple_popup(ops);
+
+       if (broadcast_dbus_signal(DEVICED_PATH_SYSNOTI,
+                               DEVICED_INTERFACE_SYSNOTI,
+                               SIGNAL_CHARGEERR_RESPONSE,
+                               NULL, NULL) < 0)
+               _E("Failed to send signal");
+
+       terminate_if_no_popup();
+}
+
+static int remove_battery_popups(bundle *b, const struct popup_ops *ops)
+{
+       _I("Remove battery related popups");
+       unload_simple_popup(&lowbattery_critical_ops);
+       unload_simple_popup(&lowbattery_warning_ops);
+       unload_simple_popup(&lowbattery_poweroff_ops);
+       unload_simple_popup(&charge_error_low_ops);
+       unload_simple_popup(&charge_error_high_ops);
+       unload_simple_popup(&battery_disconnected_ops);
+       terminate_if_no_popup();
+       return 0;
+}
+
+static const struct popup_ops lowbattery_warning_ops = {
+       .name           = "lowbattery_warning",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_COM_POP_BATTERYLOW",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = lowbattery_launch,
+       .terminate      = lowbattery_terminate,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops lowbattery_critical_ops = {
+       .name           = "lowbattery_critical",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_COM_POP_BATTERYLOW",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = lowbattery_launch,
+       .terminate      = lowbattery_terminate,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops lowbattery_poweroff_ops = {
+       .name           = "lowbattery_poweroff",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN",
+       .left_text      = "IDS_COM_SK_OK",
+       .left           = poweroff_clicked,
+       .launch         = lowbattery_launch,
+       .terminate  = lowbattery_terminate,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops battery_remove_ops = {
+       .name           = "remove_battery_popups",
+       .show_popup     = remove_battery_popups,
+};
+
+static const struct popup_ops charge_error_low_ops = {
+       .name           = "chargeerrlow",//"charge_error_low",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_LOW",
+       .left_text      = "IDS_COM_SK_OK",
+       .left           = charge_error_ok_clicked,
+       .launch         = remove_other_charge_popups,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops charge_error_high_ops = {
+       .name           = "chargeerrhigh",//"charge_error_high",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_QP_BODY_CHARGING_PAUSED_BATTERY_TEMPERATURE_TOO_HIGH",
+       .left_text      = "IDS_COM_SK_OK",
+       .left           = charge_error_ok_clicked,
+       .launch         = remove_other_charge_popups,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops battery_disconnected_ops = {
+       .name           = "battdisconnect",//"battery_disconnected",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_COM_POP_BATTERY_DISCONNECTED_ABB",
+       .left_text      = "IDS_COM_SK_OK",
+       .flags          = SCROLLABLE,
+};
+
+/* Constructor to register lowbattery button */
+static __attribute__ ((constructor)) void lowbattery_register_popup(void)
+{
+       register_popup(&lowbattery_warning_ops);
+       register_popup(&lowbattery_critical_ops);
+       register_popup(&lowbattery_poweroff_ops);
+       register_popup(&charge_error_low_ops);
+       register_popup(&charge_error_high_ops);
+       register_popup(&battery_disconnected_ops);
+}
diff --git a/src/battery/lowbattery.c b/src/battery/lowbattery.c
deleted file mode 100755 (executable)
index 7033a9e..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2014 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 "popup-common.h"
-
-static bool lowbattery_check_skip_status(const struct popup_ops *ops)
-{
-       int ret, val;
-
-       ret = vconf_get_int(VCONFKEY_SYSMAN_CHARGER_STATUS, &val);
-       if (ret == 0 && val == VCONFKEY_SYSMAN_CHARGER_CONNECTED)
-               return true;
-
-       return false;
-}
-
-static void charger_status_changed(keynode_t *key, void *data)
-{
-       int status;
-       const struct popup_ops *ops = data;
-
-       status = vconf_keynode_get_int(key);
-       if (status == VCONFKEY_SYSMAN_CHARGER_CONNECTED) {
-               unload_simple_popup(ops);
-               terminate_if_no_popup();
-       }
-}
-
-static void battery_status_changed(keynode_t *key, void *data)
-{
-       int status;
-       const struct popup_ops *ops = data;
-
-       status = vconf_keynode_get_int(key);
-       _I("BATTERY status: %d", status);
-       if (status == VCONFKEY_SYSMAN_BAT_NORMAL ||
-               status == VCONFKEY_SYSMAN_BAT_FULL) {
-               unload_simple_popup(ops);
-               terminate_if_no_popup();
-       }
-}
-
-static void lowbattery_add_handler(const struct popup_ops *ops)
-{
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                               charger_status_changed, (void *)ops) < 0)
-               _E("Falied to add vconf key handler");
-
-       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                               battery_status_changed, (void *)ops) < 0)
-               _E("Falied to add vconf key handler");
-}
-
-static void lowbattery_remove_handler(const struct popup_ops *ops)
-{
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_CHARGER_STATUS,
-                               charger_status_changed) < 0)
-               _E("Falied to release vconf key handler");
-
-       if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
-                               battery_status_changed) < 0)
-               _E("Falied to release vconf key handler");
-}
-
-static const struct popup_ops lowbattery_warning_ops = {
-       .name           = "lowbattery_warning",
-       .show_popup     = load_simple_popup,
-       .skip           = lowbattery_check_skip_status,
-       .launch         = lowbattery_add_handler,
-       .terminate      = lowbattery_remove_handler,
-       .content        = "IDS_ST_POP_THE_BATTERY_POWER_IS_LOW_RECHARGE_YOUR_GEAR_SOON_TO_KEEP_USING_IT",
-       .left_text      = "IDS_COM_SK_OK",
-       .left_icon      = "circle-ok.png",
-       .flags          = SCROLLABLE,
-};
-
-static const struct popup_ops lowbattery_critical_ops = {
-       .name           = "lowbattery_critical",
-       .show_popup     = load_simple_popup,
-       .skip           = lowbattery_check_skip_status,
-       .launch         = lowbattery_add_handler,
-       .terminate      = lowbattery_remove_handler,
-       .content        = "IDS_ST_POP_THE_BATTERY_POWER_IS_CRITICALLY_LOW_RECHARGE_YOUR_GEAR_NOW_TO_KEEP_USING_IT",
-       .left_text      = "IDS_COM_SK_OK",
-       .left_icon      = "circle-ok.png",
-       .flags          = SCROLLABLE,
-};
-
-/* Constructor to register lowbattery button */
-static __attribute__ ((constructor)) void lowbattery_register_popup(void)
-{
-       int val;
-
-       if (vconf_get_int(VCONFKEY_TESTMODE_LOW_BATT_POPUP, &val) == 0
-                       && val == 1)
-               return;
-
-       register_popup(&lowbattery_warning_ops);
-       register_popup(&lowbattery_critical_ops);
-}
index d43155e..03723ee 100644 (file)
@@ -100,6 +100,9 @@ static int load_popup_by_type(bundle *b)
                if (strncmp (type, obj->ops->name, strlen(type)))
                        continue;
 
+               if (obj->ops->change_popup)
+                       obj->ops->change_popup(obj->ops);
+
                if (obj->ops->skip && obj->ops->skip(obj->ops)) {
                        terminate_if_no_popup();
                        return 0;
@@ -174,7 +177,19 @@ static int app_terminate(void *data)
 
 static int app_pause(void *data)
 {
-       popup_terminate();
+       GList *l;
+       struct object_ops *obj;
+
+       for (l = popup_list ; l ; l = g_list_next(l)) {
+               obj = (struct object_ops *)(l->data);
+               if (obj && obj->ops) {
+                       if (obj->ops->term_pause == NULL
+                                       || obj->ops->term_pause(obj->ops)) {
+                               unload_simple_popup(obj->ops);
+                       }
+               }
+       }
+       terminate_if_no_popup();
        return 0;
 }
 
diff --git a/src/common/macro.h b/src/common/macro.h
new file mode 100755 (executable)
index 0000000..597a5c7
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * popup-launcher
+ *
+ * Copyright (c) 2013 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 __MACRO_H__
+#define __MACRO_H__
+
+#include <dlog.h>
+
+#undef LOG_TAG
+#define LOG_TAG "SYSTEM_APPS"
+#define _D(fmt, args...)   SLOGD(fmt, ##args)
+#define _E(fmt, args...)   SLOGE(fmt, ##args)
+#define _I(fmt, args...)   SLOGI(fmt, ##args)
+
+#define FREE(arg) \
+       do { \
+               if(arg) { \
+                       free((void *)arg); \
+                       arg = NULL; \
+               } \
+       } while (0);
+
+#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
+
+#define max(a,b) \
+       ({ __typeof__ (a) _a = (a); \
+        __typeof__ (b) _b = (b);  \
+        _a > _b ? _a : _b; })
+
+#define RETRY_MAX 10
+#define SLEEP_USEC 200000
+
+/* DBus paths, interfaces */
+#define BUS_NAME                               "org.tizen.system.popup"
+#define POPUP_DBUS_PATH                        "/Org/Tizen/System/Popup"
+#define POPUP_DBUS_IFACE               BUS_NAME
+
+#define POPUP_PATH_NOTI                        POPUP_DBUS_PATH"/Noti"
+#define POPUP_IFACE_NOTI               BUS_NAME".Noti"
+
+#define POPUP_PATH_SYSTEM              POPUP_DBUS_PATH"/System"
+#define POPUP_IFACE_SYSTEM             BUS_NAME".System"
+
+#define POPUP_PATH_POWEROFF            POPUP_DBUS_PATH"/Poweroff"
+#define POPUP_IFACE_POWEROFF   BUS_NAME".Poweroff"
+
+#define POPUP_PATH_CRASH               POPUP_DBUS_PATH"/Crash"
+#define POPUP_IFACE_CRASH              BUS_NAME".Crash"
+
+#define POPUP_PATH_APP                 POPUP_DBUS_PATH"/Apps"
+#define POPUP_IFACE_APP                        BUS_NAME".Apps"
+
+/* App to launch a popup on a notification */
+#define SYSTEM_SIGNAL_SENDER          "org.tizen.system-signal-sender"
+#define SIGNAL_SENDER_TYPE            "_SIGNAL_TYPE_"
+#define SIGNAL_SENDER_TYPE_RECOVERY   "recovery-popup"
+#define SIGNAL_SENDER_TYPE_USBSTORAGE_UNMOUNT "usbstorage-unmount-popup"
+#define SIGNAL_SENDER_TYPE_ENCRYPT    ODE_ENCRYPT
+#define SIGNAL_SENDER_TYPE_DECRYPT    ODE_DECRYPT
+#define SIGNAL_SENDER_TYPE_ODE_UG     "ode-setting-ug"
+#define SIGNAL_SENDER_DEVICE_PATH     "_DEVICE_PATH_"
+#define SIGNAL_SENDER_ERROR_TYPE      "_ERROR_TYPE_"
+#define SIGNAL_SENDER_MEMORY_SPACE    "_MEMORY_SPACE_"
+
+/* ODE */
+#define ODE_ENCRYPT "encrypt"
+#define ODE_DECRYPT "decrypt"
+
+#endif /* __MACRO_H__ */
+
index 92d0b7c..ac4b775 100644 (file)
@@ -34,7 +34,9 @@
 #include <syspopup_caller.h>
 #include <feedback.h>
 #include <E_DBus.h>
-#include <efl_assist.h>
+#include <efl_extension.h>
+#include <bundle.h>
+#include <bundle_internal.h>
 
 enum win_priority {
        WIN_PRIORITY_LOW    = UTILX_NOTIFICATION_LEVEL_LOW,
index 2f74250..87f1891 100755 (executable)
@@ -53,7 +53,6 @@ void play_feedback(int type, int pattern)
        }
 
        switch (type) {
-       case FEEDBACK_TYPE_LED:
        case FEEDBACK_TYPE_SOUND:
        case FEEDBACK_TYPE_VIBRATION:
                ret = feedback_play_type(type, pattern);
@@ -221,7 +220,7 @@ out:
        return ret;
 }
 
-int dbus_method_sync(const char *dest, const char *path,
+int popup_dbus_method_sync(const char *dest, const char *path,
                const char *interface, const char *method,
                const char *sig, char *param[])
 {
@@ -282,3 +281,48 @@ out:
        return ret;
 }
 
+void unregister_dbus_signal_handler(E_DBus_Signal_Handler *handler)
+{
+       E_DBus_Connection *conn;
+
+       if (!handler)
+               return;
+
+       conn = get_dbus_connection();
+       if (!conn) {
+               _E("Failed to get dbus connection");
+               return;
+       }
+
+       e_dbus_signal_handler_del(conn, handler);
+}
+
+int register_dbus_signal_handler(
+               E_DBus_Signal_Handler **handler,
+               const char *path,
+               const char *iface,
+               const char *name,
+               void (*signal_cb)(void *data, DBusMessage *msg),
+               void *data)
+{
+       E_DBus_Connection *conn;
+       E_DBus_Signal_Handler *h;
+
+       if (!handler || !path || !iface || !name || !signal_cb)
+               return -EINVAL;
+
+       conn = get_dbus_connection();
+       if (!conn) {
+               _E("Failed to get dbus connection");
+               return -ENOMEM;
+       }
+
+       h = e_dbus_signal_handler_add(conn, NULL, path, iface, name, signal_cb, data);
+       if (!h)
+               return -ECONNREFUSED;
+
+       *handler = h;
+
+       return 0;
+}
+
index ce7f5cc..135b67f 100644 (file)
 #define __POPUP_COMMON_H__
 
 #include "popup-common-internal.h"
-
-#undef LOG_TAG
-#define LOG_TAG "SYSTEM_APPS"
-#define _D(fmt, args...)   SLOGD(fmt, ##args)
-#define _E(fmt, args...)   SLOGE(fmt, ##args)
-#define _I(fmt, args...)   SLOGI(fmt, ##args)
-
-#define FREE(arg) \
-       do { \
-               if(arg) { \
-                       free((void *)arg); \
-                       arg = NULL; \
-               } \
-       } while (0);
-
-#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
-
-#define max(a,b) \
-       ({ __typeof__ (a) _a = (a); \
-          __typeof__ (b) _b = (b);  \
-          _a > _b ? _a : _b; })
+#include "macro.h"
 
 enum popup_flags {
        SCROLLABLE        = 0x0001,
@@ -52,20 +32,21 @@ enum popup_flags {
 
 struct popup_ops {
        char *name;
+       void (*change_popup)(const struct popup_ops *ops);
        int  (*show_popup) (bundle *b, const struct popup_ops *ops);
        char *title;
        char *content;
        int  (*get_content)(const struct popup_ops *ops, char *content, unsigned int len);
        char *left_text;
-       char *left_icon;
        void (*left)(const struct popup_ops *ops);
        char *right_text;
-       char *right_icon;
        void (*right)(const struct popup_ops *ops);
        char *check_text;
        bool (*skip)(const struct popup_ops *ops);
        void (*launch)(const struct popup_ops *ops);
        void (*terminate)(const struct popup_ops *ops);
+       bool (*term_pause)(const struct popup_ops *ops);
+       bool (*term_home)(const struct popup_ops *ops);
        unsigned int flags;
 };
 
@@ -74,6 +55,7 @@ void terminate_if_no_popup(void);
 
 /* Popup */
 void register_popup(const struct popup_ops *ops);
+void update_popup(const struct popup_ops *old_ops, const struct popup_ops *new_ops);
 void unload_simple_popup(const struct popup_ops *ops);
 int load_simple_popup(bundle *b, const struct popup_ops *ops);
 bool get_check_state(const struct popup_ops *ops);
@@ -88,13 +70,21 @@ int broadcast_dbus_signal(
                const char *name,
                const char *sig,
                char *param[]);
-int dbus_method_sync(
+int popup_dbus_method_sync(
                const char *dest,
                const char *path,
                const char *interface,
                const char *method,
                const char *sig,
                char *param[]);
+int register_dbus_signal_handler(
+               E_DBus_Signal_Handler **handler,
+               const char *path,
+               const char *iface,
+               const char *name,
+               void (*signal_cb)(void *data, DBusMessage *msg),
+               void *data);
+void unregister_dbus_signal_handler(E_DBus_Signal_Handler *handler);
 
 /* feedback */
 void play_feedback(int type, int pattern);
diff --git a/src/common/popup-ui-micro-b2.c b/src/common/popup-ui-micro-b2.c
deleted file mode 100755 (executable)
index 6b32197..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2014 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 "popup-ui.h"
-
-int load_normal_popup(const struct popup_ops *ops)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       Evas_Object *label;
-       Evas_Object *scroller;
-       Evas_Object *win;
-       char *text;
-       struct object_ops *obj;
-       int ret;
-
-       if (!ops)
-               return -EINVAL;
-
-       ret = get_object_by_ops(ops, &obj);
-       if (ret < 0) {
-               _E("Failed to get object (%d)", ret);
-               return -EINVAL;
-       }
-
-       win = get_window();
-       if (!win)
-               return -ENOMEM;
-
-       evas_object_show(win);
-
-       popup = elm_popup_add(win);
-       if (!popup)
-               return -ENOMEM;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       if (ops->title)
-               elm_object_part_text_set(popup, "title,text", _(ops->title));
-
-       scroller = elm_scroller_add(popup);
-       if (!scroller)
-               return -ENOMEM;
-       elm_object_style_set(scroller, "effect");
-       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(popup, scroller);
-       evas_object_show(scroller);
-
-       label = elm_label_add(scroller);
-       if (!label)
-               return -ENOMEM;
-       elm_object_style_set(label, "popup/default");
-       elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
-
-       if (ops->content) {
-               text = elm_entry_utf8_to_markup(_(ops->content));
-               if (!text)
-                       return -ENOMEM;
-               elm_object_text_set(label, text);
-               free(text);
-       }
-
-       evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_object_content_set(scroller, label);
-       evas_object_show(label);
-
-       if (ops->left_text) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               if (lbtn) {
-                       elm_object_text_set(lbtn, _(ops->left_text));
-                       elm_object_style_set(lbtn, "popup");
-                       elm_object_part_content_set(popup, "button1", lbtn);
-                       evas_object_smart_callback_add(lbtn, "clicked", left_clicked, ops);
-               }
-       }
-
-       if (ops->right_text) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               if (rbtn) {
-                       elm_object_text_set(rbtn, _(ops->right_text));
-                       elm_object_style_set(rbtn, "popup");
-                       elm_object_part_content_set(popup, "button2", rbtn);
-                       evas_object_smart_callback_add(rbtn, "clicked", right_clicked, ops);
-               }
-       }
-
-       evas_object_show(popup);
-
-       obj->popup = popup;
-
-       return 0;
-}
diff --git a/src/common/popup-ui-micro-circle.c b/src/common/popup-ui-micro-circle.c
deleted file mode 100755 (executable)
index 2df2b76..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2015 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 "popup-ui.h"
-
-#define BUF_MAX 512
-
-int load_normal_popup(const struct popup_ops *ops)
-{
-       Evas_Object *lbtn;
-       Evas_Object *licon;
-       Evas_Object *rbtn;
-       Evas_Object *ricon;
-       Evas_Object *popup;
-       Evas_Object *layout;
-       Evas_Object *win;
-       char content[BUF_MAX];
-       struct object_ops *obj;
-       int ret;
-
-       if (!ops)
-               return -EINVAL;
-
-       ret = get_object_by_ops(ops, &obj);
-       if (ret < 0) {
-               _E("Failed to get object (%d)", ret);
-               return -EINVAL;
-       }
-
-       win = get_window();
-       if (!win)
-               return -ENOMEM;
-       evas_object_show(win);
-
-       popup = elm_popup_add(win);
-       if (!popup) {
-               _E("popup is NULL. eext_circle_popup_layout_add failed");
-               return -ENOMEM;
-       }
-       elm_object_style_set(popup, "circle");
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       layout = elm_layout_add(popup);
-       if (ops->title)
-               elm_object_part_text_set(layout, "elm.text.title", _(ops->title));
-
-       if (ops->content)
-               snprintf(content, sizeof(content), "%s", _(ops->content));
-       else if (ops->get_content) {
-               ret = ops->get_content(ops, content, sizeof(content));
-               if (ret < 0) {
-                       _E("Failed to get popup content");
-                       return ret;
-               }
-       } else
-               return -ENOENT;
-
-       elm_object_content_set(popup, layout);
-
-       if (ops->left_text && !ops->right_text) {
-               elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons1");
-               elm_object_part_text_set(layout, "elm.text", content);
-               elm_object_content_set(popup, layout);
-
-               if (ops->left_icon) {
-
-                       /* one button */
-                       lbtn = elm_button_add(popup);
-                       if (lbtn) {
-                               elm_object_text_set(lbtn, _(ops->left_text));
-                               elm_object_style_set(lbtn, "popup/circle");
-                               elm_object_part_content_set(popup, "button1", lbtn);
-                               evas_object_smart_callback_add(lbtn, "clicked", left_clicked, ops);
-                       }
-                       licon = elm_image_add(lbtn);
-                       if (licon) {
-                               elm_image_file_set(licon, EDJ_NAME, ops->left_icon);
-                               evas_object_size_hint_weight_set(licon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-                               elm_object_part_content_set(lbtn, "elm.swallow.content", licon);
-                               evas_object_show(licon);
-                       }
-
-               }
-       } else {
-               elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2");
-               elm_object_part_text_set(layout, "elm.text", _(ops->content));
-               elm_object_content_set(popup, layout);
-
-               if (ops->left_text && ops->left_icon) {
-                       /* Left button */
-                       lbtn = elm_button_add(popup);
-                       if (lbtn) {
-                               elm_object_text_set(lbtn, _(ops->left_text));
-                               elm_object_style_set(lbtn, "popup/circle/left");
-                               elm_object_part_content_set(popup, "button1", lbtn);
-                               evas_object_smart_callback_add(lbtn, "clicked", left_clicked, ops);
-                       }
-                       licon = elm_image_add(lbtn);
-                       if (licon) {
-                               elm_image_file_set(licon, EDJ_NAME, ops->left_icon);
-                               evas_object_size_hint_weight_set(licon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-                               elm_object_part_content_set(lbtn, "elm.swallow.content", licon);
-                               evas_object_show(licon);
-                       }
-
-               }
-
-               if (ops->right_text && ops->right_icon) {
-                       /* Right button */
-                       rbtn = elm_button_add(popup);
-                       if (rbtn) {
-                               elm_object_text_set(rbtn, _(ops->right_text));
-                               elm_object_style_set(rbtn, "popup/circle/right");
-                               elm_object_part_content_set(popup, "button2", rbtn);
-                               evas_object_smart_callback_add(rbtn, "clicked", right_clicked, ops);
-                       }
-                       ricon = elm_image_add(rbtn);
-                       if (ricon) {
-                               elm_image_file_set(ricon, EDJ_NAME, ops->right_icon);
-                               evas_object_size_hint_weight_set(ricon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-                               elm_object_part_content_set(rbtn, "elm.swallow.content", ricon);
-                               evas_object_show(ricon);
-                       }
-
-               }
-       }
-
-       evas_object_show(popup);
-
-       obj->popup = popup;
-
-       return 0;
-}
diff --git a/src/common/popup-ui-micro.c b/src/common/popup-ui-micro.c
deleted file mode 100755 (executable)
index 487600c..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2014 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 "popup-ui.h"
-
-#ifdef SYSTEM_APPS_MICRO_3
-#define LAYOUT_CHECKVIEW   "micro_3_title_content_button"
-#else
-#define LAYOUT_CHECKVIEW   "popup_checkview"
-#endif
-
-int load_checkbox_popup(const struct popup_ops *ops)
-{
-       Evas_Object *lbtn;
-       Evas_Object *rbtn;
-       Evas_Object *popup;
-       Evas_Object *label;
-       Evas_Object *scroller;
-       Evas_Object *layout, *layout_inner;
-       Evas_Object *check;
-       Evas_Object *win;
-       char *text;
-       struct object_ops *obj;
-       int ret;
-
-       if (!ops)
-               return -EINVAL;
-
-       ret = get_object_by_ops(ops, &obj);
-       if (ret < 0) {
-               _E("Failed to get object (%d)", ret);
-               return -EINVAL;
-       }
-
-       win = get_window();
-       if (!win)
-               return -ENOMEM;
-
-       evas_object_show(win);
-
-       popup = elm_popup_add(win);
-       if (!popup)
-               return -ENOMEM;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
-       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
-       if (ops->title)
-               elm_object_part_text_set(popup, "title,text", _(ops->title));
-
-       layout = elm_layout_add(popup);
-       if (!layout)
-               return -ENOMEM;
-       elm_layout_file_set(layout, EDJ_NAME, LAYOUT_CHECKVIEW);
-       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(popup, layout);
-
-       scroller = elm_scroller_add(popup);
-       if (!scroller)
-               return -ENOMEM;
-       elm_object_style_set(scroller, "effect");
-       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_part_content_set(layout, "elm.swallow.content", scroller);
-       evas_object_show(scroller);
-
-       layout_inner = elm_layout_add(layout);
-       elm_layout_file_set(layout_inner, EDJ_NAME, "popup_checkview_internal");
-       evas_object_size_hint_weight_set(layout_inner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set(scroller, layout_inner);
-
-       label = elm_label_add(layout);
-       if (!label)
-               return -ENOMEM;
-       elm_object_style_set(label, "popup/default");
-       elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
-
-       if (ops->content) {
-               text = elm_entry_utf8_to_markup(_(ops->content));
-               if (!text)
-                       return -ENOMEM;
-               elm_object_text_set(label, text);
-               free(text);
-       }
-       evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
-       elm_object_part_content_set(layout_inner, "label", label);
-       elm_object_part_content_set(layout, "elm.swallow.content", scroller);
-
-       check = elm_check_add(popup);
-       if (!check)
-               return -ENOMEM;
-       elm_object_style_set(check, "popup");
-       elm_object_text_set(check, _(ops->check_text));
-       elm_object_part_content_set(layout_inner, "elm.swallow.end", check);
-       evas_object_show(check);
-       obj->check = check;
-
-       if (ops->left_text) {
-               /* Left button */
-               lbtn = elm_button_add(popup);
-               if (lbtn) {
-                       elm_object_text_set(lbtn, _(ops->left_text));
-                       elm_object_style_set(lbtn, "popup");
-                       elm_object_part_content_set(popup, "button1", lbtn);
-                       evas_object_smart_callback_add(lbtn, "clicked", left_clicked, ops);
-               }
-       }
-
-       if (ops->right_text) {
-               /* Right button */
-               rbtn = elm_button_add(popup);
-               if (rbtn) {
-                       elm_object_text_set(rbtn, _(ops->right_text));
-                       elm_object_style_set(rbtn, "popup");
-                       elm_object_part_content_set(popup, "button2", rbtn);
-                       evas_object_smart_callback_add(rbtn, "clicked", right_clicked, ops);
-               }
-       }
-
-       evas_object_show(popup);
-
-       obj->popup = popup;
-
-       return 0;
-}
similarity index 95%
rename from src/common/popup-ui-micro-b3.c
rename to src/common/popup-ui-normal.c
index 1ac997b..2618ebc 100755 (executable)
@@ -19,7 +19,6 @@
 
 #include "popup-ui.h"
 
-#define LAYOUT  "micro_3_title_content_button"
 #define BUF_MAX 512
 
 int load_normal_popup(const struct popup_ops *ops)
@@ -51,7 +50,6 @@ int load_normal_popup(const struct popup_ops *ops)
        popup = elm_popup_add(win);
        if (!popup)
                return -ENOMEM;
-       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, ELM_NOTIFY_ALIGN_FILL);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
        if (ops->title)
index 51a2806..5245d76 100755 (executable)
@@ -19,9 +19,6 @@
 
 #include "popup-ui.h"
 
-#define TABLE_COLOR "system-color.xml"
-#define TABLE_FONT  "system-font.xml"
-
 static Evas_Object *window = NULL;
 
 /* Common */
@@ -58,8 +55,6 @@ int create_window(const char *name)
 {
        Evas_Object *eo;
        int w, h, len;
-       Ea_Theme_Color_Table *color;
-       Ea_Theme_Font_Table *font;
 
        if (!name)
                return -EINVAL;
@@ -79,20 +74,6 @@ int create_window(const char *name)
        len = max(w,h);
        evas_object_resize(eo, len, len);
 
-       ea_theme_changeable_ui_enabled_set(EINA_TRUE);
-
-       color = ea_theme_color_table_new(TABLE_COLOR);
-       if (color) {
-               ea_theme_colors_set(color, EA_THEME_STYLE_DEFAULT);
-               ea_theme_color_table_free(color);
-       }
-
-       font = ea_theme_font_table_new(TABLE_FONT);
-       if (font) {
-               ea_theme_fonts_set(font);
-               ea_theme_font_table_free(font);
-       }
-
        window = eo;
 
        return 0;
@@ -197,10 +178,8 @@ void unload_simple_popup(const struct popup_ops *ops)
        int ret;
 
        ret = get_object_by_ops(ops, &obj);
-       if (ret < 0) {
-               _E("Failed to get object (%d)", ret);
+       if (ret < 0)
                return;
-       }
 
        release_evas_object(&(obj->popup));
 }
@@ -222,9 +201,5 @@ int load_simple_popup(bundle *b, const struct popup_ops *ops)
        }
        obj->b = bundle_dup(b);
 
-       if (ops->flags & CHECK_BOX)
-               return load_checkbox_popup(ops);
-
-       else
-               return load_normal_popup(ops);
+       return load_normal_popup(ops);
 }
index 380d4f9..370ec7d 100644 (file)
 
 #include "popup-common.h"
 
-#define EDJ_PATH "/usr/apps/org.tizen.system-syspopup/res/edje/system"
-#define EDJ_NAME EDJ_PATH"/system.edj"
-
 void left_clicked(void *data, Evas_Object * obj, void *event_info);
 void right_clicked(void *data, Evas_Object * obj, void *event_info);
 
-int load_checkbox_popup(const struct popup_ops *ops);
 int load_normal_popup(const struct popup_ops *ops);
 
 #endif /* __POPU_UI_H__ */
similarity index 85%
rename from src/cooldown/cooldown.c
rename to src/cooldown/cooldown-micro.c
index e6aa0fd..018b40a 100755 (executable)
 
 #include "popup-common.h"
 
-#define DEVICED_BUS_NAME    "org.tizen.system.deviced"
-#define DEVICED_OBJECT_PATH "/Org/Tizen/System/DeviceD"
-#define DEVICED_IFACE_NAME  DEVICED_BUS_NAME
+#define SYSTEMD_STOP_POWER_OFF 4
 
-#define DEVICED_PATH_SYSNOTI      DEVICED_OBJECT_PATH"/SysNoti"
-#define DEVICED_INTERFACE_SYSNOTI DEVICED_IFACE_NAME".SysNoti"
+#define DEVICED_PATH_SYSNOTI      "/Org/Tizen/System/DeviceD/SysNoti"
+#define DEVICED_INTERFACE_SYSNOTI "org.tizen.system.deviced.SysNoti"
 #define SIGNAL_COOL_DOWN_RESPONSE "CoolDownResponse"
 #define SIGNAL_COOL_DOWN_CHANGED  "CoolDownChanged"
 #define COOL_DOWN_RELEASE         "Release"
 
-#define DEVICED_PATH_POWER  DEVICED_OBJECT_PATH"/Power"
-#define DEVICED_IFACE_POWER DEVICED_IFACE_NAME".power"
-#define METHOD_POWEROFF "Poweroff"
-
-
 #define TIMEOUT_POWEROFF 10 /* seconds */
 #define TIMEOUT_BEEP_40  40 /* seconds */
 #define TIMEOUT_BEEP_5   5 /* seconds */
@@ -76,16 +69,6 @@ static const struct popup_ops cooldown_poweron_ops;
 static Ecore_Timer *timer = NULL;
 static E_DBus_Signal_Handler *release_handler = NULL;
 
-static int device_poweroff(void)
-{
-       return dbus_method_sync(
-                       DEVICED_BUS_NAME,
-                       DEVICED_PATH_POWER,
-                       DEVICED_IFACE_POWER,
-                       METHOD_POWEROFF,
-                       NULL, NULL);
-}
-
 static void remove_dbus_signal_handler(void)
 {
        E_DBus_Connection *conn;
@@ -188,15 +171,13 @@ static void cooldown_send_warning_signal(const struct popup_ops *ops)
 
 static void cooldown_poweroff(const struct popup_ops *ops)
 {
-       int ret;
-
        _I("Poweroff is selected");
 
        unload_simple_popup(ops);
 
-       ret = device_poweroff();
-       if (ret < 0)
-               _E("Failed to request poweroff to deviced(%d)", ret);
+       if (vconf_set_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS,
+                               SYSTEMD_STOP_POWER_OFF) != 0)
+               _E("Failed to request poweroff to deviced");
 
        terminate_if_no_popup();
 }
@@ -276,23 +257,21 @@ static void cooldown_poweroff_timer(const struct popup_ops *ops)
 
 static int cooldown_poweroff_content(const struct popup_ops *ops, char *content, unsigned int len)
 {
-       snprintf(content, len, "The Gear will power off to cool down.");
+       snprintf(content, len, "Device will power off to cool down.");
        return 0;
 }
 
 static int cooldown_warning_content(const struct popup_ops *ops, char *content, unsigned int len)
 {
-       snprintf(content, len, "Gear is overheating. This task will end shortly. You will only be able to make emergency calls until it has cooled down.");
+       snprintf(content, len, "Device is overheating. This task will end shortly. You will only be able to make emergency calls until it has cooled down.");
        return 0;
 }
 
 static const struct popup_ops cooldown_poweroff_ops = {
        .name           = "cooldown_poweroff",
        .show_popup     = load_simple_popup,
-//     .content        = "Your device is overheating. It will now power off to cool down.",
        .get_content = cooldown_poweroff_content,
        .left_text      = "IDS_COM_SK_OK",
-       .left_icon      = "circle-ok.png",
        .left           = cooldown_poweroff,
        .launch         = cooldown_poweroff_timer,
        .terminate      = cooldown_poweroff,
@@ -304,17 +283,14 @@ static const struct popup_ops cooldown_poweron_ops = {
        .show_popup     = load_simple_popup,
        .content        = "Your device overheated. It powered off to prevent damage.",
        .left_text      = "IDS_COM_SK_OK",
-       .left_icon      = "circle-ok.png",
        .flags          = SCROLLABLE,
 };
 
 static const struct popup_ops cooldown_warning_ops = {
        .name           = "cooldown_warning",
        .show_popup     = load_simple_popup,
-//     .content        = "Your device is overheating. It will be changed to Clock mode.",
        .get_content = cooldown_warning_content,
        .left_text      = "IDS_COM_SK_OK",
-       .left_icon      = "circle-ok.png",
        .left           = cooldown_warning,
        .launch         = cooldown_warning_timer,
        .terminate      = cooldown_warning,
diff --git a/src/cooldown/cooldown-mobile.c b/src/cooldown/cooldown-mobile.c
new file mode 100755 (executable)
index 0000000..c1eaf7e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+static const struct popup_ops cooldown_poweroff_ops = {
+       .name           = "cooldown_poweroff",
+       .show_popup     = load_simple_popup,
+       .title          = "IDS_ST_HEADER_POWER_OFF_ABB",
+       .content        = "IDS_QP_POP_YOUR_DEVICE_IS_OVERHEATING_IT_WILL_NOW_POWER_OFF_TO_COOL_DOWN",
+       .left_text      = "IDS_QP_BUTTON_DO_NOT_POWER_OFF_ABB",
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops cooldown_poweron_ops = {
+       .name           = "cooldown_poweron",
+       .show_popup     = load_simple_popup,
+       .title          = "IDS_QP_HEADER_DEVICE_POWERED_OFF_AUTOMATICALLY",
+       .content        = "IDS_QP_POP_YOUR_DEVICE_OVERHEATED_IT_POWERED_OFF_TO_PREVENT_DAMAGE_MSG",
+       .left_text      = "IDS_COM_SK_OK",
+       .flags          = SCROLLABLE,
+};
+
+/* Constructor to register cooldown button */
+static __attribute__ ((constructor)) void cooldown_register_popup(void)
+{
+       register_popup(&cooldown_poweron_ops);
+       register_popup(&cooldown_poweroff_ops);
+}
diff --git a/src/crash/CMakeLists.txt b/src/crash/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..c1de248
--- /dev/null
@@ -0,0 +1,59 @@
+#################### Crash #########################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+IF(CRASH_POPUP STREQUAL off)
+       RETURN()
+ENDIF(CRASH_POPUP STREQUAL off)
+
+SET(CRASH_SRCS ${COMMON_SRCS} crash.c)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/common)
+
+SET(VENDOR "tizen")
+SET(PACKAGE "crash-popup")
+SET(EXECNAME ${PACKAGE})
+SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
+SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(MANIFESTDIR "${CMAKE_INSTALL_PREFIX}/share/packages")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(crash_pkgs REQUIRED
+               appcore-efl
+               elementary
+               dlog
+               deviced
+               utilX
+               evas
+               ecore
+               ecore-x
+               vconf
+               syspopup
+               syspopup-caller
+               feedback
+               efl-extension
+               pkgmgr-info
+)
+
+FOREACH(flag ${crash_pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall -fpie")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
+SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+
+ADD_EXECUTABLE(${EXECNAME} ${CRASH_SRCS})
+TARGET_LINK_LIBRARIES(${EXECNAME} ${crash_pkgs_LDFLAGS})
+
+INSTALL(TARGETS ${EXECNAME} DESTINATION ${BINDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/crash/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/crash/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE.Apache_v2 DESTINATION ${LICENSEDIR} RENAME ${PKGNAME})
diff --git a/src/crash/crash.c b/src/crash/crash.c
new file mode 100755 (executable)
index 0000000..25406ba
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+#include <pkgmgr-info.h>
+
+#define BUF_MAX 256
+
+static int appinfo_get_appname_func(pkgmgrinfo_appinfo_h handle, void *data)
+{
+       char *str = NULL;
+       char *label;
+       int ret;
+
+       if (!data)
+               return PMINFO_R_ERROR;
+
+       ret = pkgmgrinfo_appinfo_get_label(handle, &str);
+       if (ret != PMINFO_R_OK)
+               return ret;
+
+       if (!str)
+               return PMINFO_R_ERROR;
+
+       label = strdup(str);
+       if (!label)
+               return PMINFO_R_ERROR;
+
+       (*(char**)data) = label;
+
+       return PMINFO_R_OK;
+}
+
+static int get_app_name(char *exepath, char *tname, unsigned int len)
+{
+       pkgmgrinfo_appinfo_filter_h handle = NULL;
+       int count, ret;
+       char *name = NULL;
+
+       ret = pkgmgrinfo_appinfo_filter_create(&handle);
+       if (ret != PMINFO_R_OK)
+               goto out;
+
+       ret = pkgmgrinfo_appinfo_filter_add_string(handle,
+                       PMINFO_APPINFO_PROP_APP_EXEC, exepath);
+       if (ret != PMINFO_R_OK)
+               goto out;
+
+       ret = pkgmgrinfo_appinfo_filter_count(handle, &count);
+       if (ret != PMINFO_R_OK)
+               goto out;
+
+       if (count < 1)
+               goto out;
+
+       ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(handle,
+                       appinfo_get_appname_func, &name);
+       if (ret != PMINFO_R_OK) {
+               name = NULL;
+               goto out;
+       }
+
+out:
+       if (handle)
+               pkgmgrinfo_appinfo_filter_destroy(handle);
+       if (!name)
+               return -ENOENT;
+
+       snprintf(tname, len, "%s", name);
+       free(name);
+       return 0;
+}
+
+static int crash_get_content(const struct popup_ops *ops, char *content, unsigned int len)
+{
+       int ret;
+       unsigned int l;
+       struct object_ops *obj;
+       char *text, *name, *path;
+       char tname[BUF_MAX];
+
+       if (!ops || !content)
+               return -EINVAL;
+
+       ret = get_object_by_ops(ops, &obj);
+       if (ret < 0) {
+               _E("Failed to get object (%d)", ret);
+               return -ENOENT;
+       }
+
+       name = (char *)bundle_get_val(obj->b, "_PROCESS_NAME_");
+       if (!name) {
+               _E("Failed to get process name");
+               return -ENOENT;
+       }
+
+       path = (char *)bundle_get_val(obj->b, "_EXEPATH_");
+       if (!path) {
+               _E("Failed to get execution path");
+               return -ENOENT;
+       }
+
+       l = sizeof(tname);
+       ret = get_app_name(path, tname, l);
+       if (ret < 0)
+               snprintf(tname, l, "%s", name);
+
+       _I("name(%s), path(%s), tname(%s)", name, path, tname);
+
+       text = _("IDS_ST_BODY_PS_HAS_CLOSED_UNEXPECTEDLY");
+       snprintf(content, len, text, tname);
+
+       return 0;
+}
+
+static const struct popup_ops crash_ops = {
+       .name                   = "crash",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_COM_HEADER_ATTENTION",
+       .get_content    = crash_get_content,
+       .left_text              = "IDS_COM_SK_OK",
+       .flags                  = SCROLLABLE,
+};
+
+static __attribute__ ((constructor)) void crash_register_popup(void)
+{
+       register_popup(&crash_ops);
+}
similarity index 77%
rename from crash-popup/micro-src/org.tizen.crash-popup.efl
rename to src/crash/org.tizen.crash-popup.efl
index 6b20c3a..b62eba9 100644 (file)
@@ -1,4 +1,3 @@
-org.tizen.crash-popup ail::db rw---- ------
 org.tizen.crash-popup aul::db r-x--- ------
 org.tizen.crash-popup org.tizen.setting --x--- ------
 org.tizen.crash-popup org.tizen.indicator rw---- ------
@@ -15,13 +14,13 @@ org.tizen.crash-popup system::use_internet rw---- ------
 org.tizen.crash-popup stest-service -w---- ------
 org.tizen.crash-popup svi-data r-x--- ------
 org.tizen.crash-popup tts-server rwx--- ------
-org.tizen.crash-popup xorg rw---- ------
+org.tizen.crash-popup xorg rwx--- ------
 org.tizen.crash-popup system-apps rw---- ------
 org.tizen.crash-popup org.tizen.setting::system rw---- ------
+org.tizen.crash-popup e17::notification rw---- ------
 dbus org.tizen.crash-popup -w---- ------
 org.tizen.app-tray org.tizen.crash-popup r-x--- ------
 org.tizen.crash-popup system::homedir rwxat- ------
-org.tizen.crash-popup system::vconf rwxat- ------
 org.tizen.crash-popup system::media rwxat- ------
 org.tizen.crash-popup system::share rwxat- ------
 org.tizen.crash-popup pulseaudio rwxat- ------
@@ -30,13 +29,7 @@ org.tizen.crash-popup sys-assert::core rwxat- ------
 stest-service org.tizen.crash-popup r-x--- ------
 org.tizen.crash-popup privacy-manager::db r----l ------
 org.tizen.crash-popup pkgmgr::db r----l ------
-org.tizen.crash-popup system::vconf_inhouse rw---- ------
-org.tizen.crash-popup system::vconf_setting rw---- ------
-org.tizen.crash-popup system::vconf_privacy rw---- ------
-org.tizen.crash-popup system::vconf_system rw---- ------
-org.tizen.crash-popup system::vconf_multimedia rw---- ------
-org.tizen.crash-popup system::vconf_network rw---- ------
-org.tizen.crash-popup system::vconf_misc rw---- ------
+org.tizen.crash-popup ecore::lock rwxat- ------
 org.tizen.crash-popup device::sys_logging -w---- ------
 org.tizen.crash-popup org.tizen.w-idle-clock-weather2 rwx--- ------
 org.tizen.crash-popup org.tizen.idle-clock-pedometer rwx--- ------
@@ -47,4 +40,3 @@ org.tizen.crash-popup org.tizen.w-idle-clock-analog3 rwx--- ------
 org.tizen.crash-popup org.tizen.w-idle-clock-analog1 rwx--- ------
 org.tizen.crash-popup org.tizen.idle-clock-digital rwx--- ------
 org.tizen.crash-popup org.tizen.w-idle-clock-analog2 rwx--- ------
-org.tizen.crash-popup e17::notification rw--- -----
similarity index 71%
rename from data/org.tizen.crash-popup.xml
rename to src/crash/org.tizen.crash-popup.xml
index e1d5686..a435124 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.crash-popup" version="0.1.7" install-location="internal-only" support-mode="screen-reader">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.tizen.crash-popup" version="0.1.7" install-location="internal-only" support-mode="screen-reader">
        <label>Crash popup</label>
        <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
        <description>Crash popup application (crash popup)</description>
similarity index 96%
rename from src/datausage/datausage.c
rename to src/datausage/datausage-micro.c
index 062fac1..a72a55f 100755 (executable)
@@ -108,10 +108,8 @@ static const struct popup_ops datausage_warning_ops = {
        .title                  = "IDS_COM_BODY_DATA_USAGE_WARNING",
        .get_content    = datausage_get_content,
        .left_text              = "IDS_COM_BODY_SETTINGS",
-       .left_icon              = "circle-setting.png",
        .left                   = datausage_setting,
        .right_text             = "IDS_COM_SK_OK",
-       .right_icon             = "circle-ok.png",
        .launch                 = datausage_launch,
        .flags                  = SCROLLABLE,
 };
@@ -122,10 +120,8 @@ static const struct popup_ops datausage_disabled_ops = {
        .title                  = "IDS_ST_BODY_LIMIT_DATA_USAGE",
        .content                = "IDS_COM_BODY_SPECIFIED_DATA_USAGE_LIMIT_REACHED_ADDITIONAL_DATA_USE_MAY_INCUR_CHARGES_FROM_SERVICE_PROVIDER",
        .left_text      = "IDS_COM_BODY_SETTINGS",
-       .left_icon              = "circle-setting.png",
        .left           = datausage_setting,
        .right_text             = "IDS_COM_SK_OK",
-       .right_icon             = "circle-ok.png",
        .launch                 = datausage_launch,
        .flags                  = SCROLLABLE,
 };
diff --git a/src/datausage/datausage-mobile.c b/src/datausage/datausage-mobile.c
new file mode 100755 (executable)
index 0000000..211a220
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+#include <appsvc.h>
+
+#define DATAUSAGE_LIMIT "_DATAUSAGE_LIMIT_"
+#define DATAUSAGE_APP   "setting-datausage-efl"
+
+static const struct popup_ops datausage_disabled_ops;
+
+static void launch_datausage_app(void)
+{
+       bundle *b;
+       int ret;
+
+       b = bundle_create();
+       if (!b) {
+               _E("Failed to make bundle");
+               return;
+       }
+
+       appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
+       appsvc_set_pkgname(b, DATAUSAGE_APP);
+
+       ret = appsvc_run_service(b, 0, NULL, NULL);
+       if (ret < 0)
+               _E("Failed to launch datausage app(%d)", ret);
+       bundle_free(b);
+}
+
+static void datausage_setting(const struct popup_ops *ops)
+{
+       _I("Setting is selected");
+
+       unload_simple_popup(ops);
+
+       launch_datausage_app();
+
+       terminate_if_no_popup();
+}
+
+static int datausage_get_content(const struct popup_ops *ops, char *content, unsigned int len)
+{
+       char *text, *limit;
+       char buf[32];
+       struct object_ops *obj;
+       int ret;
+
+       if (!ops || !content)
+               return -EINVAL;
+
+       ret = get_object_by_ops(ops, &obj);
+       if (ret < 0) {
+               _E("Failed to get object (%d)", ret);
+               return -ENOENT;
+       }
+
+       limit = (char *)bundle_get_val(obj->b, DATAUSAGE_LIMIT);
+       if (!limit) {
+               _E("Failed to get data limit");
+               return -ENOENT;
+       }
+
+       text = _("IDS_ST_POP_THE_MAXIMUM_DATA_USAGE_LIMIT_HPS_HAS_ALMOST_BEEN_REACHED_TAP_SETTINGS_TO_CHECK_YOUR_DATA_USAGE");
+
+       snprintf(buf, sizeof(buf), "%sMB", limit);
+       snprintf(content, len, text, buf);
+
+       return 0;
+}
+
+static const struct popup_ops datausage_disabled_ops = {
+       .name                   = "datausage_disabled",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_COM_HEADER_MOBILE_DATA_DISABLED",
+       .get_content    = datausage_get_content,
+       .left_text      = "IDS_COM_SK_CANCEL",
+       .right_text             = "IDS_COM_BODY_SETTINGS",
+       .right                  = datausage_setting,
+       .flags                  = SCROLLABLE,
+};
+
+/* Constructor to register datausage button */
+static __attribute__ ((constructor)) void datausage_register_popup(void)
+{
+       register_popup(&datausage_disabled_ops);
+}
diff --git a/src/flightmode/flightmode.c b/src/flightmode/flightmode.c
deleted file mode 100755 (executable)
index f695a52..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2014 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 "popup-common.h"
-#include "dd-deviced.h"
-
-enum flightmode_state {
-       FLIGHTMODE_ENABLE  = 0,
-       FLIGHTMODE_DISABLE = 1,
-};
-
-static const struct popup_ops flightmode_enable_ops;
-static const struct popup_ops flightmode_disable_ops;
-
-static void flightmode_ok(const struct popup_ops *ops)
-{
-       int mode = -1;
-
-       _I("OK is selected");
-
-       unload_simple_popup(ops);
-
-       if (ops == &flightmode_enable_ops)
-               mode = FLIGHTMODE_ENABLE;
-       else if (ops == &flightmode_disable_ops)
-               mode = FLIGHTMODE_DISABLE;
-
-       if (deviced_change_flightmode(mode) < 0)
-               _E("Failed to send flightmode signal to deviced");
-
-       terminate_if_no_popup();
-}
-
-static const struct popup_ops flightmode_enable_ops = {
-       .name           = "flightmode_enable",
-       .show_popup     = load_simple_popup,
-       .title          = "IDS_PN_OPT_ENABLE_FLIGHT_MODE_ABB",
-       .content        = "IDS_ST_BODY_FLIGHT_MODE_DISABLES_CALLING_AND_MESSAGING_FUNCTIONS_MSG",
-       .left_text      = "IDS_COM_SK_CANCEL",
-       .left_icon      = "circle-cancel.png",
-       .right          = flightmode_ok,
-       .right_text     = "IDS_COM_SK_OK",
-       .right_icon     = "circle-ok.png",
-       .flags          = SCROLLABLE,
-};
-
-static const struct popup_ops flightmode_disable_ops = {
-       .name           = "flightmode_disable",
-       .show_popup     = load_simple_popup,
-       .title          = "IDS_PN_OPT_DISABLE_FLIGHT_MODE_ABB",
-       .content        = "IDS_COM_POP_FLIGHT_MODE_WILL_BE_DISABLED",
-       .left_text      = "IDS_COM_SK_CANCEL",
-       .left_icon      = "circle-cancel.png",
-       .right          = flightmode_ok,
-       .right_text     = "IDS_COM_SK_OK",
-       .right_icon     = "circle-ok.png",
-       .flags          = SCROLLABLE,
-};
-
-/* Constructor to register flightmode button */
-static __attribute__ ((constructor)) void flightmode_register_popup(void)
-{
-       register_popup(&flightmode_enable_ops);
-       register_popup(&flightmode_disable_ops);
-}
similarity index 53%
rename from popup-launcher/src/CMakeLists.txt
rename to src/launcher/CMakeLists.txt
index 351c62c..b63f672 100755 (executable)
@@ -1,31 +1,37 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
-SET(SRCS ${CMAKE_SOURCE_DIR}/popup-launcher/src/launcher.c
-                ${CMAKE_SOURCE_DIR}/popup-launcher/src/popup.c
-                ${CMAKE_SOURCE_DIR}/popup-launcher/src/app.c
-                ${CMAKE_SOURCE_DIR}/popup-launcher/src/noti.c
-                ${CMAKE_SOURCE_DIR}/share/common.c
+SET(SRCS ${CMAKE_SOURCE_DIR}/src/launcher/launcher.c
+                ${CMAKE_SOURCE_DIR}/src/launcher/popup.c
+                ${CMAKE_SOURCE_DIR}/src/launcher/app.c
+                ${CMAKE_SOURCE_DIR}/src/launcher/noti.c
 )
 
-SET(APPNAME "popup-launcher")
+IF(NOTIFICATION_SERVICE STREQUAL on)
+       SET(SRCS ${SRCS}
+                        ${CMAKE_SOURCE_DIR}/src/launcher/noti.c
+       )
+ENDIF(NOTIFICATION_SERVICE STREQUAL on)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/common)
 
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/popup-launcher/src)
+SET(APPNAME "popup-launcher")
 
 SET(PKG_MODULES ${PKG_MODULES}
                edbus
                dlog
                ecore
+               elementary
                syspopup-caller
+               appcore-common
                appsvc
                notification
 )
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})
+pkg_check_modules(launcher_pkgs REQUIRED ${PKG_MODULES})
 
 
-FOREACH(flag ${pkgs_CFLAGS})
+FOREACH(flag ${launcher_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
@@ -36,15 +42,16 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Wall")
 ADD_DEFINITIONS("-DAPPNAME=\"${APPNAME}\"")
 
 ADD_EXECUTABLE(${APPNAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${APPNAME} ${pkgs_LDFLAGS} "-ldl")
+TARGET_LINK_LIBRARIES(${APPNAME} ${launcher_pkgs_LDFLAGS} "-ldl")
 
 INSTALL(TARGETS ${APPNAME} DESTINATION bin)
 
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${APPNAME}/src/org.tizen.system.popup.service DESTINATION /usr/share/dbus-1/services)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/launcher/org.tizen.system.popup.service DESTINATION /usr/share/dbus-1/system-services)
 
 # instatll efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${APPNAME}/src/system-apps.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/launcher/system-apps.efl DESTINATION /etc/smack/accesses.d)
 
+IF(NOTIFICATION_SERVICE STREQUAL on)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/datausage_warning.png  DESTINATION ${SYSTEM_ICONDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/led_torch.png          DESTINATION ${SYSTEM_ICONDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/sdcard_encryption.png  DESTINATION ${SYSTEM_ICONDIR})
@@ -53,3 +60,7 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/sdcard_encryption_error.png  DESTINATION
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/sdcard_decryption_error.png  DESTINATION ${SYSTEM_ICONDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/tima.png               DESTINATION ${SYSTEM_ICONDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/usb.png                DESTINATION ${SYSTEM_ICONDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_icon.png     DESTINATION ${SYSTEM_ICONDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_indicator.png      DESTINATION ${SYSTEM_ICONDIR})
+ENDIF(NOTIFICATION_SERVICE STREQUAL on)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE.Apache_v2 DESTINATION ${LICENSEDIR} RENAME system-popup)
similarity index 100%
rename from popup-launcher/src/app.c
rename to src/launcher/app.c
diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c
new file mode 100755 (executable)
index 0000000..b9c63ef
--- /dev/null
@@ -0,0 +1,390 @@
+/*
+ * popup-launcher
+ *
+ * Copyright (c) 2013 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 "launcher.h"
+
+#define TERMINATE_TIMEOUT  5
+
+static E_DBus_Connection *edbus_conn;
+static DBusPendingCall *edbus_request_name;
+static Ecore_Timer *term_timer = NULL;
+
+static Eina_Bool exit_idler_cb(void *data)
+{
+       e_dbus_connection_close(edbus_conn);
+       e_dbus_shutdown();
+
+       ecore_main_loop_quit();
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool terminate_launcher(void *data)
+{
+       if (term_timer)
+               ecore_timer_del(term_timer);
+
+       if (ecore_idler_add(exit_idler_cb, NULL))
+               return ECORE_CALLBACK_CANCEL;
+
+       exit_idler_cb(NULL);
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void set_timer_to_terminate(void)
+{
+       if (term_timer)
+               ecore_timer_reset(term_timer);
+       else {
+               term_timer = ecore_timer_add(TERMINATE_TIMEOUT, terminate_launcher, NULL);
+               if (!term_timer)
+                       terminate_launcher(NULL);
+       }
+}
+
+/* Notification Off */
+static DBusMessage *noti_off(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return deactivate_notification(obj, msg);
+}
+
+/* Datausage */
+static DBusMessage *data_warning_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_no_param(obj, msg, DATAUSAGE_WARNING);
+}
+
+static DBusMessage *data_disabled_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_no_param(obj, msg, DATAUSAGE_DISABLED);
+}
+
+/* LED */
+static DBusMessage *led_torch_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_no_param(obj, msg, LED_TORCH);
+}
+
+/* Ode complete/progress notifications */
+static DBusMessage *ode_complete_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_single_param(obj, msg, ODE_COMPLETE);
+}
+
+static DBusMessage *ode_progress_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_single_param(obj, msg, ODE_PROGRESS);
+}
+
+static DBusMessage *ode_progress_noti_update(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return progress_update_notification(obj, msg);
+}
+
+static DBusMessage *ode_error_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_triple_param(obj, msg, ODE_ERROR);
+}
+
+/* USB host notifications */
+static DBusMessage *usb_storage_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_single_param(obj, msg, USB_STORAGE);
+}
+
+static DBusMessage *usb_storage_ro_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_single_param(obj, msg, USB_STORAGE_RO);
+}
+
+static DBusMessage *usb_device_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_double_param(obj, msg, USB_DEVICE);
+}
+
+static DBusMessage *usb_device_noti_update(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return update_notification_double_param(obj, msg, USB_DEVICE);
+}
+
+/* Battery notifications */
+static DBusMessage *battery_full_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_no_param(obj, msg, BATTERY_FULL);
+}
+
+static DBusMessage *battery_charge_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       char param[2];
+       char *args[3];
+
+       set_timer_to_terminate();
+
+       args[0] = SERVANT_APP_NAME;
+       snprintf(param, sizeof(param), "%d", CHARGER_CONNECTION);
+       args[1] = param;
+       args[2] = NULL;
+       return launch_system_servant_app(obj, msg, args);
+}
+
+/* Message Post */
+static DBusMessage *message_post_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return activate_notification_single_param(obj, msg, TICKER);
+}
+
+static const struct edbus_method
+dbus_noti_methods[] = {
+       /* Data Usage */
+       { "DataWarningNotiOn"           , NULL          , "i"   , data_warning_noti_on          },
+       { "DataWarningNotiOff"          , "i"           , "i"   , noti_off                                      },
+       { "DataDisabledNotiOn"          , NULL          , "i"   , data_disabled_noti_on         },
+       { "DataDisabledNotiOff"         , "i"           , "i"   , noti_off                                      },
+       /* LED */
+       { "LedTorchNotiOn"                      , NULL          , "i"   , led_torch_noti_on                     },
+       { "LedTorhNotiOff"                      , "i"           , "i"   , noti_off                                      },
+       /* ODE */
+       { "OdeCompNotiOn"                       , "s"           , "i"   , ode_complete_noti_on          },
+       { "OdeCompNotiOff"                      , "i"           , "i"   , noti_off                                      },
+       { "OdeProgNotiOn"                       , "s"           , "i"   , ode_progress_noti_on          },
+       { "OdeProgNotiUpdate"           , "ii"          , "i"   , ode_progress_noti_update      },
+       { "OdeProgNotiOff"                      , "i"           , "i"   , noti_off                                      },
+       { "OdeErrorNotiOn"                      , "sii"         , "i"   , ode_error_noti_on                     },
+       { "OdeErrorNotiOff"                     , "i"           , "i"   , noti_off                                      },
+       /* USB storage */
+       { "UsbStorageNotiOn"            , "s"           , "i"   , usb_storage_noti_on           },
+       { "UsbStorageRoNotiOn"          , "s"           , "i"   , usb_storage_ro_noti_on        },
+       { "UsbStorageNotiOff"           , "i"           , "i"   , noti_off                                      },
+       { "UsbDeviceNotiOn"                     , "ss"          , "i"   , usb_device_noti_on            },
+       { "UsbDeviceNotiUpdate"         , "isss"        , "i"   , usb_device_noti_update        },
+       { "UsbDeviceNotiOff"            , "i"           , "i"   , noti_off                                      },
+       /* Battery */
+       { "BatteryFullNotiOn"           , NULL          , "i"   , battery_full_noti_on          },
+       { "BatteryFullNotiOff"          , "i"           , "i"   , noti_off                                      },
+       { "BatteryChargeNotiOn"         , NULL          , "i"   , battery_charge_noti_on        },
+       /* Message Post */
+       { "MessagePostOn"                       , "s"           , "i"   , message_post_on                       },
+
+       /* Add notifications here */
+};
+
+/* App Launch */
+static DBusMessage *edbus_cradle_app_launch(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return launch_app_no_param(obj, msg, CRADLE_APP_NAME);
+}
+
+static DBusMessage *edbus_pwlock_app_launch(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return launch_app_single_param(obj, msg, PWLOCK_APP_NAME);
+}
+
+static DBusMessage *edbus_app_terminate_by_pid(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return terminate_app_by_pid(obj, msg);
+}
+
+static const struct edbus_method
+dbus_app_methods[] = {
+       { "CradleAppLaunch"  ,     NULL,  "i", edbus_cradle_app_launch    },
+       { "PWLockAppLaunch"  ,     "ss",  "i", edbus_pwlock_app_launch    },
+       { "AppTerminateByPid",      "i",  "i", edbus_app_terminate_by_pid },
+       /* Add methods here */
+};
+
+/* Basic popups */
+static DBusMessage *system_popup(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return launch_popup(obj, msg, SYSTEM_SYSPOPUP);
+}
+
+static const struct edbus_method
+dbus_system_methods[] = {
+       { "PopupLaunch", "a{ss}", "i", system_popup },
+       /* Add methods here */
+};
+
+/* Poweroff popup */
+static DBusMessage *poweroff_popup(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return launch_poweroff_popup(obj, msg, POWEROFF_SYSPOPUP);
+}
+
+static const struct edbus_method
+dbus_poweroff_methods[] = {
+       { "PopupLaunch", NULL, "i", poweroff_popup },
+       /* Add methods here */
+};
+
+/* Crash popup */
+static DBusMessage *crash_popup(E_DBus_Object *obj, DBusMessage *msg)
+{
+       set_timer_to_terminate();
+       return launch_popup(obj, msg, CRASH_SYSPOPUP);
+}
+
+static const struct edbus_method
+dbus_crash_methods[] = {
+       { "PopupLaunch", "a{ss}", "i", crash_popup      },
+       /* Add methods here */
+};
+
+
+static struct edbus_object
+edbus_objects[]= {
+       { POPUP_PATH_NOTI               , POPUP_IFACE_NOTI              , NULL  , NULL  ,
+               dbus_noti_methods               , ARRAY_SIZE(dbus_noti_methods)                 },
+       { POPUP_PATH_SYSTEM             , POPUP_IFACE_SYSTEM    , NULL  , NULL  ,
+               dbus_system_methods     , ARRAY_SIZE(dbus_system_methods)               },
+       { POPUP_PATH_POWEROFF   , POPUP_IFACE_POWEROFF  , NULL  , NULL  ,
+               dbus_poweroff_methods   , ARRAY_SIZE(dbus_poweroff_methods)     },
+       { POPUP_PATH_CRASH              , POPUP_IFACE_CRASH             , NULL  , NULL  ,
+               dbus_crash_methods              , ARRAY_SIZE(dbus_crash_methods)                },
+       { POPUP_PATH_APP                , POPUP_IFACE_APP               , NULL  , NULL  ,
+               dbus_app_methods                , ARRAY_SIZE(dbus_app_methods)                  },
+       /* Add new object & interface here*/
+};
+
+static int init_methods(void)
+{
+       int ret;
+       int i, j;
+
+
+       for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
+               for (j = 0; j < edbus_objects[i].methods_len; j++) {
+                       ret = e_dbus_interface_method_add(edbus_objects[i].iface,
+                                       edbus_objects[i].methods[j].member,
+                                       edbus_objects[i].methods[j].signature,
+                                       edbus_objects[i].methods[j].reply_signature,
+                                       edbus_objects[i].methods[j].func);
+                       if (!ret) {
+                               _E("fail to add method %s!", edbus_objects[i].methods[j].member);
+                               return -ECONNREFUSED;
+                       }
+               }
+       }
+       return 0;
+}
+
+static int register_dbus(void)
+{
+       DBusError error;
+       int retry, ret, i;
+
+       dbus_error_init(&error);
+
+       retry = 0;
+       do {
+               if (e_dbus_init())
+                       break;
+               if (++retry == RETRY_MAX) {
+                       _E("fail to init edbus");
+                       return -ECONNREFUSED;
+               }
+       } while (retry <= RETRY_MAX);
+
+       retry = 0;
+       do {
+               edbus_conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
+               if (edbus_conn)
+                       break;
+               if (++retry == RETRY_MAX) {
+                       _E("fail to get edbus");
+                       ret = -ECONNREFUSED;
+                       goto out1;
+               }
+       } while (retry <= RETRY_MAX);
+
+       retry = 0;
+       do {
+               edbus_request_name = e_dbus_request_name(edbus_conn, BUS_NAME, 0, NULL, NULL);
+               if (edbus_request_name)
+                       break;
+               if (++retry == RETRY_MAX) {
+                       _E("fail to request edbus name");
+                       ret = -ECONNREFUSED;
+                       goto out2;
+               }
+       } while (retry <= RETRY_MAX);
+
+       for (i = 0; i < ARRAY_SIZE(edbus_objects); i++) {
+               edbus_objects[i].obj = e_dbus_object_add(edbus_conn, edbus_objects[i].path, NULL);
+               if (!(edbus_objects[i].obj)) {
+                       _E("fail to add edbus obj");
+                       ret = -ECONNREFUSED;
+                       goto out2;
+               }
+
+               edbus_objects[i].iface = e_dbus_interface_new(edbus_objects[i].interface);
+               if (!(edbus_objects[i].iface)) {
+                       _E("fail to add edbus interface");
+                       ret = -ECONNREFUSED;
+                       goto out2;
+               }
+
+               e_dbus_object_interface_attach(edbus_objects[i].obj, edbus_objects[i].iface);
+       }
+
+       return 0;
+
+out2:
+       e_dbus_connection_close(edbus_conn);
+out1:
+       e_dbus_shutdown();
+
+       return ret;
+}
+
+int main (int argc, char *argv[])
+{
+       int ret;
+
+       ecore_init();
+
+       ret = register_dbus();
+       if (ret < 0)
+               return ret;
+
+       ret= init_methods();
+       if (ret < 0)
+               return ret;
+
+       ecore_main_loop_begin();
+       ecore_shutdown();
+       return 0;
+}
similarity index 52%
rename from popup-launcher/src/launcher.h
rename to src/launcher/launcher.h
index 46f0520..6376b64 100755 (executable)
 #define __LAUNCHER_H__
 
 #include <stdio.h>
-#include <bundle.h>
+#include <bundle_internal.h>
 #include <E_DBus.h>
+#include <Ecore.h>
+#include <Elementary.h>
+#include <appcore-common.h>
 #include <aul.h>
-#include "common.h"
-
-#define RETRY_MAX 10
-#define SLEEP_USEC 200000
-
-/* DBus paths, interfaces */
-#define BUS_NAME              "org.tizen.system.popup"
-#define POPUP_DBUS_PATH       "/Org/Tizen/System/Popup"
-#define POPUP_DBUS_IFACE      BUS_NAME
-
-#define POPUP_PATH_POWEROFF   POPUP_DBUS_PATH"/Poweroff"
-#define POPUP_IFACE_POWEROFF  BUS_NAME".Poweroff"
-
-#define POPUP_PATH_LOWBAT     POPUP_DBUS_PATH"/Lowbat"
-#define POPUP_IFACE_LOWBAT    BUS_NAME".Lowbat"
-
-#define POPUP_PATH_LOWMEM     POPUP_DBUS_PATH"/Lowmem"
-#define POPUP_IFACE_LOWMEM    BUS_NAME".Lowmem"
-
-#define POPUP_PATH_MMC        POPUP_DBUS_PATH"/Mmc"
-#define POPUP_IFACE_MMC       BUS_NAME".Mmc"
-
-#define POPUP_PATH_USB        POPUP_DBUS_PATH"/Usb"
-#define POPUP_IFACE_USB       BUS_NAME".Usb"
-
-#define POPUP_PATH_USBOTG     POPUP_DBUS_PATH"/Usbotg"
-#define POPUP_IFACE_USBOTG    BUS_NAME".Usbotg"
-
-#define POPUP_PATH_DATAUSAGE  POPUP_DBUS_PATH"/DataUsage"
-#define POPUP_IFACE_DATAUSAGE BUS_NAME".DataUsage"
-
-#define POPUP_PATH_LED        POPUP_DBUS_PATH"/Led"
-#define POPUP_IFACE_LED       BUS_NAME".Led"
-
-#define POPUP_PATH_ODE        POPUP_DBUS_PATH"/Ode"
-#define POPUP_IFACE_ODE       BUS_NAME".Ode"
-
-#define POPUP_PATH_SYSTEM     POPUP_DBUS_PATH"/System"
-#define POPUP_IFACE_SYSTEM    BUS_NAME".System"
-
-#define POPUP_PATH_TIMA       POPUP_DBUS_PATH"/Tima"
-#define POPUP_IFACE_TIMA      BUS_NAME".Tima"
-
-#define POPUP_PATH_CRASH      POPUP_DBUS_PATH"/Crash"
-#define POPUP_IFACE_CRASH     BUS_NAME".Crash"
-
-#define POPUP_PATH_TICKER     POPUP_DBUS_PATH"/Ticker"
-#define POPUP_IFACE_TICKER    BUS_NAME".Ticker"
-
-#define POPUP_PATH_APP        POPUP_DBUS_PATH"/Apps"
-#define POPUP_IFACE_APP       BUS_NAME".Apps"
-
-#define POPUP_PATH_USBHOST    POPUP_DBUS_PATH"/Usbhost"
-#define POPUP_IFACE_USBHOST   BUS_NAME".Usbhost"
-
-#define POPUP_PATH_BATTERY    POPUP_DBUS_PATH"/Battery"
-#define POPUP_IFACE_BATTERY   BUS_NAME".Battery"
-
-#define POPUP_PATH_SERVANT    POPUP_DBUS_PATH"/Servant"
-#define POPUP_IFACE_SERVANT   BUS_NAME".Servant"
+#include "macro.h"
 
 /* Popup names */
 #define POWEROFF_SYSPOPUP  "poweroff-syspopup"
-#define LOWBAT_SYSPOPUP    "lowbat-syspopup"
-#define LOWMEM_SYSPOPUP    "lowmem-syspopup"
-#define MMC_SYSPOPUP       "mmc-syspopup"
-#define USB_SYSPOPUP       "usb-syspopup"
-#define USBOTG_SYSPOPUP    "usbotg-syspopup"
-#define DATAUSAGE_SYSPOPUP "datausage-syspopup"
 #define SYSTEM_SYSPOPUP    "system-syspopup"
 #define CRASH_SYSPOPUP     "crash-popup"
 
 /* Setting ugs */
-#define SETTING_DATAUSAGE_UG      "setting-datausage-efl"
-#define SETTING_ACCESSIBILITY_UG  "setting-accessibility-efl"
-#define SETTING_MMC_ENCRYPTION_UG "setting-mmc-encryption-efl"
 #define SETTING_ENCRYPTING_APP    "org.tizen.setting.encrypting"
 #define SETTING_LIGHTOFF_APP      "org.tizen.setting.turnofflight"
+#define SETTING_DATAUSAGE_UG      "setting-datausage-efl"
 
-/* ODE */
-#define ODE_ENCRYPT "encrypt"
-#define ODE_DECRYPT "decrypt"
-
-/* App to launch a popup on a notification */
-#define SYSTEM_SIGNAL_SENDER          "org.tizen.system-signal-sender"
-#define SIGNAL_SENDER_TYPE            "_SIGNAL_TYPE_"
-#define SIGNAL_SENDER_TYPE_RECOVERY   "recovery-popup"
-#define SIGNAL_SENDER_TYPE_USBSTORAGE_UNMOUNT "usbstorage-unmount-popup"
-#define SIGNAL_SENDER_TYPE_ENCRYPT    ODE_ENCRYPT
-#define SIGNAL_SENDER_TYPE_DECRYPT    ODE_DECRYPT
-#define SIGNAL_SENDER_TYPE_ODE_UG     "ode-setting-ug"
-#define SIGNAL_SENDER_DEVICE_PATH     "_DEVICE_PATH_"
-#define SIGNAL_SENDER_ERROR_TYPE      "_ERROR_TYPE_"
-#define SIGNAL_SENDER_MEMORY_SPACE    "_MEMORY_SPACE_"
 
 /* App to show Host devices list */
 #define HOST_DEVICES              "org.tizen.host-devices"
 #define BATT_INDI_ICON   SYSTEM_ICONDIR"/batt_full_indicator.png"
 #define BATT_NOTI_ICON   SYSTEM_ICONDIR"/batt_full_icon.png"
 
-/* Notification parameters */
-#define VALUE_DATA_WARNING "data_warning"
-
-/* Ticker noti for USB client */
-#define USB_CLIENT_DEFAULT "usb-client-default"
-#define USB_CLIENT_SSH     "usb-client-ssh"
-
 /* App launching */
 #define CRADLE_APP_NAME  "org.tizen.desk-dock"
 #define PWLOCK_APP_NAME  "org.tizen.pwlock"
 #define SERVANT_APP_NAME "/usr/bin/system-servant"
 
 enum noti_type {
-       DATAUSAGE_WARNING = 0,
+       NOTI_NONE = 0,
+       DATAUSAGE_WARNING,
        DATAUSAGE_DISABLED,
        LED_TORCH,
        ODE_COMPLETE,
@@ -166,12 +81,6 @@ enum noti_type {
        NOTI_TYPE_MAX
 };
 
-enum ode_error_type {
-       NOT_ENOUGH_SPACE,
-       OPERATION_FAILED,
-       ODE_ERROR_MAX,
-};
-
 enum service_type {
        TTS_SCREENOFF,
        TTS_ENABLED,
@@ -185,6 +94,7 @@ struct edbus_method {
        const char *signature;
        const char *reply_signature;
        E_DBus_Method_Cb func;
+       int type;
 };
 
 struct edbus_object {
@@ -197,14 +107,10 @@ struct edbus_object {
 };
 
 /* launch popup */
-DBusMessage *launch_popup_no_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-DBusMessage *launch_popup_single_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-DBusMessage *launch_popup_double_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
-DBusMessage *launch_popup_triple_param(E_DBus_Object *obj,
-                               DBusMessage *msg, char *popup_name);
+DBusMessage *launch_popup(E_DBus_Object *obj,
+                               DBusMessage *msg, char *name);
+DBusMessage *launch_poweroff_popup(E_DBus_Object *obj,
+                               DBusMessage *msg, char *name);
 
 /* Activate notification */
 DBusMessage *activate_notification_no_param(E_DBus_Object *obj,
similarity index 93%
rename from popup-launcher/src/noti.c
rename to src/launcher/noti.c
index fa94762..4ede5be 100755 (executable)
@@ -20,6 +20,8 @@
 #include <vconf.h>
 #include <appsvc.h>
 #include <notification.h>
+#include <notification_text_domain.h>
+#include <notification_internal.h>
 #include "launcher.h"
 
 #define BUF_MAX 256
@@ -30,23 +32,23 @@ struct ticker_info {
 };
 
 static const struct ticker_info ticker_notifications[] = {
-       { "usb-client-default"          , "IDS_COM_BODY_CONNECTED_AS_A_MEDIA_DEVICE"           },
-       { "usb-client-ssh"              , "SSH enabled"                                        },
-       { "dock-connected"              , "IDS_QP_POP_THE_DOCK_IS_CONNECTED"                   },
-       { "hdmi-connected"              , "IDS_VPL_POP_HDMI_CABLE_CONNECTED"                   },
-       { "hdmi-disconnected"           , "IDS_VPL_POP_HDMI_CABLE_DISCONNECTED"                },
-       { "connector-connected"         , "IDS_COM_POP_USB_CONNECTOR_CONNECTED"                },
-       { "connector-disconnected"      , "IDS_COM_POP_USB_CONNECTOR_DISCONNECTED"             },
-       { "keyboard-connected"          , "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2"                },
-       { "mouse-connected"             , "IDS_COM_POP_MOUSE_CONNECTED_ABB2"                   },
-       { "storage-connected"           , "IDS_COM_POP_USB_MASS_STORAGE_CONNECTED_ABB2"        },
-       { "storage-ro-connected"        , "IDS_ST_BODY_READ_ONLY_USB_DEV_CONNECTED_M_NOUN_ABB" },
-       { "storage-disconnected-safe"   , "IDS_USB_BODY_USB_MASS_STORAGE_SAFELY_REMOVED"       },
-       { "storage-disconnected-unsafe" , "IDS_COM_POP_USB_MASS_STORAGE_UNEXPECTEDLY_REMOVED"  },
-       { "camera-connected"            , "IDS_COM_POP_CAMERA_CONNECTED_ABB2"                  },
-       { "printer-connected"           , "IDS_COM_POP_PRINTER_CONNECTED_ABB2"                 },
-       { "unknown-connected"           , "IDS_COM_POP_UNKNOWN_USB_DEVICE_CONNECTED"           },
-       { "device-disconnected"         , "IDS_COM_BODY_USB_DEVICE_SAFELY_REMOVED"             },
+       { "USBClient",                                  "IDS_COM_BODY_CONNECTED_AS_A_MEDIA_DEVICE"              },
+       { "USBClientSSH",                               "SSH enabled"                                                                   },
+       { "DockConnected",                              "IDS_QP_POP_THE_DOCK_IS_CONNECTED"                              },
+       { "HdmiConnected",                              "IDS_VPL_POP_HDMI_CABLE_CONNECTED"                              },
+       { "HdmiDisconnected",                   "IDS_VPL_POP_HDMI_CABLE_DISCONNECTED"                   },
+       { "USBConnectorConected",               "IDS_COM_POP_USB_CONNECTOR_CONNECTED"                   },
+       { "USBConnectorDisconnected",   "IDS_COM_POP_USB_CONNECTOR_DISCONNECTED"                },
+       { "KeyboardConnected",                  "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2"                   },
+       { "MouseConnected",                             "IDS_COM_POP_MOUSE_CONNECTED_ABB2"                              },
+       { "StorageConnected",                   "IDS_COM_POP_USB_MASS_STORAGE_CONNECTED_ABB2"   },
+       { "StorageConnectedRO",                 "IDS_ST_BODY_READ_ONLY_USB_DEV_CONNECTED_M_NOUN_ABB"    },
+       { "StorageDisconnectedSafe",    "IDS_USB_BODY_USB_MASS_STORAGE_SAFELY_REMOVED"  },
+       { "StorageDisconnectedUnsafe",  "IDS_COM_POP_USB_MASS_STORAGE_UNEXPECTEDLY_REMOVED"             },
+       { "CameraConnected",                    "IDS_COM_POP_CAMERA_CONNECTED_ABB2"                             },
+       { "PrinterConnected",                   "IDS_COM_POP_PRINTER_CONNECTED_ABB2"                    },
+       { "UnknownConnected",                   "IDS_COM_POP_UNKNOWN_USB_DEVICE_CONNECTED"              },
+       { "DeviceDisconnected",                 "IDS_COM_BODY_USB_DEVICE_SAFELY_REMOVED"                },
 };
 
 static void set_language(void)
diff --git a/src/launcher/popup.c b/src/launcher/popup.c
new file mode 100755 (executable)
index 0000000..9ccfa0c
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * popup-launcher
+ *
+ * Copyright (c) 2013 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 <syspopup_caller.h>
+#include "launcher.h"
+
+#define POPUP_CONTENT          "_SYSPOPUP_CONTENT_"
+#define POPUP_NAME_POWEROFF    "poweroff"
+
+DBusMessage *launch_popup(E_DBus_Object *obj,
+                               DBusMessage *msg, char *name)
+{
+       DBusMessageIter iter;
+       DBusMessageIter aiter, piter;
+       DBusMessage *reply;
+       int ret;
+       char *key, *value;
+       bundle *b = NULL;
+
+       if (!name) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       _I("launch popup (%s)", name);
+
+       b = bundle_create();
+       if (!b) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       dbus_message_iter_init(msg, &iter);
+       dbus_message_iter_recurse(&iter, &aiter);
+
+       while (dbus_message_iter_get_arg_type(&aiter) != DBUS_TYPE_INVALID) {
+               dbus_message_iter_recurse(&aiter, &piter);
+               dbus_message_iter_get_basic(&piter, &key);
+               dbus_message_iter_next(&piter);
+               dbus_message_iter_get_basic(&piter, &value);
+               dbus_message_iter_next(&aiter);
+
+               _I("key(%s), value(%s)", key, value);
+
+               ret = bundle_add(b, key, value);
+               if (ret < 0) {
+                       _E("Failed to add bundle (%s,%s) (ret:%d)", key, value, ret);
+                       goto out;
+               }
+       }
+
+       ret = syspopup_launch(name, b);
+       if (ret < 0)
+               _E("Failed to launch popup(%d)", ret);
+
+out:
+       if (b)
+               bundle_free(b);
+
+       reply = dbus_message_new_method_return(msg);
+       dbus_message_iter_init_append(reply, &iter);
+       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
+
+       return reply;
+}
+
+DBusMessage *launch_poweroff_popup(E_DBus_Object *obj,
+                               DBusMessage *msg, char *name)
+{
+       DBusMessage *reply;
+       DBusMessageIter iter;
+       int ret;
+       bundle *b = NULL;
+
+       if (!name) {
+               ret = -EINVAL;
+               goto out;
+       }
+
+       _I("launch popup (%s)", name);
+
+       b = bundle_create();
+       if (!b) {
+               ret = -ENOMEM;
+               goto out;
+       }
+
+       ret = bundle_add(b, POPUP_CONTENT, POPUP_NAME_POWEROFF);
+       if (ret < 0) {
+               _E("Failed to add bundle (%s,%s) (ret:%d)", POPUP_CONTENT, POPUP_NAME_POWEROFF, ret);
+               goto out;
+       }
+
+       ret = syspopup_launch(name, b);
+       if (ret < 0)
+               _E("Failed to launch popup(%d)", ret);
+
+out:
+       if (b)
+               bundle_free(b);
+
+       reply = dbus_message_new_method_return(msg);
+       dbus_message_iter_init_append(reply, &iter);
+       dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
+       return reply;
+}
similarity index 65%
rename from popup-launcher/src/system-apps.efl
rename to src/launcher/system-apps.efl
index 960b133..e487f95 100644 (file)
@@ -1,11 +1,10 @@
 system-apps aul::db r-x--- ------
 system-apps system::homedir rwxat- ------
 system-apps isf r-x--- ------
-system-apps ail::db rw---- ------
 system-apps dbus rwx--- ------
-system-apps xorg -w---- ------
+system-apps xorg rw---- ------
 system-apps device::app_logging -w---- ------
-system-apps system::vconf rwxat- ------
+system-apps device::sys_logging -w---- ------
 system-apps tts-server rwx--- ------
 system-apps deviced::haptic rwx--- ------
 system-apps e17::notification rw---- ------
@@ -21,11 +20,9 @@ stest-service system-apps r-x--- ------
 system-apps stest-service -w---- ------
 system-apps privacy-manager::db r----l ------
 system-apps pkgmgr::db r----l ------
-system-apps system::vconf_inhouse rw---- ------
-system-apps system::vconf_setting rw---- ------
-system-apps system::vconf_privacy rw---- ------
-system-apps system::vconf_system rw---- ------
-system-apps system::vconf_multimedia rw---- ------
-system-apps system::vconf_network rw---- ------
-system-apps system::vconf_misc rw---- ------
 system-apps ecore::lock rwxat- ------
+system-apps syspopup::db rw---- ------
+system-apps aul::launch r-x--- ------
+system-apps tizen::vconf::setting::admin rw---- ------
+system-apps tizen::vconf::public::admin rw---- ------
+system-apps tizen::vconf::public::r rw---- ------
diff --git a/src/mmc/mmc-mobile.c b/src/mmc/mmc-mobile.c
new file mode 100755 (executable)
index 0000000..cb42e5c
--- /dev/null
@@ -0,0 +1,285 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+#include <aul.h>
+
+#define SETTING_MMC_ENCRYPTION_UG  "setting-mmc-encryption-efl"
+
+#define DD_BUS_NAME             "org.tizen.system.deviced"
+#define DD_OBJECT_PATH_ODE      "/Org/Tizen/System/DeviceD/Ode"
+#define DD_INTERFACE_NAME_ODE   DD_BUS_NAME".ode"
+#define DD_SIGNAL_GENERAL_MOUNT "RequestGeneralMount"
+#define DD_SIGNAL_ODE_MOUNT     "RequestOdeMount"
+#define DD_SIGNAL_REMOVE_MMC    "RemoveMmc"
+
+static const struct popup_ops mount_error_ops;
+static const struct popup_ops mount_read_only_ops;
+static const struct popup_ops check_smack_ops;
+static const struct popup_ops ode_encrypt_ops;
+static const struct popup_ops ode_decrypt_ops;
+
+static void remove_other_mmc_popups(const struct popup_ops *ops)
+{
+       if (ops != &mount_error_ops)
+               unload_simple_popup(&mount_error_ops);
+
+       if (ops != &mount_read_only_ops)
+               unload_simple_popup(&mount_read_only_ops);
+
+       if (ops != &check_smack_ops)
+               unload_simple_popup(&check_smack_ops);
+
+       if (ops != &ode_encrypt_ops)
+               unload_simple_popup(&ode_encrypt_ops);
+
+       if (ops != &ode_decrypt_ops)
+               unload_simple_popup(&ode_decrypt_ops);
+}
+
+static bool mmc_inserted(void)
+{
+       int val;
+       if (vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &val) == 0
+                       && val != VCONFKEY_SYSMAN_MMC_REMOVED)
+               return true;
+       return false;
+}
+
+static bool mmc_mounted(void)
+{
+       int val;
+       if (vconf_get_int(VCONFKEY_SYSMAN_MMC_MOUNT, &val) == 0
+                       && val == VCONFKEY_SYSMAN_MMC_MOUNT_FAILED)
+               return false;
+       return true;
+}
+
+static void send_mount_signal(char *signal)
+{
+       int ret;
+
+       if (!signal)
+               return;
+
+       ret = broadcast_dbus_signal(
+                       DD_OBJECT_PATH_ODE,
+                       DD_INTERFACE_NAME_ODE,
+                       signal,
+                       NULL, NULL);
+       if (ret < 0)
+               _E("FAIL: broadcast_dbus_signal(%s:%d)", signal, ret);
+}
+
+static void launch_app(char *appname)
+{
+       bundle *b;
+       int ret;
+
+       if (!appname)
+               return;
+
+       b = bundle_create();
+       if (b) {
+               ret = aul_launch_app(appname, b);
+               if (ret < 0)
+                       _E("FAIL: aul_launch_app(%d)", ret);
+               if (bundle_free(b) != 0)
+                       _E("FAIL: bundle_free(b);");
+       } else {
+               _E("Failed to create bundle");
+       }
+}
+
+static void send_general_mount_signal(const struct popup_ops *ops)
+{
+       unload_simple_popup(ops);
+       send_mount_signal(DD_SIGNAL_GENERAL_MOUNT);
+       terminate_if_no_popup();
+}
+
+static void send_ode_mount_signal(const struct popup_ops *ops)
+{
+       unload_simple_popup(ops);
+       send_mount_signal(DD_SIGNAL_ODE_MOUNT);
+       terminate_if_no_popup();
+}
+
+static void ode_launch_settings(const struct popup_ops *ops)
+{
+       unload_simple_popup(ops);
+       launch_app(SETTING_MMC_ENCRYPTION_UG);
+       terminate_if_no_popup();
+}
+
+static bool skip_mount_error_popup(const struct popup_ops *ops)
+{
+       return mmc_mounted();
+}
+
+static bool skip_ode_popup(const struct popup_ops *ops)
+{
+       return !mmc_inserted();
+}
+
+static E_DBus_Signal_Handler *mmc_removed_handler= NULL;
+
+static void unregister_ode_handler(const struct popup_ops *ops)
+{
+       if (mmc_removed_handler) {
+               unregister_dbus_signal_handler(mmc_removed_handler);
+               mmc_removed_handler = NULL;
+       }
+}
+
+static void mmc_removed(void *data, DBusMessage *msg)
+{
+       const struct popup_ops *ops = data;
+
+       unregister_ode_handler(ops);
+       unload_simple_popup(ops);
+       terminate_if_no_popup();
+}
+
+static void register_ode_handler(const struct popup_ops *ops)
+{
+       int ret;
+
+       unregister_ode_handler(ops);
+
+       ret = register_dbus_signal_handler(&mmc_removed_handler,
+                       DD_OBJECT_PATH_ODE,
+                       DD_INTERFACE_NAME_ODE,
+                       DD_SIGNAL_REMOVE_MMC,
+                       mmc_removed,
+                       (void*)ops);
+       if (ret < 0)
+               _E("Failed to register mmc removed signal handler(%d)", ret);
+}
+
+static void mmc_mount_status_changed(keynode_t *in_key, void *data)
+{
+       const struct popup_ops *ops = data;
+
+       if (vconf_keynode_get_int(in_key) == VCONFKEY_SYSMAN_MMC_MOUNT_FAILED)
+               return;
+
+       unload_simple_popup(ops);
+       terminate_if_no_popup();
+}
+
+static void register_mmc_mount_handler(const struct popup_ops *ops)
+{
+       if (vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_MOUNT,
+                               mmc_mount_status_changed, (void *)ops) != 0)
+               _E("Failed to register mmc mount handler");
+}
+
+static void unregister_mmc_mount_handler(const struct popup_ops *ops)
+{
+       vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_MOUNT,
+                       mmc_mount_status_changed);
+}
+
+static void launch_mmc_popup(const struct popup_ops *ops)
+{
+       remove_other_mmc_popups(ops);
+       unregister_ode_handler(ops);
+
+       if (ops == &mount_error_ops)
+               register_mmc_mount_handler(ops);
+
+       if (ops == &ode_encrypt_ops ||
+               ops == &ode_decrypt_ops)
+               register_ode_handler(ops);
+}
+
+static void terminate_mmc_popup(const struct popup_ops *ops)
+{
+       unregister_mmc_mount_handler(ops);
+       unregister_ode_handler(ops);
+}
+
+static const struct popup_ops mount_error_ops = {
+       .name           = "mounterr",//"mmc_mount_error",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_DN_POP_FAILED_TO_MOUNT_SD_CARD_REINSERT_OR_FORMAT_SD_CARD",
+       .left_text      = "IDS_COM_SK_OK",
+       .skip           = skip_mount_error_popup,
+       .launch         = launch_mmc_popup,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops mount_read_only_ops = {
+       .name           = "mountrdonly",//"mmc_mount_read_only",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_ST_BODY_SD_CARD_MOUNTED_READ_ONLY",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = launch_mmc_popup,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops check_smack_ops = {
+       .name           = "checksmack",//"mmc_check_smack",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_MF_BODY_MMC_DATA_IS_INITIALIZING_ING",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = launch_mmc_popup,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops ode_encrypt_ops = {
+       .name           = "odeencrypt",//"mmc_ode_encrypt",
+       .show_popup     = load_simple_popup,
+       .title          = "IDS_DN_BODY_ENCRYPT_SD_CARD",
+       .content        = "IDS_ST_POP_TO_USE_YOUR_SD_CARD_IT_MUST_BE_ENCRYPTED_ENCRYPT_SD_CARD_OR_DISABLE_DEVICE_ENCRYPTION_Q",
+       .left_text      = "IDS_ST_BUTTON_ENCRYPT_SD_CARD_ABB",
+       .left           = ode_launch_settings,
+       .right_text     = "IDS_ST_BUTTON_DISABLE_ENCRYPTION_ABB",
+       .right          = send_general_mount_signal,
+       .skip           = skip_ode_popup,
+       .launch         = launch_mmc_popup,
+       .terminate      = terminate_mmc_popup,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops ode_decrypt_ops = {
+       .name           = "odedecrypt",//"mmc_ode_decrypt",
+       .show_popup     = load_simple_popup,
+       .title          = "IDS_DN_BODY_DECRYPT_SD_CARD",
+       .content        = "IDS_ST_POP_TO_USE_YOUR_SD_CARD_IT_MUST_BE_DECRYPTED_DECRYPT_SD_CARD_OR_ENABLE_DEVICE_ENCRYPTION_Q",
+       .left_text      = "IDS_ST_BUTTON_DECRYPT_SD_CARD_ABB",
+       .left           = ode_launch_settings,
+       .right_text     = "IDS_ST_BUTTON_ENABLE_ENCRYPTION_ABB",
+       .right          = send_ode_mount_signal,
+       .skip           = skip_ode_popup,
+       .launch         = launch_mmc_popup,
+       .terminate      = terminate_mmc_popup,
+       .flags          = SCROLLABLE,
+};
+
+/* Constructor to register mmc popup */
+static __attribute__ ((constructor)) void register_mmc_popup(void)
+{
+       register_popup(&mount_error_ops);
+       register_popup(&mount_read_only_ops);
+       register_popup(&check_smack_ops);
+       register_popup(&ode_encrypt_ops);
+       register_popup(&ode_decrypt_ops);
+}
diff --git a/src/mobiledata/mobiledata.c b/src/mobiledata/mobiledata.c
deleted file mode 100755 (executable)
index c2ead53..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2014 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 "popup-common.h"
-
-#define VCONFKEY_MOBILEDATA_ON_CHECK  "db/private/mobiledata/on_popup/check"
-#define VCONFKEY_MOBILEDATA_OFF_CHECK "db/private/mobiledata/off_popup/check"
-
-enum mobiledata_state {
-       MOBILEDATA_DISABLE = 0,
-       MOBILEDATA_ENABLE  = 1,
-};
-
-static const struct popup_ops mobiledata_enable_ops;
-static const struct popup_ops mobiledata_disable_ops;
-
-static void update_check_vconf_state(int mode)
-{
-       char *name;
-
-       switch (mode) {
-       case MOBILEDATA_ENABLE:
-               name = VCONFKEY_MOBILEDATA_ON_CHECK;
-               break;
-       case MOBILEDATA_DISABLE:
-               name = VCONFKEY_MOBILEDATA_OFF_CHECK;
-               break;
-       default:
-               return;
-       }
-
-       if (vconf_set_bool(name, 1) != 0)
-               _E("Failed to set vconf value (%s)", name);
-}
-
-static int mobiledata_update(int state)
-{
-       return vconf_set_bool(VCONFKEY_3G_ENABLE, state);
-}
-
-static void mobiledata_ok(const struct popup_ops *ops)
-{
-       int mode = -1;
-
-       _I("OK is selected");
-
-       if (ops == &mobiledata_enable_ops)
-               mode = MOBILEDATA_ENABLE;
-       else if (ops == &mobiledata_disable_ops)
-               mode = MOBILEDATA_DISABLE;
-
-       if (get_check_state(ops))
-               update_check_vconf_state(mode);
-
-       unload_simple_popup(ops);
-
-       if (mobiledata_update(mode) != 0)
-               _E("Failed to update mobile data state");
-
-       terminate_if_no_popup();
-}
-
-static const struct popup_ops mobiledata_enable_ops = {
-       .name           = "mobiledata_enable",
-       .show_popup     = load_simple_popup,
-       .title          = "IDS_QP_HEADER_TURN_ON_MOBILE_DATA_ABB",
-       .content        = "IDS_PN_POP_YOU_WILL_BE_CONNECTED_TO_YOUR_MOBILE_NETWORK_THIS_MAY_RESULT_IN_ADDITIONAL_CHARGES",
-       .left_text      = "IDS_COM_SK_CANCEL",
-       .left_icon      = "circle-cancel.png",
-       .right          = mobiledata_ok,
-       .right_text     = "IDS_COM_SK_OK",
-       .right_icon     = "circle-ok.png",
-       .check_text     = "IDS_CAM_OPT_DONT_REPEAT_ABB",
-       .flags          = SCROLLABLE | CHECK_BOX,
-};
-
-static const struct popup_ops mobiledata_disable_ops = {
-       .name           = "mobiledata_disable",
-       .show_popup     = load_simple_popup,
-       .title          = "IDS_QP_HEADER_TURN_OFF_MOBILE_DATA_ABB",
-       .content        = "IDS_PN_POP_IF_YOU_TURN_OFF_MOBILE_DATA_YOU_WILL_NOT_BE_ABLE_TO_RECEIVE_NOTIFICATIONS_OR_USE_APPLICATIONS_THAT_REQUIRE_A_MOBILE_NETWORK_CONNECTION_MSG",
-       .left_text      = "IDS_COM_SK_CANCEL",
-       .left_icon      = "circle-cancel.png",
-       .right          = mobiledata_ok,
-       .right_text     = "IDS_COM_SK_OK",
-       .right_icon     = "circle-ok.png",
-       .check_text     = "IDS_CAM_OPT_DONT_REPEAT_ABB",
-       .flags          = SCROLLABLE | CHECK_BOX,
-};
-
-/* Constructor to register mobiledata button */
-static __attribute__ ((constructor)) void mobiledata_register_popup(void)
-{
-       register_popup(&mobiledata_enable_ops);
-       register_popup(&mobiledata_disable_ops);
-}
diff --git a/src/ode/ode-mobile.c b/src/ode/ode-mobile.c
new file mode 100755 (executable)
index 0000000..fb05251
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+#include <aul.h>
+
+#define ODE_ERROR_TYPE                         "_ERROR_TYPE_"
+#define ODE_MEMORY_SPACE                       "_MEMORY_SPACE_"
+
+#define ENCRYPT_NOT_ENOUGH_SPACE       "encrypt_not_enough_space"
+#define DECRYPT_NOT_ENOUGH_SPACE       "decrypt_not_enough_space"
+#define ENCRYPT_OPERATION_FAILED       "encrypt_operation_failed"
+#define DECRYPT_OPERATION_FAILED       "decrypt_operation_failed"
+
+#define DD_BUS_NAME                                    "org.tizen.system.deviced"
+#define DD_OBJECT_PATH_ODE                     "/Org/Tizen/System/DeviceD/Ode"
+#define DD_INTERFACE_NAME_ODE          DD_BUS_NAME".ode"
+#define DD_SIGNAL_REMOVE_ERROR_NOTI    "RequestRemoveErrorNoti"
+
+#define SETTING_ENCRYPTION_UG          "setting-mmc-encryption-efl"
+
+static void cancel_clicked(const struct popup_ops *ops)
+{
+       int ret;
+
+       _I("Cancel is selected");
+       unload_simple_popup(ops);
+
+    ret = broadcast_dbus_signal(DD_OBJECT_PATH_ODE,
+                       DD_INTERFACE_NAME_ODE,
+                       DD_SIGNAL_REMOVE_ERROR_NOTI,
+                       NULL, NULL);
+       if (ret < 0)
+               _E("Failed to send dbus signal to remove ode error noti(%d)", ret);
+
+       terminate_if_no_popup();
+}
+
+static void retry_clicked(const struct popup_ops *ops)
+{
+       bundle *b;
+       int ret;
+
+       _I("Retry is selected");
+       unload_simple_popup(ops);
+
+       b = bundle_create();
+       if (b) {
+               ret = aul_launch_app(SETTING_ENCRYPTION_UG, b);
+               if (ret < 0)
+                       _E("FAIL: aul_launch_app(%d)", ret);
+               if (bundle_free(b) != 0)
+                       _E("FAIL: bundle_free(b);");
+       } else {
+               _E("Failed to create bundle");
+       }
+
+       terminate_if_no_popup();
+}
+
+static int ode_error_get_content(const struct popup_ops *ops, char *content, unsigned int len)
+{
+       struct object_ops *obj;
+       int ret, err_len;
+       char *buf, *err, *cSpace;
+       double dSpace;
+       int iSpace;
+
+       if (!ops || !content)
+               return -EINVAL;
+
+       ret = get_object_by_ops(ops, &obj);
+       if (ret < 0) {
+               _E("Failed to get object (%d)", ret);
+               return -ENOENT;
+       }
+
+       err = (char *)bundle_get_val(obj->b, ODE_ERROR_TYPE);
+       if (!err) {
+               _E("Failed to get error type");
+               return -ENOENT;
+       }
+
+       cSpace = (char *)bundle_get_val(obj->b, ODE_MEMORY_SPACE);
+       if (!cSpace) {
+               _E("Failed to get memory space");
+               return -ENOENT;
+       }
+
+       iSpace = atoi(cSpace);
+       dSpace = (double)iSpace/1024;
+       _I("Space: (%s, %d, %f)", cSpace, iSpace, dSpace);
+
+       err_len = strlen(err);
+       if (!strncmp(err, ENCRYPT_NOT_ENOUGH_SPACE, err_len)) {
+               buf = _("IDS_ST_BODY_UNABLE_TO_ENCRYPT_SD_CARD_NOT_ENOUGH_SPACE_ON_CARD_APPROXIMATELY_P2F_MB_NEEDED_DELETE_SOME_FILES");
+               snprintf(content, len, buf, dSpace);
+               return 0;
+       }
+
+       if (!strncmp(err, ENCRYPT_OPERATION_FAILED, err_len)) {
+               buf = "Encrypt process has been interupted by error. Retry to encrypt SD card?";
+               snprintf(content, len, "%s", buf);
+               return 0;
+       }
+
+       if (!strncmp(err, DECRYPT_NOT_ENOUGH_SPACE, err_len)) {
+               buf = _("IDS_ST_BODY_UNABLE_TO_DECRYPT_SD_CARD_NOT_ENOUGH_SPACE_ON_CARD_APPROXIMATELY_P2F_MB_NEEDED_DELETE_SOME_FILES");
+               snprintf(content, len, buf, dSpace);
+               return 0;
+
+       }
+
+       if (!strncmp(err, DECRYPT_OPERATION_FAILED, err_len)) {
+               buf = "Decrypt process has been interupted by error. Retry to decrypt SD card?";
+               snprintf(content, len, "%s", buf);
+               return 0;
+       }
+
+       _E("Unknown type (%s)", err);
+       return -EINVAL;
+}
+
+static const struct popup_ops ode_error_ops = {
+       .name                   = "ode_error",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_COM_HEADER_ATTENTION",
+       .get_content    = ode_error_get_content,
+       .left_text              = "IDS_COM_SK_CANCEL",
+       .left                   = cancel_clicked,
+       .right_text             = "IDS_COM_SK_RETRY_A",
+       .launch                 = retry_clicked,
+       .flags                  = SCROLLABLE,
+};
+
+static __attribute__ ((constructor)) void ode_register_popup(void)
+{
+       register_popup(&ode_error_ops);
+}
similarity index 79%
rename from packaging/org.tizen.system-syspopup.efl
rename to src/org.tizen.system-syspopup.efl
index 6cb6212..f949765 100644 (file)
@@ -4,7 +4,6 @@ org.tizen.system-syspopup aul::db r-x--- ------
 org.tizen.system-syspopup system::use_internet r----- ------
 org.tizen.system-syspopup system::app_logging -w---- ------
 org.tizen.system-syspopup isf r-x--- ------
-org.tizen.system-syspopup ail::db rw---- ------
 org.tizen.system-syspopup immvibed rw---- ------
 org.tizen.system-syspopup syspopup::db rw---- ------
 org.tizen.system-syspopup power_manager -w---- ------
@@ -20,7 +19,6 @@ org.tizen.system-syspopup devman -wx--- ------
 org.tizen.system-syspopup org.tizen.data-provider-master rw---- ------
 org.tizen.system-syspopup data-provider-master rw---- ------
 org.tizen.system-syspopup data-provider-master::share --x--- ------
-org.tizen.system-syspopup _ -wx--- ------
 org.tizen.system-syspopup stest-service -w---- ------
 org.tizen.system-syspopup tts-server rwx--- ------
 org.tizen.system-syspopup syslogd -w---- ------
@@ -33,16 +31,11 @@ org.tizen.system-syspopup usb-server -w---- ------
 org.tizen.system-syspopup cbhm r----- ------
 org.tizen.system-syspopup mobileprint --x--- ------
 org.tizen.system-syspopup wrt_launchpad_daemon r----- ------
-org.tizen.system-syspopup system::vconf_setting rw---- ------
-org.tizen.system-syspopup system::vconf_system rw---- ------
-org.tizen.system-syspopup system::vconf_deviced rw---- ------
 org.tizen.system-syspopup aul::launch rwx--- ------
 org.tizen.system-syspopup deviced::display rw---- ------
 org.tizen.system-syspopup deviced::haptic rwx--- ------
 org.tizen.system-syspopup system-apps rw---- ------
-org.tizen.system-syspopup ug-setting-call-efl::vconf r----- ------
 org.tizen.system-syspopup org.tizen.setting::system rw---- ------
-org.tizen.system-syspopup testmode::vconf rw---- ------
 org.tizen.system-syspopup e17::notification rw---- ------
 stest-service org.tizen.system-syspopup r-x--- ------
 system-server org.tizen.system-syspopup -w---- ------
@@ -52,9 +45,7 @@ dbus org.tizen.system-syspopup -w---- ------
 pulseaudio org.tizen.system-syspopup -w---- ------
 org.tizen.app-tray org.tizen.system-syspopup r-x--- ------
 tts-server org.tizen.system-syspopup rw---- ------
-_ org.tizen.system-syspopup -w---- ------
 org.tizen.system-syspopup system::homedir rwxat- ------
-org.tizen.system-syspopup system::vconf rwxat- ------
 org.tizen.system-syspopup system::media rwxat- ------
 org.tizen.system-syspopup system::share rwxat- ------
 org.tizen.system-syspopup pulseaudio rwxat- ------
@@ -62,11 +53,6 @@ e17 org.tizen.system-syspopup -w---- ------
 org.tizen.system-syspopup sys-assert::core rwxat- ------
 org.tizen.system-syspopup privacy-manager::db r----l ------
 org.tizen.system-syspopup pkgmgr::db r----l ------
-org.tizen.system-syspopup system::vconf_inhouse rw---- ------
-org.tizen.system-syspopup system::vconf_privacy rw---- ------
-org.tizen.system-syspopup system::vconf_multimedia rw---- ------
-org.tizen.system-syspopup system::vconf_network rw---- ------
-org.tizen.system-syspopup system::vconf_misc rw---- ------
 org.tizen.system-syspopup device::sys_logging -w---- ------
 org.tizen.system-syspopup org.tizen.w-idle-clock-weather2 rwx--- ------
 org.tizen.system-syspopup org.tizen.idle-clock-pedometer rwx--- ------
@@ -78,6 +64,6 @@ org.tizen.system-syspopup org.tizen.w-idle-clock-analog1 rwx--- ------
 org.tizen.system-syspopup org.tizen.idle-clock-digital rwx--- ------
 org.tizen.system-syspopup org.tizen.w-idle-clock-analog2 rwx--- ------
 org.tizen.system-syspopup ecore::lock rwxat- ------
-org.tizen.system-syspopup device::app_logging rw--- -----
-org.tizen.system-syspopup device::sys_logging rw--- -----
-org.tizen.system-syspopup deviced::reboot rwx--- ------
+org.tizen.system-syspopup tizen::vconf::public::r rw---- ------
+org.tizen.system-syspopup tizen::vconf::platform::r rw---- ------
+org.tizen.system-syspopup tizen::vconf::platform::rw rw---- ------
old mode 100755 (executable)
new mode 100644 (file)
similarity index 71%
rename from data/org.tizen.system-syspopup.xml
rename to src/org.tizen.system-syspopup.xml
index b3dd58a..27652e1
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.system-syspopup" version="0.1.7" install-location="internal-only" support-mode="screen-reader">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.tizen.system-syspopup" version="0.1.7" install-location="internal-only" support-mode="screen-reader">
        <label>System popup</label>
        <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
        <description>System FW system popup application</description>
diff --git a/src/poweroff/CMakeLists.txt b/src/poweroff/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..7bb7a3d
--- /dev/null
@@ -0,0 +1,58 @@
+#################### Poweroff #########################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+IF(POWEROFF_POPUP STREQUAL off)
+       RETURN()
+ENDIF(POWEROFF_POPUP STREQUAL off)
+
+SET(POWEROFF_SRCS ${COMMON_SRCS} poweroff.c)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/common)
+
+SET(VENDOR "tizen")
+SET(PACKAGE "poweroff-syspopup")
+SET(EXECNAME "poweroff-popup")
+SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
+SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(MANIFESTDIR "${CMAKE_INSTALL_PREFIX}/share/packages")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(poweroff_pkgs REQUIRED
+               appcore-efl
+               elementary
+               dlog
+               deviced
+               utilX
+               evas
+               ecore
+               ecore-x
+               vconf
+               syspopup
+               syspopup-caller
+               feedback
+               efl-extension
+)
+
+FOREACH(flag ${poweroff_pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall -fpie")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
+SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+
+ADD_EXECUTABLE(${EXECNAME} ${POWEROFF_SRCS})
+TARGET_LINK_LIBRARIES(${EXECNAME} ${poweroff_pkgs_LDFLAGS})
+
+INSTALL(TARGETS ${EXECNAME} DESTINATION ${BINDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/poweroff/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/src/poweroff/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE.Apache_v2 DESTINATION ${LICENSEDIR} RENAME ${PKGNAME})
@@ -2,7 +2,6 @@ org.tizen.poweroff-syspopup system r-x--- ------
 org.tizen.poweroff-syspopup svi-data r-x--- ------
 org.tizen.poweroff-syspopup system::app_logging -w---- ------
 org.tizen.poweroff-syspopup isf r-x--- ------
-org.tizen.poweroff-syspopup ail::db rw---- ------
 org.tizen.poweroff-syspopup immvibed rw---- ------
 org.tizen.poweroff-syspopup syspopup::db rw---- ------
 org.tizen.poweroff-syspopup power_manager -w---- ------
@@ -18,7 +17,6 @@ org.tizen.poweroff-syspopup devman -wx--- ------
 org.tizen.poweroff-syspopup org.tizen.data-provider-master rw---- ------
 org.tizen.poweroff-syspopup data-provider-master rw---- ------
 org.tizen.poweroff-syspopup data-provider-master::share --x--- ------
-org.tizen.poweroff-syspopup _ -wx--- ------
 org.tizen.poweroff-syspopup stest-service -w---- ------
 org.tizen.poweroff-syspopup tts-server rwx--- ------
 org.tizen.poweroff-syspopup syslogd -w---- ------
@@ -26,10 +24,6 @@ org.tizen.poweroff-syspopup device::app_logging -w---- ------
 org.tizen.poweroff-syspopup device::led rw---- ------
 org.tizen.poweroff-syspopup org.tizen.svoice rw---- ------
 org.tizen.poweroff-syspopup org.tizen.voicerecorder rw---- ------
-org.tizen.poweroff-syspopup system::vconf_setting rw---- ------
-org.tizen.poweroff-syspopup system::vconf_system rw---- ------
-org.tizen.poweroff-syspopup system::vconf_deviced rw---- ------
-org.tizen.poweroff-syspopup system::vconf rwxat- ------
 org.tizen.poweroff-syspopup deviced::display rw---- ------
 org.tizen.poweroff-syspopup deviced::haptic rwx--- ------
 org.tizen.poweroff-syspopup system-apps rw---- ------
@@ -46,7 +40,6 @@ dbus org.tizen.poweroff-syspopup rw---- ------
 pulseaudio org.tizen.poweroff-syspopup -w---- ------
 org.tizen.app-tray org.tizen.poweroff-syspopup r-x--- ------
 tts-server org.tizen.poweroff-syspopup rw---- ------
-_ org.tizen.poweroff-syspopup -w---- ------
 org.tizen.poweroff-syspopup system::homedir rwxat- ------
 org.tizen.poweroff-syspopup system::media rwxat- ------
 org.tizen.poweroff-syspopup system::share rwxat- ------
@@ -55,10 +48,6 @@ e17 org.tizen.poweroff-syspopup -w---- ------
 org.tizen.poweroff-syspopup sys-assert::core rwxat- ------
 org.tizen.poweroff-syspopup privacy-manager::db r----l ------
 org.tizen.poweroff-syspopup pkgmgr::db r----l ------
-org.tizen.poweroff-syspopup system::vconf_inhouse rw---- ------
-org.tizen.poweroff-syspopup system::vconf_privacy rw---- ------
-org.tizen.poweroff-syspopup system::vconf_multimedia rw---- ------
-org.tizen.poweroff-syspopup system::vconf_network rw---- ------
-org.tizen.poweroff-syspopup system::vconf_misc rw---- ------
 org.tizen.poweroff-syspopup ecore::lock rwxat- ------
-org.tizen.poweroff-syspopup deviced::reboot rwx--- ------
+org.tizen.poweroff-syspopup tizen::vconf::display rw---- ------
+org.tizen.poweroff-syspopup tizen::vconf::platform::r rw---- ------
similarity index 76%
rename from data/org.tizen.poweroff-syspopup.xml
rename to src/poweroff/org.tizen.poweroff-syspopup.xml
index de14cd4..4b6215b 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.poweroff-syspopup" version="0.1.7" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.tizen.poweroff-syspopup" version="0.1.7" install-location="internal-only">
        <label>Power off system popup</label>
        <author email="giyeol.ok@samsung.com" href="www.samsung.com">Giyeol Ok</author>
        <description>System popup application (power off system popup)</description>
diff --git a/src/poweroff/poweroff.c b/src/poweroff/poweroff.c
new file mode 100755 (executable)
index 0000000..4297700
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+#define SYSTEMD_STOP_POWER_OFF 4
+
+static void remove_popup(const struct popup_ops *ops)
+{
+       static bool terminating = false;
+
+       if (terminating)
+               return;
+
+       terminating = true;
+
+       unload_simple_popup(ops);
+       popup_terminate();
+}
+
+static void pm_state_changed(keynode_t *key, void *data)
+{
+       const struct popup_ops *ops = data;
+
+       if (!key)
+               return;
+
+       if (vconf_keynode_get_int(key) != VCONFKEY_PM_STATE_LCDOFF)
+               return;
+
+       remove_popup(ops);
+}
+
+static void event_back_key_up(void *data, Evas_Object *obj, void *event_info)
+{
+       const struct popup_ops *ops = data;
+       remove_popup(ops);
+}
+
+static void register_handlers(const struct popup_ops *ops)
+{
+       Evas_Object *win;
+
+       if (vconf_notify_key_changed(
+                               VCONFKEY_PM_STATE,
+                               pm_state_changed,
+                               (void *)ops) != 0)
+               _E("Failed to register vconf");
+
+       win = get_window();
+       if (win)
+               eext_object_event_callback_add(win, EEXT_CALLBACK_BACK, event_back_key_up, (void*)ops);
+}
+
+static void unregister_handlers(const struct popup_ops *ops)
+{
+       Evas_Object *win;
+
+       vconf_ignore_key_changed(VCONFKEY_PM_STATE, pm_state_changed);
+
+       win = get_window();
+       if (win)
+               eext_object_event_callback_del(win, EEXT_CALLBACK_BACK, event_back_key_up);
+}
+
+static void poweroff_launch(const struct popup_ops *ops)
+{
+       register_handlers(ops);
+}
+
+static void poweroff_terminate(const struct popup_ops *ops)
+{
+       unregister_handlers(ops);
+}
+
+static void poweroff_clicked(const struct popup_ops *ops)
+{
+       Evas_Object *rect, *win;
+       Evas_Coord w, h, size;
+       static int bPowerOff = 0;
+
+       if (bPowerOff == 1)
+               return;
+       bPowerOff = 1;
+
+       unload_simple_popup(ops);
+
+       win = get_window();
+       if (!win)
+               popup_terminate();
+
+       unregister_handlers(ops);
+
+       rect = evas_object_rectangle_add(evas_object_evas_get(win));
+       evas_object_geometry_get(win, NULL, NULL, &w, &h);
+       size = max(w, h);
+       evas_object_resize(rect, size, size);
+       evas_object_color_set(rect, 0, 0, 0, 255);
+       evas_object_show(rect);
+
+       if (vconf_set_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS, SYSTEMD_STOP_POWER_OFF) != 0)
+               _E("Failed to request poweroff to deviced");
+}
+
+static const struct popup_ops poweroff_ops = {
+       .name           = "poweroff",
+       .show_popup     = load_simple_popup,
+       .title          = "IDS_ST_BODY_POWER_OFF",
+       .content        = "IDS_TPLATFORM_BODY_POWER_OFF_THE_DEVICE_Q",
+       .left_text      = "IDS_COM_SK_CANCEL",
+       .right_text     = "IDS_HS_BUTTON_POWER_OFF_ABB2",
+       .right          = poweroff_clicked,
+       .launch         = poweroff_launch,
+       .terminate      = poweroff_terminate,
+       .flags          = SCROLLABLE,
+};
+
+static __attribute__ ((constructor)) void poweroff_register_popup(void)
+{
+       register_popup(&poweroff_ops);
+}
diff --git a/src/recovery/recovery-mobile.c b/src/recovery/recovery-mobile.c
new file mode 100755 (executable)
index 0000000..5198617
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+#define SYSTEMD_STOP_POWER_RESTART_RECOVERY 6
+
+static void reboot_now(const struct popup_ops *ops)
+{
+       _I("Reboot now selected");
+
+       unload_simple_popup(ops);
+
+       if (vconf_set_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS,
+                               SYSTEMD_STOP_POWER_RESTART_RECOVERY) != 0)
+               _E("Fail to request restart to deviced");
+
+       terminate_if_no_popup();
+}
+
+static const struct popup_ops recovery_ops = {
+       .name                   = "recovery",
+       .show_popup             = load_simple_popup,
+       .title                  = "Prevention information",
+       .content                = "To protect your device, it is recommended to reboot it",
+       .left_text              = "Reboot now",
+       .left                   = reboot_now,
+       .right_text             = "Reboot later",
+       .flags                  = SCROLLABLE,
+};
+
+
+/* Constructor to register mount_failed button */
+static __attribute__ ((constructor)) void recovery_register_popup(void)
+{
+       register_popup(&recovery_ops);
+}
diff --git a/src/storage/lowstorage-micro.c b/src/storage/lowstorage-micro.c
new file mode 100755 (executable)
index 0000000..5106c94
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+static const struct popup_ops lowstorage_warning_ops;
+static const struct popup_ops lowstorage_critical_ops;
+static const struct popup_ops lowstorage_full_ops;
+
+static void remove_other_lowstorage_popups(const struct popup_ops *ops)
+{
+       if (ops != &lowstorage_warning_ops)
+               unload_simple_popup(&lowstorage_warning_ops);
+
+       if (ops != &lowstorage_critical_ops)
+               unload_simple_popup(&lowstorage_critical_ops);
+
+       if (ops != &lowstorage_full_ops)
+               unload_simple_popup(&lowstorage_full_ops);
+}
+
+static const struct popup_ops lowstorage_warning_ops = {
+       .name           = "lowstorage_warning",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_DAV_BODY_LOW_MEMORY_LEFT_ORANGE",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowstorage_popups,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops lowstorage_critical_ops = {
+       .name           = "lowstorage_critical",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_DAV_BODY_LOW_MEMORY_LEFT_ORANGE",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowstorage_popups,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops lowstorage_full_ops = {
+       .name           = "lowstorage_full",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_ST_POP_UNABLE_TO_RECORD_THERE_IS_NOT_ENOUGH_SPACE_IN_YOUR_GEAR_STORAGE",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowstorage_popups,
+       .flags          = SCROLLABLE,
+};
+
+static __attribute__ ((constructor)) void lowstorage_register_popup(void)
+{
+       register_popup(&lowstorage_warning_ops);
+       register_popup(&lowstorage_critical_ops);
+       register_popup(&lowstorage_full_ops);
+}
diff --git a/src/storage/lowstorage-mobile.c b/src/storage/lowstorage-mobile.c
new file mode 100755 (executable)
index 0000000..e69da17
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+static const struct popup_ops lowstorage_warning_ops;
+static const struct popup_ops lowstorage_critical_ops;
+
+static void remove_other_lowstorage_popups(const struct popup_ops *ops)
+{
+       if (ops != &lowstorage_warning_ops)
+               unload_simple_popup(&lowstorage_warning_ops);
+
+       if (ops != &lowstorage_critical_ops)
+               unload_simple_popup(&lowstorage_critical_ops);
+}
+
+static const struct popup_ops lowstorage_warning_ops = {
+       .name           = "lowstorage_warning",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_DAV_BODY_LOW_MEMORY_LEFT_ORANGE",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowstorage_popups,
+       .flags          = SCROLLABLE,
+};
+
+static const struct popup_ops lowstorage_critical_ops = {
+       .name           = "lowstorage_critical",
+       .show_popup     = load_simple_popup,
+       .content        = "IDS_DAV_BODY_LOW_MEMORY_LEFT_ORANGE",
+       .left_text      = "IDS_COM_SK_OK",
+       .launch         = remove_other_lowstorage_popups,
+       .flags          = SCROLLABLE,
+};
+
+static __attribute__ ((constructor)) void lowstorage_register_popup(void)
+{
+       register_popup(&lowstorage_warning_ops);
+       register_popup(&lowstorage_critical_ops);
+}
diff --git a/src/usb/usb-device.c b/src/usb/usb-device.c
new file mode 100755 (executable)
index 0000000..a768b97
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2015 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 "popup-common.h"
+
+enum button_selected_e {
+       USB_DEVICE_CONFIRM_OK,
+       USB_DEVICE_CONFIRM_NOK,
+};
+
+#define USD_PATH                               "/Org/Tizen/System/USD"
+#define USD_INTERFACE                          "org.tizen.system.usd"
+#define USD_USB_DEVICE_CONFIRM_SIGNAL          "USBDeviceOpenResult"
+
+static const struct popup_ops usb_device_confirm_ops;
+
+static void send_result_dbus_signal(int result)
+{
+       int ret;
+       char buf[8];
+       char *param[1];
+
+       snprintf(buf, sizeof(buf), "%d", result);
+       param[0] = buf;
+       ret = broadcast_dbus_signal(USD_PATH,
+                       USD_INTERFACE,
+                       USD_USB_DEVICE_CONFIRM_SIGNAL,
+                       "i", param);
+       if (ret < 0)
+               _E("FAIL: broadcast_dbus_signal(%d)", ret);
+}
+
+static void usb_device_confirm_ok_clicked(const struct popup_ops *ops)
+{
+       _I("OK is selected");
+
+       unload_simple_popup(ops);
+
+       send_result_dbus_signal(USB_DEVICE_CONFIRM_OK);
+
+       terminate_if_no_popup();
+}
+
+static void usb_device_confirm_cancel_clicked(const struct popup_ops *ops)
+{
+       _I("CANCEL is selected");
+
+       unload_simple_popup(ops);
+
+       send_result_dbus_signal(USB_DEVICE_CONFIRM_NOK);
+
+       terminate_if_no_popup();
+}
+
+static void usb_device_confirm_terminate(const struct popup_ops *ops)
+{
+       _I("terminate usb device confirm popup");
+
+       unload_simple_popup(ops);
+
+       send_result_dbus_signal(USB_DEVICE_CONFIRM_NOK);
+
+       terminate_if_no_popup();
+}
+
+static const struct popup_ops usb_device_confirm_ops = {
+       .name           = "usb_device_confirm",
+       .show_popup     = load_simple_popup,
+       .content        = "Do you use this usb device?", /* TODO */
+       .left_text      = "IDS_COM_SK_CANCEL",
+       .left           = usb_device_confirm_cancel_clicked,
+       .right_text     = "IDS_COM_SK_OK",
+       .right          = usb_device_confirm_ok_clicked,
+       .terminate      = usb_device_confirm_terminate,
+       .flags          = SCROLLABLE,
+};
+
+/* Constructor to register usb_device popup */
+static __attribute__ ((constructor)) void usb_device_register_popup(void)
+{
+       register_popup(&usb_device_confirm_ops);
+
+}
diff --git a/src/usb/usb-mobile.c b/src/usb/usb-mobile.c
new file mode 100755 (executable)
index 0000000..d2a2056
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+
+static const struct popup_ops usb_error_ops;
+static const struct popup_ops usb_restrict_ops;
+
+static int state_handler = -1;
+
+static void usb_state_changed(keynode_t *key, void *data)
+{
+       int state;
+       const struct popup_ops *ops = data;
+
+       if (vconf_get_int(VCONFKEY_SYSMAN_USB_STATUS, &state) != 0)
+               return;
+
+       switch (state) {
+       case VCONFKEY_SYSMAN_USB_DISCONNECTED:
+               _I("USB cabel is disconnected");
+               unload_simple_popup(ops);
+               if (state_handler == 0) {
+                       vconf_ignore_key_changed(
+                                       VCONFKEY_SYSMAN_USB_STATUS,
+                                       usb_state_changed);
+                       state_handler = -1;
+               }
+               terminate_if_no_popup();
+               break;
+       case VCONFKEY_SYSMAN_USB_CONNECTED:
+       case VCONFKEY_SYSMAN_USB_AVAILABLE:
+       default:
+               break;
+       }
+}
+
+static void usb_launch(const struct popup_ops *ops)
+{
+       const struct popup_ops *remove;
+
+       if (ops == &usb_error_ops)
+               remove = &usb_restrict_ops;
+       else if (ops == &usb_restrict_ops)
+               remove = &usb_error_ops;
+       else
+               remove = NULL;
+
+       if (remove)
+               unload_simple_popup(remove);
+
+       if (state_handler != 0) {
+               state_handler = vconf_notify_key_changed(
+                               VCONFKEY_SYSMAN_USB_STATUS,
+                               usb_state_changed, (void *)ops);
+               if (state_handler != 0)
+                       _E("Failed to register usb state change event()");
+       }
+}
+
+static void usb_terminate(const struct popup_ops *ops)
+{
+       unload_simple_popup(ops);
+       if (state_handler == 0) {
+               vconf_ignore_key_changed(
+                               VCONFKEY_SYSMAN_USB_STATUS,
+                               usb_state_changed);
+               state_handler = -1;
+       }
+       terminate_if_no_popup();
+}
+
+static const struct popup_ops usb_error_ops = {
+       .name                   = "usb_error",
+       .show_popup             = load_simple_popup,
+       .content                = "IDS_USB_POP_USB_CONNECTION_FAILED",
+       .left_text              = "IDS_COM_SK_OK",
+       .launch                 = usb_launch,
+       .terminate              = usb_terminate,
+       .flags                  = SCROLLABLE,
+};
+
+static const struct popup_ops usb_restrict_ops = {
+       .name                   = "usb_restrict",
+       .show_popup             = load_simple_popup,
+       .content                = "IDS_ST_POP_SECURITY_POLICY_PREVENTS_USE_OF_DESKTOP_SYNC",
+       .left_text              = "IDS_COM_SK_OK",
+       .launch                 = usb_launch,
+       .terminate              = usb_terminate,
+       .flags                  = SCROLLABLE,
+};
+
+
+/* Constructor to register mount_failed button */
+static __attribute__ ((constructor)) void usb_register_popup(void)
+{
+       register_popup(&usb_error_ops);
+       register_popup(&usb_restrict_ops);
+}
diff --git a/src/usb/usbotg-mobile.c b/src/usb/usbotg-mobile.c
new file mode 100755 (executable)
index 0000000..c4187af
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ *  system-popup
+ *
+ * Copyright (c) 2014 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 "popup-common.h"
+#include <appsvc.h>
+
+#define MYFILES_APPNAME        "org.tizen.myfile"
+#define GALLERY_APPNAME        "org.tizen.gallery"
+
+#define USB_MOUNT_ROOT_PATH    "/opt/storage"
+#define USB_MOUNT_PATH         "_DEVICE_PATH_"
+
+#define BUF_MAX 128
+
+#define DEVICED_PATH                   "/Org/Tizen/System/DeviceD"
+#define DEVICED_IFACE                  "org.tizen.system.deviced"
+#define DEVICED_PATH_USBHOST   DEVICED_PATH"/Usbhost"
+#define DEVICED_IFACE_USBHOST  DEVICED_IFACE".Usbhost"
+#define SIGNAL_NAME_UNMOUNT            "unmount_storage"
+
+static char added_path[BUF_MAX];
+static char removed_path[BUF_MAX];
+
+enum ext_app {
+       EXT_MYFILES,
+       EXT_GALLERY,
+};
+
+static const struct popup_ops storage_mounted_ops;
+static const struct popup_ops unmount_storage_ops;
+static const struct popup_ops camera_added_ops;
+static const struct popup_ops storage_mount_failed_ops;
+static const struct popup_ops storage_removed_unsafe_ops;
+
+static void remove_otg_popup(const struct popup_ops *ops, char *path)
+{
+       int len;
+       char *popup_path;
+
+       if (ops == &storage_mounted_ops)
+               popup_path = added_path;
+       else if (ops == &unmount_storage_ops)
+               popup_path = removed_path;
+       else
+               popup_path = NULL;
+
+       if (popup_path) {
+               if (!path)
+                       return;
+               len = strlen(popup_path);
+               if (len != strlen(path))
+                       return;
+               if (strncmp(popup_path, path, len))
+                       return;
+       }
+
+       unload_simple_popup(ops);
+}
+
+static void set_myfiles_param(bundle *b)
+{
+       if (!b)
+               return;
+
+       if (strlen(added_path) > 0)
+               appsvc_add_data(b, "path", added_path);
+       else
+               appsvc_add_data(b, "path", USB_MOUNT_ROOT_PATH);
+       appsvc_set_pkgname(b, MYFILES_APPNAME);
+}
+
+static void set_gallery_param(bundle *b)
+{
+       if (!b)
+               return;
+       appsvc_add_data(b, "album-id", "GALLERY_ALBUM_PTP_ID");
+       appsvc_set_pkgname(b, GALLERY_APPNAME);
+}
+
+static struct ext_app_type {
+       int type;
+       void (*set_param)(bundle *b);
+} app_type[] = {
+       { EXT_MYFILES   , set_myfiles_param     },
+       { EXT_GALLERY   , set_gallery_param     },
+};
+
+static void launch_app(int type)
+{
+       bundle *b;
+       int ret, i, type_len;
+
+       type_len = ARRAY_SIZE(app_type);
+       for (i = 0 ; i < ARRAY_SIZE(app_type) ; i++) {
+               if (type == app_type[i].type)
+                       break;
+       }
+       if (i == type_len) {
+               _E("Invalid type (%d)", type);
+               return;
+       }
+
+       b = bundle_create();
+       if (b) {
+               appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
+               if (app_type[i].set_param)
+                       app_type[i].set_param(b);
+               ret = appsvc_run_service(b, 0, NULL, NULL);
+               if (ret < 0)
+                       _E("Failed to launch (%d) app(%d)", type, ret);
+               bundle_free(b);
+       }
+}
+
+static void storage_browse(const struct popup_ops *ops)
+{
+       unload_simple_popup(ops);
+       launch_app(EXT_MYFILES);
+       terminate_if_no_popup();
+}
+
+static void camera_browse(const struct popup_ops *ops)
+{
+       unload_simple_popup(ops);
+       launch_app(EXT_GALLERY);
+       terminate_if_no_popup();
+}
+
+static void storage_unmount(const struct popup_ops *ops)
+{
+       char *param[1];
+       int ret;
+
+       unload_simple_popup(ops);
+
+       param[0] = removed_path;
+
+       ret = broadcast_dbus_signal(DEVICED_PATH_USBHOST,
+                       DEVICED_IFACE_USBHOST,
+                       SIGNAL_NAME_UNMOUNT, "s", param);
+       if (ret < 0)
+               _E("FAIL: broadcast_dbus_signal()");
+
+       memset(removed_path, 0, sizeof(removed_path));
+
+       terminate_if_no_popup();
+}
+
+static void storage_mounted_launch(const struct popup_ops *ops)
+{
+       int ret;
+       struct object_ops *obj;
+       char *path;
+
+       if (!ops)
+               return;
+
+       ret = get_object_by_ops(ops, &obj);
+       if (ret < 0) {
+               _E("Failed to get object (%d)", ret);
+               return;
+       }
+
+       path = (char *)bundle_get_val(obj->b, USB_MOUNT_PATH);
+       if (!path) {
+               _E("Failed to get mount path");
+               return;
+       }
+
+       _I("USB storage mount path (%s)", path);
+       snprintf(added_path, sizeof(added_path), "%s", path);
+}
+
+static void unmount_storage_launch(const struct popup_ops *ops)
+{
+       int ret;
+       struct object_ops *obj;
+       char *path;
+
+       if (!ops)
+               return;
+
+       ret = get_object_by_ops(ops, &obj);
+       if (ret < 0) {
+               _E("Failed to get object (%d)", ret);
+               return;
+       }
+
+       path = (char *)bundle_get_val(obj->b, USB_MOUNT_PATH);
+       if (!path) {
+               _E("Failed to get mount path");
+               return;
+       }
+
+       remove_otg_popup(&storage_mounted_ops, path);
+
+       snprintf(removed_path, sizeof(removed_path), "%s", path);
+}
+
+static int storage_unmounted(bundle *b, const struct popup_ops *ops)
+{
+       char *path;
+
+       if (!b || !ops)
+               return -EINVAL;
+
+       path = (char *)bundle_get_val(b, USB_MOUNT_PATH);
+       if (!path) {
+               _E("Failed to get mount path");
+               return -ENOENT;
+       }
+
+       remove_otg_popup(&storage_mounted_ops, path);
+       remove_otg_popup(&unmount_storage_ops, path);
+
+       terminate_if_no_popup();
+
+       return 0;
+}
+
+static int camera_removed(bundle *b, const struct popup_ops *ops)
+{
+       remove_otg_popup(&camera_added_ops, NULL);
+       terminate_if_no_popup();
+       return 0;
+}
+
+static const struct popup_ops storage_mounted_ops = {
+       .name                   = "usbotg_storage_mounted",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_ST_BODY_USB_STORAGE_ABB",
+       .content                = "IDS_USB_BODY_BROWSE_STORAGE_CONNECTED_VIA_USB_Q",
+       .left_text              = "IDS_COM_SK_CANCEL",
+       .right_text             = "IDS_BT_SK_BROWSE",
+       .right                  = storage_browse,
+       .launch                 = storage_mounted_launch,
+       .flags                  = SCROLLABLE,
+};
+
+static const struct popup_ops storage_unmounted_ops = {
+       .name                   = "usbotg_storage_unmounted",
+       .show_popup             = storage_unmounted,
+};
+
+static const struct popup_ops unmount_storage_ops = {
+       .name                   = "usbotg_unmount_storage",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_ST_BODY_USB_STORAGE_ABB",
+       .content                = "IDS_COM_POP_UNMOUNT_USB_MASS_STORAGE_BEFORE_REMOVING_TO_AVOID_DATA_LOSS",
+       .left_text              = "IDS_COM_SK_CANCEL",
+       .right_text             = "IDS_USB_BUTTON_UNMOUNT",
+       .right                  = storage_unmount,
+       .launch                 = unmount_storage_launch,
+       .flags                  = SCROLLABLE,
+};
+
+static const struct popup_ops camera_added_ops = {
+       .name                   = "usbotg_camera_added",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_CAM_HEADER_CAMERA_M_APPLICATION",
+       .content                = "IDS_USB_BODY_BROWSE_CAMERA_CONNECTED_VIA_USB_Q",
+       .left_text              = "IDS_COM_SK_CANCEL",
+       .right_text             = "IDS_BT_SK_BROWSE",
+       .right                  = camera_browse,
+       .flags                  = SCROLLABLE,
+};
+
+static const struct popup_ops camera_removed_ops = {
+       .name                   = "usbotg_camera_removed",
+       .show_popup             = camera_removed,
+};
+
+static const struct popup_ops storage_mount_failed_ops = {
+       .name                   = "usbotg_storage_mount_failed",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_COM_HEADER_ATTENTION",
+       .content                = "IDS_COM_BODY_USB_STORAGE_BLANK_OR_HAS_UNSUPPORTED_FILE_SYSTEM",
+       .left_text              = "IDS_COM_SK_OK",
+       .flags                  = SCROLLABLE,
+};
+
+static const struct popup_ops storage_removed_unsafe_ops = {
+       .name                   = "usbotg_storage_removed_unsafe",
+       .show_popup             = load_simple_popup,
+       .title                  = "IDS_COM_HEADER_ATTENTION",
+       .content                = "IDS_COM_POP_USB_MASS_STORAGE_UNEXPECTEDLY_REMOVED",
+       .left_text              = "IDS_COM_SK_OK",
+       .flags                  = SCROLLABLE,
+};
+
+
+/* Constructor to register mount_failed button */
+static __attribute__ ((constructor)) void usbotg_register_popup(void)
+{
+       register_popup(&storage_mounted_ops);
+       register_popup(&storage_unmounted_ops);
+       register_popup(&unmount_storage_ops);
+       register_popup(&camera_added_ops);
+       register_popup(&camera_removed_ops);
+       register_popup(&storage_mount_failed_ops);
+       register_popup(&storage_removed_unsafe_ops);
+}
similarity index 59%
rename from usbhost-devices/CMakeLists.txt
rename to src/usbhost-devices/CMakeLists.txt
index c180a2f..20a6ffa 100644 (file)
@@ -1,12 +1,12 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(usbhost-devices C)
 
-SET(SRCS ${CMAKE_SOURCE_DIR}/usbhost-devices/host-devices.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
+IF(USBHOST_LIST_APP STREQUAL off)
+       RETURN()
+ENDIF(USBHOST_LIST_APP STREQUAL off)
 
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
+SET(SRCS host-devices.c)
 
+SET(DIRNAME "usbhost-devices")
 SET(VENDOR "tizen")
 SET(PACKAGE "host-devices")
 SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
@@ -14,6 +14,7 @@ SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
 SET(BINDIR "${PREFIX}/bin")
 SET(RESDIR "${PREFIX}/res")
 SET(MANIFESTDIR "${CMAKE_INSTALL_PREFIX}/share/packages")
+SET(SRCDIR "${CMAKE_SOURCE_DIR}/src/${DIRNAME}")
 
 SET(PKG_MODULES
        appcore-efl
@@ -23,7 +24,7 @@ SET(PKG_MODULES
        vconf
        dlog
        bundle
-       efl-assist
+       efl-extension
        feedback
        appsvc
        deviced
@@ -51,13 +52,14 @@ ADD_EXECUTABLE(${PKGNAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PKGNAME} ${pkgs_LDFLAGS} "-ldl")
 
 ADD_CUSTOM_TARGET(host-devices.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/host-devices.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/host-devices.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/host-devices.edc
+               COMMAND edje_cc -id ${SRCDIR}/edcs
+               ${SRCDIR}/edcs/host-devices.edc ${SRCDIR}/host-devices.edj
+               DEPENDS ${SRCDIR}/edcs/host-devices.edc
 )
 ADD_DEPENDENCIES(${PKGNAME} host-devices.edj)
 
 INSTALL(TARGETS ${PKGNAME} DESTINATION ${BINDIR})
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/host-devices.edj DESTINATION ${RESDIR}/edje/host-devices)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${SRCDIR}/host-devices.edj DESTINATION ${RESDIR}/edje/host-devices)
+INSTALL(FILES ${SRCDIR}/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
+INSTALL(FILES ${SRCDIR}/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE.Apache_v2 DESTINATION ${LICENSEDIR} RENAME ${PKGNAME})
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from usbhost-devices/data/usb_icon_blue.png
rename to src/usbhost-devices/edcs/usb_icon_blue.png
similarity index 81%
rename from usbhost-devices/host-devices.c
rename to src/usbhost-devices/host-devices.c
index be45e8d..dd3dc71 100644 (file)
  */
 
 #include <stdio.h>
-#include <efl_assist.h>
+#include <efl_extension.h>
 #include <vconf.h>
 #include <ui-gadget.h>
-#include "common.h"
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <dlog.h>
+#include <bundle_internal.h>
+#include <glib.h>
+
+
+#undef LOG_TAG
+#define LOG_TAG "SYSTEM_APPS"
+#define _D(fmt, args...)   SLOGD(fmt, ##args)
+#define _E(fmt, args...)   SLOGE(fmt, ##args)
+#define _I(fmt, args...)   SLOGI(fmt, ##args)
 
 #define GENLIST_STYLE "2text.1icon.4"
 
 #define EDJ_NAME EDJ_PATH"/host-devices.edj"
 #define USB_ICON_BLUE "usb_icon_blue.png"
 
+struct appdata {
+       Evas_Object *win_main;
+};
+
 static Evas_Object *nf;
 static Evas_Object *gl; /* genlist */
 static GList *devs;     /* devices to show on the genlist  */
@@ -61,6 +77,86 @@ static Ecore_Event_Handler *mouse_event_handler;
 
 static void release_handlers(struct appdata *ad);
 
+/* Terminate app */
+static Eina_Bool exit_idler_cb(void *data)
+{
+       elm_exit();
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void terminate_app(void)
+{
+       if (ecore_idler_add(exit_idler_cb, NULL))
+               return;
+       exit_idler_cb(NULL);
+}
+
+static int append_variant(DBusMessageIter *iter, const char *sig, char *param[])
+{
+       char *ch;
+       int i;
+       int iValue;
+
+       if (!sig || !param)
+               return 0;
+       for (ch = (char*)sig, i = 0; *ch != '\0'; ++i, ++ch) {
+               switch (*ch) {
+               case 'i':
+                       iValue = atoi(param[i]);
+                       dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &iValue);
+                       break;
+               case 's':
+                       dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &param[i]);
+                       break;
+               default:
+                       return -EINVAL;
+               }
+       }
+       return 0;
+}
+
+static int broadcast_dbus_signal(const char *path, const char *interface,
+               const char *name, const char *sig, char *param[])
+{
+       DBusPendingCall *pc;
+       DBusMessageIter iter;
+       DBusMessage *msg;
+       int ret;
+
+       if (!path || !interface || !name)
+               return -EINVAL;
+
+       if (!edbus_conn)
+               return -EIO;
+
+       msg = dbus_message_new_signal(path, interface, name);
+       if (!msg) {
+               _E("FAIL: dbus_message_new_signal()");
+               return -ENOMEM;
+       }
+
+       dbus_message_iter_init_append(msg, &iter);
+       ret = append_variant(&iter, sig, param);
+       if (ret < 0) {
+               _E("append_variant error(%d)", ret);
+               goto out;
+       }
+
+       pc = e_dbus_message_send(edbus_conn, msg, NULL, -1, NULL);
+       if (!pc) {
+               _E("FAIL: e_dbus_message_send()");
+               ret = -ECONNREFUSED;
+               goto out;
+       }
+
+       ret = 0;
+
+out:
+       if (msg)
+               dbus_message_unref(msg);
+       return ret;
+}
+
 static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
 {
        Elm_Object_Item *item;
@@ -117,7 +213,7 @@ static char *get_title_id(char *type)
                return NULL;
 }
 
-char *get_content_text(char *vendor, char *model)
+static char *get_content_text(char *vendor, char *model)
 {
        char content[BUF_MAX];
 
@@ -267,7 +363,7 @@ static void host_device_remove_signal_cb(void *data, DBusMessage *msg)
        remove_dev_noti(ad, type, vendor, model);
 }
 
-void unregister_edbus_signal_handler()
+static void unregister_edbus_signal_handler()
 {
     e_dbus_signal_handler_del(edbus_conn, handler_add);
        e_dbus_signal_handler_del(edbus_conn, handler_remove);
@@ -275,7 +371,7 @@ void unregister_edbus_signal_handler()
        e_dbus_shutdown();
 }
 
-int register_edbus_signal_handler(struct appdata *ad)
+static int register_edbus_signal_handler(struct appdata *ad)
 {
        int retry;
        if (!ad)
@@ -306,7 +402,7 @@ int register_edbus_signal_handler(struct appdata *ad)
 
 static void _quit_cb(void *data, Evas_Object* obj, void* event_info)
 {
-       popup_terminate();
+       terminate_app();
 }
 
 static int create_bg(Evas_Object *parent)
@@ -374,28 +470,35 @@ static char *_gl_text_get(void *data, Evas_Object *obj, const char *part)
                return NULL;
 
        noti = (struct dev_noti *)data;
-       if (!strcmp(part, "elm.text.1")) {
-               return strdup(dgettext(LANG_DOMAIN, noti->title));
-       }
+       if (!strcmp(part, "elm.text.main.left.top"))
+               return strdup(_(noti->title));
+
+       if (!strcmp(part, "elm.text.sub.left.bottom"))
+               return strdup(_(noti->content));
 
-       return strdup(dgettext(LANG_DOMAIN, noti->content));
+       return NULL;
 }
 
 static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part)
 {
-       Evas_Object *icon;
+       Evas_Object *layout;
+       Evas_Object *image;
 
-       if (!obj)
+       if (strcmp(part, "elm.icon.1"))
                return NULL;
-
-       icon = elm_image_add(obj);
-       if (!icon)
+       layout = elm_layout_add(obj);
+       if (!layout)
                return NULL;
+       elm_layout_theme_set(layout, "layout", "list/B/type.3", "default");
 
-       elm_image_file_set(icon, EDJ_NAME, USB_ICON_BLUE);
-       evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       return icon;
+       image = elm_image_add(obj);
+       if (!image)
+               return NULL;
+       elm_image_file_set(image, EDJ_NAME, USB_ICON_BLUE);
+       evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_layout_content_set(layout, "elm.swallow.content", image);
+       return layout;
 }
 
 static int create_naviframe_layout(Evas_Object* parent)
@@ -438,13 +541,13 @@ static int create_view_layout(struct appdata *ad)
        elm_object_style_set(btn, "naviframe/end_btn/default");
        evas_object_smart_callback_add(btn, "clicked", _quit_cb, ad->win_main);
        elm_naviframe_item_push(nf,
-                       dgettext(LANG_DOMAIN, "IDS_USB_MBODY_USB_DEVICES"),
+                       _("IDS_USB_MBODY_USB_DEVICES"),
                        btn, NULL, gl, NULL);
 
        return 0;
 }
 
-int init_host_devices(struct appdata *ad)
+static int init_host_devices(struct appdata *ad)
 {
        Evas_Object *conform;
        Evas_Object *layout_main;
@@ -485,7 +588,7 @@ int init_host_devices(struct appdata *ad)
        return 0;
 }
 
-int _lang_changed(void *data)
+int _lang_changed(void *event, void *data)
 {
        char *locale = vconf_get_str(VCONFKEY_LANGSET);
        if (locale)
@@ -536,14 +639,14 @@ static void event_back_key_up(void *data, Evas_Object *obj, void *event_info)
        if (!ad)
                return;
 
-       ea_object_event_callback_del(ad->win_main, EA_CALLBACK_BACK, event_back_key_up);
+       eext_object_event_callback_del(ad->win_main, EEXT_CALLBACK_BACK, event_back_key_up);
 
        if (mouse_event_handler) {
                ecore_event_handler_del(mouse_event_handler);
                mouse_event_handler = NULL;
        }
 
-       popup_terminate();
+       terminate_app();
 }
 
 static Eina_Bool event_mouse_button_up(void *data, int type, void *event)
@@ -556,7 +659,7 @@ static Eina_Bool event_mouse_button_up(void *data, int type, void *event)
 
        if (move->buttons == MOUSE_RIGHT_BUTTON) {
                release_handlers(ad);
-               popup_terminate();
+               terminate_app();
        }
 
        return ECORE_CALLBACK_RENEW;
@@ -567,7 +670,7 @@ static void release_handlers(struct appdata *ad)
        if (!ad)
                return;
 
-       ea_object_event_callback_del(ad->win_main, EA_CALLBACK_BACK, event_back_key_up);
+       eext_object_event_callback_del(ad->win_main, EEXT_CALLBACK_BACK, event_back_key_up);
 
        if (mouse_event_handler) {
                ecore_event_handler_del(mouse_event_handler);
@@ -589,7 +692,7 @@ static int create_usb_devices_window(struct appdata *ad)
 
        evas_object_event_callback_add(ad->win_main, EVAS_CALLBACK_RESIZE, window_resize_cb, ad);
 
-       ea_object_event_callback_add(ad->win_main, EA_CALLBACK_BACK, event_back_key_up, ad);
+       eext_object_event_callback_add(ad->win_main, EEXT_CALLBACK_BACK, event_back_key_up, ad);
 
        mouse_event_handler = ecore_event_handler_add(
                        ECORE_EVENT_MOUSE_BUTTON_UP, event_mouse_button_up, ad);
@@ -705,7 +808,7 @@ int app_reset(bundle *b, void *data)
 reset_cb_out:
        release_handlers(ad);
 reset_out:
-       popup_terminate();
+       terminate_app();
        return ret;
 }
 
similarity index 72%
rename from packaging/org.tizen.host-devices.efl
rename to src/usbhost-devices/org.tizen.host-devices.efl
index dc1bc55..b88991e 100644 (file)
@@ -2,7 +2,6 @@ org.tizen.host-devices device::app_logging -w---- ------
 org.tizen.host-devices system::use_internet r----- ------
 org.tizen.host-devices xorg rw---- ------
 org.tizen.host-devices isf r-x--- ------
-org.tizen.host-devices ail::db rw---- ------
 org.tizen.host-devices sound_server rw---- ------
 org.tizen.host-devices dbus rwx--- ------
 org.tizen.host-devices org.tizen.add-viewer r-x--- ------
@@ -16,7 +15,6 @@ org.tizen.host-devices system-apps rw---- ------
 org.tizen.host-devices e17::notification rw---- ------
 org.tizen.app-tray org.tizen.host-devices r-x--- ------
 org.tizen.host-devices system::homedir rwxat- ------
-org.tizen.host-devices system::vconf rwxat- ------
 org.tizen.host-devices system::media rwxat- ------
 org.tizen.host-devices system::share rwxat- ------
 org.tizen.host-devices pulseaudio rwxat- ------
@@ -26,11 +24,5 @@ stest-service org.tizen.host-devices r-x--- ------
 org.tizen.host-devices stest-service -w---- ------
 org.tizen.host-devices privacy-manager::db r----l ------
 org.tizen.host-devices pkgmgr::db r----l ------
-org.tizen.host-devices system::vconf_inhouse rw---- ------
-org.tizen.host-devices system::vconf_setting rw---- ------
-org.tizen.host-devices system::vconf_privacy rw---- ------
-org.tizen.host-devices system::vconf_system rw---- ------
-org.tizen.host-devices system::vconf_multimedia rw---- ------
-org.tizen.host-devices system::vconf_network rw---- ------
-org.tizen.host-devices system::vconf_misc rw---- ------
 org.tizen.host-devices ecore::lock rwxat- ------
+org.tizen.host-devices tizen::vconf::public::admin rw---- ------
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.host-devices" version="0.0.1" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.tizen.host-devices" version="0.0.1" install-location="internal-only">
        <label>USB host device list application</label>
        <author email="ty317.kim@samsung.com" href="www.samsung.com">Taeyoung Kim</author>
        <description>USB host device list Application</description>
index c7e2e16..3354646 100755 (executable)
@@ -102,10 +102,8 @@ static const struct popup_ops watchdog_ops = {
        .title                  = "IDS_CLD_HEADER_NO_RESPONSE",
        .get_content    = watchdog_get_content,
        .left_text              = "IDS_CST_OPT_WAIT",
-       .left_icon              = "circle-cancel.png",
        .left                   = watchdog_wait,
        .right_text             = "IDS_COM_SK_OK",
-       .right_icon             = "circle-ok.png",
        .right                  = watchdog_ok,
        .flags                  = SCROLLABLE,
 };
diff --git a/sys-device-noti/CMakeLists.txt b/sys-device-noti/CMakeLists.txt
deleted file mode 100755 (executable)
index dc44467..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(sys_device_noti C)
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-SET(SRCS ${SRCS}
-       ${CMAKE_SOURCE_DIR}/sys-device-noti/sys-device-noti-micro.c
-)
-ELSE()
-SET(SRCS ${SRC}
-       ${CMAKE_SOURCE_DIR}/sys-device-noti/sys-device-noti.c
-        ${CMAKE_SOURCE_DIR}/share/common.c
-)
-ENDIF()
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-pkg_check_modules(pkgs REQUIRED feedback)
-ELSE()
-pkg_check_modules(pkgs REQUIRED feedback notification)
-ENDIF()
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-MESSAGE("FLAGS: ${CMAKE_C_FLAGS}")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
-IF( $ENV{ARCH} MATCHES "arm" )
-       ADD_DEFINITIONS("-DTARGET")
-ENDIF()
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DSLP_PROF")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
-
-IF(${SYSTEM_APPS_MICRO} STREQUAL "yes")
-ELSE()
-# install icon
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_icon.png DESTINATION ${SYSTEM_ICONDIR})
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_indicator.png DESTINATION ${SYSTEM_ICONDIR})
-ENDIF()
diff --git a/sys-device-noti/sys-device-noti-micro.c b/sys-device-noti/sys-device-noti-micro.c
deleted file mode 100755 (executable)
index d8f173b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  sys-device-noti
- *
- * Copyright (c) 2010 - 2013 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 <feedback.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <libintl.h>
-#include "sys-device-noti.h"
-
-
-static void play_feedback(int pattern)
-{
-       feedback_initialize();
-       feedback_play(pattern);
-       feedback_deinitialize();
-}
-
-int main(int argc, char *argv[])
-{
-       int bNoti = -1;
-       cb_noti_type cb_type = -1;
-
-       if (argc == 3)
-               bNoti = atoi(argv[2]);
-
-       cb_type = (cb_noti_type)atoi(argv[1]);
-
-       switch (cb_type) {
-       case DEVICE_NOTI_BATT_CHARGE:
-               play_feedback(FEEDBACK_PATTERN_CHARGERCONN);
-               break;
-       case DEVICE_NOTI_BATT_FULL:
-               if (bNoti)
-                       play_feedback(FEEDBACK_PATTERN_FULLCHARGED);
-               break;
-       default:
-               break;
-       }
-
-       return 0;
-}
diff --git a/sys-device-noti/sys-device-noti.c b/sys-device-noti/sys-device-noti.c
deleted file mode 100755 (executable)
index 8f5f958..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- *  sys-device-noti
- *
- * Copyright (c) 2010 - 2013 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 <stdio.h>
-#include <stdlib.h>
-#include <dd-display.h>
-#include <notification.h>
-#include <libintl.h>
-#include <locale.h>
-#include <vconf.h>
-#include "sys-device-noti.h"
-#include "common.h"
-
-#define BATTERY_FULL_ICON_PATH                         SYSTEM_ICONDIR"/batt_full_icon.png"
-#define BATTERY_FULL_INDICATOR_ICON_PATH       SYSTEM_ICONDIR"/batt_full_indicator.png"
-
-static void set_locale(void)
-{
-       char *lang, *r;
-
-       lang = vconf_get_str(VCONFKEY_LANGSET);
-       if (!lang)
-               goto next;
-
-       setenv("LANG", lang, 1);
-       setenv("LC_MESSAGES", lang, 1);
-       r = setlocale(LC_ALL, "");
-       if (!r)
-               setlocale(LC_ALL, lang);
-       free(lang);
-
-next:
-       bindtextdomain(LANG_DOMAIN,LOCALE_DIR);
-       textdomain(LANG_DOMAIN);
-}
-
-static void delete_noti(void)
-{
-       /* delete previous notification */
-       notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING);
-}
-
-static int create_noti(void)
-{
-       notification_h noti;
-       notification_error_e err;
-
-       noti = notification_create(NOTIFICATION_TYPE_ONGOING);
-       if (!noti)
-               return -1;
-
-       err = notification_set_text_domain(noti,
-                       LANG_DOMAIN, LOCALE_DIR);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_layout(noti,
-                       NOTIFICATION_LY_ONGOING_EVENT);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_text(noti,
-                       NOTIFICATION_TEXT_TYPE_TITLE,
-                       _("IDS_IDLE_POP_BATTERY_FULLY_CAHRGED"),
-                       "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED",
-                       NOTIFICATION_VARIABLE_TYPE_NONE);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_text(noti,
-                       NOTIFICATION_TEXT_TYPE_CONTENT,
-                       _("IDS_SYNCML_POP_DM_REMOVE_CHARGER"),
-                       "IDS_SYNCML_POP_DM_REMOVE_CHARGER",
-                       NOTIFICATION_VARIABLE_TYPE_NONE);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_text(noti,
-                       NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
-                       _("IDS_SYNCML_POP_DM_REMOVE_CHARGER"),
-                       "IDS_SYNCML_POP_DM_REMOVE_CHARGER",
-                       NOTIFICATION_VARIABLE_TYPE_NONE);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_image(noti,
-                       NOTIFICATION_IMAGE_TYPE_ICON,
-                       BATTERY_FULL_ICON_PATH);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_image(noti,
-                       NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
-                       BATTERY_FULL_INDICATOR_ICON_PATH);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_time(noti, time(NULL));
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_property(noti,
-                       NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_set_display_applist(noti,
-                       NOTIFICATION_DISPLAY_APP_INDICATOR
-                       | NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       err = notification_insert(noti, NULL);
-       if (err != NOTIFICATION_ERROR_NONE)
-               goto exit;
-
-       notification_free(noti);
-       return 0;
-
-exit:
-       notification_free(noti);
-       return -1;
-}
-
-int main(int argc, char *argv[])
-{
-       int bNoti = -1;
-       cb_noti_type cb_type = -1;
-
-       if (argc == 3)
-               bNoti = atoi(argv[2]);
-
-       cb_type = (cb_noti_type)atoi(argv[1]);
-
-       /* set locale */
-       set_locale();
-
-       switch (cb_type) {
-       case DEVICE_NOTI_BATT_CHARGE:
-               play_feedback(PLAY_ALL, PATTERN_CHARGERCONN);
-               break;
-       case DEVICE_NOTI_BATT_FULL:
-               delete_noti();
-               if (bNoti) {
-                       create_noti();
-                       play_feedback(PLAY_ALL, PATTERN_FULLCHARGED);
-               }
-               break;
-       default:
-               break;
-       }
-
-       return 0;
-}
diff --git a/sys-device-noti/sys-device-noti.h b/sys-device-noti/sys-device-noti.h
deleted file mode 100755 (executable)
index cacd82b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*\r
- *  system-server\r
- *\r
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
- *\r
- * Contact: Giyeol Ok <giyeol.ok@samsung.com>\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
-*/\r
-#ifndef __SYS_DEVICE_NOTI_H__\r
-#define __SYS_DEVICE_NOTI_H__\r
-\r
-#ifndef _\r
-#define _(str) gettext(str)\r
-#endif\r
-\r
-#ifndef gettext_noop\r
-#define gettext_noop(str) (str)\r
-#endif\r
-\r
-#ifndef N_\r
-#define N_(str) gettext_noop(str)\r
-#endif\r
-\r
-typedef enum {\r
-       DEVICE_NOTI_BATT_CHARGE = 0,\r
-       DEVICE_NOTI_BATT_LOW,\r
-       DEVICE_NOTI_BATT_FULL,\r
-       DEVICE_NOTI_MAX\r
-} cb_noti_type;\r
-\r
-typedef enum {\r
-       DEVICE_NOTI_OFF = 0,\r
-       DEVICE_NOTI_ON  = 1\r
-} cb_noti_onoff_type;\r
-\r
-#endif /* __SYS_DEVICE__NOTI_H__ */\r
diff --git a/system-popup/CMakeLists.txt b/system-popup/CMakeLists.txt
deleted file mode 100644 (file)
index 779dffe..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-####### System-popup #############
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(system-popup C)
-
-ADD_SUBDIRECTORY(src)
diff --git a/system-popup/src/CMakeLists.txt b/system-popup/src/CMakeLists.txt
deleted file mode 100644 (file)
index 1c67887..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-####### System-popup #############
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS core.c
-                recovery.c
-                watchdog.c
-                usbotg_mount_failed.c
-                usbotg_removed_unsafe.c
-                ode_error.c
-                cooldown_poweron.c
-                cooldown_poweroff.c
-                safemode.c
-                accessibility.c
-                acc-tts.c
-                acc-assistive-light.c
-                acc-negative-colors.c
-                acc-zoom.c
-                ${CMAKE_SOURCE_DIR}/share/common.c
-                )
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/system-popup)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/popup-launcher/src)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-SET(VENDOR "tizen")
-SET(PACKAGE "system-syspopup")
-SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(MANIFESTDIR "${CMAKE_INSTALL_PREFIX}/share/packages")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
-               appcore-efl
-               bundle
-               dlog
-               ecore
-               evas
-               syspopup
-               vconf
-               elementary
-               deviced
-               )
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall")
-
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
-
-ADD_EXECUTABLE(${PACKAGE} ${SRCS})
-
-TARGET_LINK_LIBRARIES(${PACKAGE} syspopup  ${pkgs_LDFLAGS})
-
-ADD_CUSTOM_TARGET(system.edj
-               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/edcs/icons
-               ${CMAKE_SOURCE_DIR}/edcs/system.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/system.edj
-               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/system.edc
-)
-ADD_DEPENDENCIES(${PACKAGE} system.edj)
-
-INSTALL(TARGETS ${PACKAGE} DESTINATION ${BINDIR})
-
-# install manifest file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
-
-# install smack efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
-
-INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/system.edj DESTINATION ${RESDIR}/edje/system)
-
-############## END ##############
diff --git a/system-popup/src/acc-assistive-light.c b/system-popup/src/acc-assistive-light.c
deleted file mode 100755 (executable)
index 0a5eabc..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include <dd-deviced.h>
-#include <dd-display.h>
-#include <dd-led.h>
-#include "accessibility.h"
-
-#include <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <utilX.h>
-
-#define LIGHT_ID        60
-#define LIGHT_ICON      "accessibility.png"
-
-static void run_light(void)
-{
-       int max, state, ret;
-
-       max = led_get_max_brightness();
-       if (max < 0)
-               max = 1;
-
-       state = led_get_brightness();
-       if (state > 0) {
-               ret = led_set_brightness_with_noti(0, true);
-               if (ret == 0)
-                       vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, 0);
-       } else {
-               ret = led_set_brightness_with_noti(max, true);
-               if (ret == 0)
-                       vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, 1);
-       }
-
-       play_feedback(PLAY_ALL, PATTERN_HW_TAP);
-}
-
-static void response_light_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       if (!ad)
-               return;
-
-       remove_accessibility_popup();
-       unregister_acc_option_full();
-
-       run_light();
-
-       terminate_if_no_popup();
-}
-
-static int get_light_id(void)
-{
-       return LIGHT_ID;
-}
-
-static int get_light_icon(char *icon, int size)
-{
-       if (!icon || size <= 0)
-               return -EINVAL;
-       snprintf(icon, size, "%s", LIGHT_ICON);
-       return 0;
-}
-
-static int get_light_content(char *content, int size)
-{
-       int state;
-       char *text;
-
-       if (!content || size <= 0)
-               return -EINVAL;
-
-       state = led_get_brightness();
-
-       if (state > 0)
-               text = "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT";
-       else
-               text = "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT";
-
-       snprintf(content, size, "%s", text);
-       return 0;
-}
-
-static const struct acc_option light_ops = {
-       .name                = "light",
-       .get_id              = get_light_id,
-       .get_icon            = get_light_icon,
-       .get_content         = get_light_content,
-       .response_clicked    = response_light_clicked,
-       .register_handlers   = NULL,
-       .unregister_handlers = NULL
-};
-
-/* Constructor to register light item */
-static __attribute__ ((constructor)) void register_acc_option_light(void)
-{
-       register_acc_option(&light_ops);
-}
diff --git a/system-popup/src/acc-negative-colors.c b/system-popup/src/acc-negative-colors.c
deleted file mode 100755 (executable)
index 40e5e66..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include <dd-deviced.h>
-#include <dd-display.h>
-#include <dd-led.h>
-#include "accessibility.h"
-
-#include <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <utilX.h>
-
-#define NEGATIVE_ID        20
-#define NEGATIVE_ICON      "accessibility.png"
-
-#define PROP_HIGH_CONTRAST "_E_ACC_ENABLE_HIGH_CONTRAST_"
-
-static void run_contrast(void)
-{
-       int ret;
-       unsigned int value;
-       Ecore_X_Window rootWin;
-       Ecore_X_Atom atomHighContrast;
-
-       rootWin = ecore_x_window_root_first_get();
-       atomHighContrast = ecore_x_atom_get(PROP_HIGH_CONTRAST);
-
-       ret = ecore_x_window_prop_card32_get(rootWin, atomHighContrast, &value, 1);
-       if (ret == 1 && value == 1)
-               value = 0;
-       else
-               value = 1;
-
-       ecore_x_window_prop_card32_set(rootWin, atomHighContrast, &value, 1);
-       ecore_x_flush();
-
-       vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, value);
-}
-
-static void response_negative_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       if (!ad)
-               return;
-
-       remove_accessibility_popup();
-       unregister_acc_option_full();
-
-       run_contrast();
-
-       terminate_if_no_popup();
-}
-
-static int get_negative_id(void)
-{
-       return NEGATIVE_ID;
-}
-
-static int get_negative_icon(char *icon, int size)
-{
-       if (!icon || size <= 0)
-               return -EINVAL;
-       snprintf(icon, size, "%s", NEGATIVE_ICON);
-       return 0;
-}
-
-static int get_negative_content(char *content, int size)
-{
-       Ecore_X_Window rootWin;
-       Ecore_X_Atom atomUI;
-       unsigned int state;
-       int ret;
-       char *text;
-
-       if (!content || size <= 0)
-               return -EINVAL;
-
-       rootWin = ecore_x_window_root_first_get();
-       atomUI = ecore_x_atom_get(PROP_HIGH_CONTRAST);
-       ret = ecore_x_window_prop_card32_get(rootWin, atomUI, &state, 1);
-       if (ret < 0) {
-               _E("ecore_x_window_prop_card32_get() failed");
-               return ret;
-       }
-
-       if (state > 0)
-               text = "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS";
-       else
-               text = "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS";
-
-       snprintf(content, size, "%s", text);
-       return 0;
-}
-
-static const struct acc_option negative_ops = {
-       .name                = "negative",
-       .get_id              = get_negative_id,
-       .get_icon            = get_negative_icon,
-       .get_content         = get_negative_content,
-       .response_clicked    = response_negative_clicked,
-       .register_handlers   = NULL,
-       .unregister_handlers = NULL,
-};
-
-/* Constructor to register negative item */
-static __attribute__ ((constructor)) void register_acc_option_negative(void)
-{
-       int value;
-
-       if (vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &value) == 0
-                       && value == SETTING_PSMODE_EMERGENCY)
-               return;
-
-       register_acc_option(&negative_ops);
-}
diff --git a/system-popup/src/acc-tts.c b/system-popup/src/acc-tts.c
deleted file mode 100755 (executable)
index 1ad4147..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include <dd-deviced.h>
-#include <dd-display.h>
-#include <dd-led.h>
-#include <aul.h>
-#include "accessibility.h"
-#include "launcher.h"
-
-#include <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <utilX.h>
-
-#define TTS_ID        10
-
-static char *tts_content[] = {
-       "IDS_TPLATFORM_OPT_DISABLE_SCREEN_READER_ABB",
-       "IDS_TPLATFORM_OPT_ENABLE_SCREEN_READER_ABB",
-};
-
-static char *tts_servant_method[] = {
-       "TtsDisabled",
-       "TtsEnabled",
-};
-
-static int tts_state;
-
-static int play_tts_by_servant(void)
-{
-       return dbus_method_sync(BUS_NAME,
-                       POPUP_PATH_SERVANT,
-                       POPUP_IFACE_SERVANT,
-                       tts_servant_method[tts_state],
-                       NULL, NULL);
-}
-
-static void run_tts(void)
-{
-       if (vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, tts_state) != 0)
-               _E("Failed to set tts");
-}
-
-static void response_tts_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-
-       if (!ad)
-               return;
-
-       remove_accessibility_popup();
-       unregister_acc_option_full();
-
-       run_tts();
-
-       ret = play_tts_by_servant();
-       if (ret < 0)
-               _E("Failed to play tts (%d)", ret);
-
-       terminate_if_no_popup();
-}
-
-static int get_tts_id(void)
-{
-       return TTS_ID;
-}
-
-static int get_tts_content(char *content, int size)
-{
-       if (!content || size <= 0)
-               return -EINVAL;
-
-       if (elm_config_access_get() == EINA_TRUE)
-               tts_state = 0;
-       else
-               tts_state = 1;
-
-       snprintf(content, size, "%s", tts_content[tts_state]);
-       return 0;
-}
-
-static const struct acc_option tts_ops = {
-       .name                = "tts",
-       .get_id              = get_tts_id,
-       .get_icon            = NULL,
-       .get_content         = get_tts_content,
-       .response_clicked    = response_tts_clicked,
-       .register_handlers   = NULL,
-       .unregister_handlers = NULL
-};
-
-/* Constructor to register tts item */
-static __attribute__ ((constructor)) void register_acc_option_tts(void)
-{
-       register_acc_option(&tts_ops);
-}
diff --git a/system-popup/src/acc-zoom.c b/system-popup/src/acc-zoom.c
deleted file mode 100755 (executable)
index 6ae4fab..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 <stdio.h>
-#include <appcore-efl.h>
-#include <dd-deviced.h>
-#include <dd-display.h>
-#include <dd-led.h>
-#include <aul.h>
-#include "accessibility.h"
-
-#include <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <utilX.h>
-
-#define ZOOM_ID        40
-#define ZOOM_ICON      "accessibility.png"
-
-#define PROP_ZOOM      "_E_ACC_ENABLE_ZOOM_UI_"
-
-#define LIVE_SETTING_APP "org.tizen.live-setting-app"
-
-static void run_zoom(void)
-{
-       int ret;
-       unsigned int value;
-       Ecore_X_Window rootWin;
-       Ecore_X_Atom atomZoomUI;
-
-       rootWin = ecore_x_window_root_first_get();
-       atomZoomUI = ecore_x_atom_get(PROP_ZOOM);
-
-       ret = ecore_x_window_prop_card32_get(rootWin, atomZoomUI, &value, 1);
-       if (ret == 1 && value == 1)
-               value = 0;
-       else
-               value = 1;
-
-       ecore_x_window_prop_card32_set(rootWin, atomZoomUI, &value, 1);
-       ecore_x_flush();
-
-       vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_ZOOM, value);
-}
-
-static bool is_aircommand_on(void)
-{
-       int state;
-       if (vconf_get_bool(VCONFKEY_AIRCOMMAND_ENABLED, &state) == 0
-                       && state == 1)
-               return true;
-       return false;
-}
-
-static int launch_live_setting_app(void)
-{
-       bundle *b;
-       int ret;
-
-       b = bundle_create();
-       if (!b) {
-               _E("Failed to create bundle");
-               return -ENOMEM;
-       }
-
-       ret = bundle_add(b, "popup", "zoom");
-       if (ret < 0) {
-               _E("Failed to add parameters to bundle");
-               goto out;
-       }
-
-       ret = aul_launch_app(LIVE_SETTING_APP, b);
-       if (ret < 0)
-               _E("Failed to launch app(%s)", LIVE_SETTING_APP);
-
-out:
-       bundle_free(b);
-       return ret;
-}
-
-static void response_zoom_clicked(void *data, Evas_Object * obj, void *event_info)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       if (!ad)
-               return;
-
-       remove_accessibility_popup();
-       unregister_acc_option_full();
-
-       if (is_aircommand_on()) {
-               if (launch_live_setting_app() < 0)
-                       _E("Failed to launch (%s)", LIVE_SETTING_APP);
-               terminate_if_no_popup();
-               return;
-       }
-
-       run_zoom();
-
-       terminate_if_no_popup();
-}
-
-static int get_zoom_id(void)
-{
-       return ZOOM_ID;
-}
-
-static int get_zoom_icon(char *icon, int size)
-{
-       if (!icon || size <= 0)
-               return -EINVAL;
-       snprintf(icon, size, "%s", ZOOM_ICON);
-       return 0;
-}
-
-static int get_zoom_content(char *content, int size)
-{
-       Ecore_X_Window rootWin;
-       Ecore_X_Atom atomUI;
-       unsigned int state;
-       int ret;
-       char *text;
-
-       if (!content || size <= 0)
-               return -EINVAL;
-
-       rootWin = ecore_x_window_root_first_get();
-       atomUI = ecore_x_atom_get(PROP_ZOOM);
-       ret = ecore_x_window_prop_card32_get(rootWin, atomUI, &state, 1);
-       if (ret < 0) {
-               _E("ecore_x_window_prop_card32_get() failed");
-               return ret;
-       }
-
-       if (state > 0)
-               text = "IDS_ST_BODY_DISABLE_ZOOM";
-       else
-               text = "IDS_ST_BODY_ENABLE_ZOOM";
-
-       snprintf(content, size, "%s", text);
-       return 0;
-}
-
-static const struct acc_option zoom_ops = {
-       .name                = "zoom",
-       .get_id              = get_zoom_id,
-       .get_icon            = get_zoom_icon,
-       .get_content         = get_zoom_content,
-       .response_clicked    = response_zoom_clicked,
-       .register_handlers   = NULL,
-       .unregister_handlers = NULL
-};
-
-/* Constructor to register zoom item */
-static __attribute__ ((constructor)) void register_acc_option_zoom(void)
-{
-       register_acc_option(&zoom_ops);
-}
diff --git a/system-popup/src/accessibility.c b/system-popup/src/accessibility.c
deleted file mode 100644 (file)
index a3b494d..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "accessibility.h"
-
-#define ACCESSIBILITY_POPUP     "accessibility"
-#define ACCESSIBILITY_CONTENT   "IDS_ST_HEADER_ACCESSIBILITY"
-
-/* List to store items on the popup list */
-static GList *acc_option_list = NULL;
-static Evas_Object *item_list = NULL;
-
-static int show_accessibility_popup(void *data, bundle *b);
-
-struct popup_ops accessibility_ops = {
-       .name = ACCESSIBILITY_POPUP,
-       .popup = NULL,
-       .show_popup = show_accessibility_popup
-};
-
-static gint compare_acc_options(gconstpointer first, gconstpointer second)
-{
-       struct acc_option *opt1 = (struct acc_option *)first;
-       struct acc_option *opt2 = (struct acc_option *)second;
-
-       return (opt1->get_id() - opt2->get_id());
-}
-
-/* Register an item on the popup list */
-void register_acc_option(const struct acc_option *opt)
-{
-       struct acc_option *option;
-
-       if (!opt) {
-               _E("Invalid parameter");
-               return;
-       }
-
-       option = (struct acc_option *)malloc(sizeof(struct acc_option));
-       if (!option) {
-               _E("FAIL: malloc()");
-               return;
-       }
-
-       option->get_id              = opt->get_id;
-       option->get_icon            = opt->get_icon;
-       option->get_content         = opt->get_content;
-       option->response_clicked    = opt->response_clicked;
-       option->register_handlers   = opt->register_handlers;
-       option->unregister_handlers = opt->unregister_handlers;
-
-       acc_option_list = g_list_insert_sorted(acc_option_list, option, compare_acc_options);
-}
-
-/* Unregister an item on the popup list */
-void unregister_acc_option(const struct acc_option *opt)
-{
-       GList *l;
-       struct acc_option *option;
-
-       if (!opt) {
-               _E("Invalid parameter");
-               return;
-       }
-
-       for (l = acc_option_list ; l ; l = g_list_next(l)) {
-               option = (struct acc_option *)(l->data);
-               if (!option)
-                       continue;
-
-               if (option->get_id != opt->get_id)
-                       continue;
-
-               acc_option_list = g_list_delete_link(acc_option_list, l);
-               break;
-       }
-}
-
-static void acc_option_list_free_func(gpointer data)
-{
-       struct acc_option *option = (struct acc_option *)data;
-       FREE(option);
-}
-
-/* Unregister all items on the popup list */
-void unregister_acc_option_full(void)
-{
-       if (!acc_option_list)
-               return;
-
-       g_list_free_full(acc_option_list, acc_option_list_free_func);
-}
-
-void remove_accessibility_popup(void)
-{
-       release_evas_object(&(accessibility_ops.popup));
-}
-
-/* Basic popup widget */
-static Evas_Object *load_accessibility_popup(struct appdata *ad)
-{
-       char content[BUF_MAX];
-       Ecore_X_Window xwin;
-       GList *l;
-       struct acc_option *opt;
-       char item_content[BUF_MAX];
-       Evas_Object *popup;
-
-       if (!ad || !(ad->win_main))
-               return NULL;
-
-       if (!acc_option_list) {
-               _I("No device options");
-               return NULL;
-       }
-
-       popup = elm_popup_add(ad->win_main);
-       if (popup == NULL) {
-               _E("FAIL: elm_popup_add()");
-               return NULL;
-       }
-
-       /* title */
-       elm_object_part_text_set(popup, "title,text", _(ACCESSIBILITY_CONTENT));
-       elm_object_style_set (popup, "content_no_vhpad_transparent");
-
-       /* list */
-       item_list = elm_list_add(popup);
-       elm_list_mode_set(item_list,ELM_LIST_EXPAND);
-       elm_object_style_set (item_list, "popup");
-
-       /* Add items to list on the popup */
-       for (l = acc_option_list ; l ; l = g_list_next(l)) {
-               opt = (struct acc_option *)(l->data);
-               if (!opt)
-                       continue;
-
-               if (opt->get_content(item_content, sizeof(item_content)) < 0)
-                       continue;
-
-               snprintf(content, sizeof(content), "%s", _(item_content));
-               elm_list_item_append(item_list, content, NULL, NULL, opt->response_clicked, ad);
-       }
-
-       elm_list_go(item_list);
-
-       xwin = elm_win_xwindow_get(popup);
-       ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
-       utilx_grab_key(ecore_x_display_get(), xwin, KEY_SELECT, SHARED_GRAB);
-       elm_object_content_set(popup,item_list);
-
-       evas_object_show(popup);
-
-       return popup;
-}
-
-static int show_accessibility_popup(void *data, bundle *b)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       if (accessibility_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       accessibility_ops.popup = load_accessibility_popup(ad);
-       if (!(accessibility_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_accessibility_popup(void)
-{
-       register_popup(&accessibility_ops);
-}
diff --git a/system-popup/src/accessibility.h b/system-popup/src/accessibility.h
deleted file mode 100644 (file)
index 4028013..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  system-popup
- *
- * Copyright (c) 2000 - 2013 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 __ACCESSIBILITY_H_
-#define __ACCESSIBILITY_H_
-
-#include "core.h"
-#include "common.h"
-
-#define BUF_MAX 256
-
-struct acc_option{
-       const char *name;
-       int (*get_id)(void);
-       int (*get_icon)(char *icon, int size);
-       int (*get_content)(char *content, int size);
-       void (*response_clicked)(void *data, Evas_Object *obj, void *event_info);
-       void (*register_handlers) (void *data);
-       void (*unregister_handlers) (void *data);
-};
-
-void register_acc_option(const struct acc_option *opt);
-void unregister_acc_option_full(void);
-void remove_accessibility_popup(void);
-
-#endif  /* __ACCESSIBILITY_H__ */
diff --git a/system-popup/src/cooldown_poweroff.c b/system-popup/src/cooldown_poweroff.c
deleted file mode 100644 (file)
index c6358c4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define COOLDOWN_POWEROFF_POPUP       "PowerOff"
-
-static int show_cooldown_poweroff_popup(void *data, bundle *b);
-
-struct popup_ops cooldown_poweroff_ops = {
-       .name = COOLDOWN_POWEROFF_POPUP,
-       .popup = NULL,
-       .show_popup = show_cooldown_poweroff_popup
-};
-
-static void not_poweroff_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       release_evas_object(&(cooldown_poweroff_ops.popup));
-       terminate_if_no_popup();
-}
-
-static int show_cooldown_poweroff_popup(void *data, bundle *b)
-{
-       struct appdata *ad = data;
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (cooldown_poweroff_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       cooldown_poweroff_ops.popup = load_normal_popup(ad,
-                       _("IDS_ST_HEADER_POWER_OFF_ABB"),
-                       _("IDS_QP_POP_YOUR_DEVICE_IS_OVERHEATING_IT_WILL_NOW_POWER_OFF_TO_COOL_DOWN"),
-                       _("IDS_QP_BUTTON_DO_NOT_POWER_OFF_ABB"),
-                       not_poweroff_clicked,
-                       NULL, NULL);
-       if (!(cooldown_poweroff_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               terminate_if_no_popup();
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_WARNING) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_cooldown_poweroff_popup(void)
-{
-       register_popup(&cooldown_poweroff_ops);
-}
diff --git a/system-popup/src/cooldown_poweron.c b/system-popup/src/cooldown_poweron.c
deleted file mode 100644 (file)
index 784e628..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define COOLDOWN_POWERON_POPUP       "PowerOn"
-#define LONGTEXT_SIZE                1024
-
-static int show_cooldown_poweron_popup(void *data, bundle *b);
-
-struct popup_ops cooldown_poweron_ops = {
-       .name = COOLDOWN_POWERON_POPUP,
-       .popup = NULL,
-       .show_popup = show_cooldown_poweron_popup
-};
-
-static void ok_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       release_evas_object(&(cooldown_poweron_ops.popup));
-       terminate_if_no_popup();
-}
-
-static int show_cooldown_poweron_popup(void *data, bundle *b)
-{
-       struct appdata *ad = data;
-       char *text, content[LONGTEXT_SIZE];
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (cooldown_poweron_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       text = elm_entry_utf8_to_markup(
-                       _("IDS_QP_POP_YOUR_DEVICE_OVERHEATED_IT_POWERED_OFF_TO_PREVENT_DAMAGE_MSG"));
-       if (text) {
-               snprintf(content, sizeof(content), "%s", text);
-               free(text);
-       } else {
-               snprintf(content, sizeof(content), "%s",
-                               _("IDS_QP_POP_YOUR_DEVICE_OVERHEATED_IT_POWERED_OFF_TO_PREVENT_DAMAGE_MSG"));
-       }
-
-       evas_object_show(ad->win_main);
-
-       cooldown_poweron_ops.popup = load_normal_popup(ad,
-                       _("IDS_QP_HEADER_DEVICE_POWERED_OFF_AUTOMATICALLY"),
-                       content,
-                       _("IDS_COM_SK_OK"),
-                       ok_clicked,
-                       NULL, NULL);
-       if (!(cooldown_poweron_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               terminate_if_no_popup();
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_WARNING) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_cooldown_poweron_popup(void)
-{
-       register_popup(&cooldown_poweron_ops);
-}
diff --git a/system-popup/src/core.c b/system-popup/src/core.c
deleted file mode 100644 (file)
index e244269..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 <dd-display.h>
-#include "core.h"
-#include "common.h"
-
-#define SYSPOPUP_CONTENT "_SYSPOPUP_CONTENT_"
-
-static GList *popup_list = NULL;
-
-void register_popup(struct popup_ops *ops)
-{
-       if (!ops) {
-               _E("Invalid parameter");
-               return;
-       }
-
-       popup_list = g_list_append(popup_list, ops);
-}
-
-void unregister_all_popup(void)
-{
-       if (!popup_list)
-               return;
-
-       g_list_free(popup_list);
-}
-
-void terminate_if_no_popup(void)
-{
-       GList *l;
-       struct popup_ops *ops;
-
-       for (l = popup_list ; l ; l = g_list_next(l)) {
-               ops = (struct popup_ops *)(l->data);
-               if (ops->popup)
-                       return;
-       }
-       popup_terminate();
-}
-
-static int load_popup_by_type(struct appdata *ad, bundle *b)
-{
-       char *type;
-       GList *l;
-       struct popup_ops *ops;
-
-       if (!ad || !b)
-               return -EINVAL;
-
-       type = (char *)bundle_get_val(b, SYSPOPUP_CONTENT);
-       if (!type) {
-               _E("FAIL: bundle_get_val()");
-               return -ENOMEM;
-       }
-
-       for (l = popup_list ; l ; l = g_list_next(l)) {
-               ops = (struct popup_ops *)(l->data);
-               if (!ops || !(ops->name) || !(ops->show_popup))
-                       continue;
-               if (strncmp (ops->name, type, strlen(type)))
-                       continue;
-               return ops->show_popup(ad, b);
-       }
-       return -EINVAL;
-}
-
-static int app_create(void *data)
-{
-       Evas_Object *win;
-       struct appdata *ad = data;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* create window */
-       win = create_win(PACKAGE);
-       if (!win)
-               return -ENOMEM;
-
-       ad->win_main = win;
-
-       if (appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR) != 0)
-               _E("FAIL: appcore_set_i18n()");
-
-       return 0;
-}
-
-static int app_terminate(void *data)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       release_evas_object(&(ad->layout_main));
-       release_evas_object(&(ad->win_main));
-
-       unregister_all_popup();
-
-       return 0;
-}
-
-static int app_pause(void *data)
-{
-       popup_terminate();
-       return 0;
-}
-
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-static int app_reset(bundle *b, void *data)
-{
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-
-       if (!ad || !b) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if (syspopup_has_popup(b)) {
-               syspopup_reset(b);
-       } else {
-               ret = syspopup_create(b, &(ad->handler), ad->win_main, ad);
-               if (ret < 0) {
-                       _E("FAIL: syspopup_create(): %d", ret);
-                       goto out;
-               }
-       }
-
-       /* change window priority to normal */
-       reset_window_priority(ad->win_main, WIN_PRIORITY_NORMAL);
-
-       ret = load_popup_by_type(ad, b);
-       if (ret < 0)
-               goto out;
-
-       return 0;
-
-out:
-       popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-
-       ops.data = &ad;
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/system-popup/src/core.h b/system-popup/src/core.h
deleted file mode 100644 (file)
index c1be00b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * usb-syspopup
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * 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 __CORE_H__
-#define __CORE_H__
-
-#include <stdio.h>
-#include <vconf.h>
-#include <string.h>
-#include <glib.h>
-#include <assert.h>
-#include "common.h"
-
-struct popup_ops {
-       char *name;
-       Evas_Object *popup;
-       int (*show_popup) (void *data, bundle *b);
-};
-
-void register_popup(struct popup_ops *ops);
-void terminate_if_no_popup(void);
-
-#endif /* __CORE_H__ */
-
diff --git a/system-popup/src/ode_error.c b/system-popup/src/ode_error.c
deleted file mode 100644 (file)
index ae41068..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-#include "launcher.h"
-
-#define ODE_ERROR_POPUP        "ode_error"
-#define SETTING_ENCRYPTION_UG  "setting-mmc-encryption-efl"
-
-#define ERROR_ENCRYPT_NOT_ENOUGH_SPACE "encrypt_not_enough_space"
-#define ERROR_DECRYPT_NOT_ENOUGH_SPACE "decrypt_not_enough_space"
-#define ERROR_ENCRYPT_OPERATION_FAILED "encrypt_operation_failed"
-#define ERROR_DECRYPT_OPERATION_FAILED "decrypt_operation_failed"
-
-#define BUF_MAX 256
-
-#define DD_BUS_NAME                 "org.tizen.system.deviced"
-#define DD_OBJECT_PATH_ODE          "/Org/Tizen/System/DeviceD/Ode"
-#define DD_INTERFACE_NAME_ODE       DD_BUS_NAME".ode"
-#define DD_SIGNAL_REMOVE_ERROR_NOTI "RequestRemoveErrorNoti"
-
-static int show_ode_error_popup(void *data, bundle *b);
-
-struct popup_ops ode_error_ops = {
-       .name = ODE_ERROR_POPUP,
-       .popup = NULL,
-       .show_popup = show_ode_error_popup
-};
-
-static void cancel_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       int ret;
-       release_evas_object(&(ode_error_ops.popup));
-       ret = broadcast_dbus_signal(DD_OBJECT_PATH_ODE,
-                       DD_INTERFACE_NAME_ODE,
-                       DD_SIGNAL_REMOVE_ERROR_NOTI,
-                       NULL, NULL);
-       if (ret < 0)
-               _E("Failed to send dbus signal to remove ode error noti(%d)", ret);
-       terminate_if_no_popup();
-}
-
-static void retry_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       bundle *b;
-       int ret;
-
-       release_evas_object(&(ode_error_ops.popup));
-
-       b = bundle_create();
-       if (!b) {
-               _E("FAIL: bundle_create()");
-               return;
-       }
-
-       ret = aul_launch_app(SETTING_ENCRYPTION_UG, b);
-       if (ret < 0)
-               _E("FAIL: aul_launch_app()");
-
-       if (bundle_free(b) != 0)
-               _E("FAIL: bundle_free(b);");
-
-       terminate_if_no_popup();
-}
-
-static int get_popup_content(bundle *b, char *content, int len)
-{
-       char *err, *cSpace;
-       int iSpace;
-       double dSpace;
-       char *buf;
-
-       if (!b || !content || len <= 0)
-               return -EINVAL;
-
-       err = (char *)bundle_get_val(b, SIGNAL_SENDER_ERROR_TYPE);
-       if (!err) {
-               _E("Failed to get error type");
-               return -EINVAL;
-       }
-
-       cSpace = (char *)bundle_get_val(b, SIGNAL_SENDER_MEMORY_SPACE);
-       if (!cSpace) {
-               _E("Failed to get space needed");
-               return -EINVAL;
-       }
-       iSpace = atoi(cSpace);
-       dSpace = (double)iSpace/1024;
-       _I("Space: (%s, %d, %f)", cSpace, iSpace, dSpace);
-
-       if (!strncmp(err, ERROR_ENCRYPT_NOT_ENOUGH_SPACE, strlen(ERROR_ENCRYPT_NOT_ENOUGH_SPACE))) {
-               buf = _("IDS_ST_BODY_UNABLE_TO_ENCRYPT_SD_CARD_NOT_ENOUGH_SPACE_ON_CARD_APPROXIMATELY_P2F_MB_NEEDED_DELETE_SOME_FILES");
-               snprintf(content, len, buf, dSpace);
-               return 0;
-       }
-
-       if (!strncmp(err, ERROR_ENCRYPT_OPERATION_FAILED, strlen(ERROR_ENCRYPT_OPERATION_FAILED))) {
-               /* TODO: Translation */
-               buf = "Encrypt process has been interupted by error. Retry to encrypt SD card?";
-               snprintf(content, len, "%s", buf);
-               return 0;
-       }
-
-       if (!strncmp(err, ERROR_DECRYPT_NOT_ENOUGH_SPACE, strlen(ERROR_DECRYPT_NOT_ENOUGH_SPACE))) {
-               buf = _("IDS_ST_BODY_UNABLE_TO_DECRYPT_SD_CARD_NOT_ENOUGH_SPACE_ON_CARD_APPROXIMATELY_P2F_MB_NEEDED_DELETE_SOME_FILES");
-               snprintf(content, len, buf, dSpace);
-               return 0;
-       }
-
-       if (!strncmp(err, ERROR_DECRYPT_OPERATION_FAILED, strlen(ERROR_DECRYPT_OPERATION_FAILED))) {
-               buf = "Decrypt process has been interupted by error. Retry to decrypt SD card?";
-               snprintf(content, len, "%s", buf);
-               return 0;
-       }
-
-       _E("Unknown type (%s)", err);
-       return -EINVAL;
-}
-
-static int show_ode_error_popup(void *data, bundle *b)
-{
-       struct appdata *ad = data;
-       char content[BUF_MAX];
-       int ret;
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (ode_error_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       ret = get_popup_content(b, content, sizeof(content));
-       if (ret < 0) {
-               _E("Failed to get popup content");
-               terminate_if_no_popup();
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       ode_error_ops.popup = load_normal_popup(ad,
-                       _("IDS_COM_HEADER_ATTENTION"),
-                       content,
-                       _("IDS_COM_SK_CANCEL"),
-                       cancel_clicked,
-                       _("IDS_COM_SK_RETRY_A"),
-                       retry_clicked);
-       if (!(ode_error_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               terminate_if_no_popup();
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_WARNING) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_ode_error_popup(void)
-{
-       register_popup(&ode_error_ops);
-}
diff --git a/system-popup/src/recovery.c b/system-popup/src/recovery.c
deleted file mode 100644 (file)
index 4c7cc31..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define RECOVERY_POPUP "recovery"
-#define SYSTEMD_STOP_POWER_RESTART_RECOVERY 6
-
-int show_recovery_popup(void *data, bundle *b);
-
-struct popup_ops recovery_ops = {
-       .name = RECOVERY_POPUP,
-       .popup = NULL,
-       .show_popup = show_recovery_popup
-};
-
-static void cancel_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("Cancel is clicked");
-       release_evas_object(&(recovery_ops.popup));
-       terminate_if_no_popup();
-}
-
-static void restart_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("Restart is clicked");
-       release_evas_object(&(recovery_ops.popup));
-
-       if (vconf_set_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS,
-                               SYSTEMD_STOP_POWER_RESTART_RECOVERY) != 0)
-               _E("Fail to request restart to deviced");
-
-       terminate_if_no_popup();
-}
-
-int show_recovery_popup(void *data, bundle *b)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (recovery_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       recovery_ops.popup = load_normal_popup(ad,
-                       "Prevention information",               /* Title */
-                       "To protect your device, "
-                       "it is recommended to reboot it",               /* Text */
-                       "Reboot now", restart_clicked,          /* Left button */
-                       "Reboot later", cancel_clicked);        /* Right button */
-       if (!(recovery_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_RECOVERY) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_recovery_popup(void)
-{
-       register_popup(&recovery_ops);
-}
diff --git a/system-popup/src/safemode.c b/system-popup/src/safemode.c
deleted file mode 100644 (file)
index f85aae4..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define SAFEMODE_POPUP "safemode"
-
-#define DEVICED_OBJECT_PATH     "/Org/Tizen/System/DeviceD"
-#define DEVICED_INTERFACE_NAME  "org.tizen.system.deviced"
-#define DEVICED_POWEROFF_SIGNAL "poweroffpopup"
-#define REQUEST_REBOOT          "reboot"
-
-static struct popup_ops safemode_ops;
-
-static void cancel_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("Cancel is clicked");
-       release_evas_object(&(safemode_ops.popup));
-       terminate_if_no_popup();
-}
-
-static int request_to_reboot(void)
-{
-       char *param[2];
-       char reboot[32];
-
-       snprintf(reboot, sizeof(reboot), "%s", REQUEST_REBOOT);
-       param[0] = reboot;
-       param[1] = "0";
-
-       return broadcast_dbus_signal(
-                       DEVICED_OBJECT_PATH,
-                       DEVICED_INTERFACE_NAME,
-                       DEVICED_POWEROFF_SIGNAL,
-                       "si", param);
-}
-
-static void disable_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       static bool already = false;
-
-       if (already)
-               return;
-       already = true;
-
-       _I("Disable is clicked");
-       release_evas_object(&(safemode_ops.popup));
-
-       if(request_to_reboot() < 0)
-               _E("Fail to request restart to deviced");
-}
-
-static int show_safemode_popup(void *data, bundle *b)
-{
-       struct appdata *ad = (struct appdata *)data;
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (safemode_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       safemode_ops.popup = load_normal_popup(ad,
-                       _("IDS_IDLE_HEADER_DISABLE_SAFE_MODE_ABB"),
-                       _("IDS_TPLATFORM_BODY_DISABLING_SAFE_MODE_WILL_RESTART_YOUR_DEVICE_DISABLE_Q"),
-                       _("IDS_COM_SK_CANCEL"),
-                       cancel_clicked,
-                       _("IDS_ST_SK_DISABLE_ABB"),
-                       disable_clicked);
-       if (!(safemode_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_WARNING) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static struct popup_ops safemode_ops = {
-       .name = SAFEMODE_POPUP,
-       .popup = NULL,
-       .show_popup = show_safemode_popup
-};
-
-static __attribute__ ((constructor)) void register_safemode_popup(void)
-{
-       register_popup(&safemode_ops);
-}
diff --git a/system-popup/src/usbotg_mount_failed.c b/system-popup/src/usbotg_mount_failed.c
deleted file mode 100644 (file)
index 26d3397..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define MOUNT_FAILED_POPUP       "usbotg_mount_failed"
-
-static int show_mount_failed_popup(void *data, bundle *b);
-
-struct popup_ops usbotg_mount_failed_ops = {
-       .name = MOUNT_FAILED_POPUP,
-       .popup = NULL,
-       .show_popup = show_mount_failed_popup
-};
-
-static void ok_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       release_evas_object(&(usbotg_mount_failed_ops.popup));
-       terminate_if_no_popup();
-}
-
-static int show_mount_failed_popup(void *data, bundle *b)
-{
-       struct appdata *ad = data;
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (usbotg_mount_failed_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       usbotg_mount_failed_ops.popup = load_normal_popup(ad,
-                       _("IDS_COM_HEADER_ATTENTION"),
-                       _("IDS_COM_BODY_USB_STORAGE_BLANK_OR_HAS_UNSUPPORTED_FILE_SYSTEM"),
-                       _("IDS_COM_SK_OK"),
-                       ok_clicked,
-                       NULL, NULL);
-       if (!(usbotg_mount_failed_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               terminate_if_no_popup();
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_MMC) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_usbotg_mount_failed_popup(void)
-{
-       register_popup(&usbotg_mount_failed_ops);
-}
diff --git a/system-popup/src/usbotg_removed_unsafe.c b/system-popup/src/usbotg_removed_unsafe.c
deleted file mode 100644 (file)
index 34099bf..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define REMOVED_UNSAFE_POPUP       "usbotg_removed_unsafe"
-
-static int show_removed_unsafe_popup(void *data, bundle *b);
-
-struct popup_ops usbotg_removed_unsafe_ops = {
-       .name = REMOVED_UNSAFE_POPUP,
-       .popup = NULL,
-       .show_popup = show_removed_unsafe_popup
-};
-
-static void ok_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       release_evas_object(&(usbotg_removed_unsafe_ops.popup));
-       terminate_if_no_popup();
-}
-
-static int show_removed_unsafe_popup(void *data, bundle *b)
-{
-       struct appdata *ad = data;
-
-       if (!ad || !(ad->win_main))
-               return -EINVAL;
-
-       if (usbotg_removed_unsafe_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       evas_object_show(ad->win_main);
-
-       usbotg_removed_unsafe_ops.popup = load_normal_popup(ad,
-                       _("IDS_COM_HEADER_ATTENTION"),
-                       _("IDS_COM_POP_USB_MASS_STORAGE_UNEXPECTEDLY_REMOVED"),
-                       _("IDS_COM_SK_OK"),
-                       ok_clicked,
-                       NULL, NULL);
-       if (!(usbotg_removed_unsafe_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               terminate_if_no_popup();
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_WARNING) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-static __attribute__ ((constructor)) void register_usbotg_removed_unsafe_popup(void)
-{
-       register_popup(&usbotg_removed_unsafe_ops);
-}
diff --git a/system-popup/src/watchdog.c b/system-popup/src/watchdog.c
deleted file mode 100644 (file)
index ccbafee..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * system-popup
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
- *
- * 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 "core.h"
-#include "common.h"
-
-#define WATCHDOG_POPUP "watchdog" /* Application Not Responding */
-#define APP_NAME       "_APP_NAME_"
-#define BUF_MAX 256
-
-#define DBUS_RESOURCED_WATCHDOG_PATH   "/Org/Tizen/ResourceD/Process"
-#define DBUS_RESOURCED_WATCHDOG_IFACE  "org.tizen.resourced.process"
-#define DBUS_RESOURCED_WATCHDOG_SIGNAL "WatchdogResult"
-
-int show_watchdog_popup(void *data, bundle *b);
-
-struct popup_ops watchdog_ops = {
-       .name = WATCHDOG_POPUP,
-       .popup = NULL,
-       .show_popup = show_watchdog_popup
-};
-
-static void send_result_dbus_signal(int result)
-{
-       int ret;
-       char buf[8];
-       char *param[1];
-
-       snprintf(buf, sizeof(buf), "%d", result);
-       param[0] = buf;
-       ret = broadcast_dbus_signal(DBUS_RESOURCED_WATCHDOG_PATH,
-                       DBUS_RESOURCED_WATCHDOG_IFACE,
-                       DBUS_RESOURCED_WATCHDOG_SIGNAL,
-                       "i", param);
-       if (ret < 0)
-               _E("FAIL: broadcast_dbus_signal()");
-}
-
-static void wait_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("Wait is clicked");
-       release_evas_object(&(watchdog_ops.popup));
-
-       /* Send dbus siganl with value 0(wait) */
-       send_result_dbus_signal(0);
-
-       terminate_if_no_popup();
-}
-
-static void ok_clicked(void *data, Evas_Object *obj, void *event_info)
-{
-       _I("OK is clicked");
-       release_evas_object(&(watchdog_ops.popup));
-
-       /* Send dbus siganl with value 1(OK) */
-       send_result_dbus_signal(1);
-
-       terminate_if_no_popup();
-}
-
-static int get_app_name(bundle *b, char buf[], int size)
-{
-       char *name;
-       if (!b || !buf || size <= 0)
-               return -EINVAL;
-
-       name = (char *)bundle_get_val(b, APP_NAME);
-       if (!name) {
-               _E("FAIL: bundle_get_val()");
-               return -ENOMEM;
-       }
-
-       snprintf(buf, size, "%s", name);
-       return 0;
-}
-
-int show_watchdog_popup(void *data, bundle *b)
-{
-       struct appdata *ad = (struct appdata *)data;
-       char name[BUF_MAX];
-       char text[BUF_MAX];
-       char *translated;
-       int ret;
-
-       if (!ad || !(ad->win_main) || !b)
-               return -EINVAL;
-
-       if (watchdog_ops.popup) {
-               _E("Popup already exists");
-               return 0;
-       }
-
-       ret = get_app_name(b, name, sizeof(name));
-       if (ret < 0) {
-               _E("FAIL: get_app_name()");
-               return ret;
-       }
-
-       translated = _("IDS_ST_BODY_PS_IS_NOT_RESPONDING_CLOSE_PS_Q");
-
-       snprintf(text, sizeof(text),
-                       translated, name, name);
-
-       evas_object_show(ad->win_main);
-
-       watchdog_ops.popup = load_normal_popup(ad,
-                       _("IDS_CLD_HEADER_NO_RESPONSE"),                /* Title */
-                       text,                                                                   /* Text */
-                       _("IDS_CST_OPT_WAIT"), wait_clicked,    /* Left button */
-                       _("IDS_ST_BUTTON_OK"), ok_clicked);             /* Right button */
-       if (!(watchdog_ops.popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       if (set_display_feedback(PATTERN_WATCHDOG) < 0)
-               _E("Failed to set display and feedback");
-
-       return 0;
-}
-
-
-static __attribute__ ((constructor)) void register_watchdog_popup(void)
-{
-       register_popup(&watchdog_ops);
-}
index 2b64504..d0498ab 100755 (executable)
@@ -2,6 +2,10 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 PROJECT(system-servant C)
 
+IF(SYSTEM_SERVANT STREQUAL off)
+       RETURN()
+ENDIF(SYSTEM_SERVANT STREQUAL off)
+
 SET(SRCS ${CMAKE_SOURCE_DIR}/system-servant/system-servant.c)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
index 6000058..805dd61 100755 (executable)
@@ -250,8 +250,8 @@ static bool get_call_state(void)
 static bool get_voice_recording_state(void)
 {
        int state;
-       if (vconf_get_int(VCONFKEY_SOUND_STATUS, &state) == 0
-                       && (state & VCONFKEY_SOUND_STATUS_AVRECORDING))
+       if (vconf_get_int(VCONFKEY_RECORDER_STATE, &state) == 0
+                       && (state == VCONFKEY_RECORDER_STATE_RECORDING))
                return true;
        return false;
 }
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100755 (executable)
index c1d5b69..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS ${CMAKE_SOURCE_DIR}/test/test.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
-SET(UTILNAME "systemfw-app-test")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/test
-                                       ${CMAKE_SOURCE_DIR}/share
-                                       ${CMAKE_SOURCE_DIR}/popup-launcher/src)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED edbus appcore-efl bundle elementary)
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -Wall")
-
-ADD_EXECUTABLE(${UTILNAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${UTILNAME} ${pkgs_LDFLAGS} "-ldl")
-
-INSTALL(TARGETS ${UTILNAME} DESTINATION bin)
diff --git a/test/test.c b/test/test.c
deleted file mode 100755 (executable)
index c1b568b..0000000
+++ /dev/null
@@ -1,881 +0,0 @@
-/*
- * systemfw-app-test
- *
- * Copyright (c) 2013 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.
- *
-*/
-
-/* Notice:
- * User can test to launch only lowbat, mmc, usb, and datausage popup
- * using this test app since the test app receives just 2 parameters */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <E_DBus.h>
-#include "launcher.h"
-#include "common.h"
-
-#define DBUS_REPLY_TIMEOUT  (120 * 1000)
-#define RETRY_MAX 10
-
-#define FIN_MENU 0
-
-struct test_menu {
-       const char *text;
-       void (*func)(void);
-};
-
-static int append_variant(DBusMessageIter *iter, const char *sig, char *param[])
-{
-       char *ch;
-       int i, int_type;
-
-       if (!sig || !param)
-               return 0;
-
-       for (ch = (char*)sig, i = 0; *ch != '\0'; ++i, ++ch) {
-               switch (*ch) {
-               case 's':
-                       dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &param[i]);
-                       break;
-               case 'i':
-                       int_type = atoi(param[i]);
-                       dbus_message_iter_append_basic(iter, DBUS_TYPE_INT32, &int_type);
-                       break;
-               default:
-                       _E("ERROR: %s %c", sig, *ch);
-                       return -EINVAL;
-               }
-       }
-       return 0;
-}
-
-DBusMessage *call_dbus_method(const char *dest, const char *path,
-               const char *interface, const char *method,
-               const char *sig, char *param[])
-{
-       DBusConnection *conn;
-       DBusMessage *msg = NULL;
-       DBusMessageIter iter;
-       DBusMessage *ret;
-       DBusError err;
-       int r;
-
-       conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
-       if (!conn) {
-               ret = NULL;
-               goto out;
-       }
-
-       msg = dbus_message_new_method_call(dest, path, interface, method);
-       if (!msg) {
-               ret = NULL;
-               goto out;
-       }
-
-       dbus_message_iter_init_append(msg, &iter);
-       r = append_variant(&iter, sig, param);
-       if (r < 0) {
-               ret = NULL;
-               goto out;
-       }
-
-       /*This function is for synchronous dbus method call */
-       dbus_error_init(&err);
-       ret = dbus_connection_send_with_reply_and_block(conn, msg, DBUS_REPLY_TIMEOUT, &err);
-       dbus_error_free(&err);
-
-out:
-       dbus_message_unref(msg);
-
-       return ret;
-}
-
-int request_to_launch_by_dbus(char *bus, char *path, char *iface,
-               char *method, char *ptype, char *param[])
-{
-       DBusMessage *msg;
-       DBusError err;
-       int i, r, ret_val;
-
-       i = 0;
-       do {
-               msg = call_dbus_method(bus, path, iface, method, ptype, param);
-               if (msg)
-                       break;
-               i++;
-       } while (i < RETRY_MAX);
-       if (!msg) {
-               _E("fail to call dbus method");
-               return -ECONNREFUSED;
-       }
-
-       dbus_error_init(&err);
-       r = dbus_message_get_args(msg, &err, DBUS_TYPE_INT32, &ret_val, DBUS_TYPE_INVALID);
-       if (!r) {
-               _E("no message : [%s:%s]", err.name, err.message);
-               ret_val = -EBADMSG;
-       }
-
-       dbus_message_unref(msg);
-       dbus_error_free(&err);
-
-       return ret_val;
-}
-
-static int list_and_select_menu(const struct test_menu menu[], int size, char *title)
-{
-       int i, sel = -1;
-
-       if (!menu || !title)
-               return -EINVAL;
-
-       while (1) {
-               printf("\n** %s\n", title);
-               for (i = 1 ; i < size ; i++) {
-                       printf("%3d. %s\n", i, menu[i].text);
-               }
-               printf("%3d. %s\n", 0, menu[0].text);
-               printf("Select a menu to test: ");
-               if (scanf("%d", &sel) != 1) {
-                       _E("FAIL: scanf()");
-                       return 0;
-               }
-
-               if (sel < FIN_MENU || sel > size - 1) {
-                       printf("[ERROR] The input number is wrong (%d)!!\n", sel);
-                       continue;
-               }
-               return sel;
-       }
-}
-
-/* Notification menu */
-static const struct test_menu
-noti_remove_menu[] = {
-       { "Remove previous notification", NULL },
-};
-
-static void activate_normal_noti(char *bus,
-               char *path,
-               char *iface,
-               char *method_on,
-               char *type,
-               char *param[],
-               char *method_off)
-{
-       int ret;
-       char str[8];
-       char *noti_id[1];
-
-       ret = request_to_launch_by_dbus(bus, path, iface,
-                       method_on, type, param);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-
-       if (!method_off)
-               return;
-
-       /* Deactivate notification */
-       snprintf(str, sizeof(str), "%d", ret);
-       noti_id[0] = str;
-       ret = list_and_select_menu(noti_remove_menu,
-                       ARRAY_SIZE(noti_remove_menu), "Remove notification");
-       ret = request_to_launch_by_dbus(bus, path, iface,
-                       method_off, "i", noti_id);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus()");
-}
-
-static const struct test_menu
-noti_update_menu[] = {
-       { "Remove progress notification", NULL },
-       { "Update progress notification", NULL },
-};
-
-static int get_progress_rate(char *title)
-{
-       int rate;
-       if (!title)
-               return -EINVAL;
-
-       printf("\n** %s (0 ~ 100) : ", title);
-       if (scanf("%d", &rate) != 1) {
-               _E("FAIL: scanf()");
-               return -ENOMEM;
-       }
-
-       return rate;
-}
-
-static int update_progress_noti(char *bus, char *path,
-               char *iface, char *method_update, char *noti_id)
-{
-       int sel, ret;
-       int i_rate;
-       char c_rate[8];
-       char *param[2];
-
-       do {
-               sel = list_and_select_menu(noti_update_menu,
-                               ARRAY_SIZE(noti_update_menu), "Update notification");
-               if (sel == FIN_MENU)
-                       return sel;
-               if (sel >= 0 && sel < ARRAY_SIZE(noti_update_menu))
-                       break;
-               printf("[ERROR] The input number is wrong (%d)!!\n\n", sel);
-       } while(1);
-
-       do{
-               i_rate = get_progress_rate(
-                               "Input progress rate to update the notification");
-               if (i_rate >= 0 && i_rate <= 100)
-                       break;
-               printf("\n[ERROR] (%d) is invalid value.\n", i_rate);
-       } while(1);
-
-       snprintf(c_rate, sizeof(c_rate), "%d", i_rate);
-       param[0] = noti_id;
-       param[1] = c_rate;
-       ret = request_to_launch_by_dbus(bus, path, iface,
-                       method_update, "ii", param);
-       if (ret != 0)
-               return -ENOMEM;
-
-       return 1;
-}
-
-static void activate_progress_noti(char *bus,
-               char *path,
-               char *iface,
-               char *method_on,
-               char *type_on,
-               char *param_on[],
-               char *method_update,
-               char *method_off)
-{
-       int ret, sel;
-       char noti_id[8];
-       char *param_off[1];
-
-       ret = request_to_launch_by_dbus(bus, path, iface,
-                       method_on, type_on, param_on);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-
-       snprintf(noti_id, sizeof(noti_id), "%d", ret);
-
-       do {
-               sel = update_progress_noti(bus, path, iface,
-                               method_update, noti_id);
-               if (sel == FIN_MENU)
-                       break;
-               if (sel < 0)
-                       _E("FAIL: update_progress_noti()");
-       } while (1);
-
-       param_off[0] = noti_id;
-       ret = request_to_launch_by_dbus(bus, path, iface,
-                       method_off, "i", param_off);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus()");
-}
-
-static void test_data_warning_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_DATAUSAGE, POPUP_IFACE_DATAUSAGE,
-                       "WarningNotiOn", NULL, NULL, "WarningNotiOff");
-}
-
-static void test_data_disabled_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_DATAUSAGE, POPUP_IFACE_DATAUSAGE,
-                       "DisabledNotiOn", NULL, NULL, "DisabledNotiOff");
-}
-
-static void test_led_torch_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_LED, POPUP_IFACE_LED,
-                       "TorchNotiOn", NULL, NULL, "TorchNotiOff");
-}
-
-static void test_encrypt_complete_noti(void)
-{
-       char *param[1];
-
-       param[0] = "encrypt";
-       activate_normal_noti(BUS_NAME, POPUP_PATH_ODE, POPUP_IFACE_ODE,
-                       "CompNotiOn", "s", param, "CompNotiOff");
-}
-
-static void test_decrypt_complete_noti(void)
-{
-       char *param[1];
-
-       param[0] = "decrypt";
-       activate_normal_noti(BUS_NAME, POPUP_PATH_ODE, POPUP_IFACE_ODE,
-                       "CompNotiOn", "s", param, "CompNotiOff");
-}
-
-static void test_encrypt_progress_noti(void)
-{
-       char *param[1];
-
-       param[0] = "encrypt";
-       activate_progress_noti(BUS_NAME, POPUP_PATH_ODE, POPUP_IFACE_ODE,
-                       "ProgNotiOn", "s", param, "ProgNotiUpdate", "ProgNotiOff");
-}
-
-static void test_decrypt_progress_noti(void)
-{
-       char *param[1];
-
-       param[0] = "decrypt";
-       activate_progress_noti(BUS_NAME, POPUP_PATH_ODE, POPUP_IFACE_ODE,
-                       "ProgNotiOn", "s", param, "ProgNotiUpdate", "ProgNotiOff");
-}
-
-static void test_encrypt_error_noti(void)
-{
-       char *param[3];
-       char type[2];
-       char num[16];
-
-       param[0] = "encrypt";
-       snprintf(type, sizeof(type), "%d", 0);
-       param[1] = type;
-       snprintf(num, sizeof(num), "%d", 456);
-       param[2] = num;
-
-       activate_normal_noti(BUS_NAME, POPUP_PATH_ODE, POPUP_IFACE_ODE,
-                       "ErrorNotiOn", "sii", param, "ErrorNotiOff");
-}
-
-static void test_tima_lkm_prevention_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_TIMA, POPUP_IFACE_TIMA,
-                       "LKMPreventionNotiOn", NULL, NULL, "LKMPreventionNotiOff");
-}
-
-static void test_tima_pkm_detection_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_TIMA, POPUP_IFACE_TIMA,
-                       "PKMDetectionNotiOn", NULL, NULL, "PKMDetectionNotiOff");
-}
-
-static void test_usb_device_noti(void)
-{
-       char *param[2];
-
-       param[0] = "keyboard";
-       param[1] = "Samsung keyboard";
-       activate_normal_noti(BUS_NAME, POPUP_PATH_USBHOST, POPUP_IFACE_USBHOST,
-                       "UsbDeviceNotiOn", "ss", param, "UsbDeviceNotiOff");
-}
-
-static void test_ticker_noti(void)
-{
-       char *param[1];
-
-       param[0] = "usb-client-default";
-       activate_normal_noti(BUS_NAME, POPUP_PATH_TICKER, POPUP_IFACE_TICKER,
-                       "TickerNotiOn", "s", param, NULL);
-}
-
-static void test_battery_full_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_BATTERY, POPUP_IFACE_BATTERY,
-                       "BatteryFullNotiOn", NULL, NULL, "BatteryFullNotiOff");
-}
-
-static void test_battery_charge_noti(void)
-{
-       activate_normal_noti(BUS_NAME, POPUP_PATH_BATTERY, POPUP_IFACE_BATTERY,
-                       "BatteryChargeNotiOn", NULL, NULL, NULL);
-}
-
-static const struct test_menu
-notifications_menu[] = {
-       { "Go to previous menu"       , NULL                           },
-       { "Data warning noti"         , test_data_warning_noti         },
-       { "Data disabled noti"        , test_data_disabled_noti        },
-       { "LED torch noti"            , test_led_torch_noti            },
-       { "Encryption complete noti"  , test_encrypt_complete_noti     },
-       { "Decryption complete noti"  , test_decrypt_complete_noti     },
-       { "Encryption Progress noti"  , test_encrypt_progress_noti     },
-       { "Decryption Progress noti"  , test_decrypt_progress_noti     },
-       { "Encryption error noti"     , test_encrypt_error_noti        },
-       { "TIMA LKM prevention noti"  , test_tima_lkm_prevention_noti  },
-       { "TIMA PKM detection noti"   , test_tima_pkm_detection_noti   },
-       { "USB device noti"           , test_usb_device_noti           },
-       { "Battery full noti"         , test_battery_full_noti         },
-       { "Battery charge noti"       , test_battery_charge_noti       },
-       { "Ticker noti"               , test_ticker_noti               },
-       /* Add additional menus here */
-};
-
-static void test_notifications(void)
-{
-       int sel;
-
-       /* Acticate notification */
-       sel = list_and_select_menu(notifications_menu,
-                       ARRAY_SIZE(notifications_menu), "Notification Menu");
-       if (sel == FIN_MENU)
-               return ;
-
-       if (sel < 0 || sel >= ARRAY_SIZE(notifications_menu))
-               return;
-
-       notifications_menu[sel].func();
-}
-/**************/
-/* Popup menu */
-/**************/
-
-/* Poweroff popup */
-static void launch_poweroff_popup(void)
-{
-       int ret;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_POWEROFF,
-                       POPUP_IFACE_POWEROFF, "PopupLaunch", NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Lowbat popup */
-static void launch_lowbat_popup(char *opt)
-{
-       int ret;
-       char *pa[2];
-       if (!opt)
-               return;
-       pa[0] = "_SYSPOPUP_CONTENT_";
-       pa[1] = opt;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_LOWBAT,
-                       POPUP_IFACE_LOWBAT, "PopupLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-static void launch_lowbat_warning_popup(void)
-{
-       launch_lowbat_popup("warning");
-}
-
-static void launch_lowbat_poweroff_popup(void)
-{
-       launch_lowbat_popup("poweroff");
-}
-
-static void launch_lowbat_chargeerr_popup(void)
-{
-       launch_lowbat_popup("chargeerr");
-}
-
-static void launch_lowbat_battdisconnect_popup(void)
-{
-       launch_lowbat_popup("battdisconnect");
-}
-
-static const struct test_menu
-lowbat_popups_menu[] = {
-       { "Go to previous menu"          , NULL                               },
-       { "Warning popup"                , launch_lowbat_warning_popup        },
-       { "Poweroff popup"               , launch_lowbat_poweroff_popup       },
-       { "Charging error popup"         , launch_lowbat_chargeerr_popup      },
-       { "Battery disconnected popup"   , launch_lowbat_battdisconnect_popup },
-       /* Add additional menus here */
-};
-
-static void test_lowbat_popup(void)
-{
-       int sel;
-       sel = list_and_select_menu(lowbat_popups_menu,
-                       ARRAY_SIZE(lowbat_popups_menu), "Low Battery Popup Menu");
-       if (sel == FIN_MENU)
-               return ;
-
-       if (sel < 0 || sel >= ARRAY_SIZE(lowbat_popups_menu))
-               return;
-
-       lowbat_popups_menu[sel].func();
-}
-
-/* Lowmem popup */
-static void launch_lowmem_popup(char *type, char *opt)
-{
-       int ret;
-       char *pa[2];
-       if (!opt || !type)
-               return;
-       pa[0] = type;
-       pa[1] = opt;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_LOWMEM,
-                       POPUP_IFACE_LOWMEM, "PopupLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-static void launch_lowmem_memsize_warning_popup(void)
-{
-       launch_lowmem_popup("_MEM_NOTI_", "warning");
-}
-
-static void launch_lowmem_memsize_critical_popup(void)
-{
-       launch_lowmem_popup("_MEM_NOTI_", "critical");
-}
-
-static void launch_lowmem_appname_popup(void)
-{
-       launch_lowmem_popup("_APP_NAME_", "test app");
-}
-
-static const struct test_menu
-lowmem_popups_menu[] = {
-       { "Go to previous menu"          , NULL                                 },
-       { "Memory size warning popup"    , launch_lowmem_memsize_warning_popup  },
-       { "Memory size critical popup"   , launch_lowmem_memsize_critical_popup },
-       { "Process name popup"           , launch_lowmem_appname_popup          },
-       /* Add additional menus here */
-};
-
-static void test_lowmem_popup(void)
-{
-       int sel;
-       sel = list_and_select_menu(lowmem_popups_menu,
-                       ARRAY_SIZE(lowmem_popups_menu), "Low Memory Popup Menu");
-       if (sel == FIN_MENU)
-               return ;
-
-       if (sel < 0 || sel >= ARRAY_SIZE(lowmem_popups_menu))
-               return;
-
-       lowmem_popups_menu[sel].func();
-}
-
-/* Usb popup */
-static void launch_usb_popup(char *type, char *opt)
-{
-       int ret;
-       char *pa[2];
-       if (!opt || !type)
-               return;
-       pa[0] = type;
-       pa[1] = opt;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_USB,
-                       POPUP_IFACE_USB, "PopupLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-static void launch_usb_error_popup(void)
-{
-       launch_usb_popup("_SYSPOPUP_CONTENT_", "error");
-}
-
-static void launch_usb_restrict_popup(void)
-{
-       launch_usb_popup("_SYSPOPUP_CONTENT_", "restrict");
-}
-
-static const struct test_menu
-usb_popups_menu[] = {
-       { "Go to previous menu"   , NULL                        },
-       { "USB error popup"       , launch_usb_error_popup      },
-       { "USB restrict popup"    , launch_usb_restrict_popup   },
-       /* Add additional menus here */
-};
-
-static void test_usb_popup(void)
-{
-       int sel;
-       sel = list_and_select_menu(usb_popups_menu,
-                       ARRAY_SIZE(usb_popups_menu), "Low Memory Popup Menu");
-       if (sel == FIN_MENU)
-               return ;
-
-       if (sel < 0 || sel >= ARRAY_SIZE(usb_popups_menu))
-               return;
-
-       usb_popups_menu[sel].func();
-}
-
-/* Recovery popup */
-static void launch_recovery_popup(void)
-{
-       int ret;
-       char *pa[2];
-       pa[0] = "_SYSPOPUP_CONTENT_";
-       pa[1] = "recovery";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM,
-                       POPUP_IFACE_SYSTEM, "RecoveryPopupLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Watchdog popup */
-static void launch_watchdog_popup(void)
-{
-       int ret;
-       char *pa[4];
-       pa[0] = "_SYSPOPUP_CONTENT_";
-       pa[1] = "watchdog";
-       pa[2] = "_APP_NAME_";
-       pa[3] = "test_app";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM,
-                       POPUP_IFACE_SYSTEM, "WatchdogPopupLaunch", "ssss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Data blocked popup */
-static void launch_data_blocked_popup(void)
-{
-       int ret;
-       char *pa[4];
-
-       pa[0] = "_SYSPOPUP_CONTENT_";
-       pa[1] = "data_blocked";
-       pa[2] = "_DATAUSAGE_LIMIT_";
-       pa[3] = "20";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_DATAUSAGE,
-                       POPUP_IFACE_DATAUSAGE, "BlockedPopupLaunch", "ssss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Crash popup */
-static void launch_crash_popup(void)
-{
-       int ret;
-       char *pa[4];
-
-       pa[0] = "_PROCESS_NAME_";
-       pa[1] = "clock";
-       pa[2] = "_EXEPATH_";
-       pa[3] = "/usr/apps/org.tizen.clock/bin/clock";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_CRASH,
-                       POPUP_IFACE_CRASH, "PopupLaunch", "ssss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Usb otg mount failed popup */
-static void launch_usbotg_mount_failed_popup(void)
-{
-       int ret;
-       char *pa[2];
-       pa[0] = "_SYSPOPUP_CONTENT_";
-       pa[1] = "usbotg_mount_failed";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM,
-                       POPUP_IFACE_SYSTEM, "UsbotgWarningPopupLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Usb otg removed unsafely popup */
-static void launch_usbotg_removed_unsafe_popup(void)
-{
-       int ret;
-       char *pa[2];
-       pa[0] = "_SYSPOPUP_CONTENT_";
-       pa[1] = "usbotg_removed_unsafe";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SYSTEM,
-                       POPUP_IFACE_SYSTEM, "UsbotgWarningPopupLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-static const struct test_menu
-popups_menu[] = {
-       { "Go to previous menu"          , NULL                              },
-       { "Poweroff popup"               , launch_poweroff_popup             },
-       { "Lowbat popup"                 , test_lowbat_popup                 },
-       { "Lowmem popup"                 , test_lowmem_popup                 },
-       { "Usb popup"                    , test_usb_popup                    },
-       { "Recovery popup"               , launch_recovery_popup             },
-       { "Watchdog popup"               , launch_watchdog_popup             },
-       { "Data blocked popup"           , launch_data_blocked_popup         },
-       { "Crash popup"                  , launch_crash_popup                },
-       { "Usbotg mount failed popup"    , launch_usbotg_mount_failed_popup  },
-       { "Usbotg removed unsafe popup"  , launch_usbotg_removed_unsafe_popup},
-       /* Add additional menus here */
-};
-
-static void test_popups(void)
-{
-       int sel;
-
-       sel = list_and_select_menu(popups_menu,
-                       ARRAY_SIZE(popups_menu), "Popup Menu");
-       if (sel == FIN_MENU)
-               return ;
-
-       if (sel < 0 || sel >= ARRAY_SIZE(popups_menu))
-               return;
-
-       popups_menu[sel].func();
-}
-
-/* Cradle app */
-static void launch_cradle_app(void)
-{
-       int ret;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_APP,
-                       POPUP_IFACE_APP, "CradleAppLaunch", NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* pwlock app */
-static void launch_pwlock_app(void)
-{
-       int ret;
-       char *pa[2];
-       pa[0] = "after_bootup";
-       pa[1] = "1";
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_APP,
-                       POPUP_IFACE_APP, "PWLockAppLaunch", "ss", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Terminate app */
-static int get_integer_value(char *text)
-{
-       int val;
-
-       if (!text)
-               return -1;
-
-       printf("%s: ", text);
-       if (scanf("%d", &val) != 1) {
-               _E("FAIL: scanf()");
-               val = -1;
-       }
-
-       return val;
-}
-
-static void terminate_app_pid(void)
-{
-       int pid;
-       int ret;
-       char *pa[1];
-       char buf[64];
-
-       printf("\n");
-
-       pid = get_integer_value("Input pid of an app to terminate");
-       if (pid < 0) {
-               printf("\nInput value is invalid !!\n");
-               return;
-       }
-
-       snprintf(buf, sizeof(buf), "%d", pid);
-       pa[0] = buf;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_APP,
-                       POPUP_IFACE_APP, "AppTerminateByPid", "i", pa);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-/* Screen off tts */
-static void launch_screen_off_tts(void)
-{
-       int ret;
-
-       ret = request_to_launch_by_dbus(BUS_NAME, POPUP_PATH_SERVANT,
-                       POPUP_IFACE_SERVANT, "ScreenOffTts", NULL, NULL);
-       if (ret < 0)
-               _E("FAIL: request_to_launch_by_dbus(): %d", ret);
-}
-
-static const struct test_menu
-apps_menu[] = {
-       { "Go to previous menu"          , NULL                    },
-       { "Launch cradle app"            , launch_cradle_app       },
-       { "Launch pwlock app"            , launch_pwlock_app       },
-       { "Terminate app by pid"         , terminate_app_pid       },
-       { "Screen Off TTS"               , launch_screen_off_tts   },
-       /* Add additional menus here */
-};
-
-static void test_apps(void)
-{
-       int sel;
-
-       sel = list_and_select_menu(apps_menu,
-                       ARRAY_SIZE(apps_menu), "App Menu");
-       if (sel == FIN_MENU)
-               return ;
-
-       if (sel < 0 || sel >= ARRAY_SIZE(apps_menu))
-               return;
-
-       apps_menu[sel].func();
-}
-
-
-/* Main Menu */
-static const struct test_menu
-main_menu[] = {
-       { "Finish to test"  , NULL               },
-       { "Popups"          , test_popups        },
-       { "Notifications"   , test_notifications },
-       { "Apps"            , test_apps },
-       /* Add additional menus here */
-};
-
-int main(int argc, char *argv[])
-{
-       int sel;
-
-       printf("###############################\n");
-       printf("## System Framework test app ##\n");
-       printf("###############################\n");
-
-       while(1) {
-               sel = list_and_select_menu(main_menu,
-                       ARRAY_SIZE(main_menu), "Main Menu");
-
-               if (sel == FIN_MENU) {
-                       printf("\nBye ~~ !!\n\n");
-                       break;
-               }
-
-               if (sel < 0 || sel >= ARRAY_SIZE(main_menu))
-                       return -EINVAL;
-
-               main_menu[sel].func();
-       }
-
-       return 0;
-}
diff --git a/usb-popup/CMakeLists.txt b/usb-popup/CMakeLists.txt
deleted file mode 100644 (file)
index cac8398..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS src/usb-syspopup.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
-
-SET(VENDOR "tizen")
-SET(PACKAGE "usb-syspopup")
-SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(LOCALEDIR "${RESDIR}/locale")
-SET(MANIFESTDIR "${CMAKE_INSTALL_PREFIX}/share/packages")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
-                               appcore-efl
-                               bundle
-                               dlog
-                               ecore
-                               elementary
-                               evas
-                               syspopup
-                               appsvc
-                               vconf
-                               deviced)
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall")
-
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
-
-ADD_EXECUTABLE(${PACKAGE} ${SRCS})
-TARGET_LINK_LIBRARIES(${PACKAGE} syspopup  ${pkgs_LDFLAGS})
-
-INSTALL(TARGETS ${PACKAGE} DESTINATION ${BINDIR})
-
-# install icon
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/usb_icon.png DESTINATION ${RESDIR}/icons/)
-
-# install manifest file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
-
-# install smack efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
diff --git a/usb-popup/src/usb-syspopup.c b/usb-popup/src/usb-syspopup.c
deleted file mode 100644 (file)
index 77b16af..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * usb-syspopup
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * 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 <stdio.h>
-#include <vconf.h>
-#include <ail.h>
-#include <string.h>
-#include <appcore-efl.h>
-#include <Ecore_X.h>
-#include <assert.h>
-#include "usb-syspopup.h"
-#include "common.h"
-
-#define BUF_MAX 1024
-
-#define SYSPOPUP_CONTENT   "_SYSPOPUP_CONTENT_"
-#define ERROR_POPUP        "error"
-#define RESTRICT_POPUP     "restrict"
-
-static char popup_type[BUF_MAX] = {0, };
-
-static bool is_usb_connected(void)
-{
-       int state;
-
-       if (vconf_get_int(VCONFKEY_SYSMAN_USB_STATUS, &state) != 0)
-               return false;
-
-       switch (state) {
-       case VCONFKEY_SYSMAN_USB_CONNECTED:
-       case VCONFKEY_SYSMAN_USB_AVAILABLE:
-               return true;
-       case VCONFKEY_SYSMAN_USB_DISCONNECTED:
-       default:
-               return false;
-       }
-}
-
-static void usb_state_changed(keynode_t *key, void *data)
-{
-       if (!is_usb_connected())
-               popup_terminate();
-}
-
-static int usp_vconf_key_notify(void)
-{
-       int ret;
-
-       /* Event for USB cable */
-       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_STATUS,
-                                       usb_state_changed, NULL);
-       if (0 != ret) {
-               _E("FAIL: vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_STATUS)");
-               return -1;
-       }
-
-       return 0;
-}
-
-static int usp_vconf_key_ignore(void)
-{
-       int ret;
-
-       /* Event for USB cable */
-       ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_STATUS, usb_state_changed);
-       if (0 != ret) {
-               _E("FAIL: vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_STATUS)");
-               return -1;
-       }
-
-       return 0;
-}
-
-static int __app_create(void *data)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-
-       ad->handler.def_term_fn = NULL;
-       ad->handler.def_timeout_fn = NULL;
-
-       /* init internationalization */
-       ret = appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR);
-       if (ret != 0) {
-               _E("FAIL: appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR)");
-               return -1;
-       }
-
-       return 0;
-}
-
-static void unload_popup(struct appdata *ad)
-{
-       assert(ad);
-
-       if (ad->win_main) {
-               evas_object_del(ad->win_main);
-               ad->win_main = NULL;
-       }
-}
-
-static int __app_terminate(void *data)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-
-       if (!strncmp(popup_type, ERROR_POPUP, strlen(popup_type))) {
-               ret = usp_vconf_key_ignore();
-               if (ret != 0) _E("FAIL: usp_vconf_key_ignore()");
-       }
-
-       unload_popup(ad);
-
-       if (ad->b) {
-               ret = bundle_free(ad->b);
-               if (ret != 0) {
-                       _E("FAIL: bundle_free(ad->b)");
-               }
-               ad->b = NULL;
-       }
-
-       return 0;
-}
-
-static int __app_pause(void *data)
-{
-       return 0;
-}
-
-static int __app_resume(void *data)
-{
-       return 0;
-}
-
-static void usb_popup_response(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-
-       unload_popup(ad);
-
-       popup_terminate();
-}
-
-static int load_connection_failed_popup(void *data)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-
-       if (usp_vconf_key_notify() < 0)
-               _E("Failed to notify vconf key");
-
-       if (!is_usb_connected())
-               return -ECANCELED;
-
-       ad->popup = load_normal_popup(ad,
-                       NULL,
-                       _("IDS_USB_POP_USB_CONNECTION_FAILED"),
-                       _("IDS_COM_SK_OK"),
-                       usb_popup_response,
-                       NULL,
-                       NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int load_usb_restrict_popup(void *data)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-
-       ad->popup = load_normal_popup(ad,
-               NULL,
-               _("IDS_ST_POP_SECURITY_POLICY_PREVENTS_USE_OF_DESKTOP_SYNC"),
-               _("IDS_COM_SK_OK"),
-               usb_popup_response,
-               NULL,
-               NULL);
-       if (!(ad->popup)) {
-               _E("FAIL: load_normal_popup()");
-               return -ENOMEM;
-       }
-
-       return 0;
-}
-
-static int __app_reset(bundle *b, void *data)
-{
-       assert(data);
-       struct appdata *ad = data;
-       char *type;
-       int ret;
-
-       ad->b = bundle_dup(b);
-
-       if (syspopup_has_popup(b)) {
-               _D("usb-syspopup is already loaded");
-               return 0;
-       }
-
-       type = (char *)bundle_get_val(b, SYSPOPUP_CONTENT);
-       if (!type) {
-               _E("ERROR: Non existing type of popup");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       snprintf(popup_type, sizeof(popup_type), "%s", type);
-
-       /* create window */
-       ad->win_main = create_win(PACKAGE);
-       if (!(ad->win_main)) {
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       if (syspopup_create(ad->b, &(ad->handler), ad->win_main, ad) != 0) {
-               _E("FAIL: syspopup_create()");
-               ret = -ENOMEM;
-               goto out;
-       }
-
-       if (!strncmp(type, ERROR_POPUP, strlen(ERROR_POPUP))) {
-               _D("Connection failed popup is loaded");
-               ret = load_connection_failed_popup(ad);
-               goto out;
-       }
-
-       if (!strncmp(type, RESTRICT_POPUP, strlen(RESTRICT_POPUP))) {
-               _D("USB restrict popup is loaded");
-               ret = load_usb_restrict_popup(ad);
-               goto out;
-       }
-
-       ret = -EINVAL;
-
-out:
-       if (ret < 0)
-               popup_terminate();
-       return ret;
-}
-
-int main(int argc, char *argv[])
-{
-
-       struct appdata ad;
-       struct appcore_ops ops = {
-               .create = __app_create,
-               .terminate = __app_terminate,
-               .pause = __app_pause,
-               .resume = __app_resume,
-               .reset = __app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-
-       ops.data = &ad;
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/usb-popup/src/usb-syspopup.h b/usb-popup/src/usb-syspopup.h
deleted file mode 100644 (file)
index 6c1327c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * usb-syspopup
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * 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 __SYSPOPUP_APP_H__
-#define __SYSPOPUP_APP_H__
-
-#include <syspopup.h>
-#include <glib.h>
-
-typedef enum {
-       /* General */
-       ERROR_POPUP_OK_BTN = 0,
-       IS_EMUL_BIN,
-
-} REQUEST_TO_USB_MANGER;
-
-#endif                   /* __SYSPOPUP_APP_H__ */
-
diff --git a/usbotg-popup/CMakeLists.txt b/usbotg-popup/CMakeLists.txt
deleted file mode 100755 (executable)
index b714427..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(SRCS src/usbotg-syspopup.c
-                ${CMAKE_SOURCE_DIR}/share/common.c)
-
-SET(VENDOR "tizen")
-SET(PACKAGE "usbotg-syspopup")
-SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
-SET(PREFIX "${CMAKE_INSTALL_PREFIX}/apps/${PKGNAME}")
-SET(BINDIR "${PREFIX}/bin")
-SET(RESDIR "${PREFIX}/res")
-SET(LOCALEDIR "${RESDIR}/locale")
-SET(MANIFESTDIR "${CMAKE_INSTALL_PREFIX}/share/packages")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/share)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
-                       appcore-efl
-                       elementary
-                       syspopup
-                       syspopup-caller
-                       ecore-evas
-                       vconf
-                       appsvc
-                       dlog
-                       deviced)
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O2 -g -Wall")
-
-ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
-
-ADD_EXECUTABLE(${PACKAGE} ${SRCS})
-TARGET_LINK_LIBRARIES(${PACKAGE} syspopup ${pkgs_LDFLAGS})
-
-INSTALL(TARGETS ${PACKAGE} DESTINATION ${BINDIR})
-
-# install icon
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/usb_icon.png DESTINATION ${RESDIR}/icons/)
-
-# install manifest xml file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PKGNAME}.xml DESTINATION ${MANIFESTDIR})
-
-# install smack efl file
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
diff --git a/usbotg-popup/src/usbotg-syspopup.c b/usbotg-popup/src/usbotg-syspopup.c
deleted file mode 100755 (executable)
index 9c14340..0000000
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- * usbotg-syspopup
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * 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 <stdio.h>
-#include <appcore-efl.h>
-#include <assert.h>
-#include "usbotg-syspopup.h"
-#include <Ecore_X.h>
-#include <appsvc.h>
-#include <syspopup.h>
-#include <vconf.h>
-#include <dd-display.h>
-#include "common.h"
-
-#include <string.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#define SOCK_PATH "/tmp/usb_server_sock"
-#define SOCK_STR_LEN 1542
-#define UNMOUNT_USB_STORAGE 60
-
-#define SYSPOPUP_CONTENT     "_SYSPOPUP_CONTENT_"
-#define SYSPOPUP_DEVICE_PATH "_DEVICE_PATH_"
-
-#define USB_MOUNT_PATH   "/opt/storage/usb"
-#define MYFILE_APP_NAME  "org.tizen.myfile"
-#define GALLERY_APP_NAME "org.tizen.gallery"
-
-#define STORAGE_ADD      "storage_add"
-#define STORAGE_REMOVE   "storage_remove"
-#define STORAGE_UNMOUNT  "storage_unmount"
-#define CAMERA_ADD       "camera_add"
-#define CAMERA_REMOVE    "camera_remove"
-
-/* IPC with dbus */
-#define BUS_NAME_PREFIX           "org.tizen.usb"
-#define OBJECT_PATH_PREFIX        "/Org/Tizen/Usb"
-
-/* IPC to request something to usb-manager */
-#define REQUEST_BUS_NAME           BUS_NAME_PREFIX".request"
-#define REQUEST_OBJECT_PATH        OBJECT_PATH_PREFIX"/Request"
-#define REQUEST_INTERFACE_NAME     REQUEST_BUS_NAME
-#define REQUEST_SIGNAL_NAME        "usb_request"
-#define REQUEST_UNMOUNT_STORAGE    "unmount_storage"
-
-#define DEVICED_PATH      "/Org/Tizen/System/DeviceD"
-#define DEVICED_IFACE     "org.tizen.system.deviced"
-#define DEVICED_PATH_USBHOST    DEVICED_PATH"/Usbhost"
-#define DEVICED_IFACE_USBHOST   DEVICED_IFACE".Usbhost"
-#define SIGNAL_NAME_UNMOUNT     "unmount_storage"
-
-static void uosp_free_evas_object(Evas_Object **eo)
-{
-       assert(eo);
-       if (!(*eo)) return;
-       evas_object_del(*eo);
-       *eo = NULL;
-}
-
-static void unload_window(struct appdata *ad)
-{
-       assert(ad);
-       if (ad->storage_added_popup || ad->storage_unmount_popup || ad->camera_added_popup) {
-               _D("More than one popup is loaded");
-               return;
-       }
-
-       _D("unload window");
-       uosp_free_evas_object(&(ad->win_main));
-       popup_terminate();
-}
-
-static void uosp_usbhost_chgdet_cb(keynode_t *keynode, void *data)
-{
-       assert(keynode);
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-       int usb_status;
-
-       usb_status = vconf_keynode_get_int(keynode);
-       if (usb_status == VCONFKEY_SYSMAN_USB_HOST_DISCONNECTED) {
-               _D("USB host is not connected");
-               unload_window(ad);
-       }
-}
-
-/* App init */
-static int app_create(void *data)
-{
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-
-       ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_HOST_STATUS,
-                                       uosp_usbhost_chgdet_cb, ad);
-       if (0 != ret) {
-               _E("FAIL: vconf_notify_key_changed()");
-               return -1;
-       }
-
-       /* init internationalization */
-       if (0 !=  appcore_set_i18n(LANG_DOMAIN, LOCALE_DIR)) {
-               _E("FAIL: appcore_set_i18n(PACKAGE, LOCALEDIR)");
-               return -1;
-       }
-
-       return 0;
-}
-
-/* Terminate noti handler */
-static int app_terminate(void *data)
-{
-       struct appdata *ad = data;
-       int ret;
-
-       ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_HOST_STATUS, uosp_usbhost_chgdet_cb);
-       if (0 != ret) _E("FAIL: vconf_ignore_key_changed()");
-
-       uosp_free_evas_object(&(ad->storage_added_popup));
-       uosp_free_evas_object(&(ad->storage_unmount_popup));
-       uosp_free_evas_object(&(ad->camera_added_popup));
-       FREE(ad->storage_added_path);
-       FREE(ad->storage_unmount_path);
-
-       return 0;
-}
-
-/* Pause/background */
-static int app_pause(void *data)
-{
-       return 0;
-}
-
-/* Resume */
-static int app_resume(void *data)
-{
-       return 0;
-}
-
-static void storage_browse_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-       bundle *b;
-
-       uosp_free_evas_object(&(ad->storage_added_popup));
-
-       b = bundle_create();
-       appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
-       if (ad->storage_added_path) {
-               appsvc_add_data(b, "path", ad->storage_added_path);
-       } else {
-               appsvc_add_data(b, "path", USB_MOUNT_PATH);
-       }
-       appsvc_set_pkgname(b, MYFILE_APP_NAME);
-       ret = appsvc_run_service(b, 0, NULL, (void*)NULL);
-       if (ret < 0)
-               _D("app launching fail(%d)", ret);
-       bundle_free(b);
-
-       FREE(ad->storage_added_path);
-       unload_window(ad);
-}
-
-static void storage_unmount_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-
-       struct appdata *ad = (struct appdata *)data;
-       int ret;
-       char *param[1];
-
-       uosp_free_evas_object(&(ad->storage_unmount_popup));
-
-       param[0] = ad->storage_unmount_path;
-
-       ret = broadcast_dbus_signal(DEVICED_PATH_USBHOST,
-                       DEVICED_IFACE_USBHOST,
-                       SIGNAL_NAME_UNMOUNT, "s", param);
-       if (ret < 0)
-               _E("FAIL: broadcast_dbus_signal()");
-
-       FREE(ad->storage_unmount_path);
-       unload_window(ad);
-}
-
-static void camera_browse_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-
-       struct appdata *ad = (struct appdata *)data;
-       bundle *b;
-       int ret;
-
-       uosp_free_evas_object(&(ad->camera_added_popup));
-
-       b = bundle_create();
-       appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
-       appsvc_add_data(b, "album-id", "GALLERY_ALBUM_PTP_ID");
-       appsvc_set_pkgname(b, GALLERY_APP_NAME);
-       ret = appsvc_run_service(b, 0, NULL, (void*)NULL);
-       if (ret < 0)
-               _D("app launching fail(%d)", ret);
-       bundle_free(b);
-
-       unload_window(ad);
-}
-
-static void storage_browse_cancel_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-
-       uosp_free_evas_object(&(ad->storage_added_popup));
-       FREE(ad->storage_added_path);
-       unload_window(ad);
-}
-
-static void storage_unmount_cancel_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-
-       uosp_free_evas_object(&(ad->storage_unmount_popup));
-       FREE(ad->storage_unmount_path);
-       unload_window(ad);
-}
-
-static void camera_browse_cancel_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
-       assert(data);
-       struct appdata *ad = (struct appdata *)data;
-
-       uosp_free_evas_object(&(ad->camera_added_popup));
-       unload_window(ad);
-}
-
-static int load_usbotg_popup(struct appdata *ad,
-                               bundle *b,
-                               Evas_Object **popup,
-                               char *title,
-                               char *mainText,
-                               char *lbtnText,
-                               Evas_Smart_Cb lbtn_cb,
-                               char *rbtnText,
-                               Evas_Smart_Cb rbtn_cb)
-{
-       assert(ad && b && popup && mainText && lbtnText && lbtn_cb && rbtnText && rbtn_cb);
-
-       Evas_Object *btn1;
-       Evas_Object *btn2;
-       Evas_Object *win;
-       syspopup_handler handler = {
-               .def_term_fn = NULL,
-               .def_timeout_fn = NULL
-       };
-
-       /* create window */
-       if (!(ad->win_main)) {
-               win = create_win(PACKAGE);
-               if (win == NULL) {
-                       _E("FAIL: create_win()");
-                       return -1;
-               }
-               ad->win_main = win;
-               if (syspopup_create(b, &handler, ad->win_main, ad) != 0) {
-                       _E("FAIL: syspopup_create()");
-                       return -1;
-               }
-       }
-
-       evas_object_show(ad->win_main);
-
-       *popup = elm_popup_add(ad->win_main);
-       evas_object_size_hint_weight_set(*popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_text_set(*popup, mainText);
-
-       if (title)
-               elm_object_part_text_set(*popup, "title,text", title);
-
-       btn1 = elm_button_add(*popup);
-       elm_object_text_set(btn1, lbtnText);
-       elm_object_style_set(btn1, "popup_button/default");
-       elm_object_part_content_set(*popup, "button1", btn1);
-       evas_object_smart_callback_add(btn1, "clicked", lbtn_cb, ad);
-
-       btn2 = elm_button_add(*popup);
-       elm_object_text_set(btn2, rbtnText);
-       elm_object_style_set(btn2, "popup_button/default");
-       elm_object_part_content_set(*popup, "button2", btn2);
-       evas_object_smart_callback_add(btn2, "clicked", rbtn_cb, ad);
-
-       evas_object_show(*popup);
-
-       return 0;
-}
-
-static void load_storage_added_popup(struct appdata *ad, bundle *b)
-{
-       assert(ad);
-       assert(b);
-       int ret;
-       char *path;
-
-       uosp_free_evas_object(&(ad->storage_added_popup));
-       FREE(ad->storage_added_path);
-
-       path = (char *)(bundle_get_val(b, SYSPOPUP_DEVICE_PATH));
-       if (!path) return;
-       _D("storage_added_path: %s", path);
-
-       ret = load_usbotg_popup(ad, b, &(ad->storage_added_popup),
-                       _("IDS_ST_BODY_USB_STORAGE_ABB"),
-                       _("IDS_USB_BODY_BROWSE_STORAGE_CONNECTED_VIA_USB_Q"),
-                       _("IDS_COM_SK_CANCEL"), storage_browse_cancel_clicked_cb,
-                       _("IDS_BT_SK_BROWSE"), storage_browse_clicked_cb);
-       if (ret < 0) {
-               _E("FAIL: load_usbotg_popup(storage_added)");
-               unload_window(ad);
-               return;
-       }
-
-       ad->storage_added_path = strdup(path);
-}
-
-static void load_storage_unmount_popup(struct appdata *ad, bundle *b)
-{
-       assert(ad);
-       assert(b);
-       int ret;
-       char *path;
-
-       uosp_free_evas_object(&(ad->storage_unmount_popup));
-       FREE(ad->storage_unmount_path);
-
-       path = (char *)(bundle_get_val(b, SYSPOPUP_DEVICE_PATH));
-       if (!path) return;
-       _D("unmount_path: %s", path);
-
-       /* If unmount path is same as storage_added_path, unload storage_added_popup */
-       if (ad->storage_added_path
-               && !strncmp(path, ad->storage_added_path, strlen(ad->storage_added_path))) {
-               uosp_free_evas_object(&(ad->storage_added_popup));
-               FREE(ad->storage_added_path);
-       }
-
-       ret = load_usbotg_popup(ad, b, &(ad->storage_unmount_popup),
-                       _("IDS_ST_BODY_USB_STORAGE_ABB"),
-                       _("IDS_COM_POP_UNMOUNT_USB_MASS_STORAGE_BEFORE_REMOVING_TO_AVOID_DATA_LOSS"),
-                       _("IDS_COM_SK_CANCEL"), storage_unmount_cancel_clicked_cb,
-                       _("IDS_USB_BUTTON_UNMOUNT"), storage_unmount_clicked_cb);
-       if (ret < 0) {
-               _E("FAIL: load_usbotg_popup(storage_unmount)");
-               unload_window(ad);
-       }
-
-       ad->storage_unmount_path = strdup(path);
-}
-
-static void load_camera_added_popup(struct appdata *ad, bundle *b)
-{
-       assert(ad);
-       assert(b);
-       int ret;
-
-       uosp_free_evas_object(&(ad->camera_added_popup));
-
-       ret = load_usbotg_popup(ad, b, &(ad->camera_added_popup),
-                       _("IDS_CAM_HEADER_CAMERA_M_APPLICATION"),
-                       _("IDS_USB_BODY_BROWSE_CAMERA_CONNECTED_VIA_USB_Q"),
-                       _("IDS_COM_SK_CANCEL"), camera_browse_cancel_clicked_cb,
-                       _("IDS_BT_SK_BROWSE"), camera_browse_clicked_cb);
-       if (ret < 0) {
-               _E("FAIL: load_usbotg_popup(storage_unmount)");
-               unload_window(ad);
-       }
-}
-
-static void unload_storage_added_unmount_popup(struct appdata *ad, bundle *b)
-{
-       assert(ad);
-       assert(b);
-       char *path;
-
-       path = (char *)(bundle_get_val(b, SYSPOPUP_DEVICE_PATH));
-       _D("removed_path: %s", path);
-       if (!path) return;
-
-       if (NULL == ad->storage_added_path
-               || !strncmp(path, ad->storage_added_path, strlen(ad->storage_added_path))) {
-               uosp_free_evas_object(&(ad->storage_added_popup));
-               FREE(ad->storage_added_path);
-       }
-
-       if (NULL == ad->storage_unmount_path
-               || !strncmp(path, ad->storage_unmount_path, strlen(ad->storage_unmount_path))) {
-               uosp_free_evas_object(&(ad->storage_unmount_popup));
-               FREE(ad->storage_unmount_path);
-       }
-
-       unload_window(ad);
-}
-
-/* Reset */
-static int app_reset(bundle *b, void *data)
-{
-       assert(data);
-       assert(b);
-
-       struct appdata *ad = (struct appdata *)data;
-       const char *opt = bundle_get_val(b, SYSPOPUP_CONTENT);
-       if (!opt) {
-               _E("FAIL: bundle_get_val()");
-               unload_window(ad);
-               return 0;
-       }
-
-       if (syspopup_has_popup(b)) {
-               _D("usbotg-syspopup is already loaded");
-               syspopup_reset(b);
-       }
-
-       if (set_display_feedback(-1) < 0)
-               _E("Failed to set display");
-
-       if (!strcmp(opt, STORAGE_ADD)) {
-               load_storage_added_popup(ad, b);
-                       return 0;
-       }
-
-       if (!strcmp(opt, STORAGE_REMOVE)) {
-               unload_storage_added_unmount_popup(ad, b);
-                       return 0;
-       }
-
-       if (!strcmp(opt, STORAGE_UNMOUNT)) {
-               load_storage_unmount_popup(ad, b);
-                       return 0;
-       }
-
-       if (!strcmp(opt, CAMERA_ADD)) {
-               load_camera_added_popup(ad, b);
-                       return 0;
-       }
-
-       if (!strcmp(opt, CAMERA_REMOVE)) {
-               uosp_free_evas_object(&(ad->camera_added_popup));
-               unload_window(ad);
-                       return 0;
-       }
-
-       _E("FAIL: popup type is %s", opt);
-       return -1;
-}
-
-int main(int argc, char *argv[])
-{
-       struct appdata ad;
-
-       /* App life cycle management */
-       struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
-               .pause = app_pause,
-               .resume = app_resume,
-               .reset = app_reset,
-       };
-
-       memset(&ad, 0x0, sizeof(struct appdata));
-       ops.data = &ad;
-
-       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
-}
diff --git a/usbotg-popup/src/usbotg-syspopup.h b/usbotg-popup/src/usbotg-syspopup.h
deleted file mode 100644 (file)
index cee996e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * usbotg-syspopup
- * Copyright (c) 2012 Samsung Electronics Co., Ltd.
- *
- * 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 __USBOTG_SYSPOPUP_H___
-#define __USBOTG_SYSPOPUP_H__
-
-#include <Elementary.h>
-
-typedef enum {
-       POPUP_NONE = 0x0,
-       STORAGE_ADDED_POPUP = 0x1,
-       STORAGE_UNMOUNT_POPUP = 0x4,
-       CAMERA_ADDED_POPUP = 0x8
-} USBOTG_SYSPOPUP_TYPE;
-
-typedef enum {
-       STORAGE_ADDED_PATH = 0x1,
-       STORAGE_REMOVED_PATH = 0x2,
-       STORAGE_UNMOUNT_PATH = 0x4
-} USBOTG_STORAGE_PATH;
-
-#endif                         /* __USBOTG_SYSPOPUP_H__ */