diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index 41c40a7..10534e5 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
Message size in bytes
+ boolean Text:
+
+ Message text flag
+
+ Specifies whether message has textual
+ content or is binary only
+
string Status:
Message reception status
diff --git a/obexd/client/map.c b/obexd/client/map.c
index a51aa5e..d32d6ac 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
#define MAP_MSG_FLAG_READ 0x02
#define MAP_MSG_FLAG_SENT 0x04
#define MAP_MSG_FLAG_PROTECTED 0x08
+#define MAP_MSG_FLAG_TEXT 0x10
struct map_msg {
struct map_data *data;
return get_flag(property, iter, MAP_MSG_FLAG_PROTECTED, data);
}
+static gboolean get_text(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, void *data)
+{
+ return get_flag(property, iter, MAP_MSG_FLAG_TEXT, data);
+}
+
static void set_status(const GDBusPropertyTable *property,
DBusMessageIter *iter, GDBusPendingPropertySet id,
uint8_t status, void *data)
recipient_address_exists },
{ "Type", "s", get_type, NULL, type_exists },
{ "Size", "t", get_size },
+ { "Text", "b", get_text },
{ "Priority", "b", get_priority },
{ "Read", "b", get_read, set_read },
{ "Sent", "b", get_sent },
obex_dbus_dict_append(iter, "Size", DBUS_TYPE_UINT64, &msg->size);
}
+static void parse_text(struct map_msg *msg, const char *value,
+ DBusMessageIter *iter)
+{
+ gboolean flag = strcasecmp(value, "no") != 0;
+
+ if (flag)
+ msg->flags |= MAP_MSG_FLAG_TEXT;
+ else
+ msg->flags &= ~MAP_MSG_FLAG_TEXT;
+
+ obex_dbus_dict_append(iter, "Text", DBUS_TYPE_BOOLEAN, &flag);
+}
+
static void parse_status(struct map_msg *msg, const char *value,
DBusMessageIter *iter)
{
{ "recipient_addressing", parse_recipient_address },
{ "type", parse_type },
{ "size", parse_size },
+ { "text", parse_text },
{ "reception_status", parse_status },
{ "priority", parse_priority },
{ "read", parse_read },