summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-09-20 09:54:29 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2012-09-20 10:25:47 +0200
commitcf480d6c37e8c58972ee8a3e3ce04747f3ae0b5e (patch)
tree68ac3925e99b8f6541de7d09fc5b6ac6a7dfd1c1 /sd
parentAdd SAL_INFO and SAL_WARN to linux bluetooth implementation. (diff)
downloadcore-cf480d6c37e8c58972ee8a3e3ce04747f3ae0b5e.tar.gz
core-cf480d6c37e8c58972ee8a3e3ce04747f3ae0b5e.zip
Move the DBusGObjectPath typedef and formatting changes to Bluetooth includes.
Change-Id: I7c1338ef2dae7831cddda8378a031a58011d7b17
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 69841c892f4d..56fd4718f068 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -12,17 +12,19 @@
#include <sal/log.hxx>
#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <sys/unistd.h>
-#include <sys/socket.h>
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/rfcomm.h>
-#define DBUS_TYPE_G_STRING_ANY_HASHTABLE (dbus_g_type_get_map( "GHashTable", G_TYPE_STRING, G_TYPE_VALUE ))
-
-#ifndef G_VALUE_INIT
- #define G_VALUE_INIT {0,{{0}}} // G_VALUE_INIT only present in glib >= 2.30
-#endif
+ #include <glib.h>
+ #include <dbus/dbus-glib.h>
+ #include <sys/unistd.h>
+ #include <sys/socket.h>
+ #include <bluetooth/bluetooth.h>
+ #include <bluetooth/rfcomm.h>
+ #define DBUS_TYPE_G_STRING_ANY_HASHTABLE (dbus_g_type_get_map( "GHashTable", G_TYPE_STRING, G_TYPE_VALUE ))
+ #ifndef G_VALUE_INIT
+ #define G_VALUE_INIT {0,{{0}}} // G_VALUE_INIT only present in glib >= 2.30
+ #endif
+ #ifndef DBusGObjectPath
+ #define DBusGObjectPath char // DBusGObjectPath is only present in newer version of dbus-glib
+ #endif
#endif
#ifdef WIN32
@@ -59,9 +61,7 @@ DBusGProxy* bluezGetDefaultAdapter( DBusGConnection* aConnection,
}
gboolean aResult;
- // The following should be a DBusGObjectPath, however the necessary
- // typedef is missing in older version of dbus-glib.
- char *aAdapterPath = NULL;
+ DBusGObjectPath* aAdapterPath = NULL;
aResult = dbus_g_proxy_call( aManager, "DefaultAdapter", &aError,
G_TYPE_INVALID,
DBUS_TYPE_G_OBJECT_PATH, &aAdapterPath,