From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
To: linux-bluetooth@vger.kernel.org
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Subject: [BlueZ RFC 5/5] gdbus: add properties into interface introspection
Date: Fri, 27 Apr 2012 18:25:22 -0300 [thread overview]
Message-ID: <1335561922-3518-6-git-send-email-lucas.demarchi@profusion.mobi> (raw)
In-Reply-To: <1335561922-3518-1-git-send-email-lucas.demarchi@profusion.mobi>
---
gdbus/object.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gdbus/object.c b/gdbus/object.c
index ff5380a..701352c 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -158,6 +158,7 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
{
const GDBusMethodTable *method;
const GDBusSignalTable *signal;
+ const GDBusPropertyTable *property;
for (method = iface->methods; method && method->name; method++) {
gboolean deprecated = method->flags &
@@ -205,6 +206,21 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface)
g_string_append_printf(gstr, "\t\t</signal>\n");
}
}
+
+ for (property = iface->properties; property && property->name; property++) {
+ gboolean deprecated = property->flags &
+ G_DBUS_PROPERTY_FLAG_DEPRECATED;
+
+ g_string_append_printf(gstr, "\t\t<property name=\"%s\" type=\"%s\" access=\"%s%s\"",
+ property->name, property->type,
+ property->get ? "read" : "",
+ property->set ? "write" : "");
+
+ if (!deprecated)
+ g_string_append_printf(gstr, "/>\n");
+ else
+ g_string_append_printf(gstr, ">\n\t\t\t<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>\n\t\t</property>\n");
+ }
}
static void generate_introspection_xml(DBusConnection *conn,
--
1.7.10
prev parent reply other threads:[~2012-04-27 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 21:25 [BlueZ RFC 0/5] gdbus: Add support for DBus.Properties interface Lucas De Marchi
2012-04-27 21:25 ` [BlueZ RFC 1/5] gdbus: add skeleton of " Lucas De Marchi
2012-04-27 21:25 ` [BlueZ RFC 2/5] gdbus: implement DBus.Properties.Get method Lucas De Marchi
2012-04-27 21:25 ` [BlueZ RFC 3/5] gdbus: implement DBus.Properties.GetAll method Lucas De Marchi
2012-04-29 11:22 ` Luiz Augusto von Dentz
2012-04-29 21:38 ` Lucas De Marchi
2012-04-27 21:25 ` [BlueZ RFC 4/5] gdbus: implement DBus.Properties.Set method Lucas De Marchi
2012-04-27 21:25 ` Lucas De Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335561922-3518-6-git-send-email-lucas.demarchi@profusion.mobi \
--to=lucas.demarchi@profusion.mobi \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).