| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* doc/TODO: Knock off some GLib items with this patch.
	* glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error)
	(_dbus_gvalue_signals_error): New functions.
	* glib/dbus-gvalue-utils.h: Prototype them.
	* glib/dbus-gobject.c (arg_iterate): Update to handle return vals
	and change to not output const/retval flags for input args.  All
	callers updated.
	(invoke_object_method): Refactor to handle return values.  Add
	some more comments in various places.  Remove debug g_print.
	* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
	* glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
	Handle G_TYPE_NONE.
	(compute_gsignature): New function; refactored from code from
	compute_marshaller and compute_marshaller_name.  Enhance to
	handle return values and async ops more cleanly.  Update for
	async ops returning NONE instead of BOOLEAN.
	(compute_marshaller, compute_marshaller_name): Call compute_gsignature
	and output appropriate string.
	(generate_glue): Handle return value annotation.  Also don't dump
	constness flag for input arguments.
	* glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
	files shared between installed library and utilities.
	(libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
	(libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
	binding tool can access gtype utility functions.
	* test/glib/test-service-glib.c:
	* test/glib/test-service-glib.xml:
	* test/glib/test-dbus-glib.c: Add some tests for return values.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gparser.c (parse_annotation): Add annotations to
	argument if available, not method.
	* glib/dbus-gobject.c (arg_iterate): More verbose warnings.
	(invoke_object_method): First, remove some redundant
	GValues (object_value, error_value) in favor of working on
	array directly.  Second, rework constness to be less buggy.
	Now we iterate directly over the argument metadata instead
	of parallel iterating over output signature and metadata.
	* glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
	* glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
	annotation on input args.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
	Define.
	* glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
	annotation.
	* glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
	(method_dir_signature_from_object_info): Handle arg_iterate change.
	(write_interface): Ditto.
	(lookup_object_info): Don't barf if format_version is > 0.
	(invoke_object_method): Handle arg constness.
	* glib/dbus-gidl.c (struct ArgInfo): Add annotations.
	(arg_info_new): Create.
	(arg_info_unref): Destroy.
	(arg_info_get_annotations, arg_info_get_annotation)
	(arg_info_add_annotation): New functions.
	* glib/dbus-gidl.h: Prototype them.
	* glib/dbus-gparser.c (parse_annotation): Allow annotations in
	args, disallow them in properties.
	(parse_annotation): Handle arg annotations.
	* test/glib/test-service-glib.xml:
	* test/glib/test-service-glib.c: Update to make some methods
	const.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* tools/Makefile.am: Kill of print-introspect in favor of using
	dbus-send --print-reply=literal.
	* tools/print-introspect.c: Deleted.
	* test/glib/test-service-glib.xml:
	* test/glib/test-service-glib.c (my_object_get_objs): New test
	for "ao".
	* test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
	(main): Test GetObjs.
	* glib/examples/statemachine/Makefile.am:
	* glib/examples/statemachine/sm-marshal.list:
	* glib/examples/statemachine/statemachine-client.c:
	* glib/examples/statemachine/statemachine-server.c:
	* glib/examples/statemachine/statemachine-server.xml:
	* glib/examples/statemachine/statemachine.c:
	* glib/examples/statemachine/statemachine.h:
	* glib/examples/statemachine/statemachine.xml:
	New example.
	* glib/examples/example-service.c (main): Move invocation
	of dbus_g_object_type_install_info earlier, to emphasize it
	should only be done once.
	* glib/examples/example-signal-emitter.c (main): Ditto.
	* glib/examples/Makefile.am (SUBDIRS): Include statemachine.
	* glib/dbus-gvalue.h (dbus_gtype_to_signature)
	(dbus_gvalue_marshal): Update prototypes.
	* glib/dbus-gvalue.c: Update all marshalling functions to take
	const GValue instead of GValue.
	(signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
	types.
	(dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
	change.
	(dbus_gtype_to_signature): Handle generic collecitons and maps.
	Return a newly-allocated string.
	(demarshal_proxy, demarshal_object_path, demarshal_object)
	(demarshal_strv, demarshal_ghashtable): Set error, don't assert if
	we get the wrong types from message.
	(get_type_demarshaller): New function, extracted from
	dbus_gvalue_demarshal.
	(demarshal_collection): New function, demarshals generic
	collection.
	(dbus_gvalue_demarshal): Just invoke result of
	get_type_demarshaller.  Throw error if we don't have one.
	(marshal_garray_basic): Abort on OOM.
	(get_type_marshaller): New function, extracted from
	dbus_gvalue_marshal.
	(collection_marshal_iterator, marshal_collection): New functions;
	implements generic marshalling for an iteratable specialized
	collection.
	(dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
	* glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
	G_TYPE_STRING.
	(ptrarray_value_from_gvalue): Ditto.
	(ptrarray_append, ptrarray_free): New functions.
	(slist_constructor, slist_iterator, slist_copy_elt, slist_copy)
	(slist_append, slist_end_append, slist_free): New functions.
	(dbus_g_type_specialized_builtins_init): Add append fuctions
	for GPtrArray and GSList.  Register GSList.
	(test_specialized_hash, _dbus_gvalue_utils_test): New functions.
	* glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
	New.
	(dbus_g_type_specialized_collection_init_append)
	(dbus_g_type_specialized_collection_append)
	(dbus_g_type_specialized_collection_end_append): Prototype.
	(DBusGTypeSpecializedCollectionVtable): Add append_func and
	end_append_func.
	* glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append)
	(dbus_g_type_specialized_collection_append)
	(dbus_g_type_specialized_collection_end_append): New functions.
	(dbus_g_type_map_value_iterate): Take const GValue.
	(dbus_g_type_collection_value_iterate): Ditto.
	* glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
	_dbus_gvalue_utils_test.
	* glib/dbus-gtest.h: Prototype it.
	* glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
	using uninitialized owner_list.
	(dbus_g_proxy_begin_call_internal): Move return_if_fail to
	public API.
	(dbus_g_proxy_end_call_internal): Update to use error set
	from dbus_gvalue_demarshal instead of setting it here.
	(dbus_g_proxy_begin_call): Move return_if_fail here.
	* glib/dbus-gobject.c (write_interface): Update for
	dbus_gtype_to_signature returning new string.
	* configure.in: Add glib/examples/statemachine.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
	(DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
	(dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
	(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
	Delete in favor of dbus_g_proxy_begin_call and
	dbus_g_proxy_cancel_call.
	(DBusGProxyCall, DBusGProxyCallNotify): New.
	(dbus_g_proxy_begin_call): Change prototype to take callback, user
	data, and destroy function.  This replaces
	dbus_g_pending_call_set_notify.
	(dbus_g_proxy_cancel_call): Prototype.
	(DBusGAsyncData): Delete, shouldn't be needed anymore.
	* glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
	pending_calls map.
	(struct _DBusGProxyManager): Add bus_proxy member, which is an
	internal proxy for calls to the bus. Remove
	pending_nameowner_calls, now the internal proxy keeps track.
	(dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
	pending_nameowner_calls.
	(got_name_owner_cb): Update prototype, and use
	dbus_g_proxy_end_call.
	(got_name_owner_cb): Remove reference to pending_nameowner_calls.
	(dbus_g_proxy_manager_register): Delete directly libdbus code in
	favor of using internal proxy.
	(dbus_g_proxy_manager_unregister): Update to use
	dbus_g_proxy_cancel_call for any pending GetNameOwner call.
	(dbus_g_proxy_init): Initialize pending calls map.
	(dbus_g_proxy_constructor): New.
	(dbus_g_proxy_class_init): Add get/set property functions,
	constructor, and add NAME, PATH, and INTERFACE properties.
	(cancel_pending_call): New function.
	(dbus_g_proxy_dispose): Iterate over any outstanding calls and
	cancel them.
	(dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
	(GPendingNotifyClosure): New structure.
	(d_pending_call_notify, d_pending_call_free): Moved here from
	dbus-glib.c.
	(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
	ordering.
	(manager_begin_bus_call): New internal function for talking to
	internal bus proxy.
	(dbus_g_proxy_new): Construct object using GObjet properties.
	(dbus_g_proxy_begin_call_internal): Update to take user data, etc.
	Create closure of same, and insert call into map of pending calls.
	(dbus_g_proxy_end_call_internal): Take call id instead of pending
	call.  Look up pending call in current set.  Remove it when we've
	completed.
	(dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
	(dbus_g_proxy_begin_call): Change API to take callback, user data,
	and destroy function directly.
	(dbus_g_proxy_end_call): Update to take DBusGProxyCall.
	(dbus_g_proxy_call): Invoke with NULL callback.
	(dbus_g_proxy_cancel_call): New function, replaces
	dbus_g_pending_call_cancel.
	* glib/dbus-gparser.c (validate_signature): Fix call to
	dbus_set_g_error.
	* glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
	New quark for attaching metadata to GType.
	(info_hash): Delete.
	(lookup_object_info): Look up using quark.
	(dbus_g_object_type_install_info): Check that a type is classed,
	not that it's an object.  Also just install type data using quark
	instead of using global hash.
	* glib/dbus-glib.c (dbus_g_pending_call_ref)
	(dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
	(GPendingNotifyClosure): Delete.
	(d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
	(dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
	* glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
	client method generation until we can fix it...
	* tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
	(load_from_service_thread_func): Ditto.
	* tools/dbus-names-model.c (struct NamesModel): Hold
	DBusGProxyCall.
	(have_names_notify): Update prototype, use
	dbus_g_proxy_cancel_call.
	(names_model_reload): Update for new dbus_g_proxy_begin_call API.
	* tools/dbus-monitor.c (filter_func): Update for print_message
	API change.
	* test/glib/test-dbus-glib.c: Add more tests for async
	invocations.  Update many begin_call/end_call pairs to just use
	dbus_g_proxy_call.
	* tools/dbus-send.c (main): Add --print-reply=literal mode.  This
	allows us to dump print-introspect.c.
	* tools/dbus-print-message.h (print_message): Add literal argument
	to print_message which is intended to allow printing arguments without
	metadata like "string=".
	* tools/dbus-print-message.c (print_iter): Add literal argument.
	(print_message): Allow printing string messages literally.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* test/glib/test-dbus-glib.c:
	* test/glib/test-service-glib.c:
	* test/glib/test-service-glib.xml: Update tests for new error
	setting bits, also add async tests (patch from Ross Burton).
	* test/glib/Makefile.am (test_service_glib_LDADD): Add
	DBUS_GLIB_THREADS_LIBS.
	* glib/dbus-gproxy.c (get_name_owner)
	(dbus_g_pending_call_end_valist): Ditto.
	* glib/dbus-gobject.c (error_metadata): New mapping from GError
	domain (GQuark) to DBusGErrorInfo.
	(gerror_domaincode_to_dbus_error_name): Attempt to look up error
	quark in error_metadata.  Take message interface as default
	error message interface.
	(gerror_to_dbus_error_message): Pass message interface.
	(dbus_set_g_error): Resurrected.
	(dbus_g_error_info_free): New function.
	(dbus_g_object_type_install_info): Use g_type_class_ref instead
	of _peek to actually create the object class if it hasn't been
	created yet.
	(dbus_g_error_domain_register): New function.
	* glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
	* glib/dbus-gparser.c (validate_signature): Ditto.
	* dbus/dbus-glib.h (dbus_g_error_set): Delete.
	(dbus_g_error_domain_register): Prototype.
	* glib/dbus-glib.c (dbus_g_error_set): Delete.
	Update tests.
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Patch from Ross Burton <ross@openedhand.com>
	* glib/dbus-gobject.c (invoke_object_method): Unset object
	value in all cases, not only in async case.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
	name_call for keeping track of any outgoing GetNameOwner call.
	Also add for_owner and associated.
	(struct _DBusGProxyManager): Add owner_names, which is hash table
	that maps a base name to a list of names it owns (that we're
	interested in).  Add pending_nameowner_calls which is a list of
	all outstanding GetNameOwner; avoids us having to iterate over
	every proxy.  Add unassociated_proxies which keeps track of name
	proxies with no associated name owner.
	(dbus_g_proxy_manager_unref): Destroy owner_names.
	(struct DBusGProxyNameOwnerInfo): New struct for keeping track of
	name refcounts.
	(find_name_in_info, name_owner_foreach)
	(dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
	(dbus_g_proxy_manager_monitor_name_owner)
	(dbus_g_proxy_manager_unmonitor_name_owner)
	(unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
	New functions; they manipulate the owner_names mapping.
	(got_name_owner_cb): New function.
	(get_name_owner): New function, extracted from
	dbus_g_proxy_new_for_name_owner.
	(dbus_g_proxy_manager_register): For now we need to keep track of
	all NameOwnerChanged.  Also if the proxy is for a name, if we
	don't already know the name owner, queue a new GetNameOwner
	request and add it to our list of unassociated proxies.  Otherwise
	inc the refcount.
	(dbus_g_proxy_manager_unregister): If this proxy is for a name,
	cancel any pending GetNameOwner call, etc.
	(dbus_g_proxy_manager_filter): Handle NameOwnerChanged.  Also use
	the owner_names mapping to look up the current names for the
	signal source, and dispatch to any proxies for that name.
	(dbus_g_proxy_new): Initialize new members.
	(dbus_g_proxy_new_for_name): Delete unused proxy variable.
	(dbus_g_proxy_new_for_name_owner): Use get_name_owner.
	(dbus_g_pending_call_end_valist): New function, extracted from
	dbus_g_proxy_end_call_internal.  Useful when we don't have a proxy
	but want to use the GLib infrastructure.  Also note how many
	arguments in reply were over.
	(dbus_g_pending_call_end): New function, just call
	dbus_g_pending_call_end_valist.
	(dbus_g_proxy_end_call_internal): Just call
	dbus_g_pending_call_end_valist.
	* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
	of builtin marshaller for STRING_STRING_STRING.
	* test/glib/test-dbus-glib.c:
	* test/glib/test-service-glib.c:
	* test/glib/test-service-glib.xml:
	Extend tests to cover name proxies, destruction of owner proxies,
	etc.
	* glib/examples/example-signal-recipient.c
	(dbus_g_proxy_new_for_name_owner): Create a name proxy.
	* tools/dbus-send.c (main): Print D-BUS error name in addition
	to message.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* test/glib/test-dbus-glib.c:
	* test/glib/test-service-glib.c:
	* test/glib/test-service-glib.xml:
	Test hash table signal emitting.
	* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
	types to their fundamental basis types, since this is what
	marshallers operate on.  Also add an entry for VOID__BOXED.
	(dbus_g_object_register_marshaller_array): Convert to fundamental.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-glib.c (dbus_set_g_error): Delete.
	(dbus_g_error_set): New public function from its ashes; used by
	both service-side method implementation and GLib bindings
	internals.
	(dbus_g_error_has_name, dbus_g_error_get_name): New function.
	(_dbus_glib_test): Add some tests.
	* test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
	* test/glib/test-service-glib.c (my_object_throw_error): Use
	dbus_g_error_set.
	* glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
	errors thrown by dbus_g_error_set.
	* glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
	* glib/dbus-gparser.c (validate_signature): Ditto.
	* glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner)
	(dbus_g_proxy_end_call_internal): Ditto.
	* glib/Makefile.am: Generate dbus-glib-error-switch.h, which
	converts DBUS_ERROR_x to DBUS_GERROR_x.
	(libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
	* doc/TODO: Remove error TODO.
	* doc/dbus-tutorial.xml: Update with documentation about error
	handling.
	* dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
	sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
	GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.
 | 
| | 
| 
| 
| 
| 
|  | 
Patch from Ross Burton <ross@openedhand.com>
	* glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Patch suggested by Ross Burton <ross@openedhand.com>
	* glib/dbus-gobject.c (export_signals): Free signal name.
	(g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
	memory leak.  Add a bit of documentation.
	(dbus_g_method_return_error): Free context, and note we do
	so.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-glib.h:
        * glib/dbus-gobject.c:
        * glib/dbus-gproxy.c:
        * glib/dbus-gvalue.c: Predeclare structs as
        typedef struct _Something Something instead of
        typedef struct Something Something, so we can
        redeclare the prototypes. Other GNOME libraries
        do this already.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
	spew warnings if we get malformed remote signals.
	* glib/dbus-gobject.c (propsig_iterate): New function.
	(lookup_object_info): New function, extracted from
	lookup_object_and_method.
	(introspect_properties, introspect_signals): Delete; these
	are merged into write_interface.
	(write_interface): Write out signals and properties here;
	dump the org.gtk.object stuff and use the interface given
	in the introspection data blob.  Also fix up property XML.
	(lookup_values): New function.
	(introspect_interfaces): Gather a mapping from interface to a
	list of its methods, signals, and properties, then write out
	each interface.
	(lookup_object_and_method): Use lookup_object_info.
	(struct DBusGSignalClosure): Add interface.
	(dbus_g_signal_closure_new): Add interface. Don't dup signame;
	we can just use the constant data.
	(dbus_g_signal_closure_finalize): Don't free signal name.
	(signal_emitter_marshaller): Use interface from signal closure.
	(export_signals): Only export signals mentioned in introspection
	blob.
	(dbus_g_connection_register_g_object): Warn if we have no
	introspection data for an object.
	(funcsig_equal): Remove unused variable.
	(dbus_g_object_register_marshaller): Take varargs instead of
	list.
	(dbus_g_object_register_marshaller_array): New function,
	extracted from old dbus_g_object_register_marshaller.
	* glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
	signals and property data.
	(write_quoted_string): New function, extracted from generate_glue.
	(generate_glue): Write signals and properties to introspection
	blob.
	* dbus/dbus-glib.h (struct DBusGObjectInfo): Include
	exported_signals and exported_properties.
	(dbus_g_object_register_marshaller): Update prototype.
	(dbus_g_object_register_marshaller_array): Prototype.
	* test/glib/test-dbus-glib.c: Extend testing to cover new signals.
	* test/glib/test-service-glib.c: Add new test signals and method
	to emit them.
	* test/glib/test-service-glib.xml: Add some test signals.
	* test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
	and my-object-marshal.h
	(test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
	my-object-marshal.c.
	(my-object-marshal.c, my-object-marshal.h): Implement.
	* test/glib/.cvsignore: Update.
	* doc/TODO: Remove two GLib TODO items fixed by this
	patch.
 | 
| | 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-binding-tool-glib.c:
	* glib/dbus-gobject.c:
	* glib/dbus-gproxy.c:  Add Nokia copyright; Patch
	from Ross Burton, for his GLib bindings work.
 | 
| | 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
	to iterate instead of walking to G_TYPE_INVALID.
	Patch based on a patch from Ryan Gammon.
 | 
| | 
| 
| 
| 
| 
|  | 
* glib/dbus-binding-tool-glib.c:
	* glib/dbus-gobject.c:
	* glib/dbus-gvalue.c: Fix indentation and brace style.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-glib.h: Make DBusGMethodInvocation
	a private structure.  Rearrange prototypes a bit.
	* glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
	documentation for first_arg_type.
	* glib/dbus-gobject.c: Move DBusGMethodInvocation
	here, add documentation.  Move dbus_g_method_return
	and dbus_g_method_return_error into public API
	section.
 | 
| | 
| 
| 
| 
|  | 
* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
	Add missing return statements, noticed by Ross Burton.
 | 
| | 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c: Handle errors on message
	demarshalling by sending error message back.
	* glib/dbus-gvalue.c: Initialize return variables.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Async signals and various bugfixes and testing by
	Ross Burton <ross@burtonini.com>.
	* glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
	(dbus_gvalue_genmarshal_name_from_type)
	(dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
	(dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
	(dbus_g_value_types_init, dbus_gtype_from_signature)
	(dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
	(dbus_gtypes_from_arg_signature): New function prototypes.
	(dbus_gvalue_demarshal): Take context and error arguments.
	(dbus_gvalue_demarshal_variant): New function.
	(dbus_gvalue_demarshal_message): New function.
	(dbus_gvalue_store): Delete.
	* glib/dbus-gvalue.c:
	File has been almost entirely rewritten; now we special-case
	more types such as DBUS_TYPE_SIGNATURE, handle arrays and
	hash tables correctly, etc.  Full support for recursive values
	is not yet complete.
	* glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
	argument of signal to G_TYPE_POINTER since we now pass a
	structure.
	(lookup_g_marshaller): Delete in favor of
	_dbus_gobject_lookup_marshaller.
	(marshal_dbus_message_to_g_marshaller): Use
	_dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
	to handle remote signal callbacks.
	(dbus_g_proxy_new_from_proxy): New function; creates a new
	DBusGProxy by copying an existing one.
	(dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
	(dbus_g_proxy_get_path): New functions.
	(dbus_g_proxy_marshal_args_to_message): New function;
	factored out of existing code.
	(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
	from a varargs array.
	(dbus_g_proxy_begin_call_internal): New function.
	(dbus_g_proxy_end_call_internal): New function.
	(dbus_g_proxy_begin_call): Take GTypes instead of DBus types
	as arguments; simply invoke dbus_g_proxy_begin_call_internal
	after collecting args into value array.
	(dbus_g_proxy_end_call): Take GTypes instead of DBus types;
	invoke dbus_g_proxy_end_call_internal.
	(dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
	end_call_internal.
	(dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
	types.
	(array_free_all): New function.
	(dbus_g_proxy_add_signal): Take GTypes.
	* glib/dbus-gobject.h:
	(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
	(_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
	Prototype.
	* glib/dbus-gobject.c: Add a global marshal_table hash which
	stores mappings from type signatures to marshallers.  Change lots
	of invocations of dbus_gtype_to_dbus_type to
	dbus_gtype_to_signature.
	(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
	(introspect_signals): Fix test for query.return_type.
	(set_object_property): Update invocation of dbus_gvalue_demarshal.
	(invoke_object_method): Many changes.  Handle asynchronous
	invocations.  Convert arguments with
	dbus_gvalue_demarshal_message.  Handle errors.  Use
	DBusSignatureIter instead of strlen on args. Handle all arguments
	generically.  Special-case variants.
	(dbus_g_method_return, dbus_g_method_return_error): New function.
	(DBusGSignalClosure): New structure, closes over signal
	information.
	(dbus_g_signal_closure_new): New function.
	(dbus_g_signal_closure_finalize): New function.
	(signal_emitter_marshaller): New function; is special marshaller
	which emits signals on bus.
	(export_signals): New function; introspects object signals and
	connects to them.
	(dbus_g_object_type_install_info): Take GType instead of
	GObjectClass.
	(dbus_g_connection_register_g_object): Invoke export_signals.
	(dbus_g_connection_lookup_g_object): New function.
	(DBusGFuncSignature) New structure; used for mapping type
	signatures to marshallers.
	(funcsig_hash): New function; hashes DBusGFuncSignature.
	(funcsig_equal): New function; compares DBusGFuncSignature.
	(_dbus_gobject_lookup_marshaller): New function.
	(dbus_g_object_register_marshaller): New function; used to
	register a marshaller at runtime for a particular signature.
	* glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
	* glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
	which notes a server method implementation should be
	asynchronous.
	* glib/dbus-binding-tool-glib.c
	(dbus_binding_tool_output_glib_server): Call
	dbus_g_value_types_init.
	(write_formal_parameters): Use dbus_gtype_from_signature.  Handle
	variants specially.
	(dbus_g_type_get_lookup_function): Turn GType into an invocation
	of a lookup function.
	(write_args_for_direction): Use dbus_g_type_get_lookup_function.
	(write_untyped_out_args): New method; write output arguments.
	(write_formal_declarations_for_direction): Function for
	writing prototypes.
	(write_formal_parameters_for_direction): Function for
	writing implementations.
	(write_typed_args_for_direction): Function for writing
	arguments prefixed with GTypes.
	(write_async_method_client): Write out async version
	of method.
	* glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
	(dbus_g_type_get_marshal_name): Move mapping from GType
	to marshal name into here.
	(dbus_g_type_get_c_name): Move into here.
	(compute_marshaller): Convert signature to type with
	dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
	(compute_marshaller_name): Ditto.
	(compute_marshaller): Handle async signal annotations.
	(gather_marshallers): Return if we don't have a known
	prefix.
	(generate_glue): Collect introspection blob here, and
	write all of the blob at the end.  This allows an object
	with multiple interfaces to work.
	Mark async methods in introspection blob.
	* glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
	dbus-gtype-specialized.c, dbus-gtype-specialized.h,
	dbus-gvalue-utils.h, dbus-gvalue-utils.c.
	* dbus/dbus-glib.h: Don't include dbus-protocol.h; this
	avoids people accidentally using DBUS_TYPE_* which should
	not be necessary anymore.
	Do include dbus-gtype-specialized.h, which are utilities
	for GLib container types.
	Add various #defines for types such as
	DBUS_TYPE_G_BOOLEAN_ARRAY.
	(DBusGValueIterator, DBusGValue): Define, not fully used
	yet.
	(dbus_g_value_get_g_type): Type for recursive value.
	(dbus_g_value_open, dbus_g_value_iterator_get_value)
	(dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
	(dbus_g_value_free): Prototypes.
	(dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
	(dbus_g_proxy_set_interface): Prototype.
	(dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
	(dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
	types.
	(dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
	Accessors.
	(DBusGAsyncData, DBusGMethodInvocation): Structures for
	doing async invocations.
	(dbus_g_method_return, dbus_g_method_return_error):
	Prototypes.
	* doc/dbus-tutorial.xml: Update GLib section.
	* tools/dbus-viewer.c (load_child_nodes): Update
	for new invocation type of dbus_g_proxy_end_call.
	(load_from_service_thread_func): Ditto.
	* tools/print-introspect.c (main): Ditto.
	* tools/dbus-names-model.c (have_names_notify)
	(names_model_reload, names_model_set_connection)
	Use GTypes.
	* python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
	needed since Python bindings use GLib bindings.
	* test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
	Add --prefix argument.
	* tools/Makefile.am: Define DBUS_COMPILATION.  Remove
	unneeded --ignore-unsupported arg.
	* test/glib/test-service-glib.c:
	* test/glib/test-service-glib.xml:
	* test/glib/test-dbus-glib.c: Add many more tests.
 | 
| | 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c (dbus_g_connection_register_g_object):
	Return if we get an error during registration.  Set up a
	weak reference on object to unregister if object is destroyed.
	(unregister_gobject): New function.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
	Change return value to const char * instead of int so we can do
	full signatures.
	(struct PropertyInfo, struct ArgInfo): Store char *.
	(property_info_new, arg_info_new): Update parameters, strdup.
	(property_info_unref, arg_info_unref): Free.
	* glib/dbus-gidl.h: Update prototypes.
	* glib/dbus-gparser.c (basic_type_from_string): Delete.
	(validate_signature): New function, just validates signature and
	sets GError.
	(parse_property, parse_arg): Invoke validate_signature.  Store
	signature instead of just type code.
	* glib/dbus-gvalue.c (base_type_from_signature): New utility
	function to return a primary type for a signature, dropping
	information about types in container types.
	(dbus_gvalue_genmarshal_name_from_type)
	(dbus_gvalue_binding_type_from_type)
	(dbus_gvalue_ctype_from_type): Update to take full signature
	 instead of type code.
	(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
	* glib/dbus-gvalue.h: Update prototypes for above.
	* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
	glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
	(introspect_properties, introspect_signals, write_interface):
	Update to handle signatures, and remove usage of
	_dbus_gutils_type_to_string.
	(handle_introspect): Print out type codes instead of e.g. "string"
	in hardcoded introspection XML; also use x_AS_STRING constants
	instead of hardcoding in string.
	* glib/dbus-glib-tool.c (pretty_print): Handle signature change
	to string.  Remove usage of _dbus_gutils_type_to_string.
	* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
	* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
	deletion.
	* glib/dbus-binding-tool-glib.c (compute_marshaller)
	(compute_marshaller_name, generate_glue): Handle signature change
	to string.
	(write_formal_parameters, write_args_for_direction): Ditto, and
	remove FIXME.
	* tools/dbus-tree-view.c (type_to_string): Delete.
	(info_set_func_text): Update to print full signatures.
	* test/glib/test-service-glib.xml: Change types to new
	introspection format.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c
	(_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
	* glib/dbus-glib.c: fix doxygen warnings
	* glib/dbus-gparser.c (parse_annotation): error if an annotation
	is found on an <arg>
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.h: Don't export
	_dbus_glib_marshal_dbus_message_to_gvalue_array.
	* glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
	(invoke_object_method): Handle it.
	* glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
	Handle rename.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
	Rename to DBUS_SERVICE_DBUS.
	(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
	(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
	DBUS_INTERFACE_INTROSPECTABLE.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
	DBUS_INTERFACE_PROPERTIES.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
	DBUS_INTERFACE_PEER.
	(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
	DBUS_INTERFACE_LOCAL.
	All other users of those constants have been changed.
	* bus/driver.c (bus_driver_handle_introspect): Use constants.
	* glib/dbus-gobject.c (handle_introspect): Use constants.
	* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This patch is based on initial work from
	Paul Kuliniewicz <kuliniew@purdue.edu>.
	* glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
	initialization of GValue from dbus type to here.
	(dbus_gvalue_genmarshal_name_from_type): New function; generates a string
	for the "glib-genmarshal" program from a DBus type.
	(dbus_gvalue_binding_type_from_type): New function; turns a DBus type
	into the C name for it we use in the glib bindings.
	(dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
	glib C type (not GValue).
	(dbus_gvalue_demarshal): invoke dbus_gvalue_init.
	* glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
	from dbus-gobject.c.
	* glib/dbus-gutils.h: Prototype it.
	* glib/dbus-gproxy.c: Include new dbus-gobject.h.
	(marshal_dbus_message_to_g_marshaller): Use new shared function
	dbus_glib_marshal_dbus_message_to_gvalue_array.
	* glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
	Will be changed once we have annotations.
	* glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
	GStaticRWLock.  Callers updated.
	(wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
	(string_table_next): New function for iterating over zero-terminated
	string value array.
	(string_table_lookup): New function; retrieves specific entry in
	array.
	(get_method_data): New function; look up method data in object data chunk.
	(object_error_domain_prefix_from_object_info)
	(object_error_code_from_object_info): New functions, but not implemented yet.
	(method_interface_from_object_info): New function; retrieve interface name.
	(method_name_from_object_info): New function; retrieve method name.
	(method_arg_info_from_object_info): New function; retrieve argument data.
	(arg_iterate): New function; iterates over serialized argument data.
	(method_dir_signature_from_object_info): New function; returns a
	GString holding type signature for arguments for just one
	direction (input or output).
	(method_input_signature_from_object_info)
	(method_output_signature_from_object_info): New functions.
	(dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
	converts dbus message arguments into a GValue array.  Used for both
	signal handling and method invocation.
	(struct DBusGlibWriteIterfaceData): New utility structure.
	(write_interface): New function; generate introspection XML for
	an interface.
	(introspect_interfaces): New function; gathers all interface->methods,
	generates introspection XML for them.
	(handle_introspect): Invoke introspect_interfaces.
	(get_object_property): Be sure to zero-initalize stack-allocated GValue.
	(lookup_object_and_method): New function; examines an incoming message
	and attempts to match it up (via interface, method name, and argument
	signature) with a known object and method.
	(gerror_domaincode_to_dbus_error_name): New function; converts a
	GError domain and code into a DBus error name.  Needs GError data
	added to object introspection to work well.
	(gerror_to_dbus_error_message): Creates a DBusMessage error return from
	GError.
	(invoke_object_method): New function to invoke an object method
	looked up via lookup_object_and_method.  Parses the incoming
	message, turns it into a GValue array, then invokes the marshaller
	specified in the DBusGMethodInfo.  Creates a new message with
	either return values or error message as appropriate.
	(gobject_message_function): Invoke lookup_object_and_method and
	invoke_object_method.
	* glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
	(enum DBusBindingOutputMode): New enum for binding output modes.
	(pretty_print): Print binding names.
	(dbus_binding_tool_error_quark): GError bits.
	(version): Fix typo.
	(main): Create GIOChannel for output.  Parse new --mode argument,
	possible values are "pretty-print", "glib-server", "glib-client".
	Use mode to invoke appropriate function.
	* glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
	* glib/dbus-glib-tool.h: New header, just includes GError bits
	for now.
	* glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
	maps binding style to name.
	(struct MethodInfo): Ditto.
	(get_hash_keys, get_hash_key): Utility function, returns keys for
	a GHashTable.
	(interface_info_new, method_info_new): Initialize bindings.
	(interface_info_unref, method_info_unref): Destroy bindings.
	(method_info_get_binding_names, method_info_get_binding_name)
	(interface_info_get_binding_names, interface_info_get_binding_name):
	Functions for retrieving binding names.
	(method_info_set_binding_name, interface_info_set_binding_name):
	Functions for setting binding names.
	* glib/dbus-binding-tool-glib.h: New file, has prototypes
	for glib binding generation.
	* glib/dbus-binding-tool-glib.c: New file, implements server-side
	and client-side glib glue generation.
	* glib/Makefile.am (dbus_binding_tool_SOURCES): Add
	dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
	dbus-glib-tool.h.
	* dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
	of using GClosureMarshal directly.
	(struct DBusGObjectInfo): Add n_infos member.
	* test/glib/test-service-glib.xml: New file; contains introspection data
	for MyTestObject used in test-service-glib.c.
	* test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
	(my_object_do_nothing, my_object_increment, my_object_throw_error)
	(my_object_uppercase, my_object_many_args): New test methods.
	(main): Use dbus_g_object_class_install_info to include generated object
	info.
	* test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
	as well as client-side bindings.
	* test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
	(main): Activate TestSuiteGLibService; test invoke a bunch of its methods
	using both the dbus_gproxy stuff directly as well as the generated bindings.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c (introspect_properties): fix the XML
	generated
	* dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
	which effectively detects the use of freed messages
	* glib/dbus-gobject.c (handle_introspect): modify and return the
	reply message instead of the incoming message
	* dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
	gee, maybe it should SEND THE XML instead of just making a string
	and freeing it again ;-)
	* tools/dbus-print-message.c (print_message): improve printing of
	messages
	* configure.in: add debug-glib.service to the output
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
dbus-viewer introspected and displayed the bus driver
	* dbus/dbus-object-tree.c
	(object_tree_test_iteration): add tests for a handler registered on "/"
	* dbus/dbus-object-tree.c
	(_dbus_decompose_path): fix to handle path "/" properly
	(run_decompose_tests): add tests for path decomposition
	* glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
	properly
	* glib/dbus-gobject.c (handle_introspect): fix quotes
	* test/glib/run-test.sh: support launching the bus, then running
	dbus-viewer
	* test/glib/test-service-glib.c (main): put in a trivial gobject
	subclass and register it on the connection
	* bus/driver.c (bus_driver_handle_introspect): implement
	introspection of the bus driver service
	* dbus/dbus-protocol.h: add #defines for the XML namespace,
	identifiers, doctype decl
	* bus/driver.c (bus_driver_handle_get_service_owner): handle
	attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
	returning the service unchanged.
	(bus_driver_handle_message): remove old check for reply_serial in
	method calls, now the message type deals with that
	(bus_driver_handle_message): handle NULL interface
	* glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
	* glib/dbus-gloader-expat.c (description_load_from_string): allow
	-1 for len
	* tools/dbus-viewer.c: add support for introspecting a service on
	a bus
	* glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
	(dbus_g_pending_call_unref): add
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* tools/dbus-tree-view.c: add support for displaying properties.
	(run dbus-viewer with an introspect xml file as arg, then resize
	the window so the tree elements show up, not sure what that is)
	* glib/dbus-gobject.c (handle_introspect): return
	org.freedesktop.Properties and org.freedesktop.Introspectable
	interfaces when we are introspected.
	* doc/dbus-specification.xml: allow empty interface name when
	Get/Set a property
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
	though it uses glib, it could be extended for any binding in
	principle
	* glib/dbus-gobject.c (gobject_message_function): change to the
	new way properties work
	* dbus/dbus-protocol.h: add the new interfaces
	* doc/dbus-specification.xml: document the introspection format,
	Introspectable interface, and add an org.freedesktop.Properties
	interface.
	* glib/dbus-gparser.c: add support for a <property> element
	* glib/dbus-gidl.c: add PropertyInfo
	* glib/dbus-gobject.c (handle_introspect): put the outermost
	<node> outside the signal and property descriptions.
	(introspect_properties): export properties as <property> rather
	than as method calls
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* Add and fix docs according to Doxygen warnings throughout
	source.
	* dbus/dbus-marshal-recursive.c
	(_dbus_type_reader_array_is_empty): change this to just call
	array_reader_get_array_len() and make it static
	* dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
	from get_array_type
	(dbus_message_iter_init_append): rename from append_iter_init
	* dbus/dbus-marshal-recursive.c
	(_dbus_type_reader_get_element_type): rename from
	_dbus_type_reader_get_array_type
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* Land the new message args API and type system.
	This patch is huge, but the public API change is not
	really large. The set of D-BUS types has changed somewhat,
	and the arg "getters" are more geared toward language bindings;
	they don't make a copy, etc.
	There are also some known issues. See these emails for details
	on this huge patch:
	http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
        http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
	* dbus/dbus-marshal-*: all the new stuff
	* dbus/dbus-message.c: basically rewritten
	* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
	freed blocks to be all non-nul bytes so using freed memory is less
	likely to work right
	* dbus/dbus-internals.c (_dbus_test_oom_handling): add
	DBUS_FAIL_MALLOC=N environment variable, so you can do
	DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
	DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
	thorough.
	* qt/message.cpp: port to the new message args API
	(operator<<): use str.utf8() rather than str.unicode()
	(pretty sure this is right from the Qt docs?)
	* glib/dbus-gvalue.c: port to the new message args API
	* bus/dispatch.c, bus/driver.c: port to the new message args API
	* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
	"locked" flag to TRUE and align_offset to 0; I guess we never
	looked at these anyhow, but seems cleaner.
	* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
	move allocation padding macro to this header; use it to implement
	(_DBUS_STRING_STATIC): ability to declare a static string.
	* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
	change to return TRUE if the interface is not set.
	* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
	to dbus-marshal-validate.[hc]
	* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
	dbus-internals.c
	* dbus/Makefile.am: cut over from dbus-marshal.[hc]
	to dbus-marshal-*.[hc]
	* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
	function here from dbus-marshal.c
 | 
| | 
| 
| 
| 
|  | 
* COPYING: switch to Academic Free License version 2.1 instead of
	2.0, to resolve complaints about patent termination clause.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-glib-error-enum.h: autogenerate the GError enum
	codes from the dbus error names
        * glib/dbus-glib.h: move to subdir dbus/ since it's included
	as dbus/dbus-glib.h and that breakage is now visible due to
	including dbus/dbus-glib.h in dbus-glib-lowlevel.h
	* glib/dbus-glib.h: s/gproxy/g_proxy/
	* dbus/dbus-shared.h: new header to hold stuff shared with
	binding APIs
	* dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
	than dbus-errors.h
	* glib/dbus-glib.h (dbus_set_g_error): move to
	dbus-glib-lowlevel.h
	* glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
	of stuff to enable this
	* dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
	* a bunch of other changes with the same basic "separate glib
	bindings from dbus.h" theme
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
	registration functions take the path argument as char* instead of
	char**.
	* dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
	split off the path decompostion part of
	_dbus_demarshal_object_path. Some misc. fixes to silence compiler
	warnings.
	* glib/dbus-gobject.c, test/test-service.c: update accordingly.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
	"in" before "out"
	* glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
	* glib/dbus-glib-tool.c (main): set up to have a --self-test
	option that runs the tests, and start filling in some code
	including for starters just dumping the interfaces to stdout
	* glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
	* test/data/valid-introspection-files/lots-of-types.xml: test of
	an example introspection file
	* glib/dbus-gparser.c (parser_check_doctype): doctype should be
	"node" (I think...)
 | 
| | 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c (handle_introspect): split out
	(introspect_properties): this.
	(handle_introspect): implement this.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* glib/dbus-gobject.c (set_object_property): split out /
	re-work, use the property type, and not the message type(!)
	(get_object_property): ditto.
        * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
	(dbus_gvalue_marshal): make this code re-usable, needed
	for signals too, also on both proxy and server side.
	Re-write for more efficiency / readability.
 | 
| | 
| 
| 
| 
|  | 
* Update AFL version to 2.0 throughout the source files to reflect
	the update that was done a while ago.
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
hmm, make check is currently not passing.
	* doc/dbus-specification.xml: add requirement that custom type
	names follow the same rules as interface names.
	* dbus/dbus-protocol.h: change some of the byte codes, to avoid
	duplication and allow 'c' to be 'custom'; dict is now 'm' for
	'map'
	* doc/dbus-specification.xml: update type codes to match
	dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
	CUSTOM. Add type OBJECT_PATH to the spec.
2003-10-17  Havoc Pennington  <hp@redhat.com>
	* bus/driver.c (create_unique_client_name): use "." as separator
	in base service names instead of '-'
	* dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
	byte at the end of the string
	* dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
	optimization macros since string validation seems to be a slow
	point.
	* doc/dbus-specification.xml: restrict valid
	service/interface/member/error names. Add test suite code for the
	name validation.
	* dbus/dbus-string.c: limit service/interface/member/error names
	to [0-9][A-Z][a-z]_
	* dbus/dbus-connection.c (dbus_connection_dispatch): add missing
	format arg to verbose spew
	* glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
	memory, return instead of g_error
	* test/test-service.c (path_message_func): support emitting a
	signal on request
	* dbus/dbus-bus.c (init_connections_unlocked): only fill in
	activation bus type if DBUS_BUS_ACTIVATION was set; default to
	assuming the activation bus was the session bus so that services
	started manually will still register.
	(init_connections_unlocked): fix so that in OOM situation we get
	the same semantics when retrying the function
	* test/test-service.c (main): change to use path registration, to
	test those codepaths; register with DBUS_BUS_ACTIVATION rather
	than DBUS_BUS_SESSION
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* dbus/dbus-pending-call.c: add the get/set object data
	boilerplate as for DBusConnection, etc. Use generic object data
	for the notify callback.
	* glib/dbus-gparser.c (parse_node): parse child nodes
	* tools/dbus-viewer.c: more hacking on the dbus-viewer
	* glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
	contain functions shared between the convenience lib and the
	installed lib
	* glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
	-export-symbols-regex to the GLib library
	* dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
	fix the locking in here, and add a default handler for
	Introspect() that just returns sub-nodes.
2003-09-14  Havoc Pennington  <hp@pobox.com>
	* glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
	rather than gfoo consistent
	* glib/dbus-gproxy.h: delete for now, move contents to
	dbus-glib.h, because the include files don't work right since we
	aren't in the dbus/ subdir.
	* glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
	(dbus_gproxy_end_call): finish
	(dbus_gproxy_begin_call): finish
	* glib/dbus-gmain.c (dbus_set_g_error): new
	* glib/dbus-gobject.c (handle_introspect): include information
	about child nodes in the introspection
	* dbus/dbus-connection.c (dbus_connection_list_registered): new
	function to help in implementation of introspection
	* dbus/dbus-object-tree.c
	(_dbus_object_tree_list_registered_and_unlock): new function
2003-09-12  Havoc Pennington  <hp@pobox.com>
	* glib/dbus-gidl.h: add common base class for all the foo_info
	types
        * tools/dbus-viewer.c: add GTK-based introspection UI thingy
	similar to kdcop
	* test/Makefile.am: try test srcdir -ef . in addition to test
	srcdir = ., one of them should work (yeah lame)
        * glib/Makefile.am: build the "idl" parser stuff as a convenience
	library
	* glib/dbus-gparser.h: make description_load routines return
	NodeInfo* not Parser*
	* Makefile.am (SUBDIRS): build test dir after all library dirs
	* configure.in: add GTK+ detection
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
* test/glib/Makefile.am: add this with random glib-linked test
	programs
	* glib/Makefile.am: remove the random test programs from here,
	leave only the unit tests
	* glib/dbus-gobject.c (_dbus_gobject_test): add test for
	uscore/javacaps conversion, and fix
	(get_object_property, set_object_property): change to .NET
	convention for mapping props to methods, set_FooBar/get_FooBar,
	since one language has such a convention we may as well copy it.
	Plus real methods in either getFooBar or get_foo_bar style won't
	collide with this convention.
 | 
|   
  
  
  
  
  
  
  
   | 
* glib/dbus-gparser.c: implement
	* glib/dbus-gobject.c: start implementing skeletons support
	* configure.in: when disabling checks/assert, also define
	G_DISABLE_ASSERT and G_DISABLE_CHECKS
 |