Keep Tizen specific code under flag 28/163228/1
authorNagaraj D R <nagaraj.dr@samsung.com>
Thu, 7 Dec 2017 12:40:43 +0000 (18:10 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 8 Dec 2017 05:22:23 +0000 (14:22 +0900)
bluez upgradation will be difficult if
tizen specific code is not under a flag

Change-Id: I6e6b16a5ad9a9829de5c8d54059d8168b343b289
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/gatt-client.c
src/gatt-database.c

index dbceea6..05379ee 100644 (file)
@@ -1469,11 +1469,13 @@ static const GDBusMethodTable characteristic_methods[] = {
                                                { "options", "a{sv}" }),
                                        NULL,
                                        characteristic_write_value) },
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
        { GDBUS_ASYNC_METHOD("WriteValuebyType",
                                        GDBUS_ARGS({ "type", "y" }, { "value", "ay" },
                                                { "options", "a{sv}" }),
                                        NULL,
                                        characteristic_write_value_by_type) },
+#endif
        { GDBUS_ASYNC_METHOD("StartNotify", NULL, NULL,
                                        characteristic_start_notify) },
        { GDBUS_METHOD("StopNotify", NULL, NULL,
@@ -1780,7 +1782,6 @@ static void notify_service_added(struct service *service)
 
        return;
 }
-#endif
 
 static void notify_chrcs(struct service *service)
 {
@@ -1794,13 +1795,12 @@ static void notify_chrcs(struct service *service)
        g_dbus_emit_property_changed(btd_get_dbus_connection(), service->path,
                                                        GATT_SERVICE_IFACE,
                                                        "Characteristics");
-#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
        if (service->primary == true) {
                DBG("Notify Service Added");
                notify_service_added(service);
        }
-#endif
 }
+#endif
 
 struct export_data {
        void *root;
@@ -1884,7 +1884,7 @@ static bool create_characteristics(struct gatt_db_attribute *attr,
 
        return true;
 }
-
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
 static gboolean set_chrcs_ready(gpointer user_data)
 {
        struct service *service = user_data;
@@ -1894,7 +1894,7 @@ static gboolean set_chrcs_ready(gpointer user_data)
 
        return FALSE;
 }
-
+#endif
 static void export_service(struct gatt_db_attribute *attr, void *user_data)
 {
        struct btd_gatt_client *client = user_data;
index 38f3e73..d1d9c18 100644 (file)
@@ -2046,7 +2046,7 @@ static struct pending_op *send_read(struct btd_device *device,
 static struct pending_op *send_read(struct btd_device *device,
                                        struct gatt_db_attribute *attrib,
                                        GDBusProxy *proxy,
-                                       struct queue *owner_queue
+                                       struct queue *owner_queue,
                                        unsigned int id)
 #endif
 {