insert pci change notification submit/trunk/20121113.015341
authorgiyeol.ok <giyeol.ok@samsung.com>
Mon, 12 Nov 2012 06:57:06 +0000 (15:57 +0900)
committergiyeol.ok <giyeol.ok@samsung.com>
Tue, 13 Nov 2012 01:52:35 +0000 (10:52 +0900)
Change-Id: I146867b4bc1b0100659188ff953424bd00865d8b

59 files changed:
CMakeLists.txt
packaging/system-server.spec
ss_device_change_handler.c
sys_pci_noti/CMakeLists.txt [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/CMakeLists.txt [new file with mode: 0644]
sys_pci_noti/po_sys_pci_noti/ar.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/az.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/bg.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ca.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/cs.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/da.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/de_DE.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/el_GR.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/en.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/en_PH.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/en_US.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/es_ES.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/es_US.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/et.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/eu.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/fi.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/fr_CA.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/fr_FR.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ga.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/gl.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/hi.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/hr.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/hu.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/hy.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/is.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/it_IT.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ja_JP.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ka.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/kk.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ko_KR.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/lt.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/lv.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/mk.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/nb.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/nl_NL.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/pl.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/pt_BR.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/pt_PT.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ro.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/ru_RU.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/sk.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/sl.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/sr.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/sv.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/tr_TR.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/uk.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/uz.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/zh_CN.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/zh_HK.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/zh_SG.po [new file with mode: 0755]
sys_pci_noti/po_sys_pci_noti/zh_TW.po [new file with mode: 0755]
sys_pci_noti/sys_pci_noti.c [new file with mode: 0755]
sys_pci_noti/sys_pci_noti.h [new file with mode: 0755]
udev-rules/91-system-server.rules.in

index 8ade278..91c6fe0 100755 (executable)
@@ -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)
index b182acc..c14f1a7 100755 (executable)
@@ -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
index 44541ed..8baac08 100755 (executable)
@@ -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 (executable)
index 0000000..964f5a4
--- /dev/null
@@ -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 (file)
index 0000000..5b1ca07
--- /dev/null
@@ -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 (executable)
index 0000000..8e8ecef
--- /dev/null
@@ -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 (executable)
index 0000000..09395e4
--- /dev/null
@@ -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 (executable)
index 0000000..0490340
--- /dev/null
@@ -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 (executable)
index 0000000..b67689d
--- /dev/null
@@ -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 (executable)
index 0000000..4f34a72
--- /dev/null
@@ -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 (executable)
index 0000000..4e27dc2
--- /dev/null
@@ -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 (executable)
index 0000000..6f0b207
--- /dev/null
@@ -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 (executable)
index 0000000..c0835cc
--- /dev/null
@@ -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 (executable)
index 0000000..724f9d7
--- /dev/null
@@ -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 (executable)
index 0000000..724f9d7
--- /dev/null
@@ -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 (executable)
index 0000000..724f9d7
--- /dev/null
@@ -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 (executable)
index 0000000..cc8dfc7
--- /dev/null
@@ -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 (executable)
index 0000000..cc8dfc7
--- /dev/null
@@ -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 (executable)
index 0000000..cb33961
--- /dev/null
@@ -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 (executable)
index 0000000..521651c
--- /dev/null
@@ -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 (executable)
index 0000000..aa24538
--- /dev/null
@@ -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 (executable)
index 0000000..fe05fff
--- /dev/null
@@ -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 (executable)
index 0000000..fe05fff
--- /dev/null
@@ -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 (executable)
index 0000000..13e7950
--- /dev/null
@@ -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 (executable)
index 0000000..cc8dfc7
--- /dev/null
@@ -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 (executable)
index 0000000..c86fd0a
--- /dev/null
@@ -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 (executable)
index 0000000..71fccb9
--- /dev/null
@@ -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 (executable)
index 0000000..06a9d89
--- /dev/null
@@ -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 (executable)
index 0000000..4fd13d1
--- /dev/null
@@ -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 (executable)
index 0000000..391eaed
--- /dev/null
@@ -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 (executable)
index 0000000..0e5c942
--- /dev/null
@@ -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 (executable)
index 0000000..63b3ccf
--- /dev/null
@@ -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 (executable)
index 0000000..72b72b7
--- /dev/null
@@ -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 (executable)
index 0000000..f3873db
--- /dev/null
@@ -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 (executable)
index 0000000..8f73524
--- /dev/null
@@ -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 (executable)
index 0000000..65ec0bb
--- /dev/null
@@ -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 (executable)
index 0000000..d59b6aa
--- /dev/null
@@ -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 (executable)
index 0000000..e95b1b1
--- /dev/null
@@ -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 (executable)
index 0000000..5e04c0d
--- /dev/null
@@ -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 (executable)
index 0000000..d4f3d8f
--- /dev/null
@@ -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 (executable)
index 0000000..ef614e6
--- /dev/null
@@ -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 (executable)
index 0000000..cc8dfc7
--- /dev/null
@@ -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 (executable)
index 0000000..219f2eb
--- /dev/null
@@ -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 (executable)
index 0000000..758401c
--- /dev/null
@@ -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 (executable)
index 0000000..475bacc
--- /dev/null
@@ -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 (executable)
index 0000000..160dba2
--- /dev/null
@@ -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 (executable)
index 0000000..ef46adf
--- /dev/null
@@ -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 (executable)
index 0000000..12d0ca3
--- /dev/null
@@ -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 (executable)
index 0000000..58213f2
--- /dev/null
@@ -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 (executable)
index 0000000..a173ebf
--- /dev/null
@@ -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 (executable)
index 0000000..c746cdf
--- /dev/null
@@ -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 (executable)
index 0000000..f9babff
--- /dev/null
@@ -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 (executable)
index 0000000..a60aae3
--- /dev/null
@@ -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 (executable)
index 0000000..52b489c
--- /dev/null
@@ -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 (executable)
index 0000000..a60aae3
--- /dev/null
@@ -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 (executable)
index 0000000..52b489c
--- /dev/null
@@ -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 (executable)
index 0000000..0781bcf
--- /dev/null
@@ -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 <stdio.h>
+#include <libintl.h>
+#include <locale.h>
+#include <vconf.h>
+#include <syspopup_caller.h>
+#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 (executable)
index 0000000..eeeea0d
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license\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
+#ifndef __SYS_PCI_NOTI_H__\r
+#define __SYS_PCI_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
+       CB_NOTI_PCI_REMOVED = 0,\r
+       CB_NOTI_PCI_INSERTED\r
+}pci_noti_type;\r
+\r
+#endif /* __SYS_PCI_NOTI_H__ */\r
index a255097..660d767 100644 (file)
@@ -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"