Kaydet (Commit) cf480d6c authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Move the DBusGObjectPath typedef and formatting changes to Bluetooth includes.

Change-Id: I7c1338ef2dae7831cddda8378a031a58011d7b17
üst 85267897
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment