Commit graph

5 commits

Author SHA1 Message Date
Philip Withnall
f354940111 spec: Allow <annotation> in <arg> elements in introspection XML
This is widely used in practice (especially by GLib — just look at files
in /usr/share/dbus-1/interfaces/), and there is no reason not to allow
it. Update the specification, introspection DTD and XSL file to allow
and represent it.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86162
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-10-03 11:33:47 +01:00
John (J5) Palmieri
7652304bff * s/D-BUS/D-Bus/g 2006-08-03 20:34:36 +00:00
John (J5) Palmieri
8d1e7dfeb9 * ChangeLog: clean up my last entry a bit
* doc/introspect.xsl: New stylesheet for converting introspection data
	into browser renderable xhtml. Contributed by Lennart Poettering.

	* doc/introspect.dtd: Fixups in the introspect format from Lennart
	Poettering.

	* doc/dbus-tutorial.xml:
	- Add Colin Walter to the Authors section for authoring the GLib
	section
	- Add descriptions of the new signature and type functionality
	in the Python complex type mapping section
	- Add a sidenote on the new args matching functionality in
	the Python bindings
	- Fixed up some of the examples to use the gobject.MainLoop
	instead of gtk.main

	* python/_dbus.py:
	(Bus::_create_args_dict): New. Converts a hash of arg matches
	to a more useable format
	(Bus::add_signal_receiver): add a **keywords parameter for catching
	arg match parameters
	(Bus::remove_signal_receiver): add a **keywords parameter for catching
	arg match parameters

	* python/matchrules.py:
	(MatchTree::exec_matches): Check for arg matches
	(SignalMatchRule::add_args_match): New method
	(SignalMatchRule::execute): Added args_list parameter as an optimization
	so we don't have to marshal the args more than once
	(SignalMatchRule::match_args_from_list): New method that checks to see
	if the rule's arg matches match an argument list.  Only arguments
	set in the rule are checked.
	(SignalMatchRule::match_args_from_rule): New method that checks to see
	if the rule's arg matches match another rule's.  All args have to match
	in order for this method to return true.  If either rule has more args
	then it is not a match.
	(SignalMatchRule::is_match): Add args match
	(SignalMatchRule::repr): Add args to the final output if they exist
2005-08-18 04:04:57 +00:00
Colin Walters
dc12fac5f8 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.
2005-02-17 21:11:18 +00:00
Havoc Pennington
849493eafb 2005-02-04 Havoc Pennington <hp@redhat.com>
* doc/Makefile.am (EXTRA_DIST): add DTDs to makefile

	* doc/introspect.dtd: add introspect.dtd from David A. Wheeler
	(with some minor changes)

	* doc/dbus-specification.xml: add deprecated attribute to
	introspection format
2005-02-05 03:24:54 +00:00