From: giyeol.ok Date: Mon, 12 Nov 2012 06:57:06 +0000 (+0900) Subject: insert pci change notification X-Git-Tag: submit/tizen_2.2/20130714.154253~7^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d0a5860342f1556b2a3eff2fc43fa5512a630f0;p=framework%2Fsystem%2Fsystem-server.git insert pci change notification Change-Id: I146867b4bc1b0100659188ff953424bd00865d8b --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ade278..91c6fe0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,3 +77,4 @@ INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/system_server.sh DESTINATION /etc/rc.d/init 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 b182acc..c14f1a7 100755 --- a/packaging/system-server.spec +++ b/packaging/system-server.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/s/system-server system-server 0.1.51 56e16bca39f96d6c8aed9ed3df2fea9b393801be Name: system-server Summary: System server -Version: 0.1.53 +Version: 0.1.54 Release: 1 Group: TO_BE/FILLED_IN License: Flora Software License @@ -101,9 +101,11 @@ fi %{_bindir}/movi_format.sh %{_bindir}/sys_event %{_bindir}/sys_device_noti +%{_bindir}/sys_pci_noti %{_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 %{_sysconfdir}/rc.d/init.d/system_server.sh %{_sysconfdir}/rc.d/rc3.d/S35system-server %{_sysconfdir}/rc.d/rc5.d/S00system-server diff --git a/ss_device_change_handler.c b/ss_device_change_handler.c index 44541ed..8baac08 100755 --- a/ss_device_change_handler.c +++ b/ss_device_change_handler.c @@ -37,6 +37,7 @@ #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" #define BUFF_MAX 255 #define SYS_CLASS_INPUT "/sys/class/input" @@ -314,6 +315,25 @@ static void usb_host_add_cb() PRT_TRACE("EXIT: usb_host_add_cb()\n"); } +static void pci_keyboard_add_cb(struct ss_main_data *ad) +{ + char params[BUFF_MAX]; + PRT_TRACE("pci- keyboard inserted\n"); + pm_change_state(LCD_NORMAL); + + snprintf(params, sizeof(params), "%d", CB_NOTI_PCI_INSERTED); + ss_launch_if_noexist("/usr/bin/sys_pci_noti", params); + +} +static void pci_keyboard_remove_cb(struct ss_main_data *ad) +{ + char params[BUFF_MAX]; + PRT_TRACE("pci- keyboard removed\n"); + pm_change_state(LCD_NORMAL); + + snprintf(params, sizeof(params), "%d", CB_NOTI_PCI_REMOVED); + ss_launch_if_noexist("/usr/bin/sys_pci_noti", params); +} int ss_device_change_init(struct ss_main_data *ad) { /* for simple noti change cb */ @@ -332,6 +352,9 @@ int ss_device_change_init(struct ss_main_data *ad) ss_noti_add("unmount_ums", (void *)ums_unmount_cb, NULL); ss_noti_add("device_charge_chgdet", (void *)charge_cb, (void *)ad); + ss_noti_add("device_pci_keyboard_add", (void *)pci_keyboard_add_cb, (void *)ad); + ss_noti_add("device_pci_keyboard_remove", (void *)pci_keyboard_remove_cb, (void *)ad); + if (vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_HOST_STATUS, usb_host_chgdet_cb, NULL) < 0) { PRT_TRACE_ERR("vconf key notify failed(VCONFKEY_SYSMAN_USB_HOST_STATUS)"); } diff --git a/sys_pci_noti/CMakeLists.txt b/sys_pci_noti/CMakeLists.txt new file mode 100755 index 0000000..964f5a4 --- /dev/null +++ b/sys_pci_noti/CMakeLists.txt @@ -0,0 +1,30 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(sys_pci_noti C) + +SET(SRCS sys_pci_noti.c) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + +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) + +#i18n +ADD_SUBDIRECTORY(po_sys_pci_noti) diff --git a/sys_pci_noti/po_sys_pci_noti/CMakeLists.txt b/sys_pci_noti/po_sys_pci_noti/CMakeLists.txt new file mode 100644 index 0000000..5b1ca07 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/CMakeLists.txt @@ -0,0 +1,24 @@ +# 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_pci_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_pci_noti ALL DEPENDS ${moFiles}) diff --git a/sys_pci_noti/po_sys_pci_noti/ar.po b/sys_pci_noti/po_sys_pci_noti/ar.po new file mode 100755 index 0000000..8e8ecef --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ar.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "تم توصيل لوحة المفاتيح" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "تم فصل لوحة المفاتيح" + diff --git a/sys_pci_noti/po_sys_pci_noti/az.po b/sys_pci_noti/po_sys_pci_noti/az.po new file mode 100755 index 0000000..09395e4 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/az.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klaviatura qoşuldu" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klaviatura ilə əlaqə kəsildi" + diff --git a/sys_pci_noti/po_sys_pci_noti/bg.po b/sys_pci_noti/po_sys_pci_noti/bg.po new file mode 100755 index 0000000..0490340 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/bg.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Клавиатурата е свързана" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Връзката с клав. е прекъсната" + diff --git a/sys_pci_noti/po_sys_pci_noti/ca.po b/sys_pci_noti/po_sys_pci_noti/ca.po new file mode 100755 index 0000000..b67689d --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ca.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teclat connectat" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teclat desconnectat" + diff --git a/sys_pci_noti/po_sys_pci_noti/cs.po b/sys_pci_noti/po_sys_pci_noti/cs.po new file mode 100755 index 0000000..4f34a72 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/cs.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klávesnice byla připojena" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klávesnice byla odpojena" + diff --git a/sys_pci_noti/po_sys_pci_noti/da.po b/sys_pci_noti/po_sys_pci_noti/da.po new file mode 100755 index 0000000..4e27dc2 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/da.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastatur tilsluttet" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastatur frakoblet" + diff --git a/sys_pci_noti/po_sys_pci_noti/de_DE.po b/sys_pci_noti/po_sys_pci_noti/de_DE.po new file mode 100755 index 0000000..6f0b207 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/de_DE.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastatur verbunden" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastatur getrennt" + diff --git a/sys_pci_noti/po_sys_pci_noti/el_GR.po b/sys_pci_noti/po_sys_pci_noti/el_GR.po new file mode 100755 index 0000000..c0835cc --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/el_GR.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Συνδέθηκε πληκτρολόγιο" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Το πληκτρολόγιο αποσυνδέθηκε" + diff --git a/sys_pci_noti/po_sys_pci_noti/en.po b/sys_pci_noti/po_sys_pci_noti/en.po new file mode 100755 index 0000000..724f9d7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/en.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Keyboard connected" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Keyboard disconnected" + diff --git a/sys_pci_noti/po_sys_pci_noti/en_PH.po b/sys_pci_noti/po_sys_pci_noti/en_PH.po new file mode 100755 index 0000000..724f9d7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/en_PH.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Keyboard connected" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Keyboard disconnected" + diff --git a/sys_pci_noti/po_sys_pci_noti/en_US.po b/sys_pci_noti/po_sys_pci_noti/en_US.po new file mode 100755 index 0000000..724f9d7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/en_US.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Keyboard connected" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Keyboard disconnected" + diff --git a/sys_pci_noti/po_sys_pci_noti/es_ES.po b/sys_pci_noti/po_sys_pci_noti/es_ES.po new file mode 100755 index 0000000..cc8dfc7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/es_ES.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teclado conectado" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teclado desconectado" + diff --git a/sys_pci_noti/po_sys_pci_noti/es_US.po b/sys_pci_noti/po_sys_pci_noti/es_US.po new file mode 100755 index 0000000..cc8dfc7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/es_US.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teclado conectado" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teclado desconectado" + diff --git a/sys_pci_noti/po_sys_pci_noti/et.po b/sys_pci_noti/po_sys_pci_noti/et.po new file mode 100755 index 0000000..cb33961 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/et.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klaviatuur on ühendatud" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klaviatuuri ühendus on katk." + diff --git a/sys_pci_noti/po_sys_pci_noti/eu.po b/sys_pci_noti/po_sys_pci_noti/eu.po new file mode 100755 index 0000000..521651c --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/eu.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teklatua konektatuta" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teklatua deskonektatuta" + diff --git a/sys_pci_noti/po_sys_pci_noti/fi.po b/sys_pci_noti/po_sys_pci_noti/fi.po new file mode 100755 index 0000000..aa24538 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/fi.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Näppäimistö kytketty" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Näppäimistö irrotettu" + diff --git a/sys_pci_noti/po_sys_pci_noti/fr_CA.po b/sys_pci_noti/po_sys_pci_noti/fr_CA.po new file mode 100755 index 0000000..fe05fff --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/fr_CA.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Clavier connecté" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Clavier déconnecté" + diff --git a/sys_pci_noti/po_sys_pci_noti/fr_FR.po b/sys_pci_noti/po_sys_pci_noti/fr_FR.po new file mode 100755 index 0000000..fe05fff --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/fr_FR.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Clavier connecté" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Clavier déconnecté" + diff --git a/sys_pci_noti/po_sys_pci_noti/ga.po b/sys_pci_noti/po_sys_pci_noti/ga.po new file mode 100755 index 0000000..13e7950 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ga.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Eochairchlár ceangailte" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Eochairchlár dícheangailte" + diff --git a/sys_pci_noti/po_sys_pci_noti/gl.po b/sys_pci_noti/po_sys_pci_noti/gl.po new file mode 100755 index 0000000..cc8dfc7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/gl.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teclado conectado" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teclado desconectado" + diff --git a/sys_pci_noti/po_sys_pci_noti/hi.po b/sys_pci_noti/po_sys_pci_noti/hi.po new file mode 100755 index 0000000..c86fd0a --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/hi.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "कीबोर्ड कनेक्ट किया गया" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "कीबोर्ड डिसकनेक्ट किया गया" + diff --git a/sys_pci_noti/po_sys_pci_noti/hr.po b/sys_pci_noti/po_sys_pci_noti/hr.po new file mode 100755 index 0000000..71fccb9 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/hr.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tipkovnica spojena" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tipkovnica odspojena" + diff --git a/sys_pci_noti/po_sys_pci_noti/hu.po b/sys_pci_noti/po_sys_pci_noti/hu.po new file mode 100755 index 0000000..06a9d89 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/hu.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Billentyűzet csatlakoztatva" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Billentyűzet leválasztva" + diff --git a/sys_pci_noti/po_sys_pci_noti/hy.po b/sys_pci_noti/po_sys_pci_noti/hy.po new file mode 100755 index 0000000..4fd13d1 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/hy.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Ստեղնաշարը միացված է" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Ստեղնաշարն անջատված է" + diff --git a/sys_pci_noti/po_sys_pci_noti/is.po b/sys_pci_noti/po_sys_pci_noti/is.po new file mode 100755 index 0000000..391eaed --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/is.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Lyklaborð tengt" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Lyklaborð aftengt" + diff --git a/sys_pci_noti/po_sys_pci_noti/it_IT.po b/sys_pci_noti/po_sys_pci_noti/it_IT.po new file mode 100755 index 0000000..0e5c942 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/it_IT.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastiera connessa" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastiera disconnessa" + diff --git a/sys_pci_noti/po_sys_pci_noti/ja_JP.po b/sys_pci_noti/po_sys_pci_noti/ja_JP.po new file mode 100755 index 0000000..63b3ccf --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ja_JP.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "キーボードが接続されました。" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "キーボードが取り外されました。" + diff --git a/sys_pci_noti/po_sys_pci_noti/ka.po b/sys_pci_noti/po_sys_pci_noti/ka.po new file mode 100755 index 0000000..72b72b7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ka.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "კლავიატურა დაკავშირებულია" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "კლავიატურა გათიშულია" + diff --git a/sys_pci_noti/po_sys_pci_noti/kk.po b/sys_pci_noti/po_sys_pci_noti/kk.po new file mode 100755 index 0000000..f3873db --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/kk.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Пернетақта қосылды" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Пернетақта ажыратылды" + diff --git a/sys_pci_noti/po_sys_pci_noti/ko_KR.po b/sys_pci_noti/po_sys_pci_noti/ko_KR.po new file mode 100755 index 0000000..8f73524 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ko_KR.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "키보드가 연결되었습니다" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "키보드와 연결이 끊어졌습니다" + diff --git a/sys_pci_noti/po_sys_pci_noti/lt.po b/sys_pci_noti/po_sys_pci_noti/lt.po new file mode 100755 index 0000000..65ec0bb --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/lt.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Prijungta klaviatūra" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klaviatūra atjungta" + diff --git a/sys_pci_noti/po_sys_pci_noti/lv.po b/sys_pci_noti/po_sys_pci_noti/lv.po new file mode 100755 index 0000000..d59b6aa --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/lv.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastatūra pievienota" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastatūra atvienota" + diff --git a/sys_pci_noti/po_sys_pci_noti/mk.po b/sys_pci_noti/po_sys_pci_noti/mk.po new file mode 100755 index 0000000..e95b1b1 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/mk.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Поврзана е тастатура" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Тастатурата не е поврзана" + diff --git a/sys_pci_noti/po_sys_pci_noti/nb.po b/sys_pci_noti/po_sys_pci_noti/nb.po new file mode 100755 index 0000000..5e04c0d --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/nb.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastatur tilkoblet" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastatur frakoblet" + diff --git a/sys_pci_noti/po_sys_pci_noti/nl_NL.po b/sys_pci_noti/po_sys_pci_noti/nl_NL.po new file mode 100755 index 0000000..d4f3d8f --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/nl_NL.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Toetsenbord aangesloten" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Toetsenbord losgekoppeld" + diff --git a/sys_pci_noti/po_sys_pci_noti/pl.po b/sys_pci_noti/po_sys_pci_noti/pl.po new file mode 100755 index 0000000..ef614e6 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/pl.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klawiatura podłączona" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klawiatura odłączona" + diff --git a/sys_pci_noti/po_sys_pci_noti/pt_BR.po b/sys_pci_noti/po_sys_pci_noti/pt_BR.po new file mode 100755 index 0000000..cc8dfc7 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/pt_BR.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teclado conectado" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teclado desconectado" + diff --git a/sys_pci_noti/po_sys_pci_noti/pt_PT.po b/sys_pci_noti/po_sys_pci_noti/pt_PT.po new file mode 100755 index 0000000..219f2eb --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/pt_PT.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Teclado ligado" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Teclado desligado" + diff --git a/sys_pci_noti/po_sys_pci_noti/ro.po b/sys_pci_noti/po_sys_pci_noti/ro.po new file mode 100755 index 0000000..758401c --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ro.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastatură conectată" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastatură deconectată" + diff --git a/sys_pci_noti/po_sys_pci_noti/ru_RU.po b/sys_pci_noti/po_sys_pci_noti/ru_RU.po new file mode 100755 index 0000000..475bacc --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/ru_RU.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Клавиатура подключена" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Клавиатура отключена" + diff --git a/sys_pci_noti/po_sys_pci_noti/sk.po b/sys_pci_noti/po_sys_pci_noti/sk.po new file mode 100755 index 0000000..160dba2 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/sk.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klávesnica je pripojená" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klávesnica je odpojená" + diff --git a/sys_pci_noti/po_sys_pci_noti/sl.po b/sys_pci_noti/po_sys_pci_noti/sl.po new file mode 100755 index 0000000..ef46adf --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/sl.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tipkovnica je povezana" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tipkovnica je odstranjena" + diff --git a/sys_pci_noti/po_sys_pci_noti/sr.po b/sys_pci_noti/po_sys_pci_noti/sr.po new file mode 100755 index 0000000..12d0ca3 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/sr.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tastatura je priključena" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tastatura je otkačena" + diff --git a/sys_pci_noti/po_sys_pci_noti/sv.po b/sys_pci_noti/po_sys_pci_noti/sv.po new file mode 100755 index 0000000..58213f2 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/sv.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Tangentbord anslutet" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Tangentbord frånkopplat" + diff --git a/sys_pci_noti/po_sys_pci_noti/tr_TR.po b/sys_pci_noti/po_sys_pci_noti/tr_TR.po new file mode 100755 index 0000000..a173ebf --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/tr_TR.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klavye bağlandı" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klavye bağlı değil" + diff --git a/sys_pci_noti/po_sys_pci_noti/uk.po b/sys_pci_noti/po_sys_pci_noti/uk.po new file mode 100755 index 0000000..c746cdf --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/uk.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Клавіатуру підключено" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Клавіатуру відключено" + diff --git a/sys_pci_noti/po_sys_pci_noti/uz.po b/sys_pci_noti/po_sys_pci_noti/uz.po new file mode 100755 index 0000000..f9babff --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/uz.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "Klaviatura ulandi" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "Klaviatura chiqarib olindi" + diff --git a/sys_pci_noti/po_sys_pci_noti/zh_CN.po b/sys_pci_noti/po_sys_pci_noti/zh_CN.po new file mode 100755 index 0000000..a60aae3 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/zh_CN.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "键盘已连接" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "键盘已断开" + diff --git a/sys_pci_noti/po_sys_pci_noti/zh_HK.po b/sys_pci_noti/po_sys_pci_noti/zh_HK.po new file mode 100755 index 0000000..52b489c --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/zh_HK.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "鍵盤已連接" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "鍵盤已中斷連接" + diff --git a/sys_pci_noti/po_sys_pci_noti/zh_SG.po b/sys_pci_noti/po_sys_pci_noti/zh_SG.po new file mode 100755 index 0000000..a60aae3 --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/zh_SG.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "键盘已连接" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "键盘已断开" + diff --git a/sys_pci_noti/po_sys_pci_noti/zh_TW.po b/sys_pci_noti/po_sys_pci_noti/zh_TW.po new file mode 100755 index 0000000..52b489c --- /dev/null +++ b/sys_pci_noti/po_sys_pci_noti/zh_TW.po @@ -0,0 +1,6 @@ +msgid "IDS_COM_POP_KEYBOARD_CONNECTED_ABB2" +msgstr "鍵盤已連接" + +msgid "IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2" +msgstr "鍵盤已中斷連接" + diff --git a/sys_pci_noti/sys_pci_noti.c b/sys_pci_noti/sys_pci_noti.c new file mode 100755 index 0000000..0781bcf --- /dev/null +++ b/sys_pci_noti/sys_pci_noti.c @@ -0,0 +1,110 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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.tizenopensource.org/license + * + * 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 "ss_log.h" +#include "sys_pci_noti.h" + +#define TICKERNOTI_LOCATION_TOP 0 + +static void pci_noti(pci_noti_type iPCI) +{ + char *lang; + char *r; + int ret = -1; + bundle *b = NULL; + const int arrSize = 2; + char str_tickernoti[arrSize]; + + 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("sys_pci_noti","/usr/share/system-server/sys_pci_noti/res/locale/"); + textdomain("sys_pci_noti"); + + b = bundle_create(); + if(b == NULL) { + PRT_TRACE_ERR("FAIL: bundle_create()"); + return; + } + /* set tickernoti style */ + ret = bundle_add(b, "0", "info"); + if (ret != 0) + goto BUNDLE_ADD_ERR; + + /* set tickernoti text */ + if (iPCI == CB_NOTI_PCI_REMOVED) + ret = bundle_add(b, "1", _("IDS_COM_POP_KEYBOARD_DISCONNECTED_ABB2")); + else if (iPCI == CB_NOTI_PCI_INSERTED) + ret = bundle_add(b, "1", _("IDS_COM_POP_KEYBOARD_CONNECTED_ABB2")); + if (ret != 0) + goto BUNDLE_ADD_ERR; + /* set tickernoti orientation */ + snprintf(str_tickernoti,arrSize,"%d",TICKERNOTI_LOCATION_TOP); + ret = bundle_add(b, "2", str_tickernoti); + if (ret != 0) + goto BUNDLE_ADD_ERR; + + /* set tickernoti timeout */ + ret = bundle_add(b, "3", "3"); + if (ret != 0) + goto BUNDLE_ADD_ERR; + + /* launch tickernoti */ + ret = syspopup_launch("tickernoti-syspopup", b); + if (ret < 0) + PRT_TRACE_ERR("FAIL: syspopup_launch()"); + + if(bundle_free(b) != 0) + PRT_TRACE_ERR("FAIL: bundle_free()"); + return; + +BUNDLE_ADD_ERR: + PRT_TRACE_ERR("FAIL: bundle_add()"); + if (bundle_free(b) != 0) + PRT_TRACE_ERR("FAIL: bundle_free()"); + return; + +} +int main(int argc, char *argv[]) +{ + int r = 0; + int handle = 0; + int bNoti = -1; + pci_noti_type cb_type = -1; + + if (argc == 2) { + cb_type = (pci_noti_type)atoi(argv[1]); + pci_noti(cb_type); + } + else { + PRT_TRACE_ERR("FAIL param error"); + } + + return 0; +} diff --git a/sys_pci_noti/sys_pci_noti.h b/sys_pci_noti/sys_pci_noti.h new file mode 100755 index 0000000..eeeea0d --- /dev/null +++ b/sys_pci_noti/sys_pci_noti.h @@ -0,0 +1,36 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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.tizenopensource.org/license + * + * 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_PCI_NOTI_H__ +#define __SYS_PCI_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_PCI_REMOVED = 0, + CB_NOTI_PCI_INSERTED +}pci_noti_type; + +#endif /* __SYS_PCI_NOTI_H__ */ diff --git a/udev-rules/91-system-server.rules.in b/udev-rules/91-system-server.rules.in index a255097..660d767 100644 --- a/udev-rules/91-system-server.rules.in +++ b/udev-rules/91-system-server.rules.in @@ -35,3 +35,7 @@ ACTION=="add" SUBSYSTEM=="input" DEVPATH=="*/input[1-9]*/event[1-9]*" ENV{ID_B ACTION=="remove" SUBSYSTEM=="input" DEVPATH=="*/input[1-9]*/event[1-9]*" ENV{ID_BUS}=="usb" ENV{ID_INPUT_KEYBOARD}=="?*" RUN+="/usr/bin/sys_event device_keyboard_remove" ACTION=="add" SUBSYSTEM=="input" DEVPATH=="*/input[1-9]*/event[1-9]*" ENV{ID_BUS}=="usb" ENV{ID_INPUT_MOUSE}=="?*" RUN+="/usr/bin/sys_event device_mouse_add" ACTION=="remove" SUBSYSTEM=="input" DEVPATH=="*/input[1-9]*/event[1-9]*" ENV{ID_BUS}=="usb" ENV{ID_INPUT_MOUSE}=="?*" RUN+="/usr/bin/sys_event device_mouse_remove" + +#PCI keyboard +ACTION=="add" SUBSYSTEM=="input" DEVPATH=="*/virtio[1-9]*/input/input[1-9]*/event[1-9]*" ENV{ID_PATH}=="*virtio-pci*" ENV{ID_INPUT_KEYBOARD}=="?*" RUN+="/usr/bin/sys_event device_pci_keyboard_add" +ACTION=="remove" SUBSYSTEM=="input" DEVPATH=="*/virtio[1-9]*/input/input[1-9]*/event[1-9]*" ENV{ID_PATH}=="*virtio-pci*" ENV{ID_INPUT_KEYBOARD}=="?*" RUN+="/usr/bin/sys_event device_pci_keyboard_remove"