From: jy910.yun Date: Tue, 2 Jul 2013 09:58:07 +0000 (+0900) Subject: remove the build dependency btw system-server and libsvi X-Git-Tag: submit/tizen_2.2/20130702.095906^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9f116585bd0f0a664aba76455e7be4186a4eda1;p=platform%2Fcore%2Fsystem%2Fsystem-server.git remove the build dependency btw system-server and libsvi sys_device_noti directory moved into system-popup Signed-off-by: jy910.yun --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 21f7a99..f5b867d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,5 +115,4 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/system-server.socket DESTINAT ADD_SUBDIRECTORY(restarter) ADD_SUBDIRECTORY(sys_event) -ADD_SUBDIRECTORY(sys_device_noti) ADD_SUBDIRECTORY(sys_pci_noti) diff --git a/packaging/system-server.spec b/packaging/system-server.spec index ea44a98..80809bb 100755 --- a/packaging/system-server.spec +++ b/packaging/system-server.spec @@ -152,16 +152,13 @@ systemctl daemon-reload %endif %{_bindir}/movi_format.sh %{_bindir}/sys_event -%{_bindir}/sys_device_noti %{_bindir}/sys_pci_noti %{_bindir}/mmc-smack-label %{_libdir}/systemd/system/multi-user.target.wants/system-server.service %{_libdir}/systemd/system/sockets.target.wants/system-server.socket %{_libdir}/systemd/system/system-server.service %{_libdir}/systemd/system/system-server.socket -%{_datadir}/system-server/sys_device_noti/batt_full_icon.png %{_datadir}/system-server/udev-rules/91-system-server.rules -%{_datadir}/system-server/sys_device_noti/res/locale/*/LC_MESSAGES/*.mo %{_datadir}/system-server/sys_pci_noti/res/locale/*/LC_MESSAGES/*.mo %files -n libdeviced diff --git a/ss_device_change_handler.c b/ss_device_change_handler.c index f9c77ea..08e1594 100755 --- a/ss_device_change_handler.c +++ b/ss_device_change_handler.c @@ -36,7 +36,6 @@ #include "device-node.h" #include "ss_noti.h" #include "include/ss_data.h" -#include "sys_device_noti/sys_device_noti.h" #include "sys_pci_noti/sys_pci_noti.h" #include "ss_predefine.h" #define BUFF_MAX 255 @@ -50,6 +49,18 @@ static E_DBus_Connection *conn; #endif /* ENABLE_EDBUS_USE */ +typedef enum { + CB_NOTI_BATT_CHARGE, + CB_NOTI_BATT_LOW, + CB_NOTI_BATT_FULL, + CB_NOTI_MAX +} cb_noti_type; + +typedef enum { + CB_NOTI_OFF = 0, + CB_NOTI_ON = 1 +} cb_noti_onoff_type; + struct input_event { long dummy[2]; unsigned short type; diff --git a/ss_lowbat_handler.c b/ss_lowbat_handler.c index b091de9..62d4499 100755 --- a/ss_lowbat_handler.c +++ b/ss_lowbat_handler.c @@ -166,6 +166,7 @@ static int lowbat_process(int bat_percent, void *ad) cur_bat_capacity = new_bat_capacity; } + if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &vconf_state) < 0) { PRT_TRACE_ERR("vconf_get_int() failed"); return -1; @@ -245,6 +246,10 @@ static int lowbat_process(int bat_percent, void *ad) } } } + + if (new_bat_capacity == cur_bat_capacity) + return 0; + PRT_TRACE("[BATMON] Unknown battery state cur:%d new:%d",cur_bat_state,new_bat_state); cur_bat_state = new_bat_state; return -1; diff --git a/sys_device_noti/CMakeLists.txt b/sys_device_noti/CMakeLists.txt deleted file mode 100755 index c56d50b..0000000 --- a/sys_device_noti/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -PROJECT(sys_device_noti C) - -SET(SRCS sys_device_noti.c) -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} /usr/include/svi /usr/include/notification) - -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} "-lsvi -lnotification") - -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/batt_full_icon.png DESTINATION share/system-server/sys_device_noti) - -#i18n -ADD_SUBDIRECTORY(po_sys_device_noti) diff --git a/sys_device_noti/data/batt_full_icon.png b/sys_device_noti/data/batt_full_icon.png deleted file mode 100755 index 4245ccc..0000000 Binary files a/sys_device_noti/data/batt_full_icon.png and /dev/null differ diff --git a/sys_device_noti/po_sys_device_noti/CMakeLists.txt b/sys_device_noti/po_sys_device_noti/CMakeLists.txt deleted file mode 100644 index a08d14a..0000000 --- a/sys_device_noti/po_sys_device_noti/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# for i18n - -SET(POFILES ar.po el_GR.po es_ES.po fi.po gl.po hy.po ka.po lv.po pl.po ru_RU.po sv.po zh_CN.po az.po cs.po en_PH.po es_US.po fr_CA.po hi.po is.po kk.po mk.po pt_BR.po sk.po tr_TR.po zh_HK.po bg.po da.po en.po et.po fr_FR.po hr.po it_IT.po ko_KR.po nb.po pt_PT.po sl.po uk.po zh_SG.po ca.po de_DE.po en_US.po eu.po ga.po hu.po ja_JP.po lt.po nl_NL.po ro.po sr.po uz.po zh_TW.po) - -SET(MSGFMT "/usr/bin/msgfmt") - -FOREACH(pofile ${POFILES}) - SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}) - MESSAGE("PO: ${pofile}") - GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE) - GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE) - SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) - ADD_CUSTOM_COMMAND( - OUTPUT ${moFile} - COMMAND ${MSGFMT} -o ${moFile} ${absPofile} - DEPENDS ${absPofile} - ) - INSTALL(FILES ${moFile} - DESTINATION share/system-server/sys_device_noti/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) - SET(moFiles ${moFiles} ${moFile}) -ENDFOREACH(pofile) - -MESSAGE(".mo files: ${moFiles}") -ADD_CUSTOM_TARGET(po_sys_device_noti ALL DEPENDS ${moFiles}) diff --git a/sys_device_noti/po_sys_device_noti/ar.po b/sys_device_noti/po_sys_device_noti/ar.po deleted file mode 100755 index 1e20482..0000000 --- a/sys_device_noti/po_sys_device_noti/ar.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "تم شحن البطارية كاملا" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "فصل الشاحن" - diff --git a/sys_device_noti/po_sys_device_noti/az.po b/sys_device_noti/po_sys_device_noti/az.po deleted file mode 100755 index e749e15..0000000 --- a/sys_device_noti/po_sys_device_noti/az.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batareya tam doludur" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Adapteri rozetkadan çıxarın" - diff --git a/sys_device_noti/po_sys_device_noti/bg.po b/sys_device_noti/po_sys_device_noti/bg.po deleted file mode 100755 index a6af4c4..0000000 --- a/sys_device_noti/po_sys_device_noti/bg.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Батерията напълно заредена" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Изключете зарядното устройство" - diff --git a/sys_device_noti/po_sys_device_noti/ca.po b/sys_device_noti/po_sys_device_noti/ca.po deleted file mode 100755 index 61d8398..0000000 --- a/sys_device_noti/po_sys_device_noti/ca.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Bateria completament carregada" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desendollar carregador" - diff --git a/sys_device_noti/po_sys_device_noti/cs.po b/sys_device_noti/po_sys_device_noti/cs.po deleted file mode 100755 index e9f137c..0000000 --- a/sys_device_noti/po_sys_device_noti/cs.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Baterie je plně nabitá" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Odpojte nabíječku" - diff --git a/sys_device_noti/po_sys_device_noti/da.po b/sys_device_noti/po_sys_device_noti/da.po deleted file mode 100755 index b290706..0000000 --- a/sys_device_noti/po_sys_device_noti/da.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batteri fuldt opladet" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Fjern oplader" - diff --git a/sys_device_noti/po_sys_device_noti/de_DE.po b/sys_device_noti/po_sys_device_noti/de_DE.po deleted file mode 100755 index ad85846..0000000 --- a/sys_device_noti/po_sys_device_noti/de_DE.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Akku vollständig geladen" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Ladegerät entfernen" - diff --git a/sys_device_noti/po_sys_device_noti/el_GR.po b/sys_device_noti/po_sys_device_noti/el_GR.po deleted file mode 100755 index 996e1da..0000000 --- a/sys_device_noti/po_sys_device_noti/el_GR.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Μπαταρία πλήρως φορτισμένη" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Αποσύνδεση φορτιστή" - diff --git a/sys_device_noti/po_sys_device_noti/en.po b/sys_device_noti/po_sys_device_noti/en.po deleted file mode 100755 index d1c5e7b..0000000 --- a/sys_device_noti/po_sys_device_noti/en.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Battery fully charged" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Unplug charger" - diff --git a/sys_device_noti/po_sys_device_noti/en_PH.po b/sys_device_noti/po_sys_device_noti/en_PH.po deleted file mode 100755 index d1c5e7b..0000000 --- a/sys_device_noti/po_sys_device_noti/en_PH.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Battery fully charged" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Unplug charger" - diff --git a/sys_device_noti/po_sys_device_noti/en_US.po b/sys_device_noti/po_sys_device_noti/en_US.po deleted file mode 100755 index d1c5e7b..0000000 --- a/sys_device_noti/po_sys_device_noti/en_US.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Battery fully charged" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Unplug charger" - diff --git a/sys_device_noti/po_sys_device_noti/es_ES.po b/sys_device_noti/po_sys_device_noti/es_ES.po deleted file mode 100755 index fe563d5..0000000 --- a/sys_device_noti/po_sys_device_noti/es_ES.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batería totalmente cargada" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desconectar cargador" - diff --git a/sys_device_noti/po_sys_device_noti/es_US.po b/sys_device_noti/po_sys_device_noti/es_US.po deleted file mode 100755 index b99a618..0000000 --- a/sys_device_noti/po_sys_device_noti/es_US.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batería completamente cargada" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desconectar el cargador" - diff --git a/sys_device_noti/po_sys_device_noti/et.po b/sys_device_noti/po_sys_device_noti/et.po deleted file mode 100755 index 33a53bc..0000000 --- a/sys_device_noti/po_sys_device_noti/et.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Aku on laetud" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Eraldage laadija" - diff --git a/sys_device_noti/po_sys_device_noti/eu.po b/sys_device_noti/po_sys_device_noti/eu.po deleted file mode 100755 index 17a2621..0000000 --- a/sys_device_noti/po_sys_device_noti/eu.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Bateria guztiz kargatuta" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desentxufatu kargadorea" - diff --git a/sys_device_noti/po_sys_device_noti/fi.po b/sys_device_noti/po_sys_device_noti/fi.po deleted file mode 100755 index 247d9e7..0000000 --- a/sys_device_noti/po_sys_device_noti/fi.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Akku on täysin ladattu" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Irrota laturi" - diff --git a/sys_device_noti/po_sys_device_noti/fr_CA.po b/sys_device_noti/po_sys_device_noti/fr_CA.po deleted file mode 100755 index 9004f3e..0000000 --- a/sys_device_noti/po_sys_device_noti/fr_CA.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "La pile est chargée" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Débrancher le chargeur" - diff --git a/sys_device_noti/po_sys_device_noti/fr_FR.po b/sys_device_noti/po_sys_device_noti/fr_FR.po deleted file mode 100755 index 8f166dd..0000000 --- a/sys_device_noti/po_sys_device_noti/fr_FR.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batterie chargée" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Débrancher le chargeur" - diff --git a/sys_device_noti/po_sys_device_noti/ga.po b/sys_device_noti/po_sys_device_noti/ga.po deleted file mode 100755 index a984b80..0000000 --- a/sys_device_noti/po_sys_device_noti/ga.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Ceallra lánluchtaithe" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Díphlugáil an luchtaire" - diff --git a/sys_device_noti/po_sys_device_noti/gl.po b/sys_device_noti/po_sys_device_noti/gl.po deleted file mode 100755 index cd9e232..0000000 --- a/sys_device_noti/po_sys_device_noti/gl.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batería totalmente cargada" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desenchufar cargador" - diff --git a/sys_device_noti/po_sys_device_noti/hi.po b/sys_device_noti/po_sys_device_noti/hi.po deleted file mode 100755 index fcde0c3..0000000 --- a/sys_device_noti/po_sys_device_noti/hi.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "बैटरी पूरी चार्ज है।" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "चार्जर निकालें" - diff --git a/sys_device_noti/po_sys_device_noti/hr.po b/sys_device_noti/po_sys_device_noti/hr.po deleted file mode 100755 index 96d0bb3..0000000 --- a/sys_device_noti/po_sys_device_noti/hr.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Baterija puna" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Iskopčajte punjač" - diff --git a/sys_device_noti/po_sys_device_noti/hu.po b/sys_device_noti/po_sys_device_noti/hu.po deleted file mode 100755 index a4e8646..0000000 --- a/sys_device_noti/po_sys_device_noti/hu.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Az akkumulátor feltöltve" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Húzza ki a töltőt" - diff --git a/sys_device_noti/po_sys_device_noti/hy.po b/sys_device_noti/po_sys_device_noti/hy.po deleted file mode 100755 index 9a30dde..0000000 --- a/sys_device_noti/po_sys_device_noti/hy.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Մարտկոցը ամբողջովին լիցքավորված է" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Վարդակից անջատել լիցքավորիչը" - diff --git a/sys_device_noti/po_sys_device_noti/is.po b/sys_device_noti/po_sys_device_noti/is.po deleted file mode 100755 index 0d29520..0000000 --- a/sys_device_noti/po_sys_device_noti/is.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Rafhlaða fullhlaðin" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Aftengja hleðslutæki" - diff --git a/sys_device_noti/po_sys_device_noti/it_IT.po b/sys_device_noti/po_sys_device_noti/it_IT.po deleted file mode 100755 index 3094490..0000000 --- a/sys_device_noti/po_sys_device_noti/it_IT.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batteria ricaricata" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Scollega caricabatterie" - diff --git a/sys_device_noti/po_sys_device_noti/ja_JP.po b/sys_device_noti/po_sys_device_noti/ja_JP.po deleted file mode 100755 index 8c6a6ee..0000000 --- a/sys_device_noti/po_sys_device_noti/ja_JP.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "バッテリ​充電​完了" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "充電​器​を​取り​外し​て​ください。" - diff --git a/sys_device_noti/po_sys_device_noti/ka.po b/sys_device_noti/po_sys_device_noti/ka.po deleted file mode 100755 index 9bbd215..0000000 --- a/sys_device_noti/po_sys_device_noti/ka.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "კვების ელემენტი დაიტენა" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "გამორთეთ დამტენი" - diff --git a/sys_device_noti/po_sys_device_noti/kk.po b/sys_device_noti/po_sys_device_noti/kk.po deleted file mode 100755 index bd53198..0000000 --- a/sys_device_noti/po_sys_device_noti/kk.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Батарея толық зарядталған" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Зарядтағышты ажырату" - diff --git a/sys_device_noti/po_sys_device_noti/ko_KR.po b/sys_device_noti/po_sys_device_noti/ko_KR.po deleted file mode 100755 index 571b80a..0000000 --- a/sys_device_noti/po_sys_device_noti/ko_KR.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "배터리가 충전되었습니다" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "충전기 분리" - diff --git a/sys_device_noti/po_sys_device_noti/lt.po b/sys_device_noti/po_sys_device_noti/lt.po deleted file mode 100755 index d1658d1..0000000 --- a/sys_device_noti/po_sys_device_noti/lt.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Baterija visiškai įkrauta" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Atjunkite kroviklį" - diff --git a/sys_device_noti/po_sys_device_noti/lv.po b/sys_device_noti/po_sys_device_noti/lv.po deleted file mode 100755 index 432e6dd..0000000 --- a/sys_device_noti/po_sys_device_noti/lv.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Akumulators uzlādēts" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Atvienojiet lādētāju" - diff --git a/sys_device_noti/po_sys_device_noti/mk.po b/sys_device_noti/po_sys_device_noti/mk.po deleted file mode 100755 index 5df479c..0000000 --- a/sys_device_noti/po_sys_device_noti/mk.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Батеријата е наполнета" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Откачете го полначот" - diff --git a/sys_device_noti/po_sys_device_noti/nb.po b/sys_device_noti/po_sys_device_noti/nb.po deleted file mode 100755 index dec39c0..0000000 --- a/sys_device_noti/po_sys_device_noti/nb.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batteri fulladet" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Ta ut laderen" - diff --git a/sys_device_noti/po_sys_device_noti/nl_NL.po b/sys_device_noti/po_sys_device_noti/nl_NL.po deleted file mode 100755 index 4fe8d28..0000000 --- a/sys_device_noti/po_sys_device_noti/nl_NL.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "De batterij is opgeladen" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Oplader loskoppelen" - diff --git a/sys_device_noti/po_sys_device_noti/pl.po b/sys_device_noti/po_sys_device_noti/pl.po deleted file mode 100755 index 08e174a..0000000 --- a/sys_device_noti/po_sys_device_noti/pl.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Bateria w pełni naładowana" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Odłącz ładowarkę" - diff --git a/sys_device_noti/po_sys_device_noti/pt_BR.po b/sys_device_noti/po_sys_device_noti/pt_BR.po deleted file mode 100755 index 2f0d9bc..0000000 --- a/sys_device_noti/po_sys_device_noti/pt_BR.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Bateria completamente carregada" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desconectar carregador" - diff --git a/sys_device_noti/po_sys_device_noti/pt_PT.po b/sys_device_noti/po_sys_device_noti/pt_PT.po deleted file mode 100755 index 119ec91..0000000 --- a/sys_device_noti/po_sys_device_noti/pt_PT.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Bateria completamente carregada" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Desligue o carregador" - diff --git a/sys_device_noti/po_sys_device_noti/ro.po b/sys_device_noti/po_sys_device_noti/ro.po deleted file mode 100755 index 3f6a7b9..0000000 --- a/sys_device_noti/po_sys_device_noti/ro.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Baterie încărcată complet" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Deconectaţi încărcătorul" - diff --git a/sys_device_noti/po_sys_device_noti/ru_RU.po b/sys_device_noti/po_sys_device_noti/ru_RU.po deleted file mode 100755 index b26c1ee..0000000 --- a/sys_device_noti/po_sys_device_noti/ru_RU.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Аккумулятор заряжен" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Отключите зарядное устройство" - diff --git a/sys_device_noti/po_sys_device_noti/sk.po b/sys_device_noti/po_sys_device_noti/sk.po deleted file mode 100755 index 489fdc7..0000000 --- a/sys_device_noti/po_sys_device_noti/sk.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batéria je plne nabitá" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Odpojte nabíjačku" - diff --git a/sys_device_noti/po_sys_device_noti/sl.po b/sys_device_noti/po_sys_device_noti/sl.po deleted file mode 100755 index a8fa525..0000000 --- a/sys_device_noti/po_sys_device_noti/sl.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Baterija je polna" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Izklopite napajalnik" - diff --git a/sys_device_noti/po_sys_device_noti/sr.po b/sys_device_noti/po_sys_device_noti/sr.po deleted file mode 100755 index 59c217b..0000000 --- a/sys_device_noti/po_sys_device_noti/sr.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Baterija skroz napunjena" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Otkači punjač" - diff --git a/sys_device_noti/po_sys_device_noti/sv.po b/sys_device_noti/po_sys_device_noti/sv.po deleted file mode 100755 index d4ecc45..0000000 --- a/sys_device_noti/po_sys_device_noti/sv.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batteriet fulladdat" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Ta ut laddaren" - diff --git a/sys_device_noti/po_sys_device_noti/tr_TR.po b/sys_device_noti/po_sys_device_noti/tr_TR.po deleted file mode 100755 index d1fe727..0000000 --- a/sys_device_noti/po_sys_device_noti/tr_TR.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Pil tümüyle şarj oldu" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Şarjı fişten çekin" - diff --git a/sys_device_noti/po_sys_device_noti/uk.po b/sys_device_noti/po_sys_device_noti/uk.po deleted file mode 100755 index 1548d19..0000000 --- a/sys_device_noti/po_sys_device_noti/uk.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Батарею заряджено повністю" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Відключіть зарядний пристрій" - diff --git a/sys_device_noti/po_sys_device_noti/uz.po b/sys_device_noti/po_sys_device_noti/uz.po deleted file mode 100755 index 084b6d3..0000000 --- a/sys_device_noti/po_sys_device_noti/uz.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "Batareya to‘la zaryadlandi" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "Zaryadlash qurilmasini chiqaring" - diff --git a/sys_device_noti/po_sys_device_noti/zh_CN.po b/sys_device_noti/po_sys_device_noti/zh_CN.po deleted file mode 100755 index 4a7a468..0000000 --- a/sys_device_noti/po_sys_device_noti/zh_CN.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "电池已满" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "拔下充电器" - diff --git a/sys_device_noti/po_sys_device_noti/zh_HK.po b/sys_device_noti/po_sys_device_noti/zh_HK.po deleted file mode 100755 index 8ec1bbd..0000000 --- a/sys_device_noti/po_sys_device_noti/zh_HK.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "電池已完全充電" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "拔除充電器" - diff --git a/sys_device_noti/po_sys_device_noti/zh_SG.po b/sys_device_noti/po_sys_device_noti/zh_SG.po deleted file mode 100755 index d5a0fdc..0000000 --- a/sys_device_noti/po_sys_device_noti/zh_SG.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "充电完毕" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "拔下充电器" - diff --git a/sys_device_noti/po_sys_device_noti/zh_TW.po b/sys_device_noti/po_sys_device_noti/zh_TW.po deleted file mode 100755 index 49325b9..0000000 --- a/sys_device_noti/po_sys_device_noti/zh_TW.po +++ /dev/null @@ -1,6 +0,0 @@ -msgid "IDS_IDLE_POP_BATTERY_FULLY_CAHRGED" -msgstr "電池已完全充電" - -msgid "IDS_QP_BODY_UNPLUG_CHARGER" -msgstr "斷開充電器" - diff --git a/sys_device_noti/sys_device_noti.c b/sys_device_noti/sys_device_noti.c deleted file mode 100755 index 2d5bf97..0000000 --- a/sys_device_noti/sys_device_noti.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 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 -#include -#include -#include -#include -#include -#include -#include -#include "ss_log.h" -#include "sys_device_noti.h" - -#define BATTERY_FULL_ICON_PATH "/usr/share/system-server/sys_device_noti/batt_full_icon.png" -#define DEV_NOTI_LOCALE_DIR "/usr/share/system-server/sys_device_noti/res/locale" -#define DEV_NOTI_PACKAGE_NAME "sys_device_noti" - -static int battery_full_noti(int bNoti) -{ - char *lang; - char *r; - int charge_full = bNoti; - - notification_h noti = NULL; - notification_error_e noti_err = NOTIFICATION_ERROR_NONE; - - if (charge_full == 1) { - lang = vconf_get_str(VCONFKEY_LANGSET); - if (lang) { - setenv("LANG", lang, 1); - setenv("LC_MESSAGES", lang, 1); - r = setlocale(LC_ALL, ""); - if (r == NULL) { - setlocale(LC_ALL, lang); - } - free(lang); - } - bindtextdomain(DEV_NOTI_PACKAGE_NAME,DEV_NOTI_LOCALE_DIR); - textdomain(DEV_NOTI_PACKAGE_NAME); - noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI); - PRT_TRACE("[BAT_FULL_NOTI] add notification for battery full\n"); - - noti = notification_new (NOTIFICATION_TYPE_NOTI, - NOTIFICATION_GROUP_ID_NONE, - NOTIFICATION_PRIV_ID_NONE); - if (noti == NULL) { - PRT_TRACE("[BAT_FULL_NOTI] Errot noti == NULL\n"); - return -1; - } - - noti_err = notification_set_text_domain(noti, DEV_NOTI_PACKAGE_NAME, DEV_NOTI_LOCALE_DIR); - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] set text domain\n"); - goto NOTI_MEM_FREE; - } - - noti_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 (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_title : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_set_text (noti, - NOTIFICATION_TEXT_TYPE_CONTENT, - _("IDS_QP_BODY_UNPLUG_CHARGER"), - "IDS_QP_BODY_UNPLUG_CHARGER", - NOTIFICATION_VARIABLE_TYPE_NONE); - - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_content : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_set_text (noti, - NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF, - _("IDS_QP_BODY_UNPLUG_CHARGER"), - "IDS_QP_BODY_UNPLUG_CHARGER", - NOTIFICATION_VARIABLE_TYPE_NONE); - - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_content : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_set_time(noti, time(NULL)); - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_time : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, BATTERY_FULL_ICON_PATH); - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_image : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_set_property (noti, - NOTIFICATION_PROP_DISABLE_APP_LAUNCH - | NOTIFICATION_PROP_DISABLE_TICKERNOTI - | NOTIFICATION_PROP_VOLATILE_DISPLAY); - - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_property : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY); - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_set_display_applist : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_insert(noti, NULL); - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_insert : %d\n", noti_err); - goto NOTI_MEM_FREE; - } - - noti_err = notification_free(noti); - if (noti_err != NOTIFICATION_ERROR_NONE) { - PRT_TRACE("[BAT_FULL_NOTI] Error notification_free : %d\n", noti_err); - return -1; - } - pm_change_state(LCD_NORMAL); - } else { - noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI); - PRT_TRACE("[BAT_FULL_NOTI] Leave battery full status\n"); - } - - return 0; - -NOTI_MEM_FREE: - noti_err = notification_free(noti); - if (noti_err != NOTIFICATION_ERROR_NONE) - PRT_TRACE("[BAT_FULL_NOTI] Error notification_free : %d\n", noti_err); - return -1; -} -int main(int argc, char *argv[]) -{ - int r; - int handle = 0; - int bNoti = -1; - sound_type snd = -1; - vibration_type vib = -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 CB_NOTI_BATT_CHARGE: - vib = SVI_VIB_OPERATION_CHARGERCONN; - snd = SVI_SND_OPERATION_CHARGERCONN; - break; - case CB_NOTI_BATT_FULL: - battery_full_noti(bNoti); - if (bNoti == 1) { - vib = SVI_VIB_OPERATION_FULLCHARGED; - snd = SVI_SND_OPERATION_FULLCHARGED; - break; - } else - return 0; - default: - PRT_TRACE("sys_device_noti cb_type error(%d)",cb_type); - break; - } - - r = svi_init(&handle); /* Initialize SVI */ - - if (r != SVI_SUCCESS) { - PRT_TRACE("Cannot initialize SVI.\n"); - } else { - r = svi_play(handle, vib, snd); - if (r != SVI_SUCCESS) - PRT_TRACE("Cannot play sound or vibration.\n"); - - r = svi_fini(handle); /* Finalize SVI */ - if (r != SVI_SUCCESS) - PRT_TRACE("Cannot close SVI.\n"); - } - - return 0; -} diff --git a/sys_device_noti/sys_device_noti.h b/sys_device_noti/sys_device_noti.h deleted file mode 100755 index 213335a..0000000 --- a/sys_device_noti/sys_device_noti.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 __SYS_DEVICE_NOTI_H__ -#define __SYS_DEVICE_NOTI_H__ - -#ifndef _ -#define _(str) gettext(str) -#endif - -#ifndef gettext_noop -#define gettext_noop(str) (str) -#endif - -#ifndef N_ -#define N_(str) gettext_noop(str) -#endif - -typedef enum { - CB_NOTI_BATT_CHARGE, - CB_NOTI_BATT_LOW, - CB_NOTI_BATT_FULL, - CB_NOTI_MAX -} cb_noti_type; - -typedef enum { - CB_NOTI_OFF = 0, - CB_NOTI_ON = 1 -} cb_noti_onoff_type; - -#endif /* __SYS_DEVICE__NOTI_H__ */