Diff between 293bbb4a47950f9bf1ecacbbf3193047fc5e555a and 1d862e73f4d008a6d5ba8c5444b55dea00485465

Changed Files

File Additions Deletions Status
gdbus/gdbus.h +2 -0 modified
gdbus/object.c +19 -0 modified

Full Patch

diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index a96c97f..8251947 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -257,6 +257,8 @@ void g_dbus_pending_property_error(DBusConnection *connection,
 void g_dbus_emit_property_changed(DBusConnection *connection,
 				const char *path, const char *interface,
 				const char *name);
+gboolean g_dbus_get_properties(DBusConnection *connection, const char *path,
+				const char *interface, DBusMessageIter *iter);
 
 #ifdef __cplusplus
 }
diff --git a/gdbus/object.c b/gdbus/object.c
index 7acb563..aa38c07 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1615,3 +1615,22 @@ void g_dbus_emit_property_changed(DBusConnection *connection,
 		return;
 	}
 }
+
+gboolean g_dbus_get_properties(DBusConnection *connection, const char *path,
+				const char *interface, DBusMessageIter *iter)
+{
+	struct generic_data *data;
+	struct interface_data *iface;
+
+	if (!dbus_connection_get_object_path_data(connection, path,
+					(void **) &data) || data == NULL)
+		return FALSE;
+
+	iface = find_interface(data->interfaces, interface);
+	if (iface == NULL)
+		return FALSE;
+
+	append_properties(iface, iter);
+
+	return TRUE;
+}