ee86d051424d87441e5805bbad86364934942e49
[platform/upstream/dbus.git] / ChangeLog
1 2005-11-15  Robert McQueen  <robot101@debian.org>
2
3         * python/service.py: Include the traceback in the error reply when we
4         send an exception over the bus. _BEST_ _PATCH_ _EVER_
5
6 2005-11-14  David Zeuthen  <davidz@redhat.com>
7
8         Patch from Timo Hoenig <thoenig@suse.de>.
9
10         * bus/bus.c: I've recently investigated why the automatic reload
11         of configuration files does not work as expected.
12
13         Currently, reloading configuration files does only work when
14         running dbus-daemon with --nodaemon.  If we are running as daemon
15         we're hitting a dnotify bug once we fork the process.
16
17         We're initializing the dnotify fds before calling fork().  Once
18         the child process forked it does still have the fds (and they
19         still show up in /proc/`pidof dbus-daemon`/fd/) but we're not
20         getting SIGIO as changes are made to the configuration files.
21
22         The attached patch moves the initialization of the dnotify fds to
23         process_config_postinit().  This is safe for all current code
24         paths and solves the dnotify disfunction.  If we're running
25         dbus-daemon as daemon the fds for dnotify are now being
26         initialized after fork() for the child process.
27
28         * configure.in: The current configure.in check for dnotify probes
29         'x$target_os' for being 'xlinux-gnu'.  I've changed the check to
30         match for 'xlinux', too. Additionally I have adapted the configure
31         option's style to match with the others.
32
33 2005-11-14  Robert McQueen  <robot101@debian.org>
34
35         * python/decorators.py, python/service.py: Add a new argument to the
36         dbus.service.method decorator called sender_keyword, which if set,
37         specifies the name of an argument which will be provided the bus
38         name of the method caller.
39
40         * test/python/test-client.py, test/python/test-service.py: Add a
41         method and test to check the sender_keyword functionality.
42
43 2005-11-07  John (J5) Palmieri  <johnp@redhat.com>
44
45         * bus/driver.c (bus_driver_handle_reload_config): Make sure we send an 
46         empty reply so blocking calls don't block forever (Patch from Sjoerd 
47         Simons <sjoerd at luon.net>)
48
49         * AUTHORS: Add Robert McQueen for his work on the Python
50         Bindings and other parts of D-Bus
51
52 2005-11-07  Robert McQueen  <robot101@debian.org>
53
54         * python/decorators.py: Change emit_signal function to use the
55         signature annotation of the signal when marhsalling the arguments from
56         the service. Fix a bug where the code checking signature length
57         against argument length referenced the wrong variable.
58
59         * python/introspect_parser.py: Avoid adding the type signature of
60         signal arguments to any methods which occur after them in the
61         introspection data (!) by making the parser a little more careful
62         about its current state.
63
64         * python/service.py: Remove debug prints from last commit (again :D).
65
66         * test/python/test-client.py, test/python/test-service.py: Add test
67         signals with signature decorators to test the strict marshalling code
68         gives errors at the right time. Could do with checking the signals
69         actually get emitted too, given that the test does nothing with
70         signals at the moment...
71
72 2005-11-07  Robert McQueen  <robot101@debian.org>
73
74         * python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
75         instances to stop madness of creating new instances representing
76         the same bus connection all the time, rendering any tracking of
77         match rules and bus names quite meaningless. Caught a bug where
78         the private argument to SessionBus() and friends was being passed
79         in as use_default_mainloop by mistake. Still some problems with
80         multiple dbus_binding.Connection instances representing the same
81         low-level connection (eg when you use both SessionBus() and
82         StarterBus() in same process), but it's a lot better now than it
83         was.
84
85         * python/dbus_bindings.pyx: Add constants with the return values
86         for bus_request_name().
87
88         * python/service.py: Store bus name instances in a per-dbus.Bus cache
89         and retrieve the same instances for the same name, so deletion can be
90         done with refcounting. Also now throws some kind of error if you
91         don't actually get the name you requested, unlike previously...
92
93         * test/python/test-client.py: Add tests for instance caching of buses
94         and bus name objects.
95
96 2005-11-04  Robert McQueen  <robot101@debian.org>
97
98         * python/dbus_bindings.pyx, test/python/test-client.py: Fix
99         marshalling of boolean values. Add some booleans to the values in
100         the test client.
101
102         * python/decorators.py, python/service.py: Add an 'async_callbacks'
103         argument to the dbus.service.method decorator, which allows you to
104         name arguments to take two callback functions for replying with
105         return values or an exception.
106
107         * test/python/test-client.py, test/python/test-service.py: Add test
108         case using asynchronous method reply functions, both return values and
109         errors, and from within both the function itself and from a mainloop
110         callback.
111
112         * python/decorators.py, python/service.py: Perform checking that the
113         number of method/signal arguments matches the number of types in the
114         signature at class loading time, not when you first introspect the
115         class.
116
117         * python/service.py: Remove debug print left by the last commit.
118
119 2005-11-03  Robert McQueen  <robot101@debian.org>
120
121         * python/service.py: Heavy refactoring of method invocation, with
122         hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
123         in favour of a new _message_cb that uses seperate functions for
124         looking up the method to call, marshalling the return values, and
125         sending exceptions as errors, and is easier to follow as a
126         consequence.  Fixes some corner cases about returning things that
127         don't match your declared out_signature, allows exceptions to define
128         _dbus_error_name and have it be sent over the bus as the error name,
129         and paves the way for cool stuff like heeding the message no reply
130         flag, asynchronous method implementations, informing the method of the
131         sender, and including backtraces in the error messages.
132
133         * test/python/test-client.py: Catch and print exceptions thrown in the
134         async callback tests, rather than passing them to the low-level
135         bindings to be ignored in a noisy and frustrating manner.
136
137 2005-11-03  Robert McQueen  <robot101@debian.org>
138
139         * python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
140         functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
141         tweak others to be consistent.
142
143         * test/python/test-client.py: Tweak output of testInheritance.
144
145 2005-10-29  Robert McQueen  <robot101@debian.org>
146
147         * python/service.py: Major changes to allow multiple inheritance
148         from classes that define D-Bus interfaces:
149         
150          1. Create a new Interface class which is the parent class of
151             Object, and make the ObjectType metaclass into InterfaceType.
152         
153          2. Patch written with Rob Taylor to replace use of method_vtable
154             with code that walks the class's __MRO__ (method resolution order)
155             to behave like Python does when invoking methods and allow
156             overriding as you'd expect. Code is quite tricky because
157             we have to find two methods, the one to invoke which has the
158             right name and isn't decorated with the /wrong/ interface,
159             and the one to pick up the signatures from which is decorated
160             with the right interface.
161         
162             The same caveats apply as to normal multiple inheritance -
163             this has undefined behaviour if you try and inherit from two
164             classes that define a method with the same name but are
165             decorated with different interfaces. You should decorate
166             your overriding method with the interface you want.
167         
168          3. Replace grungy introspection XML generation code in the metaclass
169             with dictionaries that cope correctly with multiple inheritance
170             and the overriding of methods. This also uses the signature
171             decorations to provide correct introspection data, including
172             the debut appearance of the types of your return values. :D
173
174         * test/python/test-client.py, test/python/test-service.py: Add a test
175         case to try invoking an method that overrides one inherited from a
176         D-Bus interface class.
177
178 2005-10-29  Robert McQueen  <robot101@debian.org>
179
180         * python/dbus_bindings.pyx: Tweak 'raise AssertionError' to assert().
181         Add checking for the end of struct character when marshalling a
182         struct in MessageIter.append_strict.
183
184         * python/examples/example-service.py,
185         python/examples/gconf-proxy-service.py,
186         python/examples/gconf-proxy-service2.py: Update to use gobject
187         mainloop directly rather than appearing to depend on gtk.
188
189         * python/test/test-client.py, python/test/test-server.py: Remove
190         obsolete and broken test scripts for old bindings. We have up to date
191         and working tests in test/python/.
192
193 2005-10-29  Robert McQueen  <robot101@debian.org>
194
195         * python/decorators.py: Add optional arguments to the method and
196         signal decorators to allow you to specify the signature of arguments
197         and return values. Preserve the doc strings of signal functions in the
198         decorated version, for pydoc and friends.
199
200         * python/dbus_bindings.pyx, python/proxies.py: Replace the
201         parse_signature_block function with an iterable dbus.Signature()
202         type. Fix a bug in MessageIter.append_strict where you could append
203         anything by claiming it was a string.
204
205         * python/service.py: Use the out_signature decoration on methods to
206         marshal return values, meaning you no longer require dbus.Array()
207         or dbus.Dictionary() to indicate the type when returning empty
208         arrays or dictionaries. Fix a bug where exceptions which are defined
209         in __main__ are not turned into error replies.
210
211         * test/python/test-client.py, test/python/test-service.py: Add test
212         for correct marshalling of return values according to out_signature.
213         Fix a bug in the async call test where the error_handler is missing a
214         self argument.
215
216 2005-10-29  Robert McQueen  <robot101@debian.org>
217
218         * glib/Makefile.am, glib/examples/Makefile.am,
219         glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
220         Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).
221
222         * test/python/.cvsignore: Add run-with-tmp-session-bus.conf.
223
224         * tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
225         from Ubuntu by Daniel Silverstone to allow specifying match rules on
226         the command line.
227
228 2005-10-27  Ross Burton  <ross@openedhand.com>
229
230         * dbus/dbus-marshal-header.c:
231         Remove dead code.
232
233         * glib/dbus-gobject.c:
234         Stop compiler warning.
235
236 2005-10-25  Ross Burton  <ross@openedhand.com>
237
238         * dbus/dbus-auth.c:
239         * dbus/dbus-server-unix.c:
240         * dbus/dbus-transport-unix.c:
241         * glib/dbus-gmain.c:
242         * glib/dbus-gobject.c:
243         Add some const keywords.
244
245 2005-10-25  Ross Burton  <ross@openedhand.com>
246
247         * doc/dbus-specification.xml:
248         Document the NoReply annotation.
249
250         * glib/dbus-binding-tool-glib.h:
251         * glib/dbus-binding-tool-glib.c:
252         Respect the NoReply annotation.
253
254 2005-10-24  Robert McQueen <robot101@debian.org>
255
256         * python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
257         derive from unicode instead of str, and encode/decode UTF-8 when
258         marshalling/unmarshalling bus messages
259
260         * python/introspect_parser.py: encode introspection data as UTF-8
261         before passing the buffer into libxml2
262
263         * test/python/test-client.py: add unicode test strings
264
265         * test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
266         ignore generated python test files
267
268 2005-10-17  John (J5) Palmieri  <johnp@redhat.com>
269
270         * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
271         and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
272         (gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
273
274         * glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
275         DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
276         when constructing struct signatures
277
278         * python/_dbus.py (Bus): handle private connections using the
279         private keyword in the constructor. defaults to private=False
280         (Bus::close): new method to close a connection to the bus
281
282         * python/dbus_bindings.pyx (Connection::close): renamed method
283         was previously called disconnect
284         (bus_get): now supports getting a private connection
285
286         * python/proxies.py (ProxyMethod::__call__): check if ignore_reply
287         keyword is set to True.  if it is, execute the method without waiting
288         for a reply
289         (ProxyObject::_introspect_execute_queue): new method for executing
290         all the pending methods that were waiting for the introspect to
291         finish.  this is called when introspect either succeeds or fails
292         (ProxyObject::_introspect_error_handler): call queued methods
293
294 2005-10-14  John (J5) Palmieri  <johnp@redhat.com>
295
296         * python/dbus_bindings.pyx (MessageIter::append_strict): check for
297         STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
298
299         * python/service.py (Object::_message_cb): handle exceptions correctly
300         by sending them over the wire to the calling app.  This makes sure
301         the client returns immediately instead of waiting the 15 seconds to
302         timeout.
303
304         * test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect): 
305         Add a test to benchmark how long it takes to introspect a service and 
306         call a method which returns a large element (pretty fast)
307
308         * test/python/test-service.py (TestObject::GetComplexArray): new test 
309         method which pushes a lot of data
310
311 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
312
313         * python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):        
314         reclaim memory outside of the loop and use del istead of just setting
315         the key to None
316
317 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
318
319         * python/service.py (ObjectType::_reflect_on_signal): Always close
320         signal tag even when there are no arguments
321
322 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
323
324         * configure.in: Set mono, mono-docs and Qt3 to default
325         to no instead of auto when building.  These bindings do not
326         have full time maintainers and will not be supported for the
327         1.0 release.
328
329 2005-10-12  John (J5) Palmieri  <johnp@redhat.com>
330
331         patches from Michael Krivoruchko <misha at sun.com>: 
332         
333         * dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
334         _dbus_connection_message_sent, 
335         _dbus_connection_send_preallocated_unlocked_no_update, 
336         _dbus_connection_pop_message_link_unlocked): handle the case when path 
337         is NULL when calling _dbus_verbose
338
339         * configure.in: check for functions getpeerucred and getpeereid
340
341         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides 
342         support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+, 
343         OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid). 
344         Patch was only tested on Solaris 10 x86 so it might be issues
345         with other platforms (i.e. BSDs and MacOSX)
346         
347
348 2005-10-05  John (J5) Palmieri  <johnp@redhat.com>
349
350         * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal 
351         instead of marshal basic so we can handle recursive types in a variant
352
353         * test/glib/test-dbus-glib.c: Add test for marshaling recurive types
354         in variants
355
356         * test/glib/test-service-glib.c, test-service-glib.xml
357         (my_object_echo_variant [EchoVariant], 
358         my_object_process_variant_of_array_of_ints123
359         [ProcessVariantOfArrayOfInts123]): 
360         Add two test methods
361
362         * python/introspect_parser.py: New module for parsing introspect
363         data.
364
365         * python/dbus_bindings.pyx:
366         (various places): when throwing errors fix to use errormsg instead 
367         of message local variable because Pyrex can get confused with other 
368         message variables (initial patch by Robert McQueen 
369         <robert.mcqueen at collabora.co.uk>)
370         (MessageIter::parse_signature_block): new method for getting the next
371         block in a signiture.
372         (MessageIter::append_strict): new method for appending values strictly
373         using the passed in signature instead of guessing at the type
374         (MessageItter:: append_dict, append_struct, append_array): use 
375         signatures to marshal children if the signature is available
376         
377         * python/exceptions.py (IntrospectionParserException): new exception
378
379         * python/proxies.py (ProxyMethod::__call__): Marshal args with 
380         introspected signatures if available, else we fall back to the
381         old way of doing things.
382         (ProxyObject::_introspect_reply_handler ): parse introspection data
383         
384         * python/service.py (ObjectType::_reflect_on_method): Properly
385         terminate <method> if there are no args in the reflection data
386
387         * test/python/test-client.py: add tests for talking with the GLib
388         test server.  This gives us better coverage for introspection since
389         python to python will always generate arguments as variants.  It also
390         allows us to test the robustness of the GLib bindings and interlanguage
391         communications.
392
393         
394 2005-10-03  John (J5) Palmieri  <johnp@redhat.com>
395
396         * bus/driver.c (bus_driver_handle_introspect): Add signals
397         to the introspect data. (patch from Daniel P. Berrange 
398         <dan at berrange.com>)
399
400         * bus/dispatch.c (check_existent_ping): Add testcase for Ping
401         
402         * dbus/dbus-connection.c (_dbus_connection_peer_filter,
403         _dbus_connection_run_builtin_filters): Changed these to
404         be unlock_no_update functions and call 
405         _dbus_connection_send_unlocked_no_update instead of
406         dbus_connection_send to avoid locking errors.
407         
408         * doc/TODO: Removed the make Ping test TODO
409         
410 2005-09-26  John (J5) Palmieri  <johnp@redhat.com>
411
412         * dbus/Python.pyx: Fixed memory leaks when throwing errors.
413         We now copy the message from a DBusError and then free 
414         the error object befor throwing the error
415
416         * glib/dbus-glib-tool.c: removed extra comma at the end of the
417         DBusBindingOutputMode enum which was causing a warning.
418         #include <time.h> so using time_t is explicitly defined
419
420 2005-09-26  John (J5) Palmieri  <johnp@redhat.com>
421
422         * Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
423         - dbus/dbus-bus.c
424         (internal_bus_get): new method that take over the heavy lifting
425         of dbus_bus_get and adds the ability to get a private connection
426         to the bus
427         (dbus_bus_get): wrapper to internal_bus_get that provides the same
428         interface as in previous versions
429         (dbus_bus_get_private): new method that is a wrapper to 
430         internal_bus_get to get a private connection to the bus
431
432         - dbus/dbus-bus.h
433         (dbus_bus_get_private): add as a public libdbus interface
434
435         - dbus-1.pc.in: output system_bus_default_address and 
436         sysconfdir variables so apps can use them when compiling
437
438 2005-09-23  Harald Fernengel  <harry@kdevelop.org>
439         * dbus/qt: New Qt bindings
440
441 2005-09-12  Waldo Bastian  <bastian@kde.org>
442
443         * dbus/dbus-marshal-validate.c,
444         doc/dbus-specification.xml, test/Makefile.am,
445         test/test-names.c: allow hyphens in bus names.
446
447 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
448
449         * test/data/auth/fallback.auth-script: we don't
450         retry the EXTERNAL method when we know its going
451         to fail anymore.
452
453 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
454
455         * dbus/dbus-connection-internal.h: rename
456         (add|remove|toggle)_(watch|timeout) to unlocked()
457         
458         * dbus/dbus-connection.c: ditto.
459         
460         * dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
461         Update some callers for the renaming.
462
463 2005-09-10  Mark McLoughlin  <mark@skynet.ie>
464
465         * dbus/dbus-auth.c: (record_mechanisms): don't
466         retry the first auth mechanism because we know
467         we're just going to get rejected again.
468         
469         * dbus/dbus-keyring.c: (_dbus_keyring_reload):
470         Fix thinko ... and what a nasty little bugger to
471         track down you were ...
472
473         * dbus/dbus-connection.c:
474         (_dbus_connection_add_watch),
475         (_dbus_connection_remove_watch): add note about
476         these needing the connection to be locked.
477         (_dbus_connection_get_dispatch_status_unlocked):
478         set status to DATA_REMAINS when we queue the
479         disconnected message.
480         
481         * bus/dispatch.c:
482         (bus_dispatch): fix warning.
483         (check_existent_service_no_auto_start):
484         Expect ChildSignaled error too.
485         (check_existent_hello_from_self): fix another
486         couple of warnings.
487         
488 2005-09-08  Joe Shaw  <joeshaw@novell.com>
489
490         Patches from James Willcox <snorp@snorp.net>
491
492         * mono/Makefile.am: Add Int16.cs and UInt16.cs
493
494         * mono/DBusType/Array.cs: Handle multidimensional arrays, and
495         support array "out" parameters.
496
497         * mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
498         for 16-bit int support.
499
500 2005-09-06  John (J5) Palmieri  <johnp@redhat.com>
501
502         * Released 0.50
503
504         * Patch from Steve Grubb:
505         - bus/activation.c (bus_activation_service_reload_test): clean up
506         some indentation
507         - dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional 
508         - dbus/dbus-message-factory.c (generate_special): fix a couple of
509         buffer overflows in the test suite.  This is non critical because
510         it can not be exploited and this code is only run when doing a 
511         make check.
512
513         * Patch from Yaakov Selkowitz: Build fixes for Cygwin
514         - configure.in: Don't check and link against kdecore, only qt headers
515         - dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
516         - gcj/org/freedesktop/dbus/Makefile.am:
517         add libdbus_gcj_1_la_LDFLAGS = -no-undefined
518         - glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
519         and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
520         - qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
521         - tools/Makefile.am: Add platform extentions to binaries 
522         (i.e. .exe on windows)
523
524         * configure.in: 
525         - Make it so if no suitable version of python is found we only 
526         disable building python instead of exiting the configure script
527         - Require version 2.4 of glib for glib bindings
528         - Up version to 0.50
529
530         * python/__init__.py: Sync version with libdbus to (0,50,0)
531         
532 2005-09-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
533
534         * dbus/dbus-object-tree.c (find_subtree_recurse):
535         a couple of optimizations (bug #710):
536         - do a binary search in the tree
537         - insert a new child at the right place directly, no need for
538           qsort anymore
539         - do the "double alloc" thing when allocating children
540
541 2005-08-31  John (J5) Palmieri  <johnp@redhat.com>
542
543         * python/Makefile.am: Break on pyrexc errors instead of ignoring them
544
545         * python/dbus_bindings.pyx: Memory management foo
546         (global): remove hacky _user_data_references global list
547         (GIL_safe_cunregister_function_handler): userdata now stuffed into
548         tuples. Unref user_data
549         (GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
550         (Connection::__del__): Remove and replace with __dealloc__ method
551         (Connection::add_filter): Stuff user_data into a tuple.  Use Py_INCREF
552         to keep tuple from being deallocated instead of the global var hack
553         (Connection::register_object_path): Stuff user_data into a tuple.
554         Use Py_INCREF to keep tuple from being deallocated instead of the 
555         global var hack
556         (Connection::register_fallback): Stuff user_data into a tuple.
557         Use Py_INCREF to keep tuple from being deallocated instead of the 
558         global var hack
559         (GIL_safe_pending_call_notification): Don't unref the message
560         because it gets unreffed when going out of scope.  Py_XDECREF
561         the user_data
562         (PendingCall::__del__): Remove and replace with __dealloc__ method
563         (PendingCall::set_notify): ref the pending call because we will
564         need it to stick around for when the notify callback gets called
565         (Message::__del__): Remove and replace with __dealloc__ method
566
567         * python/dbus_glib_bindings.pyx (init_gthreads): Changed to 
568         gthreads_init to match up with the dbus call
569
570         * python/glib.py (init_threads): Changed to threads_init to match
571         up with gobject.threads_init().  init_threads is kept for backwards
572         compat but will most likely be deprecated in the future
573
574         * test/python/test-client.py: 
575         - revamp to use Python's unittest functionality
576         - add async call tests
577         - setup threads in glib and dbus so we make sure locks are working
578         
579 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
580
581         * python/dbus_bindings.pyx 
582         (_pending_call_notification, cunregister_function_handler, 
583         cmessage_function_handler): All callback functions have been rearranged 
584         to workaround a bug in Pyrex when working with the GIL which is Python's 
585         global lock when dealing with threads.  They have been split into
586         a wrapper function (which assumes the name of the old function) and
587         a _GIL_safe_<function name> function which contains the functionality
588         of the old function.  This ensures that Pyrex does not write code
589         the lock is released.
590         
591
592 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
593
594         * python/dbus_bindings.pyx (_pending_call_notification): Obtain the
595         GIL global lock when calling back into Python
596
597 2005-08-29  John (J5) Palmieri  <johnp@redhat.com>
598
599         * Release 0.36.2
600
601         * Add Havoc's patch that never got applied to HEAD (Bug #2436):
602
603         * bus/policy.c (bus_policy_allow_user): change default "user is
604         allowed" to be "user has same uid as the bus itself"; any
605         allow/deny rules will override.
606
607         * bus/session.conf.in: don't allow all users, since now by default
608         the user that ran the bus can connect.
609
610 2005-08-26  Colin Walters  <walters@verbum.org>
611
612         * tools/dbus-print-message.c (print_message): Flush stdout
613         after printing a message, so that redirecting to a file, then
614         hitting Ctrl-C works.
615
616 2005-08-25  John (J5) Palmieri  <johnp@redhat.com>
617
618         * python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
619         (EmptyMessage): new class that subclasses Message.  This is a workaround
620         to a Pyrex bug that fails to call __del__ when the Message object goes out
621         of scope.  For some reason subclassing Message fixes this bug
622         (Bus::send_with_reply_and_block): use EmptyMessage instead of Message
623         - s/Message(_create=0)/EmptyMessage everywhere else
624         
625         * test/python/test-{server|client}.py: add the python/.libs directory
626         to the lookup path so dbus_bindings and dbus_glib_bindings don't
627         get picked up from the system
628
629 2005-08-25  Colin Walters  <walters@verbum.org>
630
631         * glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
632         to Ryan Lortie for the suggestion.
633
634 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
635
636         * test/python: Add python regression test
637
638         * configure.in: Add test/python/Makefile
639
640         * test/Makefile.am: Add the python directory to SUBDIRS
641
642 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
643
644         * Release 0.36.1
645
646         * python/_dbus.py: 
647         (Interface::connect_to_signal): propigate keywords for match on args
648         (Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
649
650         * python/proxies.py (ProxyObject::connect_to_signal):
651         propigate keywords for match on args
652
653         * Makefile.am: point everything to pyexecdir since python borks
654         on multilib
655
656 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
657
658         * Release 0.36
659
660 2005-08-23  Colin Walters  <walters@verbum.org>
661
662         * test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
663
664 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
665
666         * python/dbus_glib_bindings.pyx: reorder imports and c definitions
667         to fix some wranings. We now use dbus_bindings.DBusConnection instead
668         of defining DBusConnection ourselves.
669
670 2005-08-18  John (J5) Palmieri  <johnp@redhat.com>
671
672         * python/dbus.pth: New path file to fix up problems when installing
673         c libraries to lib64 and python files to lib.
674
675         * python/Makefile.am: install dbus.pth in the correct spot
676
677 2005-08-17  John (J5) Palmieri  <johnp@redhat.com>
678         * ChangeLog: clean up my last entry a bit
679
680         * doc/introspect.xsl: New stylesheet for converting introspection data
681         into browser renderable xhtml. Contributed by Lennart Poettering.
682
683         * doc/introspect.dtd: Fixups in the introspect format from Lennart
684         Poettering.
685
686         * doc/dbus-tutorial.xml: 
687         - Add Colin Walter to the Authors section for authoring the GLib
688         section
689         - Add descriptions of the new signature and type functionality
690         in the Python complex type mapping section
691         - Add a sidenote on the new args matching functionality in 
692         the Python bindings
693         - Fixed up some of the examples to use the gobject.MainLoop
694         instead of gtk.main
695         
696         * python/_dbus.py:
697         (Bus::_create_args_dict): New. Converts a hash of arg matches
698         to a more useable format
699         (Bus::add_signal_receiver): add a **keywords parameter for catching
700         arg match parameters
701         (Bus::remove_signal_receiver): add a **keywords parameter for catching
702         arg match parameters
703         
704         * python/matchrules.py:
705         (MatchTree::exec_matches): Check for arg matches
706         (SignalMatchRule::add_args_match): New method
707         (SignalMatchRule::execute): Added args_list parameter as an optimization
708         so we don't have to marshal the args more than once
709         (SignalMatchRule::match_args_from_list): New method that checks to see
710         if the rule's arg matches match an argument list.  Only arguments
711         set in the rule are checked.
712         (SignalMatchRule::match_args_from_rule): New method that checks to see
713         if the rule's arg matches match another rule's.  All args have to match
714         in order for this method to return true.  If either rule has more args
715         then it is not a match.
716         (SignalMatchRule::is_match): Add args match
717         (SignalMatchRule::repr): Add args to the final output if they exist
718
719 2005-08-17  Ross Burton  <ross@burtonini.com>
720
721         * glib/dbus-gproxy.c:
722         (dbus_g_proxy_call_no_reply): unref the message once sent.
723         (dbus_g_proxy_call): protect against NULL proxy.
724
725 2005-08-16  John (J5) Palmieri  <johnp@redhat.com>
726
727         * python/__init__.py: Version updated (0, 43, 0)
728         
729         * python/dbus_bindings.pyx: 
730         - Fixed type objects to have self passed into __init__
731         - Added the Variant type
732         - Add the ability to specify types or signatures for Array, Variant 
733         and Dictionary
734         (Connection::send_with_reply_handlers): return a PendingCall object
735         (_pending_call_notification): handle the case when an error is returned 
736         without an error message in the body
737         (MessageIter::get_boolean): return True or False instead of an integer
738         (MessageIter::python_value_to_dbus_sig): add direct checking of types 
739         and add checks for objects with embeded signatures or types (Array, 
740         Variant and Dictionary)
741         (MessageIter::append_byte): handle case when the value is a dbus.Byte
742         (MessageIter::append_dict): handle embeded types or signatures
743         (MessageIter::append_array): handle embeded types or signatures
744         (MessageIter::append_variant): new method
745         
746         * python/proxies.py:
747         (DeferedMethod): New. Dummy executable object used when queuing calls 
748         blocking on introspection data
749         (ProxyMethod::__call__): add the timeout keyword for specifying longer 
750         or shorter timeouts for method calls
751         (ProxyObject): Add first pass at an introspection state machine
752         (ProxyObject::__init__): Add introspect keyword for turing off an on 
753         introspection. 
754         (ProxyObject::_Introspect): Internal Introspect call that bypasses 
755         the usual mechanisms for sending messages.  This is to avoid a deadlock
756         where the Intospect call would be queued waiting for the Introspect 
757         call to finish ;-)
758         (ProxyObject::_introspect_reply_handler): New.  This method is called 
759         when introspection returns with no error
760         (ProxyObject::_introspect_error_handler): New.  This method is called 
761         when introspection encounters an error
762         (ProxyObject::__getattr__): Code to handle different introspection 
763         states.  Queue async calls or block blocking calls if we are 
764         introspecting.  Pass through as normal if we are not or are done with 
765         introspecting.
766         
767         * python/service.py: Import signal and method from decorators.py
768
769         * python/types.py: Add Variant type
770
771 2005-08-16  Colin Walters  <walters@verbum.org>
772
773         * glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
774         DBusError message is NULL.
775
776 2005-08-09  Havoc Pennington  <hp@redhat.com>
777
778         * dbus/dbus-errors.c: apply patch from Timo Teras to make a
779         malloc'd copy of the name parameter
780
781 2005-08-09  Havoc Pennington  <hp@redhat.com>
782
783         * dbus/dbus-message.c (dbus_message_set_reply_serial): print
784         warning if the reply serial is set to 0
785
786 2005-08-04  Colin Walters  <walters@verbum.org>
787
788         * glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
789         (dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
790         (dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
791         (dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
792         (dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
793         (dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
794         (dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
795         * glib/dbus-gvalue.h (dbus_g_value_types_init)
796         (dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
797         (dbus_gvalue_demarshal_message, dbus_gvalue_marshal):
798         
799         Prefix name with _ to ensure they're not exported.  All callers
800         updated.
801
802         * glib/dbus-gvalue.c (typecode_to_gtype)
803         (dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
804         (signature_iter_to_g_type_dict)
805         (signature_iter_to_g_type_array)
806         (dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
807         (dbus_gtypes_from_arg_signature):
808         Move to dbus-gsignature.c.
809
810         * glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
811         dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
812         (dbus_binding_tool_output_glib_client): Ditto.
813
814         * glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
815         and dbus-gsignature.h
816
817         * test/glib/test-service-glib.c (my_object_rec_arrays): Delete
818         unused variable.
819
820 2005-08-03  Colin Walters  <walters@verbum.org>
821
822         * glib/dbus-gobject.c: Add tests on hardcoded object info; this should
823         catch any incompatible changes accidentally made.
824
825 2005-08-03  Havoc Pennington  <hp@redhat.com>
826
827         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
828         typo, from Julien Puydt
829
830         * bus/connection.c (bus_connection_disconnected): we were always
831         doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
832
833 2005-08-01  Colin Walters  <walters@verbum.org>
834
835         Patch from Joe Markus Clarke:   
836         
837         * glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
838         use-after-free.
839
840 2005-08-01  Colin Walters  <walters@verbum.org>
841         
842         Patch from Joe Markus Clarke:   
843         
844         * tools/dbus-send.c (main): 
845         
846         Don't use C99 style initializers (bug #3933).
847         
848 2005-08-01  Colin Walters  <walters@verbum.org>
849
850         Patch from Joe Markus Clarke:   
851
852         * glib/dbus-gvalue.c (dbus_g_value_types_init): 
853         * glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init) 
854         * glib/dbus-gobject.c (write_interface):
855
856         Don't use C99 style initializers (bug #3933).
857
858 2005-07-31  Havoc Pennington  <hp@redhat.com>
859
860         * tools/dbus-viewer.c (load_child_nodes): fix invocation of
861         dbus_g_proxy_call, fix from Piotr Zielinski bug #3920
862
863 2005-07-30  Havoc Pennington  <hp@redhat.com>
864
865         * fix a bunch of Doxygen warnings and mistakes
866
867 2005-07-30  Havoc Pennington  <hp@redhat.com>
868
869         * dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
870         DBUS_BUILD_TESTS since it's now used in production code
871
872 2005-07-29  Havoc Pennington  <hp@redhat.com>
873
874         * test/glib/test-profile.c (write_junk): initialize the junk
875         buffer so valgrind doesn't have a breakdown
876
877 2005-07-29  Havoc Pennington  <hp@redhat.com>
878
879         * bus/signals.c (bus_signals_test): add match_rule_equal() tests
880         (match_rule_matches): remove unused arg
881         (test_matching): add tests for match_rule_matches()
882
883         * bus/signals.c (bus_match_rule_parse_arg_match): add ability to
884         do arg0='foo' arg5='bar' in the match rules
885         (match_rule_matches): don't match if the arg0='foo' doesn't match.
886
887         * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
888
889 2005-07-29  Ross Burton  <ross@openedhand.com>
890
891         * dbus/dbus-connection.c:
892         Don't create a DBusCondVar which is never used.
893
894 2005-07-27  Ross Burton  <ross@openedhand.com>
895
896         * dbus/dbus-message.c:
897         Reduce the size of the maximum cached message to 10K.
898
899 2005-07-25  Ross Burton  <ross@openedhand.com>
900
901         * glib/dbus-gproxy.c:
902         Remove matches when all proxies are unregistered.
903
904 2005-07-24  Colin Walters  <walters@verbum.org>
905
906         * glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
907         typedata; recursive arrays won't have it.
908
909         * test/glib/test-dbus-glib.c:
910         * test/glib/test-service-glib.c:
911         * test/glib/test-service-glib.xml: Add recursive arrays tests.
912         
913 2005-07-20  John (J5) Palmieir  <johnp@redhat.com>
914
915         * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
916         proxies.py, service.py: Cleanup of code after running it through the
917         pyflakes code checker mostly dealing with undefined names.  
918         (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
919
920 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
921
922         * NEWS: Update to 0.35.2
923
924 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
925
926         * python/_dbus.py: Remove import of the dbus.services
927         module as it no longer exists (patch from Dimitur Kirov)
928
929         * python/service.py (Object::__init__): Fixed typo
930         s/name/bus_name (patch from Dimitur Kirov)
931
932         * python/examples/example-signal-emitter.py: import dbus.glib
933         to get the main loop and use glib mainloop instead of gtk so
934         X doesn't have to be running.
935
936         * python/examples/example-signal-recipient.py: import dbus.glib
937         to get the main loop and use glib mainloop instead of gtk so
938         X doesn't have to be running. Import the decorators module
939         directly.
940
941         * test/glib/Makefile.am:  Added DIST_EXTRA files that distcheck
942         didn't pick up on but are needed to build
943
944         * configure.in: upped version to 0.35.2
945
946         * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
947         added Colin Walters' SELinux API rename patch from head 
948         s/unix sercurity context/selinux security context/
949
950 2005-07-16  John (J5) Palmieri  <johnp@redhat.com>
951
952         * python/Makefile.am: dbus_binding.pxd.in should be included 
953         in EXTRA_DIST not dbus_binding.pxd
954         fix up $(srcdir) hopefully for the last time
955
956         * NEWS: Update to 0.35.1
957
958 2005-07-16  Colin Walters  <walters@verbum.org>
959
960         * bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
961         from bus_driver_handle_get_connection_unix_security_context.  Update for
962         error usage.
963         (message_handlers): Update for renames.
964
965         * bus/selinux.c (bus_selinux_allows_send): Handle OOM on
966         _dbus_string_init failure correctly.
967         (bus_selinux_append_context): Convert SID to context.  Append it
968         as a byte array.
969         (bus_selinux_shutdown): Handle the case where bus_selinux_full_init
970         hasn't been called.
971
972         * bus/selinux.h: Update prototype.
973
974         * dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
975         from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.
976
977 2005-07-15  Colin Walters  <walters@verbum.org>
978
979         * doc/TODO: Add note about convenience wrappers.
980
981 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
982
983         * NEWS: Update to 0.35
984
985 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
986
987         * glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
988         so distcheck doesn't fail
989
990         * glib/examples/Makefile.am: Add example-service.xml and 
991         example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail
992
993         * glib/examples/statemachine/Makefile.am: Add statemachine.xml and
994         statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail
995
996         * python/Makefile.am: Preprend $(srcdir)/ to source files so the
997         compiler looks in the right places during distcheck
998
999 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
1000
1001         * glib/example/Makefile.am: Fix a typo which cause make distcheck
1002         to fail
1003
1004 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
1005
1006         * python/examples/example-service.py,
1007         python/examples/example-signal-emitter.py: Fixed up examples
1008         for API changes
1009
1010 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
1011
1012         * python/__init__.py: Upped to version (0,42,0) because of
1013         the API change
1014
1015 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
1016
1017         * ChangeLog: fix date in last entry
1018
1019         * configure.in, bus/system.conf.in: add the ability to configure 
1020         the system bus user at compiletime with the --with-dbus-user flag
1021         (patch from Kristof Vansant)
1022
1023 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
1024
1025         * bus/dispatch.c, test/test-service.c: Add testcase
1026         for sending messages to oneself (TODO item).
1027
1028         * python/service.py (class Object): Swap ordering of bus_name 
1029         and object_path parameters to better support inheritance.
1030
1031         * doc/dbus-tutorial.xml: change Python docs to reflect change
1032         in parameter ordering and fix the inheritance section.
1033
1034         * doc/TODO: remove sending message to oneself TODO item
1035
1036 2005-07-15  Ross Burton  <ross@openedhand.com>
1037
1038         * glib/dbus-gproxy.c:
1039         Fix a leak when calling methods via the proxy.
1040
1041 2005-07-15  Colin Walters  <walters@verbum.org>
1042
1043         * bus/selinux.c (bus_selinux_append_context): Wrap in
1044         HAVE_SELINUX.
1045
1046 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
1047
1048         * python/_dbus.py (Bus::remove_signal_receiver):
1049         don't add a callback to the match if none has been passed in
1050         
1051         * python/matchrules.py (SignalMatchTree::remove): if the rule
1052         being matched does not have a callback treat it as a wildcard
1053         fix matching logic
1054
1055         * doc/dbus-tutorial.xml: Add Python tutorial
1056
1057 2005-07-14  Colin Walters  <walters@verbum.org>
1058
1059         * bus/driver.c
1060         (bus_driver_handle_get_connection_unix_security_context): New function.
1061         (message_handlers): Add.
1062
1063         * bus/selinux.c (bus_selinux_append_context): New function; appends
1064         security context to message.
1065
1066         * bus/selinux.h: Prototype.
1067
1068         * dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.
1069
1070 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
1071
1072         * bus/activation.c: clean up all tabs to be 8 spaces 
1073         (bus_activation_activate_service): make sure we clean up
1074         if activation fails
1075
1076         * bus/dispatch.c: clean up all tabs to be 8 spaces 
1077         (check_shell_fail_service_auto_start): New function
1078         tests to make sure we get fail properly when trying to auto start a service
1079         with a faulty command line
1080         (check_shell_service_success_auto_start): New function tests to make sure
1081         auto started services get the arguments on the command line
1082
1083         * test/test-shell-service.c: Added service for testing auto-starting with 
1084         command line arguments
1085
1086         * test/data/valid-service-files/debug-shell-echo-fail.service.in, 
1087         test/data/valid-service-files/debug-shell-echo-success.service.in:
1088         Added service files for testing auto-starting with command line arguments
1089
1090         * */.cvsignore: added a bunch of generated files to various .cvsignore files
1091
1092 2005-07-14  Rodrigo Moya  <rodrigo@novell.com>
1093
1094         * dbus/dbus-shell.[ch]: copy/pasted code from GLib.
1095         
1096         * dbus/Makefile.am: added new files to build.
1097
1098         * bus/activation.c (bus_activation_activate_service): support
1099         activation commands with parameters.
1100
1101         * test/shell-test.c: added test program for the shell parsing
1102         code.
1103
1104 2005-07-13  David Zeuthen  <davidz@redhat.com>
1105
1106         * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
1107         64 bit signed and unsigned parameters
1108
1109 2005-07-13  John (J5) Palmieri  <johnp@redhat.com>
1110
1111         * python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
1112
1113         * python/service.py (class Name): renamed BusName to make it clearer
1114         what the object is for (a name on the bus)
1115
1116         * python/examples/example-service.py,
1117         python/examples/example-signal-emitter.py: change the Name object to
1118         BusName
1119
1120 2005-07-12  Colin Walters  <walters@verbum.org>
1121
1122         Patch from Jim Gettys <Jim.Gettys@hp.com>.
1123
1124         * tools/dbus-launch.c: Include sys/select.h.
1125
1126 2005-07-12  John (J5) Palmieri  <johnp@redhat.com>
1127         * python/dbus_bindings.pyx.in: removed
1128
1129         * python/dbus_bindings.pyx: Added.
1130         - Fixed some memleaks (patch from 
1131         Sean Meiners <sean.meiners@linspireinc.com>)
1132         - Broke out the #include "dbus_h_wrapper.h" and put it in its
1133         own pxd file (Pyrex definition)
1134         - Broke out glib dependancies into its own pyx module
1135         
1136         * python/dbus_bindings.pdx: Added.
1137         - Defines C class Connection for exporting to other modules
1138
1139         * python/dbus_glib_bindings.pyx: Added.
1140         - New module to handle lowlevel dbus-glib mainloop integration
1141
1142         * python/glib.py: Added.
1143         - Registers the glib mainloop when you import this module
1144
1145         * python/services.py: Removed (renamed to service.py)
1146         
1147         * python/service.py: Added.
1148         - (class Server): renamed Name
1149
1150         * python/__init__.py: Bump ro version (0,41,0)
1151         -don't import the decorators or service module
1152         by default.  These now reside in the dbus.service namespace
1153
1154         * python/_dbus.py (Bus::__init__): Add code run the main loop 
1155         setup function on creation 
1156
1157         * python/examples/example-service.py,
1158         python/examples/example-signal-emitter.py: update examples
1159
1160         * python/examples/gconf-proxy-service.py,
1161         python/examples/gconf-proxy-service2.py: TODO fix these up
1162
1163         * doc/TODO: Addition
1164         - Added a Python Bindings 1.0 section
1165         - added "Add match on args or match on details to match rules"
1166
1167
1168 2005-07-12  Colin Walters  <walters@verbum.org>
1169
1170         * glib/examples/statemachine/Makefile.am (statemachine-server-glue.h) 
1171         (statemachine-glue.h): 
1172         * glib/examples/Makefile.am (example-service-glue.h) 
1173         (example-signal-emitter-glue.h): 
1174         * glib/Makefile.am (dbus-glib-error-switch.h): 
1175         Add libtool --mode=execute so we use the built library instead
1176         of any installed one.
1177
1178 2005-07-11  Colin Walters  <walters@verbum.org>
1179
1180         * glib/dbus-gvalue.c (struct _DBusGValue): Delete.
1181         (dbus_g_value_types_init): Remove assertion.
1182         (dbus_g_value_get_g_type, dbus_g_value_open)
1183         (dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
1184         (dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
1185         functions related to DBusGValue.  Now we marshal/demarshal
1186         structures as GValueArray.
1187         (dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
1188         structures.
1189         (signature_iter_to_g_type_array): Don't call
1190         signature_iter_to_g_type_struct.
1191         (signature_iter_to_g_type_struct): Delete.
1192         (dbus_gvalue_to_signature): Delete.
1193         (dbus_gvalue_to_signature): New function with same name as other
1194         one; we can convert structures to signatures.
1195         (demarshal_valuearray): New function.
1196         (get_type_demarshaller): Use it.
1197         (demarshal_recurse): Delete.
1198         (marshal_proxy): New function.
1199         (marshal_map): Warn if we can't determine signature from type.
1200         (marshal_collection_ptrarray): Ditto.
1201         (marshal_collection_array): Ditto.
1202         (get_type_marshaller): Use marshal_valuearray.
1203         (marshal_recurse): Delete.
1204         (_dbus_gvalue_test): Add some tests.
1205
1206         * dbus/dbus-glib.h (struct _DBusGValueIterator): 
1207         (dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
1208         (dbus_g_value_open, dbus_g_value_iterator_get_value)
1209         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
1210         (dbus_g_value_free): Remove prototypes.
1211
1212         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
1213         G_TYPE_VALUE_ARRAY.
1214
1215         * glib/examples/example-service.c:
1216         * glib/examples/example-client.c: Implement GetTuple.
1217
1218         * test/glib/test-dbus-glib.c:
1219         * test/glib/test-service-glib.c:
1220         * test/glib/test-service-glib.xml: Add structure tests.
1221
1222 2005-07-10  Colin Walters  <walters@verbum.org>
1223
1224         * doc/TODO: Knock off some GLib items with this patch.
1225
1226         * glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error) 
1227         (_dbus_gvalue_signals_error): New functions.
1228
1229         * glib/dbus-gvalue-utils.h: Prototype them.
1230
1231         * glib/dbus-gobject.c (arg_iterate): Update to handle return vals
1232         and change to not output const/retval flags for input args.  All
1233         callers updated.
1234         (invoke_object_method): Refactor to handle return values.  Add
1235         some more comments in various places.  Remove debug g_print.
1236
1237         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
1238
1239         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
1240         Handle G_TYPE_NONE.
1241         (compute_gsignature): New function; refactored from code from
1242         compute_marshaller and compute_marshaller_name.  Enhance to
1243         handle return values and async ops more cleanly.  Update for
1244         async ops returning NONE instead of BOOLEAN.
1245         (compute_marshaller, compute_marshaller_name): Call compute_gsignature
1246         and output appropriate string.
1247         (generate_glue): Handle return value annotation.  Also don't dump
1248         constness flag for input arguments.
1249
1250         * glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
1251         files shared between installed library and utilities.
1252         (libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
1253         (libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
1254         binding tool can access gtype utility functions.
1255
1256         * test/glib/test-service-glib.c: 
1257         * test/glib/test-service-glib.xml: 
1258         * test/glib/test-dbus-glib.c: Add some tests for return values.
1259
1260 2005-07-09  Colin Walters  <walters@verbum.org>
1261
1262         * glib/dbus-gparser.c (parse_annotation): Add annotations to
1263         argument if available, not method.
1264
1265         * glib/dbus-gobject.c (arg_iterate): More verbose warnings.
1266         (invoke_object_method): First, remove some redundant
1267         GValues (object_value, error_value) in favor of working on
1268         array directly.  Second, rework constness to be less buggy.
1269         Now we iterate directly over the argument metadata instead
1270         of parallel iterating over output signature and metadata.
1271
1272         * glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
1273
1274         * glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
1275         annotation on input args.
1276         
1277 2005-07-09  Colin Walters  <walters@verbum.org>
1278
1279         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
1280         Define.
1281
1282         * glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
1283         annotation.
1284
1285         * glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
1286         (method_dir_signature_from_object_info): Handle arg_iterate change.
1287         (write_interface): Ditto.
1288         (lookup_object_info): Don't barf if format_version is > 0.
1289         (invoke_object_method): Handle arg constness.
1290
1291         * glib/dbus-gidl.c (struct ArgInfo): Add annotations.
1292         (arg_info_new): Create.
1293         (arg_info_unref): Destroy.
1294         (arg_info_get_annotations, arg_info_get_annotation) 
1295         (arg_info_add_annotation): New functions.
1296
1297         * glib/dbus-gidl.h: Prototype them.
1298
1299         * glib/dbus-gparser.c (parse_annotation): Allow annotations in
1300         args, disallow them in properties.
1301         (parse_annotation): Handle arg annotations.
1302
1303         * test/glib/test-service-glib.xml: 
1304         * test/glib/test-service-glib.c: Update to make some methods
1305         const.
1306
1307 2005-07-08  Colin Walters  <walters@verbum.org>
1308
1309         * test/glib/test-service-glib.xml: 
1310         * test/glib/test-service-glib.c:
1311         * test/glib/test-dbus-glib.c: Test a{sv}.
1312
1313         * glib/examples/statemachine/statemachine.c:
1314         * glib/examples/statemachine/statemachine-server.c:
1315         * glib/examples/statemachine/statemachine-client.c: Fix some bugs,
1316         add progress bar, etc.
1317
1318         * glib/dbus-gvalue.c (register_array, register_dict): Delete; not
1319         needed anymore due to generic array/map marshalling.
1320         (dbus_g_value_types_init): Don't register basic arrays or the
1321         string/string hash.
1322         (dbus_gtype_from_signature_iter): Don't try to recurse into
1323         variants.
1324         (dbus_gtype_to_signature): Check collection/map before type
1325         metadata.
1326         (demarshal_garray_basic): Renamed to demarshal_collection_array.
1327         (demarshal_ghashtable): Renamed to demarshal_map; fix to use new
1328         generic map creation/append functions instead of hash table
1329         specifically.
1330         (get_type_demarshaller): Handle maps.
1331         (demarshal_collection): Dispatch on collection type to either
1332         demarshal_collection_ptrarray or demarshal_collection_array.
1333         (get_type_marshaller): Handle maps.
1334         (marshal_collection): Dispatch collection type to either
1335         marshal_collection_ptrarray or marshal_collection_array.
1336         (_dbus_gvalue_test): New test.
1337
1338         * glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
1339         (hash_free_from_gtype): Use it to free GValues.
1340         (hashtable_append): New function.
1341         (ptrarray_append): Fix prototype.
1342         (slist_append): Ditto.
1343         (_dbus_gvalue_utils_test): Extend tests.
1344
1345         * glib/dbus-gtype-specialized.c
1346         (dbus_g_type_specialized_init_append): Renamed from
1347         dbus_g_type_specialized_collection_init_append.  Remove const from
1348         value, since we steal it.
1349         (dbus_g_type_specialized_map_append): New function.
1350
1351         * glib/dbus-gtype-specialized.h: Update prototypes.
1352         Add DBusGTypeSpecializedMapAppendFunc.
1353
1354         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1355         _dbus_gvalue_test.
1356         
1357         * glib/dbus-gtest.h: Prototype it.
1358
1359 2005-07-08  Ross Burton  <ross@openedhand.com>
1360
1361         * dbus/dbus-glib.h:
1362         Add DBysGAsyncData for the async bindings.
1363
1364         * glib/dbus-binding-tool-glib.c:
1365         Re-enable the async bindings.
1366
1367         * test/glib/test-dbus-glib.c:
1368         Add a test for the generated async bindings.
1369
1370 2005-07-08  Colin Walters  <walters@verbum.org>
1371
1372         * doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
1373         connection concept.
1374         
1375 2005-07-08  Colin Walters  <walters@verbum.org>
1376         
1377         * tools/Makefile.am: Kill of print-introspect in favor of using
1378         dbus-send --print-reply=literal.
1379
1380         * test/glib/test-service-glib.xml: 
1381         * test/glib/test-service-glib.c (my_object_get_objs): New test
1382         for "ao".
1383
1384         * test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
1385         (main): Test GetObjs.
1386
1387         * glib/examples/statemachine/Makefile.am:
1388         * glib/examples/statemachine/sm-marshal.list:
1389         * glib/examples/statemachine/statemachine-client.c:
1390         * glib/examples/statemachine/statemachine-server.c:
1391         * glib/examples/statemachine/statemachine-server.xml:
1392         * glib/examples/statemachine/statemachine.c:
1393         * glib/examples/statemachine/statemachine.h:
1394         * glib/examples/statemachine/statemachine.xml:
1395
1396         New example.
1397
1398         * glib/examples/example-service.c (main): Move invocation
1399         of dbus_g_object_type_install_info earlier, to emphasize it
1400         should only be done once.
1401
1402         * glib/examples/example-signal-emitter.c (main): Ditto.
1403
1404         * glib/examples/Makefile.am (SUBDIRS): Include statemachine.
1405
1406         * glib/dbus-gvalue.h (dbus_gtype_to_signature)
1407         (dbus_gvalue_marshal): Update prototypes.
1408
1409         * glib/dbus-gvalue.c: Update all marshalling functions to take
1410         const GValue instead of GValue.
1411         (signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
1412         types.
1413         (dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
1414         change.
1415         (dbus_gtype_to_signature): Handle generic collecitons and maps.
1416         Return a newly-allocated string.
1417         (demarshal_proxy, demarshal_object_path, demarshal_object)
1418         (demarshal_strv, demarshal_ghashtable): Set error, don't assert if
1419         we get the wrong types from message.
1420         (get_type_demarshaller): New function, extracted from
1421         dbus_gvalue_demarshal.
1422         (demarshal_collection): New function, demarshals generic
1423         collection.
1424         (dbus_gvalue_demarshal): Just invoke result of
1425         get_type_demarshaller.  Throw error if we don't have one.
1426         (marshal_garray_basic): Abort on OOM.
1427         (get_type_marshaller): New function, extracted from
1428         dbus_gvalue_marshal.
1429         (collection_marshal_iterator, marshal_collection): New functions;
1430         implements generic marshalling for an iteratable specialized
1431         collection.
1432         (dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
1433
1434         * glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
1435         G_TYPE_STRING.
1436         (ptrarray_value_from_gvalue): Ditto.
1437         (ptrarray_append, ptrarray_free): New functions.
1438         (slist_constructor, slist_iterator, slist_copy_elt, slist_copy) 
1439         (slist_append, slist_end_append, slist_free): New functions.
1440         (dbus_g_type_specialized_builtins_init): Add append fuctions
1441         for GPtrArray and GSList.  Register GSList.
1442         (test_specialized_hash, _dbus_gvalue_utils_test): New functions.
1443
1444         * glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
1445         New.
1446         (dbus_g_type_specialized_collection_init_append)
1447         (dbus_g_type_specialized_collection_append)
1448         (dbus_g_type_specialized_collection_end_append): Prototype.
1449         (DBusGTypeSpecializedCollectionVtable): Add append_func and
1450         end_append_func.
1451
1452         * glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append) 
1453         (dbus_g_type_specialized_collection_append) 
1454         (dbus_g_type_specialized_collection_end_append): New functions.
1455         (dbus_g_type_map_value_iterate): Take const GValue.
1456         (dbus_g_type_collection_value_iterate): Ditto.
1457
1458         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1459         _dbus_gvalue_utils_test.
1460         
1461         * glib/dbus-gtest.h: Prototype it.
1462
1463         * glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
1464         using uninitialized owner_list.
1465         (dbus_g_proxy_begin_call_internal): Move return_if_fail to
1466         public API.
1467         (dbus_g_proxy_end_call_internal): Update to use error set
1468         from dbus_gvalue_demarshal instead of setting it here.
1469         (dbus_g_proxy_begin_call): Move return_if_fail here.
1470
1471         * glib/dbus-gobject.c (write_interface): Update for
1472         dbus_gtype_to_signature returning new string.
1473
1474         * configure.in: Add glib/examples/statemachine.
1475
1476 2005-07-08  Joe Shaw  <joeshaw@novell.com>
1477
1478         * configure.in: Add a configure option, --with-console-auth-dir
1479         
1480         * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
1481         new setting.  Patch from Kay Sievers.
1482
1483 2005-07-06  Colin Walters  <walters@verbum.org>
1484
1485         * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
1486         (DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
1487         (dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
1488         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
1489         Delete in favor of dbus_g_proxy_begin_call and
1490         dbus_g_proxy_cancel_call.
1491         (DBusGProxyCall, DBusGProxyCallNotify): New.
1492         (dbus_g_proxy_begin_call): Change prototype to take callback, user
1493         data, and destroy function.  This replaces
1494         dbus_g_pending_call_set_notify.
1495         (dbus_g_proxy_cancel_call): Prototype.
1496         (DBusGAsyncData): Delete, shouldn't be needed anymore.
1497
1498         * glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
1499         pending_calls map.
1500         (struct _DBusGProxyManager): Add bus_proxy member, which is an
1501         internal proxy for calls to the bus. Remove
1502         pending_nameowner_calls, now the internal proxy keeps track.
1503         (dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
1504         pending_nameowner_calls.
1505         (got_name_owner_cb): Update prototype, and use
1506         dbus_g_proxy_end_call.
1507         (got_name_owner_cb): Remove reference to pending_nameowner_calls.
1508         (dbus_g_proxy_manager_register): Delete directly libdbus code in
1509         favor of using internal proxy.
1510         (dbus_g_proxy_manager_unregister): Update to use
1511         dbus_g_proxy_cancel_call for any pending GetNameOwner call.
1512         (dbus_g_proxy_init): Initialize pending calls map.
1513         (dbus_g_proxy_constructor): New.
1514         (dbus_g_proxy_class_init): Add get/set property functions,
1515         constructor, and add NAME, PATH, and INTERFACE properties.
1516         (cancel_pending_call): New function.
1517         (dbus_g_proxy_dispose): Iterate over any outstanding calls and
1518         cancel them.
1519         (dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
1520         (GPendingNotifyClosure): New structure.
1521         (d_pending_call_notify, d_pending_call_free): Moved here from
1522         dbus-glib.c.
1523         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
1524         ordering.
1525         (manager_begin_bus_call): New internal function for talking to
1526         internal bus proxy.
1527         (dbus_g_proxy_new): Construct object using GObjet properties.
1528         (dbus_g_proxy_begin_call_internal): Update to take user data, etc.
1529         Create closure of same, and insert call into map of pending calls.
1530         (dbus_g_proxy_end_call_internal): Take call id instead of pending
1531         call.  Look up pending call in current set.  Remove it when we've
1532         completed.
1533         (dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
1534         (dbus_g_proxy_begin_call): Change API to take callback, user data,
1535         and destroy function directly.
1536         (dbus_g_proxy_end_call): Update to take DBusGProxyCall.
1537         (dbus_g_proxy_call): Invoke with NULL callback.
1538         (dbus_g_proxy_cancel_call): New function, replaces
1539         dbus_g_pending_call_cancel.
1540
1541         * glib/dbus-gparser.c (validate_signature): Fix call to
1542         dbus_set_g_error.
1543
1544         * glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
1545         New quark for attaching metadata to GType.
1546         (info_hash): Delete.
1547         (lookup_object_info): Look up using quark.
1548         (dbus_g_object_type_install_info): Check that a type is classed,
1549         not that it's an object.  Also just install type data using quark
1550         instead of using global hash.
1551
1552         * glib/dbus-glib.c (dbus_g_pending_call_ref) 
1553         (dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
1554         (GPendingNotifyClosure): Delete.
1555         (d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
1556         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
1557
1558         * glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
1559         client method generation until we can fix it...
1560         
1561         * tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
1562         (load_from_service_thread_func): Ditto.
1563
1564         * tools/dbus-names-model.c (struct NamesModel): Hold
1565         DBusGProxyCall.
1566         (have_names_notify): Update prototype, use
1567         dbus_g_proxy_cancel_call.
1568         (names_model_reload): Update for new dbus_g_proxy_begin_call API.
1569
1570         * tools/dbus-monitor.c (filter_func): Update for print_message
1571         API change.
1572
1573         * test/glib/test-dbus-glib.c: Add more tests for async
1574         invocations.  Update many begin_call/end_call pairs to just use
1575         dbus_g_proxy_call.
1576
1577         * tools/dbus-send.c (main): Add --print-reply=literal mode.  This
1578         allows us to dump print-introspect.c.
1579
1580         * tools/dbus-print-message.h (print_message): Add literal argument
1581         to print_message which is intended to allow printing arguments without
1582         metadata like "string=".
1583
1584         * tools/dbus-print-message.c (print_iter): Add literal argument.
1585         (print_message): Allow printing string messages literally.
1586
1587 2005-07-05  Colin Walters  <walters@verbum.org>
1588
1589         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1590         Remove value refcount leak, original patch from Jorn Baayen
1591         <jorn@openedhand.com>.  Also remove useless extra value in favor
1592         of prepending to value array directly.
1593
1594 2005-07-02  Colin Walters  <walters@verbum.org>
1595
1596         * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
1597
1598 2005-07-01  Colin Walters  <walters@verbum.org>
1599
1600         Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
1601         
1602         * glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
1603         (dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
1604         G_TYPE_LONG as DBUS_TYPE_INT32, G_TYPE_ULONG as DBUS_TYPE_UINT32,
1605         and G_TYPE_FLOAT as DBUS_TYPE_DOUBLE.
1606
1607 2005-06-30  Colin Walters  <walters@verbum.org>
1608
1609         * test/glib/test-dbus-glib.c:
1610         * test/glib/test-service-glib.c:
1611         * test/glib/test-service-glib.xml: Update tests for new error
1612         setting bits, also add async tests (patch from Ross Burton).
1613
1614         * test/glib/Makefile.am (test_service_glib_LDADD): Add
1615         DBUS_GLIB_THREADS_LIBS.
1616
1617         * glib/dbus-gproxy.c (get_name_owner)
1618         (dbus_g_pending_call_end_valist): Ditto.
1619
1620         * glib/dbus-gobject.c (error_metadata): New mapping from GError
1621         domain (GQuark) to DBusGErrorInfo.  
1622         (gerror_domaincode_to_dbus_error_name): Attempt to look up error
1623         quark in error_metadata.  Take message interface as default
1624         error message interface.
1625         (gerror_to_dbus_error_message): Pass message interface.
1626         (dbus_set_g_error): Resurrected.
1627         (dbus_g_error_info_free): New function.
1628         (dbus_g_object_type_install_info): Use g_type_class_ref instead
1629         of _peek to actually create the object class if it hasn't been
1630         created yet.
1631         (dbus_g_error_domain_register): New function.
1632
1633         * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
1634
1635         * glib/dbus-gparser.c (validate_signature): Ditto.
1636
1637         * dbus/dbus-glib.h (dbus_g_error_set): Delete.
1638         (dbus_g_error_domain_register): Prototype.
1639
1640         * glib/dbus-glib.c (dbus_g_error_set): Delete.
1641         Update tests.
1642
1643 2005-06-29  Colin Walters  <walters@verbum.org>
1644
1645         * dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY.  Add
1646         DBUS_TYPE_G_OBJECT_PATH.
1647
1648         * glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
1649         for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
1650         be handled more generically).  Add DBUS_TYPE_G_OBJECT_PATH.
1651         (dbus_g_object_path_get_g_type): New function.
1652         (dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
1653         to DBUS_TYPE_G_OBJECT_PATH by default.
1654         (demarshal_proxy): Remove unused name variable.
1655         (demarshal_object_path, marshal_object_path): New functions.
1656         (demarshal_proxy_array, marshal_proxy_array): Delete.
1657         
1658         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
1659         DBUS_TYPE_G_OBJECT_PATH to char *.
1660         (dbus_g_type_get_lookup_function): Map builtin
1661         DBUS_TYPE_G_OBJECT_PATH.
1662
1663         * test/glib/test-dbus-glib.c
1664         * test/glib/test-service-glib.c (my_object_objpath): 
1665         Adapt tests to new object path marshalling.
1666
1667 2005-06-29  John (J5) Palmieri  <johnp@redhat.com>
1668
1669         * configure.in: force check for Python >= 2.4
1670
1671 2005-06-29  Colin Walters  <walters@verbum.org>
1672         
1673         Patch from Ross Burton <ross@openedhand.com>
1674         
1675         * glib/dbus-gobject.c (invoke_object_method): Unset object
1676         value in all cases, not only in async case.
1677
1678 2005-06-29  Colin Walters  <walters@verbum.org>
1679
1680         * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
1681         name_call for keeping track of any outgoing GetNameOwner call.
1682         Also add for_owner and associated.
1683         (struct _DBusGProxyManager): Add owner_names, which is hash table
1684         that maps a base name to a list of names it owns (that we're
1685         interested in).  Add pending_nameowner_calls which is a list of
1686         all outstanding GetNameOwner; avoids us having to iterate over
1687         every proxy.  Add unassociated_proxies which keeps track of name
1688         proxies with no associated name owner.
1689         (dbus_g_proxy_manager_unref): Destroy owner_names.
1690         (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
1691         name refcounts.
1692         (find_name_in_info, name_owner_foreach)
1693         (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
1694         (dbus_g_proxy_manager_monitor_name_owner)
1695         (dbus_g_proxy_manager_unmonitor_name_owner)
1696         (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
1697         New functions; they manipulate the owner_names mapping.
1698         (got_name_owner_cb): New function.
1699         (get_name_owner): New function, extracted from
1700         dbus_g_proxy_new_for_name_owner.
1701         (dbus_g_proxy_manager_register): For now we need to keep track of
1702         all NameOwnerChanged.  Also if the proxy is for a name, if we
1703         don't already know the name owner, queue a new GetNameOwner
1704         request and add it to our list of unassociated proxies.  Otherwise
1705         inc the refcount.
1706         (dbus_g_proxy_manager_unregister): If this proxy is for a name,
1707         cancel any pending GetNameOwner call, etc.
1708         (dbus_g_proxy_manager_filter): Handle NameOwnerChanged.  Also use
1709         the owner_names mapping to look up the current names for the
1710         signal source, and dispatch to any proxies for that name.
1711         (dbus_g_proxy_new): Initialize new members.
1712         (dbus_g_proxy_new_for_name): Delete unused proxy variable.
1713         (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
1714         (dbus_g_pending_call_end_valist): New function, extracted from
1715         dbus_g_proxy_end_call_internal.  Useful when we don't have a proxy
1716         but want to use the GLib infrastructure.  Also note how many
1717         arguments in reply were over.
1718         (dbus_g_pending_call_end): New function, just call
1719         dbus_g_pending_call_end_valist.
1720         (dbus_g_proxy_end_call_internal): Just call
1721         dbus_g_pending_call_end_valist.
1722
1723         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
1724         of builtin marshaller for STRING_STRING_STRING.
1725
1726         * test/glib/test-dbus-glib.c: 
1727         * test/glib/test-service-glib.c:
1728         * test/glib/test-service-glib.xml:
1729         Extend tests to cover name proxies, destruction of owner proxies,
1730         etc.
1731         
1732         * glib/examples/example-signal-recipient.c
1733         (dbus_g_proxy_new_for_name_owner): Create a name proxy.
1734         
1735         * tools/dbus-send.c (main): Print D-BUS error name in addition
1736         to message.
1737
1738 2005-06-28  John (J5) Palmieri  <johnp@redhat.com>
1739
1740         * python/dbus_bindings.pyx.in (cunregister_function_handler,
1741         cmessage_function_handler): Patch from 
1742         Anthony Baxter <anthony@interlink.com.au> fixes threading problems
1743         by using the Py_GILState_Ensure/Release to synchronize with the
1744         python runtime.
1745         
1746 2005-06-28  Ray Strode  <rstrode@redhat.com>
1747
1748         *  dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
1749         babysitter helper process on last unref, bug #2813.
1750
1751 2005-06-27  Colin Walters  <walters@verbum.org>
1752
1753         * test/glib/test-dbus-glib.c: 
1754         * test/glib/test-service-glib.c:
1755         * test/glib/test-service-glib.xml:
1756         Test hash table signal emitting.
1757
1758         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
1759         types to their fundamental basis types, since this is what
1760         marshallers operate on.  Also add an entry for VOID__BOXED.
1761         (dbus_g_object_register_marshaller_array): Convert to fundamental.
1762
1763 2005-06-26  Havoc Pennington  <hp@redhat.com>
1764
1765         * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
1766         from Don Park
1767
1768 2005-06-26  Colin Walters  <walters@verbum.org>
1769
1770         * glib/dbus-glib.c (dbus_set_g_error): Delete.
1771         (dbus_g_error_set): New public function from its ashes; used by
1772         both service-side method implementation and GLib bindings
1773         internals.
1774         (dbus_g_error_has_name, dbus_g_error_get_name): New function.
1775         (_dbus_glib_test): Add some tests.
1776
1777         * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
1778
1779         * test/glib/test-service-glib.c (my_object_throw_error): Use
1780         dbus_g_error_set.
1781
1782         * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
1783         errors thrown by dbus_g_error_set.
1784
1785         * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
1786
1787         * glib/dbus-gparser.c (validate_signature): Ditto.
1788
1789         * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner) 
1790         (dbus_g_proxy_end_call_internal): Ditto.
1791
1792         * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
1793         converts DBUS_ERROR_x to DBUS_GERROR_x.
1794         (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
1795
1796         * doc/TODO: Remove error TODO.
1797
1798         * doc/dbus-tutorial.xml: Update with documentation about error
1799         handling.
1800
1801         * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
1802         sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
1803         GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.
1804
1805 2005-06-22  Colin Walters  <walters@verbum.org>
1806         
1807         Patch from Ross Burton <ross@openedhand.com>
1808
1809         * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
1810
1811 2005-06-20  Colin Walters  <walters@verbum.org>
1812
1813         * configure.in: Add glib/examples.
1814
1815         * glib/Makefile.am: Add examples/
1816
1817         * glib/examples/.cvsignore
1818         * glib/examples/Makefile.am
1819         * glib/examples/example-client.c
1820         * glib/examples/example-service.c
1821         * glib/examples/example-service.xml
1822         * glib/examples/example-signal-emitter.c
1823         * glib/examples/example-signal-emitter.xml
1824         * glib/examples/example-signal-recipient.c:
1825         New files; GLib binding examples, ported from
1826         python/examples.
1827
1828 2005-06-20  Colin Walters  <walters@verbum.org>
1829
1830         * dbus/dbus-glib.h: 
1831         * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
1832         dbus_g_proxy_call.
1833
1834         * glib/dbus-binding-tool-glib.c: 
1835         * doc/dbus-tutorial.xml: 
1836         * test/glib/test-dbus-glib.c: Update for rename.
1837         
1838 2005-06-20  Colin Walters  <walters@verbum.org>
1839
1840         Patch suggested by Ross Burton <ross@openedhand.com>
1841
1842         * glib/dbus-gobject.c (export_signals): Free signal name.
1843         (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
1844         memory leak.  Add a bit of documentation.
1845         (dbus_g_method_return_error): Free context, and note we do
1846         so.
1847
1848 2005-06-18  Murray Cumming  <murrayc@murrayc.com>
1849
1850         * dbus/dbus-glib.h:
1851         * glib/dbus-gobject.c:
1852         * glib/dbus-gproxy.c:
1853         * glib/dbus-gvalue.c: Predeclare structs as 
1854         typedef struct _Something Something instead of 
1855         typedef struct Something Something, so we can 
1856         redeclare the prototypes. Other GNOME libraries 
1857         do this already.
1858
1859 2005-06-17  Colin Walters  <walters@verbum.org>
1860
1861         * tools/dbus-names-model.c (have_names_notify): Fix call
1862         to dbus_g_proxy_end_call.
1863         
1864 2005-06-17  Colin Walters  <walters@verbum.org>
1865
1866         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
1867         spew warnings if we get malformed remote signals.
1868
1869         * glib/dbus-gobject.c (propsig_iterate): New function.
1870         (lookup_object_info): New function, extracted from
1871         lookup_object_and_method.
1872         (introspect_properties, introspect_signals): Delete; these
1873         are merged into write_interface.
1874         (write_interface): Write out signals and properties here;
1875         dump the org.gtk.object stuff and use the interface given
1876         in the introspection data blob.  Also fix up property XML.
1877         (lookup_values): New function.
1878         (introspect_interfaces): Gather a mapping from interface to a
1879         list of its methods, signals, and properties, then write out
1880         each interface.
1881         (lookup_object_and_method): Use lookup_object_info.
1882         (struct DBusGSignalClosure): Add interface.
1883         (dbus_g_signal_closure_new): Add interface. Don't dup signame;
1884         we can just use the constant data.
1885         (dbus_g_signal_closure_finalize): Don't free signal name.
1886         (signal_emitter_marshaller): Use interface from signal closure.
1887         (export_signals): Only export signals mentioned in introspection
1888         blob.
1889         (dbus_g_connection_register_g_object): Warn if we have no
1890         introspection data for an object.
1891         (funcsig_equal): Remove unused variable.
1892         (dbus_g_object_register_marshaller): Take varargs instead of
1893         list.
1894         (dbus_g_object_register_marshaller_array): New function,
1895         extracted from old dbus_g_object_register_marshaller.
1896
1897         * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
1898         signals and property data.
1899         (write_quoted_string): New function, extracted from generate_glue.
1900         (generate_glue): Write signals and properties to introspection
1901         blob.
1902
1903         * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
1904         exported_signals and exported_properties.
1905         (dbus_g_object_register_marshaller): Update prototype.
1906         (dbus_g_object_register_marshaller_array): Prototype.
1907         
1908         * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
1909
1910         * test/glib/test-service-glib.c: Add new test signals and method
1911         to emit them.
1912
1913         * test/glib/test-service-glib.xml: Add some test signals.
1914
1915         * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
1916         and my-object-marshal.h
1917         (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
1918         my-object-marshal.c.
1919         (my-object-marshal.c, my-object-marshal.h): Implement.
1920
1921         * test/glib/.cvsignore: Update.
1922
1923         * doc/TODO: Remove two GLib TODO items fixed by this
1924         patch.
1925
1926 2005-06-16  Colin Walters  <walters@verbum.org>
1927
1928         * doc/TODO: Update for GLib bindings.
1929         
1930 2005-06-16  Colin Walters  <walters@verbum.org>
1931
1932         * glib/dbus-binding-tool-glib.c:
1933         * glib/dbus-gobject.c:
1934         * glib/dbus-gproxy.c:  Add Nokia copyright; Patch
1935         from Ross Burton, for his GLib bindings work.
1936
1937 2005-06-16  Colin Walters  <walters@verbum.org>
1938
1939         * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
1940         to iterate instead of walking to G_TYPE_INVALID.
1941
1942         Patch based on a patch from Ryan Gammon.
1943
1944 2005-06-16  Colin Walters  <walters@verbum.org>
1945
1946         * bus/bus.c (bus_context_new): Set parser to NULL
1947         after we unref it (Patch from Chris Boscolo, #2174).
1948         
1949 2005-06-16  Colin Walters  <walters@verbum.org>
1950
1951         * python/dbus_bindings.pyx.in: Import size_t,
1952         __int64_t, __uint64_t, and __signed.
1953
1954         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
1955         Define cmsg struct, output it.
1956         (_dbus_read_credentials_unix_socket):
1957         Use cmsg struct.
1958         
1959         Patch from Joe Markus Clarke for FreeBSD support.
1960         
1961 2005-06-16  Colin Walters  <walters@verbum.org>
1962
1963         * tools/dbus-send.c (append_array): Use strtok.
1964         (append_dict): New function.
1965         (type_from_name): New function, extracted from main.
1966         (main): Handle sending dicts.
1967
1968         * tools/dbus-print-message.c (print_iter): Print dict
1969         entries.
1970         
1971 2005-06-16  Colin Walters  <walters@verbum.org>
1972
1973         * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
1974         values as the empty string (#2948).
1975         
1976 2005-06-16  Colin Walters  <walters@verbum.org>
1977
1978         * dbus/Makefile.am:
1979         * mono/doc/Makefile.am:
1980         * test/glib/Makefile.am:
1981
1982         Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
1983
1984 2005-06-16  Colin Walters  <walters@verbum.org>
1985
1986         * dbus/dbus-marshal-header.c (_dbus_header_load): Set
1987         header byte order from expected byte order (Patch from Chris Wilson, #3475).
1988
1989         * dbus/dbus-marshal-byteswap.c (byteswap_body_helper): 
1990         Increment pointer after swapping fixed array.  Add assertion
1991         for array length.
1992                 
1993 2005-06-15  Colin Walters  <walters@verbum.org>
1994
1995         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
1996         Fix call to dbus_set_error.  (Patch from Michael Banck, #3461)
1997         
1998 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1999
2000         * NEWS: Update to 0.34
2001
2002 2005-06-15  David Zeuthen  <davidz@redhat.com>
2003
2004         * configure.in (LT_CURRENT): Revert back to 1 as the library
2005         hasn't changed and we've certainly not committed to protocol
2006         stability yet.  All this does is to break ABI. See commit note
2007         from hp@redhat.com 2005-05-05 for details.
2008         
2009 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
2010
2011         * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method 
2012         (_dbus_connection_run_builtin_filters): New method
2013         (dbus_connection_dispatch): Run the builtin filters which in turn
2014         runs the peer filter which handles Ping messages.
2015
2016         * doc/TODO: 
2017          - Ping isn't handled: This patch fixes it
2018          
2019          - Add a test case for the Ping message: added TODO item
2020
2021 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
2022
2023         * dbus/dbus-message.c:
2024         (dbus_message_has_path): New method
2025         (dbus_message_has_interface): New method
2026         (dbus_message_has_member): New method
2027
2028         * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
2029         New method
2030
2031         * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that 
2032         the keyring directory is private to the user
2033
2034         * doc/TODO:
2035          - The convenience functions in dbus-bus.h should perhaps have
2036          the signatures that they would have if they were autogenerated
2037          stubs. e.g. the acquire service function. We should also evaluate
2038          which of these functions to include, in light of the fact that
2039          GLib/Qt native stubs will probably also exist.: Punted
2040
2041          - add dbus_message_has_path(), maybe has_member/interface:
2042          fixed in this patch
2043
2044          - in dbus-keyring.c, enforce that the keyring dir is not
2045          world readable/writable: Fixed in this patch
2046
2047 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
2048
2049         * dbus/dbus-marshal-validate.h: Added a new validation
2050         error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for 
2051         out of memory errors when validating signitures
2052
2053         * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
2054         in places where we previously used DBUS_VALID and a FALSE return 
2055         value to indicate OOM
2056         
2057         * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
2058         Use a stack to track the number of elements inside containers.  The 
2059         stack values are then used to validate that dict entries have only two
2060         elements within them.
2061         (validate_body_helper): check the reason for failure when validating
2062         varients
2063         
2064         * dbus/dbus-message.c (load_message): use 
2065         DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used 
2066         DBUS_VALID and a FALSE return value to indicate OOM
2067
2068         * doc/TODO: remove "- validate dict entry number of fields" as this
2069         patch fixes it
2070
2071 2005-06-14  David Zeuthen  <davidz@redhat.com>
2072
2073         * bus/bus.c (process_config_every_time): Drop existing conf-dir
2074         watches (if applicable) and add new watches
2075
2076         * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
2077         (main): Setup SIGIO signal handler if using D_NOTIFY
2078
2079         * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
2080
2081         * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
2082         (merge_included): Also merge conf_dirs list
2083         (bus_config_parser_unref): Clear conf_dirs list
2084         (include_dir): Add directory to conf_dirs list
2085         (bus_config_parser_get_conf_dirs): New function
2086
2087         * bus/dir-watch.[ch]: New files
2088
2089         * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
2090
2091         * configure.in: Add checks for D_NOTIFY on Linux
2092
2093 2005-06-14  Colin Walters  <walters@verbum.org>
2094
2095         * glib/dbus-binding-tool-glib.c:
2096         * glib/dbus-gobject.c:
2097         * glib/dbus-gvalue.c: Fix indentation and brace style.
2098         
2099 2005-06-14  Ross Burton <ross@openedhand.com>.
2100
2101         * glib/dbus-glib.h: Make DBusGMethodInvocation
2102         a private structure.  Rearrange prototypes a bit.
2103         
2104         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
2105         documentation for first_arg_type.
2106         
2107         * glib/dbus-gobject.c: Move DBusGMethodInvocation
2108         here, add documentation.  Move dbus_g_method_return
2109         and dbus_g_method_return_error into public API
2110         section.
2111
2112 2005-06-14  Colin Walters  <walters@verbum.org>
2113
2114         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
2115         Add missing return statements, noticed by Ross Burton.
2116         
2117 2005-06-13  Ross Burton <ross@openedhand.com>.
2118
2119         * glib/dbus-gobject.c: Handle errors on message
2120         demarshalling by sending error message back.
2121         * glib/dbus-gvalue.c: Initialize return variables.
2122
2123 2005-06-13  Colin Walters  <walters@verbum.org>
2124
2125         * glib/Makefile.am: Fix thinko in last patch.
2126
2127 2005-06-13  Colin Walters  <walters@verbum.org>
2128
2129         * glib/Makefile.am: Move dbus-gtype-specialized.c
2130         and dbus-gtype-specialized.h into a _HEADERS variable,
2131         install them.
2132
2133 2005-06-12  Colin Walters  <walters@verbum.org>
2134
2135         Async signals and various bugfixes and testing by
2136         Ross Burton <ross@openedhand.com>.
2137
2138         * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
2139         (dbus_gvalue_genmarshal_name_from_type)
2140         (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
2141         (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
2142         (dbus_g_value_types_init, dbus_gtype_from_signature)
2143         (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
2144         (dbus_gtypes_from_arg_signature): New function prototypes.
2145         (dbus_gvalue_demarshal): Take context and error arguments.
2146         (dbus_gvalue_demarshal_variant): New function.
2147         (dbus_gvalue_demarshal_message): New function.
2148         (dbus_gvalue_store): Delete.
2149
2150         * glib/dbus-gvalue.c:
2151
2152         File has been almost entirely rewritten; now we special-case
2153         more types such as DBUS_TYPE_SIGNATURE, handle arrays and
2154         hash tables correctly, etc.  Full support for recursive values
2155         is not yet complete.
2156
2157         * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
2158         argument of signal to G_TYPE_POINTER since we now pass a
2159         structure.
2160         (lookup_g_marshaller): Delete in favor of
2161         _dbus_gobject_lookup_marshaller.
2162         (marshal_dbus_message_to_g_marshaller): Use
2163         _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
2164         to handle remote signal callbacks.
2165         (dbus_g_proxy_new_from_proxy): New function; creates a new
2166         DBusGProxy by copying an existing one.
2167         (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
2168         (dbus_g_proxy_get_path): New functions.
2169         (dbus_g_proxy_marshal_args_to_message): New function;
2170         factored out of existing code.
2171         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
2172         from a varargs array.
2173         (dbus_g_proxy_begin_call_internal): New function.
2174         (dbus_g_proxy_end_call_internal): New function.
2175         (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
2176         as arguments; simply invoke dbus_g_proxy_begin_call_internal
2177         after collecting args into value array.
2178         (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
2179         invoke dbus_g_proxy_end_call_internal.
2180         (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
2181         end_call_internal.
2182         (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
2183         types.
2184         (array_free_all): New function.
2185         (dbus_g_proxy_add_signal): Take GTypes.
2186
2187         * glib/dbus-gobject.h:
2188         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2189         (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
2190         Prototype.
2191
2192         * glib/dbus-gobject.c: Add a global marshal_table hash which
2193         stores mappings from type signatures to marshallers.  Change lots
2194         of invocations of dbus_gtype_to_dbus_type to
2195         dbus_gtype_to_signature.
2196         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2197         (introspect_signals): Fix test for query.return_type.
2198         (set_object_property): Update invocation of dbus_gvalue_demarshal.
2199         (invoke_object_method): Many changes.  Handle asynchronous
2200         invocations.  Convert arguments with
2201         dbus_gvalue_demarshal_message.  Handle errors.  Use
2202         DBusSignatureIter instead of strlen on args. Handle all arguments
2203         generically.  Special-case variants.
2204         (dbus_g_method_return, dbus_g_method_return_error): New function.
2205         (DBusGSignalClosure): New structure, closes over signal
2206         information.
2207         (dbus_g_signal_closure_new): New function.
2208         (dbus_g_signal_closure_finalize): New function.
2209         (signal_emitter_marshaller): New function; is special marshaller
2210         which emits signals on bus.
2211         (export_signals): New function; introspects object signals and
2212         connects to them.
2213         (dbus_g_object_type_install_info): Take GType instead of
2214         GObjectClass.
2215         (dbus_g_connection_register_g_object): Invoke export_signals.
2216         (dbus_g_connection_lookup_g_object): New function.
2217         (DBusGFuncSignature) New structure; used for mapping type
2218         signatures to marshallers.
2219         (funcsig_hash): New function; hashes DBusGFuncSignature.
2220         (funcsig_equal): New function; compares DBusGFuncSignature.
2221         (_dbus_gobject_lookup_marshaller): New function.
2222         (dbus_g_object_register_marshaller): New function; used to
2223         register a marshaller at runtime for a particular signature.
2224
2225         * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
2226
2227         * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
2228         which notes a server method implementation should be
2229         asynchronous.
2230
2231         * glib/dbus-binding-tool-glib.c
2232         (dbus_binding_tool_output_glib_server): Call
2233         dbus_g_value_types_init.
2234         (write_formal_parameters): Use dbus_gtype_from_signature.  Handle
2235         variants specially.
2236         (dbus_g_type_get_lookup_function): Turn GType into an invocation
2237         of a lookup function.
2238         (write_args_for_direction): Use dbus_g_type_get_lookup_function.
2239         (write_untyped_out_args): New method; write output arguments.
2240         (write_formal_declarations_for_direction): Function for
2241         writing prototypes.
2242         (write_formal_parameters_for_direction): Function for
2243         writing implementations.
2244         (write_typed_args_for_direction): Function for writing
2245         arguments prefixed with GTypes.
2246         (write_async_method_client): Write out async version
2247         of method.
2248
2249         * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
2250         (dbus_g_type_get_marshal_name): Move mapping from GType
2251         to marshal name into here.
2252         (dbus_g_type_get_c_name): Move into here.
2253         (compute_marshaller): Convert signature to type with
2254         dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
2255         (compute_marshaller_name): Ditto.
2256         (compute_marshaller): Handle async signal annotations.
2257         (gather_marshallers): Return if we don't have a known
2258         prefix.
2259         (generate_glue): Collect introspection blob here, and
2260         write all of the blob at the end.  This allows an object
2261         with multiple interfaces to work.
2262         Mark async methods in introspection blob.
2263
2264         * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
2265         dbus-gtype-specialized.c, dbus-gtype-specialized.h,
2266         dbus-gvalue-utils.h, dbus-gvalue-utils.c.
2267
2268         * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
2269         avoids people accidentally using DBUS_TYPE_* which should
2270         not be necessary anymore.
2271         Do include dbus-gtype-specialized.h, which are utilities
2272         for GLib container types.
2273         Add various #defines for types such as
2274         DBUS_TYPE_G_BOOLEAN_ARRAY.
2275         (DBusGValueIterator, DBusGValue): Define, not fully used
2276         yet.
2277         (dbus_g_value_get_g_type): Type for recursive value.
2278         (dbus_g_value_open, dbus_g_value_iterator_get_value)
2279         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
2280         (dbus_g_value_free): Prototypes.
2281         (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
2282         (dbus_g_proxy_set_interface): Prototype.
2283         (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
2284         (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
2285         types.
2286         (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
2287         Accessors.
2288         (DBusGAsyncData, DBusGMethodInvocation): Structures for
2289         doing async invocations.
2290         (dbus_g_method_return, dbus_g_method_return_error):
2291         Prototypes.
2292         * doc/dbus-tutorial.xml: Update GLib section.
2293         
2294         * tools/dbus-viewer.c (load_child_nodes): Update
2295         for new invocation type of dbus_g_proxy_end_call.
2296         (load_from_service_thread_func): Ditto.
2297
2298         * tools/print-introspect.c (main): Ditto.
2299
2300         * tools/dbus-names-model.c (have_names_notify)
2301         (names_model_reload, names_model_set_connection)
2302         Use GTypes.
2303
2304         * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
2305         needed since Python bindings use GLib bindings.
2306
2307         * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
2308         Add --prefix argument.
2309
2310         * tools/Makefile.am: Define DBUS_COMPILATION.  Remove
2311         unneeded --ignore-unsupported arg.
2312         
2313         * test/glib/test-service-glib.c: 
2314         * test/glib/test-service-glib.xml:
2315         * test/glib/test-dbus-glib.c: Add many more tests.
2316
2317 2005-06-06  David Zeuthen  <davidz@redhat.com>
2318
2319         * doc/TODO: Add item about need to remove deprecated functions.
2320
2321         * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
2322
2323         * dbus/dbus-connection.c (dbus_connection_disconnect): New function
2324         to repair the ABI which was broken with the last commit.
2325
2326 2005-06-02  John (J5) Palmieri <johnp@redhat.com>
2327
2328         *  dbus/dbus-connection.c, dbus/dbus-connection.h 
2329         (dbus_connection_disconnect): renamed to dbus_connection_close 
2330         for API symmetry with dbus_connection_open
2331         (_dbus_connection_open_internal): 
2332         s/dbus_connection_disconnect/dbus_connection_close
2333
2334         * dbus/dbus-bus.c (dbus_bus_get):
2335         s/dbus_connection_disconnect/dbus_connection_close
2336
2337         * bus/connection.c (bus_connections_unref, 
2338         bus_connections_setup_connection, bus_connections_expire_incomplete):
2339         s/dbus_connection_disconnect/dbus_connection_close
2340
2341         * bus/dispatch.c (bus_dispatch, kill_client_connection, 
2342         kill_client_connection_unchecked, check_hello_connection):
2343         s/dbus_connection_disconnect/dbus_connection_close
2344
2345         * bus/bus.c (new_connection_callback):
2346         s/dbus_connection_disconnect/dbus_connection_close
2347
2348         * tools/dbus-send.c (main):
2349         s/dbus_connection_disconnect/dbus_connection_close
2350
2351         * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
2352         s/dbus_connection_disconnect/dbus_connection_close
2353         
2354         * test/test-service.c (path_message_func, filter_func):
2355         s/dbus_connection_disconnect/dbus_connection_close
2356         
2357         * doc/TODO: remove connection_open/connection_disconnect lacks symmetry         item that was just fixed
2358         
2359 2005-05-25  Colin Walters  <walters@verbum.org>
2360
2361         * dbus/dbus-protocol.h: Move various bus service #defines such
2362           as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
2363           dbus/dbus-shared.h.
2364         * dbus/dbus-shared.h: Various defines moved here.
2365         * dbus/dbus-marshal-header.c: Include dbus-shared.h.
2366
2367 2005-05-25  John (J5) Palmieri  <johnp@redhat.com>
2368
2369         * python/__init__.py: Python bindings deserve a minor version
2370         update.  Upped to (0, 40, 2)
2371
2372 2005-05-24  John (J5) Palmieri  <johnp@redhat.com>
2373
2374         * python/decorators.py: add explicitly_pass_message decorator
2375         for passing in the dbus message as keyword for edge case signal
2376         handling
2377
2378         * python/matchrules.py (SignalMatchRule.__repr__): fix output
2379         to conform with what dbus expects for match rules
2380         (SignalMatchRule.execute): add the dbus message as a keyword
2381         if the signal handler has requested it
2382
2383         * python/examples/example/signal-recipient.py: added some more
2384         examples on how to hook up to signals
2385
2386 2005-05-23  John (J5) Palmieri  <johnp@redhat.com>
2387
2388         * python/decorators.py: import dbus_bindings
2389
2390         * python/matchrules.py (SignalMatchRule, SignalMatchTree, 
2391         SignalMatchNode): new classes that implement wildcard signal
2392         callback matching using a tree lookup. Heavily modified from a
2393         patch sent by Celso Pinto (fd.o bug #3241)
2394
2395         * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
2396         use new match classes to handle signals.
2397
2398 2005-05-19  John (J5) Palmieri  <johnp@redhat.com>
2399         
2400         * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
2401
2402 2005-05-18  Havoc Pennington  <hp@redhat.com>
2403
2404         * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
2405         gettext. Not really worth requiring yet perhaps, but any
2406         production quality 1.0 would require it so we should go ahead and
2407         get things set up. We do have a couple token calls to
2408         bindtextdomain in the code already.
2409
2410 2005-05-16  John (J5) Palmieri  <johnp@redhat.com>
2411
2412         * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
2413         when using recursive g_main_loops
2414
2415         * python/_dbus.py (class Bus): add the ProxyObjectClass
2416         alias for ProxyObject to make it easier for the Twisted 
2417         networking framework to integrate dbus.
2418
2419         * python/proxies.py (class ProxyObject): add the ProxyMethodClass
2420         alias for ProxyMethod to make it easier for the Twisted 
2421         networking framework to integrate dbus. 
2422
2423 2005-05-11  Ross Burton  <ross@openedhand.com>
2424
2425         * glib/dbus-glib-tool.c: Add --prefix argument.
2426         * glib/dbus-binding-tool-glib.h: Add prefix argument.
2427         * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
2428         Add prefix argument.
2429         (generate_glue): Pass prefix argument down.
2430         (dbus_binding_tool_output_glib_server): Pass prefix to
2431         glib-genmarshal.
2432         
2433 2005-05-11  Colin Walters  <walters@verbum.org>
2434
2435         * tools/dbus-send.c (append_array): New function.
2436         (append_arg): Broken out from main.
2437         (main): Add cheesy hack to send arrays and variants.
2438         (usage): Update.
2439         * tools/dbus-print-message.c (print_iter): Broken out
2440         from main.
2441
2442 2005-05-11  Colin Walters  <walters@verbum.org>
2443
2444         * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
2445         New function, returns signature string for signature iter.
2446         * dbus/dbus-signature.h: Prototype it.
2447         * dbus/dbus-message.c (dbus_message_iter_get_signature):
2448         New function, returns signature string for message iter.
2449         (dbus_message_iter_get_array_len): New function, returns
2450         length of array.
2451         (dbus_message_iter_get_fixed_array): Fix assertion; this
2452         function should be used when the iter is pointing to the
2453         contents of an array
2454         * dbus/dbus-message.h: Prototypes.
2455         * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
2456         New function; returns length of an array.
2457         * dbus/dbus-marshal-recursive.h: Prototype it.
2458         
2459 2005-05-11  Colin Walters  <walters@verbum.org>
2460
2461         * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
2462         compilation error.
2463         
2464 2005-05-08  Havoc Pennington  <hp@redhat.com>
2465
2466         * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
2467         daemon's pid, not the parent's pid, to the file descriptor.
2468         Reported by Taj Morton.
2469
2470 2005-05-05  Havoc Pennington  <hp@redhat.com>
2471
2472         * configure.in (LT_*): add notes on how the libtool versioning
2473         works to save thinking. Increment soname to indicate protocol
2474         breakage (though really the library interface hasn't changed I
2475         guess)
2476
2477         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
2478         verify the GUID received from server matches what we were
2479         expecting, if we had an expectation
2480
2481         * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
2482         (_dbus_auth_get_guid_from_server): new function
2483         (send_begin): parse the OK args
2484
2485         * doc/dbus-specification.xml: add GUID to the auth protocol
2486
2487 2005-05-05  John (J5) Palmieri  <johnp@redhat.com>
2488
2489         * Fix my name in previous changelog ;)
2490
2491         * python/proxies.py (ProxyObject.__getattr__): add further patch
2492         from Anthony Baxter to throw an AttributeError when python 
2493         __special__ functions are called instead of marshling them over 
2494         the bus (Bug#1685 comment 3).
2495
2496 2005-05-04  John (J5) Palmieri  <johnp@redhat.com>
2497
2498         * python/Makefile.am: changed to use pyexecdir for the binding
2499         shared libraries (Bug#2494)
2500
2501         * python/exceptions.py: bring exceptions over from the bindings
2502         so they can be used in applications (Bug#2036)
2503         Make all exceptions derive from DBusException
2504
2505         * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
2506         of classes so that print obj doesn't throw an exception (Bug #1685)
2507
2508 2005-05-03  Ross Burton  <ross@openedhand.com>
2509
2510         * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
2511         Return if we get an error during registration.  Set up a
2512         weak reference on object to unregister if object is destroyed.
2513         (unregister_gobject): New function.
2514         
2515 2005-05-01  John (J5) Palmieri  <johnp@redhat.com>
2516
2517         * python/dbus_bindings.pyx.in: 
2518         - added new type classes for hinting to the marashaler what type 
2519         to send over the wire
2520         - added int16 and uint16 marshalers
2521         - Fixed a bug in the type constants that caused int32 to go out
2522         as uint16 over the wire
2523         * python/dbus.py: split up into different files and renamed _dbus.py
2524         * python/__init__.py, python/_util.py, python/decorators.py, 
2525         python/exceptions.py, python/proxies.py, python/services.py,
2526         python/types.py: new files split off from dbus.py
2527         * python/Makefile.am: Add new files, remove dbus.py and 
2528         install all python files to <python module dir>/dbus
2529         * python/examples/*: Added #!/usr/bin/env python to the top of
2530         every example.  Patch provided by Tatavarty Kalyan
2531
2532 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2533
2534         * NEWS: Update to 0.33
2535
2536 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2537
2538         * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
2539         method for doing async calls
2540         (_pending_call_notification): New C function for handling pendning call
2541         callbacks
2542         (set_notify): New method for setting pending call notification
2543         
2544         * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
2545         Async capabilities added to remote method calls
2546         (Sender): class removed
2547         (RemoteService): class removed
2548         (ObjectTree): class removed for now
2549         (RemoteObject): Renamed to ProxyObject
2550         (RemoteMethod): Renamed to ProxyMethod
2551         (method): Decorator added for decorating python methods as dbus methods
2552         (signal): Decorator added for decorating python methods as signal emitters
2553         (ObjectType): Metaclass added for generating introspection data and the
2554         method callback vtable
2555         (Interface): Wrapper class added to wrap objects in a dbus interface
2556         (Object): Uses ObjectType as its metaclass and exports Introspect
2557         of the org.freedesktop.DBus.Introspectable interface
2558         (ValidationException, UnknownMethodException): new exceptions
2559
2560         * python/examples/*: Modified to fit with the new bindings
2561
2562 2005-04-23  Havoc Pennington  <hp@redhat.com>
2563
2564         * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
2565         reported by Tony Houghton
2566
2567         * test/test-service.c (main): test
2568         dbus_connection_get_object_path_data()
2569
2570         * dbus/dbus-object-tree.c (find_handler): be sure we always init
2571         the exact_match
2572         (_dbus_object_tree_get_user_data_unlocked): new function used by
2573         dbus_connection_get_object_path_data()
2574         (do_register): add assertion test for get_user_data_unlocked
2575         (object_tree_test_iteration): more tests
2576
2577         * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
2578         new function from Dan Reed to let you get the user data from 
2579         dbus_connection_register_object_path()
2580
2581 2005-04-23  John (J5) Palmieri  <johnp@redhat.com>
2582
2583         * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
2584         in numerous places that did not account for the NULL terminator
2585         (signature_from_seed): changed the manual string copy loop to 
2586         just use strcpy instead
2587         make check should now pass
2588
2589 2005-04-19  John (J5) Palmieri  <johnp@redhat.com>
2590
2591         * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
2592         so that it allows messages that are not signals to pass in 
2593         NULL as the interface.
2594
2595 2005-04-18  David Zeuthen  <davidz@redhat.com>
2596
2597         * glib/dbus-gmain.c (io_handler_destroy_source): 
2598         (timeout_handler_destroy_source, connection_setup_free): 
2599         Also unref the source to avoid memory leaks.
2600
2601 2005-04-13  David Zeuthen  <davidz@redhat.com>
2602
2603         * bus/config-parser.c (bus_config_parser_new): Bump this to a
2604         more reasonable, yet still totally arbitrary, value :-). 
2605
2606 2005-04-13  David Zeuthen  <davidz@redhat.com>
2607
2608         * doc/TODO: Added an "important for 1.0" item about selinux
2609         allow/deny messages
2610
2611 2005-04-13  David Zeuthen  <davidz@redhat.com>
2612
2613         * bus/selinux.c: Add c-file-style to top of file
2614         (log_audit_callback): Don't free the data here anymore
2615         (bus_selinux_check): Don't take spid and tpid since appending
2616         that to auxdata may OOM.
2617         (bus_selinux_allows_acquire_service): Handle OOM and signal back
2618         to the caller if we are OOM by taking an error object.
2619         (bus_selinux_allows_send): -do-
2620
2621         * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
2622         and bus_selinux_allows_send
2623
2624         * bus/bus.c (bus_context_check_security_policy): Pass error and
2625         pass on OOM thrown by bus_selinux_allows_send()
2626
2627         * bus/services.c (bus_registry_acquire_service): Pass error and
2628         pass on OOM thrown by bus_selinux_allows_acquire_service()
2629
2630 2005-04-13  Havoc Pennington  <hp@redhat.com>
2631
2632         * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
2633         message at a time to avoid monopolizing the main loop, bug 
2634         #2953 from Benjamin Otte
2635
2636 2005-04-09  Havoc Pennington  <hp@redhat.com>
2637
2638         * dbus/dbus-string.c (copy): change a memcpy to memmove due to
2639         possible overlap, fix from Daniel Reed
2640         (fixup_alignment): fix signedness warnings
2641         (_dbus_string_append_unichar): ditto
2642
2643 2005-04-09  Havoc Pennington  <hp@redhat.com>
2644
2645         * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
2646
2647         * glib/dbus-glib-tool.c (main): fix warning
2648
2649         * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
2650
2651         * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
2652         add a new function that can be used in simple applications that
2653         don't have a main loop and are willing to block
2654
2655 2005-04-05  David Zeuthen  <davidz@redhat.com>
2656
2657         Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
2658
2659         * glib/dbus-gmain.c:
2660         (io_handler_destroy_source): Remove from list of IO handlers
2661         of the ConnectionSetup object
2662         (timeout_handler_destroy_source): -do- for timeout handlers
2663         (io_handler_source_finalized): Don't remove from list since
2664         we now do that in io_handler_destroy_source(). Renamed from
2665         io_handler_source_destroyed
2666         (timeout_handler_source_destroyed): -do- for timeout handlers
2667         (connection_setup_free): It is now safe to iterate over all
2668         IO and timeout handlers as the _destroy_source removes them
2669         from the list synchronously
2670
2671 2005-03-30  Havoc Pennington  <hp@redhat.com>
2672
2673         * configure.in: change check to gtk 2.4
2674
2675         * tools/dbus-viewer.c (name_combo_changed_callback): remove
2676         gtk_combo_box_get_active_text() usage to decrement GTK requirement
2677         to 2.4
2678
2679 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2680
2681         * News: Update 0.32
2682
2683         * HACKING: Fixed realease instructions.  configure.in should be updated to
2684           the next release by the person who made the last release.
2685
2686 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2687
2688         * python/lvalue_cast_post_process.py - removed.  Patch has been
2689           submitted to Pyrex maintainers that fixes gcc4.0 errors
2690
2691         * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
2692
2693 2005-03-24  Daniel Reed  <n@ml.org>
2694
2695         * tools/Makefile.am: Make print-introspect and
2696         dbus-bus-introspect.xml building conditional on HAVE_GLIB.
2697
2698 2005-03-22  John (J5) Palmieri  <johnp@redhat.com>
2699
2700         * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
2701
2702         * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have 
2703           had in Red Hat packages for a while but for some reason never 
2704           got merged upstream
2705           (_dbus_is_a_number): New checks if a string
2706           can be converted to a number and does the conversion if it can
2707           (_dbus_user_database_lookup): Add check to see if the given username
2708           is a udi.  This allows udi's to be used instead of usernames in the
2709           config file.
2710           (_dbus_user_database_lookup_group): Add check to see if the given groupname
2711           is a gdi.  This allows gdi's to be used instead of groupnames in the
2712           config file.
2713
2714 2005-03-21  John (J5) Palmieri  <johnp@redhat.com>
2715
2716         * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
2717           code so that it compiles with gcc4.0
2718
2719         * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
2720           run dbus_bindings.c through lvalue_cast_post_process.py and copy the
2721           results back to dbus_binding.c
2722
2723 2005-03-20  Colin Walters  <walters@verbum.org>
2724
2725         Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
2726
2727         * configure.in: Require GTK+ 2.6.
2728         
2729 2005-03-20  Colin Walters  <walters@verbum.org>
2730
2731         * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
2732
2733 2005-03-17  Tom Parker  <palfrey@tevp.net>
2734
2735         * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
2736         print DBUS_UID_UNSET; instead print passed username.  Also
2737         be sure to actually use gid looked up in cache.
2738         
2739         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
2740         for DBUS_GID_UNSET and groupname.
2741
2742 2005-03-17  Colin Walters  <walters@verbum.org>
2743
2744         * bus/print-introspect.c: Move to tools/.
2745         * bus/run-with-tmp-session-bus.sh: Ditto.
2746         
2747         * glib/Makefile.am (dbus-glib-bindings.h): Move
2748         generation to tools/Makefile.am.
2749
2750         * test/glib/run-test.sh: Update to handle move
2751         of run-with-tmp-session-bus.sh.
2752
2753         * test/glib/test-service-glib.c: Update to handle
2754         move of dbus-glib-bindings.h.
2755
2756         * tools/print-introspect.c: Moved here
2757         from bus/, and ported to GLib bindings.
2758
2759         * tools/run-with-tmp-session-bus.sh: Moved here
2760         from bus/.
2761
2762         * tools/Makefile.am: Generate dbus-glib-bindings.h
2763         and dbus-bus-introspect.xml here.
2764
2765         * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
2766         Update.
2767
2768 2005-03-17  Colin Walters  <walters@verbum.org>
2769
2770         * bus/driver.c (write_args_for_direction): Use
2771         _dbus_string_get_const_data to retrieve string;
2772         _dbus_string_get_const_data_len doesn't actually return
2773         a NULL-terminated substring.
2774
2775         * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
2776         (main): Change to use org_freedesktop_DBus_request_name
2777         instead of using g_proxy_begin_call/end_call.
2778
2779 2005-03-15  Joe Shaw  <joeshaw@novell.com>
2780
2781         * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
2782         generating the finalizer.  Fixes from Ben Maurer.
2783
2784 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2785
2786         * mono/BusDriver.cs: Update method names: ListServices
2787         becomes ListNames; GetOwner becomes GetNameOwner.
2788
2789         * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
2790         onto the eval stack when removing the delegate.
2791
2792 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2793
2794         * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
2795         LT_CURRENT.  Set it to the autoconf variable.
2796                                                                                 
2797         * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
2798         classes that disconnects the signal handler delegate from the
2799         service object.  Fixes a big leak of proxy objects on the
2800         client side of things.  Patch from Ben Maurer
2801         <bmaurer@ximian.com>
2802
2803 2005-03-12  Colin Walters  <walters@verbum.org>
2804
2805         * bus/driver.c (write_args_for_direction): New function,
2806         parses a type signature into arguments and outputs to
2807         XML.
2808         (bus_driver_handle_introspect): Use it instead of
2809         hardcoding XML for certain signatures.
2810         
2811         * bus/Makefile.am (dbus-bus-introspect.xml): Add
2812         dependency on dbus-daemon.
2813
2814         * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
2815         argument, pass it to dbus_binding_tool_output_glib_client.
2816
2817         * glib/dbus-binding-tool-glib.c
2818         (generate_client_glue): Protect against multiple inclusion.
2819         (dbus_binding_tool_output_glib_client): Add
2820         G_BEGIN_DECLS/G_END_DECLS.
2821
2822         * glib/dbus-binding-tool-glib.c (compute_client_method_name):
2823         Change to just take iface prefix directly.
2824         (write_formal_parameters): Clarify error message.
2825         (check_supported_parameters): New function; checks to see type
2826         signatures of method parameters are supported.
2827         (generate_client_glue): Handle ignore_unsupported flag.
2828         (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
2829         parameter.
2830
2831         * glib/Makefile.am (dbus-glib-bindings.h): Pass
2832         --ignore-unsupported by default until glib bindings
2833         support arrays.
2834
2835 2005-03-11  Colin Walters  <walters@verbum.org>
2836
2837         * glib/Makefile.am: Generate dbus-glib-bindings.h and
2838         install it.
2839
2840         * bus/print-introspect.c: New file; prints introspection
2841         data for a given name and object path.
2842
2843         * bus/run-with-tmp-session-bus.sh: New file, refactored
2844         from test/glib/run-test.sh.  Creates a temporary session
2845         bus and runs another program.
2846
2847         * test/glib/run-test.sh: Refactor to invoke
2848         run-with-tmp-session-bus.sh.
2849
2850         * bus/driver.c (bus_driver_handle_introspect): Fix to print new
2851         introspection format.  Also change to use DBUS_TYPE_x_AS_STRING
2852         macros instead of hardcoding.
2853
2854         * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
2855
2856 2005-03-11  Joe Shaw  <joeshaw@novell.com>
2857
2858         * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
2859         this unref; it doesn't match up evenly in some codepaths.
2860         (_dbus_connection_block_pending_call): Unref at every exitpoint;
2861         this evenly matches with the ref near the top of this function.
2862
2863 2005-03-09  Joe Shaw  <joeshaw@novell.com>
2864
2865         * dbus/dbus-object-tree.c
2866         (_dbus_object_tree_unregister_and_unlock): If checks are enabled
2867         and we try to unregister a path that's not registered, still go
2868         through the process of unlocking and don't just return.
2869
2870 2005-03-09  Colin Walters  <walters@verbum.org>
2871
2872         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
2873         to this are generated for client-side wrappers.  Invokes a
2874         D-BUS method and returns reply values.  
2875
2876         * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
2877         function; writes signature string for argument direction.
2878         (write_args_for_direction): Change to pass input values directly
2879         instead of via address, and fix indentation.
2880         (generate_client_glue): Change to invoke dbus_g_proxy_invoke.  Also
2881         make generated wrappers inlineable.
2882
2883         * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
2884         note about using dbus_type_is_fixed.
2885
2886         * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
2887         dbus/dbus-signature.c as dbus_type_is_fixed.
2888
2889         All callers updated.
2890
2891         * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
2892         from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
2893
2894         * dbus/dbus-signature.h: Prototype.
2895
2896         * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
2897         error printf code.
2898
2899         * test/glib/test-dbus-glib.c (main): Be sure to clear error as
2900         appropriate instead of just freeing it.
2901         (main): Free returned strings using g_free.
2902
2903         * test/glib/Makefile.am (test-service-glib-glue.h)
2904         (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
2905
2906         * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
2907         simply maps a simple D-BUS type to GType.
2908         (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
2909         GType.
2910         (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
2911         initialize the value with it.
2912         (dbus_gvalue_binding_type_from_type): Unused, delete.
2913         (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
2914         various types instead of unmarshalling to value data directly.
2915         Remove can_convert boolean.
2916         (dbus_gvalue_marshal): Remove duplicate initialization; switch to
2917         returning directly instead of using can_convert boolean.
2918         (dbus_gvalue_store): New function; not related to D-BUS per-se.
2919         Stores a GValue in a pointer to a value of its corresponding C
2920         type.
2921
2922         * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
2923         add dbus_gvalue_store.
2924
2925 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2926
2927         Fix a bunch of lifecycle and memory management problems
2928         in the mono bindings.
2929
2930         * mono/Arguments.cs (Arguments): Implement IDisposable
2931
2932         * mono/Bus.cs (Bus): Don't allow public instantiation.  This is
2933         strictly a static class.
2934
2935         * mono/Connection.cs: Move the DBusObjectPathVTable and associated
2936         delegates into this file.
2937         (Connection): Implement IDisposable.
2938         (Dispose): Disconnect the connection and set the raw connection
2939         pointer to IntPtr.Zero.
2940         (~Connection): Call Dispose().
2941         (RegisterObjectPath): Added.  Manages the registration of object
2942         paths so we can cleanly disconnect them at dispose/finalize time.
2943         (UnregisterObjectPath): Ditto.
2944         (set_RawConnection): Unregister all of the object paths when
2945         changing the underlying DBusConnection.  Add them back onto the
2946         new connection, if any.
2947
2948         * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
2949         more unmanaged resources anymore, so it's not necessary.  Move all
2950         the DBusObjectPathVTable stuff out of here.
2951         (Handler): Save references to our delegates so that they don't get
2952         finalized.  Call Connection.RegisterObjectPath() instead of
2953         dbus_connection_register_object_path() directly.
2954         (Message_Called): Dispose the message after we're finished with
2955         it.
2956
2957         * mono/Message.cs (Message): Implement IDisposable.
2958         (Dispose): Dispose the Arguments, and set the RawMessage to
2959         IntPtr.Zero.
2960         (SendWithReplyAndBlock): We own the ref to the reply that comes
2961         back from dbus_connection_send_with_reply_and_block() so add a
2962         comment about that and unref it after we've constructed a managed
2963         MethodReturn class around it.  Fixes a big, big leak.
2964
2965         * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
2966         method.
2967         (BuildSignalHandler): After we've sent the Signal message, dispose
2968         of it.
2969         (BuildMethod): Dispose of the method call and reply messages after
2970         we've sent the message and extracted the data we want from the
2971         reply.
2972
2973         * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
2974         anymore.
2975         (Service_FilterCalled): Dispose of the message after we're
2976         finished with it.
2977
2978 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2979
2980         * dbus/dbus-connection.c (dbus_connection_send_with_reply):
2981         After we attach our pending call to the connection, unref
2982         it.  Fixes a leak.
2983  
2984         * mono/Connection.cs (set_RawConnection): Disconnect our
2985         filter and match callbacks from the old connection and
2986         reconnect them to the new connection, if any.
2987
2988         * mono/DBusType/Array.cs: "Code" is a static member, so
2989         don't use "this" to refer to it.  Fix for stricter checking
2990         in Mono 1.1.4.
2991  
2992         * mono/DBusType/ObjectPath.cs (Append): Don't leak the
2993         object path that we pass into unmanaged code.
2994  
2995         * mono/DBusType/String.cs (Append): Don't leak the string
2996         that we pass into unmanged code.
2997
2998 2005-03-07  John (J5) Palmieri  <johnp@redhat.com>
2999         * NEWS: Update for 0.31
3000
3001         * configure.in: Release 0.31
3002         add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
3003
3004         * qt/Makefile.am: fixed build
3005
3006         * dbus/Makefile.am: soname bump for libdbus
3007
3008         * glib/Makefile.am: soname bump for libdbus-glib
3009
3010 2005-03-05  Havoc Pennington  <hp@redhat.com>
3011
3012         * dbus/dbus-sysdeps.c:
3013         (pseudorandom_generate_random_bytes_buffer): fix to have no return
3014         value
3015         (_dbus_generate_random_bytes_buffer): fix return value
3016
3017         * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
3018         checks actually work, from Tom Parker <fdo@tevp.net>
3019
3020 2005-03-01  Colin Walters  <walters@verbum.org>
3021
3022         * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
3023         functions copied from dbus-glib-tool.c.
3024         (main): Convert lots of error code to use them.
3025         Also add some testing for introspection bits.
3026
3027 2005-03-01  Colin Walters  <walters@verbum.org>
3028         
3029         * doc/TODO: Remove introspection signature TODO.
3030
3031 2005-02-27  Colin Walters  <walters@verbum.org>
3032
3033         * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
3034         Change return value to const char * instead of int so we can do
3035         full signatures.
3036         (struct PropertyInfo, struct ArgInfo): Store char *.
3037         (property_info_new, arg_info_new): Update parameters, strdup.
3038         (property_info_unref, arg_info_unref): Free.
3039
3040         * glib/dbus-gidl.h: Update prototypes.
3041
3042         * glib/dbus-gparser.c (basic_type_from_string): Delete.
3043         (validate_signature): New function, just validates signature and
3044         sets GError.
3045         (parse_property, parse_arg): Invoke validate_signature.  Store
3046         signature instead of just type code.
3047
3048         * glib/dbus-gvalue.c (base_type_from_signature): New utility
3049         function to return a primary type for a signature, dropping
3050         information about types in container types.
3051         (dbus_gvalue_genmarshal_name_from_type)
3052         (dbus_gvalue_binding_type_from_type)
3053         (dbus_gvalue_ctype_from_type): Update to take full signature
3054          instead of type code.
3055         (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
3056
3057         * glib/dbus-gvalue.h: Update prototypes for above.
3058
3059         * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
3060         glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
3061         (introspect_properties, introspect_signals, write_interface):
3062         Update to handle signatures, and remove usage of
3063         _dbus_gutils_type_to_string.
3064         (handle_introspect): Print out type codes instead of e.g. "string"
3065         in hardcoded introspection XML; also use x_AS_STRING constants
3066         instead of hardcoding in string.
3067
3068         * glib/dbus-glib-tool.c (pretty_print): Handle signature change
3069         to string.  Remove usage of _dbus_gutils_type_to_string.
3070
3071         * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
3072
3073         * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
3074         deletion.
3075         
3076         * glib/dbus-binding-tool-glib.c (compute_marshaller)
3077         (compute_marshaller_name, generate_glue): Handle signature change
3078         to string.
3079         (write_formal_parameters, write_args_for_direction): Ditto, and
3080         remove FIXME.
3081
3082         * tools/dbus-tree-view.c (type_to_string): Delete.
3083         (info_set_func_text): Update to print full signatures.
3084
3085         * test/glib/test-service-glib.xml: Change types to new
3086         introspection format.
3087
3088 2005-02-26  Havoc Pennington  <hp@redhat.com>
3089
3090         * doc/TODO: remove the "guid" item
3091
3092         * test/glib/test-profile.c (no_bus_thread_func): use open_private
3093         (with_bus_thread_func): use open_private
3094
3095         * dbus/dbus-connection.c (dbus_connection_open_private): new
3096         function that works like the old dbus_connection_open()
3097         (dbus_connection_open): now returns an existing connection if
3098         possible
3099
3100         * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
3101         through the GUID to the transport
3102
3103         * dbus/dbus-server.c (_dbus_server_init_base): keep around the
3104         GUID in hex-encoded form.
3105
3106         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3107         pass GUID argument in to the transport
3108
3109         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
3110         guid argument
3111
3112         * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
3113
3114         * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
3115
3116 2005-02-25  Havoc Pennington  <hp@redhat.com>
3117
3118         * doc/dbus-specification.xml: document the GUID thing
3119
3120         * dbus/dbus-server.c (_dbus_server_init_base): initialize a
3121         globally unique ID for the server, and put a "guid=hexencoded"
3122         field in the address
3123
3124         * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
3125
3126         * dbus/dbus-message.c: ditto
3127
3128         * dbus/dbus-dataslot.c: ditto
3129
3130         * dbus/dbus-list.c: ditto
3131
3132         * dbus/dbus-internals.h: wait, just include
3133         dbus-threads-internal.h here
3134         
3135         * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
3136         use in main library
3137
3138         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
3139
3140 2005-02-24  Colin Walters  <walters@verbum.org>
3141
3142         * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
3143
3144 2005-02-24  John (J5) Palmieir  <johnp@redhat.com>
3145
3146         * glib/Makefile.am: added dbus-gobject.h to sources list
3147         so distcheck doesn't fail
3148         
3149 2005-02-24  Havoc Pennington  <hp@redhat.com>
3150
3151         * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
3152         you must disconnect before unref, since locking and other things
3153         are screwed up otherwise. Fix assorted other locking stuff.
3154
3155         * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
3156         fix compilation
3157
3158         * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
3159         into a private header and don't export from the library
3160
3161         * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
3162
3163 2005-02-24  Colin Walters  <walters@verbum.org>
3164         
3165         * dbus/dbus-signature.c: New file; implements various functions
3166         related to type signatures.  Includes an interator for parsing,
3167         validation functions.
3168         (dbus_type_is_basic): Moved here from
3169         dbus-marshal-basic.c:_dbus_type_is_basic.
3170         (dbus_type_is_container): Moved here from
3171         dbus-marshal-basic.c:_dbus_type_is_container.
3172
3173         All callers of _dbus_type_is_container and _dbus_type_is_basic
3174         updated, and include dbus-signature.h.
3175
3176         * dbus/dbus-signature.h: New file; prototypes for the above.
3177
3178         * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
3179         dbus-signature.h.
3180
3181         * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
3182         function factored out of _dbus_first_type_in_signature.
3183         (_dbus_first_type_in_signature_c_str): New function; returns first
3184         type code for a type signature character.
3185
3186         * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
3187         handle function moves.
3188
3189         * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
3190
3191         * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
3192         function; skips to next complete type in type signature.
3193         Implemented using previous skip_one_complete_type.  Now
3194         skip_one_complete_type just delegates to
3195         _dbus_type_signature_next.
3196
3197         * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
3198         to dbus-signature.c
3199         (_dbus_type_is_container): Ditto.
3200
3201         * doc/dbus-specification.xml: Update introspection sample to
3202         use real type signatures.
3203
3204         * dbus/dbus-test.h: Prototype signature test.
3205
3206         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
3207         signature tests.
3208
3209         * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
3210
3211 2005-02-23  John (J5) Palmieri  <johnp@redhat.com>
3212
3213         * python/dbus_bindings.pyx.in (PendingCall::get_reply):
3214         s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
3215
3216 2005-02-21  Colin Walters  <walters@verbum.org>
3217
3218         * dbus/dbus-test-main.c (main): Take optional specific test
3219         argument.
3220
3221         * dbus/dbus-test.c (run_test): New function, runs a test function
3222         with no data directory.
3223         (run_data_test): Like above, but takes data directory.
3224         (dbus_internal_do_not_use_run_tests): Take
3225         specific test argument.  Replace lots of cut n' paste code
3226         with run_test and run_data_test.
3227
3228         * dbus/dbus-test.h: Update prototype for
3229         dbus_internal_do_not_use_run_tests.
3230
3231 2005-02-20  Havoc Pennington  <hp@redhat.com>
3232
3233         Fix bugs reported by Daniel P. Berrange
3234         
3235         * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
3236         (protected_change_watch): new function
3237         (_dbus_server_toggle_watch, _dbus_server_remove_watch)
3238         (_dbus_server_add_watch): change to work like the
3239         dbus-connection.c equivalents; like those, probably kind of
3240         busted, but should at least mostly work for now
3241         (dbus_server_disconnect): drop the lock if we were already
3242         disconnected, patch from Daniel P. Berrange
3243
3244         * dbus/dbus-server.c (_dbus_server_toggle_timeout) 
3245         (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
3246         same stuff
3247
3248         * doc/TODO: todo about unscrewing this mess
3249
3250 2005-02-19  Colin Walters  <walters@verbum.org>
3251
3252         * glib/dbus-binding-tool-glib.c
3253         (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
3254
3255         * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
3256         as errno.h and sys/stat.h.
3257         (lose): New function, prints error with
3258         newline and exits.
3259         (lose_gerror): Similar, but takes GError for message.
3260         (main): Add --output argument to specify output file to write to,
3261         instead of always printing to stdout.  In this mode, determine
3262         timestamps on source files to see whether any are newer than the
3263         target file.  If not, exit.  Also convert a number of error
3264         messages to use lose (since it's shorter), and switch to using
3265         g_io_channel_shutdown.
3266
3267 2005-02-19  Havoc Pennington  <hp@redhat.com>
3268
3269         * glib/dbus-gobject.c
3270         (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
3271
3272         * glib/dbus-glib.c: fix doxygen warnings
3273
3274         * glib/dbus-gparser.c (parse_annotation): error if an annotation
3275         is found on an <arg>
3276
3277 2005-02-17  Colin Walters  <walters@verbum.org>
3278
3279         * glib/dbus-gobject.h: Don't export
3280         _dbus_glib_marshal_dbus_message_to_gvalue_array.
3281         
3282         * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
3283         (invoke_object_method): Handle it.
3284
3285         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
3286         Handle rename.
3287         
3288 2005-02-17  Colin Walters  <walters@verbum.org>
3289
3290         * bus/.cvsignore, doc/.cvsignore
3291         * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
3292         Update.
3293
3294 2005-02-17  Colin Walters  <walters@verbum.org>
3295         
3296         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
3297         Rename to DBUS_SERVICE_DBUS.
3298         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
3299         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
3300         Change the value from "org.freedesktop.Local"
3301         to "org.freedesktop.DBus.Local".
3302         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
3303         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
3304         DBUS_INTERFACE_INTROSPECTABLE.
3305         Change the value from "org.freedesktop.Introspectable"
3306         to "org.freedesktop.DBus.Introspectable".
3307         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
3308         DBUS_INTERFACE_PROPERTIES.
3309         Change the value from "org.freedesktop.Properties"
3310         to "org.freedesktop.DBus.Properties".
3311         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
3312         DBUS_INTERFACE_PEER.
3313         Change the value from "org.freedesktop.Peer"
3314         to "org.freedesktop.DBus.Peer".
3315         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
3316         DBUS_INTERFACE_LOCAL.
3317         Change the value from "org.freedesktop.Local"
3318         to "org.freedesktop.DBus.Local".
3319
3320         All other users of those constants have been changed.
3321
3322         * bus/driver.c (bus_driver_handle_introspect): Use constants.
3323
3324         * glib/dbus-gobject.c (handle_introspect): Use constants.
3325
3326         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
3327
3328 2005-02-17  Colin Walters  <walters@verbum.org>
3329
3330         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
3331         (parse_node, parse_interface, parse_method, parse_signal)
3332         (parse_property, parse_annotation): Lose if we're currently in an
3333         annotation.
3334         (parse_annotation): New function.
3335         (parser_start_element, parser_end_element): Handle annotation.
3336         (parse_method, parse_interface): Remove support for c_name attribute,
3337         switch to annotations.
3338
3339         * glib/dbus-gidl.h (interface_info_get_binding_names)
3340         (method_info_get_binding_names)
3341         (interface_info_get_binding_name, method_info_get_binding_name)
3342         (interface_info_set_binding_name, method_info_set_binding_name):
3343         Remove.
3344         (interface_info_get_annotations, method_info_get_annotations)
3345         (interface_info_get_annotation, method_info_get_annotation)
3346         (interface_info_add_annotation, method_info_add_annotation):
3347         Prototype.
3348
3349         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
3350         for "bindings".
3351         (struct MethodInfo): Ditto.
3352         Straightfoward conversion of binding methods into annotation methods
3353         as prototyped.
3354
3355         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
3356
3357         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
3358
3359         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
3360         Use new annotation API.
3361
3362         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
3363         annotation element.
3364         
3365         * doc/dbus-specification.xml: Discuss introspection annotations,
3366         include list of well-known annotations.
3367
3368         * test/glib/test-service-glib.xml: Make validate against new DTD.
3369
3370 2005-02-17  Colin Walters  <walters@verbum.org>
3371
3372         This patch is based on initial work from
3373         Paul Kuliniewicz <kuliniew@purdue.edu>.
3374
3375         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
3376         initialization of GValue from dbus type to here.
3377         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
3378         for the "glib-genmarshal" program from a DBus type.
3379         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
3380         into the C name for it we use in the glib bindings.
3381         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
3382         glib C type (not GValue).
3383         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
3384
3385         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
3386         from dbus-gobject.c.
3387
3388         * glib/dbus-gutils.h: Prototype it.
3389
3390         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
3391         (marshal_dbus_message_to_g_marshaller): Use new shared function
3392         dbus_glib_marshal_dbus_message_to_gvalue_array.
3393
3394         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
3395         Will be changed once we have annotations.
3396
3397         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
3398         GStaticRWLock.  Callers updated.
3399         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
3400         (string_table_next): New function for iterating over zero-terminated
3401         string value array.
3402         (string_table_lookup): New function; retrieves specific entry in
3403         array.
3404         (get_method_data): New function; look up method data in object data chunk.
3405         (object_error_domain_prefix_from_object_info)
3406         (object_error_code_from_object_info): New functions, but not implemented yet.
3407         (method_interface_from_object_info): New function; retrieve interface name.
3408         (method_name_from_object_info): New function; retrieve method name.
3409         (method_arg_info_from_object_info): New function; retrieve argument data.
3410         (arg_iterate): New function; iterates over serialized argument data.
3411         (method_dir_signature_from_object_info): New function; returns a
3412         GString holding type signature for arguments for just one
3413         direction (input or output).
3414         (method_input_signature_from_object_info)
3415         (method_output_signature_from_object_info): New functions.
3416         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
3417         converts dbus message arguments into a GValue array.  Used for both
3418         signal handling and method invocation.
3419         (struct DBusGlibWriteIterfaceData): New utility structure.
3420         (write_interface): New function; generate introspection XML for
3421         an interface.
3422         (introspect_interfaces): New function; gathers all interface->methods,
3423         generates introspection XML for them.
3424         (handle_introspect): Invoke introspect_interfaces.
3425         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
3426         (lookup_object_and_method): New function; examines an incoming message
3427         and attempts to match it up (via interface, method name, and argument
3428         signature) with a known object and method.
3429         (gerror_domaincode_to_dbus_error_name): New function; converts a
3430         GError domain and code into a DBus error name.  Needs GError data
3431         added to object introspection to work well.
3432         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
3433         GError.
3434         (invoke_object_method): New function to invoke an object method
3435         looked up via lookup_object_and_method.  Parses the incoming
3436         message, turns it into a GValue array, then invokes the marshaller
3437         specified in the DBusGMethodInfo.  Creates a new message with
3438         either return values or error message as appropriate.
3439         (gobject_message_function): Invoke lookup_object_and_method and
3440         invoke_object_method.
3441
3442         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
3443         (enum DBusBindingOutputMode): New enum for binding output modes.
3444         (pretty_print): Print binding names.
3445         (dbus_binding_tool_error_quark): GError bits.
3446         (version): Fix typo.
3447         (main): Create GIOChannel for output.  Parse new --mode argument,
3448         possible values are "pretty-print", "glib-server", "glib-client".
3449         Use mode to invoke appropriate function.
3450         
3451         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
3452
3453         * glib/dbus-glib-tool.h: New header, just includes GError bits
3454         for now.
3455
3456         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
3457         maps binding style to name.
3458         (struct MethodInfo): Ditto.
3459         (get_hash_keys, get_hash_key): Utility function, returns keys for
3460         a GHashTable.
3461         (interface_info_new, method_info_new): Initialize bindings.
3462         (interface_info_unref, method_info_unref): Destroy bindings.
3463         (method_info_get_binding_names, method_info_get_binding_name)
3464         (interface_info_get_binding_names, interface_info_get_binding_name):
3465         Functions for retrieving binding names.
3466         (method_info_set_binding_name, interface_info_set_binding_name):
3467         Functions for setting binding names.
3468
3469         * glib/dbus-binding-tool-glib.h: New file, has prototypes
3470         for glib binding generation.
3471
3472         * glib/dbus-binding-tool-glib.c: New file, implements server-side
3473         and client-side glib glue generation.
3474
3475         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
3476         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
3477         dbus-glib-tool.h.
3478
3479         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
3480         of using GClosureMarshal directly.
3481         (struct DBusGObjectInfo): Add n_infos member.
3482
3483         * test/glib/test-service-glib.xml: New file; contains introspection data
3484         for MyTestObject used in test-service-glib.c.
3485
3486         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
3487         (my_object_do_nothing, my_object_increment, my_object_throw_error)
3488         (my_object_uppercase, my_object_many_args): New test methods.
3489         (main): Use dbus_g_object_class_install_info to include generated object
3490         info.
3491
3492         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
3493         as well as client-side bindings.
3494
3495         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
3496         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
3497         using both the dbus_gproxy stuff directly as well as the generated bindings.
3498
3499 2005-02-15  Havoc Pennington  <hp@redhat.com>
3500
3501         * dbus/dbus-connection.c (dbus_connection_dispatch): always
3502         complete a pending call, don't run filters first.
3503
3504         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
3505         dbus_pending_call_steal_reply
3506
3507         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
3508         _dbus_connection_block_pending_call
3509         (dbus_pending_call_get_reply): change to steal_reply and return a
3510         ref
3511
3512         * dbus/dbus-connection.c
3513         (dbus_connection_send_with_reply_and_block): port to work in terms
3514         of DBusPendingCall
3515         (_dbus_connection_block_pending_call): replace block_for_reply
3516         with this
3517
3518 2005-02-14  Havoc Pennington  <hp@redhat.com>
3519
3520         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
3521         properly handle looking up group information by name; fix 
3522         from j@bootlab.org
3523
3524 2005-02-13  Havoc Pennington  <hp@redhat.com>
3525
3526         * dbus/dbus-connection.c (dbus_connection_return_message) 
3527         (dbus_connection_borrow_message): hold dispatch lock while message
3528         is outstanding
3529         (_dbus_connection_block_for_reply): hold dispatch lock while we
3530         block for the reply, so nobody steals our reply
3531         (dbus_connection_pop_message): hold the dispatch lock while we
3532         pluck the message
3533
3534 2005-02-13  Havoc Pennington  <hp@redhat.com>
3535
3536         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
3537         (_dbus_connection_release_dispatch)
3538         (_dbus_connection_acquire_io_path)
3539         (_dbus_connection_release_io_path): make the mutex and condvar
3540         control access to the "acquired" flag. Drop the connection lock
3541         while waiting on the condvar. Hopefully these are baby steps in
3542         roughly the right direction.
3543
3544 2005-02-13  Havoc Pennington  <hp@redhat.com>
3545
3546         * dbus/dbus-connection.c: use separate mutexes for the condition
3547         variables; this is some kind of baseline for sanity, but the
3548         condition variables still aren't used correctly afaict
3549
3550 2005-02-13  Havoc Pennington  <hp@redhat.com>
3551
3552         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3553         fix a double-unlock
3554
3555         * dbus/dbus-connection.c
3556         (_dbus_connection_detach_pending_call_unlocked): add this
3557
3558         Initial semi-correct pass through to fix thread locking; there are
3559         still some issues with the condition variable paths I'm pretty
3560         sure
3561         
3562         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
3563         lock/unlock calls
3564
3565         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
3566         rename to add _unlocked
3567         (struct DBusConnection): move "dispatch_acquired" and
3568         "io_path_acquired" to use only one bit each.
3569         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
3570         (dbus_connection_set_watch_functions): hacky fix to reentrancy
3571         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
3572         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
3573         (_dbus_connection_remove_timeout) 
3574         (_dbus_connection_toggle_timeout): drop lock when calling out to
3575         user functions; done in a hacky/bad way.
3576         (_dbus_connection_send_and_unlock): add a missing unlock
3577         (_dbus_connection_block_for_reply): add a missing unlock
3578
3579         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
3580         drop lock in a hacky probably unsafe way to call out to user
3581         function
3582
3583 2005-02-12  Havoc Pennington  <hp@redhat.com>
3584
3585         * tools/dbus-tree-view.c (info_set_func_text): display more
3586         details on args
3587
3588         * bus/driver.c (bus_driver_handle_list_services): list the bus
3589         driver
3590
3591         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
3592
3593         * glib/dbus-gidl.c (signal_info_get_n_args): new function
3594         (method_info_get_n_args): new function
3595
3596 2005-02-12  Havoc Pennington  <hp@redhat.com>
3597
3598         * bus/driver.c (bus_driver_handle_introspect): add introspection
3599         for bus driver
3600
3601 2005-02-12  Havoc Pennington  <hp@redhat.com>
3602
3603         * bus/driver.c: put the signature of each bus driver method in the
3604         table of handlers and check it on incoming calls; this isn't
3605         really useful, but going to add introspect support in a minute.
3606
3607 2005-02-11  Joe Shaw  <joeshaw@novell.com>
3608
3609         * mono/Connection.cs: The unpredictability of finalizers in mono
3610         prevents us from deterministically disconnecting the filters from
3611         the Service class's finalizer, so move tracking of filters and
3612         matches here.  Add API for that.
3613
3614         * mono/Service.cs: Remove the code, add code which calls the
3615         methods now on the Connection class.
3616
3617 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
3618
3619         * python/dbus.py (class Sender): added to support dbus signals better
3620         (Bus::add_signal_receiver): added expand_args parameter which defaults
3621         to True.  When expand args is True the signal handler will pass the 
3622         message arguments as parameters to the signal handler.  If False
3623         revert to previous behavior where the signal handler must get the
3624         argument list from the message.  This is to help port applications
3625         like HAL that have a tendancy to send variable length argument lists.
3626         self._match_rule_to_receivers is now a dict of dicts.
3627         (Bus::remove_signal_receiver): pop handler off the dict intead of 
3628         removing it from a list
3629         (Bus::_signal_func): change signal handlers so that interface,
3630         signal_name, service, path and message are packed into a Sender
3631         object and that is passed to the handler.  If expand_args is True
3632         extract the args list from the message and append it to the parameter
3633         list
3634         
3635         * python/dbus_bindings.pyx.in (class Signature): added to support 
3636         signiature types
3637         (MessageIter::__init__): changed iteration limit to match D-BUS
3638         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
3639         STRUCT and VARIENT type support
3640         (MessageIter::python_value_to_dbus_sig): made recursive to support
3641         recursive types
3642         (MessageIter::append*): added Signature, dict, tuple 
3643         support
3644
3645         * python/examples/example-client.py: added examples of getting tuples
3646         and dicts
3647
3648         * python/examples/example-service.py: added examples of sending tuples
3649         and dicts
3650
3651         * python/examples/example-signal-recipient.py: Fixed to handle new
3652         signal callback format
3653
3654 2005-02-10  Havoc Pennington  <hp@redhat.com>
3655
3656         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
3657         (call dbus_g_proxy_add_signal)
3658
3659         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3660         escape the hostname
3661         (_dbus_server_new_for_domain_socket): escape the path
3662
3663         * dbus/dbus-address.c (dbus_address_escape_value): new
3664         (dbus_address_unescape_value): new
3665         (dbus_parse_address): unescape values
3666
3667         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
3668
3669         * doc/dbus-specification.xml: explain how to escape values in
3670         addresses
3671
3672 2005-02-10  Havoc Pennington  <hp@redhat.com>
3673
3674         * dbus/dbus-message-factory.c (generate_special): modify test to
3675         avoid using a non-basic dict key
3676
3677         * dbus/dbus-marshal-validate-util.c: add test for the below
3678
3679         * doc/dbus-specification.xml: require that dict keys are a basic
3680         type
3681
3682         * dbus/dbus-marshal-validate.c
3683         (_dbus_validate_signature_with_reason): require that dict key is a
3684         basic type
3685
3686 2005-02-10  Havoc Pennington  <hp@redhat.com>
3687
3688         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3689         change to be _and_unlock instead of _unlocked
3690
3691         * dbus/dbus-connection.c
3692         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
3693         have no_update so we can find this bug quickly in future
3694
3695 2005-02-10  Havoc Pennington  <hp@redhat.com>
3696
3697         * dbus/dbus-message-util.c (verify_test_message): tests for string
3698         array
3699
3700         * dbus/dbus-message.c (dbus_message_append_args_valist): add
3701         support for arrays of string/signature/path
3702
3703 2005-02-10  Joe Shaw  <joeshaw@novell.com>
3704
3705         * dbus/dbus-connection.c
3706         (_dbus_connection_queue_received_message_link,
3707         _dbus_connection_message_sent): Add the path to
3708         the verbose output.
3709         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
3710         _dbus_connection_send_preallocated_unlocked(), updated the
3711         dispatch status, and unlocks.  Fixes a bug where certain
3712         situations (like a broken pipe) could cause a Disconnect message
3713         to not be sent, tricking the bus into thinking a service was still
3714         there when the process had quit.
3715         (_dbus_connection_send_preallocated): Call
3716         _dbus_connection_send_preallocated_and_unlock().
3717         (_dbus_connection_send_and_unlock): Added.  Calls
3718         _dbus_connection_send_preallocated_and_unlock().
3719         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
3720         (dbus_connection_send_with_reply): Update the dispatch status and
3721         unlock.
3722
3723         * mono/Service.cs (~Service): Added.  Removes the filter so that
3724         we don't get unmanaged code calling back into a GCed delegate.
3725         (RemoveFilter); Added.
3726
3727 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
3728
3729         * dbus/dbus-message.c (dbus_message_iter_open_container):
3730         - Removed check for iterator type being an array because
3731         get_arg_type does not work with writer iterators
3732         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
3733
3734 2005-02-07  Havoc Pennington  <hp@redhat.com>
3735
3736         * doc/dbus-specification.xml: some more language cleanups; add
3737         stuff about how to deal with invalid protocol and extension
3738         points; add _ to allowed chars in auth commands; add EXTENSION_
3739         auth command prefix
3740
3741 2005-02-06  Havoc Pennington  <hp@redhat.com>
3742
3743         * s/expected/required/ in a couple places for clarity
3744
3745 2005-02-07  Colin Walters  <walters@verbum.org>
3746
3747         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
3748         sender or proposed_recipient.
3749
3750 2005-02-06  Havoc Pennington  <hp@redhat.com>
3751
3752         * dbus/dbus-message-factory.c (generate_special): more tests
3753
3754         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
3755         array length that exceeds the maximum
3756
3757 2005-02-05  Havoc Pennington  <hp@redhat.com>
3758
3759         * dbus/dbus-message-factory.c (generate_special): more test cases,
3760         increasing coverage
3761
3762         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
3763         reason why a signature was invalid
3764
3765         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
3766         skip the length of the string before we look at it in validation
3767
3768         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
3769         equal_substring
3770
3771         * dbus/dbus-message.c (_dbus_message_loader_new): default
3772         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
3773
3774 2005-02-05  Havoc Pennington  <hp@redhat.com>
3775
3776         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
3777         if the signature of a variant was empty
3778         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
3779         struct with no element type)
3780
3781         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
3782         mangled messages to break things
3783
3784 2005-02-04  Havoc Pennington  <hp@redhat.com>
3785
3786         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
3787         g_quark_try_string() so it actually can return 0
3788         (dbus_g_proxy_connect_signal): ditto
3789
3790 2005-02-04  Havoc Pennington  <hp@redhat.com>
3791
3792         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
3793         bogus warning
3794         (tristring_from_message): assert cleanly on null path/interface
3795         (should not be possible though I decided later)
3796         (dbus_g_proxy_dispose): move proxy manager unregistration here
3797         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
3798         g_return_if_fail() checks
3799
3800 2005-02-04  Havoc Pennington  <hp@redhat.com>
3801
3802         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
3803
3804         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
3805         (with some minor changes)
3806
3807         * doc/dbus-specification.xml: add deprecated attribute to
3808         introspection format
3809
3810 2005-01-31  Havoc Pennington  <hp@redhat.com>
3811
3812         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
3813         think it's sort of right
3814
3815 2005-01-30  Havoc Pennington  <hp@redhat.com>
3816
3817         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
3818
3819 2005-01-30  Havoc Pennington  <hp@redhat.com>
3820
3821         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
3822
3823         * autogen.sh: change to autotools 1.9
3824
3825         * glib/dbus-gproxy.c: completely change how signals work
3826         (dbus_g_proxy_add_signal): new function to specify signature of a
3827         signal
3828         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
3829         and g_warning if the incoming message has the wrong signature.
3830
3831 2005-01-30  Havoc Pennington  <hp@redhat.com>
3832
3833         * tools/dbus-names-model.c (have_names_notify): fix this
3834
3835         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
3836         up the string array handling a bit 
3837
3838 2005-01-30  Havoc Pennington  <hp@redhat.com>
3839
3840         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
3841         (dbus_g_pending_call_cancel): new function
3842
3843         * dbus/dbus-glib.h: move GType decls for connection/message here;
3844         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
3845         here, just kind of rationalizing how we handle all that
3846
3847         * tools/dbus-names-model.c: new file for a tree model listing the
3848         services on a bus
3849
3850         * tools/dbus-tree-view.c (model_new): use proper typing on the
3851         model rows
3852
3853 2005-01-30  Havoc Pennington  <hp@redhat.com>
3854
3855         * glib/dbus-gmain.c: add a custom GSource back that just checks
3856         whether the message queue has anything in it; otherwise, there are 
3857         cases where we won't see messages in the queue since there was no 
3858         IO visible to the glib main loop
3859
3860         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
3861         increase default message timeout to 25 seconds
3862
3863 2005-01-30  Havoc Pennington  <hp@redhat.com>
3864
3865         * test/glib/test-profile.c (no_bus_stop_server): remove the
3866         warning about the g_warning that I just fixed
3867
3868         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
3869         custom source, seems to be a lot easier to understand and work
3870         better.
3871
3872 2005-01-30  Havoc Pennington  <hp@redhat.com>
3873
3874         I think this main loop thing is conceptually broken, but here are 
3875         some band aids. I'll maybe rewrite it in a minute.
3876         
3877         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
3878         custom GSource, so don't pass it in; confusing
3879         (gsource_server_finalize, gsource_connection_finalize): add
3880         finalize handlers that remove all the watches.  
3881
3882 2005-01-30  Havoc Pennington  <hp@redhat.com>
3883
3884         * glib/dbus-gobject.c (introspect_properties): fix the XML
3885         generated
3886
3887         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
3888         which effectively detects the use of freed messages
3889
3890         * glib/dbus-gobject.c (handle_introspect): modify and return the
3891         reply message instead of the incoming message
3892
3893         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
3894         gee, maybe it should SEND THE XML instead of just making a string
3895         and freeing it again ;-)
3896
3897         * tools/dbus-print-message.c (print_message): improve printing of
3898         messages
3899
3900         * configure.in: add debug-glib.service to the output
3901
3902 2005-01-30  Havoc Pennington  <hp@redhat.com>
3903
3904         dbus-viewer introspected and displayed the bus driver
3905         
3906         * dbus/dbus-object-tree.c 
3907         (object_tree_test_iteration): add tests for a handler registered on "/"
3908
3909         * dbus/dbus-object-tree.c
3910         (_dbus_decompose_path): fix to handle path "/" properly
3911         (run_decompose_tests): add tests for path decomposition
3912         
3913         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
3914         properly
3915
3916         * glib/dbus-gobject.c (handle_introspect): fix quotes
3917
3918         * test/glib/run-test.sh: support launching the bus, then running
3919         dbus-viewer
3920
3921         * test/glib/test-service-glib.c (main): put in a trivial gobject
3922         subclass and register it on the connection
3923
3924         * bus/driver.c (bus_driver_handle_introspect): implement
3925         introspection of the bus driver service
3926
3927         * dbus/dbus-protocol.h: add #defines for the XML namespace,
3928         identifiers, doctype decl
3929
3930         * bus/driver.c (bus_driver_handle_get_service_owner): handle
3931         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
3932         returning the service unchanged.
3933         (bus_driver_handle_message): remove old check for reply_serial in
3934         method calls, now the message type deals with that
3935         (bus_driver_handle_message): handle NULL interface
3936
3937         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
3938
3939         * glib/dbus-gloader-expat.c (description_load_from_string): allow
3940         -1 for len
3941
3942         * tools/dbus-viewer.c: add support for introspecting a service on
3943         a bus
3944
3945         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
3946         (dbus_g_pending_call_unref): add
3947
3948 2005-01-29  Havoc Pennington  <hp@redhat.com>
3949
3950         * tools/dbus-tree-view.c: add support for displaying properties.
3951         (run dbus-viewer with an introspect xml file as arg, then resize
3952         the window so the tree elements show up, not sure what that is)
3953
3954         * glib/dbus-gobject.c (handle_introspect): return
3955         org.freedesktop.Properties and org.freedesktop.Introspectable
3956         interfaces when we are introspected.
3957
3958         * doc/dbus-specification.xml: allow empty interface name when 
3959         Get/Set a property
3960
3961 2005-01-29  Havoc Pennington  <hp@redhat.com>
3962
3963         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
3964         though it uses glib, it could be extended for any binding in
3965         principle
3966
3967         * glib/dbus-gobject.c (gobject_message_function): change to the
3968         new way properties work
3969
3970         * dbus/dbus-protocol.h: add the new interfaces
3971
3972         * doc/dbus-specification.xml: document the introspection format,
3973         Introspectable interface, and add an org.freedesktop.Properties
3974         interface.
3975
3976         * glib/dbus-gparser.c: add support for a <property> element
3977
3978         * glib/dbus-gidl.c: add PropertyInfo
3979
3980         * glib/dbus-gobject.c (handle_introspect): put the outermost
3981         <node> outside the signal and property descriptions.
3982         (introspect_properties): export properties as <property> rather
3983         than as method calls
3984
3985 2005-01-28  Havoc Pennington  <hp@redhat.com>
3986
3987         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
3988         related to authentication protocol
3989
3990 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
3991
3992         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
3993                 - BUS_ACTIVATION -> BUS_STARTER
3994                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
3995                 - class MessageIter (__init__): Added recursion checking 
3996                 so we throw a nice error instead of just disconnecting from the
3997                 bus.
3998                 (get): Added arg_type parameter for recursion.
3999                 Removed the nil type
4000                 Added signiture type placeholder (not implemented)
4001                 Added struct type placeholder (not implemented)
4002                 Added varient type placeholder (not implemented)
4003                 Commented out dict type for now     
4004                 (get_element_type): renamed from get_array_type
4005                 (get_*): changed to use the dbus_message_iter_get_basic API
4006                 (get_*_array): removed in favor of recursive get_array method
4007                 (get_array): new recursive method which calls get to marshal
4008                 the elements of the array
4009                 (value_to_dbus_sig): New method returns the corrasponding
4010                 dbus signiture to a python value
4011                 (append): Comment out dict handling for now
4012                 Handle lists with the new recursive API
4013                 Comment out None handling for now
4014                 (append_nil): removed
4015                 (append_*): changed to use dbus_message_iter_append_basic API
4016                 (append_*_array): removed in favor of recursive append_array 
4017                 method
4018                 (__str__): Make it easier to print out recursive iterators
4019                 for debugging
4020                 - class Message (__str__): moved type inspection to the
4021                 MessageIter class' __str__ method
4022                 (get_iter): Added an append parameter wich defaults to False
4023                 If True use the new API's to create an append iterator
4024
4025         * python/dbus.py: Update to use new bindings API
4026                 - TYPE_ACTIVATION -> TYPE_STARTER
4027                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
4028                 - class ActivationBus -> class StarterBus
4029                 - class RemoteObject (__call__): get an append iterator
4030                 - (_dispatch_dbus_method_call): get an append iterator
4031                 - class Object (emit_signal): get an append iterator
4032
4033         * python/examples/: Fixed up the examples to work with the new API
4034                 
4035 2005-01-28  Joe Shaw  <joeshaw@novell.com>
4036
4037         * configure.in: Bump version up to 0.30.
4038
4039         * HACKING: Add a release item to bump the version number up after 
4040         a release.
4041
4042 2005-01-28  Havoc Pennington  <hp@redhat.com>
4043
4044         * doc/dbus-specification.xml: update to describe 16-bit types and
4045         dict entries
4046
4047         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
4048         assertion
4049
4050         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
4051         type
4052
4053         * dbus/dbus-marshal-recursive.c: implement
4054
4055 2005-01-27  Havoc Pennington  <hp@redhat.com>
4056
4057         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
4058
4059         * configure.in: find the right type for 16 and 32 bit ints as well
4060         as 64
4061
4062         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
4063         the 16-bit types so people don't have to stuff them in 32-bit or
4064         byte arrays.
4065
4066 2005-01-27  Havoc Pennington  <hp@redhat.com>
4067
4068         * dbus/dbus-message.c: byteswap the message if you init an
4069         iterator to read/write from it
4070         
4071         * dbus/dbus-marshal-byteswap.c: new file implementing 
4072         _dbus_marshal_byteswap()
4073
4074         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
4075
4076 2005-01-26  Havoc Pennington  <hp@redhat.com>
4077         
4078         * dbus/dbus-marshal-validate-util.c: break this out (and fix
4079         build, apparently - nobody noticed?)
4080         
4081 2005-01-26  Havoc Pennington  <hp@redhat.com>
4082
4083         * dbus/dbus-marshal-recursive.h: remove todo comment
4084
4085 2005-01-25  Joe Shaw  <joeshaw@novell.com>
4086
4087         * Land the mono binding changes to conform to the new APIs.
4088
4089         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
4090         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
4091
4092         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
4093         type code as a string.
4094         (InitAppending): Rename dbus_message_append_iter_init() to
4095         dbus_message_iter_init_append().
4096
4097         * mono/BusDriver.cs: Rename ServiceEventHandler to
4098         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
4099         Rename ServiceOwnerChanged to NameOwnerChanged.
4100
4101         * mono/Connection.cs: Rename BaseService to UniqueName, and the
4102         underlying C call.
4103
4104         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
4105
4106         * mono/Service.cs: Rename Exists to HasOwner, internally rename
4107         dbus_bus_acquire_service() to dbus_bus_request_name().
4108
4109         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
4110         of Type.UnderlyingSystemType to get the correct element type for
4111         the array.
4112         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
4113         dbus_message_get_{element|arg}_type() instead of
4114         dbus_message_iter_init_array_iterator().
4115         (Append): Replace dbus_message_iter_append_array() with
4116         dbus_message_iter_open_container() and
4117         dbus_message_iter_close_container().
4118
4119         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
4120         types have been removed.
4121         
4122         * mono/DBusType/*.cs: Replace calls of
4123         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
4124         but specify the type in the DllImport extern declaration.  Ditto
4125         for dbus_message_iter_append_[type]() ->
4126         dbus_message_iter_append_basic().
4127
4128         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
4129         NameOwnerChangedHandler.
4130
4131 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
4132
4133         * python/dbus_bindings.pyx.in: Rename of methods and bindings
4134                 - get_base_service -> get_unique_name
4135                 - bus_get_base_service -> bus_get_unique_name
4136                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
4137                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
4138                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
4139                 - bus_activate_service -> bus_start_service_by_name
4140                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
4141                 - bus_acquire_service -> bus_request_name
4142                 - dbus_bus_acquire_service -> dbus_bus_request_name
4143                 - bus_service_exists -> bus_name_has_owner
4144                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
4145
4146         * python/dbus.py: Rename of methods
4147                 - activate_service -> start_service_by_name
4148                 - bus_acquire_service -> bus_request_name
4149                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
4150                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
4151
4152         
4153 2005-01-24  Joe Shaw  <joeshaw@novell.com>
4154
4155         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
4156         signature for the method that can't be found.
4157
4158         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
4159         the message has any arguments, we need to call
4160         _dbus_type_reader_get_current_type(), not
4161         _dbus_type_reader_has_next().
4162
4163 2005-01-24  Havoc Pennington  <hp@redhat.com>
4164
4165         * dbus/dbus-message-factory.c: more testing of message validation
4166
4167         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
4168         header
4169
4170 2005-01-23  Havoc Pennington  <hp@redhat.com>
4171
4172         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
4173         get this all working, not many tests in the framework yet though
4174
4175 2005-01-22  Havoc Pennington  <hp@redhat.com>
4176
4177         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
4178         tutorial, based on work from David Wheeler.
4179
4180 2005-01-21  Havoc Pennington  <hp@redhat.com>
4181
4182         * dbus/dbus-bus.c: add more return_if_fail checks
4183
4184         * dbus/dbus-message.c (load_message): have the "no validation"
4185         mode (have to edit the code to toggle the mode for now though)
4186
4187         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
4188         skips all validation; I want to use this at least for benchmark
4189         baseline, I'm not sure if it should be a publicly-available switch.
4190
4191 2005-01-21  Havoc Pennington  <hp@redhat.com>
4192
4193         * glib/dbus-gmain.c: don't put the GLib bindings in the same
4194         toplevel doxygen group as the low-level API stuff
4195
4196         * dbus/dbus.h: note that libdbus is the low-level API
4197
4198 2005-01-20  Havoc Pennington  <hp@redhat.com>
4199
4200         * update-dbus-docs.sh: script to update docs on the web site, only
4201         works for me though. neener.
4202
4203 2005-01-20  Havoc Pennington  <hp@redhat.com>
4204
4205         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
4206         code can reveal bugs in it
4207
4208 2005-01-20  Havoc Pennington  <hp@redhat.com>
4209
4210         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
4211         select() version, patches from Tor Lillqvist
4212
4213 2005-01-20  Havoc Pennington  <hp@redhat.com>
4214
4215         * doc/dbus-tutorial.xml: replace > with &gt;
4216
4217         * bus/services.c (bus_registry_acquire_service): validate the name
4218         and return a better error if it's no good.
4219
4220         * doc/dbus-specification.xml: note NO_AUTO_START change
4221
4222         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
4223         from AUTO_START, we're toggling the default
4224
4225         * bus/dispatch.c: adapt the tests to change of auto-start default
4226
4227 2005-01-18  Havoc Pennington  <hp@redhat.com>
4228
4229         * rename dbus-daemon-1 to dbus-daemon throughout
4230
4231 2005-01-18  Havoc Pennington  <hp@redhat.com>
4232
4233         * Throughout, grand renaming to strip out the use of "service",
4234         just say "name" instead (or "bus name" when ambiguous).  Did not
4235         change the internal code of the message bus itself, only the
4236         programmer-facing API and messages.
4237         
4238         * doc/dbus-specification.xml: further update the message bus section
4239         
4240         * bus/config-parser.c (all_are_equiv): fix bug using freed string
4241         in error case
4242
4243 2005-01-17  Havoc Pennington  <hp@redhat.com>
4244
4245         * dbus/dbus-types.h: remove 16-bit types since we don't use them
4246         ever
4247
4248         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
4249         "invalid name character" not only non-ASCII
4250
4251         * doc/dbus-specification.xml: further update spec, message bus 
4252         parts are still out-of-date but the marshaling etc. stuff is now
4253         accurate-ish
4254
4255 2005-01-17  Havoc Pennington  <hp@redhat.com>
4256
4257         * doc/dbus-specification.xml: partially update spec
4258
4259 2005-01-17  Havoc Pennington  <hp@redhat.com>
4260
4261         * Throughout, align variant bodies according to the contained
4262         type, rather than always to 8. Should save a fair bit of space in
4263         message headers.
4264         
4265         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
4266         fix handling of case where p == end
4267
4268         * doc/TODO: remove the dbus_bool_t item and variant alignment items
4269
4270 2005-01-17  Havoc Pennington  <hp@redhat.com>
4271
4272         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
4273
4274         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
4275         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
4276         are marshaling/unmarshaling a boolean.
4277
4278 2005-01-16  Havoc Pennington  <hp@redhat.com>
4279
4280         This is about it on what can be disabled/deleted from libdbus
4281         easily, back below 150K anyhow. Deeper cuts are more work than 
4282         just turning the code off as I've done here.
4283         
4284         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
4285         signed int convenience funcs
4286
4287         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
4288         verbose mode
4289
4290         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
4291         things out of libdbus
4292
4293         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
4294         
4295         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
4296         tests-enabled-only, though it should probably be deleted)
4297
4298         * dbus/dbus-message-util.c: same stuff
4299
4300         * dbus/dbus-auth-util.c: same stuff
4301
4302 2005-01-16  Havoc Pennington  <hp@redhat.com>
4303
4304         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
4305
4306         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
4307         way for stripping down dbus-userdb.c stuff included in libdbus.
4308         Rename _dbus_parse_uid for consistency.
4309
4310 2005-01-16  Havoc Pennington  <hp@redhat.com>
4311
4312         * dbus/dbus-internals.c (_dbus_real_assert): print the function
4313         name the assertion failed in
4314
4315         * dbus/dbus-internals.h (_dbus_return_if_fail) 
4316         (_dbus_return_val_if_fail): assert that the name of the function
4317         containing the check doesn't start with '_', since we only want to 
4318         use checks on public functions
4319         
4320         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
4321         checks to assertions
4322
4323         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
4324         change checks to asserts for private function
4325
4326         * dbus/dbus-message.c (_dbus_message_set_serial): checks
4327         to asserts for private function
4328
4329         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
4330         broken assertion that was breaking make check
4331         (_dbus_type_reader_array_is_empty): remove this rather than fix
4332         it, was only used in assertions
4333
4334 2005-01-16  Havoc Pennington  <hp@redhat.com>
4335
4336         * test/unused-code-gc.py: hacky script to find code that's used
4337         only by the bus (not libdbus) or used only by tests or not used at
4338         all. It has some false alarms, but looks like we can clean up a
4339         lot of size from libdbus.
4340
4341         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
4342         dbus/Makefile.am: initially move 10K of binary size out of libdbus
4343         
4344 2005-01-16  Havoc Pennington  <hp@redhat.com>
4345
4346         * Add and fix docs according to Doxygen warnings throughout
4347         source.
4348         
4349         * dbus/dbus-marshal-recursive.c
4350         (_dbus_type_reader_array_is_empty): change this to just call
4351         array_reader_get_array_len() and make it static
4352
4353         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
4354         from get_array_type
4355         (dbus_message_iter_init_append): rename from append_iter_init
4356
4357         * dbus/dbus-marshal-recursive.c
4358         (_dbus_type_reader_get_element_type): rename from
4359         _dbus_type_reader_get_array_type
4360
4361 2005-01-15  Havoc Pennington  <hp@redhat.com>
4362
4363         * test/glib/test-profile.c (with_bus_server_filter): fix crash
4364
4365         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
4366         when DBUS_DISABLE_ASSERT
4367         (_dbus_marshal_set_basic): be sure we align for the string length
4368
4369         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
4370         this look faster
4371
4372         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
4373         inline macro version
4374         (_dbus_string_set_byte): provide inline macro version
4375
4376 2005-01-15  Havoc Pennington  <hp@redhat.com>
4377
4378         * Land the new message args API and type system.
4379
4380         This patch is huge, but the public API change is not 
4381         really large. The set of D-BUS types has changed somewhat, 
4382         and the arg "getters" are more geared toward language bindings;
4383         they don't make a copy, etc.
4384
4385         There are also some known issues. See these emails for details
4386         on this huge patch:
4387         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
4388         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
4389         
4390         * dbus/dbus-marshal-*: all the new stuff
4391
4392         * dbus/dbus-message.c: basically rewritten
4393
4394         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
4395         freed blocks to be all non-nul bytes so using freed memory is less
4396         likely to work right
4397
4398         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
4399         DBUS_FAIL_MALLOC=N environment variable, so you can do
4400         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
4401         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
4402         thorough.
4403
4404         * qt/message.cpp: port to the new message args API
4405         (operator<<): use str.utf8() rather than str.unicode()
4406         (pretty sure this is right from the Qt docs?)
4407
4408         * glib/dbus-gvalue.c: port to the new message args API
4409
4410         * bus/dispatch.c, bus/driver.c: port to the new message args API
4411
4412         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
4413         "locked" flag to TRUE and align_offset to 0; I guess we never
4414         looked at these anyhow, but seems cleaner.
4415
4416         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
4417         move allocation padding macro to this header; use it to implement
4418         (_DBUS_STRING_STATIC): ability to declare a static string.
4419
4420         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
4421         change to return TRUE if the interface is not set.
4422
4423         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
4424         to dbus-marshal-validate.[hc]
4425
4426         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
4427         dbus-internals.c
4428
4429         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
4430         to dbus-marshal-*.[hc]
4431
4432         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
4433         function here from dbus-marshal.c
4434
4435 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4436
4437         * NEWS: Update for 0.23.
4438
4439         * configure.in: Release 0.23.
4440
4441 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4442
4443         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
4444         dbus DLL with --debug.  Clean up after the .mdb files this leaves
4445         behind.
4446
4447         * mono/doc/Makefile.am: Need to uninstall the docs on "make
4448         uninstall"
4449
4450         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
4451         is an enum, get the enum's underlying type.  Another mono
4452         1.1.3 fix.
4453
4454 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4455
4456         Patch from Sjoerd Simons <sjoerd@luon.net>
4457
4458         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
4459         DESTDIR.  It breaks stuff.
4460
4461 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4462
4463         Patch from Tambet Ingo <tambet@ximian.com>
4464
4465         * mono/DBusType/Array.cs (Get): Get the underlying element type by
4466         calling type.GetElementType().  The code previously depended on
4467         broken Mono behavior, which was fixed in Mono 1.1.3.
4468
4469         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
4470         Activator.CreateInstance() so that the class's constructor is
4471         called with the right parameters.
4472
4473 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4474
4475         Patch from Timo Teräs <ext-timo.teras@nokia.com>
4476
4477         * dbus/dbus-connection.c
4478         (_dbus_connection_queue_received_message_link): Call
4479         _dbus_connection_remove_timeout() instead of the _locked()
4480         variant, since it's always called from
4481         _dbus_connection_handle_watch(), which handles the locking.
4482         Removed the _locked() variant since it's no longer used.
4483
4484 2005-01-03  Havoc Pennington  <hp@redhat.com>
4485
4486         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
4487         return
4488         
4489 2004-12-26  Havoc Pennington  <hp@redhat.com>
4490
4491         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
4492
4493 2005-01-03  Havoc Pennington  <hp@redhat.com>
4494
4495         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
4496         floating point
4497
4498         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
4499
4500 2005-01-02  Havoc Pennington  <hp@redhat.com>
4501
4502         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
4503
4504 2005-01-01  Havoc Pennington  <hp@redhat.com>
4505
4506         * configure.in: add -Wfloat-equal
4507
4508 2005-01-01  Havoc Pennington  <hp@redhat.com>
4509
4510         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
4511         for a variety of reasons '==' doesn't do this.
4512
4513 2004-12-31  Havoc Pennington  <hp@redhat.com>
4514
4515         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
4516         I keep wishing I had
4517
4518 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4519
4520         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
4521
4522 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4523
4524         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
4525         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
4526         dbus-protocol.h.  Because they are defines and not enums they are not
4527         autogenerated.
4528
4529 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
4530
4531         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
4532         dbus_bus_activate_service
4533
4534         * python/dbus.py (Bus.activate_service): activate a service on the
4535         bus.
4536
4537 2004-12-24  Havoc Pennington  <hp@redhat.com>
4538
4539         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
4540         file format has also changed and I haven't adapted to that yet
4541         
4542         * Makefile.am: load .gcno files from latest gcc
4543
4544 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
4545         * Patch from Rob Taylor <robtaylor@fastmail.fm>
4546
4547         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
4548         lowlevel binding
4549
4550         * python/dbus.py (get_unix_user): Added binding to 
4551         call dbus_bindings.bus_get_unix_user
4552
4553         * python/extract.py: Modified the proto_pat regex to
4554         handle unsigned long
4555
4556 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4557
4558         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
4559         better POSIX compliance.
4560
4561 2004-12-19  Havoc Pennington  <hp@redhat.com>
4562
4563         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
4564         (_dbus_string_insert_8_aligned): new functions
4565
4566         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
4567
4568 2004-12-18  Havoc Pennington  <hp@redhat.com>
4569
4570         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
4571         macro
4572
4573         * dbus/dbus-message.c: fix a comment, and add a still-unused
4574         not-implemented function
4575
4576         * dbus/dbus-marshal.h: fix comment
4577
4578         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
4579
4580 2004-12-17  Joe Shaw  <joeshaw@novell.com>
4581
4582         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
4583         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
4584         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
4585         Type.UnderlyingSystemType to get the actual system type
4586         underneath.  This code previously depended on the broken Mono
4587         behavior, which was fixed in 1.1.3.
4588
4589 2004-11-27  Havoc Pennington  <hp@redhat.com>
4590
4591         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
4592         are disabled
4593         (_dbus_string_get_const_data): inline when asserts are disabled
4594
4595         * dbus/dbus-message.c: record the _dbus_current_generation of
4596         creation so we can complain if dbus_shutdown() is used improperly.
4597         Do this only if checks are enabled.
4598
4599         * dbus/dbus-connection.c: ditto
4600         
4601 2004-11-26  Havoc Pennington  <hp@redhat.com>
4602
4603         * test/glib/test-profile.c: add with_bus mode to profile echoes
4604         that go through the bus.
4605
4606         * test/glib/run-test.sh: add ability to run test-profile
4607
4608         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
4609         config file reload.
4610
4611 2004-11-26  Havoc Pennington  <hp@redhat.com>
4612
4613         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
4614         thing was implemented
4615
4616 2004-11-26  Havoc Pennington  <hp@redhat.com>
4617
4618         * test/glib/test-profile.c: tweak a bit, add support for some
4619         made-up minimal malloc overhead with plain sockets, since in 
4620         real life some sort of buffers are unavoidable thus we could 
4621         count them in the theoretical best case
4622
4623 2004-11-26  Havoc Pennington  <hp@redhat.com>
4624
4625         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
4626         where I was trying to cache one too many messages
4627
4628 2004-11-26  Havoc Pennington  <hp@redhat.com>
4629
4630         * dbus/dbus-message.c: reimplement message cache as an array which 
4631         makes the cache about twice as fast and saves maybe 1.5% overall
4632
4633 2004-11-26  Havoc Pennington  <hp@redhat.com>
4634
4635         * dbus/dbus-threads.c (init_global_locks): forgot to put the
4636         message cache lock here
4637
4638 2004-11-26  Havoc Pennington  <hp@redhat.com>
4639
4640         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
4641         the "char byte_order" next to each other to save 4 bytes
4642         (dbus_message_new_empty_header): reduce preallocation, since the
4643         message cache should achieve a similar effect
4644         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
4645         message cache that keeps a few DBusMessage around in a pool,
4646         another 8% speedup or so.
4647
4648         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
4649
4650 2004-11-25  Havoc Pennington  <hp@redhat.com>
4651
4652         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
4653         to write, without reading or blocking, try it before the poll()
4654         and skip the poll() if nothing remains to write. This is about a
4655         3% speedup in the echo client/server
4656
4657 2004-11-25  Havoc Pennington  <hp@redhat.com>
4658
4659         The primary change here is to always write() once before adding
4660         the write watch, which gives us about a 10% performance increase.
4661         
4662         * dbus/dbus-transport-unix.c: a number of modifications to cope
4663         with removing messages_pending
4664         (check_write_watch): properly handle
4665         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
4666         messages_pending stuff
4667         (check_read_watch): properly handle WAITING_FOR_MEMORY and
4668         AUTHENTICATED cases
4669         (unix_handle_watch): after writing, see if the write watch can be
4670         removed
4671         (unix_do_iteration): assert that write_watch/read_watch are
4672         non-NULL rather than testing that they aren't, since they 
4673         aren't allowed to be NULL. check_write_watch() at the end so 
4674         we add the watch if we did not finish writing (e.g. got EAGAIN)
4675
4676         * dbus/dbus-transport-protected.h: remove messages_pending call,
4677         since it resulted in too much inefficient watch adding/removing; 
4678         instead we now require that the transport user does an iteration 
4679         after queueing outgoing messages, and after trying the first
4680         write() we add a write watch if we got EAGAIN or exceeded our 
4681         max bytes to write per iteration setting
4682
4683         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
4684         function
4685
4686         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
4687         freed and then accessed, valgrind flagged this bug, fix it
4688
4689         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
4690         as the last valid field plus 1, where really it is equal to the
4691         last valid field. Corrects some message corruption issues.
4692
4693         * dbus/dbus-mainloop.c: verbosity changes
4694
4695         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
4696         instead of aborting in one of the test codepaths
4697
4698         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
4699         caused not printing the pid ever again if a verbose was missing
4700         the newline at the end
4701         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
4702
4703         * dbus/dbus-connection.c: verbosity changes; 
4704         (dbus_connection_has_messages_to_send): new function
4705         (_dbus_connection_message_sent): no longer call transport->messages_pending
4706         (_dbus_connection_send_preallocated_unlocked): do one iteration to
4707         try to write() immediately, so we can avoid the write watch. This
4708         is the core purpose of this patchset
4709         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
4710         dump the outgoing message queue, so nobody will get confused
4711         trying to send them or thinking stuff is pending to be sent
4712
4713         * bus/test.c: verbosity changes
4714
4715         * bus/driver.c: verbosity/assertion changes
4716
4717         * bus/dispatch.c: a bunch of little tweaks to get it working again
4718         because this patchset changes when/where you need to block.
4719
4720 2004-11-23  Havoc Pennington  <hp@redhat.com>
4721
4722         * test/glib/test-profile.c: modify to accept a plain_sockets
4723         argument in which case it will bench plain sockets instead of
4724         libdbus, for comparison purposes.
4725
4726 2004-11-22  Havoc Pennington  <hp@redhat.com>
4727
4728         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
4729         threads for more time, so sysprof can get a grip on it.
4730
4731         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
4732         pointless variable
4733
4734 2004-11-13  Havoc Pennington  <hp@redhat.com>
4735
4736         * test/glib/test-profile.c: fix this thing up a bit
4737
4738         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
4739         preallocation sizes by a fair bit; not sure if this will be an
4740         overall performance win or not, but it does reduce reallocs.
4741
4742         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
4743         the test hack that forced constant realloc if asserts are
4744         disabled, so we can profile sanely. Sprinkle in some
4745         _DBUS_UNLIKELY() which are probably pointless, but before I
4746         noticed the real performance problem I put them in.
4747         (_dbus_string_validate_utf8): micro-optimize this thing a little
4748         bit, though callgrind says it didn't help; then special-case
4749         ascii, which did help a lot; then be sure we detect nul bytes as
4750         invalid, which is a bugfix.
4751         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
4752         superstition; use memset to nul the padding instead of a manual
4753         loop.
4754         (_dbus_string_get_length): inline this as a
4755         macro; it showed up in the profile because it's used for loop
4756         tests and so forth
4757
4758 2004-11-10  Colin Walters  <walters@verbum.org>
4759
4760         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
4761         for extra paranoia.
4762
4763 2004-11-09  Colin Walters  <walters@verbum.org>
4764
4765         * dbus/dbus-string.c (_dbus_string_get_length): New
4766         function, writes DBusString to C buffer.
4767
4768         * dbus/dbus-string.h: Prototype it.
4769
4770         * dbus/dbus-message.c (dbus_message_type_to_string): New
4771         function, converts message type into C string.
4772
4773         * dbus/dbus-message.h: Prototype it.
4774
4775         * bus/selinux.c (bus_selinux_check): Take source pid,
4776         target pid, and audit data.  Pass audit data to
4777         avc_has_perm.
4778         (log_audit_callback): New function, appends extra
4779         audit information.
4780         (bus_selinux_allows_acquire_service): Also take
4781         service name, add it to audit data.
4782         (bus_selinux_allows_send): Also take message
4783         type, interface, method member, error name,
4784         and destination, and add them to audit data.
4785         (log_cb): Initialize func_audit.
4786         
4787         * bus/selinux.h (bus_selinux_allows_acquire_service)
4788         (bus_selinux_allows_send): Update prototypes 
4789
4790         * bus/services.c (bus_registry_acquire_service): Pass
4791         service name to bus_selinux_allows_acquire_service.
4792
4793         * bus/bus.c (bus_context_check_security_policy): Pass
4794         additional audit data.  Move assignment of dest
4795         to its own line.
4796
4797 2004-11-07  Colin Walters  <walters@verbum.org>
4798
4799         * dbus/dbus-transport-unix.c (do_authentication): Always
4800         initialize auth_completed.
4801         
4802 2004-11-07  Colin Walters  <walters@verbum.org>
4803
4804         * bus/bus.c (load_config): Break into three
4805         separate functions: process_config_first_time_only,
4806         process_config_every_time, and process_config_postinit.
4807         (process_config_every_time): Move call of
4808         bus_registry_set_service_context_table into
4809         process_config_postinit.
4810         (process_config_postinit): New function, does
4811         any processing that needs to happen late
4812         in initialization (and also on reload).
4813         (bus_context_new): Instead of calling load_config,
4814         open config parser here and call process_config_first_time_only
4815         and process_config_every_time directly.  Later, after
4816         we have forked but before changing UID,
4817         invoke bus_selinux_full_init, and then call
4818         process_config_postinit.
4819         (bus_context_reload_config): As in bus_context_new,
4820         load parse file inside here, and call process_config_every_time
4821         and process_config_postinit.
4822
4823         * bus/services.h, bus/services.c
4824         (bus_registry_set_service_context_table): Rename
4825         from bus_registry_set_sid_table.  Take string hash from config
4826         parser, and convert them here into SIDs.
4827
4828         * bus/config-parser.c (struct BusConfigParser): Have
4829         config parser only store a mapping of service->context
4830         string.
4831         (merge_service_context_hash): New function.
4832         (merge_included): Merge context string hashes instead
4833         of using bus_selinux_id_table_union.
4834         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
4835         simply create a new string hash.
4836         (bus_config_parser_unref): Unref it.
4837         (start_selinux_child): Simply insert strings into hash,
4838         don't call bus_selinux_id_table_copy_over.
4839
4840         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
4841         (bus_selinux_id_table_copy_over): Delete.
4842
4843 2004-11-03  Colin Walters  <walters@verbum.org>
4844
4845         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
4846         variables.
4847         
4848 2004-11-03  Colin Walters  <walters@verbum.org>
4849
4850         * bus/test-main.c (test_pre_hook): Fix test logic,
4851         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
4852
4853 2004-11-02  Colin Walters  <walters@redhat.com>
4854
4855         * bus/selinux.c (bus_selinux_init): Split into two functions,
4856         bus_selinux_pre_init and bus_selinux_post_init.
4857         (bus_selinux_pre_init): Just determine whether SELinux is
4858         enabled.
4859         (bus_selinux_post_init): Do everything else.
4860
4861         * bus/main.c (main): Call bus_selinux_pre_init before parsing
4862         config file, and bus_selinux_post_init after.  This ensures that
4863         we don't lose the policyreload notification thread that
4864         bus_selinux_init created before forking previously.
4865         
4866         * bus/test-main.c (test_pre_hook): Update for split.
4867
4868 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
4869
4870         Patch from Johan Fischer <linux@fischaz.com>
4871         
4872         * mono/doc/Makefile.am (install-data-local): Added directory
4873         install for DESTDIR
4874
4875 2004-10-29  Colin Walters  <walters@redhat.com>
4876
4877         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
4878         parameter for fd to write pid to.       
4879
4880         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
4881         
4882         * bus/bus.c (bus_context_new): Pass print_pid_fd
4883         to _dbus_become_daemon (bug #1720)
4884
4885 2004-10-29  Colin Walters  <walters@redhat.com>
4886
4887         Patch from Ed Catmur <ed@catmur.co.uk>
4888
4889         * mono/doc/Makefile.am (install-data-local): Handle
4890         DESTDIR.
4891
4892 2004-10-29  Colin Walters  <walters@redhat.com>
4893
4894         * bus/.cvsignore, qt/.cvsignore: Update.
4895
4896 2004-10-29  Colin Walters  <walters@redhat.com>
4897
4898         Patch from Kristof Vansant <de_lupus@pandora.be>
4899
4900         * configure.in: Detect Slackware.
4901         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
4902         * bus/rc.messagebus.in: New file.
4903
4904 2004-10-29  Colin Walters  <walters@redhat.com>
4905
4906         * tools/dbus-monitor.c (filter_func): Return
4907         DBUS_HANDLER_RESULT_HANDLED in filter function
4908         for now.  See:
4909         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
4910
4911 2004-10-29  Colin Walters  <walters@redhat.com>
4912
4913         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
4914
4915         * bus/services.c (bus_registry_acquire_service): 
4916         Correctly retrieve service name from DBusString
4917         for printing.
4918
4919 2004-10-29  Colin Walters  <walters@redhat.com>
4920
4921         * dbus/dbus-glib.h: Update documentation to not
4922         refer to internal APIs.
4923
4924 2004-10-27  Joe Shaw  <joeshaw@novell.com>
4925
4926         * mono/Arguments.cs (GetDBusTypeConstructor):
4927         type.UnderlyingSystemType will return "System.Byte" if you do it
4928         on "byte[]", which is not what we want.  So check the type.IsArray
4929         property and use System.Array instead.
4930
4931 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
4932
4933         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
4934         the DBusUserInfo structure since this is passed into the function.
4935         This would cause a double free when the function that allocated
4936         the structure would try to free it when an error occured.
4937
4938         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
4939         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
4940         for service activation to avoid 32bit/64bit parallel install issues
4941
4942 2004-10-21  Colin Walters  <walters@verbum.org>
4943
4944         * AUTHORS: Fix my email address, the @gnu.org one
4945         has been bouncing for some time.  Also add J5.
4946         
4947 2004-10-21  Colin Walters  <walters@verbum.org>
4948
4949         * dbus/dbus-transport-unix.c (do_authentication): Return
4950         authentication status to callers.
4951         (unix_handle_watch): If we completed authentication this round,
4952         don't do another read.  Instead wait until the next iteration,
4953         after we've read any pending data in the auth buffer.
4954         (unix_do_iteration): Ditto.
4955         (unix_handle_watch): Updated for new do_authentication prototype.
4956
4957 2004-10-18  Colin Walters  <walters@verbum.org>
4958
4959         * bus/selinux.c (bus_selinux_enabled): Handle
4960         --disable-selinux case.
4961         
4962 2004-10-18  Colin Walters  <walters@verbum.org>
4963
4964         * bus/selinux.h: Add bus_selinux_enabled.
4965         
4966         * bus/selinux.c (bus_selinux_enabled): Implement it.
4967         
4968         * bus/config-parser.c (struct include): Add
4969         if_selinux_enabled member.
4970         (start_busconfig_child): Parse if_selinux_enabled
4971         attribute for include.
4972         (bus_config_parser_content): Handle it.
4973
4974         * bus/session.conf.in, bus/system.conf.in: Add
4975         inclusion of context mapping to default config files;
4976         conditional on SELinux being enabled.
4977         
4978         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
4979         
4980         * test/data/invalid-config-files/badselinux-1.conf, 
4981         test/data/invalid-config-files/badselinux-2.conf:
4982         Test files for bad syntax.
4983         
4984 2004-10-17  Colin Walters  <walters@verbum.org>
4985
4986         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
4987         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
4988         format specifier mismatches.
4989
4990 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4991
4992         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
4993         format string.
4994
4995         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
4996         pointer (bug #1540, Leonardo Boiko).
4997
4998 2004-09-28  Jon Trowbridge  <trow@ximian.com>
4999
5000         * mono/BusDriver.cs: Changed BusDriver struct to remove
5001         the ServiceCreated and ServiceDeleted events and replace them
5002         with the new ServiceOwnerChanged event.
5003
5004         * mono/example/BusListener.cs: Added a new example program,
5005         which listens for and reports any ServiceOwnerChanged events
5006         on the bus driver.
5007
5008         * mono/example/Makefile.am (DESTDIR): Build changes for the
5009         new BusListener.cs example.
5010
5011 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5012
5013         * bus/signals.c (bus_match_rule_parse): validate the components of
5014         match rules (bug #1439).
5015
5016         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
5017
5018 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5019
5020         * doc/dbus-specification.xml: document ServiceOwnerChanged
5021         signal.
5022         
5023         * bus/driver.c, bus/driver.h, bus/services.c: Use
5024         ServiceOwnerChanged signal instead of ServiceCreated and
5025         ServiceDeleted.
5026         
5027         * bus/dispatch.c: update testcase for the new signal.
5028
5029 2004-09-20  Jon Trowbridge  <trow@ximian.com>
5030
5031         Patch from Nat Friedman <nat@novell.com>
5032
5033         * mono/Makefile.am: A number of small build fixes to allow "make
5034         distcheck" to succeed.
5035
5036         * mono/example/Makefile.am: "make distcheck" fixes.
5037
5038         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
5039         key in @srcdir@.
5040
5041         * test/Makefile.am: "make distcheck" fixes.
5042
5043 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5044
5045         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
5046
5047         * doc/busconfig.dtd: update the DTD for the at_console attribute.
5048
5049         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
5050         messages after the first one (bug #1389).
5051         
5052         * bus/dispatch.c (check_double_hello_message): add a test case for
5053         the double hello message bug.
5054         (check_existent_service_activation): fix check of spawning error.
5055         
5056 2004-09-16  David Zeuthen  <david@fubar.dk>
5057
5058         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
5059
5060 2004-09-12  David Zeuthen  <david@fubar.dk>
5061
5062         Patch from Kay Sievers <kay.sievers@vrfy.org>
5063
5064         * bus/bus.c (bus_context_new):
5065         * bus/bus.h:
5066         * bus/main.c (usage)
5067         (main):
5068         Add commandline option --nofork to override configuration file
5069         setting.
5070
5071 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5072
5073         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
5074         compilers don't like it (bug #974).
5075
5076 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
5077
5078         * qt/connection.*: Applied patch by Jérôme Lodewyck
5079         <lodewyck@clipper.ens.fr> to integrate an existing
5080         connection into the Qt eventloop
5081
5082 2004-08-30  Jon Trowbridge  <trow@ximian.com>
5083
5084         * mono/BusDriver.cs: Added.  This is a class for interacting with
5085         the org.freedesktop.DBus service.
5086
5087         * mono/Message.cs: Added a mechanism to expose the message that is
5088         currently being dispatched via the static Message.Current
5089         property.  Added Message.Sender and Message.Destination
5090         properties.
5091
5092         * mono/Handler.cs: Expose the dispatched message via
5093         Message.Current when handling method calls.
5094
5095         * mono/Service.cs: Expose the dispatched message via
5096         Message.Current when handling signal emissions.
5097         
5098         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
5099         Connection.BaseService property.
5100
5101 2004-08-28  Havoc Pennington  <hp@redhat.com>
5102
5103         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
5104
5105         More fixes from Steve Grubb
5106         
5107         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
5108         (_dbus_listen_tcp_socket): fix fd leak
5109
5110         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
5111         EINTR to a bit lower in the code
5112
5113 2004-08-26  Jon Trowbridge  <trow@ximian.com>
5114
5115         * bus/driver.c (bus_driver_handle_service_exists): Respond with
5116         TRUE if we are inquiring about the existence of the built-in
5117         org.freedesktop.DBus service.
5118
5119 2004-08-25  John Palmieri  <johnp@redhat.com>
5120         * bus/config-parser.c:
5121         (struct PolicyType): Add POLICY_CONSOLE
5122         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
5123         (start_busconfig_child): Sets up console element when
5124         <policy at_console=""> is encountered in a policy file
5125         (append_rule_from_element): Convert console elements to console
5126         rules.
5127
5128         * bus/policy.c: 
5129         (bus_policy_create_client_policy): Add console rules to the client
5130         policy based on if the client is at the console
5131         (bus_policy_append_console_rule): New function for adding a
5132         console rule to a policy
5133         (bus_policy_merge): Handle console rule merging
5134
5135         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
5136         where we check for console user files
5137         
5138         * dbus/dbus-sysdeps.c:
5139         (_dbus_file_exists): New function which checks if the given
5140         file exists
5141         (_dbus_user_at_console): New function which does the system
5142         specific process of checking if the user is at the console
5143
5144         * dbus/dbus-userdb.c:
5145         (_dbus_is_console_user): New function converts a UID to user name
5146         and then calls the system specific _dbus_user_at_console to 
5147         see if the user is at the console and therefor a console user
5148
5149 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5150
5151         * bus/config-parser.c (set_limit):
5152         * bus/dbus-daemon-1.1.in:
5153         * test/data/valid-config-files/many-rules.conf: set the
5154         max_match_rules_per_connection limt from the config file. 
5155
5156         * doc/busconfig.dtd: update the DTD.
5157
5158         * bus/driver.c: remove some unused variables.
5159
5160 2004-08-24  Mikael Hallendal  <micke@imendio.com>
5161
5162         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
5163         it's been replaced by dbus_g_bus_get
5164
5165 2004-08-23  Colin Walters  <walters@redhat.com>
5166
5167         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5168
5169         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
5170
5171         * bus/selinux.c: Create a thread for policy reload notification.
5172         (bus_selinux_get_policy_root): Implement.
5173
5174         * bus/config-parser.c (start_busconfig_child)
5175         (bus_config_parser_content): Support SELinux-root relative
5176         inclusion.
5177
5178         * configure.in <HAVE_SELINUX>: Add -lpthread.
5179         
5180         * bus/test-main.c (test_pre_hook, test_post_hook): New.
5181         (test_post_hook): Move memory checking into here.
5182         (test_pre_hook, test_post_hook): Move SELinux checks in
5183         here, but conditional on a DBUS_TEST_SELINUX environment
5184         variable.  Unfortunately we can't run the SELinux checks
5185         as a normal user, since they won't have any permissions
5186         for /selinux.  So this will have to be tested manually
5187         for now, until we have virtualization for most of
5188         libselinux.
5189         
5190 2004-08-23  Havoc Pennington  <hp@redhat.com>
5191
5192         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
5193         drop supplementary groups, suggested by Steve Grubb
5194
5195 2004-08-20  Colin Walters  <walters@redhat.com>
5196
5197         * bus/config-parser.c (start_busconfig_child): Remove some unused
5198         variables.
5199         
5200         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
5201         warning.
5202
5203 2004-08-17  Joe Shaw  <joeshaw@novell.com>
5204
5205         * configure.in: If --enable-mono is passed in, if we can't find
5206         mono error out.
5207
5208         * mono/Makefile.am: Use /gacutil to install assemblies into the
5209         GAC and not /root.
5210
5211 2004-08-12  Havoc Pennington  <hp@redhat.com>
5212
5213         * NEWS: update for 0.22
5214
5215         * configure.in: release 0.22
5216
5217 2004-08-11  Colin Walters  <walters@redhat.com>
5218
5219         * tools/dbus-send.c (main, usage): Add --reply-timeout
5220         argument.
5221
5222 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5223
5224         * bus/bus.c (process_config_first_time_only): get rid of an unused
5225         DBusError that was causing a memoy leak (bug #989).
5226
5227         * dbus/dbus-keyring.c, dbus/dbus-message.c:
5228         fix compilation on Solaris/Forte C (bug #974)
5229
5230         * bus/main.c (main): plug two minuscule memleaks.
5231
5232 2004-08-10  Havoc Pennington  <hp@redhat.com>
5233
5234         * doc/dbus-tutorial.xml: add some more info on GLib bindings
5235
5236 2004-08-09  Havoc Pennington  <hp@redhat.com>
5237
5238         * COPYING: switch to Academic Free License version 2.1 instead of
5239         2.0, to resolve complaints about patent termination clause.
5240
5241 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
5242
5243         * README: added documentation for the --enable-python 
5244         configure switch.
5245
5246 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5247
5248         * bus/config-parser.c (bus_config_parser_new): fix an invalid
5249         _unref in the SELinux support.
5250
5251         * doc/busconfig.dtd: update DTD for SELinux support.
5252
5253         * bus/config-loader-libxml.c: fix error handler and parser
5254         initialisation/cleanup. OOM test now works with libxml2 HEAD.
5255
5256         * configure.in: remove the warning about libxml2.
5257
5258         * dbus/dbus-bus.c: silence doxygen warning.
5259
5260 2004-07-31  Colin Walters  <walters@redhat.com>
5261
5262         * configure.in: Move #error in SELinux check to its own line.
5263
5264 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5265
5266         * dbus/dbus-internals.h (_DBUS_SET_OOM):
5267         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
5268         dbus_error_set.
5269
5270         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
5271         broken by the change in the _SET_OOM macros.
5272
5273 2004-07-31  Colin Walters  <walters@redhat.com>
5274
5275         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
5276         BUS_SET_OOM.
5277
5278 2004-07-31  Colin Walters  <walters@redhat.com>
5279
5280         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
5281         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
5282         AC_MSG_CHECKING.
5283
5284 2004-07-24  Havoc Pennington  <hp@redhat.com>
5285
5286         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5287
5288         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
5289         functionality
5290
5291         * configure.in: add --enable-selinux
5292         
5293         * bus/policy.c (bus_policy_merge): add FIXME to a comment
5294
5295         * bus/main.c (main): initialize and shut down selinux
5296
5297         * bus/connection.c: store SELinux ID on each connection, to avoid 
5298         repeated getting of the string context and converting it into 
5299         an ID
5300
5301         * bus/bus.c (bus_context_get_policy): new accessor, though it
5302         isn't used
5303         (bus_context_check_security_policy): check whether the security
5304         context of sender connection can send to the security context of
5305         recipient connection
5306
5307         * bus/config-parser.c: add parsing for <selinux> and <associate>
5308         
5309         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
5310         implement dbus_connection_get_unix_fd()
5311
5312         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
5313         function, used by the selinux stuff
5314         
5315 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5316
5317         * bus/config-loader-libxml.c: complete the implementation of
5318         libxml backend for config file loader. Doesn't work with full OOM
5319         test yet. 
5320         
5321         * configure.in: change error when selecting libxml into a warning.
5322         
5323         * test/data/invalid-config-files: add two non-well-formed XML
5324         files. 
5325         
5326         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
5327         
5328         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
5329         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
5330         be necessary to read all the buffer. (bug #894)
5331
5332         * bus/activation.c (bus_activation_activate_service): fix a
5333         potential assertion failure (bug #896). Small optimization in the
5334         case of auto-activation messages.
5335
5336         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
5337         add test case for byte-through-vararg bug (#901). patch by Kimmo
5338         Hämäläinen. 
5339
5340 2004-07-28  Anders Carlsson  <andersca@gnome.org>
5341
5342         * python/dbus.py:
5343         * python/dbus_bindings.pyx.in:
5344         Add dbus.init_gthreads (), allow emit_signal to pass
5345         arguments to the signal.
5346         
5347 2004-07-24  Havoc Pennington  <hp@redhat.com>
5348
5349         * AUTHORS: add some people, not really comprehensively, let me
5350         know if I missed you
5351
5352 2004-07-24  Havoc Pennington  <hp@redhat.com>
5353
5354         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
5355         Owen
5356
5357         * test/Makefile.am (DIST_SUBDIRS): here also
5358
5359 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5360
5361         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
5362         breaking build on Solaris, reported by Farhad Saberi on the ML.
5363
5364         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
5365         va_arg invocation to account for integer promotion in the case of
5366         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
5367
5368         * bus/services.c (bus_service_remove_owner): fix bug #902, use
5369         _dbus_list_get_first_link, not _dbus_list_get_first.
5370
5371         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
5372
5373         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
5374         handler functions so that the asserts in _dbus_object_subtree_unref
5375         do not fail.
5376
5377         * dbus/dbus-transport-unix.c (do_reading):
5378         _dbus_transport_queue_messages return value is of type
5379         dbus_bool_t, not DBusDispatchStatus.
5380         
5381 2004-07-19  David Zeuthen  <david@fubar.dk>
5382
5383         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
5384
5385         * bus/dispatch.c:
5386         (check_get_connection_unix_user): Debug says GetProperty; but the
5387         method is called GetConnectionUnixUser
5388         (check_get_connection_unix_process_id): New function
5389         (bus_dispatch_test): Actually call check_get_connection_unix_user();
5390         also call check_get_connection_unix_process_id()
5391         
5392         * bus/driver.c:
5393         (bus_driver_handle_get_connection_unix_process_id): New function,
5394         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
5395         interface
5396         
5397         * dbus/dbus-auth.c:
5398         (handle_server_data_external_mech): Set pid from the credentials
5399         obtained from the socket
5400         
5401         * dbus/dbus-connection.c:
5402         (dbus_connection_get_unix_process_id): New function
5403         
5404         * dbus/dbus-connection.h: 
5405         Add prototype for dbus_connection_get_unix_process_id
5406         
5407         * dbus/dbus-transport.c:
5408         (_dbus_transport_get_unix_process_id): New function
5409         
5410         * dbus/dbus-transport.h:
5411         Add prototype for _dbus_transport_get_unix_process_id
5412         
5413 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5414
5415         * dbus/dbus-message.c: Message counter fix, patch by Christian
5416         Hammond <chipx86@gnupdate.org>
5417
5418 2004-07-18  Seth Nickell  <seth@gnome.org>
5419
5420         * python/dbus.py:
5421         * python/dbus_bindings.pyx.in:
5422         * python/tests/test-client.py:
5423
5424         Add dbus.ByteArray and dbus_bindings.ByteArray
5425         types so that byte streams can be passed back.
5426
5427         Give jdahlin the heaps of credit that are so
5428         rightfully his.
5429         
5430 2004-07-12  Seth Nickell  <seth@gnome.org>
5431
5432         * python/dbus.py:
5433
5434         Add message argument to the default object_method_handler
5435         function.
5436         
5437         * python/dbus_bindings.pyx.in:
5438
5439         Automatically return NIL when passed an empty list
5440         (we can't pass back a list since lists are typed
5441         and we don't have any idea what type the the client
5442         intended the list to be... :-( )
5443         
5444 2004-07-10  Seth Nickell  <seth@gnome.org>
5445
5446         * python/examples/Makefile.am:
5447
5448         Fix distcheck breakage caused by new examples.
5449
5450 2004-07-10  Seth Nickell  <seth@gnome.org>
5451
5452         * python/dbus.py:
5453
5454         Add "message" argument to service-side dbus.Object
5455         methods. This will break existing services written
5456         using the python bindings, but will allow extraction
5457         of all the message information (e.g. who its from).
5458
5459         Add improved "object oriented" signal handling/emission.
5460         
5461         * python/examples/example-service.py:
5462
5463         Nix this example.
5464         
5465         * python/examples/example-signal-emitter.py:
5466         * python/examples/example-signal-recipient.py:
5467
5468         Two new examples that show how to emit and receive
5469         signals using the new APIs.
5470         
5471         * python/examples/example-signals.py:
5472         * python/examples/gconf-proxy-service.py:
5473         * python/examples/gconf-proxy-service2.py:
5474
5475         Add "message" argument to service methods.
5476
5477 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
5478
5479         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
5480         * dbus/bus.c (dbus_bus_get_unix_user)
5481         * doc/dbus-specification.xml: implement GetConnectionUnixUser
5482         method of org.freedesktop.DBus interface.
5483
5484         * bus/dispatch.c: test case
5485
5486 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
5487
5488         * python/Makefile.am: switched include directory from glib/ to dbus/
5489         since dbus-glib.h moved
5490  
5491 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5492
5493         * configure.in: prevent building the gcj stuff and libxml loader
5494         since they are broken.
5495
5496 2004-06-20  Havoc Pennington  <hp@redhat.com>
5497
5498         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
5499         codes from the dbus error names
5500         
5501         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
5502         as dbus/dbus-glib.h and that breakage is now visible due to 
5503         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
5504         
5505         * glib/dbus-glib.h: s/gproxy/g_proxy/
5506
5507         * dbus/dbus-shared.h: new header to hold stuff shared with
5508         binding APIs
5509         
5510         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
5511         than dbus-errors.h
5512
5513         * glib/dbus-glib.h (dbus_set_g_error): move to
5514         dbus-glib-lowlevel.h
5515
5516         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
5517         of stuff to enable this
5518
5519         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
5520
5521         * a bunch of other changes with the same basic "separate glib 
5522         bindings from dbus.h" theme
5523         
5524 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
5525
5526         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
5527
5528         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
5529
5530 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5531
5532         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
5533         the reply value of the ServiceExists message.
5534
5535 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
5536
5537         * python/dbus_bindings.pyx.in: No longer need to parse path
5538         elements and pass them as arrays of strings.  The C API now
5539         accepts plain path strings.
5540         (_build_parsed_path): removed 
5541
5542 2004-06-07  Havoc Pennington  <hp@redhat.com>
5543
5544         * doc/TODO: remove auto-activation item since it's done; sort
5545         items by importance/milestone
5546
5547 2004-06-07  Havoc Pennington  <hp@redhat.com>
5548
5549         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
5550         random signature when using REQUIRED_FIELDS (this hack won't work
5551         in the long term)
5552
5553         * dbus/dbus-message.c: change the signature to be a header field,
5554         instead of message->signature special-case string. Incremental
5555         step forward. Then we can fix up code to send the signature in the
5556         message, then fix up code to validate said signature, then fix up
5557         code to not put the typecodes inline, etc.
5558         (load_one_message): don't make up the signature after the fact
5559         (decode_header_data): require signature field for the known
5560         message types
5561
5562         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
5563
5564         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
5565
5566 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
5567
5568         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5569
5570         * mono/Handler.cs: Updated to follow new path argument for
5571         (un-)registering objects.
5572
5573         * mono/example/Makefile.am:
5574         * mono/Makefile.am:
5575         * configure.in: Bumped required version for mono and use new -pkg
5576         syntax for deps
5577
5578 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5579
5580         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
5581         registration functions take the path argument as char* instead of
5582         char**.
5583
5584         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
5585         split off the path decompostion part of
5586         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
5587         warnings. 
5588
5589         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
5590         
5591 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5592  
5593         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
5594         machine approach.  A state is implemented as a function that
5595         handles incoming events as specified for that state.
5596         
5597         * doc/dbus-specification.xml: Update auth protocol state machine
5598         specification to match implementation.  Remove some leftover
5599         base64 examples.
5600
5601 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5602
5603         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
5604         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
5605         quiet doxygen.
5606
5607         * Doxyfile.in: remove deprecated options.
5608
5609         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
5610         glib/test-thread.h, glib/test-thread-client.c,
5611         glib/test-thread-server.c, glib/test-profile.c,
5612         glib/test-dbus-glib.c: remove these unused files.
5613
5614 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5615
5616         * dbus/dbus-object-tree.c
5617         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
5618         non-fallback handlers (bug #684).
5619         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
5620         (find_subtree_recurse): report wether the returned subtree is an
5621         exact match or a "fallback" match higher up in the tree.
5622         (object_tree_test_iteration): update test case.
5623
5624 2004-06-01  Seth Nickell  <seth@gnome.org>
5625
5626         * python/dbus_bindings.pyx.in:
5627         * python/tests/test-client.py:
5628
5629         Round off basic type support. Add dicts (yay!), and 
5630         remaining array types.
5631
5632         Make MessageIter more general so it works for dicts too.
5633
5634         Mark all loop variables as C integers.
5635         
5636 2004-05-31  Havoc Pennington  <hp@redhat.com>
5637
5638         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
5639         "in" before "out"
5640
5641         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
5642
5643         * glib/dbus-glib-tool.c (main): set up to have a --self-test
5644         option that runs the tests, and start filling in some code
5645         including for starters just dumping the interfaces to stdout
5646
5647         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
5648
5649         * test/data/valid-introspection-files/lots-of-types.xml: test of
5650         an example introspection file
5651
5652         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
5653         "node" (I think...)
5654
5655 2004-05-31  Seth Nickell  <seth@gnome.org>
5656
5657         * python/dbus_bindings.pyx.in:
5658         * python/tests/test-client.py:
5659
5660         Test Suite: 1
5661         Python Bindings: 0
5662
5663         Fix string array memory trashing bug... oops...
5664
5665 2004-05-30  Seth Nickell  <seth@gnome.org>
5666
5667         * python/dbus.py:
5668
5669         Add a nicer-but-less-flexible alternate API for handling 
5670         calls to virtual objects in dbus.ObjectTree.
5671
5672         Screw up the argument order to the dbus.Object constructor
5673         for consistency with dbus.ObjectTree (and to make dbus_methods
5674         optional for future extension)
5675         
5676         * python/examples/Makefile.am:
5677         * python/examples/gconf-proxy-service.py:
5678         * python/examples/gconf-proxy-service2.py:
5679
5680         Alternate implementation of gconf-proxy-service using the
5681         nicer dbus.ObjectTree API.
5682         
5683         * python/examples/example-service.py:
5684         * python/tests/test-server.py
5685
5686         Reverse the argument order to deal with dbus.Object constructor
5687         changes.
5688         
5689 2004-05-30  Seth Nickell  <seth@gnome.org>
5690
5691         * python/examples/example-client.py:
5692         * python/examples/example-service.py:
5693
5694         Take it back. Lists seem to work but they're broken
5695         in the test suite. Make the base examples use
5696         lists (works fine).
5697
5698 2004-05-30  Seth Nickell  <seth@gnome.org>
5699
5700         * python/dbus_bindings.pyx.in:
5701         * python/tests/test-client.py:
5702
5703         Add some more tests and fix errors that crop up.
5704         Unfortunately, currently it seems like marshalling
5705         and unmarshalling of lists is completely broken :-(
5706
5707 2004-05-30  Seth Nickell  <seth@gnome.org>
5708
5709         * python/dbus_bindings.pyx.in:
5710
5711         Add support for ObjectPath type.
5712
5713         * python/dbus.py:
5714
5715         Refactor message handling code to a common function.
5716         
5717         * python/tests/test-client.py:
5718         * python/tests/test-server.py:
5719
5720         Add tests that check to make sure values of all types
5721         can be echoed from a service w/o mangling.
5722         
5723 2004-05-29  Seth Nickell  <seth@gnome.org>
5724
5725         * python/dbus.py:
5726
5727         Add ObjectTree class which allows implementation
5728         of trees of "virtual" objects. Basically the python
5729         wrapper for "register_fallback".
5730         
5731         * python/examples/Makefile.am
5732         * python/examples/gconf-proxy-client.py:
5733         * python/examples/gconf-proxy-service.py:
5734
5735         Implement a simple GConf proxy service that supports
5736         get/set on string and int GConf keys using the ObjectTree.
5737         
5738 2004-05-29  Seth Nickell  <seth@gnome.org>
5739
5740         * python/dbus.py:
5741         * python/examples/example-client.py:
5742         * python/examples/example-service.py:
5743         * python/examples/list-system-services.py:
5744
5745         Add SessionBus, SystemBus and ActivationBus classes
5746         so you don't need to know the special little BUS_TYPE
5747         flag.
5748         
5749 2004-05-29  Havoc Pennington  <hp@redhat.com>
5750
5751         * bus/config-parser.c (process_test_valid_subdir): temporarily
5752         stop testing config parser OOM handling, since expat has issues
5753         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
5754
5755         * bus/dbus-daemon-1.1.in: change requested_reply to
5756         send_requested_reply/receive_requested_reply so we can send the
5757         replies, not just receive them.
5758
5759         * bus/config-parser.c: parse the new
5760         send_requested_reply/receive_requested_reply
5761
5762         * bus/policy.c (bus_client_policy_check_can_send): add
5763         requested_reply argument and use it
5764
5765         * bus/bus.c (bus_context_check_security_policy): pass through
5766         requested_reply status to message send check
5767
5768         * bus/system.conf.in: adapt to requested_reply change
5769         
5770 2004-05-28  Havoc Pennington  <hp@redhat.com>
5771
5772         * test/glib/test-service-glib.c (main): remove unused variable
5773
5774         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
5775
5776         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
5777         from the enum, no longer in use.
5778
5779         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
5780         works right.
5781
5782         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
5783         whether error_name passed in is a valid error name.
5784
5785 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
5786
5787         * dbus/dbus-message.c (dbus_message_get_args): Added support for
5788         OBJECT_PATH and OBJECT_PATH_ARRAY
5789
5790 2004-05-28  Seth Nickell  <seth@gnome.org>
5791
5792         * python/examples/Makefile.am:
5793
5794         Forget to add Makefile.am. Do not pass go.
5795
5796 2004-05-28  Michael Meeks  <michael@ximian.com>
5797
5798         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
5799         fix no int64 case.
5800
5801         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
5802
5803         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
5804         (_dbus_message_iter_get_basic_type_array): impl.
5805         drastically simplify ~all relevant _get methods to use these.
5806         (_dbus_message_iter_append_basic_array),
5807         (dbus_message_iter_append_basic): impl
5808         drastically simplify ~all relevant _append methods to use these.
5809
5810         * dbus/dbus-message-builder.c (parse_basic_type) 
5811         (parse_basic_array, lookup_basic_type): impl.
5812         (_dbus_message_data_load): prune scads of duplicate /
5813         cut & paste coding.
5814
5815         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
5816         (_dbus_demarshal_basic_type): implement,
5817         (demarshal_and_validate_len/arg): beef up debug.
5818         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
5819
5820 2004-05-27  Seth Nickell  <seth@gnome.org>
5821
5822         * configure.in:
5823         * python/Makefile.am:
5824
5825         Include the example python apps in the tarball.
5826         
5827         * python/examples/list-system-services.py
5828
5829         Add a python new example that fetches the list of services
5830         from the system bus.
5831         
5832 2004-05-27  Seth Nickell  <seth@gnome.org>
5833
5834         * python/dbus.py:
5835         * python/dbus_bindings.pyx.in:
5836
5837         Fix failure to notify that a signal was not handled,
5838         resulted in hung functions.
5839         
5840 2004-05-25  Colin Walters  <walters@redhat.com>
5841
5842         * tools/dbus-monitor.c (main): Monitor all types of messages.
5843
5844 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
5845
5846         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
5847         which unregisters the object path and disposes the handler.
5848
5849 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
5850  
5851         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
5852          
5853         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
5854         operands to && so we call dbus_message_iter_next () for the last
5855         argument also.
5856
5857 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5858
5859         * dbus/dbus-object-tree.c
5860         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
5861         children even if the requested path isn't registered.
5862         (object_tree_test_iteration): test object_tree_list_registered.
5863
5864         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
5865         it to 0.
5866         
5867 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
5868
5869         * doc/TODO: Remove resolved items.
5870
5871         * bus/expirelist.h (struct BusExpireList): remove unused n_items
5872         field.
5873         
5874         * bus/connection.c (bus_connections_expect_reply): Enforce the
5875         per-connection limit on pending replies.
5876         
5877         Patch from Jon Trowbridge <trow@ximian.com>:
5878  
5879         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
5880         up a watch that triggers a config reload when one end of the pipe
5881         becomes readable.
5882         (signal_handler): Instead of doing the config reload in our SIGHUP
5883         handler, just write to the reload pipe and let the associated
5884         watch handle the reload when control returns to the main loop.
5885  
5886         * bus/driver.c (bus_driver_handle_reload_config): Added.
5887         Implements a ReloadConfig method for requesting a configuration
5888         file reload via the bus driver.
5889  
5890 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
5891
5892         * HACKING: Updated release instructions concerning the wiki page.
5893
5894 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
5895
5896         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
5897         filter against auth->allowed_mechs; we only add allowed mechs in
5898         record_mechanisms().
5899  
5900         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
5901         ALLOWED_MECHS to auth-script format so we can set the list of
5902         allowed mechanisms.
5903  
5904         * data/auth/client-out-of-mechanisms.auth-script: New test to
5905         check client disconnects when it is out of mechanisms to try.
5906  
5907         * dbus/dbus-auth.c (process_command): Remove check for lines
5908         longer that 1 MB; we only buffer up maximum 16 kB.
5909  
5910         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5911         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
5912         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
5913         assume there might be unused bytes.
5914  
5915         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
5916         client-out-of-mechs, it is handled in process_reject(). Move check
5917         for max failures to send_rejected(), as it's a server-only thing.
5918
5919         * dbus/dbus-auth.c: Factor out protocol reply code into functions
5920         send_auth(), send_data(), send_rejected(), send_error(),
5921         send_ok(), send_begin() and send_cancel().
5922
5923 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
5924
5925         Remove base64 encoding, replace with hex encoding. Original patch
5926         from trow@ximian.com, added error handling.
5927
5928         * dbus/dbus-string.c (_dbus_string_base64_encode)
5929         (_dbus_string_base64_decode): Remove.
5930         (_dbus_string_hex_decode): Add end_return argument so we can
5931         distinguish between OOM and invalid hex encoding.
5932         (_dbus_string_test): Remove base64 tests and add test case for
5933         invalid hex.
5934
5935         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
5936         Replace base64 with hex.
5937
5938         * test/data/auth/invalid-hex-encoding.auth-script: New test case
5939         for invalid hex encoded data in auth protocol.
5940
5941 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5942
5943         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
5944         leak.
5945
5946 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5947
5948         * mono/dbus-sharp.dll.config.in: Added for GAC
5949         * mono/dbus-sharp.snk: Added for GAC
5950         * mono/Assembly.cs.in: Added for GAC
5951         * mono/Makefile.am: Changes for GAC installation        
5952         * configure.in: Added refs for dbus-sharp.dll.config.in and
5953         Assembly.cs.in. More fixes for mono testing
5954         * mono/example/Makefile.am: Changed var to CSC
5955         * Makefile.am: Changed flag name to DBUS_USE_CSC
5956
5957 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5958
5959         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
5960         * mono/doc/*: Added documentation framework
5961         * configure.in: Added monodoc check
5962         * README: Added description of mono configure flags
5963
5964 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
5965
5966         * doc/dbus-specification.xml: Added a "Required" column to the 
5967         header fields table and changed the "zero or more" verbage in
5968         the above paragraph to read "The header must contain the required 
5969         named header fields and zero or more of the optional named header 
5970         fields".
5971         * test/data/invalid-messages/*.message: Added the required PATH 
5972         named header field to the tests so that they don't fail on 
5973         'Missing path field'
5974
5975 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
5976
5977         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
5978         the stack by implicitly defining variable and parameter types and
5979         removing the hack of defining C pointers as python objects and later
5980         casting them.
5981
5982 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
5983
5984         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
5985
5986 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
5987
5988         * mono/DBusType/Dict.cs: Handle empty dicts
5989         * mono/DBusType/Array.cs: Handle empty arrays
5990         * mono/Arguments.cs: Handle empty arguments
5991
5992 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
5993
5994         * dbus-sharp.pc.in: Modified to include include Libs and Requires
5995         field
5996
5997 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
5998
5999         * test/data/valid-messages/standard-*.message: Update message
6000         test scripts to new header field names.
6001
6002 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
6003
6004         * test/break-loader.c (randomly_do_n_things): tracked down buffer
6005         overflow to times_we_did_each_thing array which would chop off the
6006         first character of the failure_dir string. Increased the size of
6007         the array to 7 to reflect the number of random mutation functions
6008         we have.
6009
6010 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
6011
6012         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
6013         unix_server->watch here, it is unreffed in disconnect.
6014         (_dbus_server_new_for_tcp_socket): convert NULL host to
6015         "localhost" here so we don't append NULL to address.
6016         
6017         * dbus/dbus-server.c (_dbus_server_test): Add test case for
6018         various addresses, including tcp with no explicit host.
6019
6020 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6021
6022         * dbus/dbus-message.c (decode_header_data, decode_string_field):
6023         fix incorrect setting of .name_offset in the HeaderField (it was
6024         off by two bytes, positioned right after the name and typecode)
6025
6026         * bus/bus.c (bus_context_new, bus_context_unref): test before
6027         calling dbus_server_free_data_slot and _dbus_user_database_unref
6028         in case of an error.
6029
6030         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
6031         by libdbus-gtool.
6032
6033 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
6034
6035         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
6036         _dbus_poll() instead of select().
6037
6038 2004-04-15  Jon Trowbridge  <trow@ximian.com>
6039
6040         * bus/main.c (signal_handler): Reload the configuration files
6041         on SIGHUP.
6042         (main): Set up our SIGHUP handler.
6043
6044         * bus/bus.c (struct BusContext): Store the config file, user and
6045         fork flag in the BusContext.
6046         (process_config_first_time_only): Added.  Contains the code
6047         (previously in bus_context_new) for setting up the BusContext from
6048         the BusConfigParser that should only be run the first time the
6049         config files are read.
6050         (process_config_every_time): Added.  Contains the code (previously
6051         in bus_context_new) for setting up the BusContext from the
6052         BusConfigParser that should be run every time the config files are
6053         read.
6054         (load_config): Added.  Builds a BusConfigParser from the config
6055         files and passes the resulting structure off to
6056         process_config_first_time_only (assuming this is the first time)
6057         and process_config_every_time.
6058         (bus_context_new): All of the config-related code has been moved
6059         to process_config_first_time_only and process_config_every_time.
6060         Now this function just does the non-config-related initializations
6061         and calls load_config.
6062         (bus_context_reload_config): Added.
6063
6064 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6065
6066         * bus/driver.c (bus_driver_handle_get_service_owner):
6067         implement a GetServiceOwner method.
6068         * doc/dbus-specification.xml: document it.
6069         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
6070         
6071         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
6072         implement, using the bus GetServiceOwner method.
6073
6074         * test/glib/test-dbus-glib.c:
6075         use dbus_gproxy_new_for_service_owner so that we can receive the
6076         signal. 
6077
6078 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
6079
6080         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6081         dbus/dbus-message.c, dbus/dbus-protocol.h
6082         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
6083
6084         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6085         dbus/dbus-message.c, dbus/dbus-protocol.h
6086         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
6087
6088         * dbus/dbus-internals.c (_dbus_header_field_to_string):
6089         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
6090         DBUS_HEADER_FIELD_SENDER resolves to "sender"
6091
6092         * doc/dbus-specification.xml (Header Fields Table):
6093         s/SERVICE/DESTINATION
6094         s/SENDER_SERVICE/SENDER
6095
6096
6097 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6098
6099         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
6100         a few seconds.
6101
6102 2004-04-13  Michael Meeks  <michael@ximian.com>
6103
6104         * glib/dbus-gobject.c (handle_introspect): split out
6105         (introspect_properties): this.
6106         (handle_introspect): implement this.
6107
6108         * test/glib/Makefile.am: use the absolute path so the bus
6109         daemon's chdir ("/") doesn't kill us dead.
6110
6111         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
6112
6113 2004-04-12  Jon Trowbridge  <trow@ximian.com>
6114
6115         * bus/config-parser.c (struct BusConfigParser): Added
6116         included_files field.
6117         (seen_include): Added.  Checks whether or not a file has already
6118         been included by any parent BusConfigParser.
6119         (bus_config_parser_new): Copy the parent's included_files.
6120         (include_file): Track which files have been included, and fail on
6121         circular inclusions.
6122         (process_test_valid_subdir): Changed printf to report if we are
6123         testing valid or invalid conf files.
6124         (all_are_equiv): Changed printf to be a bit clearer about
6125         what we are actually doing.
6126         (bus_config_parser_test): Test invalid configuration files.
6127
6128 2004-04-09  Jon Trowbridge  <trow@ximian.com>
6129
6130         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
6131         argument.  If non-null, the newly-constructed BusConfigParser will
6132         be initialized with the parent's BusLimits instead of the default
6133         values.
6134         (include_file): When including a config file, pass in
6135         the current parser as the parent and then copy the BusLimits
6136         from the included BusConfigParser pack to the current parser.
6137         (process_test_valid_subdir): Renamed from process_test_subdir.
6138         (process_test_equiv_subdir): Added.  Walks through a directory,
6139         descending into each subdirectory and loading the config files
6140         it finds there.  If any subdirectory contains two config files
6141         that don't produce identical BusConfigParser structs, fail.
6142         For now, the BusConfigParser's BusPolicies are not compared.
6143         (bus_config_parser_test): Call both process_test_valid_subdir and
6144         process_test_equiv_subdir.
6145
6146         * bus/config-loader-libxml.c (bus_config_load): Take a parent
6147         argument and pass it along to the call to bus_config_parser_new.
6148         Also made a few small changes to allow this code to compile.
6149
6150         * bus/config-loader-expat.c (bus_config_load): Take a parent
6151         argument and pass it along to the call to bus_config_parser_new.
6152
6153         * bus/bus.c (bus_context_new): Load the config file
6154         with a NULL parent argument.
6155
6156 2004-03-29  Michael Meeks  <michael@ximian.com>
6157
6158         * glib/dbus-gobject.c (introspect_properties): split
6159         out, fix mangled 'while' flow control.
6160         (introspect_signals): implement.
6161         (handle_introspect): update.
6162
6163 2004-03-29  Michael Meeks  <michael@ximian.com>
6164
6165         * glib/dbus-gobject.c (set_object_property): split out / 
6166         re-work, use the property type, and not the message type(!)
6167         (get_object_property): ditto.
6168
6169         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
6170         (dbus_gvalue_marshal): make this code re-usable, needed
6171         for signals too, also on both proxy and server side.
6172         Re-write for more efficiency / readability.
6173
6174 2004-03-29  Michael Meeks  <michael@ximian.com>
6175
6176         * dbus/dbus-message.c
6177         (dbus_message_new_error_printf): impl.
6178
6179         * dbus/dbus-connection.c
6180         (dbus_connection_unregister_object_path): fix warning.
6181
6182         * configure.in: fix no-mono-installed situation.
6183
6184 2004-03-27  Havoc Pennington  <hp@redhat.com>
6185
6186         Patch from Timo Teräs:
6187         
6188         * tools/dbus-send.c (main): if --print-reply, assume type is
6189         method call; support boolean type args
6190         
6191         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
6192         bunch of memleak and logic bugs
6193         
6194 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
6195
6196         * mono/Arguments.cs:
6197         * mono/Introspector.cs:
6198         * mono/Handler.cs:
6199         * mono/InterfaceProxy.cs:
6200         * mono/Message.cs
6201         * mono/ProxyBuilder.cs:
6202         * mono/Service.cs:
6203         Added InterfaceProxy class to avoid building proxies for every
6204         object.
6205
6206         * dbus-message.h:
6207         * dbus-message.c (dbus_message_append_args_valist)
6208         (dbus_message_iter_get_object_path)
6209         (dbus_message_iter_get_object_path_array)
6210         (dbus_message_iter_append_object_path)
6211         (dbus_message_iter_append_object_path_array):
6212         Added object_path iter functions to handle OBJECT_PATH arguments
6213         
6214 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
6215
6216         First checkin of mono bindings.
6217         * configure.in:
6218         * Makefile.am:
6219         Build stuff for the bindings
6220         * dbus-sharp.pc.in: Added for pkgconfig
6221         
6222 2004-03-21  Havoc Pennington  <hp@redhat.com>
6223
6224         * test/test-service.c (main): remove debug spew
6225
6226 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6227
6228         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
6229         arrays
6230
6231         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
6232         (dbus_message_iter_init_array_iterator)
6233         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
6234         indicate whether the iterator is empty
6235
6236         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
6237         warnings
6238
6239 2004-03-19  Havoc Pennington  <hp@redhat.com>
6240
6241         * NEWS: 0.21 updates
6242
6243         * configure.in: 0.21
6244
6245         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
6246         
6247         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
6248         you don't need pyrex to make dist
6249
6250         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
6251         sources; run moc
6252         
6253 2004-03-18  Richard Hult  <richard@imendio.com>
6254
6255         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
6256         (dbus_message_set_auto_activation): Add doxygen docs.
6257
6258 2004-03-16  Richard Hult  <richard@imendio.com>
6259
6260         * bus/activation.c: (bus_activation_service_created),
6261         (bus_activation_send_pending_auto_activation_messages),
6262         (bus_activation_activate_service):
6263         * bus/activation.h:
6264         * bus/dispatch.c: (bus_dispatch),
6265         (check_nonexistent_service_auto_activation),
6266         (check_service_auto_activated),
6267         (check_segfault_service_auto_activation),
6268         (check_existent_service_auto_activation), (bus_dispatch_test):
6269         * bus/driver.c: (bus_driver_handle_activate_service):
6270         * bus/services.c: (bus_registry_acquire_service):
6271         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
6272         (dbus_message_get_auto_activation):
6273         * dbus/dbus-message.h:
6274         * dbus/dbus-protocol.h: Implement auto-activation.
6275         
6276         * doc/dbus-specification.xml: Add auto-activation to the spec.
6277
6278 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6279
6280         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
6281         fix a bug with CUSTOM types.
6282
6283         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
6284         a unit test for this bug (used to fail).
6285
6286 2004-03-12  Mikael Hallendal  <micke@imendio.com>
6287
6288         * bus/activation.c:
6289         (babysitter_watch_callback): notify all pending activations waiting for
6290           the same exec that the activation failed.
6291         (bus_activation_activate_service): shortcut the activation if we 
6292           already waiting for the same executable to start up.
6293
6294 2004-03-12  Mikael Hallendal  <micke@imendio.com>
6295
6296         * bus/activation.c: 
6297         - Added service file reloading. 
6298           Each service files directory is kept in an hash table in 
6299           BusActivation and each BusActivationEntry knows what .service-file it
6300           was read from. So when you try to activate a service the bus will 
6301           check if it's been updated, removed or if new .service-files has 
6302           been installed.
6303         - Test code at the bottom for the service file reloading.
6304         * bus/test-main.c: (main):
6305         * bus/test.h:
6306         - added service reloading test.
6307         * dbus/dbus-sysdeps.c: 
6308         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
6309
6310 2004-03-08  Michael Meeks  <michael@ximian.com>
6311
6312         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
6313         bail immediately if disconnected, to avoid busy loop.
6314
6315         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
6316         cleanup cut/paste/inefficiency.
6317
6318 2004-03-01  David Zeuthen  <david@fubar.dk>
6319
6320         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
6321         bug where args were used twice. This bug resulted in a segfault
6322         on a Debian/PPC system when starting the messagebus daemon. Include
6323         dbus-sysdeps.h for DBUS_VA_COPY
6324
6325         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
6326
6327         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
6328         appropriate va_copy implementation. From GLib
6329         
6330 2004-02-24  Joe Shaw  <joe@ximian.com>
6331
6332         * bus/services.c (bus_registry_acquire_service): We need to pass
6333         in the service name to dbus_set_error() to prevent a crash.
6334
6335 2003-12-26  Anders Carlsson  <andersca@gnome.org>
6336
6337         * AUTHORS: Reveal my True identity.
6338
6339 2003-12-17  Mikael Hallendal  <micke@imendio.com>
6340
6341         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
6342         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
6343
6344 2003-12-13  Mikael Hallendal  <micke@imendio.com>
6345
6346         * doc/TODO: Added not about better error check of configuration files.
6347
6348 2003-12-02  Richard Hult  <richard@imendio.com>
6349
6350         * Update AFL version to 2.0 throughout the source files to reflect
6351         the update that was done a while ago.
6352
6353 2003-12-02  Richard Hult  <richard@imendio.com>
6354
6355         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
6356         wrote_dict_key to FALSE on the iter that the dict is appended to,
6357         just like when appending other types. Fixes a bug where a dict
6358         couldn't be put inside a dict.
6359         (dbus_message_iter_append_dict_key): Fix typo in warning message.
6360         (message_iter_test, _dbus_message_test): Add test case for dict
6361         inside dict.
6362
6363 2003-12-01  David Zeuthen  <david@fubar.dk>
6364
6365         * python/dbus.py: Add the actual message when calling the reciever
6366         of a signal such that parameters can be inspected. Add the method
6367         remove_signal_receiver
6368         
6369 2003-11-26  Mikael Hallendal  <micke@imendio.com>
6370
6371         * bus/*.[ch]:
6372         * dbus/*.[ch]:
6373         * glib/*.[ch]: Made ref functions return the pointer
6374
6375 2003-11-25  Zack Rusin  <zack@kde.org>
6376
6377         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
6378
6379         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
6380         wrappers,
6381
6382         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
6383         the Integrator and to better fit with the server,
6384
6385 2003-11-24  Zack Rusin  <zack@kde.org>
6386
6387         * qt/connection.h, qt/connection.cpp: removing initDbus method since
6388         the integrator handles it now
6389
6390         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
6391         since QTimer wasn't really meant to be used the way DBusTimeout is
6392
6393 2003-11-24  Zack Rusin  <zack@kde.org>
6394
6395         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
6396         Integrator class which integrates D-BUS with the Qt event loop,
6397
6398         * qt/connection.h, qt/connection.cpp: Move all the code which
6399         was dealing with D-BUS integration to the Integrator class,
6400         and start using Integrator,
6401
6402 2003-11-23  Zack Rusin  <zack@kde.org>
6403
6404         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
6405         wrapper
6406
6407         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
6408         switching namespaces to DBusQt, reworking the class,
6409
6410         * Makefile.cvs: switching dependencies so that it matches KDE 
6411         schematics,
6412         
6413         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
6414         the library
6415
6416 2003-11-19  Havoc Pennington  <hp@redhat.com>
6417
6418         * NEWS: update
6419
6420         * configure.in: bump version to 0.20
6421
6422         * configure.in (have_qt): add yet another place to look for qt
6423         (someone hand trolltech a .pc file...)
6424
6425 2003-11-01  Havoc Pennington  <hp@redhat.com>
6426
6427         * doc/dbus-specification.xml: add state machine docs on the auth
6428         protocol; just a first draft, I'm sure it's wrong.      
6429
6430 2003-10-28  David Zeuthen  <david@fubar.dk>
6431
6432         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
6433         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
6434         
6435 2003-10-28  Havoc Pennington  <hp@redhat.com>
6436
6437         * dbus/dbus-message.c (get_next_field): delete unused function
6438
6439 2003-10-28  Havoc Pennington  <hp@redhat.com>
6440
6441         * bus/expirelist.c (do_expiration_with_current_time): detect
6442         failure of the expire_func due to OOM
6443
6444         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
6445
6446         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
6447         NoReply error that's now created by the bus when the service exits
6448
6449 2003-10-28  Havoc Pennington  <hp@redhat.com>
6450
6451         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
6452         tests for set_path, set_interface, set_member, etc.
6453
6454         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
6455
6456         * dbus/dbus-message.c (set_string_field): always just delete and
6457         re-append the field; accept NULL for deletion
6458         (re_align_fields_recurse): reimplement
6459         
6460 2003-10-26  Havoc Pennington  <hp@redhat.com>
6461
6462         * dbus/dbus-connection.c: fix docs to properly describe the
6463         disconnected message
6464         (_dbus_connection_notify_disconnected): remove this function; 
6465         we can't synchronously add the disconnected message, we have to 
6466         do it after we've queued any remaining real messages
6467         (_dbus_connection_get_dispatch_status_unlocked): queue the
6468         disconnect message only if the transport has finished queueing all
6469         its real messages and is disconnected.
6470         (dbus_connection_disconnect): update the dispatch status here
6471
6472 2003-10-22  Havoc Pennington  <hp@redhat.com>
6473
6474         * bus/bus.c (bus_context_check_security_policy): fix up assertion
6475
6476         * bus/connection.c (bus_transaction_send_from_driver): set the
6477         destination to the connection's base service
6478
6479 2003-10-20  Havoc Pennington  <hp@redhat.com>
6480
6481         hmm, make check is currently not passing.
6482         
6483         * doc/dbus-specification.xml: add requirement that custom type
6484         names follow the same rules as interface names.
6485
6486         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
6487         duplication and allow 'c' to be 'custom'; dict is now 'm' for
6488         'map'
6489
6490         * doc/dbus-specification.xml: update type codes to match
6491         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
6492         CUSTOM. Add type OBJECT_PATH to the spec.
6493
6494 2003-10-17  Havoc Pennington  <hp@redhat.com>
6495
6496         * bus/driver.c (create_unique_client_name): use "." as separator
6497         in base service names instead of '-'
6498
6499         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
6500         byte at the end of the string
6501
6502         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
6503         optimization macros since string validation seems to be a slow
6504         point.
6505         
6506         * doc/dbus-specification.xml: restrict valid
6507         service/interface/member/error names. Add test suite code for the
6508         name validation.
6509
6510         * dbus/dbus-string.c: limit service/interface/member/error names 
6511         to [0-9][A-Z][a-z]_
6512
6513         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
6514         format arg to verbose spew
6515
6516         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
6517         memory, return instead of g_error
6518
6519         * test/test-service.c (path_message_func): support emitting a
6520         signal on request
6521
6522         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
6523         activation bus type if DBUS_BUS_ACTIVATION was set; default to
6524         assuming the activation bus was the session bus so that services
6525         started manually will still register.
6526         (init_connections_unlocked): fix so that in OOM situation we get
6527         the same semantics when retrying the function
6528         
6529         * test/test-service.c (main): change to use path registration, to
6530         test those codepaths; register with DBUS_BUS_ACTIVATION rather
6531         than DBUS_BUS_SESSION
6532
6533 2003-10-16  Havoc Pennington  <hp@redhat.com>
6534
6535         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
6536
6537         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
6538         coverage of the tests
6539         (coverage-report.txt): don't move the .da and .bbg files around
6540
6541 2003-10-16  Havoc Pennington  <hp@redhat.com>
6542
6543         * bus/bus.c (struct BusContext): remove struct field I didn't mean
6544         to put there
6545
6546 2003-10-16  Havoc Pennington  <hp@redhat.com>
6547
6548         * bus/connection.c (bus_pending_reply_expired): either cancel or
6549         execute, not both
6550         (bus_connections_check_reply): use unlink, not remove_link, as we
6551         don't want to free the link; fixes double free mess
6552
6553         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
6554         where no reply was received
6555
6556         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
6557         fix a refcount leak
6558
6559         * bus/signals.c (match_rule_matches): add special cases for the
6560         bus driver, so you can match on sender/destination for it.
6561
6562         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
6563         DBUS_PRINT_BACKTRACE is set
6564
6565         * dbus/dbus-internals.c: add pid to assertion failure messages
6566
6567         * dbus/dbus-connection.c: add message type code to the debug spew
6568
6569         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
6570         sender=foo not service=foo
6571
6572         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
6573         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
6574         DBUS_ACTIVATION_ADDRESS instead
6575
6576         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
6577         DBUS_SYSTEM_BUS_ADDRESS if appropriate
6578
6579         * bus/bus.c (bus_context_new): handle OOM copying bus type into
6580         context struct
6581
6582         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
6583         (dbus_message_iter_get_object_path_array): new function (half
6584         finished, disabled for the moment)
6585         
6586         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
6587         DBUS_MESSAGE_TYPE_ERROR
6588
6589         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
6590         avoid redirecting stderr to /dev/null
6591         (babysit): close stdin if not doing the "exit_with_session" thing
6592
6593         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
6594         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
6595         stdout/stdin, so things don't get confused
6596         
6597         * bus/system.conf.in: fix to allow replies, I modified .conf
6598         instead of .conf.in again.
6599
6600 2003-10-14  David Zeuthen  <david@fubar.dk>
6601
6602         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
6603         argtype to arg_type when raising unknown arg type exception.
6604         Changed type list to reflect the changes in dbus-protocol.h so 
6605         the bindings actually work.
6606
6607 2003-10-14  Havoc Pennington  <hp@redhat.com>
6608
6609         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
6610         to have a bug keeping it from outputting the .da files sometimes
6611         (string_get_string): don't append garbage nul bytes to the string.
6612
6613 2003-10-15  Seth Nickell  <seth@gnome.org>
6614
6615         * python/Makefile.am:
6616
6617         Include dbus_h_wrapper.h in the dist tarball.
6618
6619 2003-10-14  Havoc Pennington  <hp@redhat.com>
6620
6621         * bus/bus.c (bus_context_check_security_policy): revamp this to
6622         work more sanely with new policy-based requested reply setup
6623
6624         * bus/connection.c (bus_transaction_send_from_driver): set bus
6625         driver messages as no reply
6626
6627         * bus/policy.c (bus_client_policy_check_can_receive): handle a
6628         requested_reply attribute on allow/deny rules
6629
6630         * bus/system.conf: add <allow requested_reply="true"/>
6631
6632         * bus/driver.c (bus_driver_handle_message): fix check for replies
6633         sent to the bus driver, which was backward. How did this ever work
6634         at all though? I think I'm missing something.
6635
6636         * dbus/dbus-message.c (decode_header_data): require error and
6637         method return messages to have a reply serial field to be valid
6638         (_dbus_message_loader_queue_messages): break up this function;
6639         validate that reply serial and plain serial are nonzero; 
6640         clean up the OOM/error handling.
6641         (get_uint_field): don't return -1 from this
6642         (dbus_message_create_header): fix signed/unsigned bug
6643
6644         * bus/connection.c (bus_connections_expect_reply): save serial of
6645         the incoming message, not reply serial
6646
6647 2003-10-14  Havoc Pennington  <hp@redhat.com>
6648
6649         * bus/connection.c: implement pending reply tracking using
6650         BusExpireList
6651
6652         * bus/bus.c (bus_context_check_security_policy): verify that a
6653         reply is pending in order to allow a reply to be sent. Deny 
6654         messages of unknown type.
6655
6656         * bus/dbus-daemon-1.1.in: update to mention new resource limits
6657
6658         * bus/bus.c (bus_context_get_max_replies_per_connection): new
6659         (bus_context_get_reply_timeout): new
6660
6661 2003-10-13  Seth Nickell  <seth@gnome.org>
6662
6663         * python/Makefile.am:
6664
6665         Pass "make distcheck": remove a couple files from DIST_FILES
6666         that weren't included in the final version.
6667
6668 2003-10-12  Havoc Pennington  <hp@pobox.com>
6669
6670         Added test code that 1) starts an actual bus daemon and 2) uses
6671         DBusGProxy; fixed bugs that were revealed by the test. Lots 
6672         more testing possible, but this is the basic framework.
6673         
6674         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
6675         empty proxy lists from the proxy list hash
6676
6677         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
6678         couple of return_if_fail checks
6679
6680         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
6681         to allocate, so everything is cleared to NULL as it should be.
6682
6683         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
6684         source as data to dbus_connection_set_timeout_functions() as the 
6685         timeout functions expected
6686
6687         * test/glib/run-test.sh: add a little script to start up a message
6688         bus and run tests using it
6689
6690         * tools/dbus-launch.1: updates
6691
6692         * tools/dbus-launch.c (main): add --config-file option
6693
6694         * tools/dbus-launch.c (main): remove confusing else if (runprog)
6695         that could never be reached.
6696
6697         * dbus/dbus-message.c (dbus_message_new_method_return) 
6698         (dbus_message_new_error, dbus_message_new_signal): set the
6699         no-reply-expected flag on all these. Redundant, but may
6700         as well be consistent.
6701
6702 2003-10-11  Havoc Pennington  <hp@pobox.com>
6703
6704         * test/decode-gcov.c (function_solve_graph): make broken block
6705         graph a nonfatal error since it seems to be broken. Need to debug
6706         this.
6707
6708         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
6709         can't just check type > INVALID < LAST anymore
6710
6711         * dbus/dbus-message.c (dbus_message_get_signature): new function
6712         (dbus_message_has_signature): new function
6713         (struct DBusMessage): add signature field (right now it isn't sent
6714         over the wire, just generated on the fly)
6715         (dbus_message_copy): copy the signature, and init strings to
6716         proper length to avoid some reallocs
6717         (dbus_message_iter_init_array_iterator): return void, since it
6718         can't fail
6719         (dbus_message_iter_init_dict_iterator): return void since it can't fail
6720         (_dbus_message_loader_queue_messages): add silly temporary hack to
6721         fill in message->signature on load
6722
6723         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
6724         characters, so they are relatively human-readable.
6725
6726 2003-10-11  Havoc Pennington  <hp@pobox.com>
6727
6728         * dbus/dbus-message.c (_dbus_message_test): add more test
6729         coverage, but #if 0 for now since they uncover a bug 
6730         not fixed yet; I think in re_align_field_recurse()
6731         (re_align_field_recurse): add FIXME about broken assertion
6732
6733         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
6734
6735         * bus/connection.c: share a couple code bits with expirelist.c
6736
6737         * bus/expirelist.h, bus/expirelist.c: implement a generic
6738         expire-items-after-N-seconds facility, was going to share between
6739         expiring connections and replies, decided not to use for expiring
6740         connections for now.
6741
6742         * COPYING: include AFL 2.0 (still need to change all the file headers)
6743
6744 2003-10-09  Havoc Pennington  <hp@redhat.com>
6745
6746         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
6747         gcc 3.3. Not that we do anything about it yet.
6748
6749         * bus/signals.c (bus_match_rule_parse): impose max length on the
6750         match rule text
6751
6752         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
6753
6754 2003-10-09  Havoc Pennington  <hp@redhat.com>
6755
6756         Make matching rules theoretically work (add parser).
6757         
6758         * bus/bus.c (bus_context_check_security_policy): fix up to handle
6759         the case where destination is explicitly specified as bus driver
6760         and someone else is eavesdropping.
6761         
6762         * bus/policy.c (bus_client_policy_check_can_receive): fix up
6763         definition of eavesdropping and assertion
6764
6765         * tools/dbus-send.c (main): use dbus_message_type_from_string
6766
6767         * bus/signals.c (bus_match_rule_parse): implement
6768
6769         * dbus/dbus-message.c (dbus_message_type_from_string): new
6770
6771         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
6772
6773 2003-10-02  Havoc Pennington  <hp@pobox.com>
6774
6775         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
6776         dbus_gproxy_oneway_call
6777
6778         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
6779         (dbus_server_setup_with_g_main): fix to allow calling them more
6780         than once on the same args
6781         (dbus_bus_get_with_g_main): new function
6782
6783 2003-10-02  Havoc Pennington  <hp@redhat.com>
6784
6785         * doc/dbus-tutorial.xml: write some stuff
6786
6787 2003-09-29  Havoc Pennington  <hp@pobox.com>
6788
6789         * configure.in: split checks for Doxygen from XML docs, check for
6790         xmlto
6791
6792         * doc/Makefile.am: XML-ify all the docs, and add a blank
6793         dbus-tutorial.xml
6794
6795 2003-09-29  Havoc Pennington  <hp@pobox.com>
6796
6797         * Merge dbus-object-names branch. To see the entire patch 
6798         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
6799         it's huuuuge though.
6800         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
6801         
6802 2003-09-28  Havoc Pennington  <hp@pobox.com>
6803
6804         * HACKING: update to reflect new server
6805
6806 2003-09-26  Seth Nickell  <seth@gnome.org>
6807
6808         * python/dbus.py:
6809         * python/examples/example-signals.py:
6810
6811         Start implementing some notions of signals. The API
6812         is really terrible, but they sort of work (with the
6813         exception of being able to filter by service, and to
6814         transmit signals *as* a particular service). Need to
6815         figure out how to make messages come from the service
6816         we registered :-(
6817         
6818         * python/dbus_bindings.pyx.in:
6819
6820         Removed duplicate message_handler callbacks.
6821         
6822 2003-09-25  Havoc Pennington  <hp@redhat.com>
6823
6824         * bus/session.conf.in: fix my mess
6825
6826 2003-09-25  Havoc Pennington  <hp@pobox.com>
6827
6828         * bus/session.conf.in: fix security policy, reported by Seth Nickell
6829
6830 2003-09-25  Seth Nickell  <seth@gnome.org>
6831
6832         * python/examples/example-service.py:
6833
6834         Johan notices complete wrong code in example-service, but
6835         completely wrong in a way that works exactly the same (!).
6836         Johan is confused, how could this possibly work? Example
6837         code fails to serve purpose of making things clear.
6838         Seth fixes.
6839
6840 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
6841
6842         * doc/dbus-specification.sgml: don't require header fields
6843         to be 4-byte aligned and specify that fields should be
6844         distinguished from padding by the fact that zero is not
6845         a valid field name.
6846         
6847         * doc/TODO: remove re-alignment item and add item to doc
6848         the OBJECT_PATH type.
6849         
6850         * dbus/dbus-message.c:
6851         (HeaderField): rename the original member to value_offset
6852         and introduce a name_offset member to keep track of where
6853         the field actually begins.
6854         (adjust_field_offsets): remove.
6855         (append_int_field), (append_uint_field),
6856         (append_string_field): don't align the start of the header
6857         field to a 4-byte boundary.
6858         (get_next_field): impl finding the next marhsalled field
6859         after a given field.
6860         (re_align_field_recurse): impl re-aligning a number of
6861         already marshalled fields.
6862         (delete_field): impl deleting a field of any type and
6863         re-aligning any following fields.
6864         (delete_int_or_uint_field), (delete_string_field): remove.
6865         (set_int_field), (set_uint_field): no need to re-check
6866         that we have the correct type for the field.
6867         (set_string_field): ditto and impl re-aligning any
6868         following fields.
6869         (decode_header_data): update to take into account that
6870         the fields aren't 4-byte aligned any more and the new
6871         way to distinguish padding from header fields. Also,
6872         don't exit when there is too much header padding.
6873         (process_test_subdir): print the directory.
6874         (_dbus_message_test): add test to make sure a following
6875         field is re-aligned correctly after field deletion.
6876         
6877         * dbus/dbus-string.[ch]:
6878         (_dbus_string_insert_bytes): rename from insert_byte and
6879         allow the insert of multiple bytes.
6880         (_dbus_string_test): test inserting multiple bytes.
6881
6882         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
6883         warning note to docs about having to re-align any
6884         marshalled values following the string.
6885         
6886         * dbus/dbus-message-builder.c:
6887         (append_string_field), (_dbus_message_data_load):
6888         don't align the header field.
6889         
6890         * dbus/dbus-auth.c: (process_test_subdir): print the
6891         directory.
6892         
6893         * test/break-loader.c: (randomly_add_one_byte): upd. for
6894         insert_byte change.
6895         
6896         * test/data/invalid-messages/bad-header-field-alignment.message:
6897         new test case.
6898         
6899         * test/data/valid-messages/unknown-header-field.message: shove
6900         a dict in the unknown field.
6901
6902 2003-09-25  Seth Nickell  <seth@gnome.org>
6903
6904         * python/dbus.py:
6905         * python/dbus_bindings.pyx.in:
6906
6907         Handle return values.
6908         
6909         * python/examples/example-client.py:
6910         * python/examples/example-service.py:
6911
6912         Pass back return values from the service to the client.
6913         
6914 2003-09-24  Seth Nickell  <seth@gnome.org>
6915
6916         * python/dbus.py:
6917
6918         Connect Object methods (when you are sharing an object) up... pass
6919         in a list of methods to be shared. Sharing all the methods just
6920         worked out too weird. You can now create nice Services over the
6921         DBus in Python. :-)
6922         
6923         * python/dbus_bindings.pyx.in:
6924
6925         Keep references to user_data tuples passed into C functions so 
6926         Python doesn't garbage collect on us.
6927
6928         Implement MethodReturn and Error subclasses of Message for creating
6929         DBusMessage's of those types.
6930         
6931         * python/examples/example-client.py:
6932         * python/examples/example-service.py:
6933
6934         Simple example code showing both how create DBus services and objects,
6935         and how to use them.
6936
6937 2003-09-23  Havoc Pennington  <hp@pobox.com>
6938
6939         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
6940
6941 2003-09-23  Havoc Pennington  <hp@redhat.com>
6942
6943         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
6944         (dbus_gproxy_disconnect_signal): implement
6945         (dbus_gproxy_manager_remove_signal_match): implement
6946         (dbus_gproxy_manager_add_signal_match): implement
6947         (dbus_gproxy_oneway_call): implement
6948
6949 2003-09-23  Havoc Pennington  <hp@pobox.com>
6950
6951         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
6952         subclass. This means dropping the transparent thread safety of the
6953         proxy; you now need a separate proxy per-thread, or your own
6954         locking on the proxy. Probably right anyway.
6955         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
6956
6957 2003-09-22  Havoc Pennington  <hp@redhat.com>
6958
6959         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
6960
6961 2003-09-21  Seth Nickell  <seth@gnome.org>
6962
6963         First checkin of the Python bindings.
6964         
6965         * python/.cvsignore:
6966         * python/Makefile.am:
6967         * python/dbus_bindings.pyx.in:
6968         * python/dbus_h_wrapper.h:
6969
6970         Pieces for Pyrex to operate on, building a dbus_bindings.so
6971         python module for low-level access to the DBus APIs.
6972         
6973         * python/dbus.py:
6974
6975         High-level Python module for accessing DBus objects.
6976
6977         * configure.in:
6978         * Makefile.am:
6979
6980         Build stuff for the python bindings.
6981
6982         * acinclude.m4:
6983
6984         Extra macro needed for finding the Python C header files.
6985
6986 2003-09-21  Havoc Pennington  <hp@pobox.com>
6987
6988         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
6989         implementing the proxy manager, didn't get very far.
6990
6991         * dbus/dbus-bus.c (dbus_bus_add_match): new
6992         (dbus_bus_remove_match): new
6993
6994         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
6995         path_name argument; adjust the other not-yet-implemented 
6996         gproxy constructors to be what I think they should be.
6997
6998 2003-09-21  Havoc Pennington  <hp@pobox.com>
6999
7000         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
7001         by default for message bus connections.
7002
7003         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
7004         exit_on_disconnect flag is set and we process the disconnected
7005         signal.
7006         (dbus_connection_set_exit_on_disconnect): new function
7007
7008 2003-09-21  Havoc Pennington  <hp@pobox.com>
7009
7010         Get matching rules mostly working in the bus; only actually
7011         parsing the rule text remains. However, the client side of
7012         "signal connections" hasn't been started, this patch is only the
7013         bus side.
7014         
7015         * dbus/dispatch.c: fix for the matching rules changes
7016         
7017         * bus/driver.c (bus_driver_handle_remove_match)
7018         (bus_driver_handle_add_match): send an ack reply from these
7019         method calls
7020
7021         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
7022         arguments, reported by Seth Nickell
7023
7024         * bus/config-parser.c (append_rule_from_element): support
7025         eavesdrop=true|false attribute on policies so match rules 
7026         can be prevented from snooping on the system bus.
7027
7028         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
7029         and "destination" in attribute names; fix some docs bugs; 
7030         add eavesdrop=true|false attribute
7031
7032         * bus/driver.c (bus_driver_handle_add_match)
7033         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
7034         messages
7035
7036         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
7037         rid of broadcast service concept, signals are just always broadcast
7038
7039         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
7040         mostly implement matching rules stuff (currently only exposed as signal
7041         connections)
7042
7043 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
7044
7045         * doc/dbus-specification.sgml: Change the header field name
7046         to be an enum and update the rest of the spec to reference
7047         the fields using the conventinal name.
7048
7049         * dbus/dbus-protocol.h: update to reflect the spec.
7050
7051         * doc/TODO: add item to remove the 4 byte alignment requirement.
7052         
7053         * dbus/dbus-message.c: Remove the code to generalise the
7054         header/body length and serial number header fields as named
7055         header fields so we can reference field names using the 
7056         protocol values.
7057         (append_int_field), (append_uint_field), (append_string_field):
7058         Append the field name as a byte rather than four chars.
7059         (delete_int_or_uint_field), (delete_string_field): reflect the
7060         fact that the field name and typecode now occupy 4 bytes instead
7061         of 8.
7062         (decode_string_field), (decode_header_data): update to reflect
7063         protocol changes and move the field specific encoding from
7064         decode_string_field() back into decode_header_data().
7065         
7066         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
7067         Add utility to aid debugging.
7068         
7069         * dbus/dbus-message-builder.c:
7070         (append_string_field), (_dbus_message_data_load): Update to
7071         reflect protocol changes; Change the FIELD_NAME directive
7072         to HEADER_FIELD and allow it to take the field's conventional
7073         name rather than the actual value.
7074         
7075         * test/data/*/*.message: Update to use HEADER_FIELD instead
7076         of FIELD_NAME; Always align the header on an 8 byte boundary
7077         *before* updating the header length.
7078
7079 2003-09-15  Havoc Pennington  <hp@pobox.com>
7080
7081         * dbus/dbus-pending-call.c: add the get/set object data
7082         boilerplate as for DBusConnection, etc. Use generic object data
7083         for the notify callback.
7084
7085         * glib/dbus-gparser.c (parse_node): parse child nodes
7086
7087         * tools/dbus-viewer.c: more hacking on the dbus-viewer
7088         
7089         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
7090         contain functions shared between the convenience lib and the
7091         installed lib
7092
7093         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
7094         -export-symbols-regex to the GLib library
7095
7096         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
7097         fix the locking in here, and add a default handler for
7098         Introspect() that just returns sub-nodes.
7099
7100 2003-09-14  Havoc Pennington  <hp@pobox.com>
7101
7102         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
7103         rather than gfoo consistent
7104
7105         * glib/dbus-gproxy.h: delete for now, move contents to
7106         dbus-glib.h, because the include files don't work right since we
7107         aren't in the dbus/ subdir.
7108         
7109         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
7110         (dbus_gproxy_end_call): finish
7111         (dbus_gproxy_begin_call): finish
7112
7113         * glib/dbus-gmain.c (dbus_set_g_error): new
7114
7115         * glib/dbus-gobject.c (handle_introspect): include information
7116         about child nodes in the introspection
7117
7118         * dbus/dbus-connection.c (dbus_connection_list_registered): new
7119         function to help in implementation of introspection
7120
7121         * dbus/dbus-object-tree.c
7122         (_dbus_object_tree_list_registered_and_unlock): new function
7123
7124 2003-09-12  Havoc Pennington  <hp@pobox.com>
7125
7126         * glib/dbus-gidl.h: add common base class for all the foo_info
7127         types
7128
7129         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
7130         similar to kdcop
7131
7132         * test/Makefile.am: try test srcdir -ef . in addition to test
7133         srcdir = ., one of them should work (yeah lame)
7134         
7135         * glib/Makefile.am: build the "idl" parser stuff as a convenience
7136         library
7137         
7138         * glib/dbus-gparser.h: make description_load routines return
7139         NodeInfo* not Parser*
7140
7141         * Makefile.am (SUBDIRS): build test dir after all library dirs
7142
7143         * configure.in: add GTK+ detection
7144
7145 2003-09-07  Havoc Pennington  <hp@pobox.com>
7146
7147         * Make Doxygen contented.
7148
7149 2003-09-07  Havoc Pennington  <hp@pobox.com>
7150
7151         * doc/dbus-specification.sgml: more updates
7152
7153 2003-09-06  Havoc Pennington  <hp@pobox.com>
7154
7155         * doc/dbus-specification.sgml: partial updates
7156
7157         * bus/dbus-daemon-1.1.in: fix the config file docs for the
7158         zillionth time; hopefully I edited the right file this time.
7159
7160         * bus/config-parser.c (append_rule_from_element): support
7161         send_type, send_path, receive_type, receive_path
7162
7163         * bus/policy.c: add message type and path to the list of things
7164         that can be "firewalled"
7165
7166 2003-09-06  Havoc Pennington  <hp@pobox.com>
7167
7168         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
7169         (dbus_connection_register_object_path): make this not handle
7170         messages to paths below the given path
7171
7172 2003-09-03  Havoc Pennington  <hp@pobox.com>
7173
7174         * test/glib/Makefile.am: add this with random glib-linked test
7175         programs
7176
7177         * glib/Makefile.am: remove the random test programs from here,
7178         leave only the unit tests
7179
7180         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
7181         uscore/javacaps conversion, and fix     
7182         (get_object_property, set_object_property): change to .NET
7183         convention for mapping props to methods, set_FooBar/get_FooBar, 
7184         since one language has such a convention we may as well copy it. 
7185         Plus real methods in either getFooBar or get_foo_bar style won't 
7186         collide with this convention.
7187
7188 2003-09-01  Havoc Pennington  <hp@pobox.com>
7189
7190         * glib/dbus-gparser.c: implement
7191
7192         * glib/dbus-gobject.c: start implementing skeletons support
7193
7194         * configure.in: when disabling checks/assert, also define
7195         G_DISABLE_ASSERT and G_DISABLE_CHECKS
7196
7197 2003-09-01  Havoc Pennington  <hp@pobox.com>
7198
7199         * glib/Makefile.am: rearrange a bunch of files and get "make
7200         check" framework set up
7201
7202 2003-08-31  Havoc Pennington  <hp@pobox.com>
7203
7204         * fix build with --disable-tests
7205
7206 2003-08-30  Havoc Pennington  <hp@pobox.com>
7207
7208         * dbus/dbus-connection.c: purge DBusMessageHandler
7209
7210         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
7211         use callbacks everywhere
7212
7213 2003-08-30  Havoc Pennington  <hp@pobox.com>
7214
7215         * test/data/valid-config-files/system.d/test.conf: change to 
7216         root for the user so warnings don't get printed
7217
7218         * dbus/dbus-message.c: add dbus_message_get_path,
7219         dbus_message_set_path
7220         
7221         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
7222         dispatching to a path
7223
7224         * dbus/dbus-string.c (_dbus_string_validate_path): add
7225
7226         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
7227         (_dbus_marshal_object_path): implement
7228
7229         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
7230         to contain the path to the target object
7231         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
7232         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
7233
7234 2003-08-30  Havoc Pennington  <hp@pobox.com>
7235
7236         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
7237
7238 2003-08-29  Havoc Pennington  <hp@pobox.com>
7239
7240         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
7241         registered
7242         (struct DBusObjectSubtree): shrink this
7243         a lot, since we may have a lot of them
7244         (_dbus_object_tree_free_all_unlocked): implement
7245         (_dbus_object_tree_dispatch_and_unlock): implement
7246
7247 2003-08-29  Havoc Pennington  <hp@pobox.com>
7248
7249         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
7250
7251 2003-08-28  Havoc Pennington  <hp@pobox.com>
7252
7253         purge DBusObjectID
7254         
7255         * dbus/dbus-connection.c: port to no ObjectID, create a
7256         DBusObjectTree, rename ObjectTree to ObjectPath in public API
7257
7258         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
7259         everything except UnregisterFunction and MessageFunction
7260         
7261         * dbus/dbus-marshal.c: port away from DBusObjectID, 
7262         add DBUS_TYPE_OBJECT_PATH
7263         
7264         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
7265         dbus/dbus-objectid.[hc]: remove these, we are moving to 
7266         path-based object IDs
7267
7268 2003-08-25  Havoc Pennington  <hp@pobox.com>
7269
7270         Just noticed that dbus_message_test is hosed, I wonder when I
7271         broke that. I thought make check was passing earlier...
7272         
7273         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
7274         container tree, will replace most of dbus-object-registry
7275
7276         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
7277         screwup
7278
7279 2003-08-19  Havoc Pennington  <hp@pobox.com>
7280
7281         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
7282         (dbus_message_is_error): fix this function
7283
7284         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
7285         match
7286
7287         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
7288         reflect clarified man page
7289         (bus_client_policy_check_can_send): ditto
7290         
7291         * bus/session.conf.in: fixup
7292
7293         * bus/system.conf.in: fixup
7294
7295 2003-08-18  Havoc Pennington  <hp@redhat.com>
7296
7297         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
7298
7299         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7300         dumb bug created earlier (wrong order of args to
7301         decode_header_data())
7302         
7303         * tools/dbus-send.c: port
7304
7305         * tools/dbus-print-message.c (print_message): port
7306
7307         * test/data/*messages: port all messages over
7308         
7309         * dbus/dbus-message-builder.c: support including 
7310         message type
7311         
7312         * bus/driver.c: port over
7313         
7314         * bus/dispatch.c: port over to new stuff
7315
7316         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7317         rename disconnect signal to "Disconnected"
7318
7319 2003-08-17  Havoc Pennington  <hp@pobox.com>
7320
7321         This doesn't compile yet, but syncing up so I can hack on it from
7322         work. What are branches for if not broken code? ;-)
7323         
7324         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
7325         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
7326         DBUS_HEADER_FIELD_ERROR_NAME
7327         
7328         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
7329         for the interface+member pairs
7330         (string_hash): change to use g_str_hash algorithm
7331         (find_direct_function, find_string_function): refactor these to
7332         share most code.
7333         
7334         * dbus/dbus-message.c: port all of this over to support 
7335         interface/member fields instead of name field
7336
7337         * dbus/dbus-object-registry.c: port over
7338         
7339         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
7340         from _dbus_string_validate_name
7341
7342         * bus/dbus-daemon-1.1: change file format for the 
7343         <deny>/<allow> stuff to match new message naming scheme
7344
7345         * bus/policy.c: port over
7346
7347         * bus/config-parser.c: parse new format
7348         
7349 2003-08-16  Havoc Pennington  <hp@pobox.com>
7350
7351         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
7352         broken assertion
7353
7354         * glib/dbus-gproxy.c: some hacking
7355
7356 2003-08-15  Havoc Pennington  <hp@redhat.com>
7357
7358         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
7359
7360         * dbus/dbus-connection.c
7361         (dbus_connection_send_with_reply_and_block): factor out internals;
7362         change to convert any error replies to DBusError instead of 
7363         returning them as a message
7364
7365 2003-08-15  Havoc Pennington  <hp@pobox.com>
7366
7367         * dbus/dbus-connection.c, 
7368         dbus/dbus-pending-call.c: Finish the pending call stuff
7369
7370 2003-08-14  Havoc Pennington  <hp@redhat.com>
7371
7372         * dbus/dbus-pending-call.c: start on new object that will replace
7373         DBusMessageHandler and ReplyHandlerData for tracking outstanding
7374         replies
7375
7376         * dbus/dbus-gproxy.c: start on proxy object used to communicate
7377         with remote interfaces
7378
7379         * dbus/dbus-gidl.c: do the boring boilerplate in here
7380         
7381 2003-08-12  Havoc Pennington  <hp@pobox.com>
7382
7383         * bus/dispatch.c (bus_dispatch): make this return proper 
7384         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
7385
7386         * dbus/dbus-errors.c (dbus_set_error): use
7387         _dbus_string_append_printf_valist
7388
7389         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
7390         (_dbus_string_append_printf): new
7391
7392         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
7393         UNKNOWN_METHOD
7394
7395         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
7396         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
7397         message is unhandled.
7398
7399 2003-08-11  Havoc Pennington  <hp@pobox.com>
7400
7401         * bus/test.c (client_disconnect_handler): change to return
7402         HANDLED (would have been REMOVE_MESSAGE)
7403
7404         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
7405         HANDLED/NOT_YET_HANDLED instead of
7406         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
7407         should be used.
7408
7409 2003-08-10  Havoc Pennington  <hp@pobox.com>
7410
7411         * tools/dbus-send.c (main): add --type argument, for now
7412         supporting only method_call and signal types.
7413
7414         * tools/dbus-print-message.c: print message type
7415
7416         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7417         init connection->objects
7418
7419         * doc/dbus-specification.sgml: fix sgml
7420
7421         * bus/*.c: port over to object-instance API changes
7422
7423         * test/test-service.c: ditto
7424         
7425         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
7426         name, we will have to fix up the rest of the code to also handle
7427         this
7428         (dbus_message_new): generic message-creation call
7429         (set_string_field): allow appending name field
7430
7431 2003-08-06  Havoc Pennington  <hp@pobox.com>
7432
7433         * dbus/dbus-object-registry.c: implement signal connection 
7434         and dispatch
7435
7436         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
7437
7438         * dbus/dbus-internals.c (_dbus_memdup): new function
7439
7440 2003-08-02  Havoc Pennington  <hp@pobox.com>
7441
7442         * dbus/dbus-message.c (dbus_message_get_no_reply)
7443         (dbus_message_set_no_reply): add these and remove
7444         set_is_error/get_is_error
7445
7446         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
7447         remove the ERROR flag, since there's now an ERROR type
7448
7449 2003-08-01  Havoc Pennington  <hp@pobox.com>
7450
7451         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
7452         implement
7453
7454         * dbus/dbus-message.c (dbus_message_get_type): new function
7455
7456         * doc/dbus-specification.sgml: add "type" byte to messages
7457
7458 2003-08-01  Havoc Pennington  <hp@pobox.com>
7459
7460         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
7461         a message type enum to distinguish kinds of message
7462         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
7463         that need not be replied to
7464
7465 2003-08-01  Havoc Pennington  <hp@pobox.com>
7466
7467         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
7468         (unpack_8_octets): fix no-64-bit-int bug
7469
7470         * dbus/dbus-object-registry.c (validate_id): validate the 
7471         connection ID bits, not just the instance ID.
7472
7473         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
7474         the connection-global 33 bits of the object ID
7475
7476         * dbus/dbus-object-registry.c (info_from_entry): fill in 
7477         object ID in the new way
7478
7479         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
7480         define server/client/instance bits.
7481
7482 2003-07-30  Havoc Pennington  <hp@pobox.com>
7483
7484         * dbus/dbus-connection.c (dbus_connection_register_object): fix
7485         build
7486
7487 2003-07-13  Havoc Pennington  <hp@pobox.com>
7488
7489         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
7490         fields to DBusObjectVTable and DBusObjectInfo
7491
7492 2003-07-12  Havoc Pennington  <hp@pobox.com>
7493
7494         * dbus/dbus-object-registry.c: implement unit test,
7495         fix bugs discovered in process
7496
7497         * dbus/dbus-connection.c: remove handler_table and
7498         register_handler(), add DBusObjectRegistry usage
7499
7500         * dbus/dbus-objectid.c (dbus_object_id_is_null)
7501         (dbus_object_id_set_null): new functions
7502
7503 2003-07-08  Havoc Pennington  <hp@pobox.com>
7504
7505         * dbus/dbus-object.c: implement some of this
7506
7507         * dbus/dbus-object-registry.c
7508         (_dbus_object_registry_add_and_unlock): fill in the object_id out
7509         param
7510         (_dbus_object_registry_new): handle OOM
7511
7512 2003-07-08  Havoc Pennington  <hp@pobox.com>
7513
7514         * dbus/dbus-object.h: sketch out an API for registering objects
7515         with a connection, that allows us to use as little as 24 bytes
7516         per object and lets application code represent an object in 
7517         any conceivable way.
7518
7519         * dbus/dbus-object-registry.c: implement the hard bits of the
7520         DBusConnection aspect of object API. Not yet wired up.
7521         
7522 2003-07-06  Havoc Pennington  <hp@pobox.com>
7523
7524         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
7525         (_dbus_marshal_object_id): new
7526         (_dbus_demarshal_object_id): new
7527         (_dbus_marshal_get_arg_end_pos): support object ID type, and
7528         consolidate identical switch cases. Don't conditionalize handling
7529         of DBUS_TYPE_UINT64, need to handle the type always.
7530         (_dbus_marshal_validate_arg): consolidate identical cases, and
7531         handle DBUS_TYPE_OBJECT_ID
7532
7533         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
7534
7535         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
7536
7537 2003-09-28  Havoc Pennington  <hp@pobox.com>
7538
7539         * real 0.13 release
7540
7541 2003-09-28  Havoc Pennington  <hp@pobox.com>
7542
7543         * doc/Makefile.am (dbus-specification.html): testing a funky hack
7544         to work with Debian db2html
7545
7546 2003-09-28  Havoc Pennington  <hp@pobox.com>
7547
7548         * configure.in: 0.13
7549
7550         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
7551         stylesheet-images for benefit of Debian
7552         
7553         Change back to using filesystem-linked sockets for the system
7554         bus, so only root can create the default system bus address.
7555         
7556         * bus/system.conf.in: change to use
7557         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7558
7559         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
7560         from here.
7561
7562         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7563         here, and AC_DEFINE DBUS_SYSTEM_PATH
7564
7565 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7566
7567         * doc/TODO:
7568         * doc/busconfig.dtd:
7569         Add busconfig DTD.
7570         
7571 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7572
7573         * doc/dbus-specification.sgml:
7574         Add activation reply values.
7575         
7576 2003-08-05  Havoc Pennington  <hp@redhat.com>
7577
7578         * configure.in: 0.12
7579
7580 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
7581
7582         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
7583         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
7584         (add_watch), (remove_watch), (create_source):
7585         Refcount fds, fixes some reentrancy issues.
7586         
7587 2003-07-30  Havoc Pennington  <hp@redhat.com>
7588
7589         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
7590         bus address to be abstract if we have abstract sockets
7591
7592         * NEWS: update
7593
7594 2003-07-28  Havoc Pennington  <hp@redhat.com>
7595
7596         * bus/messagebus.in: fix to avoid processname/servicename 
7597         confusion, from Michael Kearey
7598         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
7599         
7600 2003-07-23  Havoc Pennington  <hp@pobox.com>
7601
7602         * dbus/dbus-message.c (dbus_message_iter_get_named): 
7603         fix from Andy Hanton to remove broken "+1"
7604
7605 2003-07-16  Havoc Pennington  <hp@pobox.com>
7606
7607         * tools/dbus-launch.c (babysit): close stdout/stderr in the
7608         babysitter process, as suggested by Thomas Leonard, so 
7609         an "eval `dbus-launch --exit-with-session`" will actually 
7610         return
7611
7612 2003-07-16  Havoc Pennington  <hp@pobox.com>
7613
7614         * configure.in: print out EXPANDED_* variables in the summary at
7615         the end; clean up the code that computes EXPANDED_ variables and
7616         get the ones using exec_prefix right. Should make things work
7617         when you build without --prefix
7618
7619 2003-06-29  Havoc Pennington  <hp@pobox.com>
7620
7621         * mono/Test.cs (class Test): fire up a main loop and run it
7622
7623         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
7624         done once, the app has to do it
7625
7626 2003-06-26  Havoc Pennington  <hp@pobox.com>
7627
7628         * mono/Connection.cs: set up connection with the glib main loop
7629
7630 2003-07-01  Havoc Pennington  <hp@redhat.com>
7631
7632         * doc/dbus-specification.sgml: clarify the format of a type code,
7633         change suggested by Jim Blandy
7634
7635 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
7636
7637         * doc/Makefile.am:
7638         * tools/Makefile.am: Don't assume srcdir == builddir.
7639
7640         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
7641         the allocated block.
7642         (_dbus_memory_test): New function.
7643         * dbus/dbus-test.h: Add _dbus_memory_test ().
7644         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
7645
7646         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
7647         of %c%c%c%c.
7648         (dbus_message_new): Remove obsolete @todo.
7649
7650         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
7651         (_dbus_marshal_set_uint64): Fix comment.
7652
7653         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
7654         hardcode FIELD_REPLY_SERIAL.
7655
7656         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
7657         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
7658
7659         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
7660         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
7661
7662 2003-06-24  Havoc Pennington  <hp@pobox.com>
7663
7664         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
7665
7666 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
7667
7668         * configure.in:
7669         * gcj/.cvsignore:
7670         * gcj/Hello.java:
7671         * gcj/Makefile.am:
7672         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
7673         * gcj/org/.cvsignore:
7674         * gcj/org/Makefile.am:
7675         * gcj/org/freedesktop/.cvsignore:
7676         * gcj/org/freedesktop/Makefile.am:
7677         * gcj/org/freedesktop/dbus/.cvsignore:
7678         * gcj/org/freedesktop/dbus/Makefile.am:
7679         * gcj/org/freedesktop/dbus/Message.java: (Message),
7680         (Message.Message):
7681         * gcj/org/freedesktop/dbus/natMessage.cc:
7682         Fix the build system.
7683
7684 2003-06-22  Havoc Pennington  <hp@pobox.com>
7685
7686         * mono/Connection.cs: add more bindings
7687
7688         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
7689         more than once.
7690
7691 2003-06-22  Havoc Pennington  <hp@pobox.com>
7692
7693         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
7694         Start wrapping more stuff.
7695
7696 2003-06-22  Havoc Pennington  <hp@pobox.com>
7697
7698         * mono/Message.cs: implement Message.Wrap() that ensures we only
7699         have a single C# wrapper per DBusMessage, assuming it works which
7700         it probably doesn't.
7701
7702         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
7703         (dbus_message_free_data_slot): new
7704         (dbus_message_set_data): new
7705         (dbus_message_get_data): new
7706
7707 2003-06-22  Havoc Pennington  <hp@pobox.com>
7708
7709         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
7710         (_dbus_data_slot_allocator_alloc): rework these to keep a
7711         reference count on each slot and automatically manage a global
7712         slot ID variable passed in by address
7713
7714         * bus/bus.c: convert to new dataslot API
7715
7716         * dbus/dbus-bus.c: convert to new dataslot API
7717
7718         * dbus/dbus-connection.c: convert to new dataslot API
7719
7720         * dbus/dbus-server.c: convert to new dataslot API
7721
7722         * glib/dbus-gmain.c: ditto
7723
7724         * bus/test.c: ditto
7725
7726         * bus/connection.c: ditto
7727
7728 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
7729
7730         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
7731         after the gcj checks so that the correct configuration tags
7732         will be added to libtool.
7733
7734         * dbus-glib-1.pc.in: No need to specify any includes since
7735         dbus-1.pc.in has those.
7736
7737 2003-06-22  Havoc Pennington  <hp@pobox.com>
7738
7739         * mono/*, gcj/*, configure.in, Makefile.am:
7740         Check in makefiles and subdirs for mono and gcj bindings.
7741         Neither binding actually exists, just trying to get through
7742         all the build and other boring bits.
7743
7744 2003-06-21  Philip Blundell  <philb@gnu.org>
7745
7746         * tools/dbus-monitor.1: Updated.
7747
7748         * tools/dbus-send.1: Likewise.
7749
7750 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
7751
7752         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
7753         for hangup and error after checking read so we won't discard
7754         pending data if both hangup and read are set.
7755
7756 2003-06-19  Philip Blundell  <philb@gnu.org>
7757
7758         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
7759
7760         * tools/dbus-send.c: Accept both --system and --session.
7761
7762         * tools/dbus-monitor.c: Same here.
7763
7764 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
7765
7766         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
7767         from C++ (Patch by Miloslav Trmac).
7768
7769 2003-06-15  Joe Shaw  <joe@assbarn.com>
7770
7771         * configure.in: Check for socklen_t.
7772
7773         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
7774
7775         * test/test-segfault.c: Add #include <sys/time.h>
7776
7777         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
7778         dbus-launch needs it.
7779
7780 2003-06-09  Havoc Pennington  <hp@redhat.com>
7781
7782         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
7783         SUN_LEN, it breaks abstract socket usage
7784
7785         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
7786         starts of lines.
7787
7788 2003-06-04  Havoc Pennington  <hp@pobox.com>
7789
7790         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
7791         using unix:abstract=/foo, and when listening in a tmpdir
7792         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
7793
7794         * dbus/dbus-transport.c (_dbus_transport_open): support
7795         unix:abstract=/foo
7796
7797         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7798         support abstract sockets
7799
7800         * dbus/dbus-transport-unix.c
7801         (_dbus_transport_new_for_domain_socket): support abstract sockets
7802
7803         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
7804         toggle as an argument, implement abstract namespace support
7805         (_dbus_listen_unix_socket): ditto
7806
7807         * configure.in: add --enable-abstract-sockets and implement
7808         a configure check for autodetection of the right value.
7809
7810 2003-06-01  Havoc Pennington  <hp@pobox.com>
7811
7812         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
7813         in /tmp (though on Linux this will end up being useless,
7814         when we add abstract namespace support)
7815
7816         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
7817         subst'ing it
7818
7819 2003-05-28  Colin Walters  <walters@verbum.org>
7820
7821         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
7822
7823 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
7824
7825         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
7826
7827 2003-05-17  Colin Walters  <walters@gnu.org>
7828
7829         * tools/dbus-send.c: Don't exit with an error code if --help was
7830         passed.  Default to using the session bus instead of the system
7831         one.
7832
7833         * tools/dbus-launch.c: Ditto.
7834
7835         * tools/dbus-monitor.c: Ditto.
7836
7837         * tools/dbus-send.1: Update with new arguments.
7838
7839         * tools/dbus-launch.c: Emit code to export variables.  New
7840         arguments -s and -c to specify shell syntax, and a bit of code to
7841         autodetect syntax.  Also, allow specifying a program to run.
7842
7843         * tools/dbus-launch.1: Update with new arguments.
7844
7845         * tools/dbus-send.1: Ditto.
7846
7847         * tools/dbus-monitor.1: Ditto.
7848
7849 2003-05-17  Havoc Pennington  <hp@pobox.com>
7850
7851         * bus/config-parser.c (merge_included): merge in policies from
7852         child configuration file.
7853
7854         * bus/policy.c (bus_policy_merge): function to merge two policies
7855         together
7856
7857 2003-05-16  Havoc Pennington  <hp@redhat.com>
7858
7859         * dbus/dbus-connection.c: disable verbose lock spew
7860
7861         * tools/dbus-send.c: add --print-reply command line option
7862
7863         * tools/dbus-print-message.h (print_message): new util function
7864         shared by dbus-send and dbus-monitor
7865
7866         * tools/dbus-monitor.c (handler_func): exit on disconnect
7867
7868         * dbus/dbus-transport-unix.c (do_reading): if the transport is
7869         disconnected, don't try to use the read_watch
7870
7871         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
7872         so we can find this bug more easily
7873
7874 2003-05-16  Havoc Pennington  <hp@redhat.com>
7875
7876         * bus/policy.c (free_rule_list_func): avoid a crash when passed
7877         NULL as DBusHashTable is annoyingly likely to do.
7878
7879 2003-05-16  Colin Walters  <walters@verbum.org>
7880
7881         * tools/dbus-monitor.c: Add --session argument and usage()
7882         function.
7883
7884         * tools/dbus-monitor.1: Update with new --session arg.
7885
7886         * bus/Makefile.am (install-data-hook): Create
7887         $(libdir)/dbus-1.0/services so that the session bus is happy.
7888
7889 2003-05-15  Havoc Pennington  <hp@redhat.com>
7890
7891         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
7892         on non-x86. ifdef's are evil.
7893
7894 2003-05-15  Havoc Pennington  <hp@redhat.com>
7895
7896         * configure.in: 0.11
7897
7898         * NEWS: update
7899
7900         * bus/Makefile.am (initddir): apparently we are supposed to put
7901         init scripts in /etc/rc.d/init.d not /etc/init.d
7902
7903         * bus/Makefile.am: remove the "you must --enable-tests to make
7904         check" as it broke distcheck
7905
7906         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
7907
7908 2003-05-13  James Willcox  <jwillcox@gnome.org>
7909
7910         * configure.in:
7911         * bus/activation.c: (bus_activation_service_created),
7912         (bus_activation_activate_service):
7913         * bus/driver.c: (bus_driver_send_service_deleted),
7914         (bus_driver_send_service_created), (bus_driver_send_service_lost),
7915         (bus_driver_send_service_acquired),
7916         (bus_driver_send_welcome_message),
7917         (bus_driver_handle_list_services):
7918         * bus/session.conf.in:
7919         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
7920         (dbus_bus_service_exists), (dbus_bus_activate_service):
7921         * dbus/dbus-bus.h:
7922
7923         Add some convenience API which lets you activate a service, and did a
7924         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
7925         and dbus_message_get_args()
7926
7927 2003-05-11  Havoc Pennington  <hp@pobox.com>
7928
7929         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
7930         calling _dbus_marshal_validate_arg() for every byte in a byte
7931         array, etc.
7932
7933         * dbus/dbus-message-handler.c: use atomic reference counting to
7934         reduce number of locks slightly; the global lock in here sucks
7935
7936         * dbus/dbus-connection.c
7937         (_dbus_connection_update_dispatch_status_and_unlock): variant of
7938         update_dispatch_status that can be called with lock held; then use
7939         in a couple places to reduce locking/unlocking
7940         (dbus_connection_send): hold the lock over the whole function
7941         instead of acquiring it twice.
7942
7943         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
7944
7945         * bus/connection.c (bus_connections_setup_connection): fix access
7946         to already-freed memory.
7947
7948         * dbus/dbus-connection.c: keep a little cache of linked list
7949         nodes, to avoid using the global linked list alloc lock in the
7950         normal send-message case. Instead we just use the connection lock
7951         that we already have to take.
7952
7953         * dbus/dbus-list.c (_dbus_list_find_last): new function
7954
7955         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
7956         change to use a struct for the atomic type; fix docs,
7957         they return value before increment, not after increment.
7958
7959         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
7960         (_dbus_string_append_8_aligned): new functions to try to
7961         microoptimize this operation.
7962         (reallocate_for_length): break this out of set_length(), to
7963         improve profile info, and also so we can consider inlining the
7964         set_length() part.
7965
7966         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
7967         strings with some preallocation, cuts down on our calls to realloc
7968         a fair bit. Though if we can get the "move entire string to empty
7969         string" optimization below to kick in here, it would be better.
7970
7971         * dbus/dbus-string.c (_dbus_string_move): just call
7972         _dbus_string_move_len
7973         (_dbus_string_move_len): add a special case for moving
7974         an entire string into an empty string; we can just
7975         swap the string data instead of doing any reallocs.
7976         (_dbus_string_init_preallocated): new function
7977
7978 2003-05-11  Havoc Pennington  <hp@pobox.com>
7979
7980         Write a "test-profile" that does echo client-server with threads;
7981         profile reveals lock contention, memcpy/realloc of buffers, and
7982         UTF-8 validation as hot spots. 20% of lock contention eliminated
7983         with dbus_atomic_inc/dec implementation on x86.  Much remaining
7984         contention is global mempool locks for GList and DBusList.
7985
7986         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
7987         x86 implementation
7988
7989         * dbus/dbus-connection.c (struct DBusConnection): use
7990         dbus_atomic_t for the reference count
7991
7992         * dbus/dbus-message.c (struct DBusMessage): declare
7993         dbus_atomic_t values as volatile
7994
7995         * configure.in: code to detect ability to use atomic integer
7996         operations in assembly, from GLib patch
7997
7998         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
7999         time, tired of it being wrong in threads and forked processes
8000
8001         * glib/test-profile.c: a little program to bounce messages back
8002         and forth between threads and eat CPU
8003
8004         * dbus/dbus-connection.c: add debug spew macros for debugging
8005         thread locks; include config.h at top; fix deadlock in
8006         dbus_connection_flush()
8007
8008 2003-05-08  Havoc Pennington  <hp@pobox.com>
8009
8010         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
8011         data from getting written, and there wasn't a good reason to
8012         use _exit really.
8013
8014         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
8015         dbus_verbose lines in test coverage
8016         (main): add list of functions sorted by # of untested blocks
8017         to the coverage report
8018
8019         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
8020
8021         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
8022
8023         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
8024         extend test coverage
8025
8026         * test/data/auth/cancel.auth-script: test canceling an
8027         authentication
8028
8029         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
8030         aren't used. in CVS history if we end up needing them.
8031
8032 2003-05-04  Havoc Pennington  <hp@pobox.com>
8033
8034         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
8035         unit test
8036
8037         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
8038         function, which assumed length was in # of strings, not bytes
8039
8040         * dbus/dbus-message.c (_dbus_message_test): add tests for some
8041         missing coverage
8042
8043         * dbus/dbus-connection.c
8044         (_dbus_connection_queue_received_message): disable function for
8045         now, we are only using it in test mode
8046
8047         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
8048         remove a mistaken FIXME
8049
8050 2003-05-04  Havoc Pennington  <hp@pobox.com>
8051
8052         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
8053         unlock mutex on successful return, patch from Anders Gustafsson
8054
8055 2003-05-04  Havoc Pennington  <hp@pobox.com>
8056
8057         * dbus-glib-1.pc.in (Requires): fix dependencies, from
8058         Anders Gustafsson
8059
8060 2003-05-04  Havoc Pennington  <hp@pobox.com>
8061
8062         * tools/dbus-launch.c: implement
8063
8064         * bus/main.c (main), bus/bus.c (bus_context_new):
8065         implement --print-pid and --fork
8066
8067 2003-05-03  Havoc Pennington  <hp@redhat.com>
8068
8069         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
8070         the address had no value, and add to test suite. Fix and
8071         regression test from Miloslav Trmac
8072
8073 2003-05-03  Havoc Pennington  <hp@pobox.com>
8074
8075         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
8076         watch is invalid when handled
8077
8078         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
8079         dbus-launch utility to launch the bus from a shell script.  Didn't
8080         actually implement dbus-launch yet, it's just a placeholder still.
8081
8082 2003-05-03  Havoc Pennington  <hp@pobox.com>
8083
8084         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
8085         daemon; also documents daemon config file, so replaces
8086         doc/config-file.txt. Corrected some stuff from config-file.txt in
8087         the process of moving it.
8088
8089 2003-05-03  Havoc Pennington  <hp@pobox.com>
8090
8091         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
8092         add some man pages
8093
8094 2003-05-03  Colin Walters  <walters@verbum.org>
8095
8096         * dbus/dbus-sysdeps.c (fill_user_info): Test against
8097         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
8098
8099         * Makefile.am: Update to use new .pc versioning scheme.
8100
8101 2003-05-02  Havoc Pennington  <hp@redhat.com>
8102
8103         * bus/system.conf.in: allow send/receive to/from message bus
8104         service
8105
8106 2003-04-30  Havoc Pennington  <hp@redhat.com>
8107
8108         * configure.in: print a note when building with unit tests and
8109         without assertions
8110
8111 2003-04-30  Havoc Pennington  <hp@redhat.com>
8112
8113         * Makefile.am: add a check-local that complains if you didn't
8114         configure with --enable-tests
8115
8116 2003-04-29  Havoc Pennington  <hp@redhat.com>
8117
8118         * glib/dbus-gmain.c: docs cleanups
8119
8120         * dbus/dbus-types.h: add docs on int64 types
8121
8122         * dbus/dbus-memory.c: fix docs to avoid putting private API in
8123         public API docs section
8124
8125 2003-04-29  Havoc Pennington  <hp@redhat.com>
8126
8127         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
8128         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
8129         parallel install API version, not with the D-BUS package version.
8130
8131         * HACKING: move some of README over here
8132
8133         * README: updates, and document API/ABI policy
8134
8135         * configure.in: reindentation
8136
8137 2003-04-29  Havoc Pennington  <hp@redhat.com>
8138
8139         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
8140         to use this library" to be sure people have the right
8141         expectations.
8142
8143 2003-04-28  Havoc Pennington  <hp@redhat.com>
8144
8145         * configure.in: add --enable-docs which by default is auto yes if
8146         doxygen and db2html found, no otherwise; but can be forced on/off
8147
8148         * doc/Makefile.am: conditionalize whether to build docs on
8149         --enable-docs
8150
8151 2003-04-28  Havoc Pennington  <hp@redhat.com>
8152
8153         * configure.in: 0.10
8154
8155         * NEWS: update
8156
8157         * bus/system.conf.in: add <includedir>system.d</includedir>
8158
8159         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
8160         username was provided but not uid
8161
8162         * bus/config-parser.c (struct BusConfigParser): keep track of
8163         whether the parser is toplevel or was included; change some
8164         of the error handling if it's included.
8165
8166 2003-04-27  Havoc Pennington  <hp@pobox.com>
8167
8168         Unbreak my code...
8169
8170         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8171         report correct status if we finish processing authentication
8172         inside this function.
8173
8174         * bus/activation.c (try_send_activation_failure): use
8175         bus_transaction_send_error_reply
8176
8177         * bus/connection.c (bus_connection_get_groups): return an error
8178         explaining the problem
8179
8180         * bus/bus.c (bus_context_check_security_policy): implement
8181         restriction here that inactive connections can only send the
8182         hello message. Also, allow bus driver to send anything to
8183         any recipient.
8184
8185         * bus/connection.c (bus_connection_complete): create the
8186         BusClientPolicy here instead of on-demand.
8187         (bus_connection_get_policy): don't return an error
8188
8189         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
8190         sender field in message being replied to
8191
8192         * bus/bus.c (bus_context_check_security_policy): fix silly typo
8193         causing it to return FALSE always
8194
8195         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
8196         we checked sender rather than destination
8197
8198 2003-04-25  Havoc Pennington  <hp@redhat.com>
8199
8200         test suite is slightly hosed at the moment, will fix soon
8201
8202         * bus/connection.c (bus_connections_expire_incomplete): fix to
8203         properly disable the timeout when required
8204         (bus_connection_set_name): check whether we can remove incomplete
8205         connections timeout after we complete each connection.
8206
8207         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
8208         probably still broken.
8209
8210         * bus/services.c (bus_registry_acquire_service): implement max
8211         number of services owned, and honor allow/deny rules on which
8212         services a connection can own.
8213
8214         * bus/connection.c (bus_connection_get_policy): report errors here
8215
8216         * bus/activation.c: implement limit on number of pending
8217         activations
8218
8219 2003-04-25  Havoc Pennington  <hp@redhat.com>
8220
8221         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
8222         where we used >= 0 instead of != DBUS_UID_UNSET.
8223
8224 2003-04-25  Havoc Pennington  <hp@redhat.com>
8225
8226         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
8227         were toggled without add/remove, fix from Anders Gustafsson
8228
8229 2003-04-24  Havoc Pennington  <hp@redhat.com>
8230
8231         * test/data/valid-config-files/basic.conf: add <limit> tags to
8232         this test
8233
8234         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
8235         <limit> tag in configuration file.
8236
8237 2003-04-24  Havoc Pennington  <hp@redhat.com>
8238
8239         * bus/dispatch.c: somehow missed some name_is
8240
8241         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
8242         (_dbus_timeout_set_interval): new
8243
8244         * bus/connection.c (bus_connections_setup_connection): record time
8245         when each connection is first set up, and expire them after the
8246         auth timeout passes.
8247
8248 2003-04-24  Havoc Pennington  <hp@redhat.com>
8249
8250         * dbus/dbus-message.c (dbus_message_name_is): rename
8251         (dbus_message_service_is): rename
8252         (dbus_message_sender_is): rename
8253         (dbus_message_get_service): rename
8254
8255 2003-04-24  Havoc Pennington  <hp@redhat.com>
8256
8257         * configure.in: add --enable-checks
8258
8259         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
8260
8261         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
8262         to use thread locks.
8263         (_dbus_connection_handler_destroyed_locked): move some private
8264         functions into proper docs group
8265
8266         * dbus/dbus-internals.h: add _dbus_return_if_fail,
8267         _dbus_return_val_if_fail
8268
8269         Throughout: use dbus_return_if_fail
8270
8271 2003-04-23  James Willcox  <jwillcox@gnome.org>
8272
8273         * glib/dbus-glib.h:
8274         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
8275         (dbus_connection_setup_with_g_main),
8276         (dbus_server_setup_with_g_main):
8277         * glib/test-dbus-glib.c: (main):
8278         * glib/test-thread-client.c: (main):
8279         * glib/test-thread-server.c: (new_connection_callback), (main):
8280         * tools/dbus-monitor.c: (main):
8281
8282         Added a GMainContext argument to dbus_connection_setup_with_g_main()
8283         and dbus_server_setup_with_g_main().
8284
8285 2003-04-20  Havoc Pennington  <hp@pobox.com>
8286
8287         * doc/dbus-specification.sgml: document the restrictions on
8288         message and service names
8289
8290 2003-04-22  Havoc Pennington  <hp@redhat.com>
8291
8292         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
8293         support, and do some code cleanups to share more code and
8294         speed up array marshal/demarshal.
8295
8296         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
8297
8298         * configure.in: generate dbus-arch-deps.h
8299
8300         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
8301         64-bit typecodes
8302
8303 2003-04-22  Havoc Pennington  <hp@redhat.com>
8304
8305         * test/data/valid-messages/opposite-endian.message: fix test
8306         to use proper type for rply field
8307
8308         * test/data/invalid-messages: add tests for below validation
8309
8310         * dbus/dbus-message.c (decode_header_data): validate field types,
8311         and validate that named fields are valid names
8312         (decode_name_field): consider messages in the
8313         org.freedesktop.Local. namespace to be invalid.
8314
8315         * dbus/dbus-string.c (_dbus_string_validate_name): new
8316
8317 2003-04-19  Havoc Pennington  <hp@pobox.com>
8318
8319         * bus/driver.c (bus_driver_handle_hello): check limits and
8320         return an error if they are exceeded.
8321
8322         * bus/connection.c: maintain separate lists of active and inactive
8323         connections, and a count of each. Maintain count of completed
8324         connections per user. Implement code to check connection limits.
8325
8326         * dbus/dbus-list.c (_dbus_list_unlink): export
8327
8328         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
8329         number of bytes in the message queue for a connection
8330
8331 2003-04-18  Havoc Pennington  <hp@pobox.com>
8332
8333         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
8334
8335         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
8336         memleaks
8337
8338         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
8339         on realloc be sure to update the pointer in the keyring
8340
8341         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
8342         offset to avoid writing to unallocated memory
8343
8344         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
8345         try the next mechanism, so we properly handle OOM
8346
8347         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
8348         on OOM.
8349         (_dbus_keyring_new): fix OOM bug
8350         (_dbus_keyring_new_homedir): always set error; impose a maximum
8351         number of keys we'll load from the file, mostly to speed up the
8352         test suite and make its OOM checks more useful, but also for
8353         general sanity.
8354
8355         * dbus/dbus-auth.c (process_error_server): reject authentication
8356         if we get an error from the client
8357         (process_cancel): on cancel, send REJECTED, per the spec
8358         (process_error_client): send CANCEL if we get an error from the
8359         server.
8360
8361 2003-04-18  Havoc Pennington  <hp@pobox.com>
8362
8363         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
8364         debug spew
8365
8366         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
8367         handling problem
8368
8369         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
8370         about DBUS_TEST_HOMEDIR once
8371
8372         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
8373         the environment
8374
8375         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
8376         config file so we test the right thing
8377
8378         Throughout: assorted docs improvements
8379
8380 2003-04-18  Havoc Pennington  <hp@pobox.com>
8381
8382         * glib/dbus-gmain.c: adapt to watch changes
8383
8384         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
8385
8386         * dbus/dbus-server.h: remove dbus_server_handle_watch
8387
8388         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
8389
8390         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
8391         like DBusTimeout, so we don't need dbus_connection_handle_watch
8392         etc.
8393
8394 2003-04-17  Havoc Pennington  <hp@redhat.com>
8395
8396         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
8397         database usage so it all goes via the DBusUserDatabase cache.
8398
8399 2003-04-17  Havoc Pennington  <hp@redhat.com>
8400
8401         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
8402         there was an OOM watch we skipped, we always return TRUE so we
8403         iterate again to have a look at it again. Fixes test suite hang.
8404         Code rearrangement also lets us lose some memset and only iterate
8405         over callbacks once.
8406
8407         * bus/driver.c (bus_driver_handle_message): sense of test for
8408         reply was backward
8409
8410 2003-04-16  Havoc Pennington  <hp@pobox.com>
8411
8412         * doc/dbus-specification.sgml: make spec say serials are unsigned
8413
8414         * dbus/dbus-message.h: change message serials to unsigned
8415
8416         * dbus/dbus-connection.c: adapt to message serials being unsigned
8417
8418 2003-04-15  Havoc Pennington  <hp@pobox.com>
8419
8420         * bus/bus.c: create and keep around a shared DBusUserDatabase
8421         object.
8422
8423         * bus/connection.c (bus_connection_get_groups): don't cache
8424         groups for user in the connection object, since user database
8425         object now does that.
8426
8427 2003-04-16  Havoc Pennington  <hp@redhat.com>
8428
8429         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
8430         list of size counters
8431         (_dbus_message_loader_putback_message_link): put back a popped link
8432
8433         * dbus/dbus-connection.c
8434         (dbus_connection_set_max_live_messages_size): rename
8435         max_received_size
8436         (dbus_connection_get_outgoing_size): get size of outgoing
8437         queue
8438         (_dbus_connection_set_connection_counter): remove this cruft
8439
8440 2003-04-14  Havoc Pennington  <hp@redhat.com>
8441
8442         * dbus/dbus-userdb.c: user database abstraction, mostly to get
8443         caching, but at some point we might want to be able to use a
8444         different database.
8445
8446         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
8447         SHA1 conf file to test the sha1 auth mechanism, since the regular
8448         test always uses EXTERNAL when available.
8449
8450         * configure.in,
8451         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
8452         add conf file that requires use of sha1 auth
8453
8454 2003-04-13  Havoc Pennington  <hp@pobox.com>
8455
8456         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
8457         from Philip Blundell to send messages and monitor them.
8458
8459 2003-04-13  Havoc Pennington  <hp@pobox.com>
8460
8461         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
8462         callbacks
8463
8464         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
8465         users
8466
8467         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8468         fix to only recover unused bytes if we're already authenticated
8469         (_dbus_transport_get_is_authenticated): fix to still mark us
8470         authenticated if there are unused bytes.
8471
8472         * bus/dispatch.c: implement security policy checking
8473
8474         * bus/connection.c (bus_transaction_send_from_driver): new
8475
8476         * bus/bus.c (bus_context_check_security_policy): new
8477
8478         * bus/dispatch.c (send_service_nonexistent_error): delete this,
8479         now we just set the DBusError and it gets converted to an error
8480         reply.
8481
8482         * bus/connection.c (allow_user_function): enable code using actual
8483         data from the config file
8484
8485         * bus/policy.c (list_allows_user): handle wildcard rules for
8486         user/group connection perms
8487
8488 2003-04-13  Havoc Pennington  <hp@pobox.com>
8489
8490         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
8491
8492         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
8493
8494         * bus/policy.c (bus_policy_append_mandatory_rule)
8495         (bus_policy_append_default_rule, bus_policy_append_user_rule)
8496         (bus_policy_append_group_rule): new functions
8497
8498 2003-04-12  Havoc Pennington  <hp@pobox.com>
8499
8500         * bus/config-parser.c (bus_config_parser_new): fix a memleak
8501
8502         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
8503         the pid/gid/uid, just for paranoia.
8504
8505         * test/break-loader.c (randomly_do_n_things): find a byte
8506         containing a type code, and randomly change it to a different
8507         type code.
8508
8509 2003-04-12  Havoc Pennington  <hp@pobox.com>
8510
8511         * bus/policy.h: change BusPolicy to be the thing from the config
8512         file, and rename old BusPolicy to BusClientPolicy
8513
8514         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
8515         match change in how policy works
8516
8517         * dbus/dbus-internals.h: mark assert_not_reached as
8518         __attribute((noreturn))__
8519
8520 2003-04-11  Havoc Pennington  <hp@redhat.com>
8521
8522         * doc/dbus-specification.sgml: fix a spot with the wrong name for
8523         the broadcast service. Use boolean return for ServiceExists.
8524
8525 2003-04-11  Havoc Pennington  <hp@redhat.com>
8526
8527         * configure.in: add another directory to look for qt in.
8528
8529 2003-04-11  Havoc Pennington  <hp@redhat.com>
8530
8531         * AUTHORS: add Colin Walters
8532
8533 2003-04-11  Havoc Pennington  <hp@redhat.com>
8534
8535         * NEWS: update
8536
8537         * configure.in: 0.9
8538
8539 2003-04-11  Havoc Pennington  <hp@redhat.com>
8540
8541         * bus/messagebus.in: remove pid file when stopping the
8542         message bus, since the bus won't have privileges to remove it
8543         itself.
8544
8545 2003-04-11  Havoc Pennington  <hp@redhat.com>
8546
8547         * bus/bus.c (bus_context_new): move credentials change after
8548         creating pidfile
8549
8550 2003-04-11  Havoc Pennington  <hp@pobox.com>
8551
8552         * test/decode-gcov.c: add "below average functions" to the
8553         coverage report, and change how some of the code works.
8554
8555         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
8556         not in the coverage stats.
8557
8558         * test/test-service.c (main): use _dbus_verbose not fprintf in a
8559         couple places so running the test suite doesn't result in megaspam.
8560
8561 2003-04-11  Havoc Pennington  <hp@pobox.com>
8562
8563         * bus/dispatch.c (check_existent_service_activation): accept a no
8564         memory error in a place we didn't before
8565
8566         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
8567         in case the first one failed," since the test suite is less
8568         broken now.
8569
8570 2003-04-10  Havoc Pennington  <hp@pobox.com>
8571
8572         * bus/dispatch.c (check_segfault_service_activation): add test
8573         for launching an executable that just crashes.
8574
8575         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
8576         don't leave a million cores. We'll see how portable this is.
8577
8578 2003-04-10  Havoc Pennington  <hp@pobox.com>
8579
8580         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
8581         the possible parent failures before we fork, so that we don't
8582         fail to create a babysitter after creating the child.
8583
8584         * bus/activation.c (bus_activation_activate_service): kill child
8585         if we don't successfully complete the activation.
8586
8587 2003-04-10  Havoc Pennington  <hp@redhat.com>
8588
8589         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
8590         the connection if it's disconnected
8591
8592         * bus/activation.c (bus_activation_service_created): use new
8593         transaction features to roll back removal of pending activation if
8594         we don't successfully create the service after all. Don't remove
8595         pending activation if the function fails.
8596
8597         * dbus/dbus-list.c (_dbus_list_insert_before_link)
8598         (_dbus_list_insert_after_link): new code to facilitate
8599         services.c fixes
8600
8601         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
8602         new functionality, so we can preallocate the ability to insert
8603         into a hash table.
8604
8605         * bus/connection.c (bus_transaction_add_cancel_hook): new function
8606         allowing us to put custom hooks in a transaction to be used for
8607         cancelling said transaction
8608
8609         * doc/dbus-specification.sgml: add some discussion of secondary
8610         service owners, and disallow zero-length service names
8611
8612         * bus/services.c (bus_registry_acquire_service): new function,
8613         splits out part of bus_driver_handle_acquire_service() and fixes
8614         a bug where we didn't remove the service doing the acquiring
8615         from the secondary queue if we failed to remove the current owner
8616         from the front of the queue.
8617
8618 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8619
8620         * doc/dbus-specification.sgml:
8621         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
8622
8623 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8624
8625         * bus/.cvsignore:
8626         * glib/.cvsignore:
8627         * test/.cvsignore:
8628         Added files to cvsignore
8629
8630         * dbus/dbus-message.h:
8631         * dbus/dbus-message.c: (dbus_message_iter_get_named):
8632         Make get_named() take two out argument and return a boolean.
8633         (dbus_message_iter_get_args_valist):
8634         Update usage of get_named().
8635         (dbus_message_iter_append_byte):
8636         Fix typo
8637         (dbus_message_iter_append_named)
8638         Fix typo
8639         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
8640         More tests.
8641
8642 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8643
8644         * dbus/dbus-marshal.[ch]:
8645         Add array_type_pos argument to _dbus_marshal_validate_arg.
8646         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
8647
8648         * dbus/dbus-message.[ch]:
8649         Multi-dimensional arrays have full type specification in the
8650         outermost array. Iter code re-arranged to handle this.
8651         Added some more iter tests.
8652
8653         * doc/dbus-specification.sgml:
8654         Add me to authors.
8655         Remove old FIXME.
8656         Update new array encoding description.
8657         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
8658
8659         * test/data/invalid-messages/array-with-mixed-types.message:
8660         * test/data/valid-messages/array-of-array-of-uint32.message:
8661         Change to the new array format.
8662
8663         * test/data/invalid-messages/too-short-dict.message:
8664         Fix bug in test.
8665
8666         * test/data/valid-messages/recursive-types.message:
8667         Fix up and extend test.
8668
8669 2003-04-10  Havoc Pennington  <hp@pobox.com>
8670
8671         * bus/dispatch.c: lots of fixes
8672
8673         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
8674         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
8675         that was crack, broke the test service.
8676
8677         * dbus/dbus-transport.c (_dbus_transport_open): fix error
8678         handling to avoid piling up errors if we get a failure on the
8679         first address.
8680
8681         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
8682         pid in assertion failures.
8683
8684         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
8685         to some fixed size of file descriptor array. Don't return TRUE
8686         anytime a timeout exists, that led to lots of busy loop silliness
8687         in the tests.
8688
8689 2003-04-09  Havoc Pennington  <hp@redhat.com>
8690
8691         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
8692         I'd checked this in earlier but hadn't.
8693
8694 2003-04-09  Havoc Pennington  <hp@redhat.com>
8695
8696         * bus/dispatch.c (bus_dispatch_test): get a bit further through
8697         the activation test (man this is getting old!)
8698
8699 2003-04-09  Havoc Pennington  <hp@redhat.com>
8700
8701         * test/test-utils.c: use dispatch status function to fix this up
8702
8703         * bus/connection.c (connection_watch_callback): don't dispatch
8704         from here
8705         (connection_timeout_callback): don't dispatch from here
8706         (bus_connections_setup_connection): set the dispatch status function
8707         (bus_connection_disconnected): unset it
8708
8709         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
8710         used to add a connection to be dispatched
8711         (_dbus_loop_iterate): do the dispatching at the end of each
8712         iteration
8713
8714         * dbus/dbus-connection.c
8715         (dbus_connection_set_dispatch_status_function): new function
8716         allowing us to fix up main loop usage
8717         (_dbus_connection_last_unref): free all the various function
8718         user data
8719         (dbus_connection_dispatch): call the DispatchStatusFunction
8720         whenever this function returns
8721         (dbus_connection_handle_watch): call DispatchStatusFunction
8722         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
8723         (reply_handler_timeout): call DispatchStatusFunction
8724         (dbus_connection_flush): call DispatchStatusFunction
8725
8726 2003-04-09  Havoc Pennington  <hp@redhat.com>
8727
8728         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
8729         a memory leak
8730
8731         * bus/dispatch.c (check_service_activated): fix bug in test
8732
8733         * dbus/dbus-mainloop.c (check_timeout): fix this up
8734
8735         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
8736         verbose output so we can sort out output from different processes,
8737         e.g. in the activation case.
8738
8739 2003-04-08  Colin Walters  <walters@gnu.org>
8740
8741         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
8742         the pid file.
8743         (bus_context_new): Set it.
8744         (bus_context_unref): Use it to delete the pid file.
8745
8746 2003-04-08  Havoc Pennington  <hp@redhat.com>
8747
8748         * test/data/invalid-messages/array-with-mixed-types.message:
8749         regression test that fails for the moment
8750
8751         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
8752         tests for convenience
8753
8754         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
8755         array of nil, it broke things.
8756
8757         * test/data/invalid-messages/array-of-nil.message: regression test
8758
8759         * test/data/valid-messages/array-of-array-of-uint32.message:
8760         happened to write this so added it to suite
8761
8762 2003-04-08  Havoc Pennington  <hp@redhat.com>
8763
8764         * bus/driver.c (bus_driver_handle_acquire_service): init
8765         retval/reply before checking name
8766
8767         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
8768         recursion depth argument
8769
8770         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
8771         in the public struct for future extension
8772
8773         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
8774         typo
8775
8776         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
8777         message
8778
8779         * doc/dbus-specification.sgml: fix typo
8780
8781 2003-04-08  Alexander Larsson  <alexl@redhat.com>
8782
8783         Implemented recursive types, named types and new-style iters
8784
8785         * bus/driver.c:
8786         * glib/test-thread-client.c: (thread_func):
8787         * glib/test-thread-server.c: (handle_test_message):
8788         * test/test-service.c: (handle_echo):
8789         Update to new api
8790
8791         * dbus/Makefile.am:
8792         * dbus/dbus-dict.c:
8793         * dbus/dbus-dict.h:
8794         * dbus/dbus.h
8795         Remove DBusDict
8796
8797         * dbus/dbus-internals.c: (_dbus_type_to_string):
8798         Update for new types.
8799
8800         * dbus/dbus-marshal.[ch]:
8801         Implement recursive types and the new marshalling format.
8802         Remove hardcoded dict marshalling.
8803         Marshal named types.
8804
8805         * dbus/dbus-message-builder.c:
8806         Add BYTE_ARRAY.
8807         Remove references to old types
8808
8809         * dbus/dbus-message.[ch]:
8810         New non-refcounted iter API that supports recursive iters.
8811         Use iters for appending, including support for recursive
8812         iters.
8813         Add byte and named type support.
8814         Update everything to new marshalling formats.
8815         Add tests for new API.
8816
8817         * dbus/dbus-protocol.h:
8818         Remove old array types.
8819         Add types: BYTE, ARRAY, DICT, NAMED
8820
8821         * dbus/dbus-string.c:
8822         * dbus/dbus-sysdeps.c:
8823         Make parse_double locale safe.
8824
8825         * dbus/dbus-test-main.c:
8826         Call setlocale.
8827
8828         * dbus/dbus-test.c:
8829         Kill dict test
8830
8831         * doc/dbus-specification.sgml:
8832         Update spec
8833
8834         * test/data/incomplete-messages/missing-body.message:
8835         * test/data/invalid-messages/bad-boolean.message:
8836         * test/data/invalid-messages/bad-boolean-array.message:
8837         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
8838         * test/data/invalid-messages/boolean-has-no-value.message-raw:
8839         * test/data/invalid-messages/too-short-dict.message:
8840         * test/data/valid-messages/dict-simple.message:
8841         * test/data/valid-messages/dict.message:
8842         * test/data/valid-messages/emptiness.message:
8843         * test/data/valid-messages/lots-of-arguments.message:
8844         * test/data/valid-messages/no-padding.message:
8845         * test/data/valid-messages/recursive-types.message:
8846         Add missing NAME fields
8847         Fix up dicts & arrays
8848
8849         * test/data/invalid-messages/dict-with-nil-value.message:
8850         Removed, this is not invalid anymore.
8851
8852         * test/data/valid-messages/recursive-types.message:
8853         Add new test for deeply recursive types.
8854
8855 2003-04-07  Havoc Pennington  <hp@pobox.com>
8856
8857         * bus/driver.c (bus_driver_handle_acquire_service): return an
8858         error if you try to acquire a service that starts with ':'
8859
8860 2003-04-07  Havoc Pennington  <hp@redhat.com>
8861
8862         * doc/dbus-specification.sgml: require that base service names
8863         start with ':' and that the base service is created/deleted
8864         as first and last things a connection does on the bus
8865
8866         * bus/dispatch.c (check_existent_service_activation): lots more
8867         work on the activation test; it doesn't fully pass yet...
8868
8869         * test/test-service.c (main): fix so we don't memleak the
8870         connection to the message bus
8871         (filter_func): accept a message asking us to exit
8872
8873 2003-04-06  Havoc Pennington  <hp@pobox.com>
8874
8875         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
8876         from Colin Walters
8877
8878         * configure.in: fixes to Qt detection from Colin Walters
8879
8880         * doc/Makefile.am: Only remove generated docbook dirs if they
8881         exist, from Colin Walters
8882
8883         * dbus/dbus-bus.c: change how we set well-known connections to
8884         NULL, so that it works if a single connection is stored in
8885         two well-known array slots.
8886
8887         * test/Makefile.am: remove a lot of stuff that isn't immediately
8888         useful, it's in CVS history if we want it.
8889
8890         * test/test-service.c: use dbus-mainloop instead of that
8891         watch.[hc] crack
8892
8893 2003-04-06  Havoc Pennington  <hp@pobox.com>
8894
8895         * dbus/Makefile.am: split lists of sources into stuff that goes in
8896         the library, util functions that go in the lib and are also used
8897         elsewhere, and util functions that are used in tests/daemon but
8898         don't go in the lib.
8899
8900         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
8901         here so it can be used in test binaries also
8902
8903 2003-04-06  Havoc Pennington  <hp@pobox.com>
8904
8905         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
8906         here in the parent process, so we can return an error if it
8907         fails. Also, move some of the code into the child so the parent
8908         is less hosed if we fail midway through.
8909
8910         * bus/bus.c (bus_context_new): move pidfile detection further up
8911         in the function, before we start overwriting sockets and such.
8912
8913         * bus/messagebus.in: adjust this a bit, not sure if it will work.
8914
8915         * configure.in: add --with-system-pid-file and --with-system-socket
8916
8917 2003-04-06  Colin Walters  <walters@verbum.org>
8918
8919         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
8920
8921         * bus/system.conf.in: Declare a pidfile.
8922
8923         * bus/bus.c (bus_context_new): Test for an existing pid file, and
8924         create one (if appropriate).
8925
8926         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
8927         (struct BusConfigParser) [pidfile]: New.
8928         (element_type_to_name, merge_included, start_busconfig_child)
8929         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
8930         (bus_config_parser_unref): Free it.
8931         (bus_config_parser_get_pidfile): New function.
8932
8933         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
8934
8935         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
8936
8937         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
8938
8939         * dbus/dbus-sysdeps.h: Prototype it.
8940
8941 2003-04-06  Havoc Pennington  <hp@pobox.com>
8942
8943         * bus/bus.c (bus_context_new): print the address in here, rather
8944         than in main(), because we need to do it before forking the daemon
8945
8946         * bus/dispatch.c (send_service_nonexistent_error): set the sender
8947         on the service nonexistent error
8948
8949         * bus/driver.c (bus_driver_handle_acquire_service): set the
8950         sender on the AcquireService reply
8951
8952         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
8953         server also listen on a UNIX socket so services can connect to it.
8954
8955 2003-04-06  Havoc Pennington  <hp@pobox.com>
8956
8957         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
8958         so it detects deadlocks and also we actually init threads when
8959         debugging.
8960
8961 2003-04-06  Havoc Pennington  <hp@pobox.com>
8962
8963         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
8964         save the domain socket name, and unlink it when we disconnect the
8965         server. Means that at least when we exit normally, we won't leave
8966         a bunch of junk in /tmp
8967
8968         * dbus/dbus-transport-unix.c
8969         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
8970         memory management). (I was making a real change here but then
8971         didn't)
8972
8973 2003-04-06  Havoc Pennington  <hp@pobox.com>
8974
8975         * bus/bus.c (bus_context_new): fix wrong handling of
8976         server_data_slot_unref() in the error case.
8977
8978         * dbus/dbus-internals.h (_dbus_assert): change so it passes
8979         "(condition) != 0" to _dbus_real_assert so that
8980         "_dbus_assert (pointer)" doesn't cause a warning
8981
8982         * bus/main.c (main): accept --print-address option to print out
8983         the message bus address
8984
8985         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
8986
8987         * dbus/dbus-transport.c (_dbus_transport_open): special error for
8988         "tmpdir" option to unix: address on client side
8989
8990         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
8991         to unix: address
8992
8993         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
8994         we can use to create sockets in the test suite.
8995
8996         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
8997         cleanly. To be used for testing.
8998
8999         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
9000
9001         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
9002
9003         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9004         handle trying to call this when there's no servers active
9005
9006 2003-04-05  Havoc Pennington  <hp@pobox.com>
9007
9008         * NEWS: update
9009
9010         * configure.in: 0.8
9011
9012 2003-04-05  Havoc Pennington  <hp@pobox.com>
9013
9014         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
9015         crash on startup. Need to get "try starting the daemon"
9016         in the test suite I guess. ;-)
9017
9018         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
9019         tracked the number of open connections; it's better done in
9020         application-specific code as you want it to span all servers etc.
9021
9022 2003-04-05  Havoc Pennington  <hp@pobox.com>
9023
9024         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
9025         patch from Colin Walters
9026
9027 2003-04-05  Havoc Pennington  <hp@pobox.com>
9028
9029         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
9030         reality; in fact multiple mechanisms are allowed.
9031
9032         * dbus/dbus-internals.c (_dbus_real_assert)
9033         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
9034         _dbus_assert_not_reached() into functions, so that they don't show
9035         up in basic block counts for test coverage, and don't use up as
9036         much disk space. Does mean slower execution speed though, so
9037         assumes --disable-asserts is the normal production case.
9038
9039 2003-04-05  Havoc Pennington  <hp@pobox.com>
9040
9041         * test/Makefile.am (dist-hook): also dist *.in files
9042
9043         * NEWS: update
9044
9045         * configure.in: 0.7
9046
9047 2003-04-05  Havoc Pennington  <hp@pobox.com>
9048
9049         * dbus/dbus-string.c: docs warning
9050
9051         * dbus/dbus-spawn.c: missing docs
9052
9053         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
9054
9055 2003-04-05  Havoc Pennington  <hp@pobox.com>
9056
9057         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
9058         magic from GLib
9059
9060         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
9061         to -1 once we've reaped the babysitter
9062         (_dbus_babysitter_handle_watch): do as much work as we can, not
9063         just one go of it
9064
9065         * bus/activation.c: add code using DBusBabysitter so that we
9066         handle it when a service fails to start up properly.
9067         (bus_activation_service_created): don't remove the activation
9068         entries as we go, just let them get removed when we free the pending
9069         activation. Unref reply messages after sending them.
9070
9071 2003-04-05  Havoc Pennington  <hp@pobox.com>
9072
9073         * test/decode-gcov.c (main): print per-directory stats in the report
9074
9075         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
9076
9077 2003-04-05  Havoc Pennington  <hp@pobox.com>
9078
9079         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
9080
9081         * test/decode-gcov.c: hack up a little program to suck data
9082         out of gcov files. Yes this is sort of silly.
9083
9084         * configure.in: define something in config.h and do an
9085         AM_CONDITIONAL when gcov is enabled
9086
9087 2003-04-04  Havoc Pennington  <hp@redhat.com>
9088
9089         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
9090         return a "babysitter" object that is used to monitor the status of
9091         the spawned process and reap it when required.
9092
9093         * test/test-segfault.c, test/test-exit.c,
9094         test/test-sleep-forever.c: binaries that do various lame things,
9095         used in the test suite.
9096
9097         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
9098
9099 2003-04-03  Havoc Pennington  <hp@pobox.com>
9100
9101         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
9102         in preparation for modifying it, dbus-sysdeps is getting
9103         a bit unmanageable.
9104
9105 2003-04-03  Havoc Pennington  <hp@redhat.com>
9106
9107         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
9108         have multiple ones
9109
9110         * bus/*.[hc]: adapt to mainloop change
9111
9112 2003-04-03  Havoc Pennington  <hp@redhat.com>
9113
9114         * bus/activation.c (load_directory): fix up memleaks
9115         (bus_activation_entry_free): free the entry
9116
9117         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
9118         we get one from the message bus; fix memleaks.
9119
9120         * dbus/dbus-message.c (dbus_set_error_from_message): new function
9121
9122 2003-04-03  Havoc Pennington  <hp@pobox.com>
9123
9124         * bus/config-parser.c (bus_config_parser_unref): free
9125         list of mechanisms, bug discovered by test suite enhancements
9126         (putting system.conf and session.conf into suite)
9127
9128         * test/Makefile.am, test/test-service.c: add placeholder for a
9129         test service that we'll activate as part of test suite. Doesn't
9130         do anything yet.
9131
9132         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
9133         setting NULL value, and use system malloc not dbus_malloc()
9134         when we have unavoidable memleakage.
9135
9136         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
9137         didn't work, and support DBUS_BUS_ACTIVATION.
9138
9139         * bus/activation.c (child_setup): pass our well-known bus type to
9140         the child
9141
9142         * bus/config-parser.c: support <type> to specify well-known type
9143
9144         * doc/dbus-specification.sgml: document the env variables to
9145         locate well-known buses and find service activator
9146
9147 2003-04-02  Havoc Pennington  <hp@redhat.com>
9148
9149         * test/Makefile.am (all-local): add a rule to copy tests to
9150         builddir, so we can have generated tests. Use this to remove the
9151         silly hack for testing system.conf and session.conf. Will use this
9152         shortly to generate .service files pointing to test binaries.
9153
9154 2003-04-02  Havoc Pennington  <hp@redhat.com>
9155
9156         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
9157         current alloc and needed new length, not max of the doubled
9158         allocation and needed new length. Also, when building tests,
9159         don't do the double-allocation stuff, just realloc every time.
9160
9161 2003-04-02  Havoc Pennington  <hp@redhat.com>
9162
9163         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
9164         in error messages
9165         (_dbus_string_get_dirname): new
9166         (_dbus_sysdeps_test): new
9167         (_dbus_directory_open): include dirnames in error messages
9168
9169         * bus/config-parser.c: interpret <include> and <includedir> and
9170         <servicedir> relative to config file location if the given
9171         filename is not absolute.
9172
9173         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
9174
9175 2003-04-02  Havoc Pennington  <hp@redhat.com>
9176
9177         * bus/connection.c (bus_transaction_send_error_reply): set sender
9178         service for the error, and unref the reply on success
9179
9180         * bus/activation.c: convert to use BusTransaction so OOM can be
9181         handled correctly
9182         (bus_activation_service_created): set sender of the message
9183
9184 2003-04-01  Havoc Pennington  <hp@redhat.com>
9185
9186         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
9187         <includedir> (at least mostly)
9188
9189         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
9190         first, then the user ID
9191
9192 2003-04-01  Havoc Pennington  <hp@pobox.com>
9193
9194         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
9195         function
9196
9197         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
9198
9199         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
9200
9201         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
9202         socket 0777, and unlink any existing socket.
9203
9204         * bus/bus.c (bus_context_new): change our UID/GID and fork if
9205         the configuration file so specifies; set up auth mechanism
9206         restrictions
9207
9208         * bus/config-parser.c (bus_config_parser_content): add support
9209         for <fork> option and fill in code for <auth>
9210
9211         * bus/system.conf.in: add <fork/> to default configuration,
9212         and limit auth mechanisms to EXTERNAL
9213
9214         * doc/config-file.txt (Elements): add <fork>
9215
9216         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
9217         (_dbus_change_identity): new function
9218
9219 2003-03-31  Havoc Pennington  <hp@redhat.com>
9220
9221         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
9222         (_dbus_listen_unix_socket): fix off-by-one error in null
9223         termination spotted by Nalin
9224
9225 2003-03-31  Havoc Pennington  <hp@redhat.com>
9226
9227         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
9228         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
9229         having a real home directory available.
9230
9231 2003-03-31  Havoc Pennington  <hp@redhat.com>
9232
9233         * bus/Makefile.am (install-data-hook): create /var/run/dbus
9234
9235         * bus/messagebus.in: add init script for Red Hat /etc/init.d
9236
9237         * configure.in: add support for specifying a style of init script
9238         to install
9239
9240 2003-03-31  Havoc Pennington  <hp@redhat.com>
9241
9242         Fix some annoying DBusString API and fix all affected code.
9243
9244         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
9245         max_length argument
9246         (_dbus_string_get_data): change to return string instead of using
9247         an out param
9248         (_dbus_string_get_const_data): ditto
9249         (_dbus_string_get_data_len): ditto
9250         (_dbus_string_get_const_data_len): ditto
9251
9252 2003-03-31  Havoc Pennington  <hp@redhat.com>
9253
9254         * bus/main.c (main): fix up the command line arguments to be nicer
9255
9256 2003-03-31  Havoc Pennington  <hp@redhat.com>
9257
9258         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
9259         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
9260         final location that lands in the config file
9261
9262         * bus/config-loader-expat.c (bus_config_load): fix type of
9263         XML_Parser variable
9264
9265         * doc/TODO: remove TODO item for dbus_bus_get()
9266
9267         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
9268
9269 2003-03-31  Havoc Pennington  <hp@pobox.com>
9270
9271         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
9272         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
9273         argument since they are always client side
9274
9275         * dbus/dbus-server.c (dbus_server_get_address): new function
9276
9277         * bus/main.c (main): take the configuration file as an argument.
9278
9279         * test/data/valid-config-files/debug-allow-all.conf: new file to
9280         use with dispatch.c tests for example
9281
9282         * bus/test-main.c (main): require test data dir
9283
9284         * bus/bus.c (bus_context_new): change this to take a
9285         configuration file name as argument
9286
9287         * doc/config-file.txt (Elements): add <servicedir>
9288
9289         * bus/system.conf, bus/session.conf: new files
9290
9291         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
9292         well-known socket if none set
9293
9294         * configure.in: create system.conf and session.conf
9295
9296 2003-03-30  Havoc Pennington  <hp@pobox.com>
9297
9298         * bus/config-parser.c: hacking
9299
9300         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
9301         to shut down, since it could cause weirdness with the DBusList
9302         lock
9303
9304         * dbus/dbus-list.c (_dbus_list_test): add tests for the
9305         link-oriented stack routines
9306         (alloc_link): free the mempool if the first alloc from it fails
9307
9308         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
9309
9310         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
9311         from GLib
9312         (_dbus_string_skip_white): new
9313
9314         * doc/config-file.txt (Elements): add <includedir>
9315
9316 2003-03-28  Havoc Pennington  <hp@pobox.com>
9317
9318         * dbus/dbus-string.c (_dbus_string_copy_data_len)
9319         (_dbus_string_copy_data): new functions
9320
9321 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
9322
9323         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
9324         * dbus/dbus-bus.h:
9325         Add dbus_bus_get.
9326
9327         * dbus/dbus-memory.c:
9328         Fix a doc comment.
9329
9330 2003-03-28  Havoc Pennington  <hp@pobox.com>
9331
9332         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
9333         I think it may have just been superstition. Not sure.
9334
9335         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
9336         failures that were not being handled.
9337
9338         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
9339
9340         * dbus/dbus-memory.c: add ability to set number of mallocs in a
9341         row that will fail on out-of-memory.
9342
9343         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
9344         function for testing out-of-memory handling.
9345
9346         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
9347         allocation functions, they do map exactly to the expat ones.
9348
9349 2003-03-27  Havoc Pennington  <hp@redhat.com>
9350
9351         * bus/config-loader-libxml.c (bus_config_load): add another error
9352         check
9353
9354 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
9355
9356         * doc/TODO:
9357         Add note about automatic service activation.
9358
9359         * doc/dbus-specification.sgml:
9360         Rename the specification and clarify a few things.
9361
9362 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
9363
9364         * Doxyfile.in:
9365         * dbus/dbus-address.c:
9366         * dbus/dbus-dict.c:
9367         * dbus/dbus-marshal.c:
9368         * dbus/dbus-server-debug-pipe.c:
9369         * dbus/dbus-transport-unix.c:
9370         Fix documentation warnings.
9371
9372 2003-03-26  Havoc Pennington  <hp@pobox.com>
9373
9374         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
9375         after every test so it's quick and easy to see which leaked, and
9376         so we test multiple dbus_shutdown() calls
9377
9378         * configure.in: change configure.in XML stuff to also support
9379         expat
9380
9381         * config-loader-libxml.c: some hacking
9382
9383         * config-loader-expat.c: some hacking
9384
9385         * config-parser.c: some hacking, plus tests
9386
9387 2003-03-25  Havoc Pennington  <hp@redhat.com>
9388
9389         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
9390
9391         * configure.in: add --with-xml option to specify XML library,
9392         right now only libxml is supported.
9393
9394         * bus/config-loader-libxml.c, config-parser.c: sync some minor
9395         nonworking code between home and work, still just stubs
9396
9397 2003-03-24  Havoc Pennington  <hp@redhat.com>
9398
9399         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
9400         file
9401
9402         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
9403         NULL argument for "message" if the error is a well-known one,
9404         fill in a generic message in this case.
9405
9406         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
9407         favor of DBusError
9408
9409         * bus/test.c (bus_test_flush_bus): add
9410
9411         * bus/policy.c (bus_policy_test): test code stub
9412
9413 2003-03-24  Havoc Pennington  <hp@pobox.com>
9414
9415         * bus/connection.c (bus_connections_setup_connection): set up
9416         the "can this user connect" function, but it always returns
9417         TRUE until we have a config file parser so we can have a config
9418         file that allows connections.
9419
9420 2003-03-23  Havoc Pennington  <hp@pobox.com>
9421
9422         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
9423         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
9424         the mutex, so we can check for proper memory management
9425         and OOM handling.
9426
9427         * dbus/dbus-dataslot.c: remove the mutex from
9428         DBusDataSlotAllocator and lock it manually when using it,
9429         to simplify fitting it into the global slots framework.
9430
9431         * dbus/dbus-threads.c (init_static_locks): rework how we're
9432         handling global locks so they are easily shut down.
9433
9434         * bus/policy.c (bus_policy_append_rule): fix
9435
9436         * bus/test-main.c (main): check for memleaks
9437
9438         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
9439         test suite check for memleaks
9440
9441         * dbus/dbus-memory.c: add support in test mode for tracking
9442         number of outstanding blocks
9443
9444 2003-03-23  Havoc Pennington  <hp@pobox.com>
9445
9446         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
9447         policies code
9448
9449         * dbus/dbus-hash.h: add ULONG hash keys
9450
9451         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
9452         (_dbus_get_group_id): new function
9453
9454 2003-03-20  Havoc Pennington  <hp@redhat.com>
9455
9456         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
9457         new function
9458         (dbus_connection_get_unix_user): new function
9459
9460 2003-03-20  Havoc Pennington  <hp@pobox.com>
9461
9462         * bus/connection.c (bus_connection_send_oom_error): assert that
9463         message has a sender
9464         (connection_execute_transaction): ditto
9465         (bus_connection_preallocate_oom_error): fix to set the sender, and
9466         set recipient to the destination service, not the bus driver
9467
9468         * bus/policy.c: hacking
9469
9470         * dbus/dbus-message.c (dbus_message_service_is): new function
9471         (dbus_message_sender_is): new
9472
9473 2003-03-19  Havoc Pennington  <hp@redhat.com>
9474
9475         * bus/policy.c: start sketching code for policy restrictions on
9476         what connections can do.
9477
9478 2003-03-18  Havoc Pennington  <hp@redhat.com>
9479
9480         * doc/TODO: some notes on high-level todo items. Little nitpick
9481         stuff is all in @todo, so no need to add it here.
9482
9483         * doc/config-file.txt: some notes on how config file might look
9484
9485 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
9486
9487         * configure.in: 0.6
9488
9489         * NEWS: Update.
9490
9491 2003-03-17  Havoc Pennington  <hp@redhat.com>
9492
9493         * dbus/dbus-internals.h: add gcc attributes so that
9494         our printf-style functions warn on bad arguments to
9495         format
9496
9497         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
9498         format bug
9499
9500         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
9501         printf format bug
9502
9503 2003-03-17  Havoc Pennington  <hp@redhat.com>
9504
9505         * bus/test-main.c (main): make it print something as it runs
9506         so make check doesn't look stuck
9507
9508         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
9509         from CVS, now obsolete
9510
9511 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9512
9513         * bus/dispatch.c: (bus_dispatch):
9514         Refetch the service name since it may have been reallocated
9515         when dbus_message_set_sender was called.
9516
9517         * dbus/dbus-sysdeps.c: (_dbus_accept):
9518         Add address and address length variables and use them to stop
9519         valgrind from complaining.
9520
9521 2003-03-17  Havoc Pennington  <hp@pobox.com>
9522
9523         All tests pass, no memleaks, no valgrind complaints.
9524
9525         * bus/test.c: refcount handler_slot
9526
9527         * bus/connection.c (bus_connections_new): refcount
9528         connection_data_slot
9529
9530         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
9531         bytes so that auth scripts pass.
9532
9533         * bus/dispatch.c: init message_handler_slot so it gets allocated
9534         properly
9535
9536         * bus/dispatch.c (message_handler_slot_ref): fix memleak
9537
9538         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
9539         dealloc server_pipe_hash when no longer used for benefit of
9540         leak checking
9541
9542         * dbus/dbus-auth.c (process_command): memleak fix
9543
9544         * bus/dispatch.c (check_hello_message): memleak fix
9545
9546 2003-03-16  Havoc Pennington  <hp@pobox.com>
9547
9548         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
9549
9550 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9551
9552         * bus/activation.c (bus_activation_activate_service): Append
9553         the pending activation entry to the list of pending activations.
9554
9555 2003-03-16  Havoc Pennington  <hp@pobox.com>
9556
9557         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
9558         connections
9559
9560         * dbus/dbus-address.c (create_entry): fix OOM handling when
9561         failing to alloc entry->method
9562
9563 2003-03-16  Havoc Pennington  <hp@pobox.com>
9564
9565         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
9566         the watch
9567
9568         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9569         add some missing dbus_set_result
9570
9571         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
9572         alloc the DBusMessageHandler
9573
9574         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
9575         the transport here, since we call this from the finalizer; it
9576         resulted in a double-finalize.
9577
9578         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
9579         where we tried to use transport->connection that was NULL,
9580         happened when transport was disconnected early on due to OOM
9581
9582         * bus/*.c: adapt to handle OOM for watches/timeouts
9583
9584         * dbus/dbus-transport-unix.c: port to handle OOM during
9585         watch handling
9586
9587         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
9588         reference to unused bytes instead of a copy
9589
9590         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
9591         out of memory
9592
9593         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
9594         FALSE on OOM
9595
9596         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
9597         of memory
9598
9599 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9600
9601         * doc/dbus-specification.sgml:
9602         Document reply message for ActivateService.
9603
9604 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9605
9606         * bus/activation.c: (bus_pending_activation_entry_free),
9607         (bus_pending_activation_free), (bus_activation_new),
9608         (bus_activation_unref), (bus_activation_service_created),
9609         (bus_activation_activate_service):
9610         * bus/activation.h:
9611         * bus/bus.c: (bus_context_new):
9612         * bus/desktop-file.c: (new_section):
9613         * bus/driver.c: (bus_driver_send_service_deleted),
9614         (bus_driver_handle_activate_service):
9615         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
9616         * bus/services.h:
9617         * dbus/dbus-connection.c:
9618         (dbus_connection_send_with_reply_and_block):
9619         * dbus/dbus-message.c: (dbus_message_append_args_valist):
9620         * dbus/dbus-protocol.h:
9621         Make activation work better. Now pending activations will be queued
9622         and the daemon won't try to activate services that are already registered.
9623
9624 2003-03-16  Havoc Pennington  <hp@pobox.com>
9625
9626         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
9627         connection data
9628
9629         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
9630         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
9631
9632 2003-03-16  Havoc Pennington  <hp@pobox.com>
9633
9634         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
9635         this. always run the test suite before commit...
9636
9637         * bus/*: adapt to DBusConnection API changes
9638
9639         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9640         requires renaming stuff to avoid dbus_connection_dispatch name
9641         conflict.
9642
9643         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
9644         function
9645
9646         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
9647         separate from _dbus_message_loader_return_buffer()
9648
9649         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
9650         this, because it's now always broken to use; the number of
9651         messages in queue vs. the number still buffered by the message
9652         loader is undefined/meaningless. Should use
9653         dbus_connection_get_dispatch_state().
9654         (dbus_connection_dispatch): rename from
9655         dbus_connection_dispatch_message
9656
9657 2003-03-16  Havoc Pennington  <hp@pobox.com>
9658
9659         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
9660         implementation
9661
9662 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9663
9664         * dbus/dbus-connection.c:
9665         (dbus_connection_send_with_reply_and_block):
9666         Decrease connection->n_incoming when removing an entry
9667         from the list.
9668         * dbus/dbus-dict.c: (dbus_dict_entry_free),
9669         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9670         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9671         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
9672         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
9673         (dbus_dict_get_byte_array):
9674         Handle NULL arrays and strings. Also add support for byte arrays.
9675
9676         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
9677         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
9678         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9679         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9680         (_dbus_demarshal_dict), (demarshal_and_validate_len),
9681         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
9682         * dbus/dbus-marshal.h:
9683         Add support for marshalling and demarshalling empty arrays and strings.
9684
9685         * dbus/dbus-message.c: (dbus_message_append_args_valist),
9686         (dbus_message_append_string_array),
9687         (dbus_message_iter_get_boolean),
9688         (dbus_message_iter_get_boolean_array),
9689         (dbus_message_iter_get_int32_array),
9690         (dbus_message_iter_get_uint32_array),
9691         (dbus_message_iter_get_double_array),
9692         (dbus_message_iter_get_byte_array),
9693         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
9694         (check_message_handling):
9695         Add support for getting empty arrays and dicts.
9696
9697         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
9698         Don't do any validation at all for now, that's better than just checking
9699         for ASCII.
9700
9701         * test/data/valid-messages/emptiness.message:
9702         New test message with lots of empty arrays.
9703
9704 2003-03-16  Havoc Pennington  <hp@pobox.com>
9705
9706         * dbus/dbus-connection.c
9707         (_dbus_connection_queue_received_message_link): new function that
9708         can't fail due to OOM
9709
9710         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
9711         new function pops a message together with a list link
9712         containing it.
9713
9714         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
9715         message queuing functions to avoid needing to alloc memory
9716
9717 2003-03-16  Havoc Pennington  <hp@pobox.com>
9718
9719         Oops - test code was only testing failure of around 30 of the
9720         mallocs in the test path, but it turns out there are 500+
9721         mallocs. I believe this was due to misguided linking setup such
9722         that there was one copy of dbus_malloc etc. in the daemon and one
9723         in the shared lib, and only daemon mallocs were tested. In any
9724         case, the test case now tests all 500+ mallocs, and doesn't pass
9725         yet, though there are lots of fixes in this patch.
9726
9727         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
9728         this so that it doesn't need to allocate memory, since it
9729         has no way of indicating failure due to OOM (and would be
9730         annoying if it did).
9731
9732         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
9733
9734         * bus/Makefile.am: rearrange to create two self-contained
9735         libraries, to avoid having libraries with overlapping symbols.
9736         that was resulting in weirdness, e.g. I'm pretty sure there
9737         were two copies of global static variables.
9738
9739         * dbus/dbus-internals.c: move the malloc debug stuff to
9740         dbus-memory.c
9741
9742         * dbus/dbus-list.c (free_link): free list mempool if it becomes
9743         empty.
9744
9745         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
9746
9747         * dbus/dbus-address.c (dbus_parse_address): free list nodes
9748         on failure.
9749
9750         * bus/dispatch.c (bus_dispatch_add_connection): free
9751         message_handler_slot when no longer using it, so
9752         memory leak checkers are happy for the test suite.
9753
9754         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
9755
9756         * bus/bus.c (new_connection_callback): disconnect in here if
9757         bus_connections_setup_connection fails.
9758
9759         * bus/connection.c (bus_connections_unref): fix to free the
9760         connections
9761         (bus_connections_setup_connection): if this fails, don't
9762         disconnect the connection, just be sure there are no side
9763         effects.
9764
9765         * dbus/dbus-string.c (undo_alignment): unbreak this
9766
9767         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
9768         leaking
9769         (_dbus_auth_new): fix the order in which we free strings
9770         on OOM failure
9771
9772         * bus/connection.c (bus_connection_disconnected): fix to
9773         not send ServiceDeleted multiple times in case of memory
9774         allocation failure
9775
9776         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
9777         get the base service name
9778         (dbus_bus_register_client): don't return base service name,
9779         instead store it on the DBusConnection and have an accessor
9780         function for it.
9781         (dbus_bus_register_client): rename dbus_bus_register()
9782
9783         * bus/dispatch.c (check_hello_message): verify that other
9784         connections on the bus also got the correct results, not
9785         just the one sending hello
9786
9787 2003-03-15  Havoc Pennington  <hp@pobox.com>
9788
9789         Make it pass the Hello handling test including all OOM codepaths.
9790         Now to do other messages...
9791
9792         * bus/services.c (bus_service_remove_owner): fix crash when
9793         removing owner from an empty list of owners
9794         (bus_registry_ensure): don't leave service in the list of
9795         a connection's owned services if we fail to put the service
9796         in the hash table.
9797
9798         * bus/connection.c (bus_connection_preallocate_oom_error): set
9799         error flag on the OOM error.
9800
9801         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
9802         handle _dbus_transport_set_connection failure
9803
9804         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
9805         to create watches up front and simply enable/disable them as
9806         needed.
9807         (unix_connection_set): this can now fail on OOM
9808
9809         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
9810         of enabling/disabling a watch or timeout.
9811
9812         * bus/loop.c (bus_loop_iterate): don't touch disabled
9813         watches/timeouts
9814
9815         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
9816
9817 2003-03-15  Havoc Pennington  <hp@pobox.com>
9818
9819         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
9820         write useful test code, after all that futzing around ;-)
9821
9822         Test does not yet pass because we can't handle OOM in
9823         _dbus_transport_messages_pending (basically,
9824         dbus_connection_preallocate_send() does not prealloc the write
9825         watch). To fix this, I think we need to add new stuff to
9826         set_watch_functions, namely a SetEnabled function so we can alloc
9827         the watch earlier, then enable it later.
9828
9829         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
9830         dbus-memory.c to the convenience lib
9831
9832         * bus/test.c: rename some static functions to keep them clearly
9833         distinct from stuff in connection.c. Handle client disconnection.
9834
9835 2003-03-14  Havoc Pennington  <hp@pobox.com>
9836
9837         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
9838         transport, tests more of the real codepath. Set up clients
9839         with bus_setup_debug_client.
9840
9841         * bus/test.c (bus_setup_debug_client): function to set up debug
9842         "clients" on the main loop
9843
9844         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
9845         support
9846
9847         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
9848         server type
9849
9850         * dbus/dbus-server-debug.c: support a debug server based on pipes
9851
9852         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
9853         (_dbus_close): new function
9854
9855         * configure.in: check for socketpair
9856
9857 2003-03-14  Havoc Pennington  <hp@redhat.com>
9858
9859         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
9860         cheesy hack
9861
9862         * dbus/dbus-transport-debug.c: rework this a good bit to be
9863         less complicated. hopefully still works.
9864
9865         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
9866         manually
9867
9868         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
9869         after running it
9870
9871         * dbus/dbus-message.c (dbus_message_copy): rename from
9872         dbus_message_new_from_message, fix it up to copy
9873         all the message fields, add test case
9874
9875         * bus/dispatch.c (bus_dispatch_test): add some more test code,
9876         not quite passing yet
9877
9878 2003-03-14  Havoc Pennington  <hp@pobox.com>
9879
9880         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
9881         until no work remains" in test code. (the large diff here
9882         is just code movement, no actual changes)
9883
9884         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
9885         1, no point waiting around for test code.
9886         (_dbus_server_debug_accept_transport): unref the timeout
9887         after adding it (right?)
9888
9889         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
9890
9891 2003-03-13  Havoc Pennington  <hp@redhat.com>
9892
9893         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
9894         out of memory
9895
9896         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
9897         of memory
9898
9899         * dbus/dbus-connection.h: Make AddWatchFunction and
9900         AddTimeoutFunction return a bool so they can fail on out-of-memory
9901
9902         * bus/bus.c (bus_context_new): set up timeout handlers
9903
9904         * bus/connection.c (bus_connections_setup_connection): set up
9905         timeout handlers
9906
9907         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
9908         can fail
9909
9910         * bus/bus.c (bus_context_new): adapt to changes
9911
9912         * bus/connection.c: adapt to changes
9913
9914         * test/watch.c: adapt to DBusWatch changes
9915
9916         * bus/dispatch.c (bus_dispatch_test): started adding this but
9917         didn't finish
9918
9919 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
9920
9921         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
9922
9923 2003-03-13  Havoc Pennington  <hp@pobox.com>
9924
9925         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
9926         set up a test framework as for the library
9927
9928 2003-03-12  Havoc Pennington  <hp@pobox.com>
9929
9930         Throughout: purge global variables, introduce BusActivation,
9931         BusConnections, BusRegistry, etc. objects instead.
9932
9933         * bus/bus.h, bus/bus.c: introduce BusContext as a global
9934         message bus object
9935
9936         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
9937         going to redo this a bit differently I think
9938
9939 2003-03-12  Havoc Pennington  <hp@redhat.com>
9940
9941         Mega-patch that gets the message bus daemon initially handling
9942         out-of-memory. Work still needed. Also lots of random
9943         moving stuff to DBusError instead of ResultCode.
9944
9945         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
9946
9947         * dbus/dbus-connection.c
9948         (dbus_connection_send_with_reply_and_block): use DBusError
9949
9950         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
9951         DBusResultCode
9952
9953         * dbus/dbus-connection.c (dbus_connection_send): drop the result
9954         code here, as the only failure possible is OOM.
9955
9956         * bus/connection.c (bus_connection_disconnect):
9957         rename bus_connection_disconnected as it's a notification only
9958
9959         * bus/driver.c (bus_driver_handle_acquire_service): don't free
9960         "name" on get_args failure, should be done by get_args;
9961         don't disconnect client for bad args, just return an error.
9962         (bus_driver_handle_service_exists): ditto
9963
9964         * bus/services.c (bus_services_list): NULL-terminate returned array
9965
9966         * bus/driver.c (bus_driver_send_service_lost)
9967         (bus_driver_send_service_acquired): send messages from driver to a
9968         specific client to the client's unique name, not to the broadcast
9969         service.
9970
9971         * dbus/dbus-message.c (decode_header_data): reject messages that
9972         contain no name field
9973         (_dbus_message_get_client_serial): rename to
9974         dbus_message_get_serial and make public
9975         (_dbus_message_set_serial): rename from set_client_serial
9976         (_dbus_message_set_reply_serial): make public
9977         (_dbus_message_get_reply_serial): make public
9978
9979         * bus/connection.c (bus_connection_foreach): allow stopping
9980         iteration by returning FALSE from foreach function.
9981
9982         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
9983         (dbus_connection_free_preallocated_send)
9984         (dbus_connection_preallocate_send): new API for sending a message
9985         without possibility of malloc failure.
9986         (dbus_connection_send_message): rename to just
9987         dbus_connection_send (and same for whole function family)
9988
9989         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
9990
9991         * dbus/dbus-sysdeps.c (_dbus_exit): new function
9992
9993         * bus/activation.c: handle/return errors
9994
9995         * dbus/dbus-errors.h: add more DBUS_ERROR #define
9996
9997         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
9998         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
9999         (_dbus_result_from_errno): move to this file
10000
10001 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
10002
10003         * dbus/dbus-marshal.c:
10004         (_dbus_marshal_set_string):
10005         Take a length argument so we can marshal the correct string
10006         length.
10007
10008         (_dbus_marshal_dict), (_dbus_demarshal_dict),
10009         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
10010         (_dbus_marshal_test):
10011         * dbus/dbus-marshal.h:
10012         Add support for marshalling and demarshalling dicts.
10013
10014         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10015         Add support for TYPE DICT.
10016
10017         * dbus/dbus-message.c: (set_string_field):
10018         Adjust header padding.
10019
10020         (dbus_message_append_args_valist), (dbus_message_append_dict),
10021         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
10022         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
10023         (check_message_handling), (check_have_valid_message):
10024         * dbus/dbus-message.h:
10025         Add functions for setting and getting dicts.
10026
10027         * dbus/dbus-protocol.h:
10028         Add DBUS_TYPE_DICT.
10029
10030         * dbus/dbus.h:
10031         Add dbus-dict.h
10032
10033         * doc/dbus-specification.sgml:
10034         Add information about how dicts are marshalled.
10035
10036         * test/data/invalid-messages/dict-with-nil-value.message:
10037         * test/data/invalid-messages/too-short-dict.message:
10038         * test/data/valid-messages/dict-simple.message:
10039         * test/data/valid-messages/dict.message:
10040         Add sample messages containing dicts.
10041
10042 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
10043
10044         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
10045
10046 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
10047
10048         * dbus/Makefile.am:
10049         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
10050         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
10051         (dbus_dict_set_int32), (dbus_dict_set_uint32),
10052         (dbus_dict_set_double), (dbus_dict_set_string),
10053         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
10054         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
10055         (dbus_dict_set_string_array), (_dbus_dict_test):
10056         * dbus/dbus-dict.h:
10057         Fix according to comments from Havoc.
10058
10059 2003-03-06  Michael Meeks  <michael@server.home>
10060
10061         * configure.in: if we don't have kde-config, disable have_qt.
10062
10063 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
10064
10065         * dbus/Makefile.am:
10066         Add dbus-dict.[ch]
10067
10068         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
10069         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
10070         (dbus_dict_remove), (dbus_dict_get_value_type),
10071         (dbus_dict_get_keys), (dbus_dict_put_boolean),
10072         (dbus_dict_put_int32), (dbus_dict_put_uint32),
10073         (dbus_dict_put_double), (dbus_dict_put_string),
10074         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
10075         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
10076         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
10077         (dbus_dict_get_int32), (dbus_dict_get_uint32),
10078         (dbus_dict_get_double), (dbus_dict_get_string),
10079         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
10080         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
10081         (dbus_dict_get_string_array), (_dbus_dict_test):
10082         * dbus/dbus-dict.h:
10083         Add DBusDict implementation
10084
10085         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
10086         * dbus/dbus-test.h:
10087         Add _dbus_dict_test
10088
10089 2003-03-04  Havoc Pennington  <hp@pobox.com>
10090
10091         * test/data/auth/*: adapt to changes
10092
10093         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
10094         USERID_BASE64 and change USERNAME_BASE64 to put in username not
10095         userid
10096
10097         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
10098         more stuff from being in a context name, to make the protocol
10099         simpler to deal with
10100
10101         * dbus/dbus-errors.c (dbus_error_has_name): new function
10102         (dbus_error_is_set): new function
10103
10104         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
10105         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
10106
10107         * dbus/dbus-connection.c (dbus_connection_flush): also read
10108         messages during a flush operation
10109
10110         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
10111
10112 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
10113
10114         * configure.in: Check for gethostbyname on Solaris.
10115
10116         * dbus/dbus-transport.c: (_dbus_transport_open):
10117         Remove duplicate "tcp" entry.
10118
10119         * doc/dbus-specification.sgml:
10120         Clarify some things.
10121
10122 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
10123
10124         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
10125         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
10126         (_dbus_keyring_test):
10127         * dbus/dbus-md5.c: (_dbus_md5_compute):
10128         * dbus/dbus-sha.c: (_dbus_sha_compute):
10129         Plug memory leaks.
10130
10131 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
10132
10133         * README: Add some things.
10134
10135 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
10136
10137         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
10138         after case DBUS_TYPE_BOOELAN.
10139
10140 2003-03-02  Havoc Pennington  <hp@pobox.com>
10141
10142         * test/break-loader.c (randomly_set_extreme_ints): add test that
10143         sets really huge and small integers
10144
10145         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
10146         that length of boolean array fits in the string, and that
10147         string has room for boolean value in single-bool case.
10148
10149         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
10150         optional value to "ALIGN" command which is what to fill the
10151         alignment with.
10152
10153         * test/data/valid-messages/no-padding.message: add regression
10154         test for the message padding problem
10155
10156 2003-03-02  Havoc Pennington  <hp@pobox.com>
10157
10158         * dbus/dbus-message.c (decode_header_data): fix to always init
10159         message_padding, from Benjamin Dauvergne
10160
10161 2003-03-02  Havoc Pennington  <hp@pobox.com>
10162
10163         * configure.in: 0.5
10164
10165         * NEWS: Update.
10166
10167 2003-03-01  Joe Shaw  <joe@assbarn.com>
10168
10169         * configure.in: Check for "struct cmsgcred" and try to access its
10170         members for BSD-like unices.
10171
10172         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
10173         _dbus_read_credentials_unix_socket().
10174         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
10175         read() for reading the credential byte off the unix socket.  Use
10176         struct cmsgcred on systems that support it.
10177
10178 2003-02-27  Alexander Larsson  <alexl@redhat.com>
10179
10180         * glib/Makefile.am:
10181         * configure.in:
10182         Make gthreads-2.0 dependency optional. Don't build thread test if
10183         its not found.
10184
10185 2003-02-27  Havoc Pennington  <hp@pobox.com>
10186
10187         * dbus/dbus-connection.c
10188         (dbus_connection_send_message_with_reply_and_block): fix doh!
10189         doh! doh! bug that resulted in never removing a reply from the
10190         queue, no wonder we called get_reply_serial so much ;-)
10191
10192         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
10193         and client serial instead of demarshaling them every time
10194
10195 2003-02-27  Havoc Pennington  <hp@pobox.com>
10196
10197         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
10198         more inlined, using dbus-string-private.h, speeds things up
10199         substantially
10200
10201         * dbus/dbus-string.c (_dbus_string_free): apply align offset
10202         when freeing the string
10203         (_dbus_string_steal_data): fix for align offset
10204         (undo_alignment): new function
10205
10206 2003-02-26  Havoc Pennington  <hp@redhat.com>
10207
10208         All kinds of audit fixes from Owen, plus initial attempt to
10209         handle unaligned memory returned from malloc.
10210
10211         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
10212         leave room for align_offset and nul byte
10213         (fixup_alignment): function to track an align_offset and
10214         ensure real->str is aligned
10215         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
10216         to allow a nul byte plus align offset
10217         (_dbus_string_lock): fix overflow issue
10218         (_dbus_string_init_const_len): add assertions on sanity of len,
10219         assign allocated to be ALLOCATION_PADDING larger than len
10220         (set_length): fixup the overflow handling
10221         (_dbus_string_get_data_len): fix overflow in assertion
10222         (open_gap): detect overflow in size of gap to be opened
10223         (_dbus_string_lengthen): add overflow check
10224         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
10225         (_dbus_string_append): add overflow check
10226         (_dbus_string_append_unichar): overflow
10227         (_dbus_string_delete): fix overflow in assertion
10228         (_dbus_string_copy_len): overflow in assertion
10229         (_dbus_string_replace_len): overflows in assertions
10230         (_dbus_string_find): change to implement in terms of
10231         _dbus_string_find_to
10232         (_dbus_string_find_to): assorted fixage
10233         (_dbus_string_equal_c_str): assert c_str != NULL,
10234         fix logic so the function works
10235         (_dbus_string_ends_with_c_str): fix overflow thingy
10236         (_dbus_string_base64_encode): overflow fix
10237         (_dbus_string_validate_ascii): overflow
10238         (_dbus_string_validate_nul): overflow
10239
10240 2003-02-26  Havoc Pennington  <hp@redhat.com>
10241
10242         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
10243
10244 2003-02-26  Alexander Larsson  <alexl@redhat.com>
10245
10246         * configure.in:
10247         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
10248
10249         * dbus/dbus-connection.c:
10250         * dbus/dbus-connection.h:
10251         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
10252         Add dbus_connection_set_wakeup_main_function and use it when queueing
10253         incoming and outgoing messages.
10254
10255
10256         * dbus/dbus-dataslot.c:
10257         Threadsafe usage of DBusDataSlotAllocator
10258
10259         * dbus/dbus-message.c: (dbus_message_get_args_iter):
10260         dbus_new can fail.
10261
10262         * dbus/dbus-server-unix.c:
10263         Add todo comment
10264
10265         * glib/dbus-gmain.c:
10266         Implement the new wakeup functions for glib.
10267
10268         * glib/Makefile.am:
10269         * glib/test-thread-client.c:
10270         * glib/test-thread-server.c:
10271         * glib/test-thread.h:
10272         Initial cut at some thread test code. Not really done yet.
10273
10274 2003-02-26  Havoc Pennington  <hp@pobox.com>
10275
10276         * dbus/dbus-connection.c
10277         (dbus_connection_send_message_with_reply_and_block): fix crash
10278         where we ref'd the outgoing message instead of the returned reply
10279
10280         * dbus/dbus-transport-unix.c (do_authentication): check read watch
10281         at the end of this function, so if we didn't need to read for
10282         authentication, we reinstall it for receiving messages
10283
10284         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
10285         a NULL sender for peer-to-peer case
10286
10287         * dbus/dbus-transport-unix.c (check_read_watch): handle
10288         !authenticated case correctly
10289
10290         * glib/dbus-gmain.c: add support for DBusServer
10291
10292         * dbus/dbus-server.c: add data slot support
10293
10294         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
10295         return values and handle errors
10296
10297         * dbus/dbus-dataslot.c: factor out the data slot stuff from
10298         DBusConnection
10299
10300         * Doxyfile.in (INPUT): add glib subdir
10301
10302         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
10303         setup_with_g_main instead of hookup_with_g_main; write docs
10304
10305 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
10306
10307         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
10308         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10309         * dbus/dbus-message.c: (dbus_message_append_boolean),
10310         (dbus_message_append_boolean_array),
10311         (dbus_message_get_args_valist), (_dbus_message_test):
10312         * dbus/dbus-message.h:
10313         * doc/dbus-specification.sgml:
10314         Various fixes as pointed out by Havoc.
10315
10316         * test/data/invalid-messages/bad-boolean-array.message:
10317         * test/data/invalid-messages/bad-boolean.message:
10318         Add invalid boolean value test cases.
10319
10320 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
10321
10322         * dbus/dbus-internals.c: (_dbus_type_to_string):
10323         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
10324         (_dbus_marshal_validate_arg):
10325         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10326         * dbus/dbus-message.c: (dbus_message_append_args_valist),
10327         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
10328         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
10329         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
10330         (dbus_message_iter_get_double),
10331         (dbus_message_iter_get_boolean_array), (message_iter_test):
10332         * dbus/dbus-message.h:
10333         * dbus/dbus-protocol.h:
10334         * doc/dbus-specification.sgml:
10335         * test/data/valid-messages/lots-of-arguments.message:
10336         Add support for boolean and boolean array types.
10337
10338 2003-02-23  Havoc Pennington  <hp@pobox.com>
10339
10340         * dbus/dbus-keyring.c: finish most of this implementation and
10341         simple unit test
10342
10343         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
10344         these barf if the error isn't cleared to NULL
10345
10346         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
10347         (_dbus_create_directory): new function
10348
10349         * dbus/dbus-errors.c (dbus_set_error): fix warning
10350
10351         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
10352         (_dbus_string_hex_decode): new function
10353         (test_hex_roundtrip): test code
10354
10355         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
10356
10357         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
10358
10359         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
10360         the save-to-temp/rename trick to atomically write the new file
10361         (_dbus_string_parse_uint): new function
10362
10363 2003-02-22  Havoc Pennington  <hp@pobox.com>
10364
10365         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
10366
10367 2003-02-22  Havoc Pennington  <hp@pobox.com>
10368
10369         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
10370         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
10371
10372         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
10373
10374         * dbus/test/data/sha-1: add US government test suite for SHA-1
10375
10376 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10377
10378         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
10379         Make string arrays NULL-terminated.
10380
10381         * dbus/dbus-memory.c: (dbus_free_string_array):
10382         * dbus/dbus-memory.h:
10383         New function for freeing NULL-terminated string arrays.
10384
10385         * dbus/dbus-message-builder.c: (append_quoted_string),
10386         (_dbus_message_data_load):
10387         Add support for array types.
10388
10389         * dbus/dbus-message.c: (check_message_handling):
10390         Add more types as test cases.
10391
10392         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
10393         (_dbus_string_parse_double):
10394         Add the start offset to the end offset.
10395
10396         * test/data/valid-messages/lots-of-arguments.message:
10397         New test message with lots of arguments.
10398
10399 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10400
10401         * dbus/dbus-message.c: (dbus_message_append_nil),
10402         (dbus_message_append_int32), (dbus_message_append_uint32),
10403         (dbus_message_append_double), (dbus_message_append_string),
10404         (dbus_message_append_int32_array),
10405         (dbus_message_append_uint32_array),
10406         (dbus_message_append_double_array),
10407         (dbus_message_append_byte_array),
10408         (dbus_message_append_string_array):
10409         Fix all out-of-memory handling in these functions.
10410
10411 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10412
10413         * dbus/dbus-message.c: (dbus_message_append_nil):
10414         Fix a silly.
10415
10416 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10417
10418         * dbus/dbus-message.c: (dbus_message_append_args_valist),
10419         (dbus_message_append_nil), (dbus_message_append_int32_array),
10420         (dbus_message_append_uint32_array),
10421         (dbus_message_append_double_array),
10422         (dbus_message_append_byte_array),
10423         (dbus_message_append_string_array), (dbus_message_get_args_valist),
10424         (dbus_message_iter_get_int32_array),
10425         (dbus_message_iter_get_uint32_array),
10426         (dbus_message_iter_get_double_array),
10427         (dbus_message_iter_get_byte_array),
10428         (dbus_message_iter_get_string_array):
10429
10430         * dbus/dbus-message.h:
10431         Add functions for appending and getting arrays.
10432
10433 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10434
10435         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
10436         element size at least 8 bytes, fixes mempool tests on
10437         64-bit machines.
10438
10439 2003-02-20  Alexander Larsson  <alexl@redhat.com>
10440
10441         * dbus/dbus-transport-unix.c (unix_do_iteration):
10442         Unlock the connection mutex during a blocking select call.
10443         Add todo about how we need a way to wake up the select.
10444
10445         * dbus/dbus-connection-internal.h:
10446         * dbus/dbus-connection.c:
10447         Add _dbus_connection_lock and _dbus_connection_unlock.
10448
10449 2003-02-19  Havoc Pennington  <hp@pobox.com>
10450
10451         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
10452         Doxyfile.in, not Doxyfile
10453
10454         * dbus/dbus-keyring.c: do some hacking on this
10455
10456         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
10457
10458         * dbus/dbus-errors.c (dbus_set_error_const): do not call
10459         dbus_error_init
10460         (dbus_set_error): remove dbus_error_init, check for message ==
10461         NULL *before* we sprintf into it, and add @todo about including
10462         system headers in this file
10463
10464         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
10465
10466         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
10467
10468         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
10469         get various bits of user information based on either username
10470         or user ID
10471         (_dbus_homedir_from_username): new function
10472
10473 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
10474
10475         * configure.in:
10476         Add check for nonposix getpwnam_r
10477
10478         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
10479         Align the pool element size to a sizeof (void *) boundary.
10480
10481         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
10482         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
10483         General Solaris fixes.
10484
10485         * test/data/valid-messages/simplest-manual.message:
10486         Explicitly state that we want little-endian packing.
10487
10488 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
10489
10490         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10491
10492         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
10493         Added to create a transport connecting using a tcp/ip socket.
10494
10495         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
10496         to a tcp socket at given host and port.
10497         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
10498         hostname and port.
10499
10500         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10501
10502         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
10503         Added to create a server listening on a TCP/IP socket.
10504
10505 2003-02-19  Havoc Pennington  <hp@pobox.com>
10506
10507         Throughout: mop up all the Doxygen warnings and undocumented
10508         stuff.
10509
10510         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
10511         to search any paths.
10512
10513         * dbus/dbus-threads.c: move global mutex initializers to
10514         dbus-internals.h, multiple prototypes was confusing doxygen
10515         besides being kind of ugly
10516
10517         * Doxyfile (PREDEFINED): have Doxygen define
10518         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
10519         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
10520         (do not abuse the feature! it's for stuff like the autogenerated
10521         macros in dbus-md5.c, not just for things you don't feel like
10522         documenting...)
10523
10524 2003-02-18  Havoc Pennington  <hp@pobox.com>
10525
10526         * dbus/dbus-string.c (_dbus_string_zero): new function
10527
10528         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
10529         wrap it in some dbus-friendly API
10530
10531         * dbus/dbus-types.h: add 16-bit types
10532
10533 2003-02-18  Joe Shaw  <joe@assbarn.com>
10534
10535         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
10536         credentials from our currently running process.
10537         (get_word): Fix a buglet where we were copying the entire length
10538         instead of relative to our position.
10539
10540         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
10541         keys on the stack... it's 640k of data.
10542
10543         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
10544         read the credentials byte off the socket, even if we don't have
10545         SO_PEERCRED.
10546         (_dbus_poll): Implement poll() using select() for systems which
10547         don't have it.
10548
10549         * glib/test-dbus-glib.c (main): Print out an error if no
10550         parameters are given.
10551
10552         * test/data/auth/fallback.auth-script: Added.  Tests that a client
10553         can fallback to a secondary auth mechanism if the first fails.
10554
10555 2003-02-18  Havoc Pennington  <hp@pobox.com>
10556
10557         * AUTHORS: add Alex
10558
10559 2003-02-17  Havoc Pennington  <hp@pobox.com>
10560
10561         * doc/dbus-specification.sgml: lots of cosmetic
10562         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
10563         env variable to DBUS_BUS_ADDRESS, s/client/application/,
10564         s/server/bus/ (except in authentication section). Add a section
10565         "Message Bus Message Routing"
10566
10567 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
10568
10569         Release 0.4
10570
10571         * NEWS: Update
10572
10573 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10574
10575         * doc/dbus-specification.sgml:
10576         Specification updates.
10577
10578 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10579
10580         * bus/activation.c: (bus_activation_init), (child_setup),
10581         (bus_activation_activate_service):
10582         * bus/activation.h:
10583         * bus/main.c: (main):
10584         Set DBUS_ADDRESS environment variable.
10585
10586         * dbus/dbus-errors.c: (dbus_set_error):
10587         Don't use va_copy since that's a C99 feature.
10588
10589         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
10590         (_dbus_spawn_async):
10591         * dbus/dbus-sysdeps.h:
10592         Add child_setup_func to _dbus_spawn_async.
10593
10594         * doc/dbus-specification.sgml:
10595         Update specification.
10596
10597         * test/spawn-test.c: (setup_func), (main):
10598         Fix test.
10599
10600 2003-02-17  Alexander Larsson  <alexl@redhat.com>
10601
10602         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
10603         Added todo.
10604
10605 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10606
10607         * doc/.cvsignore:
10608         * doc/Makefile.am:
10609         * doc/dbus-test-plan.sgml:
10610         Add test plan document.
10611
10612         * test/Makefile.am:
10613         Fix distcheck.
10614
10615 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10616
10617         * dbus/dbus-message.c: (decode_header_data),
10618         (_dbus_message_loader_return_buffer):
10619         Set the header padding amount when loading a message.
10620
10621 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10622
10623         * bus/dispatch.c: (send_one_message):
10624         Only send broadcast messages to registered connections.
10625
10626         * dbus/dbus-message.c: (dbus_message_name_is):
10627         * dbus/dbus-message.h:
10628         New convenience function.
10629
10630         * dbus/dbus-transport-debug.c: (do_reading):
10631         Only dispatch one message per run.
10632
10633         * test/Makefile.am:
10634         * test/bus-test.c: (new_connection_callback), (die),
10635         (test_hello_client1_handler), (test_hello_client2_handler),
10636         (test_hello_replies), (main):
10637
10638         * test/bus-test-loop.[ch]:
10639         Add these.
10640
10641 2003-02-16  Havoc Pennington  <hp@pobox.com>
10642
10643         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
10644         backward conditional
10645
10646 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10647
10648         * dbus/dbus-connection.c:
10649         Implement sent_message_with_reply. (with_reply_and block is still
10650         busted).
10651         Made dispatch_message not lose message if OOM.
10652
10653         * dbus/dbus-errors.h:
10654         Add NoReply error (for reply timeouts).
10655
10656 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10657
10658         * dbus/dbus-hash.c (_dbus_hash_table_unref):
10659         Actually free keys and values when destroying hashtable.
10660
10661 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10662
10663         * dbus/dbus-auth.c: (client_try_next_mechanism):
10664         Plug a leak.
10665
10666         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
10667         Return TRUE if there's no thread implementation around.
10668
10669         * glib/dbus-gmain.c: (free_source),
10670         (dbus_connection_hookup_with_g_main):
10671         Make sure to remove the GSource when the connection is finalized.
10672
10673 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10674
10675         * bus/dispatch.c: (bus_dispatch_message_handler):
10676         * dbus/dbus-errors.h:
10677         Return an error if someone tries to send a message to a service
10678         that doesn't exist.
10679
10680 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10681
10682         * bus/activation.c: (load_directory), (bus_activation_init),
10683         (bus_activation_activate_service):
10684         * bus/activation.h:
10685         * bus/driver.c:
10686         (bus_driver_handle_activate_service), (bus_driver_handle_message):
10687         More work on the activation handling.
10688
10689         * dbus/dbus-errors.h:
10690         Add some error messages
10691
10692         * dbus/dbus-message.c: (dbus_message_new_error_reply):
10693         * dbus/dbus-message.h:
10694         New function that creates an error message.
10695
10696         * dbus/dbus-protocol.h:
10697         Add ACTIVATE_SERVER message.
10698
10699         * dbus/dbus-server-unix.c: (unix_handle_watch),
10700         (_dbus_server_new_for_domain_socket):
10701         Call _dbus_fd_set_close_on_exec.
10702
10703         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
10704         (_dbus_spawn_async), (_dbus_disable_sigpipe),
10705         (_dbus_fd_set_close_on_exec):
10706         * dbus/dbus-sysdeps.h:
10707         Add _dbus_fd_set_close_on exec function. Also add function that checks
10708         that all open fds are set to close-on-exec and warns otherwise.
10709
10710         * dbus/dbus-transport-unix.c:
10711         (_dbus_transport_new_for_domain_socket):
10712         Call _dbus_fd_set_close_on_exec.
10713
10714 2003-02-16  Havoc Pennington  <hp@pobox.com>
10715
10716         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
10717         allow people to avoid setting SIGPIPE to SIG_IGN
10718         (_dbus_connection_new_for_transport): disable SIGPIPE unless
10719         we've been asked not to
10720
10721 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10722
10723         * dbus/dbus-list.c: (_dbus_list_append_link),
10724         (_dbus_list_prepend_link):
10725         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
10726         (dbus_realloc):
10727         Warning fixes.
10728
10729 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10730
10731         * bus/Makefile.am:
10732         * bus/activation.c: (bus_activation_entry_free),
10733         (add_desktop_file_entry), (load_directory), (bus_activation_init):
10734         * bus/activation.h:
10735         * bus/main.c: (main):
10736         Add simple activation support, doesn't work yet though.
10737
10738 2003-02-15   Zack Rusin  <zack@kde.org>
10739
10740         * qt/dbus-qthread.cpp:  small casting fix
10741
10742 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10743
10744         * dbus/dbus-errors.c: (dbus_set_error):
10745         * dbus/dbus-errors.h:
10746         Add a few errors and make dbus_set_error void.
10747
10748         * dbus/dbus-sysdeps.c:
10749         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
10750         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
10751         * dbus/dbus-sysdeps.h:
10752         Add _dbus_spawn_async.
10753
10754         * test/spawn-test.c: (main):
10755         Test for _dbus_spawn_async.
10756
10757 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10758
10759         * dbus/dbus-internals.h:
10760         Fix build without tests.
10761
10762         * dbus/dbus-list.c: (alloc_link):
10763         Fix a segfault when a malloc fails.
10764
10765         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
10766         (dbus_malloc0), (dbus_realloc):
10767         Add support for malloc debugging.
10768
10769 2003-02-15  Alexander Larsson  <alexl@redhat.com>
10770
10771         * dbus/dbus-threads.c:
10772         * dbus/dbus-threads.h:
10773         Add condvars. Remove static mutext from API.
10774         Implement static mutexes by initializing them from threads_init.
10775
10776         * glib/dbus-gthread.c:
10777         * qt/dbus-qthread.cpp:
10778         Update with the thread api changes.
10779
10780
10781         * dbus/dbus-list.c:
10782         * dbus/dbus-list.h:
10783         Turn StaticMutex into normal mutex + init function.
10784         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
10785         _dbus_list_append_link, _dbus_list_prepend_link
10786
10787
10788         * dbus/dbus-sysdeps.c:
10789         * dbus/dbus-sysdeps.h:
10790         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
10791         _dbus_atomic_dec. Only slow fallback implementation at the moment.
10792
10793         * dbus/dbus-protocol.h:
10794         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
10795
10796         * dbus/dbus-message.c:
10797         Make ref/unref atomic.
10798         Fix some docs.
10799
10800         * dbus/dbus-connection-internal.h:
10801         * dbus/dbus-connection.c:
10802         * dbus/dbus-connection.h:
10803         Make threadsafe.
10804         Change _peek to _borrow,_return & _steal_borrowed.
10805         Change disconnect callback to event.
10806         Make dbus_connection_dispatch_messages reentrant.
10807
10808         * dbus/dbus-transport.c:
10809         Don't ref the connection on calls to the transport
10810         implementation.
10811
10812         * dbus/dbus-message-handler.c:
10813         Make threadsafe.
10814
10815         * glib/dbus-gmain.c:
10816         Don't use peek_message anymore
10817
10818         * test/Makefile.am:
10819         * test/debug-thread.c:
10820         * test/debug-thread.h:
10821         Simple thread implementation that asserts() on deadlocks in
10822         single-threaded code.
10823
10824         * test/bus-test.c:
10825         (main) Call debug_threads_init.
10826
10827         * test/watch.c:
10828         Use disconnect message instead of disconnect callback.
10829
10830         * bus/connection.c:
10831         * bus/connection.h:
10832         Don't call dbus_connection_set_disconnect_function. Instead export
10833         bus_connection_disconnect.
10834
10835         * bus/dispatch.c:
10836         Call bus_connection_disconnect when we get a disconnected message.
10837
10838 2003-02-15  Havoc Pennington  <hp@pobox.com>
10839
10840         * dbus/dbus-message.c (dbus_message_new): fool around with the
10841         docs
10842
10843 2003-02-14  Havoc Pennington  <hp@pobox.com>
10844
10845         * dbus/dbus-mempool.c: fail if the debug functions so indicate
10846
10847         * dbus/dbus-memory.c: fail if the debug functions indicate we
10848         should
10849
10850         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
10851         (_dbus_decrement_fail_alloc_counter): debug functions to
10852         simulate memory allocation failures
10853
10854 2003-02-14  Havoc Pennington  <hp@pobox.com>
10855
10856         * dbus/dbus-errors.h (struct DBusError): add a word of padding
10857         to DBusError
10858
10859 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10860
10861         * bus/driver.c: (bus_driver_handle_hello):
10862         * bus/driver.h:
10863         * bus/services.c: (bus_service_lookup):
10864         Reorder message sending so we get a more sane order.
10865
10866         * test/bus-test.c: (message_handler):
10867         Fix tyop.
10868
10869 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10870
10871         * bus/driver.c: (bus_driver_send_service_deleted),
10872         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10873         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10874         (bus_driver_send_welcome_message),
10875         (bus_driver_handle_list_services),
10876         (bus_driver_handle_acquire_service),
10877         (bus_driver_handle_service_exists):
10878         * dbus/dbus-bus.c: (dbus_bus_register_client),
10879         (dbus_bus_acquire_service), (dbus_bus_service_exists):
10880         * dbus/dbus-errors.c: (dbus_result_to_string):
10881         * dbus/dbus-errors.h:
10882         * dbus/dbus-message.c: (dbus_message_append_args),
10883         (dbus_message_append_args_valist), (dbus_message_get_args),
10884         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
10885         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
10886         (dbus_message_iter_get_byte_array),
10887         (dbus_message_iter_get_string_array), (message_iter_test),
10888         (check_message_handling), (_dbus_message_test):
10889         * dbus/dbus-message.h:
10890         * test/bus-test.c: (main):
10891         Change fields to arguments in messages, so that they won't be
10892         confused with header fields.
10893
10894         * glib/test-dbus-glib.c: (main):
10895         Remove append_fields from hello message.
10896
10897 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10898
10899         * dbus/dbus-errors.c:
10900         * dbus/dbus-message.c:
10901         * dbus/dbus-string.c:
10902         Documentation fixes.
10903
10904 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10905
10906         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
10907         (remove_timeout):
10908         Implement support for timeouts in dbus-glib.
10909
10910 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10911
10912         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10913         * dbus/dbus-message.c: (process_test_subdir):
10914         * test/break-loader.c: (find_breaks_based_on):
10915         Plug some memory leaks.
10916
10917 2003-02-13  Richard Hult  <rhult@codefactory.se>
10918
10919         * bus/main.c: Fix build.
10920
10921         * dbus/dbus-errors.h:
10922         * dbus/dbus-errors.c: Fix copyright for Anders.
10923
10924 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10925
10926         * bus/Makefile.am:
10927         Add utils.[ch]
10928
10929         * bus/connection.c: (bus_connection_foreach):
10930         Fix a warning.
10931
10932         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10933         (unescape_string), (new_section), (parse_section_start),
10934         (parse_key_value), (report_error), (bus_desktop_file_load),
10935         (bus_desktop_file_get_string):
10936         * bus/desktop-file.h:
10937         Use DBusError for error reporting.
10938
10939         * bus/dispatch.c: (send_one_message),
10940         (bus_dispatch_message_handler):
10941         * bus/driver.c: (bus_driver_send_service_deleted),
10942         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10943         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10944         (bus_driver_send_welcome_message),
10945         (bus_driver_handle_list_services),
10946         (bus_driver_handle_acquire_service),
10947         (bus_driver_handle_service_exists):
10948         * bus/loop.c: (bus_loop_run):
10949         * bus/main.c:
10950         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
10951
10952         * bus/utils.c: (bus_wait_for_memory):
10953         * bus/utils.h:
10954         New files with general utility functions.
10955
10956         * dbus/dbus-internals.h:
10957         Remove _DBUS_HANDLE_OOM.
10958
10959 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10960
10961         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
10962         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
10963         * dbus/dbus-errors.h:
10964         Add DBusError structure.
10965
10966 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10967
10968         * test/data/valid-messages/standard-acquire-service.message:
10969         * test/data/valid-messages/standard-hello.message:
10970         * test/data/valid-messages/standard-list-services.message:
10971         * test/data/valid-messages/standard-service-exists.message:
10972         Add some standard messages.
10973
10974 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10975
10976         * bus/driver.c: (bus_driver_send_welcome_message),
10977         (bus_driver_handle_list_services),
10978         (bus_driver_handle_acquire_service),
10979         (bus_driver_handle_service_exists), (bus_driver_handle_message):
10980         Update for API changes in libdbus.
10981
10982         * dbus/dbus-message.c: (dbus_message_new_reply):
10983         * dbus/dbus-message.h:
10984         Remove the name argument. The spec states that replies shouldn't
10985         have a name.
10986
10987 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10988
10989         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
10990         (report_error), (bus_desktop_file_load), (lookup_section),
10991         (lookup_line), (bus_desktop_file_get_raw),
10992         (bus_desktop_file_get_string):
10993         * bus/desktop-file.h:
10994         Some fixes, and new functions for getting a key value from a section.
10995
10996 2003-02-13  Havoc Pennington  <hp@pobox.com>
10997
10998         * test/data/auth/fail-after-n-attempts.auth-script: new test
10999
11000         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
11001         reject the client.
11002
11003 2003-02-13  Havoc Pennington  <hp@pobox.com>
11004
11005         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
11006         dbus_credentials_match were backward
11007
11008         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
11009         NO_CREDENTIALS and ROOT_CREDENTIALS
11010
11011         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
11012         into here. Never process more commands after we've reached an
11013         end state; store further data as unused bytes.
11014
11015         * test/data/auth/*: add more auth tests
11016
11017         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
11018         command to match exact string and EXPECT_UNUSED to match unused
11019         bytes
11020
11021         * test/Makefile.am (dist-hook): fix to dist all the test stuff
11022
11023 2003-02-12  Havoc Pennington  <hp@pobox.com>
11024
11025         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
11026         \r off of popped lines
11027
11028         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
11029         scripts
11030
11031         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
11032         SEND, append \r\n
11033
11034 2003-02-12  Havoc Pennington  <hp@pobox.com>
11035
11036         * dbus/Makefile.am: remove break-loader from the build, since it
11037         moved.
11038
11039         * configure.in: add --enable-gcov to turn on coverage profiling
11040         flags and disable optimization
11041
11042 2003-02-10  Havoc Pennington  <hp@pobox.com>
11043
11044         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
11045         initial cut at test framework for DBusAuth from laptop.
11046         Doesn't quite work yet but it compiles and I need to get
11047         it off the 266mhz laptop. ;-)
11048
11049         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
11050         fix a memleak in error case
11051
11052 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
11053
11054         * bus/Makefile.am:
11055         * bus/desktop-file.c:
11056         * bus/desktop-file.h:
11057         Add a desktop file parser.
11058
11059 2003-02-11  Zack Rusin  <zack@kde.org>
11060
11061         * qt/message.[h|cpp]: sample implementation
11062         of the KDE wrapper for DBusMessage
11063
11064 2003-02-09  Zack Rusin  <zack@kde.org>
11065
11066         * test/bus-test.c: make_it_compile
11067         * doc/dbus-specification.sgml: minimal semantic fix
11068
11069 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
11070
11071         Release 0.3
11072
11073         * NEWS: Update
11074
11075 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
11076
11077         * dbus/Makefile.am:
11078         * dbus/dbus-break-loader.c:
11079         * test/Makefile.am:
11080         * test/break-loader.c:
11081         Move dbus-break-loader to test/ and rename it to break-loader.
11082
11083 2003-02-02  Havoc Pennington  <hp@pobox.com>
11084
11085         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
11086         for code to manage cookies in your home directory
11087
11088         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
11089
11090         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
11091         to authenticate, then disconnect the client.
11092
11093 2003-02-03  Alexander Larsson  <alexl@redhat.com>
11094
11095         * dbus/dbus-message.c (dbus_message_append_fields):
11096         Correct docs.
11097
11098 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11099
11100         * doc/dbus-specification.sgml:
11101         Update address format section.
11102
11103 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11104
11105         * test/Makefile.am:
11106         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
11107         (message_handler), (new_connection_callback), (loop_quit),
11108         (loop_run), (main):
11109         Add bus test.
11110
11111 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11112
11113         * bus/driver.c: (bus_driver_handle_service_exists):
11114         Simplify the code a bit.
11115
11116         * dbus/dbus-bus.c: (dbus_bus_service_exists):
11117         Fix a silly.
11118
11119 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11120
11121         * bus/Makefile.am:
11122         Add libdbus-daemon.la and link to it.
11123
11124 2003-02-01  James Willcox  <jwillcox@gnome.org>
11125
11126         * bus/driver.c: (bus_driver_handle_own_service):
11127         Actually include the service reply code in the message.
11128
11129 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11130
11131         * bus/driver.c: (bus_driver_handle_service_exists):
11132         Don't unref the incoming message.
11133
11134 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11135
11136         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
11137
11138 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11139
11140         * dbus/dbus-server.c: (dbus_server_listen):
11141         * dbus/dbus-transport.c: (_dbus_transport_open):
11142         ifdef out the calls to the debug transport and server.
11143
11144 2003-02-02  Alexander Larsson  <alexl@redhat.com>
11145
11146         * dbus/dbus-watch.c (dbus_watch_get_flags):
11147         Add note in the docs that ERROR or HANGUP won't be returned
11148         and are assumed always on.
11149
11150         * glib/dbus-gmain.c (add_watch):
11151         Always add IO_ERR | IO_HUP
11152
11153         * dbus/dbus-message.h:
11154         Add semicolon after dbus_message_iter_get_string_array().
11155         Makes qt code build again
11156
11157 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
11158
11159         * bus/driver.c: (create_unique_client_name),
11160         (bus_driver_handle_hello):
11161         Don't take a name, just use a numeric id to identify
11162         each client.
11163
11164         * dbus/Makefile.am:
11165         * dbus/dbus-bus.c: (dbus_bus_register_client),
11166         (dbus_bus_acquire_service), (dbus_bus_service_exists):
11167         * dbus/dbus-bus.h:
11168         Add new convenience functions for communicating with the bus.
11169
11170         * dbus/dbus-message.h:
11171
11172         * dbus/dbus-protocol.h:
11173         Fix a typo.
11174
11175 2003-02-01  Alexander Larsson  <alexl@redhat.com>
11176
11177         * dbus/dbus-message.c (dbus_message_append_fields):
11178         Add some more doc comments.
11179
11180 2003-02-01  Havoc Pennington  <hp@pobox.com>
11181
11182         * dbus/dbus-break-loader.c (randomly_modify_length): change
11183         a 4-byte value in the message as if it were a length
11184
11185         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
11186         execute bit on saved files
11187
11188 2003-02-01  Havoc Pennington  <hp@pobox.com>
11189
11190         * dbus/dbus-break-loader.c (main): new program to find messages
11191         that break the loader.
11192
11193         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
11194         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
11195
11196         * dbus/dbus-string.c (_dbus_string_set_byte): new
11197
11198 2003-01-31  Havoc Pennington  <hp@pobox.com>
11199
11200         * dbus/dbus-message.c: refactor the test code to be more general,
11201         in preparation for writing a "randomly permute test cases to
11202         try to break the loader" program.
11203
11204 2003-01-31  Havoc Pennington  <hp@pobox.com>
11205
11206         * doc/dbus-specification.sgml: work on the specification
11207
11208         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
11209         the protocol version of the message.
11210
11211         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
11212         no longer specifies that.
11213         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
11214         1/2/3/4)
11215
11216         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
11217         "break" for DBUS_TYPE_NIL, remove @todo
11218
11219 2003-01-31  Havoc Pennington  <hp@pobox.com>
11220
11221         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
11222         just set_is_error/get_is_error as this is a commonly-used
11223         function, and write docs.
11224
11225 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
11226
11227         * dbus/dbus-address.c: (dbus_address_entry_free):
11228         Free key and value lists.
11229
11230         * dbus/dbus-internals.c: (_dbus_type_to_string):
11231         Add the types we didn't have.
11232
11233         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
11234         (_dbus_marshal_validate_arg):
11235         Add NIL types.
11236
11237         * dbus/dbus-message.c: (dbus_message_set_sender):
11238         Remove todo about being able to set sender to NULL.
11239
11240         (dbus_message_set_is_error_reply),
11241         (dbus_message_get_is_error_reply):
11242         * dbus/dbus-message.h:
11243         New functions.
11244
11245         * dbus/dbus-protocol.h:
11246         Add error reply flag.
11247
11248         * test/data/valid-messages/opposite-endian.message:
11249         Add NIL type to test.
11250
11251 2003-01-31  Havoc Pennington  <hp@pobox.com>
11252
11253         * doc/dbus-specification.sgml: fully specify the header.  Add
11254         flags and major protocol version, and change header/body len to
11255         unsigned.
11256
11257         * dbus/dbus-message-builder.c (append_saved_length): append length
11258         as uint32
11259
11260         * dbus/dbus-message.c (dbus_message_create_header): change header
11261         length and body length to unsigned. Add the new fields from the
11262         spec
11263         (_dbus_message_loader_return_buffer): unsigned header/body len
11264
11265 2003-01-30  Havoc Pennington  <hp@pobox.com>
11266
11267         * dbus/dbus-auth.c: rework to use only REJECTED, no
11268         MECHANISMS
11269
11270         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
11271         use REJECTED, suggested by Mark McLoughlin
11272
11273 2003-01-30  Havoc Pennington  <hp@pobox.com>
11274
11275         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
11276         a better way to report errors here. e.g.  "unix address lacks
11277         path" or something. also "no such file" when the path doesn't
11278         exist, etc.
11279
11280         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
11281         leaking list nodes
11282         (dbus_parse_address): add @todo about documenting address format,
11283         and allowing , and ; to be escaped
11284
11285 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
11286
11287         * dbus/Makefile.am:
11288         Add dbus-address.[ch]
11289
11290         * dbus/dbus-address.c: (dbus_address_entry_free),
11291         (dbus_address_entries_free), (create_entry),
11292         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
11293         (dbus_parse_address), (_dbus_address_test):
11294         * dbus/dbus-address.h:
11295         New files for dealing with address parsing.
11296
11297         * dbus/dbus-connection.c:
11298         Document timeout functions.
11299
11300         * dbus/dbus-message.c:
11301         Document dbus_message_new_from_message.
11302
11303         * dbus/dbus-server-debug.c:
11304         Document.
11305
11306         * dbus/dbus-server.c: (dbus_server_listen):
11307         Parse address and use correct server implementation.
11308
11309         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
11310         * dbus/dbus-string.h:
11311         New function with test.
11312
11313         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
11314         * dbus/dbus-test.h:
11315         Add address tests.
11316
11317         * dbus/dbus-transport-debug.c:
11318         Document.
11319
11320         * dbus/dbus-transport.c: (_dbus_transport_open):
11321         Parse address and use correct transport implementation.
11322
11323 2003-01-30  Havoc Pennington  <hp@pobox.com>
11324
11325         * dbus/dbus-message.c: use message->byte_order instead of
11326         DBUS_COMPILER_BYTE_ORDER throughout.
11327         (dbus_message_create_header): pad header to align the
11328         start of the body of the message to 8-byte boundary
11329
11330         * dbus/dbus-marshal.h: make all the demarshalers take const
11331         DBusString arguments.
11332
11333         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
11334         validate message args here, so we don't have to do slow validation
11335         later, and so we catch bad messages as they are incoming. Also add
11336         better checks on header_len and body_len. Also fill in
11337         message->byte_order
11338
11339         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
11340         implemented properly)
11341         (_dbus_string_validate_nul): new function to check all-nul
11342
11343         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
11344         get_arg_end_pos and remove all validation
11345         (_dbus_marshal_validate_arg): actually do validation here.
11346
11347 2003-01-29  Havoc Pennington  <hp@pobox.com>
11348
11349         * dbus/dbus-message.c (check_message_handling): fix assertion
11350         failure on set_client_serial
11351
11352 2003-01-28  Havoc Pennington  <hp@pobox.com>
11353
11354         * dbus/dbus-server-debug.c: Add doc section comments
11355
11356         * dbus/dbus-transport-debug.c: add doc section comments
11357
11358 2003-01-28  Havoc Pennington  <hp@redhat.com>
11359
11360         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
11361         the reverse order from how I had it
11362         (_dbus_string_base64_encode): reverse encoding order. I was
11363         basically byteswapping everything during encoding.
11364
11365 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
11366
11367         * dbus/dbus-connection-internal.h:
11368         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
11369         (_dbus_connection_remove_timeout):
11370         Add functions for adding and removing timeouts.
11371
11372         * dbus/dbus-message.c: (dbus_message_new_from_message):
11373         Add new function that takes a message and creates an exact
11374         copy of it, but with the refcount set to 1.
11375         (check_message_handling):
11376         Fix build error.
11377
11378         * dbus/dbus-server-protected.h:
11379         * dbus/dbus-server.c: (_dbus_server_init_base),
11380         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
11381         (dbus_server_set_timeout_functions):
11382         (_dbus_server_remove_timeout):
11383         New functions so that a server can add and remove timeouts.
11384
11385         (dbus_server_listen):
11386         Add commented out call to dbus_server_debug_new.
11387
11388         * dbus/dbus-timeout.c: (_dbus_timeout_new):
11389         Actually set the handler, doh.
11390
11391         * dbus/dbus-transport.c: (_dbus_transport_open):
11392         Add commented out call to dbus_transport_debug_client_new.
11393
11394         * dbus/Makefile.am:
11395         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
11396
11397 2003-01-28  Havoc Pennington  <hp@pobox.com>
11398
11399         * dbus/dbus-message.c (check_message_handling): function to check
11400         on the loaded message, iterates over it etc.
11401
11402 2003-01-28  Havoc Pennington  <hp@pobox.com>
11403
11404         * test/Makefile.am (dist-hook): fix make distdir
11405
11406         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
11407
11408 2003-01-27  Havoc Pennington  <hp@pobox.com>
11409
11410         * dbus/dbus-mempool.c (time_for_size): replace printf with
11411         _dbus_verbose
11412
11413         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
11414         empty lines; fix the SAVE_LENGTH stuff to be
11415         START_LENGTH/END_LENGTH so it actually works; couple other
11416         bugfixes
11417
11418         * test/Makefile.am (dist-hook): add dist-hook for .message files
11419
11420         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
11421         can be constant or locked.
11422         (_dbus_string_free): allow freeing a const string as
11423         documented/intended
11424
11425         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
11426
11427         * dbus/dbus-test-main.c (main): take an argument which is the
11428         directory containing test data
11429
11430         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
11431         argument to this and load all the messages in test/data/
11432         checking that they can be loaded or not loaded as appropriate.
11433
11434 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
11435
11436         * bus/dispatch.c: (bus_dispatch_message_handler):
11437         Dispatch messages sent to services.
11438
11439         * bus/driver.c: (bus_driver_send_service_deleted),
11440         (bus_driver_send_service_created), (bus_driver_send_service_lost),
11441         (bus_driver_send_service_acquired):
11442         Add helper functions for sending service related messages.
11443
11444         (bus_driver_send_welcome_message):
11445         Send HELLO_REPLY instead of WELCOME.
11446
11447         (bus_driver_handle_list_services):
11448         Send LIST_SERVICES_REPLY instead of SERVICES.
11449
11450         (bus_driver_handle_own_service),
11451         (bus_driver_handle_service_exists):
11452         New message handlers.
11453
11454         (bus_driver_handle_message):
11455         Invoke new message handlers.
11456
11457         (bus_driver_remove_connection):
11458         Don't remove any services here since that's done automatically
11459         by bus_service_remove_owner now.
11460
11461         * bus/driver.h:
11462         New function signatures.
11463
11464         * bus/services.c: (bus_service_add_owner):
11465         Send ServiceAcquired message if we're the only primary owner.
11466
11467         (bus_service_remove_owner):
11468         Send ServiceAcquired/ServiceLost messages.
11469
11470         (bus_service_set_prohibit_replacement),
11471         (bus_service_get_prohibit_replacement):
11472         Functions for setting prohibit replacement.
11473
11474         (bus_service_has_owner):
11475         New function that checks if a connection is in the owner queue of
11476         a certain service.
11477
11478         * bus/services.h:
11479         Add new function signatures.
11480
11481         * dbus/dbus-list.c: (_dbus_list_test):
11482         Add tests for _dbus_list_remove_last and traversing the list backwards.
11483
11484         * dbus/dbus-list.h:
11485         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
11486         go any further, so return NULL then.
11487
11488         * dbus/dbus-protocol.h:
11489         Add new messages, service flags and service replies.
11490
11491 2003-01-26  Havoc Pennington  <hp@pobox.com>
11492
11493         * dbus/dbus-message-builder.c: implement, completely untested.
11494
11495         * test/data/*: add data to be used in testing.
11496         ".message" files are our simple loadable text format.
11497         ".message-raw" will be binary dumps of messages.
11498
11499         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11500
11501 2003-01-26  Havoc Pennington  <hp@pobox.com>
11502
11503         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
11504
11505         * dbus/dbus-errors.c (dbus_result_to_string): add
11506         file errors
11507
11508         * dbus/dbus-message-builder.c: new file, will contain code to load
11509         up messages from files. Not implemented yet.
11510
11511 2003-01-26  Havoc Pennington  <hp@pobox.com>
11512
11513         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
11514         the sender by setting to NULL
11515
11516 2003-01-26  Havoc Pennington  <hp@pobox.com>
11517
11518         The unit tests pass, but otherwise untested.  If it breaks, the
11519         tests should have been better. ;-)
11520
11521         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
11522         the connection.
11523
11524         * dbus/dbus-message.c: redo everything so we maintain
11525         message->header as the only copy of the various fields.
11526         This avoids the possibility of out-of-memory in some cases,
11527         for example dbus_message_lock() can't run out of memory anymore,
11528         and avoids extra copying. Figured I may as well go ahead and do
11529         this since it was busted for dbus_message_lock to not return
11530         failure on OOM, and dbus_message_write_header was totally
11531         unchecked for OOM. Also fixed some random other bugs.
11532
11533         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
11534         that strings are nul-terminated. Also, end_pos can be equal
11535         to string length just not greater than, I think.
11536         (_dbus_marshal_set_int32): new function
11537         (_dbus_marshal_set_uint32): new function
11538         (_dbus_marshal_set_string): new function
11539
11540         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
11541         a warning, init timeout_list to NULL
11542         (dbus_connection_send_message): don't use uninitialized variable
11543         "serial"
11544
11545         * dbus/dbus-string.c (_dbus_string_replace_len): new function
11546
11547 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11548
11549         * bus/driver.c: (bus_driver_handle_hello),
11550         (bus_driver_send_welcome_message):
11551         Plug leaks
11552
11553 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11554
11555         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
11556         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11557         (dbus_connection_unref):
11558         * dbus/dbus-marshal.c: (_dbus_marshal_test):
11559         * dbus/dbus-message.c: (dbus_message_unref),
11560         Plug memory leaks.
11561
11562         (dbus_message_get_fields):
11563         Remove debugging printout.
11564
11565         (_dbus_message_loader_return_buffer):
11566         Don't store the header string.
11567
11568         (_dbus_message_test):
11569         Plug leaks.
11570
11571 2003-01-26  Richard Hult  <rhult@codefactory.se>
11572
11573         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
11574         the file descriptor list, since it can change under us.
11575
11576 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11577
11578         * glib/dbus-gmain.c: (dbus_connection_prepare),
11579         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
11580         (remove_watch), (dbus_connection_hookup_with_g_main):
11581         Rewrite the glib handling to use its own GSource instead of a
11582         GIOChannel so we can catch messages put in the queue while waiting
11583         for a reply.
11584
11585 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11586
11587         * bus/Makefile.am:
11588         * bus/connection.c: (connection_disconnect_handler),
11589         (connection_watch_callback), (bus_connection_setup):
11590         * bus/dispatch.c: (send_one_message),
11591         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
11592         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
11593         * bus/dispatch.h:
11594         * bus/driver.c: (bus_driver_send_service_deleted),
11595         (bus_driver_send_service_created), (bus_driver_handle_hello),
11596         (bus_driver_send_welcome_message),
11597         (bus_driver_handle_list_services), (bus_driver_remove_connection),
11598         (bus_driver_handle_message):
11599         * bus/driver.h:
11600         Refactor code, put the message dispatching in its own file. Use
11601         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
11602         is disconnected.
11603
11604 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11605
11606         * dbus/dbus-internals.h:
11607         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
11608
11609         * dbus/dbus-message.c: (dbus_message_get_sender):
11610         * dbus/dbus-message.h:
11611         Implement dbus_message_get_sender.
11612
11613         * dbus/dbus-protocol.h:
11614         Add message and service defines.
11615
11616 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11617
11618         * dbus/dbus-connection.c: (dbus_connection_send_message):
11619         * dbus/dbus-message-internal.h:
11620         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
11621         (dbus_message_write_header):
11622         Remove _dbus_messag_unlock and don't set the client serial on a
11623         message if one already exists.
11624
11625 2003-01-24  Havoc Pennington  <hp@pobox.com>
11626
11627         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
11628         list_pool
11629
11630         * bus/driver.c (bus_driver_handle_list_services): fix a leak
11631         on OOM
11632
11633 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11634
11635         * dbus/dbus-list.c: (alloc_link), (free_link):
11636         Use a memory pool for the links.
11637
11638 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11639
11640         * bus/connection.c: (bus_connection_foreach):
11641         * bus/connection.h:
11642         Add new bus_connection_foreach function.
11643
11644         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
11645         Add function that broadcasts a message to all clients.
11646
11647         (bus_driver_send_service_created), (bus_driver_handle_hello),
11648         (bus_driver_send_welcome_message),
11649         (bus_driver_handle_list_services), (bus_driver_message_handler):
11650         Implement functions that take care of listing services, and notifying
11651         clients when new services are created.
11652
11653         * bus/services.c: (bus_services_list):
11654         * bus/services.h:
11655         Add new function that returns an array of strings with the currently
11656         registered services.
11657
11658         * glib/dbus-glib.h:
11659         * glib/dbus-gmain.c:
11660         Update copyright year.
11661
11662 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11663
11664         * dbus/dbus-connection.c: (dbus_connection_send_message):
11665         Unlock the message in case it was sent earlier.
11666
11667         (dbus_connection_send_message_with_reply_and_block):
11668         Remove the reply message from the list.
11669
11670         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
11671         Set array_len and new_pos correctly.
11672
11673         (_dbus_marshal_test):
11674         Remove debug output.
11675
11676         * dbus/dbus-message-internal.h:
11677         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
11678         New function that returns the reply serial.
11679
11680         (_dbus_message_unlock):
11681         New function that unlocks a message and resets its header.
11682
11683         (dbus_message_append_string_array),
11684         (dbus_message_get_fields_valist),
11685         (dbus_message_iter_get_field_type),
11686         (dbus_message_iter_get_string_array),
11687         (dbus_message_get_fields),
11688         (dbus_message_append_fields_valist):
11689         Handle string arrays.
11690
11691         (dbus_message_set_sender):
11692         Make this function public since the bus daemon needs it.
11693
11694         (decode_header_data):
11695         Set the reply serial to -1 initially.
11696
11697         * dbus/dbus-message.h:
11698         Add dbus_message_set_sender.
11699
11700 2003-01-24  Havoc Pennington  <hp@pobox.com>
11701
11702         * doc/dbus-specification.sgml: add some stuff
11703
11704 2003-01-22  Havoc Pennington  <hp@pobox.com>
11705
11706         * doc/dbus-specification.sgml: Start to document the protocol.
11707
11708 2003-01-22  Havoc Pennington  <hp@pobox.com>
11709
11710         * dbus/dbus-connection.c
11711         (dbus_connection_send_message_with_reply_and_block): add some @todo
11712
11713         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11714
11715 2003-01-21  Havoc Pennington  <hp@pobox.com>
11716
11717         (patch untested because can't compile)
11718
11719         * bus/driver.c (create_unique_client_name): make this function
11720         never recycle client names. Also, caller should initialize
11721         the DBusString.
11722
11723         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
11724
11725 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11726
11727         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11728         (_dbus_marshal_int32), (_dbus_marshal_uint32),
11729         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
11730         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
11731         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
11732         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
11733         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
11734         * dbus/dbus-marshal.h:
11735         * dbus/dbus-protocol.h:
11736         Add support for marshalling and demarshalling integer, double
11737         and string arrays.
11738
11739 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11740
11741         * bus/Makefile.am:
11742         Add driver.[ch]
11743
11744         * bus/connection.c: (connection_disconnect_handler):
11745         Remove the connection from the bus driver's list.
11746
11747         (connection_watch_callback): Dispatch messages.
11748
11749         (free_connection_data): Free connection name.
11750
11751         (bus_connection_setup): Add connection to the bus driver's list.
11752         (bus_connection_remove_owned_service):
11753         (bus_connection_set_name), (bus_connection_get_name):
11754         Add functions for setting and getting the connection's name.
11755
11756         * bus/connection.h:
11757         Add function headers.
11758
11759         * bus/driver.c: (create_unique_client_name),
11760         (bus_driver_handle_hello_message),
11761         (bus_driver_send_welcome_message), (bus_driver_message_handler),
11762         (bus_driver_add_connection), (bus_driver_remove_connection):
11763         * bus/driver.h:
11764         * bus/main.c:
11765         * bus/services.c: (bus_service_free):
11766         * bus/services.h:
11767         New file that handles communication and registreation with the bus
11768         itself.
11769
11770 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11771
11772         * dbus/dbus-connection.c: (dbus_connection_send_message):
11773         Add a new client_serial parameter.
11774
11775         (dbus_connection_send_message_with_reply):
11776         Remove a @todo since we've implemented the blocking function.
11777
11778         (dbus_connection_send_message_with_reply_and_block):
11779         New function that sends a message and waits for a reply and
11780         then returns the reply.
11781
11782         * dbus/dbus-connection.h:
11783         Add new functions.
11784
11785         * dbus/dbus-errors.c: (dbus_result_to_string):
11786         * dbus/dbus-errors.h:
11787         Add new DBUS_RESULT.
11788
11789         * dbus/dbus-message-internal.h:
11790         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
11791         (_dbus_message_set_sender), (dbus_message_write_header),
11792         (dbus_message_new_reply), (decode_header_data),
11793         (_dbus_message_loader_return_buffer), (_dbus_message_test):
11794         * dbus/dbus-message.h:
11795         Add new functions that set the reply serial and sender.
11796         Also marshal and demarshal them correctly and add test.
11797
11798         * dbus/dbus-protocol.h:
11799         Add new DBUS_MESSAGE_TYPE_SENDER.
11800
11801         * glib/dbus-glib.h:
11802         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
11803         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
11804         (dbus_connection_hookup_with_g_main):
11805         * glib/test-dbus-glib.c: (main):
11806         Rewrite to use GIOChannel and remove the GSource crack.
11807
11808         * test/echo-client.c: (main):
11809         * test/watch.c: (check_messages):
11810         Update for changed APIs
11811
11812 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11813
11814         * dbus/Makefile.am: Add dbus-timeout.[cħ]
11815
11816         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
11817         Create a DBusTimeoutList.
11818         (dbus_connection_set_timeout_functions): Add new function to
11819         set timeout callbacks
11820
11821         * dbus/dbus-connection.h: Add public DBusTimeout API.
11822
11823         * dbus/dbus-message.c: (dbus_message_get_service):
11824         * dbus/dbus-message.h:  New function.
11825
11826         * dbus/dbus-server.c: Fix small doc typo.
11827
11828         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
11829
11830 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11831
11832         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
11833         of the string, just as long as specified.
11834
11835 2003-01-19  Havoc Pennington  <hp@pobox.com>
11836
11837         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
11838         new function
11839
11840         * dbus/dbus-server.c (dbus_server_set_max_connections)
11841         (dbus_server_get_max_connections, dbus_server_get_n_connections):
11842         keep track of current number of connections, and add API for
11843         setting a max (but haven't implemented enforcing the max yet)
11844
11845 2003-01-18  Havoc Pennington  <hp@pobox.com>
11846
11847         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
11848         reading/writing if read_watch != NULL or write_watch != NULL.
11849
11850         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
11851         the message loader code to actually load message->header and
11852         message->body into the newly-created message.
11853
11854         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
11855         in OOM case
11856
11857         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
11858         (dbus_connection_get_max_message_size)
11859         (dbus_connection_set_max_live_messages_size)
11860         (dbus_connection_get_max_live_messages_size): implement some
11861         resource limitation functions
11862
11863         * dbus/dbus-resources.c: new file implementing some of the
11864         resource limits stuff
11865
11866         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
11867         missing docs, add @todo to handle OOM etc.
11868
11869         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
11870         docs
11871
11872 2003-01-18  Havoc Pennington  <hp@pobox.com>
11873
11874         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
11875         connection if it hasn't been already.
11876
11877         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
11878         replace with DisconnectFunction.
11879
11880 2003-01-18  Havoc Pennington  <hp@pobox.com>
11881
11882         Building --disable-verbose-mode --disable-asserts --disable-tests
11883         cuts the library from 112K to 45K or so
11884
11885         * configure.in: check for varargs macro support,
11886         add --enable-verbose-mode, --enable-asserts.
11887
11888         * dbus/dbus-internals.h (_dbus_assert): support
11889         DBUS_DISABLE_ASSERT
11890         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
11891
11892 2003-01-18  Havoc Pennington  <hp@pobox.com>
11893
11894         * dbus/dbus-test.c: include config.h so that tests actually run
11895
11896         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
11897         so the failure mode when that assumption fails will be plenty
11898         obvious.
11899
11900 2003-01-18  Havoc Pennington  <hp@pobox.com>
11901
11902         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
11903
11904         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
11905         the distribution
11906
11907         * test/Makefile.am: don't use special variable "TESTS" for echo-*
11908         since we don't want to use those in make check
11909
11910 2003-01-15  Havoc Pennington  <hp@redhat.com>
11911
11912         Release 0.2
11913
11914         * NEWS: update
11915
11916 2003-01-15  Havoc Pennington  <hp@redhat.com>
11917
11918         * test/Makefile.am: fix so that test source code ends up in the
11919         distribution on make distcheck
11920
11921 2003-01-15  Havoc Pennington  <hp@redhat.com>
11922
11923         Release 0.1.
11924
11925         * NEWS: update
11926
11927 2003-01-15  Havoc Pennington  <hp@redhat.com>
11928
11929         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
11930         fix build when --disable-tests
11931
11932         * Makefile.am (EXTRA_DIST): put HACKING in here
11933
11934         * HACKING: document procedure for making a tarball release.
11935
11936 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
11937
11938         * bus/connection.c: (connection_error_handler),
11939         (bus_connection_setup):
11940         * bus/main.c: (main):
11941         Make sure that the DBusConnectionData struct is NULLed
11942         out to prevent a segfault.
11943
11944         * dbus/dbus-errors.c: (dbus_result_to_string):
11945         * dbus/dbus-errors.h:
11946         * dbus/dbus-message.c: (dbus_message_get_fields),
11947         (dbus_message_get_fields_valist), (_dbus_message_test):
11948         * dbus/dbus-message.h:
11949         Make dbus_message_get_fields return a result code so we can
11950         track invalid fields as well as oom.
11951
11952 2003-01-11  Havoc Pennington  <hp@pobox.com>
11953
11954         * configure.in: change --enable-test/--enable-ansi action-if-given
11955         to enable_foo=$enableval instead of enable_foo=yes
11956
11957 2003-01-08  Havoc Pennington  <hp@pobox.com>
11958
11959         * dbus/dbus-string.c (_dbus_string_align_length): new function
11960
11961         * dbus/dbus-test-main.c: move main() for test app here
11962         * dbus/dbus-test.c
11963         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
11964         symbol to run tests, because dbus-test isn't in the main
11965         library
11966
11967         Code review nitpicks.
11968
11969         * dbus/dbus-message.c (dbus_message_write_header): add newlines
11970         for people with narrow emacs ;-). Assert client_serial was filled
11971         in. Assert message->name != NULL.
11972         (dbus_message_append_fields): have "first_field_type" arg separate
11973         from va list, needed for C++ binding that also uses varargs IIRC
11974         and helps with type safety
11975         (dbus_message_new): add @todo about using DBusString to store
11976         service/name internally
11977         (dbus_message_new): don't leak ->service and ->name on OOM later
11978         in the function
11979         (dbus_message_unref): free the service name
11980         (dbus_message_get_fields): same change to varargs
11981         i.e. first_field_type
11982         (_dbus_message_loader_return_buffer): assert that the message data
11983         is aligned (if not it's a bug in our code). Put in verbose griping
11984         about why we set corrupted = TRUE.
11985         (decode_header_data): add FIXME that char* is evil.  Was going to
11986         add FIXME about evil locale-specific string.h strncmp, but just
11987         switched to wacky string-as-uint32 optimization. Move check for
11988         "no room for field name" above get_const_data_len() to avoid
11989         assertion failure in get_const_data_len if we have trailing 2
11990         bytes or the like. Check for service and name fields being
11991         provided twice. Don't leak service/name on error. Require field
11992         names to be aligned to 4 bytes.
11993
11994         * dbus/dbus-marshal.c: move byte swap stuff to header
11995         (_dbus_pack_int32): uscore-prefix
11996         (_dbus_unpack_int32): uscore-prefix
11997         (_dbus_unpack_uint32): export
11998         (_dbus_demarshal_string): add @todo complaining about use of
11999         memcpy()
12000         (_dbus_marshal_get_field_end_pos): add @todo about bad error
12001         handling allowing corrupt data to go unchecked
12002
12003 2003-01-08  Havoc Pennington  <hp@redhat.com>
12004
12005         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
12006         to the select() as needed for authentication. (should be using
12007         _dbus_poll() not select, but for another day)
12008
12009         * dbus/dbus.h: include dbus/dbus-protocol.h
12010
12011 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
12012
12013         * dbus/Makefile.am (dbusinclude_HEADERS): Install
12014         dbus-connection.h
12015
12016 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
12017
12018         * dbus/dbus-internals.c: (_dbus_type_to_string):
12019         New function that returns a string describing a type.
12020
12021         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
12022         * dbus/dbus-marshal.h:
12023         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
12024         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
12025         (dbus_message_iter_get_byte_array):
12026         * dbus/dbus-message.h:
12027         Add new convenience functions for appending and getting message fields.
12028         Also add demarshalling routines for byte arrays.
12029
12030 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
12031
12032         * dbus/dbus-connection-internal.h:
12033         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
12034         (_dbus_connection_get_next_client_serial),
12035         (dbus_connection_send_message):
12036         * dbus/dbus-internals.h:
12037         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
12038         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
12039         (_dbus_marshal_uint32), (_dbus_demarshal_double),
12040         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
12041         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
12042         (_dbus_verbose_bytes), (_dbus_marshal_test):
12043         * dbus/dbus-marshal.h:
12044         * dbus/dbus-message-internal.h:
12045         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
12046         (dbus_message_write_header), (_dbus_message_lock),
12047         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
12048         (dbus_message_get_name), (dbus_message_append_int32),
12049         (dbus_message_append_uint32), (dbus_message_append_double),
12050         (dbus_message_append_string), (dbus_message_append_byte_array),
12051         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
12052         (dbus_message_iter_unref), (dbus_message_iter_has_next),
12053         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
12054         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
12055         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
12056         (decode_header_data), (_dbus_message_loader_return_buffer),
12057         (message_iter_test), (_dbus_message_test):
12058         * dbus/dbus-message.h:
12059         * dbus/dbus-protocol.h:
12060         * dbus/dbus-test.c: (main):
12061         * dbus/dbus-test.h:
12062         * glib/test-dbus-glib.c: (message_handler), (main):
12063         * test/echo-client.c: (main):
12064         * test/watch.c: (check_messages):
12065         Make messages sendable and receivable for real.
12066
12067 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
12068
12069         * dbus/dbus-marshal.c: (_dbus_marshal_double),
12070         (_dbus_marshal_string), (_dbus_marshal_byte_array):
12071         * dbus/dbus-message.c: (dbus_message_append_int32),
12072         (dbus_message_append_uint32), (dbus_message_append_double),
12073         (dbus_message_append_string), (dbus_message_append_byte_array):
12074         Handle OOM restoration.
12075
12076 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
12077
12078         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12079         (_dbus_demarshal_string), (_dbus_marshal_test):
12080         * dbus/dbus-marshal.h:
12081         * dbus/dbus-message.c: (dbus_message_get_name),
12082         Document these functions.
12083
12084         (dbus_message_append_int32), (dbus_message_append_uint32),
12085         (dbus_message_append_double), (dbus_message_append_string),
12086         (dbus_message_append_byte_array):
12087         * dbus/dbus-message.h:
12088         Add functions for adding message fields of different types.
12089
12090         * dbus/dbus-protocol.h:
12091         Add the different types.
12092
12093 2003-01-05  Havoc Pennington  <hp@pobox.com>
12094
12095         * bus/connection.c: implement routines for handling connections,
12096         first thing is keeping a list of owned services on each connection
12097         and setting up watches etc.
12098
12099         * bus/services.c: implement a mapping from service names to lists
12100         of connections
12101
12102         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
12103
12104         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
12105         to use static mutexes for global data
12106
12107         * dbus/dbus-connection.c (dbus_connection_set_data): add new
12108         collection of functions to set/get application-specific data
12109         on the DBusConnection.
12110
12111 2003-01-04  Havoc Pennington  <hp@pobox.com>
12112
12113         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
12114         (_dbus_poll): new function
12115
12116         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
12117         copied from GLib
12118
12119         * bus/loop.c: initial code for the daemon main loop
12120
12121 2003-01-04  Havoc Pennington  <hp@pobox.com>
12122
12123         * test/watch.c (error_handler): make it safe if the error handler
12124         is called multiple times (if we s/error handler/disconnect
12125         handler/ we should just guarantee it's called only once)
12126
12127         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
12128         error handler on disconnect (it's quite possible we should
12129         just change the error handler to a "disconnect handler," I'm
12130         not sure we have any other meaningful errors)
12131
12132         * configure.in: check for getpwnam_r
12133
12134         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
12135         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
12136         mechanism as in SASL spec, using socket credentials
12137
12138         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
12139         (_dbus_send_credentials_unix_socket): new function
12140
12141         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
12142         dbus_accept()
12143         (_dbus_write): only check errno if <0 returned
12144         (_dbus_write_two): ditto
12145
12146 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
12147
12148         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
12149         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
12150         (_dbus_marshal_test):
12151         * dbus/dbus-marshal.h:
12152         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
12153         to _dbus_marshal_utf8_string. Also fix some tests.
12154
12155 2002-12-28  Harri Porten  <porten@kde.org>
12156
12157         * configure.in: added check for C++ compiler and a very cheesy
12158         check for the Qt integration
12159
12160         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
12161
12162         * qt/Makefile.am: added
12163
12164         * qt/.cvsignore: added
12165
12166         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
12167         latter, added #ifdef QT_THREAD_SUPPORT guard.
12168
12169         * dbus/Makefile.am: added missing headers for make dist
12170
12171 2002-12-28  Kristian Rietveld  <kris@gtk.org>
12172
12173         * dbus/Makefile.am: fixup export-symbols-regex.
12174
12175 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
12176
12177         * acinclude.m4: Add this file and put the
12178         PKG_CHECK_MODULE macro in it.
12179
12180 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
12181
12182         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12183         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12184         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12185         (_dbus_marshal_test):
12186         Make the demarshalling routines align the pos argument.
12187         Add string marshalling tests and fix the obvious bugs
12188         discovered.
12189
12190 2002-12-26  Havoc Pennington  <hp@pobox.com>
12191
12192         * dbus/dbus-auth.c: fixes fixes fixes
12193
12194         * dbus/dbus-transport-unix.c: wire up support for
12195         encoding/decoding data on the wire
12196
12197         * dbus/dbus-auth.c (_dbus_auth_encode_data)
12198         (_dbus_auth_decode_data): append to target string
12199         instead of nuking it.
12200
12201 2002-12-26  Havoc Pennington  <hp@pobox.com>
12202
12203         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
12204         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
12205         doh
12206
12207         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
12208         avoid swap_bytes() overhead (ignoring possible assembly stuff for
12209         now). Main point is because I wanted unpack_uint32 to implement
12210         _dbus_verbose_bytes
12211         (_dbus_verbose_bytes): new function
12212
12213         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
12214
12215         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
12216         mechanism to handle a corrupt message stream
12217         (_dbus_message_loader_new): fix preallocation to only prealloc,
12218         not prelengthen
12219
12220         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
12221         (_dbus_string_test): enhance tests for copy/move and fix the
12222         functions
12223
12224         * dbus/dbus-transport-unix.c: Hold references in more places to
12225         avoid reentrancy problems
12226
12227         * dbus/dbus-transport.c: ditto
12228
12229         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
12230         leak reference count in no-message case
12231
12232         * test/watch.c (do_mainloop): handle adding/removing watches
12233         during iteration over the watches. Also, ref the connection/server
12234         stored on a watch, so we don't try to mangle a destroyed one.
12235
12236         * dbus/dbus-transport-unix.c (do_authentication): perform
12237         authentication
12238
12239         * dbus/dbus-auth.c (get_state): add a state
12240         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
12241         (_dbus_auth_get_unused_bytes): append the unused bytes
12242         to the passed in string, rather than prepend
12243
12244         * dbus/dbus-transport.c (_dbus_transport_init_base): create
12245         the auth conversation DBusAuth
12246
12247         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
12248         (_dbus_transport_new_for_domain_socket): when creating a
12249         transport, pass in whether it's a client-side or server-side
12250         transport so we know which DBusAuth to create
12251
12252 2002-12-03  Havoc Pennington  <hp@pobox.com>
12253
12254         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
12255         _after_ finalizing the derived members
12256         (unix_connection_set): unref watch if we fail to add it
12257
12258         * dbus/dbus-connection.c (dbus_connection_unref): delete the
12259         transport first, so that the connection owned by the
12260         transport will be valid as the transport finalizes.
12261
12262         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
12263         if necessary, and remove watches from the connection.
12264
12265         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
12266
12267 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
12268
12269         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12270         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12271         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12272         (_dbus_marshal_test):
12273         * dbus/dbus-marshal.h:
12274         Add string marshal functions and have the demarshal functions
12275         return the new position.
12276
12277 2002-12-25  Havoc Pennington  <hp@pobox.com>
12278
12279         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
12280         it is a simple protocol that just maps directly to SASL.
12281
12282         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
12283         initial implementation, not actually used yet.
12284
12285         * dbus/dbus-string.c (_dbus_string_find): new function
12286         (_dbus_string_equal): new function
12287         (_dbus_string_base64_encode): new function
12288         (_dbus_string_base64_decode): new function
12289
12290 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
12291
12292         * dbus/Makefile.am:
12293         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
12294         (_dbus_marshal_int32), (_dbus_marshal_uint32),
12295         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12296         (_dbus_demarshal_uint32), (_dbus_marshal_test):
12297         * dbus/dbus-marshal.h:
12298         * dbus/dbus-protocol.h:
12299         * dbus/dbus-test.c: (main):
12300         * dbus/dbus-test.h:
12301         Add un-optimized marshalling/demarshalling routines.
12302
12303 2002-12-25  Harri Porten  <porten@kde.org>
12304
12305         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
12306
12307 2002-12-24  Zack Rusin  <zack@kde.org>
12308
12309         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
12310         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
12311         main loop stuff
12312
12313 2002-12-24  Havoc Pennington  <hp@pobox.com>
12314
12315         * glib/dbus-gthread.c: fix include
12316
12317         * glib/dbus-glib.h: rename DBusMessageHandler for now.
12318         I think glib API needs to change, though, as you don't
12319         want to use DBusMessageFunction, you want to use the
12320         DBusMessageHandler object. Probably
12321         dbus_connection_open_with_g_main_loop()
12322         and dbus_connection_setup_g_main_loop() or something like that
12323         (but think of better names...) that just create a connection
12324         that has watch/timeout functions etc. already set up.
12325
12326         * dbus/dbus-connection.c
12327         (dbus_connection_send_message_with_reply): new function just to
12328         show how the message handler helps us deal with replies.
12329
12330         * dbus/dbus-list.c (_dbus_list_remove_last): new function
12331
12332         * dbus/dbus-string.c (_dbus_string_test): free a string that
12333         wasn't
12334
12335         * dbus/dbus-hash.c: use memory pools for the hash entries
12336         (rebuild_table): be more paranoid about overflow, and
12337         shrink table when we can
12338         (_dbus_hash_test): reduce number of sprintfs and write
12339         valid C89. Add tests for case where we grow and then
12340         shrink the hash table.
12341
12342         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
12343
12344         * dbus/dbus-connection.c (dbus_connection_register_handler)
12345         (dbus_connection_unregister_handler): new functions
12346
12347         * dbus/dbus-message.c (dbus_message_get_name): new
12348
12349         * dbus/dbus-list.c: fix docs typo
12350
12351         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
12352         an object representing a handler for messages.
12353
12354 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
12355
12356         * glib/dbus-glib.h:
12357         * glib/dbus-gthread.c: (dbus_gthread_init):
12358         Don't use the gdbus prefix for public functions.
12359
12360 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
12361
12362         * Makefile.am:
12363         * configure.in:
12364         Add GLib checks and fixup .pc files
12365
12366         * glib/Makefile.am:
12367         * glib/dbus-glib.h:
12368         * glib/dbus-gmain.c: (gdbus_connection_prepare),
12369         (gdbus_connection_check), (gdbus_connection_dispatch),
12370         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
12371         (dbus_connection_gsource_new):
12372         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
12373         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
12374         * glib/test-dbus-glib.c: (message_handler), (main):
12375         Add GLib support.
12376
12377 2002-12-15  Harri Porten  <porten@kde.org>
12378
12379         * autogen.sh: check for libtoolize before attempting to use it
12380
12381         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
12382         struct.
12383
12384         * .cvsignore: ignore more stamp files
12385
12386         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
12387
12388         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
12389         without make install.
12390
12391 2002-12-15  Havoc Pennington  <hp@pobox.com>
12392
12393         * dbus/dbus-threads.c: add thread stubs that a higher library
12394         layer can fill in. e.g. the GLib wrapper might fill them in with
12395         GThread stuff. We still need to use this thread API to
12396         thread-safe-ize the library.
12397
12398 2002-12-12  Havoc Pennington  <hp@pobox.com>
12399
12400         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
12401         below new interfaces and include fewer system headers.
12402
12403         * dbus/dbus-sysdeps.c (_dbus_read): new function
12404         (_dbus_write): new function
12405         (_dbus_write_two): new function
12406         (_dbus_connect_unix_socket): new function
12407         (_dbus_listen_unix_socket): new function
12408
12409         * dbus/dbus-message-internal.h: change interfaces to use
12410         DBusString
12411
12412 2002-12-11  Havoc Pennington  <hp@pobox.com>
12413
12414         * dbus/dbus-types.h: add dbus_unichar
12415
12416         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
12417
12418         * dbus/dbus-connection.c (dbus_connection_send_message): return
12419         TRUE on success
12420
12421         * dbus/dbus-transport.c: include dbus-watch.h
12422
12423         * dbus/dbus-connection.c: include dbus-message-internal.h
12424
12425         * HACKING: add file with coding guidelines stuff.
12426
12427         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
12428         handling here, for security purposes (as in vsftpd). Not actually
12429         using this class yet.
12430
12431         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
12432         system/libc usage here, as in vsftpd, for ease of auditing (and
12433         should also simplify portability). Haven't actually moved all the
12434         system/libc usage into here yet.
12435
12436 2002-11-25  Havoc Pennington  <hp@pobox.com>
12437
12438         * dbus/dbus-internals.c (_dbus_verbose): fix to not
12439         always print the first verbose message.
12440
12441 2002-11-24  Havoc Pennington  <hp@pobox.com>
12442
12443         * test/echo-client.c, test/echo-server.c: cheesy test
12444         clients.
12445
12446         * configure.in (AC_CHECK_FUNCS): check for writev
12447
12448         * dbus/dbus-message.c (_dbus_message_get_network_data): new
12449         function
12450
12451         * dbus/dbus-list.c (_dbus_list_foreach): new function
12452
12453         * dbus/dbus-internals.c (_dbus_verbose): new function
12454
12455         * dbus/dbus-server.c, dbus/dbus-server.h: public object
12456         representing a server that listens for connections.
12457
12458         * dbus/.cvsignore: create
12459
12460         * dbus/dbus-errors.h, dbus/dbus-errors.c:
12461         public API for reporting errors
12462
12463         * dbus/dbus-connection.h, dbus/dbus-connection.c:
12464         public object representing a connection that
12465         sends/receives messages. (Same object used for
12466         both client and server.)
12467
12468         * dbus/dbus-transport.h, dbus/dbus-transport.c:
12469         Basic abstraction for different kinds of stream
12470         that we might read/write messages from.
12471
12472 2002-11-23  Havoc Pennington  <hp@pobox.com>
12473
12474         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
12475         _DBUS_INT_MAX
12476
12477         * dbus/dbus-test.c (main): add list test, and include
12478         dbus-test.h as intended
12479
12480         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
12481         (_dbus_hash_table_remove_int): return value indicates
12482         whether the entry existed to remove
12483
12484         * dbus/dbus-list.c: add linked list utility class,
12485         with docs and tests
12486
12487         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
12488         array sometimes.
12489
12490 2002-11-23  Havoc Pennington  <hp@pobox.com>
12491
12492         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
12493         DBUS_END_DECLS to nothing, that should fix this once and for all
12494
12495         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
12496
12497         * dbus/dbus-message.c, dbus/dbus-hash.c:
12498         add some missing @brief
12499
12500 2002-11-23  Havoc Pennington  <hp@pobox.com>
12501
12502         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
12503         to avoid confusing Doxygen
12504
12505         * dbus/dbus-hash.c: @} not }@
12506
12507         * dbus/dbus-message.c (struct DBusMessage): split out
12508         internals docs
12509
12510 2002-11-23  Havoc Pennington  <hp@pobox.com>
12511
12512         * configure.in: pile on more warning flags if using gcc
12513
12514         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
12515         to document static functions
12516
12517         * configure.in: add summary to end of configure so it
12518         looks nice and attractive
12519
12520         * dbus/dbus-hash.c: finish implementation and write unit
12521         tests and docs
12522
12523         * configure.in: add --enable-tests to enable unit tests
12524
12525         * dbus/dbus-test.c: test program to run unit tests
12526         for all files in dbus/*, initially runs a test for
12527         dbus-hash.c
12528
12529         * dbus/dbus-internals.h: file to hold some internal utility stuff
12530
12531 2002-11-22  Havoc Pennington  <hp@redhat.com>
12532
12533         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
12534         "ported" away from Tcl
12535
12536         * dbus/dbus-types.h: header for types such as dbus_bool_t
12537
12538 2002-11-22  Havoc Pennington  <hp@redhat.com>
12539
12540         * dbus/dbus.h: fixups for doc warnings
12541
12542         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
12543         macros
12544         (QUIET): make it quiet so we can see warnings
12545
12546         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
12547
12548 2002-11-22  Havoc Pennington  <hp@redhat.com>
12549
12550         * Makefile.am: include "Doxyfile" target in all-local
12551
12552         * configure.in: generate the Doxyfile
12553
12554         * Doxyfile.in: move Doxyfile here, so we can use
12555         configure to generate a Doxyfile with the right
12556         version number etc.
12557
12558 2002-11-22  Havoc Pennington  <hp@redhat.com>
12559
12560         * dbus/dbus-message.c: move inline docs into .c file
12561
12562         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
12563         so all docs are under doc/
12564         (MAN_EXTENSION): generate man pages. Use extension
12565         ".3dbus" which matches ".3qt" on my system,
12566         I guess this is OK, I don't know really.
12567         (FILE_PATTERNS): look for .c files not .h, makes sense
12568         for plain C I think
12569
12570 2002-11-22  Havoc Pennington  <hp@pobox.com>
12571
12572         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
12573         because any app can be a server, and any app can be a client,
12574         the bus is a special kind of server.
12575
12576 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
12577
12578         * Doxyfile : adding. Still needs Makefile rules to be generated
12579         automatically (just run "doxygen" in the toplevel dir for now to
12580         generate docs)
12581
12582         * dbus/dbus-message.h : Adding sample docs (javadoc since
12583         resembles gtk-doc a little more)
12584
12585         * dbus/dbus.h : Adding sample docs
12586
12587 2002-11-21  Havoc Pennington  <hp@redhat.com>
12588
12589         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
12590         so we can allow ourselves to include files directly,
12591         instead of having to use dbus.h
12592
12593         * dbus/dbus.h: fill in
12594
12595         * dbus/dbus-message.h: sketch out a sample header file.
12596         Include griping if you include it directly instead of
12597         via dbus.h
12598
12599         * dbus/dbus-macros.h: new file with macros for extern "C",
12600         TRUE/FALSE, NULL, etc.
12601
12602         * doc/file-boilerplate.c: put include guards in here
12603
12604 2002-11-21  Havoc Pennington  <hp@redhat.com>
12605
12606         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
12607
12608         * COPYING: include the GPL as well, and license code
12609         under both AFL and GPL.
12610
12611 2002-11-21  Havoc Pennington  <hp@redhat.com>
12612
12613         * acconfig.h: get rid of this
12614
12615         * autogen.sh (run_configure): add --no-configure option
12616
12617         * configure.in: remove AC_ARG_PROGRAM to make
12618         autoconf complain less. add AC_PREREQ.
12619         add AC_DEFINE third arg.
12620
12621 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
12622
12623         * doc/Makefile.am:
12624         Fix references so we can distcheck.
12625
12626 2002-11-21  Havoc Pennington  <hp@redhat.com>
12627
12628         * Initial module creation
12629