From: DoHyun Pyun Date: Thu, 28 Mar 2013 00:42:18 +0000 (+0900) Subject: Marge branch 'master' into tizen_2.1 X-Git-Tag: 2.1b_release~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86c2d8c47a82bd515de280aef839c90b64660cd2;p=apps%2Fhome%2Fbt-syspopup.git Marge branch 'master' into tizen_2.1 Change-Id: I22bc7e0ea59f955a106b4aabfb54d0ce881b094a --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 673bd77..4956f8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ pkg_check_modules(pkgs REQUIRED syspopup utilX bluetooth-api + feedback aul) FOREACH(flag ${pkgs_CFLAGS}) diff --git a/org.tizen.bt-syspopup.manifest b/org.tizen.bt-syspopup.manifest index 66b5ce3..199a75a 100644 --- a/org.tizen.bt-syspopup.manifest +++ b/org.tizen.bt-syspopup.manifest @@ -4,6 +4,7 @@ + diff --git a/packaging/org.tizen.bt-syspopup.spec b/packaging/org.tizen.bt-syspopup.spec index 3adcd99..140f51c 100644 --- a/packaging/org.tizen.bt-syspopup.spec +++ b/packaging/org.tizen.bt-syspopup.spec @@ -27,6 +27,7 @@ BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(devman_haptic) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(bluetooth-api) +BuildRequires: pkgconfig(feedback) BuildRequires: sysman-internal-devel BuildRequires: edje-tools @@ -41,6 +42,8 @@ bluetooth system-popup application (bluetooth system popup). %build +export CFLAGS+=" -fpie -fvisibility=hidden" +export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie" cmake . -DCMAKE_INSTALL_PREFIX=%{_appdir}/org.tizen.bt-syspopup make %{?jobs:-j%jobs} diff --git a/src/bt-syspopup.c b/src/bt-syspopup.c index d12ad92..fdc5cb4 100644 --- a/src/bt-syspopup.c +++ b/src/bt-syspopup.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "bt-syspopup.h" @@ -70,6 +71,28 @@ static void __bluetooth_cleanup(struct bt_popup_appdata *ad) } } +static void __bluetooth_notify_event(void) +{ + int result; + + BT_DBG("Notify event"); + + result = feedback_initialize(); + if (result != FEEDBACK_ERROR_NONE) { + BT_ERR("feedback_initialize error : %d", result); + return; + } + + result = feedback_play(FEEDBACK_PATTERN_GENERAL); + BT_DBG("ret value : %d", result); + + result = feedback_deinitialize(); + if (result != FEEDBACK_ERROR_NONE) { + BT_DBG("feedback_initialize error : %d", result); + return; + } +} + static void __bluetooth_parse_event(struct bt_popup_appdata *ad, const char *event_type) { if (!strcasecmp(event_type, "pin-request")) @@ -138,7 +161,7 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad) case BT_EVENT_PASSKEY_REQUEST: dbus_g_proxy_call_no_reply(ad->agent_proxy, - "ReplyPassKey", + "ReplyPasskey", G_TYPE_UINT, BT_AGENT_CANCEL, G_TYPE_STRING, "", G_TYPE_INVALID, G_TYPE_INVALID); @@ -291,7 +314,7 @@ static void __bluetooth_input_request_cb(void *data, G_TYPE_INVALID); } else { dbus_g_proxy_call_no_reply(ad->agent_proxy, - "ReplyPassKey", + "ReplyPasskey", G_TYPE_UINT, BT_AGENT_ACCEPT, G_TYPE_STRING, convert_input_text, @@ -309,7 +332,7 @@ static void __bluetooth_input_request_cb(void *data, G_TYPE_INVALID); } else { dbus_g_proxy_call_no_reply(ad->agent_proxy, - "ReplyPassKey", + "ReplyPasskey", G_TYPE_UINT, BT_AGENT_CANCEL, G_TYPE_STRING, "", G_TYPE_INVALID, @@ -1155,6 +1178,8 @@ static int __bluetooth_terminate(void *data) { struct bt_popup_appdata *ad = data; + __bluetooth_ime_hide(); + if (ad->conn) { dbus_g_connection_unref(ad->conn); ad->conn = NULL; @@ -1233,6 +1258,8 @@ static int __bluetooth_reset(bundle *b, void *data) if (ret != 0) __bluetooth_remove_all_event(ad); + __bluetooth_notify_event(); + /* Change LCD brightness */ ret = pm_change_state(LCD_NORMAL); if (ret != 0) @@ -1245,7 +1272,7 @@ static int __bluetooth_reset(bundle *b, void *data) return 0; } -int main(int argc, char *argv[]) +EXPORT int main(int argc, char *argv[]) { struct bt_popup_appdata ad; struct appcore_ops ops = { diff --git a/src/bt-syspopup.h b/src/bt-syspopup.h index 95e9e78..333b3ea 100644 --- a/src/bt-syspopup.h +++ b/src/bt-syspopup.h @@ -30,6 +30,8 @@ #define PREFIX "/opt/apps"PACKAGE_NAME #endif +#define EXPORT __attribute__((visibility("default"))) + #define TEMP_DIR "/tmp" #define PACKAGE "bt-syspopup"