Commit graph

1047 commits

Author SHA1 Message Date
Havoc Pennington
8d413c6e71 2004-07-24 Havoc Pennington <hp@redhat.com>
* Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
	Owen

	* test/Makefile.am (DIST_SUBDIRS): here also
2004-07-25 03:52:48 +00:00
Olivier Andrieu
5e9fd25100 remove stray debugging line 2004-07-22 07:07:51 +00:00
Olivier Andrieu
7eb304c54e 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
	breaking build on Solaris, reported by Farhad Saberi on the ML.

	* dbus/dbus-message.c (dbus_message_append_args_valist): fix the
	va_arg invocation to account for integer promotion in the case of
	DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)

	* bus/services.c (bus_service_remove_owner): fix bug #902, use
	_dbus_list_get_first_link, not _dbus_list_get_first.

	* dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.

	* dbus/dbus-object-tree.c (free_subtree_recurse): always null
	handler functions so that the asserts in _dbus_object_subtree_unref
	do not fail.

	* dbus/dbus-transport-unix.c (do_reading):
	_dbus_transport_queue_messages return value is of type
	dbus_bool_t, not DBusDispatchStatus.
2004-07-22 07:07:01 +00:00
David Zeuthen
c9c0adce43 2004-07-19 David Zeuthen <david@fubar.dk>
* dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN

	* bus/dispatch.c:
	(check_get_connection_unix_user): Debug says GetProperty; but the
	method is called GetConnectionUnixUser
	(check_get_connection_unix_process_id): New function
	(bus_dispatch_test): Actually call check_get_connection_unix_user();
	also call check_get_connection_unix_process_id()

	* bus/driver.c:
	(bus_driver_handle_get_connection_unix_process_id): New function,
	handles GetConnectionUnixProcessID on the org.freedesktop.DBus
	interface

	* dbus/dbus-auth.c:
	(handle_server_data_external_mech): Set pid from the credentials
	obtained from the socket

	* dbus/dbus-connection.c:
	(dbus_connection_get_unix_process_id): New function

	* dbus/dbus-connection.h:
	Add prototype for dbus_connection_get_unix_process_id

	* dbus/dbus-transport.c:
	(_dbus_transport_get_unix_process_id): New function

	* dbus/dbus-transport.h:
	Add prototype for _dbus_transport_get_unix_process_id
2004-07-19 20:55:58 +00:00
Olivier Andrieu
dcbc92bfeb * dbus/dbus-message.c: Message counter fix, patch by Christian Hammond <chipx86@gnupdate.org> 2004-07-19 10:42:28 +00:00
Seth Nickell
5d0ed9c704 2004-07-18 Seth Nickell <seth@gnome.org>
* python/dbus.py:
	* python/dbus_bindings.pyx.in:
	* python/tests/test-client.py:

	Add dbus.ByteArray and dbus_bindings.ByteArray
	types so that byte streams can be passed back.

	Give jdahlin the heaps of credit that are so
	rightfully his.
2004-07-18 21:44:37 +00:00
Seth Nickell
5afe4265ea 2004-07-12 Seth Nickell <seth@gnome.org>
* python/dbus.py:

	Add message argument to the default object_method_handler
	function.

	* python/dbus_bindings.pyx.in:

	Automatically return NIL when passed an empty list
	(we can't pass back a list since lists are typed
	and we don't have any idea what type the the client
	intended the list to be... :-( )
2004-07-12 06:29:00 +00:00
Seth Nickell
dd4ff748c1 2004-07-10 Seth Nickell <seth@gnome.org>
* python/examples/Makefile.am:

	Fix distcheck breakage caused by new examples.
2004-07-11 03:09:03 +00:00
Seth Nickell
233f8d0e33 2004-07-10 Seth Nickell <seth@gnome.org>
* python/dbus.py:

	Add "message" argument to service-side dbus.Object
	methods. This will break existing services written
	using the python bindings, but will allow extraction
	of all the message information (e.g. who its from).

	Add improved "object oriented" signal handling/emission.

	* python/examples/example-service.py:

	Nix this example.

	* python/examples/example-signal-emitter.py:
	* python/examples/example-signal-recipient.py:

	Two new examples that show how to emit and receive
	signals using the new APIs.

	* python/examples/example-signals.py:
	* python/examples/gconf-proxy-service.py:
	* python/examples/gconf-proxy-service2.py:

	Add "message" argument to service methods.
2004-07-11 03:02:14 +00:00
Colin Walters
3d0f1fb1b6 2004-07-06 Colin Walters <walters@redhat.com>
* doc/Makefile.am, qt/Makefile.am:
	mono/doc/Makefile.am: Allow 'make dist'
	without doc building of various sorts or
	QT support enabled.
2004-07-06 15:15:59 +00:00
Havoc Pennington
54752a6d94 separate out glib binding items 2004-07-03 11:20:05 +00:00
Olivier Andrieu
6df26b2432 add autogenerated dbus-glib-error-enum.h 2004-06-28 21:56:47 +00:00
Olivier Andrieu
2779cbf976 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
* dbus/bus.c (dbus_bus_get_unix_user)
* doc/dbus-specification.xml: implement GetConnectionUnixUser
method of org.freedesktop.DBus interface.

* bus/dispatch.c: test case
2004-06-28 21:55:15 +00:00
John (J5) Palmieri
5d58a04018 * switched include directory from glib/ to dbus/
since dbus-glib.h moved
2004-06-23 14:59:44 +00:00
Olivier Andrieu
a2a5df49d6 reverting, this was already done 2004-06-22 12:08:22 +00:00
Olivier Andrieu
9406615018 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
* configure.in: prevent building the gcj stuff and libxml loader
	since they are broken.
2004-06-22 11:58:13 +00:00
Havoc Pennington
961e6ca41c 2004-06-20 Havoc Pennington <hp@redhat.com>
* 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
2004-06-20 15:28:15 +00:00
Owen Fraser-Green
eed3989ea3 Remove glib-sharp from Libs flag. 2004-06-10 12:55:28 +00:00
Owen Fraser-Green
e7ec62bcb0 Fixed typo for python/examples make 2004-06-10 12:13:39 +00:00
Owen Fraser-Green
15e3aa9257 Bumped required versions for mono 2004-06-10 12:10:13 +00:00
Olivier Andrieu
7da40340f3 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
* bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
	the reply value of the ServiceExists message.
2004-06-09 18:15:10 +00:00
John (J5) Palmieri
118f72cd0c * Python bindings are updated to reflect C API changes which now
accept plain path strings instead of an array of path elements.
2004-06-08 02:35:44 +00:00
Havoc Pennington
a8b1cf0774 2004-06-07 Havoc Pennington <hp@redhat.com>
* doc/TODO: remove auto-activation item since it's done; sort
	items by importance/milestone
2004-06-07 21:02:23 +00:00
Havoc Pennington
72528d58be add item about per-display activation 2004-06-07 20:48:33 +00:00
Havoc Pennington
a6d1c745ab some clarifications 2004-06-07 20:07:43 +00:00
Havoc Pennington
f7beca572b 2004-06-07 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message-builder.c (_dbus_message_data_load): append
	random signature when using REQUIRED_FIELDS (this hack won't work
	in the long term)

	* dbus/dbus-message.c: change the signature to be a header field,
	instead of message->signature special-case string. Incremental
	step forward. Then we can fix up code to send the signature in the
	message, then fix up code to validate said signature, then fix up
	code to not put the typecodes inline, etc.
	(load_one_message): don't make up the signature after the fact
	(decode_header_data): require signature field for the known
	message types

	* dbus/dbus-marshal.c (_dbus_marshal_string_len): new

	* dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2004-06-07 19:27:51 +00:00
Owen Fraser-Green
41a369c333 Changes in-line with new object_path param changes. Also bumped required mono version and use new -pkg flag. 2004-06-07 11:40:20 +00:00
Olivier Andrieu
96f6740f2f 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
* 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.
2004-06-05 16:32:00 +00:00
Kristian Høgsberg
63de468129 2004-06-02 Kristian Høgsberg <krh@redhat.com>
* dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
	machine approach.  A state is implemented as a function that
	handles incoming events as specified for that state.

	* doc/dbus-specification.xml: Update auth protocol state machine
	specification to match implementation.  Remove some leftover
	base64 examples.
2004-06-02 14:03:58 +00:00
Kristian Høgsberg
54dcec2a83 2004-06-02 Kristian Høgsberg <krh@redhat.com>
* glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
	dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
	quiet doxygen.

	* Doxyfile.in: remove deprecated options.

	* dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
	glib/test-thread.h, glib/test-thread-client.c,
	glib/test-thread-server.c, glib/test-profile.c,
	glib/test-dbus-glib.c: remove these unused files.
2004-06-02 13:13:14 +00:00
Olivier Andrieu
0ea8ec33e0 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-object-tree.c
	(_dbus_object_tree_dispatch_and_unlock): fix dispatch for
	non-fallback handlers (bug #684).
	(_dbus_object_subtree_new): initialize invoke_as_fallback field.
	(find_subtree_recurse): report wether the returned subtree is an
	exact match or a "fallback" match higher up in the tree.
	(object_tree_test_iteration): update test case.
2004-06-01 19:57:00 +00:00
Havoc Pennington
858cfd9e74 add a couple thoughts so I remember them 2004-06-01 13:58:57 +00:00
Seth Nickell
241878cded Update .cvsignore files 2004-06-01 06:16:13 +00:00
Seth Nickell
736f76ba97 2004-06-01 Seth Nickell <seth@gnome.org>
* python/dbus_bindings.pyx.in:
	* python/tests/test-client.py:

	Round off basic type support. Add dicts (yay!), and
	remaining array types.

	Make MessageIter more general so it works for dicts too.

	Mark all loop variables as C integers.
2004-06-01 06:13:31 +00:00
Havoc Pennington
e12863aae8 2004-05-31 Havoc Pennington <hp@redhat.com>
* 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...)
2004-06-01 03:02:26 +00:00
Seth Nickell
23e9d3d504 * python/dbus_bindings.pyx.in:
* python/tests/test-client.py:

	Test Suite: 1
	Python Bindings: 0

	(fix string array memory trashing bug... oops)
2004-06-01 01:20:59 +00:00
Seth Nickell
d027c99375 2004-05-30 Seth Nickell <seth@gnome.org>
* python/dbus.py:

	Add a nicer-but-less-flexible alternate API for handling
	calls to virtual objects in dbus.ObjectTree.

	Screw up the argument order to the dbus.Object constructor
	for consistency with dbus.ObjectTree (and to make dbus_methods
	optional for future extension)

	* python/examples/Makefile.am:
	* python/examples/gconf-proxy-service.py:
	* python/examples/gconf-proxy-service2.py:

	Alternate implementation of gconf-proxy-service using the
	nicer dbus.ObjectTree API.

	* python/examples/example-service.py:
	* python/tests/test-server.py

	Reverse the argument order to deal with dbus.Object constructor
	changes.
2004-05-30 08:20:58 +00:00
Seth Nickell
7dc64ab60a 2004-05-30 Seth Nickell <seth@gnome.org>
* python/examples/example-client.py:
	* python/examples/example-service.py:

	Take it back. Lists seem to work but they're broken
	in the test suite. Make the base examples use
	lists (works fine).
2004-05-30 06:26:24 +00:00
Seth Nickell
8a10d91cc0 2004-05-30 Seth Nickell <seth@gnome.org>
* python/dbus_bindings.pyx.in:
	* python/tests/test-client.py:

	Add some more tests and fix errors that crop up.
	Unfortunately, currently it seems like marshalling
	and unmarshalling of lists is completely broken :-(
2004-05-30 06:21:00 +00:00
Seth Nickell
26c937cb30 2004-05-30 Seth Nickell <seth@gnome.org>
* python/dbus_bindings.pyx.in:

	Add support for ObjectPath type.

	* python/dbus.py:

	Refactor message handling code to a common function.

	* python/tests/test-client.py:
	* python/tests/test-server.py:

	Add tests that check to make sure values of all types
	can be echoed from a service w/o mangling.
2004-05-30 05:30:09 +00:00
Seth Nickell
2e8a06bb8f 2004-05-29 Seth Nickell <seth@gnome.org>
* python/dbus.py:

	Add ObjectTree class which allows implementation
	of trees of "virtual" objects. Basically the python
	wrapper for "register_fallback".

	* python/examples/Makefile.am
	* python/examples/gconf-proxy-client.py:
	* python/examples/gconf-proxy-service.py:

	Implement a simple GConf proxy service that supports
	get/set on string and int GConf keys using the ObjectTree.
2004-05-30 02:26:48 +00:00
Seth Nickell
5d6113aaa0 2004-05-29 Seth Nickell <seth@gnome.org>
* python/dbus.py:
	* python/examples/example-client.py:
	* python/examples/example-service.py:
	* python/examples/list-system-services.py:

	Add SessionBus, SystemBus and ActivationBus classes
	so you don't need to know the special little BUS_TYPE
	flag.
2004-05-29 22:37:13 +00:00
Havoc Pennington
7c77664c5a 2004-05-29 Havoc Pennington <hp@redhat.com>
* bus/config-parser.c (process_test_valid_subdir): temporarily
	stop testing config parser OOM handling, since expat has issues
	http://freedesktop.org/pipermail/dbus/2004-May/001153.html

	* bus/dbus-daemon-1.1.in: change requested_reply to
	send_requested_reply/receive_requested_reply so we can send the
	replies, not just receive them.

	* bus/config-parser.c: parse the new
	send_requested_reply/receive_requested_reply

	* bus/policy.c (bus_client_policy_check_can_send): add
	requested_reply argument and use it

	* bus/bus.c (bus_context_check_security_policy): pass through
	requested_reply status to message send check

	* bus/system.conf.in: adapt to requested_reply change
2004-05-29 04:17:17 +00:00
Havoc Pennington
fbae5baa06 2004-05-28 Havoc Pennington <hp@redhat.com>
* test/glib/test-service-glib.c (main): remove unused variable

	* glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning

	* dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
	from the enum, no longer in use.

	* dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
	works right.

	* dbus/dbus-message.c: add various _dbus_return_val_if_fail for
	whether error_name passed in is a valid error name.
2004-05-28 22:30:04 +00:00
John (J5) Palmieri
1041b44d30 * fix for TODO item:
- the varargs dbus_message_get_args() needs to support OBJECT_PATH
   and OBJECT_PATH_ARRAY
2004-05-28 19:09:00 +00:00
Seth Nickell
841bf8a026 * python/examples/Makefile.am:
Forget to add Makefile.am. Do not pass go.
2004-05-28 18:43:55 +00:00
Michael Meeks
0123e6a927 2004-05-28 Michael Meeks <michael@ximian.com>
* glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
	fix no int64 case.

	* dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.

	* dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
	(_dbus_message_iter_get_basic_type_array): impl.
	drastically simplify ~all relevant _get methods to use these.
	(_dbus_message_iter_append_basic_array),
	(dbus_message_iter_append_basic): impl
	drastically simplify ~all relevant _append methods to use these.

	* dbus/dbus-message-builder.c (parse_basic_type)
	(parse_basic_array, lookup_basic_type): impl.
	(_dbus_message_data_load): prune scads of duplicate /
	cut & paste coding.

	* dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
	(_dbus_demarshal_basic_type): implement,
	(demarshal_and_validate_len/arg): beef up debug.
	(_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2004-05-28 13:10:36 +00:00
Seth Nickell
f33553eae3 * configure.in:
* python/Makefile.am:

	Include the example python apps in the tarball.

	* python/examples/list-system-services.py

	Add a python new example that fetches the list of services
	from the system bus.
2004-05-28 02:52:23 +00:00
Seth Nickell
9e262d565e 2004-05-27 Seth Nickell <seth@gnome.org>
* python/dbus.py:
	* python/dbus_bindings.pyx.in:

	Fix failure to notify that a signal was not handled,
	resulted in hung functions.
2004-05-28 02:16:11 +00:00
Colin Walters
aa54f14c05 monitor all types of messages 2004-05-25 18:02:17 +00:00