summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-01 13:52:26 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-01 13:52:26 +0000
commit9491a544f622e40453265c30f24ce44a61440cc1 (patch)
tree2c00a3c63c9f021444a6b89f6f22369bf3a3073f /audio
parent3f8860031e5241fbb145fdd71e1a46c2c28f393e (diff)
Moving authorization code to dbus-service.c
Diffstat (limited to 'audio')
-rw-r--r--audio/main.c5
-rw-r--r--audio/manager.c10
2 files changed, 7 insertions, 8 deletions
diff --git a/audio/main.c b/audio/main.c
index 22a5e20a..eaa04806 100644
--- a/audio/main.c
+++ b/audio/main.c
@@ -29,14 +29,13 @@
#include <errno.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
-#include <bluetooth/sdp.h>
#include <glib.h>
-#include <dbus/dbus.h>
+
+#include "dbus.h"
#include "plugin.h"
#include "dbus-service.h"
-#include "dbus.h"
#include "logging.h"
#include "unix.h"
#include "device.h"
diff --git a/audio/manager.c b/audio/manager.c
index 9211ccb7..f33dc963 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -49,7 +49,9 @@
#include <dbus/dbus.h>
#include "dbus-helper.h"
-#include "dbus.h"
+#include "glib-helper.h"
+
+#include "dbus-service.h"
#include "logging.h"
#include "textfile.h"
#include "ipc.h"
@@ -63,8 +65,6 @@
#include "control.h"
#include "manager.h"
#include "sdpd.h"
-#include "plugin.h"
-#include "glib-helper.h"
typedef enum {
HEADSET = 1 << 0,
@@ -1195,7 +1195,7 @@ static void auth_cb(DBusError *derr, void *user_data)
error("Access denied: %s", derr->message);
if (dbus_error_has_name(derr, DBUS_ERROR_NO_REPLY)) {
debug("Canceling authorization request");
- if (plugin_cancel_auth(&device->dst) < 0)
+ if (service_cancel_auth(&device->dst) < 0)
manager_cancel_authorize(&device->dst, uuid,
NULL);
}
@@ -1283,7 +1283,7 @@ static gboolean ag_io_cb(GIOChannel *chan, GIOCondition cond, void *data)
return TRUE;
}
- if (plugin_req_auth(&device->src, &device->dst, uuid, auth_cb,
+ if (service_req_auth(&device->src, &device->dst, uuid, auth_cb,
device) == 0)
goto proceed;
else if (!manager_authorize(&device->dst, uuid, auth_cb_old, device,