How to Set a Property for a DBus Interface in C?

,

I can’t find any information on this online. If I have a proxy for an interface org.test.Test and it has a string property called TestName, how can I set that property?

g_dbus_proxy_call (proxy,
                   "org.freedesktop.DBus.Properties.Set",
                   g_variant_new ("(ssv)",
                                  "org.test.Test",
                                  "TestName",
                                  g_variant_new_string ("string value")),
                   G_DBUS_CALL_FLAGS_NONE,
                   -1,
                   NULL,
                   NULL,
                   NULL);
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.