diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index 10534e5..6246933 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
Possible values: "complete",
"fractioned" and "notification"
+ uint64 AttachmentSize:
+
+ Message overall attachment size in bytes
+
boolean Priority:
Message priority flag
diff --git a/obexd/client/map.c b/obexd/client/map.c
index d32d6ac..f9f7c4f 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
char *type;
uint64_t size;
char *status;
+ uint64_t attachment_size;
uint8_t flags;
GDBusPendingPropertySet pending;
};
return TRUE;
}
+static gboolean get_attachment_size(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ struct map_msg *msg = data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT64,
+ &msg->attachment_size);
+
+ return TRUE;
+}
+
static gboolean get_flag(const GDBusPropertyTable *property,
DBusMessageIter *iter, uint8_t flag,
void *data)
{ "Type", "s", get_type, NULL, type_exists },
{ "Size", "t", get_size },
{ "Text", "b", get_text },
+ { "AttachmentSize", "t", get_attachment_size },
{ "Priority", "b", get_priority },
{ "Read", "b", get_read, set_read },
{ "Sent", "b", get_sent },
obex_dbus_dict_append(iter, "Status", DBUS_TYPE_STRING, &value);
}
+static void parse_attachment_size(struct map_msg *msg, const char *value,
+ DBusMessageIter *iter)
+{
+ msg->attachment_size = g_ascii_strtoll(value, NULL, 10);
+ obex_dbus_dict_append(iter, "AttachmentSize", DBUS_TYPE_UINT64,
+ &msg->attachment_size);
+}
+
static void parse_priority(struct map_msg *msg, const char *value,
DBusMessageIter *iter)
{
{ "size", parse_size },
{ "text", parse_text },
{ "reception_status", parse_status },
+ { "attachment_size", parse_attachment_size },
{ "priority", parse_priority },
{ "read", parse_read },
{ "sent", parse_sent },