summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-common.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-10-30 18:39:38 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-10-30 18:39:38 +0000
commite54736f31acc8d26d1f1e4a8b06ed66d258a24ef (patch)
tree44c92453396549e9b82934ed7f1fa30f1d2a93a6 /hcid/dbus-common.c
parentc9b2f56a13df506191c284b7977abe7e7aa8f0e5 (diff)
Cleanup: split dbus.h into several dbus-*.h files (one for each dbus-*.c file)
Diffstat (limited to 'hcid/dbus-common.c')
-rw-r--r--hcid/dbus-common.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
index 74e2d3ae..0c8d0339 100644
--- a/hcid/dbus-common.c
+++ b/hcid/dbus-common.c
@@ -48,6 +48,13 @@
#include "hcid.h"
#include "list.h"
#include "dbus.h"
+#include "dbus-error.h"
+#include "dbus-adapter.h"
+#include "dbus-security.h"
+#include "dbus-test.h"
+#include "dbus-rfcomm.h"
+#include "dbus-sdp.h"
+#include "dbus-common.h"
static int name_listener_initialized = 0;
@@ -470,3 +477,27 @@ int check_address(const char *addr)
return 0;
}
+DBusHandlerResult handle_method_call(DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ const char *iface, *name;
+
+ iface = dbus_message_get_interface(msg);
+ name = dbus_message_get_member(msg);
+
+ if (!strcmp(DBUS_INTERFACE_INTROSPECTABLE, iface) &&
+ !strcmp("Introspect", name))
+ return simple_introspect(conn, msg, data);
+ else if (!strcmp(ADAPTER_INTERFACE, iface))
+ return handle_adapter_method(conn, msg, data);
+ else if (!strcmp(SECURITY_INTERFACE, iface))
+ return handle_security_method(conn, msg, data);
+ else if (!strcmp(TEST_INTERFACE, iface))
+ return handle_test_method(conn, msg, data);
+ else if (!strcmp(RFCOMM_INTERFACE, iface))
+ return handle_rfcomm_method(conn, msg, data);
+ else if (!strcmp(SDP_INTERFACE, iface))
+ return handle_sdp_method(conn, msg, data);
+ else
+ return error_unknown_method(conn, msg);
+}
+