3.0 specific patch: change dbus_g to g_dbus 32/40832/2
authorseungku kim <seungku.kim@samsung.com>
Tue, 9 Jun 2015 11:54:13 +0000 (20:54 +0900)
committerseungku kim <seungku.kim@samsung.com>
Wed, 10 Jun 2015 05:48:17 +0000 (14:48 +0900)
Change-Id: I547990108d860e1fbcbdae04296d07b4bade992c
TODO: __bt_service_check_privilege() should be resolved

bt-service/CMakeLists.txt
bt-service/bt-request-handler.c
packaging/bluetooth-frwk.spec

index 96e5b8c..3fc3231 100644 (file)
@@ -62,7 +62,7 @@ SET(PKG_MODULES
        capi-network-connection
        pkgmgr
        cynara-client
-       cynara-creds-dbus
+       cynara-creds-gdbus
 )
 
 IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_NETWORK_TETHERING_ENABLE")
index b734b6f..1484486 100644 (file)
@@ -26,7 +26,7 @@
 #include <dlog.h>
 #include <gio/gio.h>
 #include <cynara-client.h>
-#include <cynara-creds-dbus.h>
+#include <cynara-creds-gdbus.h>
 
 #include "bluetooth-api.h"
 #include "bt-service-common.h"
@@ -178,7 +178,7 @@ static void __bt_service_method(GDBusConnection *connection,
 
                out_param1 = g_array_new(FALSE, FALSE, sizeof(gchar));
 
-               sender = dbus_g_method_get_sender(invocation);
+               sender = g_dbus_method_invocation_get_sender(invocation);
 
                if (service_type == BT_CORE_SERVICE) {
                        BT_DBG("No need to check privilege from bt-core");
@@ -1893,7 +1893,6 @@ gboolean __bt_service_check_privilege(int function_name,
         char *client_creds = NULL;
         char *user_creds = NULL;
         char *client_session = "";
-        DBusConnection *conn = NULL;
         int client_creds_method = CLIENT_METHOD_SMACK;
         int user_creds_method = USER_METHOD_UID;
         char err_msg[256] = {0, };
@@ -1902,10 +1901,7 @@ gboolean __bt_service_check_privilege(int function_name,
 
         BT_DBG("unique_name: %s", unique_name);
 
-        if (bt_service_conn)
-                conn = dbus_g_connection_get_connection(bt_service_conn);
-
-        retv_if(conn == NULL, FALSE);
+        retv_if(bt_service_conn == NULL, FALSE);
 
         ret_val = cynara_creds_get_default_client_method(&client_creds_method);
         if (ret_val != CYNARA_API_SUCCESS) {
@@ -1921,7 +1917,7 @@ gboolean __bt_service_check_privilege(int function_name,
                 return FALSE;
         }
 
-        ret_val = cynara_creds_dbus_get_client(conn, unique_name, client_creds_method, &client_creds);
+        ret_val = cynara_creds_gdbus_get_client(bt_service_conn, unique_name, client_creds_method, &client_creds);
         if (ret_val != CYNARA_API_SUCCESS) {
                 cynara_strerror(ret_val, err_msg, sizeof(err_msg));
                 BT_ERR("Fail to get client credential: %s", err_msg);
@@ -1930,7 +1926,7 @@ gboolean __bt_service_check_privilege(int function_name,
 
         BT_DBG("client_creds: %s", client_creds);
 
-        ret_val = cynara_creds_dbus_get_user(conn, unique_name, user_creds_method, &user_creds);
+        ret_val = cynara_creds_gdbus_get_user(bt_service_conn, unique_name, user_creds_method, &user_creds);
         if (ret_val != CYNARA_API_SUCCESS) {
                 cynara_strerror(ret_val, err_msg, sizeof(err_msg));
                 BT_ERR("Fail to get user credential: %s", err_msg);
index 0394314..fa5a110 100644 (file)
@@ -55,7 +55,7 @@ BuildRequires:  pkgconfig(capi-network-tethering)
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(libprivilege-control)
 BuildRequires:  pkgconfig(cynara-client)
-BuildRequires:  pkgconfig(cynara-creds-dbus)
+BuildRequires:  pkgconfig(cynara-creds-gdbus)
 
 Requires(post): /usr/bin/vconftool
 Requires(post): /sbin/ldconfig
@@ -122,7 +122,7 @@ export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
 
 %if "%{?profile}" == "tv"
 echo tv
-export CFLAGS="$CFLAGS -DUSB_BLUETOOTH"
+export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV"
 %endif
 
 %ifarch x86_64