diff --git a/doc/obex-client-api.txt b/doc/obex-client-api.txt
index 7c8de16..63aff1a 100644
--- a/doc/obex-client-api.txt
+++ b/doc/obex-client-api.txt
Copyright (C) 2007-2010 Marcel Holtmann <marcel@holtmann.org>
Copyright (C) 2011-2012 BMW Car IT GmbH. All rights reserved.
-Session hierarchy
-=================
-
-Service org.bluez.obex
-Interface org.bluez.obex.Session
-Object path [variable prefix]/{session0,session1,...}
-
-Methods string GetCapabilities()
-
- Get remote device capabilities.
-
-Properties string Source [readonly]
-
- string Destination [readonly]
-
- byte Channel [readonly]
-
Object Push hierarchy
=====================
diff --git a/doc/obexd-api.txt b/doc/obexd-api.txt
index 3b77e74..502d1ce 100644
--- a/doc/obexd-api.txt
+++ b/doc/obexd-api.txt
Unregister session and abort pending transfers.
+Session hierarchy
+=================
+
+Service org.bluez.obex
+Interface org.bluez.obex.Session1
+Object path /org/bluez/obex/session{0, 1, 2, ...}
+
+Methods string GetCapabilities()
+
+ Get remote device capabilities.
+
+Properties string Source [readonly]
+
+ Bluetooth adapter address
+
+ string Destination [readonly]
+
+ Bluetooth device address
+
+ byte Channel [readonly]
+
+ Bluetooth channel
+
+ string Target [readonly]
+
+ Target UUID
+
+ string Root [readonly]
+
+ Root path
+
Transfer hierarchy
===============
Number of bytes transferred. For queued transfers, this
value will not be present.
-
-Session hierarchy
-===============
-
-Service org.bluez.obex
-Interface org.bluez.obex.Session1
-Object path /org/bluez/obex/session{0, 1, 2, ...}
-
-Properties string Target [readonly]
-
- Target UUID
-
- string Root [readonly]
-
- Root path
diff --git a/obexd/client/session.c b/obexd/client/session.c
index 40d6c9c..cc10f88 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
#include "driver.h"
#include "transport.h"
-#define SESSION_INTERFACE "org.bluez.obex.Session"
+#define SESSION_INTERFACE "org.bluez.obex.Session1"
#define ERROR_INTERFACE "org.bluez.obex.Error"
#define SESSION_BASEPATH "/org/bluez/obex"
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
index 55b03d9..1202bfb 100644
--- a/obexd/src/manager.c
+++ b/obexd/src/manager.c
"Invalid arguments in method call");
}
+static inline DBusMessage *not_supported(DBusMessage *msg)
+{
+ return g_dbus_create_error(msg,
+ ERROR_INTERFACE ".NotSupported",
+ "Operation is not supported");
+}
+
static inline DBusMessage *agent_already_exists(DBusMessage *msg)
{
return g_dbus_create_error(msg,
return 0;
}
+static DBusMessage *session_get_capabilities(DBusConnection *connection,
+ DBusMessage *message, void *user_data)
+{
+ return not_supported(message);
+}
+
+static const GDBusMethodTable session_methods[] = {
+ { GDBUS_ASYNC_METHOD("GetCapabilities",
+ NULL, GDBUS_ARGS({ "capabilities", "s" }),
+ session_get_capabilities) },
+ { }
+};
+
void manager_register_session(struct obex_session *os)
{
char *path = g_strdup_printf("%s/session%u", OBEX_BASE_PATH, os->id);
if (!g_dbus_register_interface(connection, path,
SESSION_INTERFACE,
- NULL, NULL,
+ session_methods, NULL,
session_properties, os, NULL)) {
error("Cannot register Session interface.");
goto done;