Check whether or not the binary is for emulator 2.0alpha master 2.0_alpha submit/master/20120920.150955
authorTaeyoung Kim <ty317.kim@samsung.com>
Thu, 30 Aug 2012 00:52:18 +0000 (09:52 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Fri, 31 Aug 2012 12:23:59 +0000 (21:23 +0900)
Change-Id: Icc468d8b814531a12c66713a8efb6769f253257e

63 files changed:
CMakeLists.txt
include/um_common.h
include/um_customize.h
include/um_data.h
include/um_usb_accessory_manager.h
include/um_usb_connection_manager.h
packaging/usb-manager.spec
po/CMakeLists.txt
po/ar.po [new file with mode: 0755]
po/az.po [new file with mode: 0755]
po/bg.po [new file with mode: 0755]
po/ca.po [new file with mode: 0755]
po/cs.po [new file with mode: 0755]
po/da.po [new file with mode: 0755]
po/de_DE.po
po/el_GR.po
po/en.po
po/en_PH.po [new file with mode: 0755]
po/en_US.po [new file with mode: 0755]
po/es_ES.po
po/es_US.po [new file with mode: 0755]
po/et.po [new file with mode: 0755]
po/eu.po [new file with mode: 0755]
po/fi.po [new file with mode: 0755]
po/fr_CA.po [new file with mode: 0755]
po/fr_FR.po
po/ga.po [new file with mode: 0755]
po/gl.po [new file with mode: 0755]
po/hi.po [new file with mode: 0755]
po/hr.po [new file with mode: 0755]
po/hu.po [new file with mode: 0755]
po/hy.po [new file with mode: 0755]
po/is.po [new file with mode: 0755]
po/it_IT.po
po/ja_JP.po
po/ka.po [new file with mode: 0755]
po/kk.po [new file with mode: 0755]
po/ko_KR.po
po/lt.po [new file with mode: 0755]
po/lv.po [new file with mode: 0755]
po/mk.po [new file with mode: 0755]
po/nb.po [new file with mode: 0755]
po/nl_NL.po
po/pl.po [new file with mode: 0755]
po/pt_BR.po [new file with mode: 0755]
po/pt_PT.po
po/ro.po [new file with mode: 0755]
po/ru_RU.po
po/sk.po [new file with mode: 0755]
po/sl.po [new file with mode: 0755]
po/sr.po [new file with mode: 0755]
po/sv.po [new file with mode: 0755]
po/tr_TR.po
po/uk.po [new file with mode: 0755]
po/uz.po [new file with mode: 0755]
po/zh_CN.po
po/zh_HK.po
po/zh_SG.po [new file with mode: 0755]
po/zh_TW.po
src/um_common.c
src/um_customize.c
src/um_usb_accessory_manager.c
src/um_usb_server.c

index d2b3f7a..9585257 100644 (file)
@@ -20,7 +20,6 @@ pkg_check_modules(pkgs REQUIRED
        heynoti
        dlog
        syspopup-caller
-       iniparser
        devman
        appsvc)
 
index 5849c1b..c28a4d4 100644 (file)
@@ -24,6 +24,7 @@
 #define __UM_COMMON_H__
 
 #include <stdio.h>
+#include <stdbool.h>
 #include <stdlib.h>
 #include <appcore-common.h>
 #include <heynoti.h>
@@ -32,6 +33,7 @@
 #include <sys/types.h>
 #include <glib.h>
 #include <syspopup_caller.h>
+#include <sys/utsname.h>
 #include "um_data.h"
 
 #include <errno.h>
@@ -113,5 +115,6 @@ int ipc_request_server_init();
 int ipc_request_server_close(UmMainData *ad);
 int ipc_noti_server_init();
 int ipc_noti_server_close(int *sock_remote);
+bool is_emul_bin();
 
 #endif /* __UM_COMMON_H__ */
index 9be3d80..74a5a1f 100644 (file)
@@ -69,8 +69,8 @@
 static int mode_set_driver_0_0(int mode);
 static int mode_set_driver_1_0(int mode);
 static Eina_Bool write_file(const char *filepath, char *content);
-int check_driver_version(UmMainData *ad);
 
+int check_driver_version(UmMainData *ad);
 int mode_set_kernel(USB_DRIVER_VERSION version, int mode);
 void start_dr(UmMainData *ad);
 void load_connection_popup(UmMainData *ad);
index 08f23cf..b10abc9 100644 (file)
@@ -43,7 +43,8 @@ typedef enum {
 typedef enum {
        ERROR_POPUP = 0,
        SELECT_PKG_FOR_ACC_POPUP,
-       REQUEST_PERM_POPUP,
+       REQ_ACC_PERM_POPUP,
+       TEST_POPUP,
        MAX_NUM_SYSPOPUP_TYPE
        /* When we need to add other system popup,
         * Write here the type of popup */
@@ -56,13 +57,17 @@ typedef enum {
 } IPC_SIMPLE_RESULT;
 
 typedef enum {
-       LAUNCH_APP = 0,
-       REQUEST_PERMISSION,
-       HAS_PERMISSION,
-       REQ_PERM_NOTI_YES_BTN,
-       REQ_PERM_NOTI_NO_BTN,
-       GET_ACC_INFO,
-       ERROR_POPUP_OK_BTN,
+       /* General */
+       ERROR_POPUP_OK_BTN = 0,
+       IS_EMUL_BIN,
+
+       /* for Accessory */
+       LAUNCH_APP_FOR_ACC = 20,
+       REQ_ACC_PERMISSION,
+       HAS_ACC_PERMISSION,
+       REQ_ACC_PERM_NOTI_YES_BTN,
+       REQ_ACC_PERM_NOTI_NO_BTN,
+       GET_ACC_INFO
 } REQUEST_TO_USB_MANGER;
 
 typedef enum {
index 6e48076..b391b77 100644 (file)
@@ -30,7 +30,7 @@
 #define USB_ACCESSORY_GET_URI                  _IOW('M', 5, char[256])
 #define USB_ACCESSORY_GET_SERIAL               _IOW('M', 6, char[256])
 
-int initAccessory(UsbAccessory *usbAcc);
+int getAccessoryInfo(UsbAccessory *usbAcc);
 int connectAccessory(UmMainData *ad);
 int disconnectAccessory(UmMainData *ad);
 void getCurrentAccessory();
index f28d3a2..fb235f7 100644 (file)
 #define SDBD_START "/etc/init.d/sdbd start"
 #define SDBD_STOP  "/etc/init.d/sdbd stop"
 #define SET_USB0_IP \
-                       "ifconfig usb0 192.168.129.3 up"
+                       "/sbin/ifconfig usb0 192.168.129.3 up"
 #define UNSET_USB0_IP \
-                       "ifconfig usb0 down"
+                       "/sbin/ifconfig usb0 down"
 #define ADD_DEFAULT_GW \
-                       "route add -net 192.168.129.0 netmask 255.255.255.0 dev usb0"
+                       "/sbin/route add -net 192.168.129.0 netmask 255.255.255.0 dev usb0"
 #define OPENSSHD_START \
                        "/etc/init.d/ssh start"
 #define OPENSSHD_STOP \
index cc0d89a..f63f7ec 100644 (file)
@@ -1,7 +1,7 @@
 Name:       usb-server
 Summary:    USB server
 Version:       0.0.1
-Release:    5
+Release:    7
 Group:      TO_BE/FILLED_IN
 License:    TO_BE/FILLED_IN
 Source0:    usb-server-%{version}.tar.gz
@@ -14,7 +14,6 @@ BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(heynoti)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(devman)
-BuildRequires:  pkgconfig(iniparser)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(syspopup-caller)
 BuildRequires:  pkgconfig(appsvc)
index f908c14..54b356a 100644 (file)
@@ -1,6 +1,6 @@
 # for i18n
 #SET(POFILES en_US.po en_GB.po ja.po ko.po zh_CN.po)
-SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+SET(POFILES ar.po az.po bg.po ca.po cs.po da.po de_DE.po el_GR.po en.po en_PH.po en_US.po es_ES.po es_US.po et.po eu.po fi.po fr_CA.po fr_FR.po ga.po gl.po hi.po hr.po hu.po hy.po is.po it_IT.po ja_JP.po ka.po kk.po ko_KR.po lt.po lv.po mk.po nb.po nl_NL.po pl.po pt_BR.po pt_PT.po ro.po ru_RU.po sk.po sl.po sr.po sv.po tr_TR.po uk.po uz.po zh_CN.po zh_HK.po zh_SG.po zh_TW.po)
 SET(MSGFMT "/usr/bin/msgfmt")
 
 FOREACH(pofile ${POFILES})
diff --git a/po/ar.po b/po/ar.po
new file mode 100755 (executable)
index 0000000..07eeebc
--- /dev/null
+++ b/po/ar.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB متصل"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "تم تفعيل تقييد USB"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "تصحيح USB متصل"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "متصل كملحق USB"
+
diff --git a/po/az.po b/po/az.po
new file mode 100755 (executable)
index 0000000..6b78490
--- /dev/null
+++ b/po/az.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB qoşuldu"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB bağlanma aktivdir"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB sazlanması qoşulub"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USB aksesuarına qoşuldu"
+
diff --git a/po/bg.po b/po/bg.po
new file mode 100755 (executable)
index 0000000..68ff069
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB устройството е свързано"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB привързването е активирано"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB поправките свързани"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Свързан с USB аксесоар"
+
diff --git a/po/ca.po b/po/ca.po
new file mode 100755 (executable)
index 0000000..c7e9558
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB connectada"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Tethering USB habilitat"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Depuració USB connectada"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connectat a un accessori USB"
+
diff --git a/po/cs.po b/po/cs.po
new file mode 100755 (executable)
index 0000000..948cf34
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB připojeno"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Sdílení připojení USB zapnuto"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Ladění USB bylo připojeno"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Připojeno k příslušenství USB"
+
diff --git a/po/da.po b/po/da.po
new file mode 100755 (executable)
index 0000000..ef1879f
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB tilsluttet"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB-binding aktiveret"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-fejlsøgning tilsluttet"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Tilsluttet til USB-tilbehør"
+
index fc24a00..639236d 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB verbunden"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB-Tethering aktiviert"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB-Debugging verbunden"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Mit USB-Gerät verbunden"
+
index 571fc48..d8a63d1 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Το USB συνδέθηκε"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "Ενεργοποιήθηκε το tethering USB"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "Εντοπισμός σφαλμάτων USB"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Συνδέθηκε σε αξεσουάρ αποθήκευσης USB"
+
index bd7be33..c86b6d5 100755 (executable)
--- a/po/en.po
+++ b/po/en.po
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB connected"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB tethering enabled"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB debugging connected"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connected to a USB accessory"
+
diff --git a/po/en_PH.po b/po/en_PH.po
new file mode 100755 (executable)
index 0000000..c86b6d5
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB connected"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB tethering enabled"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB debugging connected"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connected to a USB accessory"
+
diff --git a/po/en_US.po b/po/en_US.po
new file mode 100755 (executable)
index 0000000..c86b6d5
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB connected"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB tethering enabled"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB debugging connected"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connected to a USB accessory"
+
index 4aed8f3..7b99d99 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB conectado"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "Anclaje a red USB activado"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "Depuración USB conectada"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Conectado a un accesorio USB"
+
diff --git a/po/es_US.po b/po/es_US.po
new file mode 100755 (executable)
index 0000000..c705eb7
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB conectado"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Redirección de USB activada"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Depuración de USB conectada"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Conectado a un accesorio USB"
+
diff --git a/po/et.po b/po/et.po
new file mode 100755 (executable)
index 0000000..5db02bd
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB on ühendatud"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB modem on aktiveeritud"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-silumine on ühendatud"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Ühendatud USB-tarvikuga"
+
diff --git a/po/eu.po b/po/eu.po
new file mode 100755 (executable)
index 0000000..faf7b92
--- /dev/null
+++ b/po/eu.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB konektatua"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB ainguraketa gaituta"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB arazketa konektatuta"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Konektatu USB osagarri batera"
+
diff --git a/po/fi.po b/po/fi.po
new file mode 100755 (executable)
index 0000000..09ac31d
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB yhdistetty"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB-yhteys käytössä"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-virheenkorjaus on yhdistetty"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Liitetty USB-lisälaitteena"
+
diff --git a/po/fr_CA.po b/po/fr_CA.po
new file mode 100755 (executable)
index 0000000..f3b93ed
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB branché"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Modem USB activé"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Débogage USB connecté"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connecté à un accessoire USB"
+
index 5aac609..f3b93ed 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB branché"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "Modem USB activé"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "Débogage USB connecté"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connecté à un accessoire USB"
+
diff --git a/po/ga.po b/po/ga.po
new file mode 100755 (executable)
index 0000000..c5acd50
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB ceangailte"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Nascaireacht USB cumasaithe"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Dífhabhtú USB casta air"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Nasctha le hoiriúint USB"
+
diff --git a/po/gl.po b/po/gl.po
new file mode 100755 (executable)
index 0000000..9490ab2
--- /dev/null
+++ b/po/gl.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB conectado"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Ancoraxe á rede USB activada"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Eliminación de fallos do USB conectado"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Conectado a un accesorio USB"
+
diff --git a/po/hi.po b/po/hi.po
new file mode 100755 (executable)
index 0000000..c6ab579
--- /dev/null
+++ b/po/hi.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB कनेक्ट किया गया"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB तेथरिंग सक्षम किया गया"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB डिबगिंग कनेक्‍ट किया हुआ"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USB उपसाधन से कनेक्ट किया गया"
+
diff --git a/po/hr.po b/po/hr.po
new file mode 100755 (executable)
index 0000000..ab5cf1e
--- /dev/null
+++ b/po/hr.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB spojen"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB dijeljenje uključeno"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB ispravljanje grešaka spojeno"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Spojen na USB priključak"
+
diff --git a/po/hu.po b/po/hu.po
new file mode 100755 (executable)
index 0000000..08bf2a7
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB csatlakoztatva"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB-internetmegosztás engedélyezve"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-hibakeresés csatlakoztatva"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USB-tartozékhoz kapcsolódva"
+
diff --git a/po/hy.po b/po/hy.po
new file mode 100755 (executable)
index 0000000..d946559
--- /dev/null
+++ b/po/hy.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB-ն միացված է"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB տեղակապումն ընձեռված է"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB վրիպազերծումը միացված է"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Միացել է USB լրասարքին"
+
diff --git a/po/is.po b/po/is.po
new file mode 100755 (executable)
index 0000000..512f19b
--- /dev/null
+++ b/po/is.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB er tengt"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB-tjóðrun virk"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-kembing tengd"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Tengt við USB-aðgang"
+
index 54e79a3..d0f289f 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB connesso"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "Tethering USB attivato"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "Debug USB connesso"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Connesso ad accessorio USB"
+
index b1db6a5..a6f0b39 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USBが接続されました。"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB​テザリング​が​有効​です。"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USBデバッグが接続されました。"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USBアクセサリに接続"
+
diff --git a/po/ka.po b/po/ka.po
new file mode 100755 (executable)
index 0000000..9110525
--- /dev/null
+++ b/po/ka.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB დაკავშირდა"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB მობილური ინტერნეტი გააქტიურებულია"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB შეცდომების გასწორება დაკავშირებულია"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "დაკავშირებულია USB აქსესუართან"
+
diff --git a/po/kk.po b/po/kk.po
new file mode 100755 (executable)
index 0000000..99983e4
--- /dev/null
+++ b/po/kk.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB қосылған"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB байланыстыру қосылды"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB жөндеу жүйесі қосылған"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USB аксессуарына қосылды"
+
index 5e0bf83..68ba96f 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB가 연결되었습니다"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB 테더링이 실행되었습니다"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB 디버깅이 실행되었습니다"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USB 액세서리에 연결됨"
+
diff --git a/po/lt.po b/po/lt.po
new file mode 100755 (executable)
index 0000000..0227886
--- /dev/null
+++ b/po/lt.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Prijungtas USB"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB siejimas įjungtas"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB derinimas prijungtas"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Prisijungta prie USB priedo"
+
diff --git a/po/lv.po b/po/lv.po
new file mode 100755 (executable)
index 0000000..f670a89
--- /dev/null
+++ b/po/lv.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB ir pievienots"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB piesaiste aktivizēta"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB atkļūdošana pievienota"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Izveidots savienojums ar USB piederumu"
+
diff --git a/po/mk.po b/po/mk.po
new file mode 100755 (executable)
index 0000000..b5f6e7e
--- /dev/null
+++ b/po/mk.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Поврзано е USB"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Овозможено е делење преку USB"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Дебагирањето на USB е поврзано"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Поврзано со USB-додаток"
+
diff --git a/po/nb.po b/po/nb.po
new file mode 100755 (executable)
index 0000000..78328da
--- /dev/null
+++ b/po/nb.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB tilkoblet"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB-Internettdeling aktivert"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-feilsøking tilkoblet"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Koblet til et USB-tilbehør"
+
index 08b047f..50d1fb4 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB verbonden"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB-tethering ingeschakeld"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB-foutopsporing aangesloten"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Verbonden met een USB-accessoire"
+
diff --git a/po/pl.po b/po/pl.po
new file mode 100755 (executable)
index 0000000..ec1c30a
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Podłączono USB"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Udostępnianie USB włączone"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Debugowanie USB włączone"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Podłączono do akcesorium USB"
+
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100755 (executable)
index 0000000..edfd2e1
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB conectado"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Compartilhamento de rede via USB ativado"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Depuração de USB conectada"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Conectado a um acessório USB"
+
index 34cf03d..ba043db 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB ligada"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "Ancoragem USB activada"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "Depuração de USB ligada"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Ligado a um acessório USB"
+
diff --git a/po/ro.po b/po/ro.po
new file mode 100755 (executable)
index 0000000..6465171
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Dispozitiv USB conectat"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Furnizarea de acces la Internet prin USB a fost activată"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Depanare USB conectată"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Conectat la un accesoriu USB"
+
index 6e06917..9775a50 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Подключено через USB"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "Модем USB включен"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "Отладка USB подключена"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Подключено к USB-аксессуару"
+
diff --git a/po/sk.po b/po/sk.po
new file mode 100755 (executable)
index 0000000..e3808ee
--- /dev/null
+++ b/po/sk.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB pripojené"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Zdieľanie pripojenia USB je povolené"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Ladenie USB pripojené"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Pripojené k príslušenstvu USB"
+
diff --git a/po/sl.po b/po/sl.po
new file mode 100755 (executable)
index 0000000..0a1eb41
--- /dev/null
+++ b/po/sl.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Povezava USB je vzpostavljena"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Uporaba vmesnika USB v telefonu kot modem omogočena"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB iskanje napak je povezano"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Povezan z dodatkom USB"
+
diff --git a/po/sr.po b/po/sr.po
new file mode 100755 (executable)
index 0000000..42d196e
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB priključen"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB vezivanje je omogućeno"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Uključeno otkrivanje grešaka putem USB-a"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Povezan na USB pribor"
+
diff --git a/po/sv.po b/po/sv.po
new file mode 100755 (executable)
index 0000000..3d228e0
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB har anslutits"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Internetdelning via USB är aktiverat"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB-felsökning har anslutits"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Ansluten till USB-utrustning"
+
index 5a2e6cc..19347d9 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB bağlandı"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB bağlanma etkin"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB hata ayıklama bağlandı"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Bir USB aksesuarına bağlandı"
+
diff --git a/po/uk.po b/po/uk.po
new file mode 100755 (executable)
index 0000000..09f9a63
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "Підключено USB"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "Прив’язку USB ввімкнено"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "Налагодження USB підключено"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "Підключено до USB-пристрою"
+
diff --git a/po/uz.po b/po/uz.po
new file mode 100755 (executable)
index 0000000..5b32109
--- /dev/null
+++ b/po/uz.po
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB ulangan"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB bog‘lanish yoqilgan"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB vositalari ulandi"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "USB aksessuariga ulandi"
+
index d569015..337b09f 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "已连接USB"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "USB tethering 已启用"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB调试已连接"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "已连接至 USB 附件"
+
index a50f6fe..4775cf9 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB 已連接"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "已啟用 USB 網絡共享"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "已連接USB除錯"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "已連接至 USB 配件"
+
diff --git a/po/zh_SG.po b/po/zh_SG.po
new file mode 100755 (executable)
index 0000000..a275fc6
--- /dev/null
@@ -0,0 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "已连接USB"
+
+msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
+msgstr "USB网络分享已启用"
+
+msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
+msgstr "USB调试已连接"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "已连接至 USB 附件"
+
index 3e36df0..bf96558 100755 (executable)
@@ -1,5 +1,12 @@
+msgid "IDS_COM_BODY_USB_CONNECTED"
+msgstr "USB 已連接"
+
 msgid "IDS_ST_HEADER_USB_TETHERING_ENABLED"
 msgstr "已啟用 USB 網路共享"
 
 msgid "IDS_HS_HEADER_USB_DEBUGGING_CONNECTED"
 msgstr "USB偵錯已連結"
+
+msgid "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"
+msgstr "已連接至 USB 配件"
+
index 589fb1c..41d3ab9 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <vconf.h>
 #include <devman.h>
-
 #include "um_common.h"
 
 int check_usb_connection()
@@ -206,3 +205,24 @@ int notice_to_client_app(int sock_remote, int request, char *answer)
        __USB_FUNC_EXIT__ ;
        return 0;
 }
+
+bool is_emul_bin()
+{
+       __USB_FUNC_ENTER__ ;
+       int ret = -1;
+       struct utsname name;
+       ret = uname(&name);
+       if (ret < 0) {
+               __USB_FUNC_EXIT__ ;
+               return true;
+       } else {
+               USB_LOG("Machine name: %s", name.machine);
+               if (strcasestr(name.machine, "emul")) {
+                       __USB_FUNC_EXIT__ ;
+                       return true;
+               } else {
+                       __USB_FUNC_EXIT__ ;
+                       return false;
+               }
+       }
+}
index e8160d7..6af908a 100644 (file)
  */
 
 #include "um_customize.h"
-#include <iniparser.h>
-
-#define USB_DEFAULT_MODE_CONNECTED "Default USB mode enabled"
-#define USB_ACCESSORY_MODE_ENABLED "USB accessory mode enabled"
 
 /* If other kernel versions are added, we should modify this function */
 int check_driver_version(UmMainData *ad)
@@ -266,7 +262,8 @@ void load_connection_popup(UmMainData *ad)
        USB_LOG("usbCurMode: %d\n", usbCurMode);
        switch(usbCurMode) {
        case SETTING_USB_DEFAULT_MODE:
-               ret = bundle_add(b, "1", dgettext(USB_SERVER_MESSAGE_DOMAIN, USB_DEFAULT_MODE_CONNECTED));
+               ret = bundle_add(b, "1", dgettext(USB_SERVER_MESSAGE_DOMAIN,
+                                                               "IDS_COM_BODY_USB_CONNECTED"));
                break;
        case SETTING_USB_DEBUG_MODE:
                ret = bundle_add(b, "1", dgettext(USB_SERVER_MESSAGE_DOMAIN,
@@ -277,7 +274,8 @@ void load_connection_popup(UmMainData *ad)
                                                                "IDS_ST_HEADER_USB_TETHERING_ENABLED"));
                break;
        case SETTING_USB_ACCESSORY_MODE:
-               ret = bundle_add(b, "1", dgettext(USB_SERVER_MESSAGE_DOMAIN, USB_ACCESSORY_MODE_ENABLED));
+               ret = bundle_add(b, "1", dgettext(USB_SERVER_MESSAGE_DOMAIN,
+                                                               "IDS_COM_BODY_CONNECTED_TO_A_USB_ACCESSORY"));
                break;
 
        default:
@@ -308,7 +306,7 @@ void load_connection_popup(UmMainData *ad)
        }
 
        ret = syspopup_launch(TICKERNOTI_SYSPOPUP, b);
-       if (0 != ret) {
+       if (0 <= ret) {
                USB_LOG("FAIL: syspopup_launch()\n");
        }
 
index f258fb7..1107e80 100644 (file)
@@ -25,7 +25,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
-int initAccessory(UsbAccessory *usbAcc)
+int getAccessoryInfo(UsbAccessory *usbAcc)
 {
        __USB_FUNC_ENTER__;
        if (!usbAcc) return -1;
@@ -57,7 +57,7 @@ int accessoryAttached(UmMainData *ad)
 {
        __USB_FUNC_ENTER__;
        if (!ad) return -1;
-       load_system_popup(ad, SELECT_PKG_FOR_ACC_POPUP);
+       //load_system_popup(ad, SELECT_PKG_FOR_ACC_POPUP);
        __USB_FUNC_EXIT__;
        return 0;
 }
@@ -67,8 +67,8 @@ int connectAccessory(UmMainData *ad)
        __USB_FUNC_ENTER__;
        if (!ad) return -1;
        int ret = -1;
-       ret = initAccessory(ad->usbAcc);
-       um_retvm_if(0 != ret, -1, "FAIL: initAccessory(ad->usbAcc)");
+       ret = getAccessoryInfo(ad->usbAcc);
+       um_retvm_if(0 != ret, -1, "FAIL: getAccessoryInfo(ad->usbAcc)");
        getCurrentAccessory(ad);
 
        /* Change usb mode to accessory mode */
@@ -131,7 +131,7 @@ int grantAccessoryPermission(UmMainData *ad, char *appId)
        return 0;
 }
 
-int launch_app(char *appId)
+int launch_acc_app(char *appId)
 {
        __USB_FUNC_ENTER__;
        if (appId == NULL) return -1;
@@ -145,7 +145,7 @@ int launch_app(char *appId)
        return 0;
 }
 
-Eina_Bool hasPermission(UmMainData *ad, char *appId)
+Eina_Bool hasAccPermission(UmMainData *ad, char *appId)
 {
        /* Check whether or not a package has permission to access to device/accessory */
        __USB_FUNC_ENTER__;
index d91924f..b248df7 100644 (file)
@@ -97,16 +97,16 @@ static int terminate_usb_connection(UmMainData *ad)
        if (ret < 0) USB_LOG("FAIL: um_usb_server_release_handler(ad)\n");
 
        ret = disconnectUsb(ad);
-       um_retm_if(0 != ret, "FAIL: disconnectUsb(ad)");
+       if(0 != ret) USB_LOG("FAIL: disconnectUsb(ad)");
 
        /* If USB accessory is removed, the vconf value of accessory status should be updated */
        ret = vconf_get_int(VCONFKEY_USB_ACCESSORY_STATUS, &status);
-       um_retm_if(0 != ret, "FAIL: vconf_get_int(VCONFKEY_USB_SERVER_ACCESSORY_STATUS_INT)\n");
-       if (VCONFKEY_USB_ACCESSORY_STATUS_CONNECTED == status) {
-               ret = vconf_set_int(VCONFKEY_USB_ACCESSORY_STATUS, VCONFKEY_USB_ACCESSORY_STATUS_DISCONNECTED);
-               um_retm_if(ret != 0, "FAIL: vconf_set_int(VCONFKEY_USB_ACCESSORY_STATUS, VCONFKEY_USB_ACCESSORY_STATUS_DISCONNECTED)");
+       if (0 == ret && VCONFKEY_USB_ACCESSORY_STATUS_CONNECTED == status) {
+               ret = vconf_set_int(VCONFKEY_USB_ACCESSORY_STATUS,
+                                               VCONFKEY_USB_ACCESSORY_STATUS_DISCONNECTED);
+               if(0 != ret) USB_LOG("FAIL: vconf_set_int(VCONFKEY_USB_ACCESSORY_STATUS");
                ret = disconnectAccessory(ad);
-               um_retm_if(ret != 0, "FAIL: disconnectAccessory(ad)\n");
+               if(0 != ret) USB_LOG("FAIL: disconnectAccessory(ad)\n");
        }
        ecore_main_loop_quit();
        __USB_FUNC_EXIT__;
@@ -222,11 +222,15 @@ int noti_selected_btn(UmMainData *ad, int input)
        char buf[SOCK_STR_LEN];
        int ret = -1;
        int ipc_result = -1;
-       if (input == REQ_PERM_NOTI_YES_BTN) {
+       switch (input) {
+       case REQ_ACC_PERM_NOTI_YES_BTN:
                ret = grantAccessoryPermission(ad, tempAppId);
                if (0 != ret) {
                        USB_LOG("FAIL: grant_permission_to_app(appId)");
                }
+               break;
+       default:
+               break;
        }
        FREE(tempAppId);
        sock_remote = ipc_noti_server_init();
@@ -284,13 +288,14 @@ Eina_Bool answer_to_ipc(void *data, Ecore_Fd_Handler *fd_handler)
 
                input = atoi(str);
                switch(input) {
-               case LAUNCH_APP:
+               case LAUNCH_APP_FOR_ACC:
                        ret = grantAccessoryPermission(ad, appId);
                        if (0 != ret) {
                                USB_LOG("FAIL: grant_permission_to_app(appId)");
                                snprintf(str, SOCK_STR_LEN, "%d", IPC_ERROR);
+                               break;
                        }
-                       ret = launch_app(ad->permittedPkgForAcc);
+                       ret = launch_acc_app(ad->permittedPkgForAcc);
                        if (0 != ret) {
                                USB_LOG("FAIL: launch_app(appId)");
                                snprintf(str, SOCK_STR_LEN, "%d", IPC_ERROR);
@@ -298,21 +303,21 @@ Eina_Bool answer_to_ipc(void *data, Ecore_Fd_Handler *fd_handler)
                        }
                        snprintf(str, SOCK_STR_LEN, "%d", IPC_SUCCESS);
                        break;
-               case REQUEST_PERMISSION:
+               case REQ_ACC_PERMISSION:
                        tempAppId = strdup(appId);
                        USB_LOG("tempAppId: %s\n", tempAppId);
-                       load_system_popup(ad, REQUEST_PERM_POPUP);
+                       load_system_popup(ad, REQ_ACC_PERM_POPUP);
                        snprintf(str, SOCK_STR_LEN, "%d", IPC_SUCCESS);
                        break;
-               case HAS_PERMISSION:
-                       if (EINA_TRUE == hasPermission(ad, appId)) {
+               case HAS_ACC_PERMISSION:
+                       if (EINA_TRUE == hasAccPermission(ad, appId)) {
                                snprintf(str, SOCK_STR_LEN, "%d", IPC_SUCCESS);
                        } else {
                                snprintf(str, SOCK_STR_LEN, "%d", IPC_FAIL);
                        }
                        break;
-               case REQ_PERM_NOTI_YES_BTN:
-               case REQ_PERM_NOTI_NO_BTN:
+               case REQ_ACC_PERM_NOTI_YES_BTN:
+               case REQ_ACC_PERM_NOTI_NO_BTN:
                        snprintf(str, SOCK_STR_LEN, "%d", IPC_SUCCESS);
                        ret = noti_selected_btn(ad, input);
                        if (ret < 0) USB_LOG("FAIL: noti_selected_btn(input)\n");
@@ -330,6 +335,13 @@ Eina_Bool answer_to_ipc(void *data, Ecore_Fd_Handler *fd_handler)
                        usb_connection_selected_btn(ad, input);
                        snprintf(str, SOCK_STR_LEN, "%d", IPC_SUCCESS);
                        break;
+               case IS_EMUL_BIN:
+                       if (is_emul_bin()) {
+                               snprintf(str, SOCK_STR_LEN, "%d", IPC_SUCCESS);
+                       } else {
+                               snprintf(str, SOCK_STR_LEN, "%d", IPC_FAIL);
+                       }
+                       break;
                default:
                        snprintf(str, SOCK_STR_LEN, "%d", IPC_ERROR);
                        break;