| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* tools/dbus-send.c (main): don't close shared connection, fix
from Timo Hoenig
|
| |
|
|
|
|
|
|
|
|
| |
Patch from Joe Markus Clarke:
* tools/dbus-send.c (main):
Don't use C99 style initializers (bug #3933).
|
|
|
|
|
| |
* tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
64 bit signed and unsigned parameters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* tools/dbus-send.c (append_array): Use strtok.
(append_dict): New function.
(type_from_name): New function, extracted from main.
(main): Handle sending dicts.
* tools/dbus-print-message.c (print_iter): Print dict
entries.
|
|
|
|
|
|
|
|
|
|
| |
s/dbus_connection_disconnect/dbus_connection_close
* test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
s/dbus_connection_disconnect/dbus_connection_close
* test/test-service.c (path_message_func, filter_func):
s/dbus_connection_disconnect/dbus_connection_close
|
|
|
|
|
|
|
|
|
| |
* tools/dbus-send.c (append_array): New function.
(append_arg): Broken out from main.
(main): Add cheesy hack to send arrays and variants.
(usage): Update.
* tools/dbus-print-message.c (print_iter): Broken out
from main.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Throughout, grand renaming to strip out the use of "service",
just say "name" instead (or "bus name" when ambiguous). Did not
change the internal code of the message bus itself, only the
programmer-facing API and messages.
* doc/dbus-specification.xml: further update the message bus section
* bus/config-parser.c (all_are_equiv): fix bug using freed string
in error case
|
|
|
|
|
|
|
|
| |
* dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
* Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
of an 8-bit type. Now dbus_bool_t is the type to use whenever you
are marshaling/unmarshaling a boolean.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
* tools/dbus-send.c (main, usage): Add --reply-timeout
argument.
|
|
|
|
|
|
|
|
|
|
| |
Patch from Timo Teräs:
* tools/dbus-send.c (main): if --print-reply, assume type is
method call; support boolean type args
* dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
bunch of memleak and logic bugs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make matching rules theoretically work (add parser).
* bus/bus.c (bus_context_check_security_policy): fix up to handle
the case where destination is explicitly specified as bus driver
and someone else is eavesdropping.
* bus/policy.c (bus_client_policy_check_can_receive): fix up
definition of eavesdropping and assertion
* tools/dbus-send.c (main): use dbus_message_type_from_string
* bus/signals.c (bus_match_rule_parse): implement
* dbus/dbus-message.c (dbus_message_type_from_string): new
* dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get matching rules mostly working in the bus; only actually
parsing the rule text remains. However, the client side of
"signal connections" hasn't been started, this patch is only the
bus side.
* dbus/dispatch.c: fix for the matching rules changes
* bus/driver.c (bus_driver_handle_remove_match)
(bus_driver_handle_add_match): send an ack reply from these
method calls
* glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
arguments, reported by Seth Nickell
* bus/config-parser.c (append_rule_from_element): support
eavesdrop=true|false attribute on policies so match rules
can be prevented from snooping on the system bus.
* bus/dbus-daemon-1.1.in: consistently use terminology "sender"
and "destination" in attribute names; fix some docs bugs;
add eavesdrop=true|false attribute
* bus/driver.c (bus_driver_handle_add_match)
(bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
messages
* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
rid of broadcast service concept, signals are just always broadcast
* bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
mostly implement matching rules stuff (currently only exposed as signal
connections)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/data/valid-config-files/system.d/test.conf: change to
root for the user so warnings don't get printed
* dbus/dbus-message.c: add dbus_message_get_path,
dbus_message_set_path
* dbus/dbus-object-tree.c (do_test_dispatch): add test of
dispatching to a path
* dbus/dbus-string.c (_dbus_string_validate_path): add
* dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
(_dbus_marshal_object_path): implement
* dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
to contain the path to the target object
(DBUS_HEADER_FIELD_SENDER_SERVICE): rename
DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
* dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
dumb bug created earlier (wrong order of args to
decode_header_data())
* tools/dbus-send.c: port
* tools/dbus-print-message.c (print_message): port
* test/data/*messages: port all messages over
* dbus/dbus-message-builder.c: support including
message type
* bus/driver.c: port over
* bus/dispatch.c: port over to new stuff
* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
rename disconnect signal to "Disconnected"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tools/dbus-send.c (main): add --type argument, for now
supporting only method_call and signal types.
* tools/dbus-print-message.c: print message type
* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
init connection->objects
* doc/dbus-specification.sgml: fix sgml
* bus/*.c: port over to object-instance API changes
* test/test-service.c: ditto
* dbus/dbus-message.c (dbus_message_create_header): allow #NULL
name, we will have to fix up the rest of the code to also handle
this
(dbus_message_new): generic message-creation call
(set_string_field): allow appending name field
|
|
|
|
|
|
|
|
| |
* tools/dbus-print-message.c (print_message): Handle BOOLEAN.
* tools/dbus-send.c: Accept both --system and --session.
* tools/dbus-monitor.c: Same here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tools/dbus-send.c: Don't exit with an error code if --help was
passed. Default to using the session bus instead of the system
one.
* tools/dbus-launch.c: Ditto.
* tools/dbus-monitor.c: Ditto.
* tools/dbus-send.1: Update with new arguments.
* tools/dbus-launch.c: Emit code to export variables. New
arguments -s and -c to specify shell syntax, and a bit of code to
autodetect syntax. Also, allow specifying a program to run.
* tools/dbus-launch.1: Update with new arguments.
* tools/dbus-send.1: Ditto.
* tools/dbus-monitor.1: Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c: disable verbose lock spew
* tools/dbus-send.c: add --print-reply command line option
* tools/dbus-print-message.h (print_message): new util function
shared by dbus-send and dbus-monitor
* tools/dbus-monitor.c (handler_func): exit on disconnect
* dbus/dbus-transport-unix.c (do_reading): if the transport is
disconnected, don't try to use the read_watch
* dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
so we can find this bug more easily
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in: add --enable-checks
* dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
* dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
to use thread locks.
(_dbus_connection_handler_destroyed_locked): move some private
functions into proper docs group
* dbus/dbus-internals.h: add _dbus_return_if_fail,
_dbus_return_val_if_fail
Throughout: use dbus_return_if_fail
|
|
* tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
from Philip Blundell to send messages and monitor them.
|