#include "btio.h"
#include "service.h"
-#define OPENOBEX_MANAGER_PATH "/"
-#define OPENOBEX_MANAGER_INTERFACE OPENOBEX_SERVICE ".Manager"
-#define ERROR_INTERFACE OPENOBEX_SERVICE ".Error"
-#define TRANSFER_INTERFACE OPENOBEX_SERVICE ".Transfer"
-#define SESSION_INTERFACE OPENOBEX_SERVICE ".Session"
+#define OBEX_MANAGER_PATH "/"
+#define OBEX_MANAGER_INTERFACE OBEXD_SERVICE ".Manager"
+#define ERROR_INTERFACE OBEXD_SERVICE ".Error"
+#define TRANSFER_INTERFACE OBEXD_SERVICE ".Transfer"
+#define SESSION_INTERFACE OBEXD_SERVICE ".Session"
#define TIMEOUT 60*1000 /* Timeout for user response (miliseconds) */
dbus_error_init(&err);
- connection = g_dbus_setup_bus(DBUS_BUS_SESSION, OPENOBEX_SERVICE,
- &err);
+ connection = g_dbus_setup_bus(DBUS_BUS_SESSION, OBEXD_SERVICE, &err);
if (connection == NULL) {
if (dbus_error_is_set(&err) == TRUE) {
fprintf(stderr, "%s\n", err.message);
return FALSE;
}
- return g_dbus_register_interface(connection, OPENOBEX_MANAGER_PATH,
- OPENOBEX_MANAGER_INTERFACE,
+ return g_dbus_register_interface(connection, OBEX_MANAGER_PATH,
+ OBEX_MANAGER_INTERFACE,
manager_methods, manager_signals, NULL,
NULL, NULL);
}
{
DBG("");
- g_dbus_unregister_interface(connection, OPENOBEX_MANAGER_PATH,
- OPENOBEX_MANAGER_INTERFACE);
+ g_dbus_unregister_interface(connection, OBEX_MANAGER_PATH,
+ OBEX_MANAGER_INTERFACE);
/* FIXME: Release agent? */
{
char *path = g_strdup_printf("/transfer%u", os->id);
- g_dbus_emit_signal(connection, OPENOBEX_MANAGER_PATH,
- OPENOBEX_MANAGER_INTERFACE, "TransferStarted",
+ g_dbus_emit_signal(connection, OBEX_MANAGER_PATH,
+ OBEX_MANAGER_INTERFACE, "TransferStarted",
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID);
{
char *path = g_strdup_printf("/transfer%u", os->id);
- g_dbus_emit_signal(connection, OPENOBEX_MANAGER_PATH,
- OPENOBEX_MANAGER_INTERFACE, "TransferCompleted",
+ g_dbus_emit_signal(connection, OBEX_MANAGER_PATH,
+ OBEX_MANAGER_INTERFACE, "TransferCompleted",
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_BOOLEAN, &success,
DBUS_TYPE_INVALID);
goto done;
}
- g_dbus_emit_signal(connection, OPENOBEX_MANAGER_PATH,
- OPENOBEX_MANAGER_INTERFACE, "SessionCreated",
+ g_dbus_emit_signal(connection, OBEX_MANAGER_PATH,
+ OBEX_MANAGER_INTERFACE, "SessionCreated",
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID);
{
char *path = g_strdup_printf("/session%u", GPOINTER_TO_UINT(os));
- g_dbus_emit_signal(connection, OPENOBEX_MANAGER_PATH,
- OPENOBEX_MANAGER_INTERFACE, "SessionRemoved",
+ g_dbus_emit_signal(connection, OBEX_MANAGER_PATH,
+ OBEX_MANAGER_INTERFACE, "SessionRemoved",
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID);