diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2018-09-26 15:26:21 +0800 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2018-10-08 13:08:11 +0000 |
commit | 85a473cd9a9f3c6ef34a80245696aa009a6facf0 (patch) | |
tree | 3ed992dd0ab93b6114f4c89c8a72f048699df574 /binding-bluetooth | |
parent | b6acaeea244541d58b0ff1fc6b7d1dc1dc79cc8a (diff) |
binding: bluetooth: remove useless setHMIStatus
Since homescreen now uses libqtappfw to set the Bluetooth status icon, and
no longer uses dbus the setHMIStatus function can be removed.
Change-Id: I9155a4eb9b380c034deca6402de43bf785b323cd
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding-bluetooth')
-rw-r--r-- | binding-bluetooth/bluetooth-api.c | 4 | ||||
-rw-r--r-- | binding-bluetooth/bluetooth-manager.c | 36 | ||||
-rw-r--r-- | binding-bluetooth/bluetooth-manager.h | 4 |
3 files changed, 0 insertions, 44 deletions
diff --git a/binding-bluetooth/bluetooth-api.c b/binding-bluetooth/bluetooth-api.c index 61fa204..3f32db1 100644 --- a/binding-bluetooth/bluetooth-api.c +++ b/binding-bluetooth/bluetooth-api.c @@ -296,8 +296,6 @@ static void bt_power (struct afb_req request) if (0==ret) { - - setHMIStatus(ACTIVE); (TRUE==power_value)?json_object_object_add (jresp, "power", json_object_new_string ("on")) : json_object_object_add (jresp, "power", json_object_new_string ("off")); } @@ -318,7 +316,6 @@ static void bt_power (struct afb_req request) return; } json_object_object_add (jresp, "power", json_object_new_string ("on")); - setHMIStatus(ACTIVE); } /* "?value=" parameter is "0" or "false" */ @@ -331,7 +328,6 @@ static void bt_power (struct afb_req request) } json_object_object_add (jresp, "power", json_object_new_string("off")); - setHMIStatus(INACTIVE); } else { diff --git a/binding-bluetooth/bluetooth-manager.c b/binding-bluetooth/bluetooth-manager.c index 38e780b..fd80f10 100644 --- a/binding-bluetooth/bluetooth-manager.c +++ b/binding-bluetooth/bluetooth-manager.c @@ -1140,10 +1140,7 @@ gboolean bt_autoconnect(gpointer ptr) tmp = tmp->next; if (ret == FALSE) - { - setHMIStatus(ACTIVE); break; - } } return ret; @@ -1982,36 +1979,3 @@ void BindingAPIRegister(const Binding_RegisterCallback_t* pstRegisterCallback) } } } - -GError* setHMIStatus(enum btStates state) { - - gchar *iconString = NULL; - GDBusConnection *connection; - GVariant *params = NULL; - GVariant *message = NULL; - GError *error = NULL; - - if (state==INACTIVE) iconString = "qrc:/images/Status/HMI_Status_Bluetooth_Inactive-01.png"; - else if (state==ACTIVE) iconString = "qrc:/images/Status/HMI_Status_Bluetooth_On-01.png"; - else iconString = "qrc:/images/Status/HMI_Status_Bluetooth_Inactive-01.png"; - - connection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error); - - params = g_variant_new("(is)", HOMESCREEN_BT_ICON_POSITION, iconString); - - message = g_dbus_connection_call_sync(connection, HOMESCREEN_SERVICE, - HOMESCREEN_ICON_PATH, HOMESCREEN_ICON_INTERFACE, "setStatusIcon", params, - NULL, G_DBUS_CALL_FLAGS_NONE, - DBUS_REPLY_TIMEOUT, NULL, &error); - - if (error) { - printf("error: %s\n", error->message); - - return error; - } else { - return NULL; - } - -} - - diff --git a/binding-bluetooth/bluetooth-manager.h b/binding-bluetooth/bluetooth-manager.h index 4ad27e4..3e22cb8 100644 --- a/binding-bluetooth/bluetooth-manager.h +++ b/binding-bluetooth/bluetooth-manager.h @@ -162,8 +162,6 @@ typedef struct tagBinding_RegisterCallback gboolean (*binding_request_confirmation)(const gchar *device, guint passkey); }Binding_RegisterCallback_t; -enum btStates {INACTIVE, ACTIVE}; - void DebugTraceSendMsg(int level, gchar* message); /* ------ PUBLIC PLUGIN FUNCTIONS --------- */ @@ -190,8 +188,6 @@ int device_priority_list(void *(object_cb)(void *, gchar *), void *ptr); int adapter_set_property(const gchar* property, gboolean value) ; -GError* setHMIStatus(enum btStates); - #endif #endif /* BLUETOOTH_MANAGER_H */ |