diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index 22449c4..0a8e632 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
Possible errors: org.bluez.obex.Error.InvalidArguments
org.bluez.obex.Error.Failed
-Properties string Subject [readonly]
+Properties string Folder [readonly]
+
+ Folder which the message belongs to
+
+ string Subject [readonly]
Message subject
diff --git a/obexd/client/map.c b/obexd/client/map.c
index 8864a54..721fa25 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
char *status;
uint64_t attachment_size;
uint8_t flags;
+ char *folder;
GDBusPendingPropertySet pending;
};
g_free(msg->path);
g_free(msg->subject);
g_free(msg->handle);
+ g_free(msg->folder);
g_free(msg->timestamp);
g_free(msg->sender);
g_free(msg->sender_address);
msg->pending = 0;
}
+static gboolean get_folder(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &msg->folder);
+
+ return TRUE;
+}
+
static gboolean subject_exists(const GDBusPropertyTable *property, void *data)
{
struct map_msg *msg = data;
};
static const GDBusPropertyTable map_msg_properties[] = {
+ { "Folder", "s", get_folder },
{ "Subject", "s", get_subject, NULL, subject_exists },
{ "Timestamp", "s", get_timestamp, NULL, timestamp_exists },
{ "Sender", "s", get_sender, NULL, sender_exists },
msg->path = g_strdup_printf("%s/message%s",
obc_session_get_path(data->session),
handle);
+ msg->folder = g_strdup(obc_session_get_folder(data->session));
if (!g_dbus_register_interface(conn, msg->path, MAP_MSG_INTERFACE,
map_msg_methods, NULL,