#include "bt-service-opp-client.h"
#include "bt-service-map-client.h"
#include "bt-service-tds.h"
+#include "bt-service-otp.h"
#ifdef TIZEN_FEATURE_BT_DPM
#include "bt-service-dpm.h"
if (strcasecmp(member, "GattValueChanged") == 0) {
/* Check TDS seekers waiting for Indication */
_bt_tds_check_indication(path, msg);
+#ifdef TIZEN_FEATURE_BT_OTP
+ _bt_otp_check_indication(path, msg);
+#endif
} else {
BT_INFO("Unhandled event");
}
param);
g_free(address);
+ } else if (strcasecmp(member, "OtcDisconnected") == 0) {
+ gboolean connected = FALSE;
+ GVariant *otc_param = NULL;
+
+ address = g_malloc0(BT_ADDRESS_STRING_SIZE);
+ _bt_convert_device_path_to_address(path, address);
+
+ BT_DBG("OTC Disconnected, address: %s", address);
+ otc_param = g_variant_new("(ibsn)", result, connected, address);
+
+ /* Send event to application */
+ _bt_send_event(BT_OTP_EVENT,
+ BLUETOOTH_EVENT_OTC_STATE_CHANGED,
+ otc_param);
+ g_free(address);
}
}
GError *error = NULL;
if (opc_obexd_conn == NULL) {
- opc_obexd_conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
+ opc_obexd_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
if (!opc_obexd_conn) {
if (error) {
GError *error = NULL;
if (map_obexd_conn == NULL) {
- map_obexd_conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
+ map_obexd_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
if (!map_obexd_conn) {
if (error) {
GError *error = NULL;
if (obexd_conn == NULL) {
- obexd_conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
+ obexd_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
if (error != NULL) {
BT_ERR("ERROR: Can't get on session bus [%s]", error->message);
g_clear_error(&error);