diff --git a/obexd/src/obex.c b/obexd/src/obex.c
index 54ae5af..f039476 100644
--- a/obexd/src/obex.c
+++ b/obexd/src/obex.c
#include "dbus.h"
#include "mimetype.h"
#include "service.h"
+#include "btio.h"
/* Default MTU's */
#define DEFAULT_RX_MTU 32767
return os->driver->remove(path);
}
+
+/* TODO: find a way to do this for tty or fix syncevolution */
+char *obex_get_id(struct OBEX_session *os)
+{
+ GError *gerr = NULL;
+ gchar address[18];
+ guint8 channel;
+
+ bt_io_get(os->io, BT_IO_RFCOMM, &gerr,
+ BT_IO_OPT_DEST, address,
+ BT_IO_OPT_CHANNEL, &channel,
+ BT_IO_OPT_INVALID);
+ if (gerr)
+ return NULL;
+
+ return g_strdup_printf("%s+%d", address, channel);
+}
diff --git a/obexd/src/obex.h b/obexd/src/obex.h
index 12f6117..62498f5 100644
--- a/obexd/src/obex.h
+++ b/obexd/src/obex.h
const char *obex_get_capability_path(struct OBEX_session *os);
gboolean obex_get_auto_accept(struct OBEX_session *os);
int obex_remove(struct OBEX_session *os, const char *path);
+char *obex_get_id(struct OBEX_session *os);
void server_free(struct server *server);
int tty_init(gint service, const gchar *folder, const gchar *capability,