Marge branch 'master' into tizen_2.1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 28 Mar 2013 00:42:18 +0000 (09:42 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 28 Mar 2013 00:42:18 +0000 (09:42 +0900)
Change-Id: I22bc7e0ea59f955a106b4aabfb54d0ce881b094a

CMakeLists.txt
org.tizen.bt-syspopup.manifest
packaging/org.tizen.bt-syspopup.spec
src/bt-syspopup.c
src/bt-syspopup.h

index 673bd77..4956f8b 100644 (file)
@@ -32,6 +32,7 @@ pkg_check_modules(pkgs REQUIRED
        syspopup
        utilX
        bluetooth-api
+       feedback
        aul)
 
 FOREACH(flag ${pkgs_CFLAGS})
index 66b5ce3..199a75a 100644 (file)
@@ -4,6 +4,7 @@
     </define>
     <assign>
         <filesystem path="/usr/share/applications/org.tizen.bt-syspopup.desktop" label="_"/>
+       <filesystem path="/opt/share/icons/default/small/org.tizen.bt-syspopup.png" label="_"/>
     </assign>
     <request>
         <domain name="org.tizen.bt-syspopup"/>
index 3adcd99..140f51c 100644 (file)
@@ -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}
index d12ad92..fdc5cb4 100644 (file)
@@ -25,6 +25,7 @@
 #include <E_DBus.h>
 #include <aul.h>
 #include <bluetooth-api.h>
+#include <feedback.h>
 
 #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 = {
index 95e9e78..333b3ea 100644 (file)
@@ -30,6 +30,8 @@
 #define PREFIX "/opt/apps"PACKAGE_NAME
 #endif
 
+#define EXPORT __attribute__((visibility("default")))
+
 #define TEMP_DIR       "/tmp"
 
 #define PACKAGE                "bt-syspopup"