[PATCH 2/7] obexd: Add function set_reception_status to MAP client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christian Fetzer <christian.fetzer@xxxxxxxxxxxx>

The function allows to change the status of a message.
---
 obexd/client/map.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 74c826e..ae7a334 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1830,6 +1830,18 @@ static void map_msg_create_from_event(struct map_data *map,
 		parse_type(msg, event->msg_type);
 }
 
+static void set_reception_status(struct map_msg *msg, const char *status)
+{
+	if (g_strcmp0(msg->status, status) == 0)
+		return;
+
+	g_free(msg->status);
+	msg->status = g_strdup(status);
+
+	g_dbus_emit_property_changed(conn, msg->path, MAP_MSG_INTERFACE,
+								"Status");
+}
+
 static void map_handle_new_message(struct map_data *map,
 							struct map_event *event)
 {
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux