Revert "Add define and modify wearable code" 96/77396/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 29 Jun 2016 12:55:48 +0000 (21:55 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 29 Jun 2016 12:55:55 +0000 (21:55 +0900)
This reverts commit 4a4b6249cb575771b54e812454961555ed2d2f05.

Change-Id: I6c56d7cd7577c00fb5f6684d9f2dd20a2d83bcfb

CMakeLists.txt
src/bt-syspopup-m.c
src/bt-syspopup-w.c

index 4bb06c4c718095e3b0a4771252c2edcf415af2b7..b0408a535df9d4472dba93e16ee9d7b232cf70f8 100644 (file)
@@ -91,7 +91,6 @@ ENDIF("${ARCH}" STREQUAL "arm")
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DNO_DBUS_REPLY")
 
 IF(WAYLAND_SUPPORT)
   ADD_DEFINITIONS(
index 63264744da69b1216ab5e346f1b1c075f1f111de..3e62e095be51de6f266ac573bda4f068c20c08cd 100644 (file)
@@ -456,15 +456,13 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
        BT_INFO("Remove event 0X%X", ad->event_type);
        switch (ad->event_type) {
        case BT_EVENT_PIN_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply("0000", false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyPinCode",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_STRING, "", G_TYPE_INVALID,
                                           G_TYPE_INVALID);
-#endif
+
                break;
 
 
@@ -475,26 +473,22 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
                break;
 
        case BT_EVENT_PASSKEY_CONFIRM_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(true);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_PASSKEY_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply("0000", false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyPasskey",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_STRING, "", G_TYPE_INVALID,
                                           G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_PASSKEY_DISPLAY_REQUEST:
@@ -502,15 +496,12 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
                break;
 
        case BT_EVENT_AUTHORIZE_REQUEST:
-#ifdef NO_DBUS_REPLY
-               /* Should add 1 more API for authorize reply */
-               bt_passkey_confirmation_reply(true);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyAuthorize",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_APP_CONFIRM_REQUEST:
@@ -542,14 +533,12 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
        case BT_EVENT_PHONEBOOK_REQUEST:
        case BT_EVENT_MESSAGE_REQUEST:
        case BT_EVENT_EXCHANGE_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyAuthorize",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_CONFIRM_OVERWRITE_REQUEST: {
@@ -652,23 +641,15 @@ static void __bluetooth_input_request_cb(void *data,
                     (response == BT_AGENT_ACCEPT) ? "Accept" : "Cancel");
 
        if (ad->event_type == BT_EVENT_PIN_REQUEST) {
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply(convert_input_text, true);
-#else
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                   "ReplyPinCode", G_TYPE_UINT, response,
                                   G_TYPE_STRING, convert_input_text,
                                   G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
        } else {
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply(convert_input_text, true);
-#else
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                   "ReplyPasskey", G_TYPE_UINT, response,
                                   G_TYPE_STRING, convert_input_text,
                                   G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
        }
        __bluetooth_delete_input_view(ad);
 
@@ -697,21 +678,19 @@ static void __bluetooth_passkey_confirm_cb(void *data,
        const char *event = elm_object_text_get(obj);
 
        if (!g_strcmp0(event, BT_STR_CONFIRM)) {
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(true);
-#else
+#if 0
                dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_ACCEPT,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
 #endif
+               bt_passkey_confirmation_reply(true);
        } else {
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
+#if 0
                dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
 #endif
+               bt_passkey_confirmation_reply(false);
        }
 
        evas_object_del(obj);
@@ -790,16 +769,9 @@ static void __bluetooth_authorization_request_cb(void *data,
                reply_val = BT_AGENT_CANCEL;
        }
 
-#ifdef NO_DBUS_REPLY
-       if (reply_val == BT_AGENT_ACCEPT || reply_val == BT_AGENT_ACCEPT_ALWAYS)
-               bt_passkey_confirmation_reply(true);
-       else
-               bt_passkey_confirmation_reply(false);
-#else
        dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyAuthorize",
                G_TYPE_UINT, reply_val,
                G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
 
        ad->make_trusted = FALSE;
 
@@ -828,12 +800,6 @@ static void __bluetooth_push_authorization_request_cb(void *data,
 
        const char *event = elm_object_text_get(obj);
 
-#ifdef NO_DBUS_REPLY
-       if (!g_strcmp0(event, BT_STR_OK))
-               bt_passkey_confirmation_reply(true);
-       else
-               bt_passkey_confirmation_reply(false);
-#else
        if (!g_strcmp0(event, BT_STR_OK))
                dbus_g_proxy_call_no_reply(ad->obex_proxy, "ReplyAuthorize",
                                           G_TYPE_UINT, BT_AGENT_ACCEPT,
@@ -842,7 +808,7 @@ static void __bluetooth_push_authorization_request_cb(void *data,
                dbus_g_proxy_call_no_reply(ad->obex_proxy, "ReplyAuthorize",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
        __bluetooth_win_del(ad);
 }
 
@@ -1206,6 +1172,7 @@ static void __bluetooth_input_mouseup_cb(void *data,
        FN_START;
        Evas_Event_Mouse_Up *ev = event_info;
        struct bt_popup_appdata *ad = data;
+       int response = BT_AGENT_CANCEL;
        char *input_text = NULL;
        char *convert_input_text = NULL;
 
@@ -1231,11 +1198,6 @@ static void __bluetooth_input_mouseup_cb(void *data,
                if (convert_input_text == NULL)
                        return;
 
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply(convert_input_text, true);
-#else
-               int response = BT_AGENT_CANCEL;
-
                if (ad->event_type == BT_EVENT_PIN_REQUEST) {
                        dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyPinCode", G_TYPE_UINT, response,
@@ -1247,7 +1209,6 @@ static void __bluetooth_input_mouseup_cb(void *data,
                                           G_TYPE_STRING, convert_input_text,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
                }
-#endif
                __bluetooth_delete_input_view(ad);
                free(convert_input_text);
                if (ad->entry) {
index 715ad304ca63fa5040b69d81f0c5e434243027f2..4bd13201c042c7b549a97256f4f73c40aee04e7e 100644 (file)
@@ -25,7 +25,6 @@
 #include <E_DBus.h>
 #include <aul.h>
 #include <bluetooth.h>
-#include <bluetooth_internal.h>
 #include <feedback.h>
 #include <device/display.h>
 #include <efl_extension.h>
@@ -290,17 +289,16 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
        BT_INFO("Remove event 0X%X", ad->event_type);
        switch (ad->event_type) {
        case BT_EVENT_PIN_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply("0000", false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyPinCode",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_STRING, "", G_TYPE_INVALID,
                                           G_TYPE_INVALID);
-#endif
+
                break;
 
+
        case BT_EVENT_KEYBOARD_PASSKEY_REQUEST:
 
                __bluetooth_request_to_cancel();
@@ -308,28 +306,23 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
                break;
 
        case BT_EVENT_PASSKEY_CONFIRM_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
                __unlock_display();
 
                break;
 
        case BT_EVENT_PASSKEY_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_reply("0000", false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyPasskey",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_STRING, "", G_TYPE_INVALID,
                                           G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_PASSKEY_DISPLAY_REQUEST:
@@ -337,14 +330,12 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
                break;
 
        case BT_EVENT_AUTHORIZE_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyAuthorize",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_APP_CONFIRM_REQUEST:
@@ -374,14 +365,12 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
 
        case BT_EVENT_PUSH_AUTHORIZE_REQUEST:
        case BT_EVENT_EXCHANGE_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyAuthorize",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
                break;
 
        case BT_EVENT_CONFIRM_OVERWRITE_REQUEST: {
@@ -405,14 +394,11 @@ static void __bluetooth_remove_all_event(struct bt_popup_appdata *ad)
        }
 
        case BT_EVENT_SYSTEM_RESET_REQUEST:
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
+
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                           "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
                __unlock_display();
 
                break;
@@ -519,23 +505,15 @@ static void __bluetooth_passkey_confirm_cb(void *data,
        if (!g_strcmp0(style, "popup/circle/right")) {
                BT_INFO("Accept the pairing passkey");
                __bluetooth_send_signal_pairing_confirm_result(ad, 1);
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(true);
-#else
                dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_ACCEPT,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
        } else {
                BT_INFO("Reject the pairing passkey");
                __bluetooth_send_signal_pairing_confirm_result(ad, 0);
-#ifdef NO_DBUS_REPLY
-               bt_passkey_confirmation_reply(false);
-#else
                dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyConfirmation",
                                           G_TYPE_UINT, BT_AGENT_CANCEL,
                                           G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
        }
        __unlock_display();
 
@@ -600,14 +578,10 @@ static void __bluetooth_reset_cb(void *data, Evas_Object *obj, void *event_info)
        const char *style = elm_object_style_get(obj);
 
        __bluetooth_send_signal_pairing_confirm_result(ad, 0);
-
-#ifdef NO_DBUS_REPLY
-       bt_passkey_confirmation_reply(false);
-#else
        dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyConfirmation",
                                   G_TYPE_UINT, BT_AGENT_CANCEL,
                                   G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
+
        if (!g_strcmp0(style, "popup/circle/right")) {
                BT_INFO("Confirm Soft reset");
                reset = 1;
@@ -658,16 +632,9 @@ static void __bluetooth_authorization_request_cb(void *data,
                reply_val = BT_AGENT_CANCEL;
        }
 
-#ifdef NO_DBUS_REPLY
-       if (reply_val == BT_AGENT_ACCEPT || reply_val == BT_AGENT_ACCEPT_ALWAYS)
-               bt_passkey_confirmation_reply(true);
-       else
-               bt_passkey_confirmation_reply(false);
-#else
        dbus_g_proxy_call_no_reply(ad->agent_proxy, "ReplyAuthorize",
                G_TYPE_UINT, reply_val,
                G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
 
        evas_object_del(obj);
        __bluetooth_win_del(ad);
@@ -1276,9 +1243,6 @@ static void __bluetooth_pincode_btn_cb(void *data, Evas_Object *obj,
        bt_pincode_input_object *po = ad->po;
        retm_if(po == NULL, "ad is NULL!");
 
-#ifdef NO_DBUS_REPLY
-       bt_passkey_reply(po->pincode, true);
-#else
        if (ad->event_type == BT_EVENT_PIN_REQUEST) {
                dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                        "ReplyPinCode", G_TYPE_UINT, BT_AGENT_ACCEPT,
@@ -1290,7 +1254,6 @@ static void __bluetooth_pincode_btn_cb(void *data, Evas_Object *obj,
                                        G_TYPE_STRING, po->pincode,
                                        G_TYPE_INVALID, G_TYPE_INVALID);
        }
-#endif
 
        if (po->pincode) {
                g_free(po->pincode);
@@ -1717,15 +1680,10 @@ static int __bluetooth_launch_handler(struct bt_popup_appdata *ad,
                                free(conv_str);
 
                        __bluetooth_send_signal_pairing_confirm_result(ad, 1);
-
-#ifdef NO_DBUS_REPLY
-                       bt_passkey_confirmation_reply(true);
-#else
                        dbus_g_proxy_call_no_reply(ad->agent_proxy,
                                        "ReplyConfirmation",
                                        G_TYPE_UINT, BT_AGENT_ACCEPT,
                                        G_TYPE_INVALID, G_TYPE_INVALID);
-#endif
                }
                break;
        }