[PATCH 5/7] obexd: Add function set_folder 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 folder a message belongs to.
---
 obexd/client/map.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 3b0f662..8ddbc46 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_folder(struct map_msg *msg, const char *folder)
+{
+	if (g_strcmp0(msg->folder, folder) == 0)
+		return;
+
+	g_free(msg->folder);
+	msg->folder = g_strdup(folder);
+
+	g_dbus_emit_property_changed(conn, msg->path, MAP_MSG_INTERFACE,
+								"Folder");
+}
+
 static void set_reception_status(struct map_msg *msg, const char *status)
 {
 	if (g_strcmp0(msg->status, status) == 0)
-- 
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