summaryrefslogtreecommitdiffstats
path: root/glib/dbus-glib-tool.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2005-02-17 21:11:18 +0000
committerColin Walters <walters@verbum.org>2005-02-17 21:11:18 +0000
commitdc12fac5f8a36d0276719bc5a98aa63bffe86399 (patch)
tree4f8e865c9933a261be0aaa3f72fa66a44786813d /glib/dbus-glib-tool.c
parent03f6615eaccc2c1f84d4252e5a627a2ac86d41d9 (diff)
2005-02-17 Colin Walters <walters@verbum.org>
* glib/dbus-gparser.c (struct Parser): Add in_annotation boolean. (parse_node, parse_interface, parse_method, parse_signal) (parse_property, parse_annotation): Lose if we're currently in an annotation. (parse_annotation): New function. (parser_start_element, parser_end_element): Handle annotation. (parse_method, parse_interface): Remove support for c_name attribute, switch to annotations. * glib/dbus-gidl.h (interface_info_get_binding_names) (method_info_get_binding_names) (interface_info_get_binding_name, method_info_get_binding_name) (interface_info_set_binding_name, method_info_set_binding_name): Remove. (interface_info_get_annotations, method_info_get_annotations) (interface_info_get_annotation, method_info_get_annotation) (interface_info_add_annotation, method_info_add_annotation): Prototype. * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations" for "bindings". (struct MethodInfo): Ditto. Straightfoward conversion of binding methods into annotation methods as prototyped. * glib/dbus-glib-tool.c (pretty_print): Print annotations. * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define. * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue): Use new annotation API. * doc/introspect.dtd: Fix a number of DTD syntax errors. Add annotation element. * doc/dbus-specification.xml: Discuss introspection annotations, include list of well-known annotations. * test/glib/test-service-glib.xml: Make validate against new DTD.
Diffstat (limited to 'glib/dbus-glib-tool.c')
-rw-r--r--glib/dbus-glib-tool.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/glib/dbus-glib-tool.c b/glib/dbus-glib-tool.c
index 022055e6..1359ba53 100644
--- a/glib/dbus-glib-tool.c
+++ b/glib/dbus-glib-tool.c
@@ -107,22 +107,22 @@ pretty_print (BaseInfo *base,
case INFO_TYPE_INTERFACE:
{
InterfaceInfo *i = (InterfaceInfo*) base;
- GSList *binding_types, *elt;
+ GSList *annotations, *elt;
g_assert (name != NULL);
printf (_("interface \"%s\" {\n"), name);
- binding_types = interface_info_get_binding_names (i);
- for (elt = binding_types; elt; elt = elt->next)
+ annotations = interface_info_get_annotations (i);
+ for (elt = annotations; elt; elt = elt->next)
{
- const char *binding_type = elt->data;
- const char *binding_name = interface_info_get_binding_name (i, binding_type);
+ const char *name = elt->data;
+ const char *value = interface_info_get_annotation (i, name);
printf (_(" (binding \"%s\": \"%s\") "),
- binding_type, binding_name);
+ name, value);
}
- g_slist_free (binding_types);
+ g_slist_free (annotations);
pretty_print_list (interface_info_get_methods (i), depth + 1);
pretty_print_list (interface_info_get_signals (i), depth + 1);
@@ -135,21 +135,21 @@ pretty_print (BaseInfo *base,
case INFO_TYPE_METHOD:
{
MethodInfo *m = (MethodInfo*) base;
- GSList *binding_types, *elt;
+ GSList *annotations, *elt;
g_assert (name != NULL);
- binding_types = method_info_get_binding_names (m);
+ annotations = method_info_get_annotations (m);
printf (_("method \"%s\""), name);
- for (elt = binding_types; elt; elt = elt->next)
+ for (elt = annotations; elt; elt = elt->next)
{
- const char *binding_type = elt->data;
- const char *binding_name = method_info_get_binding_name (m, binding_type);
+ const char *name = elt->data;
+ const char *value = method_info_get_annotation (m, name);
- printf (_(" (binding \"%s\": \"%s\") "),
- binding_type, binding_name);
+ printf (_(" (annotation \"%s\": \"%s\") "),
+ name, value);
}
- g_slist_free (binding_types);
+ g_slist_free (annotations);
pretty_print_list (method_info_get_args (m), depth + 1);