| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
support, and do some code cleanups to share more code and
speed up array marshal/demarshal.
* dbus-1.0.pc.in (Cflags): put libdir include file in cflags
* configure.in: generate dbus-arch-deps.h
* dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
64-bit typecodes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/data/valid-messages/opposite-endian.message: fix test
to use proper type for rply field
* test/data/invalid-messages: add tests for below validation
* dbus/dbus-message.c (decode_header_data): validate field types,
and validate that named fields are valid names
(decode_name_field): consider messages in the
org.freedesktop.Local. namespace to be invalid.
* dbus/dbus-string.c (_dbus_string_validate_name): new
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented recursive types, named types and new-style iters
* bus/driver.c:
* glib/test-thread-client.c: (thread_func):
* glib/test-thread-server.c: (handle_test_message):
* test/test-service.c: (handle_echo):
Update to new api
* dbus/Makefile.am:
* dbus/dbus-dict.c:
* dbus/dbus-dict.h:
* dbus/dbus.h
Remove DBusDict
* dbus/dbus-internals.c: (_dbus_type_to_string):
Update for new types.
* dbus/dbus-marshal.[ch]:
Implement recursive types and the new marshalling format.
Remove hardcoded dict marshalling.
Marshal named types.
* dbus/dbus-message-builder.c:
Add BYTE_ARRAY.
Remove references to old types
* dbus/dbus-message.[ch]:
New non-refcounted iter API that supports recursive iters.
Use iters for appending, including support for recursive
iters.
Add byte and named type support.
Update everything to new marshalling formats.
Add tests for new API.
* dbus/dbus-protocol.h:
Remove old array types.
Add types: BYTE, ARRAY, DICT, NAMED
* dbus/dbus-string.c:
* dbus/dbus-sysdeps.c:
Make parse_double locale safe.
* dbus/dbus-test-main.c:
Call setlocale.
* dbus/dbus-test.c:
Kill dict test
* doc/dbus-specification.sgml:
Update spec
* test/data/incomplete-messages/missing-body.message:
* test/data/invalid-messages/bad-boolean.message:
* test/data/invalid-messages/bad-boolean-array.message:
* test/data/invalid-messages/boolean-array-length-too-long.message-raw:
* test/data/invalid-messages/boolean-has-no-value.message-raw:
* test/data/invalid-messages/too-short-dict.message:
* test/data/valid-messages/dict-simple.message:
* test/data/valid-messages/dict.message:
* test/data/valid-messages/emptiness.message:
* test/data/valid-messages/lots-of-arguments.message:
* test/data/valid-messages/no-padding.message:
* test/data/valid-messages/recursive-types.message:
Add missing NAME fields
Fix up dicts & arrays
* test/data/invalid-messages/dict-with-nil-value.message:
Removed, this is not invalid anymore.
* test/data/valid-messages/recursive-types.message:
Add new test for deeply recursive types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bus/activation.c: (bus_pending_activation_entry_free),
(bus_pending_activation_free), (bus_activation_new),
(bus_activation_unref), (bus_activation_service_created),
(bus_activation_activate_service):
* bus/activation.h:
* bus/bus.c: (bus_context_new):
* bus/desktop-file.c: (new_section):
* bus/driver.c: (bus_driver_send_service_deleted),
(bus_driver_handle_activate_service):
* bus/services.c: (bus_registry_new), (bus_registry_ensure):
* bus/services.h:
* dbus/dbus-connection.c:
(dbus_connection_send_with_reply_and_block):
* dbus/dbus-message.c: (dbus_message_append_args_valist):
* dbus/dbus-protocol.h:
Make activation work better. Now pending activations will be queued
and the daemon won't try to activate services that are already registered.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-marshal.c:
(_dbus_marshal_set_string):
Take a length argument so we can marshal the correct string
length.
(_dbus_marshal_dict), (_dbus_demarshal_dict),
(_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
(_dbus_marshal_test):
* dbus/dbus-marshal.h:
Add support for marshalling and demarshalling dicts.
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
Add support for TYPE DICT.
* dbus/dbus-message.c: (set_string_field):
Adjust header padding.
(dbus_message_append_args_valist), (dbus_message_append_dict),
(dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
(dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
(check_message_handling), (check_have_valid_message):
* dbus/dbus-message.h:
Add functions for setting and getting dicts.
* dbus/dbus-protocol.h:
Add DBUS_TYPE_DICT.
* dbus/dbus.h:
Add dbus-dict.h
* doc/dbus-specification.sgml:
Add information about how dicts are marshalled.
* test/data/invalid-messages/dict-with-nil-value.message:
* test/data/invalid-messages/too-short-dict.message:
* test/data/valid-messages/dict-simple.message:
* test/data/valid-messages/dict.message:
Add sample messages containing dicts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-internals.c: (_dbus_type_to_string):
* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
* dbus/dbus-message.c: (dbus_message_append_args_valist),
(dbus_message_append_boolean), (dbus_message_append_boolean_array),
(dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
(dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
(dbus_message_iter_get_double),
(dbus_message_iter_get_boolean_array), (message_iter_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* doc/dbus-specification.sgml:
* test/data/valid-messages/lots-of-arguments.message:
Add support for boolean and boolean array types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bus/activation.c: (load_directory), (bus_activation_init),
(bus_activation_activate_service):
* bus/activation.h:
* bus/driver.c:
(bus_driver_handle_activate_service), (bus_driver_handle_message):
More work on the activation handling.
* dbus/dbus-errors.h:
Add some error messages
* dbus/dbus-message.c: (dbus_message_new_error_reply):
* dbus/dbus-message.h:
New function that creates an error message.
* dbus/dbus-protocol.h:
Add ACTIVATE_SERVER message.
* dbus/dbus-server-unix.c: (unix_handle_watch),
(_dbus_server_new_for_domain_socket):
Call _dbus_fd_set_close_on_exec.
* dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
(_dbus_spawn_async), (_dbus_disable_sigpipe),
(_dbus_fd_set_close_on_exec):
* dbus/dbus-sysdeps.h:
Add _dbus_fd_set_close_on exec function. Also add function that checks
that all open fds are set to close-on-exec and warns otherwise.
* dbus/dbus-transport-unix.c:
(_dbus_transport_new_for_domain_socket):
Call _dbus_fd_set_close_on_exec.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-threads.c:
* dbus/dbus-threads.h:
Add condvars. Remove static mutext from API.
Implement static mutexes by initializing them from threads_init.
* glib/dbus-gthread.c:
* qt/dbus-qthread.cpp:
Update with the thread api changes.
* dbus/dbus-list.c:
* dbus/dbus-list.h:
Turn StaticMutex into normal mutex + init function.
Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
_dbus_list_append_link, _dbus_list_prepend_link
* dbus/dbus-sysdeps.c:
* dbus/dbus-sysdeps.h:
New type dbus_atomic_t, and new functions _dbus_atomic_inc,
_dbus_atomic_dec. Only slow fallback implementation at the moment.
* dbus/dbus-protocol.h:
Add DBUS_MESSAGE_LOCAL_DISCONNECT define
* dbus/dbus-message.c:
Make ref/unref atomic.
Fix some docs.
* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c:
* dbus/dbus-connection.h:
Make threadsafe.
Change _peek to _borrow,_return & _steal_borrowed.
Change disconnect callback to event.
Make dbus_connection_dispatch_messages reentrant.
* dbus/dbus-transport.c:
Don't ref the connection on calls to the transport
implementation.
* dbus/dbus-message-handler.c:
Make threadsafe.
* glib/dbus-gmain.c:
Don't use peek_message anymore
* test/Makefile.am:
* test/debug-thread.c:
* test/debug-thread.h:
Simple thread implementation that asserts() on deadlocks in
single-threaded code.
* test/bus-test.c:
(main) Call debug_threads_init.
* test/watch.c:
Use disconnect message instead of disconnect callback.
* bus/connection.c:
* bus/connection.h:
Don't call dbus_connection_set_disconnect_function. Instead export
bus_connection_disconnect.
* bus/dispatch.c:
Call bus_connection_disconnect when we get a disconnected message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bus/driver.c: (create_unique_client_name),
(bus_driver_handle_hello):
Don't take a name, just use a numeric id to identify
each client.
* dbus/Makefile.am:
* dbus/dbus-bus.c: (dbus_bus_register_client),
(dbus_bus_acquire_service), (dbus_bus_service_exists):
* dbus/dbus-bus.h:
Add new convenience functions for communicating with the bus.
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
Fix a typo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/dbus-specification.sgml: work on the specification
* dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
the protocol version of the message.
* dbus/dbus-protocol.h: drop special _REPLY names, the spec
no longer specifies that.
(DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
1/2/3/4)
* dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
"break" for DBUS_TYPE_NIL, remove @todo
|
|
|
|
|
|
| |
* dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
just set_is_error/get_is_error as this is a commonly-used
function, and write docs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-address.c: (dbus_address_entry_free):
Free key and value lists.
* dbus/dbus-internals.c: (_dbus_type_to_string):
Add the types we didn't have.
* dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
(_dbus_marshal_validate_arg):
Add NIL types.
* dbus/dbus-message.c: (dbus_message_set_sender):
Remove todo about being able to set sender to NULL.
(dbus_message_set_is_error_reply),
(dbus_message_get_is_error_reply):
* dbus/dbus-message.h:
New functions.
* dbus/dbus-protocol.h:
Add error reply flag.
* test/data/valid-messages/opposite-endian.message:
Add NIL type to test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/dbus-specification.sgml: fully specify the header. Add
flags and major protocol version, and change header/body len to
unsigned.
* dbus/dbus-message-builder.c (append_saved_length): append length
as uint32
* dbus/dbus-message.c (dbus_message_create_header): change header
length and body length to unsigned. Add the new fields from the
spec
(_dbus_message_loader_return_buffer): unsigned header/body len
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bus/dispatch.c: (bus_dispatch_message_handler):
Dispatch messages sent to services.
* bus/driver.c: (bus_driver_send_service_deleted),
(bus_driver_send_service_created), (bus_driver_send_service_lost),
(bus_driver_send_service_acquired):
Add helper functions for sending service related messages.
(bus_driver_send_welcome_message):
Send HELLO_REPLY instead of WELCOME.
(bus_driver_handle_list_services):
Send LIST_SERVICES_REPLY instead of SERVICES.
(bus_driver_handle_own_service),
(bus_driver_handle_service_exists):
New message handlers.
(bus_driver_handle_message):
Invoke new message handlers.
(bus_driver_remove_connection):
Don't remove any services here since that's done automatically
by bus_service_remove_owner now.
* bus/driver.h:
New function signatures.
* bus/services.c: (bus_service_add_owner):
Send ServiceAcquired message if we're the only primary owner.
(bus_service_remove_owner):
Send ServiceAcquired/ServiceLost messages.
(bus_service_set_prohibit_replacement),
(bus_service_get_prohibit_replacement):
Functions for setting prohibit replacement.
(bus_service_has_owner):
New function that checks if a connection is in the owner queue of
a certain service.
* bus/services.h:
Add new function signatures.
* dbus/dbus-list.c: (_dbus_list_test):
Add tests for _dbus_list_remove_last and traversing the list backwards.
* dbus/dbus-list.h:
Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
go any further, so return NULL then.
* dbus/dbus-protocol.h:
Add new messages, service flags and service replies.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-internals.h:
Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
* dbus/dbus-message.c: (dbus_message_get_sender):
* dbus/dbus-message.h:
Implement dbus_message_get_sender.
* dbus/dbus-protocol.h:
Add message and service defines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-marshal.c: (_dbus_marshal_double),
(_dbus_marshal_int32), (_dbus_marshal_uint32),
(_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
(_dbus_marshal_double_array), (_dbus_marshal_string_array),
(_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
(_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
(_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
* dbus/dbus-protocol.h:
Add support for marshalling and demarshalling integer, double
and string arrays.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c: (dbus_connection_send_message):
Add a new client_serial parameter.
(dbus_connection_send_message_with_reply):
Remove a @todo since we've implemented the blocking function.
(dbus_connection_send_message_with_reply_and_block):
New function that sends a message and waits for a reply and
then returns the reply.
* dbus/dbus-connection.h:
Add new functions.
* dbus/dbus-errors.c: (dbus_result_to_string):
* dbus/dbus-errors.h:
Add new DBUS_RESULT.
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_get_reply_serial),
(_dbus_message_set_sender), (dbus_message_write_header),
(dbus_message_new_reply), (decode_header_data),
(_dbus_message_loader_return_buffer), (_dbus_message_test):
* dbus/dbus-message.h:
Add new functions that set the reply serial and sender.
Also marshal and demarshal them correctly and add test.
* dbus/dbus-protocol.h:
Add new DBUS_MESSAGE_TYPE_SENDER.
* glib/dbus-glib.h:
* glib/dbus-gmain.c: (watch_callback), (free_callback_data),
(add_watch), (remove_watch), (add_timeout), (remove_timeout),
(dbus_connection_hookup_with_g_main):
* glib/test-dbus-glib.c: (main):
Rewrite to use GIOChannel and remove the GSource crack.
* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Update for changed APIs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection-internal.h:
* dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
(_dbus_connection_get_next_client_serial),
(dbus_connection_send_message):
* dbus/dbus-internals.h:
* dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
(dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
(_dbus_marshal_uint32), (_dbus_demarshal_double),
(_dbus_demarshal_int32), (_dbus_demarshal_uint32),
(_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
(_dbus_verbose_bytes), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
* dbus/dbus-message-internal.h:
* dbus/dbus-message.c: (_dbus_message_set_client_serial),
(dbus_message_write_header), (_dbus_message_lock),
(dbus_message_new), (dbus_message_ref), (dbus_message_unref),
(dbus_message_get_name), (dbus_message_append_int32),
(dbus_message_append_uint32), (dbus_message_append_double),
(dbus_message_append_string), (dbus_message_append_byte_array),
(dbus_message_get_fields_iter), (dbus_message_iter_ref),
(dbus_message_iter_unref), (dbus_message_iter_has_next),
(dbus_message_iter_next), (dbus_message_iter_get_field_type),
(dbus_message_iter_get_string), (dbus_message_iter_get_int32),
(dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
(decode_header_data), (_dbus_message_loader_return_buffer),
(message_iter_test), (_dbus_message_test):
* dbus/dbus-message.h:
* dbus/dbus-protocol.h:
* dbus/dbus-test.c: (main):
* dbus/dbus-test.h:
* glib/test-dbus-glib.c: (message_handler), (main):
* test/echo-client.c: (main):
* test/watch.c: (check_messages):
Make messages sendable and receivable for real.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-marshal.c: (_dbus_marshal_string),
(_dbus_demarshal_string), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
Document these functions.
* dbus/dbus-message.c: (dbus_message_get_name),
(dbus_message_append_int32), (dbus_message_append_uint32),
(dbus_message_append_double), (dbus_message_append_string),
(dbus_message_append_byte_array):
* dbus/dbus-message.h:
Add functions for adding message fields of different types.
* dbus/dbus-protocol.h:
Add the different types.
|
|
* dbus/Makefile.am:
* dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
(_dbus_marshal_int32), (_dbus_marshal_uint32),
(_dbus_demarshal_double), (_dbus_demarshal_int32),
(_dbus_demarshal_uint32), (_dbus_marshal_test):
* dbus/dbus-marshal.h:
* dbus/dbus-protocol.h:
* dbus/dbus-test.c: (main):
* dbus/dbus-test.h:
Add un-optimized marshalling/demarshalling routines.
|