a870e5da39e29c5ccda30baf84bfea41e6340c0e
[platform/upstream/dbus.git] / ChangeLog
1 2005-11-07  Robert McQueen  <robot101@debian.org>
2
3         * python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
4         instances to stop madness of creating new instances representing
5         the same bus connection all the time, rendering any tracking of
6         match rules and bus names quite meaningless. Caught a bug where
7         the private argument to SessionBus() and friends was being passed
8         in as use_default_mainloop by mistake. Still some problems with
9         multiple dbus_binding.Connection instances representing the same
10         low-level connection (eg when you use both SessionBus() and
11         StarterBus() in same process), but it's a lot better now than it
12         was.
13
14         * python/dbus_bindings.pyx: Add constants with the return values
15         for bus_request_name().
16
17         * python/service.py: Store bus name instances in a per-dbus.Bus cache
18         and retrieve the same instances for the same name, so deletion can be
19         done with refcounting. Also now throws some kind of error if you
20         don't actually get the name you requested, unlike previously...
21
22         * test/python/test-client.py: Add tests for instance caching of buses
23         and bus name objects.
24
25 2005-11-04  Robert McQueen  <robot101@debian.org>
26
27         * python/dbus_bindings.pyx, test/python/test-client.py: Fix
28         marshalling of boolean values. Add some booleans to the values in
29         the test client.
30
31         * python/decorators.py, python/service.py: Add an 'async_callbacks'
32         argument to the dbus.service.method decorator, which allows you to
33         name arguments to take two callback functions for replying with
34         return values or an exception.
35
36         * test/python/test-client.py, test/python/test-service.py: Add test
37         case using asynchronous method reply functions, both return values and
38         errors, and from within both the function itself and from a mainloop
39         callback.
40
41         * python/decorators.py, python/service.py: Perform checking that the
42         number of method/signal arguments matches the number of types in the
43         signature at class loading time, not when you first introspect the
44         class.
45
46         * python/service.py: Remove debug print left by the last commit.
47
48 2005-11-03  Robert McQueen  <robot101@debian.org>
49
50         * python/service.py: Heavy refactoring of method invocation, with
51         hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
52         in favour of a new _message_cb that uses seperate functions for
53         looking up the method to call, marshalling the return values, and
54         sending exceptions as errors, and is easier to follow as a
55         consequence.  Fixes some corner cases about returning things that
56         don't match your declared out_signature, allows exceptions to define
57         _dbus_error_name and have it be sent over the bus as the error name,
58         and paves the way for cool stuff like heeding the message no reply
59         flag, asynchronous method implementations, informing the method of the
60         sender, and including backtraces in the error messages.
61
62         * test/python/test-client.py: Catch and print exceptions thrown in the
63         async callback tests, rather than passing them to the low-level
64         bindings to be ignored in a noisy and frustrating manner.
65
66 2005-11-03  Robert McQueen  <robot101@debian.org>
67
68         * python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
69         functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
70         tweak others to be consistent.
71
72         * test/python/test-client.py: Tweak output of testInheritance.
73
74 2005-10-29  Robert McQueen  <robot101@debian.org>
75
76         * python/service.py: Major changes to allow multiple inheritance
77         from classes that define D-Bus interfaces:
78         
79          1. Create a new Interface class which is the parent class of
80             Object, and make the ObjectType metaclass into InterfaceType.
81         
82          2. Patch written with Rob Taylor to replace use of method_vtable
83             with code that walks the class's __MRO__ (method resolution order)
84             to behave like Python does when invoking methods and allow
85             overriding as you'd expect. Code is quite tricky because
86             we have to find two methods, the one to invoke which has the
87             right name and isn't decorated with the /wrong/ interface,
88             and the one to pick up the signatures from which is decorated
89             with the right interface.
90         
91             The same caveats apply as to normal multiple inheritance -
92             this has undefined behaviour if you try and inherit from two
93             classes that define a method with the same name but are
94             decorated with different interfaces. You should decorate
95             your overriding method with the interface you want.
96         
97          3. Replace grungy introspection XML generation code in the metaclass
98             with dictionaries that cope correctly with multiple inheritance
99             and the overriding of methods. This also uses the signature
100             decorations to provide correct introspection data, including
101             the debut appearance of the types of your return values. :D
102
103         * test/python/test-client.py, test/python/test-service.py: Add a test
104         case to try invoking an method that overrides one inherited from a
105         D-Bus interface class.
106
107 2005-10-29  Robert McQueen  <robot101@debian.org>
108
109         * python/dbus_bindings.pyx: Tweak 'raise AssertionError' to assert().
110         Add checking for the end of struct character when marshalling a
111         struct in MessageIter.append_strict.
112
113         * python/examples/example-service.py,
114         python/examples/gconf-proxy-service.py,
115         python/examples/gconf-proxy-service2.py: Update to use gobject
116         mainloop directly rather than appearing to depend on gtk.
117
118         * python/test/test-client.py, python/test/test-server.py: Remove
119         obsolete and broken test scripts for old bindings. We have up to date
120         and working tests in test/python/.
121
122 2005-10-29  Robert McQueen  <robot101@debian.org>
123
124         * python/decorators.py: Add optional arguments to the method and
125         signal decorators to allow you to specify the signature of arguments
126         and return values. Preserve the doc strings of signal functions in the
127         decorated version, for pydoc and friends.
128
129         * python/dbus_bindings.pyx, python/proxies.py: Replace the
130         parse_signature_block function with an iterable dbus.Signature()
131         type. Fix a bug in MessageIter.append_strict where you could append
132         anything by claiming it was a string.
133
134         * python/service.py: Use the out_signature decoration on methods to
135         marshal return values, meaning you no longer require dbus.Array()
136         or dbus.Dictionary() to indicate the type when returning empty
137         arrays or dictionaries. Fix a bug where exceptions which are defined
138         in __main__ are not turned into error replies.
139
140         * test/python/test-client.py, test/python/test-service.py: Add test
141         for correct marshalling of return values according to out_signature.
142         Fix a bug in the async call test where the error_handler is missing a
143         self argument.
144
145 2005-10-29  Robert McQueen  <robot101@debian.org>
146
147         * glib/Makefile.am, glib/examples/Makefile.am,
148         glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
149         Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).
150
151         * test/python/.cvsignore: Add run-with-tmp-session-bus.conf.
152
153         * tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
154         from Ubuntu by Daniel Silverstone to allow specifying match rules on
155         the command line.
156
157 2005-10-27  Ross Burton  <ross@openedhand.com>
158
159         * dbus/dbus-marshal-header.c:
160         Remove dead code.
161
162         * glib/dbus-gobject.c:
163         Stop compiler warning.
164
165 2005-10-25  Ross Burton  <ross@openedhand.com>
166
167         * dbus/dbus-auth.c:
168         * dbus/dbus-server-unix.c:
169         * dbus/dbus-transport-unix.c:
170         * glib/dbus-gmain.c:
171         * glib/dbus-gobject.c:
172         Add some const keywords.
173
174 2005-10-25  Ross Burton  <ross@openedhand.com>
175
176         * doc/dbus-specification.xml:
177         Document the NoReply annotation.
178
179         * glib/dbus-binding-tool-glib.h:
180         * glib/dbus-binding-tool-glib.c:
181         Respect the NoReply annotation.
182
183 2005-10-24  Robert McQueen <robot101@debian.org>
184
185         * python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
186         derive from unicode instead of str, and encode/decode UTF-8 when
187         marshalling/unmarshalling bus messages
188
189         * python/introspect_parser.py: encode introspection data as UTF-8
190         before passing the buffer into libxml2
191
192         * test/python/test-client.py: add unicode test strings
193
194         * test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
195         ignore generated python test files
196
197 2005-10-17  John (J5) Palmieri  <johnp@redhat.com>
198
199         * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
200         and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
201         (gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
202
203         * glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
204         DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
205         when constructing struct signatures
206
207         * python/_dbus.py (Bus): handle private connections using the
208         private keyword in the constructor. defaults to private=False
209         (Bus::close): new method to close a connection to the bus
210
211         * python/dbus_bindings.pyx (Connection::close): renamed method
212         was previously called disconnect
213         (bus_get): now supports getting a private connection
214
215         * python/proxies.py (ProxyMethod::__call__): check if ignore_reply
216         keyword is set to True.  if it is, execute the method without waiting
217         for a reply
218         (ProxyObject::_introspect_execute_queue): new method for executing
219         all the pending methods that were waiting for the introspect to
220         finish.  this is called when introspect either succeeds or fails
221         (ProxyObject::_introspect_error_handler): call queued methods
222
223 2005-10-14  John (J5) Palmieri  <johnp@redhat.com>
224
225         * python/dbus_bindings.pyx (MessageIter::append_strict): check for
226         STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
227
228         * python/service.py (Object::_message_cb): handle exceptions correctly
229         by sending them over the wire to the calling app.  This makes sure
230         the client returns immediately instead of waiting the 15 seconds to
231         timeout.
232
233         * test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect): 
234         Add a test to benchmark how long it takes to introspect a service and 
235         call a method which returns a large element (pretty fast)
236
237         * test/python/test-service.py (TestObject::GetComplexArray): new test 
238         method which pushes a lot of data
239
240 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
241
242         * python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):        
243         reclaim memory outside of the loop and use del istead of just setting
244         the key to None
245
246 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
247
248         * python/service.py (ObjectType::_reflect_on_signal): Always close
249         signal tag even when there are no arguments
250
251 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
252
253         * configure.in: Set mono, mono-docs and Qt3 to default
254         to no instead of auto when building.  These bindings do not
255         have full time maintainers and will not be supported for the
256         1.0 release.
257
258 2005-10-12  John (J5) Palmieri  <johnp@redhat.com>
259
260         patches from Michael Krivoruchko <misha at sun.com>: 
261         
262         * dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
263         _dbus_connection_message_sent, 
264         _dbus_connection_send_preallocated_unlocked_no_update, 
265         _dbus_connection_pop_message_link_unlocked): handle the case when path 
266         is NULL when calling _dbus_verbose
267
268         * configure.in: check for functions getpeerucred and getpeereid
269
270         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides 
271         support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+, 
272         OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid). 
273         Patch was only tested on Solaris 10 x86 so it might be issues
274         with other platforms (i.e. BSDs and MacOSX)
275         
276
277 2005-10-05  John (J5) Palmieri  <johnp@redhat.com>
278
279         * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal 
280         instead of marshal basic so we can handle recursive types in a variant
281
282         * test/glib/test-dbus-glib.c: Add test for marshaling recurive types
283         in variants
284
285         * test/glib/test-service-glib.c, test-service-glib.xml
286         (my_object_echo_variant [EchoVariant], 
287         my_object_process_variant_of_array_of_ints123
288         [ProcessVariantOfArrayOfInts123]): 
289         Add two test methods
290
291         * python/introspect_parser.py: New module for parsing introspect
292         data.
293
294         * python/dbus_bindings.pyx:
295         (various places): when throwing errors fix to use errormsg instead 
296         of message local variable because Pyrex can get confused with other 
297         message variables (initial patch by Robert McQueen 
298         <robert.mcqueen at collabora.co.uk>)
299         (MessageIter::parse_signature_block): new method for getting the next
300         block in a signiture.
301         (MessageIter::append_strict): new method for appending values strictly
302         using the passed in signature instead of guessing at the type
303         (MessageItter:: append_dict, append_struct, append_array): use 
304         signatures to marshal children if the signature is available
305         
306         * python/exceptions.py (IntrospectionParserException): new exception
307
308         * python/proxies.py (ProxyMethod::__call__): Marshal args with 
309         introspected signatures if available, else we fall back to the
310         old way of doing things.
311         (ProxyObject::_introspect_reply_handler ): parse introspection data
312         
313         * python/service.py (ObjectType::_reflect_on_method): Properly
314         terminate <method> if there are no args in the reflection data
315
316         * test/python/test-client.py: add tests for talking with the GLib
317         test server.  This gives us better coverage for introspection since
318         python to python will always generate arguments as variants.  It also
319         allows us to test the robustness of the GLib bindings and interlanguage
320         communications.
321
322         
323 2005-10-03  John (J5) Palmieri  <johnp@redhat.com>
324
325         * bus/driver.c (bus_driver_handle_introspect): Add signals
326         to the introspect data. (patch from Daniel P. Berrange 
327         <dan at berrange.com>)
328
329         * bus/dispatch.c (check_existent_ping): Add testcase for Ping
330         
331         * dbus/dbus-connection.c (_dbus_connection_peer_filter,
332         _dbus_connection_run_builtin_filters): Changed these to
333         be unlock_no_update functions and call 
334         _dbus_connection_send_unlocked_no_update instead of
335         dbus_connection_send to avoid locking errors.
336         
337         * doc/TODO: Removed the make Ping test TODO
338         
339 2005-09-26  John (J5) Palmieri  <johnp@redhat.com>
340
341         * dbus/Python.pyx: Fixed memory leaks when throwing errors.
342         We now copy the message from a DBusError and then free 
343         the error object befor throwing the error
344
345         * glib/dbus-glib-tool.c: removed extra comma at the end of the
346         DBusBindingOutputMode enum which was causing a warning.
347         #include <time.h> so using time_t is explicitly defined
348
349 2005-09-26  John (J5) Palmieri  <johnp@redhat.com>
350
351         * Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
352         - dbus/dbus-bus.c
353         (internal_bus_get): new method that take over the heavy lifting
354         of dbus_bus_get and adds the ability to get a private connection
355         to the bus
356         (dbus_bus_get): wrapper to internal_bus_get that provides the same
357         interface as in previous versions
358         (dbus_bus_get_private): new method that is a wrapper to 
359         internal_bus_get to get a private connection to the bus
360
361         - dbus/dbus-bus.h
362         (dbus_bus_get_private): add as a public libdbus interface
363
364         - dbus-1.pc.in: output system_bus_default_address and 
365         sysconfdir variables so apps can use them when compiling
366
367 2005-09-23  Harald Fernengel  <harry@kdevelop.org>
368         * dbus/qt: New Qt bindings
369
370 2005-09-12  Waldo Bastian  <bastian@kde.org>
371
372         * dbus/dbus-marshal-validate.c,
373         doc/dbus-specification.xml, test/Makefile.am,
374         test/test-names.c: allow hyphens in bus names.
375
376 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
377
378         * test/data/auth/fallback.auth-script: we don't
379         retry the EXTERNAL method when we know its going
380         to fail anymore.
381
382 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
383
384         * dbus/dbus-connection-internal.h: rename
385         (add|remove|toggle)_(watch|timeout) to unlocked()
386         
387         * dbus/dbus-connection.c: ditto.
388         
389         * dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
390         Update some callers for the renaming.
391
392 2005-09-10  Mark McLoughlin  <mark@skynet.ie>
393
394         * dbus/dbus-auth.c: (record_mechanisms): don't
395         retry the first auth mechanism because we know
396         we're just going to get rejected again.
397         
398         * dbus/dbus-keyring.c: (_dbus_keyring_reload):
399         Fix thinko ... and what a nasty little bugger to
400         track down you were ...
401
402         * dbus/dbus-connection.c:
403         (_dbus_connection_add_watch),
404         (_dbus_connection_remove_watch): add note about
405         these needing the connection to be locked.
406         (_dbus_connection_get_dispatch_status_unlocked):
407         set status to DATA_REMAINS when we queue the
408         disconnected message.
409         
410         * bus/dispatch.c:
411         (bus_dispatch): fix warning.
412         (check_existent_service_no_auto_start):
413         Expect ChildSignaled error too.
414         (check_existent_hello_from_self): fix another
415         couple of warnings.
416         
417 2005-09-08  Joe Shaw  <joeshaw@novell.com>
418
419         Patches from James Willcox <snorp@snorp.net>
420
421         * mono/Makefile.am: Add Int16.cs and UInt16.cs
422
423         * mono/DBusType/Array.cs: Handle multidimensional arrays, and
424         support array "out" parameters.
425
426         * mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
427         for 16-bit int support.
428
429 2005-09-06  John (J5) Palmieri  <johnp@redhat.com>
430
431         * Released 0.50
432
433         * Patch from Steve Grubb:
434         - bus/activation.c (bus_activation_service_reload_test): clean up
435         some indentation
436         - dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional 
437         - dbus/dbus-message-factory.c (generate_special): fix a couple of
438         buffer overflows in the test suite.  This is non critical because
439         it can not be exploited and this code is only run when doing a 
440         make check.
441
442         * Patch from Yaakov Selkowitz: Build fixes for Cygwin
443         - configure.in: Don't check and link against kdecore, only qt headers
444         - dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
445         - gcj/org/freedesktop/dbus/Makefile.am:
446         add libdbus_gcj_1_la_LDFLAGS = -no-undefined
447         - glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
448         and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
449         - qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
450         - tools/Makefile.am: Add platform extentions to binaries 
451         (i.e. .exe on windows)
452
453         * configure.in: 
454         - Make it so if no suitable version of python is found we only 
455         disable building python instead of exiting the configure script
456         - Require version 2.4 of glib for glib bindings
457         - Up version to 0.50
458
459         * python/__init__.py: Sync version with libdbus to (0,50,0)
460         
461 2005-09-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
462
463         * dbus/dbus-object-tree.c (find_subtree_recurse):
464         a couple of optimizations (bug #710):
465         - do a binary search in the tree
466         - insert a new child at the right place directly, no need for
467           qsort anymore
468         - do the "double alloc" thing when allocating children
469
470 2005-08-31  John (J5) Palmieri  <johnp@redhat.com>
471
472         * python/Makefile.am: Break on pyrexc errors instead of ignoring them
473
474         * python/dbus_bindings.pyx: Memory management foo
475         (global): remove hacky _user_data_references global list
476         (GIL_safe_cunregister_function_handler): userdata now stuffed into
477         tuples. Unref user_data
478         (GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
479         (Connection::__del__): Remove and replace with __dealloc__ method
480         (Connection::add_filter): Stuff user_data into a tuple.  Use Py_INCREF
481         to keep tuple from being deallocated instead of the global var hack
482         (Connection::register_object_path): Stuff user_data into a tuple.
483         Use Py_INCREF to keep tuple from being deallocated instead of the 
484         global var hack
485         (Connection::register_fallback): Stuff user_data into a tuple.
486         Use Py_INCREF to keep tuple from being deallocated instead of the 
487         global var hack
488         (GIL_safe_pending_call_notification): Don't unref the message
489         because it gets unreffed when going out of scope.  Py_XDECREF
490         the user_data
491         (PendingCall::__del__): Remove and replace with __dealloc__ method
492         (PendingCall::set_notify): ref the pending call because we will
493         need it to stick around for when the notify callback gets called
494         (Message::__del__): Remove and replace with __dealloc__ method
495
496         * python/dbus_glib_bindings.pyx (init_gthreads): Changed to 
497         gthreads_init to match up with the dbus call
498
499         * python/glib.py (init_threads): Changed to threads_init to match
500         up with gobject.threads_init().  init_threads is kept for backwards
501         compat but will most likely be deprecated in the future
502
503         * test/python/test-client.py: 
504         - revamp to use Python's unittest functionality
505         - add async call tests
506         - setup threads in glib and dbus so we make sure locks are working
507         
508 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
509
510         * python/dbus_bindings.pyx 
511         (_pending_call_notification, cunregister_function_handler, 
512         cmessage_function_handler): All callback functions have been rearranged 
513         to workaround a bug in Pyrex when working with the GIL which is Python's 
514         global lock when dealing with threads.  They have been split into
515         a wrapper function (which assumes the name of the old function) and
516         a _GIL_safe_<function name> function which contains the functionality
517         of the old function.  This ensures that Pyrex does not write code
518         the lock is released.
519         
520
521 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
522
523         * python/dbus_bindings.pyx (_pending_call_notification): Obtain the
524         GIL global lock when calling back into Python
525
526 2005-08-29  John (J5) Palmieri  <johnp@redhat.com>
527
528         * Release 0.36.2
529
530         * Add Havoc's patch that never got applied to HEAD (Bug #2436):
531
532         * bus/policy.c (bus_policy_allow_user): change default "user is
533         allowed" to be "user has same uid as the bus itself"; any
534         allow/deny rules will override.
535
536         * bus/session.conf.in: don't allow all users, since now by default
537         the user that ran the bus can connect.
538
539 2005-08-26  Colin Walters  <walters@verbum.org>
540
541         * tools/dbus-print-message.c (print_message): Flush stdout
542         after printing a message, so that redirecting to a file, then
543         hitting Ctrl-C works.
544
545 2005-08-25  John (J5) Palmieri  <johnp@redhat.com>
546
547         * python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
548         (EmptyMessage): new class that subclasses Message.  This is a workaround
549         to a Pyrex bug that fails to call __del__ when the Message object goes out
550         of scope.  For some reason subclassing Message fixes this bug
551         (Bus::send_with_reply_and_block): use EmptyMessage instead of Message
552         - s/Message(_create=0)/EmptyMessage everywhere else
553         
554         * test/python/test-{server|client}.py: add the python/.libs directory
555         to the lookup path so dbus_bindings and dbus_glib_bindings don't
556         get picked up from the system
557
558 2005-08-25  Colin Walters  <walters@verbum.org>
559
560         * glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
561         to Ryan Lortie for the suggestion.
562
563 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
564
565         * test/python: Add python regression test
566
567         * configure.in: Add test/python/Makefile
568
569         * test/Makefile.am: Add the python directory to SUBDIRS
570
571 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
572
573         * Release 0.36.1
574
575         * python/_dbus.py: 
576         (Interface::connect_to_signal): propigate keywords for match on args
577         (Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
578
579         * python/proxies.py (ProxyObject::connect_to_signal):
580         propigate keywords for match on args
581
582         * Makefile.am: point everything to pyexecdir since python borks
583         on multilib
584
585 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
586
587         * Release 0.36
588
589 2005-08-23  Colin Walters  <walters@verbum.org>
590
591         * test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
592
593 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
594
595         * python/dbus_glib_bindings.pyx: reorder imports and c definitions
596         to fix some wranings. We now use dbus_bindings.DBusConnection instead
597         of defining DBusConnection ourselves.
598
599 2005-08-18  John (J5) Palmieri  <johnp@redhat.com>
600
601         * python/dbus.pth: New path file to fix up problems when installing
602         c libraries to lib64 and python files to lib.
603
604         * python/Makefile.am: install dbus.pth in the correct spot
605
606 2005-08-17  John (J5) Palmieri  <johnp@redhat.com>
607         * ChangeLog: clean up my last entry a bit
608
609         * doc/introspect.xsl: New stylesheet for converting introspection data
610         into browser renderable xhtml. Contributed by Lennart Poettering.
611
612         * doc/introspect.dtd: Fixups in the introspect format from Lennart
613         Poettering.
614
615         * doc/dbus-tutorial.xml: 
616         - Add Colin Walter to the Authors section for authoring the GLib
617         section
618         - Add descriptions of the new signature and type functionality
619         in the Python complex type mapping section
620         - Add a sidenote on the new args matching functionality in 
621         the Python bindings
622         - Fixed up some of the examples to use the gobject.MainLoop
623         instead of gtk.main
624         
625         * python/_dbus.py:
626         (Bus::_create_args_dict): New. Converts a hash of arg matches
627         to a more useable format
628         (Bus::add_signal_receiver): add a **keywords parameter for catching
629         arg match parameters
630         (Bus::remove_signal_receiver): add a **keywords parameter for catching
631         arg match parameters
632         
633         * python/matchrules.py:
634         (MatchTree::exec_matches): Check for arg matches
635         (SignalMatchRule::add_args_match): New method
636         (SignalMatchRule::execute): Added args_list parameter as an optimization
637         so we don't have to marshal the args more than once
638         (SignalMatchRule::match_args_from_list): New method that checks to see
639         if the rule's arg matches match an argument list.  Only arguments
640         set in the rule are checked.
641         (SignalMatchRule::match_args_from_rule): New method that checks to see
642         if the rule's arg matches match another rule's.  All args have to match
643         in order for this method to return true.  If either rule has more args
644         then it is not a match.
645         (SignalMatchRule::is_match): Add args match
646         (SignalMatchRule::repr): Add args to the final output if they exist
647
648 2005-08-17  Ross Burton  <ross@burtonini.com>
649
650         * glib/dbus-gproxy.c:
651         (dbus_g_proxy_call_no_reply): unref the message once sent.
652         (dbus_g_proxy_call): protect against NULL proxy.
653
654 2005-08-16  John (J5) Palmieri  <johnp@redhat.com>
655
656         * python/__init__.py: Version updated (0, 43, 0)
657         
658         * python/dbus_bindings.pyx: 
659         - Fixed type objects to have self passed into __init__
660         - Added the Variant type
661         - Add the ability to specify types or signatures for Array, Variant 
662         and Dictionary
663         (Connection::send_with_reply_handlers): return a PendingCall object
664         (_pending_call_notification): handle the case when an error is returned 
665         without an error message in the body
666         (MessageIter::get_boolean): return True or False instead of an integer
667         (MessageIter::python_value_to_dbus_sig): add direct checking of types 
668         and add checks for objects with embeded signatures or types (Array, 
669         Variant and Dictionary)
670         (MessageIter::append_byte): handle case when the value is a dbus.Byte
671         (MessageIter::append_dict): handle embeded types or signatures
672         (MessageIter::append_array): handle embeded types or signatures
673         (MessageIter::append_variant): new method
674         
675         * python/proxies.py:
676         (DeferedMethod): New. Dummy executable object used when queuing calls 
677         blocking on introspection data
678         (ProxyMethod::__call__): add the timeout keyword for specifying longer 
679         or shorter timeouts for method calls
680         (ProxyObject): Add first pass at an introspection state machine
681         (ProxyObject::__init__): Add introspect keyword for turing off an on 
682         introspection. 
683         (ProxyObject::_Introspect): Internal Introspect call that bypasses 
684         the usual mechanisms for sending messages.  This is to avoid a deadlock
685         where the Intospect call would be queued waiting for the Introspect 
686         call to finish ;-)
687         (ProxyObject::_introspect_reply_handler): New.  This method is called 
688         when introspection returns with no error
689         (ProxyObject::_introspect_error_handler): New.  This method is called 
690         when introspection encounters an error
691         (ProxyObject::__getattr__): Code to handle different introspection 
692         states.  Queue async calls or block blocking calls if we are 
693         introspecting.  Pass through as normal if we are not or are done with 
694         introspecting.
695         
696         * python/service.py: Import signal and method from decorators.py
697
698         * python/types.py: Add Variant type
699
700 2005-08-16  Colin Walters  <walters@verbum.org>
701
702         * glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
703         DBusError message is NULL.
704
705 2005-08-09  Havoc Pennington  <hp@redhat.com>
706
707         * dbus/dbus-errors.c: apply patch from Timo Teras to make a
708         malloc'd copy of the name parameter
709
710 2005-08-09  Havoc Pennington  <hp@redhat.com>
711
712         * dbus/dbus-message.c (dbus_message_set_reply_serial): print
713         warning if the reply serial is set to 0
714
715 2005-08-04  Colin Walters  <walters@verbum.org>
716
717         * glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
718         (dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
719         (dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
720         (dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
721         (dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
722         (dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
723         (dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
724         * glib/dbus-gvalue.h (dbus_g_value_types_init)
725         (dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
726         (dbus_gvalue_demarshal_message, dbus_gvalue_marshal):
727         
728         Prefix name with _ to ensure they're not exported.  All callers
729         updated.
730
731         * glib/dbus-gvalue.c (typecode_to_gtype)
732         (dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
733         (signature_iter_to_g_type_dict)
734         (signature_iter_to_g_type_array)
735         (dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
736         (dbus_gtypes_from_arg_signature):
737         Move to dbus-gsignature.c.
738
739         * glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
740         dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
741         (dbus_binding_tool_output_glib_client): Ditto.
742
743         * glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
744         and dbus-gsignature.h
745
746         * test/glib/test-service-glib.c (my_object_rec_arrays): Delete
747         unused variable.
748
749 2005-08-03  Colin Walters  <walters@verbum.org>
750
751         * glib/dbus-gobject.c: Add tests on hardcoded object info; this should
752         catch any incompatible changes accidentally made.
753
754 2005-08-03  Havoc Pennington  <hp@redhat.com>
755
756         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
757         typo, from Julien Puydt
758
759         * bus/connection.c (bus_connection_disconnected): we were always
760         doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
761
762 2005-08-01  Colin Walters  <walters@verbum.org>
763
764         Patch from Joe Markus Clarke:   
765         
766         * glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
767         use-after-free.
768
769 2005-08-01  Colin Walters  <walters@verbum.org>
770         
771         Patch from Joe Markus Clarke:   
772         
773         * tools/dbus-send.c (main): 
774         
775         Don't use C99 style initializers (bug #3933).
776         
777 2005-08-01  Colin Walters  <walters@verbum.org>
778
779         Patch from Joe Markus Clarke:   
780
781         * glib/dbus-gvalue.c (dbus_g_value_types_init): 
782         * glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init) 
783         * glib/dbus-gobject.c (write_interface):
784
785         Don't use C99 style initializers (bug #3933).
786
787 2005-07-31  Havoc Pennington  <hp@redhat.com>
788
789         * tools/dbus-viewer.c (load_child_nodes): fix invocation of
790         dbus_g_proxy_call, fix from Piotr Zielinski bug #3920
791
792 2005-07-30  Havoc Pennington  <hp@redhat.com>
793
794         * fix a bunch of Doxygen warnings and mistakes
795
796 2005-07-30  Havoc Pennington  <hp@redhat.com>
797
798         * dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
799         DBUS_BUILD_TESTS since it's now used in production code
800
801 2005-07-29  Havoc Pennington  <hp@redhat.com>
802
803         * test/glib/test-profile.c (write_junk): initialize the junk
804         buffer so valgrind doesn't have a breakdown
805
806 2005-07-29  Havoc Pennington  <hp@redhat.com>
807
808         * bus/signals.c (bus_signals_test): add match_rule_equal() tests
809         (match_rule_matches): remove unused arg
810         (test_matching): add tests for match_rule_matches()
811
812         * bus/signals.c (bus_match_rule_parse_arg_match): add ability to
813         do arg0='foo' arg5='bar' in the match rules
814         (match_rule_matches): don't match if the arg0='foo' doesn't match.
815
816         * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
817
818 2005-07-29  Ross Burton  <ross@openedhand.com>
819
820         * dbus/dbus-connection.c:
821         Don't create a DBusCondVar which is never used.
822
823 2005-07-27  Ross Burton  <ross@openedhand.com>
824
825         * dbus/dbus-message.c:
826         Reduce the size of the maximum cached message to 10K.
827
828 2005-07-25  Ross Burton  <ross@openedhand.com>
829
830         * glib/dbus-gproxy.c:
831         Remove matches when all proxies are unregistered.
832
833 2005-07-24  Colin Walters  <walters@verbum.org>
834
835         * glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
836         typedata; recursive arrays won't have it.
837
838         * test/glib/test-dbus-glib.c:
839         * test/glib/test-service-glib.c:
840         * test/glib/test-service-glib.xml: Add recursive arrays tests.
841         
842 2005-07-20  John (J5) Palmieir  <johnp@redhat.com>
843
844         * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
845         proxies.py, service.py: Cleanup of code after running it through the
846         pyflakes code checker mostly dealing with undefined names.  
847         (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
848
849 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
850
851         * NEWS: Update to 0.35.2
852
853 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
854
855         * python/_dbus.py: Remove import of the dbus.services
856         module as it no longer exists (patch from Dimitur Kirov)
857
858         * python/service.py (Object::__init__): Fixed typo
859         s/name/bus_name (patch from Dimitur Kirov)
860
861         * python/examples/example-signal-emitter.py: import dbus.glib
862         to get the main loop and use glib mainloop instead of gtk so
863         X doesn't have to be running.
864
865         * python/examples/example-signal-recipient.py: import dbus.glib
866         to get the main loop and use glib mainloop instead of gtk so
867         X doesn't have to be running. Import the decorators module
868         directly.
869
870         * test/glib/Makefile.am:  Added DIST_EXTRA files that distcheck
871         didn't pick up on but are needed to build
872
873         * configure.in: upped version to 0.35.2
874
875         * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
876         added Colin Walters' SELinux API rename patch from head 
877         s/unix sercurity context/selinux security context/
878
879 2005-07-16  John (J5) Palmieri  <johnp@redhat.com>
880
881         * python/Makefile.am: dbus_binding.pxd.in should be included 
882         in EXTRA_DIST not dbus_binding.pxd
883         fix up $(srcdir) hopefully for the last time
884
885         * NEWS: Update to 0.35.1
886
887 2005-07-16  Colin Walters  <walters@verbum.org>
888
889         * bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
890         from bus_driver_handle_get_connection_unix_security_context.  Update for
891         error usage.
892         (message_handlers): Update for renames.
893
894         * bus/selinux.c (bus_selinux_allows_send): Handle OOM on
895         _dbus_string_init failure correctly.
896         (bus_selinux_append_context): Convert SID to context.  Append it
897         as a byte array.
898         (bus_selinux_shutdown): Handle the case where bus_selinux_full_init
899         hasn't been called.
900
901         * bus/selinux.h: Update prototype.
902
903         * dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
904         from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.
905
906 2005-07-15  Colin Walters  <walters@verbum.org>
907
908         * doc/TODO: Add note about convenience wrappers.
909
910 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
911
912         * NEWS: Update to 0.35
913
914 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
915
916         * glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
917         so distcheck doesn't fail
918
919         * glib/examples/Makefile.am: Add example-service.xml and 
920         example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail
921
922         * glib/examples/statemachine/Makefile.am: Add statemachine.xml and
923         statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail
924
925         * python/Makefile.am: Preprend $(srcdir)/ to source files so the
926         compiler looks in the right places during distcheck
927
928 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
929
930         * glib/example/Makefile.am: Fix a typo which cause make distcheck
931         to fail
932
933 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
934
935         * python/examples/example-service.py,
936         python/examples/example-signal-emitter.py: Fixed up examples
937         for API changes
938
939 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
940
941         * python/__init__.py: Upped to version (0,42,0) because of
942         the API change
943
944 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
945
946         * ChangeLog: fix date in last entry
947
948         * configure.in, bus/system.conf.in: add the ability to configure 
949         the system bus user at compiletime with the --with-dbus-user flag
950         (patch from Kristof Vansant)
951
952 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
953
954         * bus/dispatch.c, test/test-service.c: Add testcase
955         for sending messages to oneself (TODO item).
956
957         * python/service.py (class Object): Swap ordering of bus_name 
958         and object_path parameters to better support inheritance.
959
960         * doc/dbus-tutorial.xml: change Python docs to reflect change
961         in parameter ordering and fix the inheritance section.
962
963         * doc/TODO: remove sending message to oneself TODO item
964
965 2005-07-15  Ross Burton  <ross@openedhand.com>
966
967         * glib/dbus-gproxy.c:
968         Fix a leak when calling methods via the proxy.
969
970 2005-07-15  Colin Walters  <walters@verbum.org>
971
972         * bus/selinux.c (bus_selinux_append_context): Wrap in
973         HAVE_SELINUX.
974
975 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
976
977         * python/_dbus.py (Bus::remove_signal_receiver):
978         don't add a callback to the match if none has been passed in
979         
980         * python/matchrules.py (SignalMatchTree::remove): if the rule
981         being matched does not have a callback treat it as a wildcard
982         fix matching logic
983
984         * doc/dbus-tutorial.xml: Add Python tutorial
985
986 2005-07-14  Colin Walters  <walters@verbum.org>
987
988         * bus/driver.c
989         (bus_driver_handle_get_connection_unix_security_context): New function.
990         (message_handlers): Add.
991
992         * bus/selinux.c (bus_selinux_append_context): New function; appends
993         security context to message.
994
995         * bus/selinux.h: Prototype.
996
997         * dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.
998
999 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
1000
1001         * bus/activation.c: clean up all tabs to be 8 spaces 
1002         (bus_activation_activate_service): make sure we clean up
1003         if activation fails
1004
1005         * bus/dispatch.c: clean up all tabs to be 8 spaces 
1006         (check_shell_fail_service_auto_start): New function
1007         tests to make sure we get fail properly when trying to auto start a service
1008         with a faulty command line
1009         (check_shell_service_success_auto_start): New function tests to make sure
1010         auto started services get the arguments on the command line
1011
1012         * test/test-shell-service.c: Added service for testing auto-starting with 
1013         command line arguments
1014
1015         * test/data/valid-service-files/debug-shell-echo-fail.service.in, 
1016         test/data/valid-service-files/debug-shell-echo-success.service.in:
1017         Added service files for testing auto-starting with command line arguments
1018
1019         * */.cvsignore: added a bunch of generated files to various .cvsignore files
1020
1021 2005-07-14  Rodrigo Moya  <rodrigo@novell.com>
1022
1023         * dbus/dbus-shell.[ch]: copy/pasted code from GLib.
1024         
1025         * dbus/Makefile.am: added new files to build.
1026
1027         * bus/activation.c (bus_activation_activate_service): support
1028         activation commands with parameters.
1029
1030         * test/shell-test.c: added test program for the shell parsing
1031         code.
1032
1033 2005-07-13  David Zeuthen  <davidz@redhat.com>
1034
1035         * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
1036         64 bit signed and unsigned parameters
1037
1038 2005-07-13  John (J5) Palmieri  <johnp@redhat.com>
1039
1040         * python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
1041
1042         * python/service.py (class Name): renamed BusName to make it clearer
1043         what the object is for (a name on the bus)
1044
1045         * python/examples/example-service.py,
1046         python/examples/example-signal-emitter.py: change the Name object to
1047         BusName
1048
1049 2005-07-12  Colin Walters  <walters@verbum.org>
1050
1051         Patch from Jim Gettys <Jim.Gettys@hp.com>.
1052
1053         * tools/dbus-launch.c: Include sys/select.h.
1054
1055 2005-07-12  John (J5) Palmieri  <johnp@redhat.com>
1056         * python/dbus_bindings.pyx.in: removed
1057
1058         * python/dbus_bindings.pyx: Added.
1059         - Fixed some memleaks (patch from 
1060         Sean Meiners <sean.meiners@linspireinc.com>)
1061         - Broke out the #include "dbus_h_wrapper.h" and put it in its
1062         own pxd file (Pyrex definition)
1063         - Broke out glib dependancies into its own pyx module
1064         
1065         * python/dbus_bindings.pdx: Added.
1066         - Defines C class Connection for exporting to other modules
1067
1068         * python/dbus_glib_bindings.pyx: Added.
1069         - New module to handle lowlevel dbus-glib mainloop integration
1070
1071         * python/glib.py: Added.
1072         - Registers the glib mainloop when you import this module
1073
1074         * python/services.py: Removed (renamed to service.py)
1075         
1076         * python/service.py: Added.
1077         - (class Server): renamed Name
1078
1079         * python/__init__.py: Bump ro version (0,41,0)
1080         -don't import the decorators or service module
1081         by default.  These now reside in the dbus.service namespace
1082
1083         * python/_dbus.py (Bus::__init__): Add code run the main loop 
1084         setup function on creation 
1085
1086         * python/examples/example-service.py,
1087         python/examples/example-signal-emitter.py: update examples
1088
1089         * python/examples/gconf-proxy-service.py,
1090         python/examples/gconf-proxy-service2.py: TODO fix these up
1091
1092         * doc/TODO: Addition
1093         - Added a Python Bindings 1.0 section
1094         - added "Add match on args or match on details to match rules"
1095
1096
1097 2005-07-12  Colin Walters  <walters@verbum.org>
1098
1099         * glib/examples/statemachine/Makefile.am (statemachine-server-glue.h) 
1100         (statemachine-glue.h): 
1101         * glib/examples/Makefile.am (example-service-glue.h) 
1102         (example-signal-emitter-glue.h): 
1103         * glib/Makefile.am (dbus-glib-error-switch.h): 
1104         Add libtool --mode=execute so we use the built library instead
1105         of any installed one.
1106
1107 2005-07-11  Colin Walters  <walters@verbum.org>
1108
1109         * glib/dbus-gvalue.c (struct _DBusGValue): Delete.
1110         (dbus_g_value_types_init): Remove assertion.
1111         (dbus_g_value_get_g_type, dbus_g_value_open)
1112         (dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
1113         (dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
1114         functions related to DBusGValue.  Now we marshal/demarshal
1115         structures as GValueArray.
1116         (dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
1117         structures.
1118         (signature_iter_to_g_type_array): Don't call
1119         signature_iter_to_g_type_struct.
1120         (signature_iter_to_g_type_struct): Delete.
1121         (dbus_gvalue_to_signature): Delete.
1122         (dbus_gvalue_to_signature): New function with same name as other
1123         one; we can convert structures to signatures.
1124         (demarshal_valuearray): New function.
1125         (get_type_demarshaller): Use it.
1126         (demarshal_recurse): Delete.
1127         (marshal_proxy): New function.
1128         (marshal_map): Warn if we can't determine signature from type.
1129         (marshal_collection_ptrarray): Ditto.
1130         (marshal_collection_array): Ditto.
1131         (get_type_marshaller): Use marshal_valuearray.
1132         (marshal_recurse): Delete.
1133         (_dbus_gvalue_test): Add some tests.
1134
1135         * dbus/dbus-glib.h (struct _DBusGValueIterator): 
1136         (dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
1137         (dbus_g_value_open, dbus_g_value_iterator_get_value)
1138         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
1139         (dbus_g_value_free): Remove prototypes.
1140
1141         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
1142         G_TYPE_VALUE_ARRAY.
1143
1144         * glib/examples/example-service.c:
1145         * glib/examples/example-client.c: Implement GetTuple.
1146
1147         * test/glib/test-dbus-glib.c:
1148         * test/glib/test-service-glib.c:
1149         * test/glib/test-service-glib.xml: Add structure tests.
1150
1151 2005-07-10  Colin Walters  <walters@verbum.org>
1152
1153         * doc/TODO: Knock off some GLib items with this patch.
1154
1155         * glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error) 
1156         (_dbus_gvalue_signals_error): New functions.
1157
1158         * glib/dbus-gvalue-utils.h: Prototype them.
1159
1160         * glib/dbus-gobject.c (arg_iterate): Update to handle return vals
1161         and change to not output const/retval flags for input args.  All
1162         callers updated.
1163         (invoke_object_method): Refactor to handle return values.  Add
1164         some more comments in various places.  Remove debug g_print.
1165
1166         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
1167
1168         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
1169         Handle G_TYPE_NONE.
1170         (compute_gsignature): New function; refactored from code from
1171         compute_marshaller and compute_marshaller_name.  Enhance to
1172         handle return values and async ops more cleanly.  Update for
1173         async ops returning NONE instead of BOOLEAN.
1174         (compute_marshaller, compute_marshaller_name): Call compute_gsignature
1175         and output appropriate string.
1176         (generate_glue): Handle return value annotation.  Also don't dump
1177         constness flag for input arguments.
1178
1179         * glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
1180         files shared between installed library and utilities.
1181         (libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
1182         (libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
1183         binding tool can access gtype utility functions.
1184
1185         * test/glib/test-service-glib.c: 
1186         * test/glib/test-service-glib.xml: 
1187         * test/glib/test-dbus-glib.c: Add some tests for return values.
1188
1189 2005-07-09  Colin Walters  <walters@verbum.org>
1190
1191         * glib/dbus-gparser.c (parse_annotation): Add annotations to
1192         argument if available, not method.
1193
1194         * glib/dbus-gobject.c (arg_iterate): More verbose warnings.
1195         (invoke_object_method): First, remove some redundant
1196         GValues (object_value, error_value) in favor of working on
1197         array directly.  Second, rework constness to be less buggy.
1198         Now we iterate directly over the argument metadata instead
1199         of parallel iterating over output signature and metadata.
1200
1201         * glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
1202
1203         * glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
1204         annotation on input args.
1205         
1206 2005-07-09  Colin Walters  <walters@verbum.org>
1207
1208         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
1209         Define.
1210
1211         * glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
1212         annotation.
1213
1214         * glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
1215         (method_dir_signature_from_object_info): Handle arg_iterate change.
1216         (write_interface): Ditto.
1217         (lookup_object_info): Don't barf if format_version is > 0.
1218         (invoke_object_method): Handle arg constness.
1219
1220         * glib/dbus-gidl.c (struct ArgInfo): Add annotations.
1221         (arg_info_new): Create.
1222         (arg_info_unref): Destroy.
1223         (arg_info_get_annotations, arg_info_get_annotation) 
1224         (arg_info_add_annotation): New functions.
1225
1226         * glib/dbus-gidl.h: Prototype them.
1227
1228         * glib/dbus-gparser.c (parse_annotation): Allow annotations in
1229         args, disallow them in properties.
1230         (parse_annotation): Handle arg annotations.
1231
1232         * test/glib/test-service-glib.xml: 
1233         * test/glib/test-service-glib.c: Update to make some methods
1234         const.
1235
1236 2005-07-08  Colin Walters  <walters@verbum.org>
1237
1238         * test/glib/test-service-glib.xml: 
1239         * test/glib/test-service-glib.c:
1240         * test/glib/test-dbus-glib.c: Test a{sv}.
1241
1242         * glib/examples/statemachine/statemachine.c:
1243         * glib/examples/statemachine/statemachine-server.c:
1244         * glib/examples/statemachine/statemachine-client.c: Fix some bugs,
1245         add progress bar, etc.
1246
1247         * glib/dbus-gvalue.c (register_array, register_dict): Delete; not
1248         needed anymore due to generic array/map marshalling.
1249         (dbus_g_value_types_init): Don't register basic arrays or the
1250         string/string hash.
1251         (dbus_gtype_from_signature_iter): Don't try to recurse into
1252         variants.
1253         (dbus_gtype_to_signature): Check collection/map before type
1254         metadata.
1255         (demarshal_garray_basic): Renamed to demarshal_collection_array.
1256         (demarshal_ghashtable): Renamed to demarshal_map; fix to use new
1257         generic map creation/append functions instead of hash table
1258         specifically.
1259         (get_type_demarshaller): Handle maps.
1260         (demarshal_collection): Dispatch on collection type to either
1261         demarshal_collection_ptrarray or demarshal_collection_array.
1262         (get_type_marshaller): Handle maps.
1263         (marshal_collection): Dispatch collection type to either
1264         marshal_collection_ptrarray or marshal_collection_array.
1265         (_dbus_gvalue_test): New test.
1266
1267         * glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
1268         (hash_free_from_gtype): Use it to free GValues.
1269         (hashtable_append): New function.
1270         (ptrarray_append): Fix prototype.
1271         (slist_append): Ditto.
1272         (_dbus_gvalue_utils_test): Extend tests.
1273
1274         * glib/dbus-gtype-specialized.c
1275         (dbus_g_type_specialized_init_append): Renamed from
1276         dbus_g_type_specialized_collection_init_append.  Remove const from
1277         value, since we steal it.
1278         (dbus_g_type_specialized_map_append): New function.
1279
1280         * glib/dbus-gtype-specialized.h: Update prototypes.
1281         Add DBusGTypeSpecializedMapAppendFunc.
1282
1283         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1284         _dbus_gvalue_test.
1285         
1286         * glib/dbus-gtest.h: Prototype it.
1287
1288 2005-07-08  Ross Burton  <ross@openedhand.com>
1289
1290         * dbus/dbus-glib.h:
1291         Add DBysGAsyncData for the async bindings.
1292
1293         * glib/dbus-binding-tool-glib.c:
1294         Re-enable the async bindings.
1295
1296         * test/glib/test-dbus-glib.c:
1297         Add a test for the generated async bindings.
1298
1299 2005-07-08  Colin Walters  <walters@verbum.org>
1300
1301         * doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
1302         connection concept.
1303         
1304 2005-07-08  Colin Walters  <walters@verbum.org>
1305         
1306         * tools/Makefile.am: Kill of print-introspect in favor of using
1307         dbus-send --print-reply=literal.
1308
1309         * test/glib/test-service-glib.xml: 
1310         * test/glib/test-service-glib.c (my_object_get_objs): New test
1311         for "ao".
1312
1313         * test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
1314         (main): Test GetObjs.
1315
1316         * glib/examples/statemachine/Makefile.am:
1317         * glib/examples/statemachine/sm-marshal.list:
1318         * glib/examples/statemachine/statemachine-client.c:
1319         * glib/examples/statemachine/statemachine-server.c:
1320         * glib/examples/statemachine/statemachine-server.xml:
1321         * glib/examples/statemachine/statemachine.c:
1322         * glib/examples/statemachine/statemachine.h:
1323         * glib/examples/statemachine/statemachine.xml:
1324
1325         New example.
1326
1327         * glib/examples/example-service.c (main): Move invocation
1328         of dbus_g_object_type_install_info earlier, to emphasize it
1329         should only be done once.
1330
1331         * glib/examples/example-signal-emitter.c (main): Ditto.
1332
1333         * glib/examples/Makefile.am (SUBDIRS): Include statemachine.
1334
1335         * glib/dbus-gvalue.h (dbus_gtype_to_signature)
1336         (dbus_gvalue_marshal): Update prototypes.
1337
1338         * glib/dbus-gvalue.c: Update all marshalling functions to take
1339         const GValue instead of GValue.
1340         (signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
1341         types.
1342         (dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
1343         change.
1344         (dbus_gtype_to_signature): Handle generic collecitons and maps.
1345         Return a newly-allocated string.
1346         (demarshal_proxy, demarshal_object_path, demarshal_object)
1347         (demarshal_strv, demarshal_ghashtable): Set error, don't assert if
1348         we get the wrong types from message.
1349         (get_type_demarshaller): New function, extracted from
1350         dbus_gvalue_demarshal.
1351         (demarshal_collection): New function, demarshals generic
1352         collection.
1353         (dbus_gvalue_demarshal): Just invoke result of
1354         get_type_demarshaller.  Throw error if we don't have one.
1355         (marshal_garray_basic): Abort on OOM.
1356         (get_type_marshaller): New function, extracted from
1357         dbus_gvalue_marshal.
1358         (collection_marshal_iterator, marshal_collection): New functions;
1359         implements generic marshalling for an iteratable specialized
1360         collection.
1361         (dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
1362
1363         * glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
1364         G_TYPE_STRING.
1365         (ptrarray_value_from_gvalue): Ditto.
1366         (ptrarray_append, ptrarray_free): New functions.
1367         (slist_constructor, slist_iterator, slist_copy_elt, slist_copy) 
1368         (slist_append, slist_end_append, slist_free): New functions.
1369         (dbus_g_type_specialized_builtins_init): Add append fuctions
1370         for GPtrArray and GSList.  Register GSList.
1371         (test_specialized_hash, _dbus_gvalue_utils_test): New functions.
1372
1373         * glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
1374         New.
1375         (dbus_g_type_specialized_collection_init_append)
1376         (dbus_g_type_specialized_collection_append)
1377         (dbus_g_type_specialized_collection_end_append): Prototype.
1378         (DBusGTypeSpecializedCollectionVtable): Add append_func and
1379         end_append_func.
1380
1381         * glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append) 
1382         (dbus_g_type_specialized_collection_append) 
1383         (dbus_g_type_specialized_collection_end_append): New functions.
1384         (dbus_g_type_map_value_iterate): Take const GValue.
1385         (dbus_g_type_collection_value_iterate): Ditto.
1386
1387         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1388         _dbus_gvalue_utils_test.
1389         
1390         * glib/dbus-gtest.h: Prototype it.
1391
1392         * glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
1393         using uninitialized owner_list.
1394         (dbus_g_proxy_begin_call_internal): Move return_if_fail to
1395         public API.
1396         (dbus_g_proxy_end_call_internal): Update to use error set
1397         from dbus_gvalue_demarshal instead of setting it here.
1398         (dbus_g_proxy_begin_call): Move return_if_fail here.
1399
1400         * glib/dbus-gobject.c (write_interface): Update for
1401         dbus_gtype_to_signature returning new string.
1402
1403         * configure.in: Add glib/examples/statemachine.
1404
1405 2005-07-08  Joe Shaw  <joeshaw@novell.com>
1406
1407         * configure.in: Add a configure option, --with-console-auth-dir
1408         
1409         * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
1410         new setting.  Patch from Kay Sievers.
1411
1412 2005-07-06  Colin Walters  <walters@verbum.org>
1413
1414         * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
1415         (DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
1416         (dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
1417         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
1418         Delete in favor of dbus_g_proxy_begin_call and
1419         dbus_g_proxy_cancel_call.
1420         (DBusGProxyCall, DBusGProxyCallNotify): New.
1421         (dbus_g_proxy_begin_call): Change prototype to take callback, user
1422         data, and destroy function.  This replaces
1423         dbus_g_pending_call_set_notify.
1424         (dbus_g_proxy_cancel_call): Prototype.
1425         (DBusGAsyncData): Delete, shouldn't be needed anymore.
1426
1427         * glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
1428         pending_calls map.
1429         (struct _DBusGProxyManager): Add bus_proxy member, which is an
1430         internal proxy for calls to the bus. Remove
1431         pending_nameowner_calls, now the internal proxy keeps track.
1432         (dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
1433         pending_nameowner_calls.
1434         (got_name_owner_cb): Update prototype, and use
1435         dbus_g_proxy_end_call.
1436         (got_name_owner_cb): Remove reference to pending_nameowner_calls.
1437         (dbus_g_proxy_manager_register): Delete directly libdbus code in
1438         favor of using internal proxy.
1439         (dbus_g_proxy_manager_unregister): Update to use
1440         dbus_g_proxy_cancel_call for any pending GetNameOwner call.
1441         (dbus_g_proxy_init): Initialize pending calls map.
1442         (dbus_g_proxy_constructor): New.
1443         (dbus_g_proxy_class_init): Add get/set property functions,
1444         constructor, and add NAME, PATH, and INTERFACE properties.
1445         (cancel_pending_call): New function.
1446         (dbus_g_proxy_dispose): Iterate over any outstanding calls and
1447         cancel them.
1448         (dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
1449         (GPendingNotifyClosure): New structure.
1450         (d_pending_call_notify, d_pending_call_free): Moved here from
1451         dbus-glib.c.
1452         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
1453         ordering.
1454         (manager_begin_bus_call): New internal function for talking to
1455         internal bus proxy.
1456         (dbus_g_proxy_new): Construct object using GObjet properties.
1457         (dbus_g_proxy_begin_call_internal): Update to take user data, etc.
1458         Create closure of same, and insert call into map of pending calls.
1459         (dbus_g_proxy_end_call_internal): Take call id instead of pending
1460         call.  Look up pending call in current set.  Remove it when we've
1461         completed.
1462         (dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
1463         (dbus_g_proxy_begin_call): Change API to take callback, user data,
1464         and destroy function directly.
1465         (dbus_g_proxy_end_call): Update to take DBusGProxyCall.
1466         (dbus_g_proxy_call): Invoke with NULL callback.
1467         (dbus_g_proxy_cancel_call): New function, replaces
1468         dbus_g_pending_call_cancel.
1469
1470         * glib/dbus-gparser.c (validate_signature): Fix call to
1471         dbus_set_g_error.
1472
1473         * glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
1474         New quark for attaching metadata to GType.
1475         (info_hash): Delete.
1476         (lookup_object_info): Look up using quark.
1477         (dbus_g_object_type_install_info): Check that a type is classed,
1478         not that it's an object.  Also just install type data using quark
1479         instead of using global hash.
1480
1481         * glib/dbus-glib.c (dbus_g_pending_call_ref) 
1482         (dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
1483         (GPendingNotifyClosure): Delete.
1484         (d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
1485         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
1486
1487         * glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
1488         client method generation until we can fix it...
1489         
1490         * tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
1491         (load_from_service_thread_func): Ditto.
1492
1493         * tools/dbus-names-model.c (struct NamesModel): Hold
1494         DBusGProxyCall.
1495         (have_names_notify): Update prototype, use
1496         dbus_g_proxy_cancel_call.
1497         (names_model_reload): Update for new dbus_g_proxy_begin_call API.
1498
1499         * tools/dbus-monitor.c (filter_func): Update for print_message
1500         API change.
1501
1502         * test/glib/test-dbus-glib.c: Add more tests for async
1503         invocations.  Update many begin_call/end_call pairs to just use
1504         dbus_g_proxy_call.
1505
1506         * tools/dbus-send.c (main): Add --print-reply=literal mode.  This
1507         allows us to dump print-introspect.c.
1508
1509         * tools/dbus-print-message.h (print_message): Add literal argument
1510         to print_message which is intended to allow printing arguments without
1511         metadata like "string=".
1512
1513         * tools/dbus-print-message.c (print_iter): Add literal argument.
1514         (print_message): Allow printing string messages literally.
1515
1516 2005-07-05  Colin Walters  <walters@verbum.org>
1517
1518         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1519         Remove value refcount leak, original patch from Jorn Baayen
1520         <jorn@openedhand.com>.  Also remove useless extra value in favor
1521         of prepending to value array directly.
1522
1523 2005-07-02  Colin Walters  <walters@verbum.org>
1524
1525         * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
1526
1527 2005-07-01  Colin Walters  <walters@verbum.org>
1528
1529         Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
1530         
1531         * glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
1532         (dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
1533         G_TYPE_LONG as DBUS_TYPE_INT32, G_TYPE_ULONG as DBUS_TYPE_UINT32,
1534         and G_TYPE_FLOAT as DBUS_TYPE_DOUBLE.
1535
1536 2005-06-30  Colin Walters  <walters@verbum.org>
1537
1538         * test/glib/test-dbus-glib.c:
1539         * test/glib/test-service-glib.c:
1540         * test/glib/test-service-glib.xml: Update tests for new error
1541         setting bits, also add async tests (patch from Ross Burton).
1542
1543         * test/glib/Makefile.am (test_service_glib_LDADD): Add
1544         DBUS_GLIB_THREADS_LIBS.
1545
1546         * glib/dbus-gproxy.c (get_name_owner)
1547         (dbus_g_pending_call_end_valist): Ditto.
1548
1549         * glib/dbus-gobject.c (error_metadata): New mapping from GError
1550         domain (GQuark) to DBusGErrorInfo.  
1551         (gerror_domaincode_to_dbus_error_name): Attempt to look up error
1552         quark in error_metadata.  Take message interface as default
1553         error message interface.
1554         (gerror_to_dbus_error_message): Pass message interface.
1555         (dbus_set_g_error): Resurrected.
1556         (dbus_g_error_info_free): New function.
1557         (dbus_g_object_type_install_info): Use g_type_class_ref instead
1558         of _peek to actually create the object class if it hasn't been
1559         created yet.
1560         (dbus_g_error_domain_register): New function.
1561
1562         * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
1563
1564         * glib/dbus-gparser.c (validate_signature): Ditto.
1565
1566         * dbus/dbus-glib.h (dbus_g_error_set): Delete.
1567         (dbus_g_error_domain_register): Prototype.
1568
1569         * glib/dbus-glib.c (dbus_g_error_set): Delete.
1570         Update tests.
1571
1572 2005-06-29  Colin Walters  <walters@verbum.org>
1573
1574         * dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY.  Add
1575         DBUS_TYPE_G_OBJECT_PATH.
1576
1577         * glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
1578         for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
1579         be handled more generically).  Add DBUS_TYPE_G_OBJECT_PATH.
1580         (dbus_g_object_path_get_g_type): New function.
1581         (dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
1582         to DBUS_TYPE_G_OBJECT_PATH by default.
1583         (demarshal_proxy): Remove unused name variable.
1584         (demarshal_object_path, marshal_object_path): New functions.
1585         (demarshal_proxy_array, marshal_proxy_array): Delete.
1586         
1587         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
1588         DBUS_TYPE_G_OBJECT_PATH to char *.
1589         (dbus_g_type_get_lookup_function): Map builtin
1590         DBUS_TYPE_G_OBJECT_PATH.
1591
1592         * test/glib/test-dbus-glib.c
1593         * test/glib/test-service-glib.c (my_object_objpath): 
1594         Adapt tests to new object path marshalling.
1595
1596 2005-06-29  John (J5) Palmieri  <johnp@redhat.com>
1597
1598         * configure.in: force check for Python >= 2.4
1599
1600 2005-06-29  Colin Walters  <walters@verbum.org>
1601         
1602         Patch from Ross Burton <ross@openedhand.com>
1603         
1604         * glib/dbus-gobject.c (invoke_object_method): Unset object
1605         value in all cases, not only in async case.
1606
1607 2005-06-29  Colin Walters  <walters@verbum.org>
1608
1609         * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
1610         name_call for keeping track of any outgoing GetNameOwner call.
1611         Also add for_owner and associated.
1612         (struct _DBusGProxyManager): Add owner_names, which is hash table
1613         that maps a base name to a list of names it owns (that we're
1614         interested in).  Add pending_nameowner_calls which is a list of
1615         all outstanding GetNameOwner; avoids us having to iterate over
1616         every proxy.  Add unassociated_proxies which keeps track of name
1617         proxies with no associated name owner.
1618         (dbus_g_proxy_manager_unref): Destroy owner_names.
1619         (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
1620         name refcounts.
1621         (find_name_in_info, name_owner_foreach)
1622         (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
1623         (dbus_g_proxy_manager_monitor_name_owner)
1624         (dbus_g_proxy_manager_unmonitor_name_owner)
1625         (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
1626         New functions; they manipulate the owner_names mapping.
1627         (got_name_owner_cb): New function.
1628         (get_name_owner): New function, extracted from
1629         dbus_g_proxy_new_for_name_owner.
1630         (dbus_g_proxy_manager_register): For now we need to keep track of
1631         all NameOwnerChanged.  Also if the proxy is for a name, if we
1632         don't already know the name owner, queue a new GetNameOwner
1633         request and add it to our list of unassociated proxies.  Otherwise
1634         inc the refcount.
1635         (dbus_g_proxy_manager_unregister): If this proxy is for a name,
1636         cancel any pending GetNameOwner call, etc.
1637         (dbus_g_proxy_manager_filter): Handle NameOwnerChanged.  Also use
1638         the owner_names mapping to look up the current names for the
1639         signal source, and dispatch to any proxies for that name.
1640         (dbus_g_proxy_new): Initialize new members.
1641         (dbus_g_proxy_new_for_name): Delete unused proxy variable.
1642         (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
1643         (dbus_g_pending_call_end_valist): New function, extracted from
1644         dbus_g_proxy_end_call_internal.  Useful when we don't have a proxy
1645         but want to use the GLib infrastructure.  Also note how many
1646         arguments in reply were over.
1647         (dbus_g_pending_call_end): New function, just call
1648         dbus_g_pending_call_end_valist.
1649         (dbus_g_proxy_end_call_internal): Just call
1650         dbus_g_pending_call_end_valist.
1651
1652         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
1653         of builtin marshaller for STRING_STRING_STRING.
1654
1655         * test/glib/test-dbus-glib.c: 
1656         * test/glib/test-service-glib.c:
1657         * test/glib/test-service-glib.xml:
1658         Extend tests to cover name proxies, destruction of owner proxies,
1659         etc.
1660         
1661         * glib/examples/example-signal-recipient.c
1662         (dbus_g_proxy_new_for_name_owner): Create a name proxy.
1663         
1664         * tools/dbus-send.c (main): Print D-BUS error name in addition
1665         to message.
1666
1667 2005-06-28  John (J5) Palmieri  <johnp@redhat.com>
1668
1669         * python/dbus_bindings.pyx.in (cunregister_function_handler,
1670         cmessage_function_handler): Patch from 
1671         Anthony Baxter <anthony@interlink.com.au> fixes threading problems
1672         by using the Py_GILState_Ensure/Release to synchronize with the
1673         python runtime.
1674         
1675 2005-06-28  Ray Strode  <rstrode@redhat.com>
1676
1677         *  dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
1678         babysitter helper process on last unref, bug #2813.
1679
1680 2005-06-27  Colin Walters  <walters@verbum.org>
1681
1682         * test/glib/test-dbus-glib.c: 
1683         * test/glib/test-service-glib.c:
1684         * test/glib/test-service-glib.xml:
1685         Test hash table signal emitting.
1686
1687         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
1688         types to their fundamental basis types, since this is what
1689         marshallers operate on.  Also add an entry for VOID__BOXED.
1690         (dbus_g_object_register_marshaller_array): Convert to fundamental.
1691
1692 2005-06-26  Havoc Pennington  <hp@redhat.com>
1693
1694         * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
1695         from Don Park
1696
1697 2005-06-26  Colin Walters  <walters@verbum.org>
1698
1699         * glib/dbus-glib.c (dbus_set_g_error): Delete.
1700         (dbus_g_error_set): New public function from its ashes; used by
1701         both service-side method implementation and GLib bindings
1702         internals.
1703         (dbus_g_error_has_name, dbus_g_error_get_name): New function.
1704         (_dbus_glib_test): Add some tests.
1705
1706         * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
1707
1708         * test/glib/test-service-glib.c (my_object_throw_error): Use
1709         dbus_g_error_set.
1710
1711         * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
1712         errors thrown by dbus_g_error_set.
1713
1714         * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
1715
1716         * glib/dbus-gparser.c (validate_signature): Ditto.
1717
1718         * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner) 
1719         (dbus_g_proxy_end_call_internal): Ditto.
1720
1721         * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
1722         converts DBUS_ERROR_x to DBUS_GERROR_x.
1723         (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
1724
1725         * doc/TODO: Remove error TODO.
1726
1727         * doc/dbus-tutorial.xml: Update with documentation about error
1728         handling.
1729
1730         * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
1731         sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
1732         GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.
1733
1734 2005-06-22  Colin Walters  <walters@verbum.org>
1735         
1736         Patch from Ross Burton <ross@openedhand.com>
1737
1738         * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
1739
1740 2005-06-20  Colin Walters  <walters@verbum.org>
1741
1742         * configure.in: Add glib/examples.
1743
1744         * glib/Makefile.am: Add examples/
1745
1746         * glib/examples/.cvsignore
1747         * glib/examples/Makefile.am
1748         * glib/examples/example-client.c
1749         * glib/examples/example-service.c
1750         * glib/examples/example-service.xml
1751         * glib/examples/example-signal-emitter.c
1752         * glib/examples/example-signal-emitter.xml
1753         * glib/examples/example-signal-recipient.c:
1754         New files; GLib binding examples, ported from
1755         python/examples.
1756
1757 2005-06-20  Colin Walters  <walters@verbum.org>
1758
1759         * dbus/dbus-glib.h: 
1760         * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
1761         dbus_g_proxy_call.
1762
1763         * glib/dbus-binding-tool-glib.c: 
1764         * doc/dbus-tutorial.xml: 
1765         * test/glib/test-dbus-glib.c: Update for rename.
1766         
1767 2005-06-20  Colin Walters  <walters@verbum.org>
1768
1769         Patch suggested by Ross Burton <ross@openedhand.com>
1770
1771         * glib/dbus-gobject.c (export_signals): Free signal name.
1772         (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
1773         memory leak.  Add a bit of documentation.
1774         (dbus_g_method_return_error): Free context, and note we do
1775         so.
1776
1777 2005-06-18  Murray Cumming  <murrayc@murrayc.com>
1778
1779         * dbus/dbus-glib.h:
1780         * glib/dbus-gobject.c:
1781         * glib/dbus-gproxy.c:
1782         * glib/dbus-gvalue.c: Predeclare structs as 
1783         typedef struct _Something Something instead of 
1784         typedef struct Something Something, so we can 
1785         redeclare the prototypes. Other GNOME libraries 
1786         do this already.
1787
1788 2005-06-17  Colin Walters  <walters@verbum.org>
1789
1790         * tools/dbus-names-model.c (have_names_notify): Fix call
1791         to dbus_g_proxy_end_call.
1792         
1793 2005-06-17  Colin Walters  <walters@verbum.org>
1794
1795         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
1796         spew warnings if we get malformed remote signals.
1797
1798         * glib/dbus-gobject.c (propsig_iterate): New function.
1799         (lookup_object_info): New function, extracted from
1800         lookup_object_and_method.
1801         (introspect_properties, introspect_signals): Delete; these
1802         are merged into write_interface.
1803         (write_interface): Write out signals and properties here;
1804         dump the org.gtk.object stuff and use the interface given
1805         in the introspection data blob.  Also fix up property XML.
1806         (lookup_values): New function.
1807         (introspect_interfaces): Gather a mapping from interface to a
1808         list of its methods, signals, and properties, then write out
1809         each interface.
1810         (lookup_object_and_method): Use lookup_object_info.
1811         (struct DBusGSignalClosure): Add interface.
1812         (dbus_g_signal_closure_new): Add interface. Don't dup signame;
1813         we can just use the constant data.
1814         (dbus_g_signal_closure_finalize): Don't free signal name.
1815         (signal_emitter_marshaller): Use interface from signal closure.
1816         (export_signals): Only export signals mentioned in introspection
1817         blob.
1818         (dbus_g_connection_register_g_object): Warn if we have no
1819         introspection data for an object.
1820         (funcsig_equal): Remove unused variable.
1821         (dbus_g_object_register_marshaller): Take varargs instead of
1822         list.
1823         (dbus_g_object_register_marshaller_array): New function,
1824         extracted from old dbus_g_object_register_marshaller.
1825
1826         * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
1827         signals and property data.
1828         (write_quoted_string): New function, extracted from generate_glue.
1829         (generate_glue): Write signals and properties to introspection
1830         blob.
1831
1832         * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
1833         exported_signals and exported_properties.
1834         (dbus_g_object_register_marshaller): Update prototype.
1835         (dbus_g_object_register_marshaller_array): Prototype.
1836         
1837         * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
1838
1839         * test/glib/test-service-glib.c: Add new test signals and method
1840         to emit them.
1841
1842         * test/glib/test-service-glib.xml: Add some test signals.
1843
1844         * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
1845         and my-object-marshal.h
1846         (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
1847         my-object-marshal.c.
1848         (my-object-marshal.c, my-object-marshal.h): Implement.
1849
1850         * test/glib/.cvsignore: Update.
1851
1852         * doc/TODO: Remove two GLib TODO items fixed by this
1853         patch.
1854
1855 2005-06-16  Colin Walters  <walters@verbum.org>
1856
1857         * doc/TODO: Update for GLib bindings.
1858         
1859 2005-06-16  Colin Walters  <walters@verbum.org>
1860
1861         * glib/dbus-binding-tool-glib.c:
1862         * glib/dbus-gobject.c:
1863         * glib/dbus-gproxy.c:  Add Nokia copyright; Patch
1864         from Ross Burton, for his GLib bindings work.
1865
1866 2005-06-16  Colin Walters  <walters@verbum.org>
1867
1868         * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
1869         to iterate instead of walking to G_TYPE_INVALID.
1870
1871         Patch based on a patch from Ryan Gammon.
1872
1873 2005-06-16  Colin Walters  <walters@verbum.org>
1874
1875         * bus/bus.c (bus_context_new): Set parser to NULL
1876         after we unref it (Patch from Chris Boscolo, #2174).
1877         
1878 2005-06-16  Colin Walters  <walters@verbum.org>
1879
1880         * python/dbus_bindings.pyx.in: Import size_t,
1881         __int64_t, __uint64_t, and __signed.
1882
1883         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
1884         Define cmsg struct, output it.
1885         (_dbus_read_credentials_unix_socket):
1886         Use cmsg struct.
1887         
1888         Patch from Joe Markus Clarke for FreeBSD support.
1889         
1890 2005-06-16  Colin Walters  <walters@verbum.org>
1891
1892         * tools/dbus-send.c (append_array): Use strtok.
1893         (append_dict): New function.
1894         (type_from_name): New function, extracted from main.
1895         (main): Handle sending dicts.
1896
1897         * tools/dbus-print-message.c (print_iter): Print dict
1898         entries.
1899         
1900 2005-06-16  Colin Walters  <walters@verbum.org>
1901
1902         * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
1903         values as the empty string (#2948).
1904         
1905 2005-06-16  Colin Walters  <walters@verbum.org>
1906
1907         * dbus/Makefile.am:
1908         * mono/doc/Makefile.am:
1909         * test/glib/Makefile.am:
1910
1911         Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
1912
1913 2005-06-16  Colin Walters  <walters@verbum.org>
1914
1915         * dbus/dbus-marshal-header.c (_dbus_header_load): Set
1916         header byte order from expected byte order (Patch from Chris Wilson, #3475).
1917
1918         * dbus/dbus-marshal-byteswap.c (byteswap_body_helper): 
1919         Increment pointer after swapping fixed array.  Add assertion
1920         for array length.
1921                 
1922 2005-06-15  Colin Walters  <walters@verbum.org>
1923
1924         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
1925         Fix call to dbus_set_error.  (Patch from Michael Banck, #3461)
1926         
1927 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1928
1929         * NEWS: Update to 0.34
1930
1931 2005-06-15  David Zeuthen  <davidz@redhat.com>
1932
1933         * configure.in (LT_CURRENT): Revert back to 1 as the library
1934         hasn't changed and we've certainly not committed to protocol
1935         stability yet.  All this does is to break ABI. See commit note
1936         from hp@redhat.com 2005-05-05 for details.
1937         
1938 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1939
1940         * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method 
1941         (_dbus_connection_run_builtin_filters): New method
1942         (dbus_connection_dispatch): Run the builtin filters which in turn
1943         runs the peer filter which handles Ping messages.
1944
1945         * doc/TODO: 
1946          - Ping isn't handled: This patch fixes it
1947          
1948          - Add a test case for the Ping message: added TODO item
1949
1950 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1951
1952         * dbus/dbus-message.c:
1953         (dbus_message_has_path): New method
1954         (dbus_message_has_interface): New method
1955         (dbus_message_has_member): New method
1956
1957         * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
1958         New method
1959
1960         * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that 
1961         the keyring directory is private to the user
1962
1963         * doc/TODO:
1964          - The convenience functions in dbus-bus.h should perhaps have
1965          the signatures that they would have if they were autogenerated
1966          stubs. e.g. the acquire service function. We should also evaluate
1967          which of these functions to include, in light of the fact that
1968          GLib/Qt native stubs will probably also exist.: Punted
1969
1970          - add dbus_message_has_path(), maybe has_member/interface:
1971          fixed in this patch
1972
1973          - in dbus-keyring.c, enforce that the keyring dir is not
1974          world readable/writable: Fixed in this patch
1975
1976 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1977
1978         * dbus/dbus-marshal-validate.h: Added a new validation
1979         error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for 
1980         out of memory errors when validating signitures
1981
1982         * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
1983         in places where we previously used DBUS_VALID and a FALSE return 
1984         value to indicate OOM
1985         
1986         * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
1987         Use a stack to track the number of elements inside containers.  The 
1988         stack values are then used to validate that dict entries have only two
1989         elements within them.
1990         (validate_body_helper): check the reason for failure when validating
1991         varients
1992         
1993         * dbus/dbus-message.c (load_message): use 
1994         DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used 
1995         DBUS_VALID and a FALSE return value to indicate OOM
1996
1997         * doc/TODO: remove "- validate dict entry number of fields" as this
1998         patch fixes it
1999
2000 2005-06-14  David Zeuthen  <davidz@redhat.com>
2001
2002         * bus/bus.c (process_config_every_time): Drop existing conf-dir
2003         watches (if applicable) and add new watches
2004
2005         * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
2006         (main): Setup SIGIO signal handler if using D_NOTIFY
2007
2008         * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
2009
2010         * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
2011         (merge_included): Also merge conf_dirs list
2012         (bus_config_parser_unref): Clear conf_dirs list
2013         (include_dir): Add directory to conf_dirs list
2014         (bus_config_parser_get_conf_dirs): New function
2015
2016         * bus/dir-watch.[ch]: New files
2017
2018         * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
2019
2020         * configure.in: Add checks for D_NOTIFY on Linux
2021
2022 2005-06-14  Colin Walters  <walters@verbum.org>
2023
2024         * glib/dbus-binding-tool-glib.c:
2025         * glib/dbus-gobject.c:
2026         * glib/dbus-gvalue.c: Fix indentation and brace style.
2027         
2028 2005-06-14  Ross Burton <ross@openedhand.com>.
2029
2030         * glib/dbus-glib.h: Make DBusGMethodInvocation
2031         a private structure.  Rearrange prototypes a bit.
2032         
2033         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
2034         documentation for first_arg_type.
2035         
2036         * glib/dbus-gobject.c: Move DBusGMethodInvocation
2037         here, add documentation.  Move dbus_g_method_return
2038         and dbus_g_method_return_error into public API
2039         section.
2040
2041 2005-06-14  Colin Walters  <walters@verbum.org>
2042
2043         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
2044         Add missing return statements, noticed by Ross Burton.
2045         
2046 2005-06-13  Ross Burton <ross@openedhand.com>.
2047
2048         * glib/dbus-gobject.c: Handle errors on message
2049         demarshalling by sending error message back.
2050         * glib/dbus-gvalue.c: Initialize return variables.
2051
2052 2005-06-13  Colin Walters  <walters@verbum.org>
2053
2054         * glib/Makefile.am: Fix thinko in last patch.
2055
2056 2005-06-13  Colin Walters  <walters@verbum.org>
2057
2058         * glib/Makefile.am: Move dbus-gtype-specialized.c
2059         and dbus-gtype-specialized.h into a _HEADERS variable,
2060         install them.
2061
2062 2005-06-12  Colin Walters  <walters@verbum.org>
2063
2064         Async signals and various bugfixes and testing by
2065         Ross Burton <ross@openedhand.com>.
2066
2067         * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
2068         (dbus_gvalue_genmarshal_name_from_type)
2069         (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
2070         (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
2071         (dbus_g_value_types_init, dbus_gtype_from_signature)
2072         (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
2073         (dbus_gtypes_from_arg_signature): New function prototypes.
2074         (dbus_gvalue_demarshal): Take context and error arguments.
2075         (dbus_gvalue_demarshal_variant): New function.
2076         (dbus_gvalue_demarshal_message): New function.
2077         (dbus_gvalue_store): Delete.
2078
2079         * glib/dbus-gvalue.c:
2080
2081         File has been almost entirely rewritten; now we special-case
2082         more types such as DBUS_TYPE_SIGNATURE, handle arrays and
2083         hash tables correctly, etc.  Full support for recursive values
2084         is not yet complete.
2085
2086         * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
2087         argument of signal to G_TYPE_POINTER since we now pass a
2088         structure.
2089         (lookup_g_marshaller): Delete in favor of
2090         _dbus_gobject_lookup_marshaller.
2091         (marshal_dbus_message_to_g_marshaller): Use
2092         _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
2093         to handle remote signal callbacks.
2094         (dbus_g_proxy_new_from_proxy): New function; creates a new
2095         DBusGProxy by copying an existing one.
2096         (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
2097         (dbus_g_proxy_get_path): New functions.
2098         (dbus_g_proxy_marshal_args_to_message): New function;
2099         factored out of existing code.
2100         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
2101         from a varargs array.
2102         (dbus_g_proxy_begin_call_internal): New function.
2103         (dbus_g_proxy_end_call_internal): New function.
2104         (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
2105         as arguments; simply invoke dbus_g_proxy_begin_call_internal
2106         after collecting args into value array.
2107         (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
2108         invoke dbus_g_proxy_end_call_internal.
2109         (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
2110         end_call_internal.
2111         (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
2112         types.
2113         (array_free_all): New function.
2114         (dbus_g_proxy_add_signal): Take GTypes.
2115
2116         * glib/dbus-gobject.h:
2117         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2118         (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
2119         Prototype.
2120
2121         * glib/dbus-gobject.c: Add a global marshal_table hash which
2122         stores mappings from type signatures to marshallers.  Change lots
2123         of invocations of dbus_gtype_to_dbus_type to
2124         dbus_gtype_to_signature.
2125         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2126         (introspect_signals): Fix test for query.return_type.
2127         (set_object_property): Update invocation of dbus_gvalue_demarshal.
2128         (invoke_object_method): Many changes.  Handle asynchronous
2129         invocations.  Convert arguments with
2130         dbus_gvalue_demarshal_message.  Handle errors.  Use
2131         DBusSignatureIter instead of strlen on args. Handle all arguments
2132         generically.  Special-case variants.
2133         (dbus_g_method_return, dbus_g_method_return_error): New function.
2134         (DBusGSignalClosure): New structure, closes over signal
2135         information.
2136         (dbus_g_signal_closure_new): New function.
2137         (dbus_g_signal_closure_finalize): New function.
2138         (signal_emitter_marshaller): New function; is special marshaller
2139         which emits signals on bus.
2140         (export_signals): New function; introspects object signals and
2141         connects to them.
2142         (dbus_g_object_type_install_info): Take GType instead of
2143         GObjectClass.
2144         (dbus_g_connection_register_g_object): Invoke export_signals.
2145         (dbus_g_connection_lookup_g_object): New function.
2146         (DBusGFuncSignature) New structure; used for mapping type
2147         signatures to marshallers.
2148         (funcsig_hash): New function; hashes DBusGFuncSignature.
2149         (funcsig_equal): New function; compares DBusGFuncSignature.
2150         (_dbus_gobject_lookup_marshaller): New function.
2151         (dbus_g_object_register_marshaller): New function; used to
2152         register a marshaller at runtime for a particular signature.
2153
2154         * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
2155
2156         * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
2157         which notes a server method implementation should be
2158         asynchronous.
2159
2160         * glib/dbus-binding-tool-glib.c
2161         (dbus_binding_tool_output_glib_server): Call
2162         dbus_g_value_types_init.
2163         (write_formal_parameters): Use dbus_gtype_from_signature.  Handle
2164         variants specially.
2165         (dbus_g_type_get_lookup_function): Turn GType into an invocation
2166         of a lookup function.
2167         (write_args_for_direction): Use dbus_g_type_get_lookup_function.
2168         (write_untyped_out_args): New method; write output arguments.
2169         (write_formal_declarations_for_direction): Function for
2170         writing prototypes.
2171         (write_formal_parameters_for_direction): Function for
2172         writing implementations.
2173         (write_typed_args_for_direction): Function for writing
2174         arguments prefixed with GTypes.
2175         (write_async_method_client): Write out async version
2176         of method.
2177
2178         * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
2179         (dbus_g_type_get_marshal_name): Move mapping from GType
2180         to marshal name into here.
2181         (dbus_g_type_get_c_name): Move into here.
2182         (compute_marshaller): Convert signature to type with
2183         dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
2184         (compute_marshaller_name): Ditto.
2185         (compute_marshaller): Handle async signal annotations.
2186         (gather_marshallers): Return if we don't have a known
2187         prefix.
2188         (generate_glue): Collect introspection blob here, and
2189         write all of the blob at the end.  This allows an object
2190         with multiple interfaces to work.
2191         Mark async methods in introspection blob.
2192
2193         * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
2194         dbus-gtype-specialized.c, dbus-gtype-specialized.h,
2195         dbus-gvalue-utils.h, dbus-gvalue-utils.c.
2196
2197         * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
2198         avoids people accidentally using DBUS_TYPE_* which should
2199         not be necessary anymore.
2200         Do include dbus-gtype-specialized.h, which are utilities
2201         for GLib container types.
2202         Add various #defines for types such as
2203         DBUS_TYPE_G_BOOLEAN_ARRAY.
2204         (DBusGValueIterator, DBusGValue): Define, not fully used
2205         yet.
2206         (dbus_g_value_get_g_type): Type for recursive value.
2207         (dbus_g_value_open, dbus_g_value_iterator_get_value)
2208         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
2209         (dbus_g_value_free): Prototypes.
2210         (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
2211         (dbus_g_proxy_set_interface): Prototype.
2212         (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
2213         (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
2214         types.
2215         (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
2216         Accessors.
2217         (DBusGAsyncData, DBusGMethodInvocation): Structures for
2218         doing async invocations.
2219         (dbus_g_method_return, dbus_g_method_return_error):
2220         Prototypes.
2221         * doc/dbus-tutorial.xml: Update GLib section.
2222         
2223         * tools/dbus-viewer.c (load_child_nodes): Update
2224         for new invocation type of dbus_g_proxy_end_call.
2225         (load_from_service_thread_func): Ditto.
2226
2227         * tools/print-introspect.c (main): Ditto.
2228
2229         * tools/dbus-names-model.c (have_names_notify)
2230         (names_model_reload, names_model_set_connection)
2231         Use GTypes.
2232
2233         * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
2234         needed since Python bindings use GLib bindings.
2235
2236         * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
2237         Add --prefix argument.
2238
2239         * tools/Makefile.am: Define DBUS_COMPILATION.  Remove
2240         unneeded --ignore-unsupported arg.
2241         
2242         * test/glib/test-service-glib.c: 
2243         * test/glib/test-service-glib.xml:
2244         * test/glib/test-dbus-glib.c: Add many more tests.
2245
2246 2005-06-06  David Zeuthen  <davidz@redhat.com>
2247
2248         * doc/TODO: Add item about need to remove deprecated functions.
2249
2250         * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
2251
2252         * dbus/dbus-connection.c (dbus_connection_disconnect): New function
2253         to repair the ABI which was broken with the last commit.
2254
2255 2005-06-02  John (J5) Palmieri <johnp@redhat.com>
2256
2257         *  dbus/dbus-connection.c, dbus/dbus-connection.h 
2258         (dbus_connection_disconnect): renamed to dbus_connection_close 
2259         for API symmetry with dbus_connection_open
2260         (_dbus_connection_open_internal): 
2261         s/dbus_connection_disconnect/dbus_connection_close
2262
2263         * dbus/dbus-bus.c (dbus_bus_get):
2264         s/dbus_connection_disconnect/dbus_connection_close
2265
2266         * bus/connection.c (bus_connections_unref, 
2267         bus_connections_setup_connection, bus_connections_expire_incomplete):
2268         s/dbus_connection_disconnect/dbus_connection_close
2269
2270         * bus/dispatch.c (bus_dispatch, kill_client_connection, 
2271         kill_client_connection_unchecked, check_hello_connection):
2272         s/dbus_connection_disconnect/dbus_connection_close
2273
2274         * bus/bus.c (new_connection_callback):
2275         s/dbus_connection_disconnect/dbus_connection_close
2276
2277         * tools/dbus-send.c (main):
2278         s/dbus_connection_disconnect/dbus_connection_close
2279
2280         * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
2281         s/dbus_connection_disconnect/dbus_connection_close
2282         
2283         * test/test-service.c (path_message_func, filter_func):
2284         s/dbus_connection_disconnect/dbus_connection_close
2285         
2286         * doc/TODO: remove connection_open/connection_disconnect lacks symmetry         item that was just fixed
2287         
2288 2005-05-25  Colin Walters  <walters@verbum.org>
2289
2290         * dbus/dbus-protocol.h: Move various bus service #defines such
2291           as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
2292           dbus/dbus-shared.h.
2293         * dbus/dbus-shared.h: Various defines moved here.
2294         * dbus/dbus-marshal-header.c: Include dbus-shared.h.
2295
2296 2005-05-25  John (J5) Palmieri  <johnp@redhat.com>
2297
2298         * python/__init__.py: Python bindings deserve a minor version
2299         update.  Upped to (0, 40, 2)
2300
2301 2005-05-24  John (J5) Palmieri  <johnp@redhat.com>
2302
2303         * python/decorators.py: add explicitly_pass_message decorator
2304         for passing in the dbus message as keyword for edge case signal
2305         handling
2306
2307         * python/matchrules.py (SignalMatchRule.__repr__): fix output
2308         to conform with what dbus expects for match rules
2309         (SignalMatchRule.execute): add the dbus message as a keyword
2310         if the signal handler has requested it
2311
2312         * python/examples/example/signal-recipient.py: added some more
2313         examples on how to hook up to signals
2314
2315 2005-05-23  John (J5) Palmieri  <johnp@redhat.com>
2316
2317         * python/decorators.py: import dbus_bindings
2318
2319         * python/matchrules.py (SignalMatchRule, SignalMatchTree, 
2320         SignalMatchNode): new classes that implement wildcard signal
2321         callback matching using a tree lookup. Heavily modified from a
2322         patch sent by Celso Pinto (fd.o bug #3241)
2323
2324         * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
2325         use new match classes to handle signals.
2326
2327 2005-05-19  John (J5) Palmieri  <johnp@redhat.com>
2328         
2329         * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
2330
2331 2005-05-18  Havoc Pennington  <hp@redhat.com>
2332
2333         * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
2334         gettext. Not really worth requiring yet perhaps, but any
2335         production quality 1.0 would require it so we should go ahead and
2336         get things set up. We do have a couple token calls to
2337         bindtextdomain in the code already.
2338
2339 2005-05-16  John (J5) Palmieri  <johnp@redhat.com>
2340
2341         * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
2342         when using recursive g_main_loops
2343
2344         * python/_dbus.py (class Bus): add the ProxyObjectClass
2345         alias for ProxyObject to make it easier for the Twisted 
2346         networking framework to integrate dbus.
2347
2348         * python/proxies.py (class ProxyObject): add the ProxyMethodClass
2349         alias for ProxyMethod to make it easier for the Twisted 
2350         networking framework to integrate dbus. 
2351
2352 2005-05-11  Ross Burton  <ross@openedhand.com>
2353
2354         * glib/dbus-glib-tool.c: Add --prefix argument.
2355         * glib/dbus-binding-tool-glib.h: Add prefix argument.
2356         * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
2357         Add prefix argument.
2358         (generate_glue): Pass prefix argument down.
2359         (dbus_binding_tool_output_glib_server): Pass prefix to
2360         glib-genmarshal.
2361         
2362 2005-05-11  Colin Walters  <walters@verbum.org>
2363
2364         * tools/dbus-send.c (append_array): New function.
2365         (append_arg): Broken out from main.
2366         (main): Add cheesy hack to send arrays and variants.
2367         (usage): Update.
2368         * tools/dbus-print-message.c (print_iter): Broken out
2369         from main.
2370
2371 2005-05-11  Colin Walters  <walters@verbum.org>
2372
2373         * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
2374         New function, returns signature string for signature iter.
2375         * dbus/dbus-signature.h: Prototype it.
2376         * dbus/dbus-message.c (dbus_message_iter_get_signature):
2377         New function, returns signature string for message iter.
2378         (dbus_message_iter_get_array_len): New function, returns
2379         length of array.
2380         (dbus_message_iter_get_fixed_array): Fix assertion; this
2381         function should be used when the iter is pointing to the
2382         contents of an array
2383         * dbus/dbus-message.h: Prototypes.
2384         * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
2385         New function; returns length of an array.
2386         * dbus/dbus-marshal-recursive.h: Prototype it.
2387         
2388 2005-05-11  Colin Walters  <walters@verbum.org>
2389
2390         * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
2391         compilation error.
2392         
2393 2005-05-08  Havoc Pennington  <hp@redhat.com>
2394
2395         * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
2396         daemon's pid, not the parent's pid, to the file descriptor.
2397         Reported by Taj Morton.
2398
2399 2005-05-05  Havoc Pennington  <hp@redhat.com>
2400
2401         * configure.in (LT_*): add notes on how the libtool versioning
2402         works to save thinking. Increment soname to indicate protocol
2403         breakage (though really the library interface hasn't changed I
2404         guess)
2405
2406         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
2407         verify the GUID received from server matches what we were
2408         expecting, if we had an expectation
2409
2410         * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
2411         (_dbus_auth_get_guid_from_server): new function
2412         (send_begin): parse the OK args
2413
2414         * doc/dbus-specification.xml: add GUID to the auth protocol
2415
2416 2005-05-05  John (J5) Palmieri  <johnp@redhat.com>
2417
2418         * Fix my name in previous changelog ;)
2419
2420         * python/proxies.py (ProxyObject.__getattr__): add further patch
2421         from Anthony Baxter to throw an AttributeError when python 
2422         __special__ functions are called instead of marshling them over 
2423         the bus (Bug#1685 comment 3).
2424
2425 2005-05-04  John (J5) Palmieri  <johnp@redhat.com>
2426
2427         * python/Makefile.am: changed to use pyexecdir for the binding
2428         shared libraries (Bug#2494)
2429
2430         * python/exceptions.py: bring exceptions over from the bindings
2431         so they can be used in applications (Bug#2036)
2432         Make all exceptions derive from DBusException
2433
2434         * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
2435         of classes so that print obj doesn't throw an exception (Bug #1685)
2436
2437 2005-05-03  Ross Burton  <ross@openedhand.com>
2438
2439         * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
2440         Return if we get an error during registration.  Set up a
2441         weak reference on object to unregister if object is destroyed.
2442         (unregister_gobject): New function.
2443         
2444 2005-05-01  John (J5) Palmieri  <johnp@redhat.com>
2445
2446         * python/dbus_bindings.pyx.in: 
2447         - added new type classes for hinting to the marashaler what type 
2448         to send over the wire
2449         - added int16 and uint16 marshalers
2450         - Fixed a bug in the type constants that caused int32 to go out
2451         as uint16 over the wire
2452         * python/dbus.py: split up into different files and renamed _dbus.py
2453         * python/__init__.py, python/_util.py, python/decorators.py, 
2454         python/exceptions.py, python/proxies.py, python/services.py,
2455         python/types.py: new files split off from dbus.py
2456         * python/Makefile.am: Add new files, remove dbus.py and 
2457         install all python files to <python module dir>/dbus
2458         * python/examples/*: Added #!/usr/bin/env python to the top of
2459         every example.  Patch provided by Tatavarty Kalyan
2460
2461 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2462
2463         * NEWS: Update to 0.33
2464
2465 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2466
2467         * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
2468         method for doing async calls
2469         (_pending_call_notification): New C function for handling pendning call
2470         callbacks
2471         (set_notify): New method for setting pending call notification
2472         
2473         * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
2474         Async capabilities added to remote method calls
2475         (Sender): class removed
2476         (RemoteService): class removed
2477         (ObjectTree): class removed for now
2478         (RemoteObject): Renamed to ProxyObject
2479         (RemoteMethod): Renamed to ProxyMethod
2480         (method): Decorator added for decorating python methods as dbus methods
2481         (signal): Decorator added for decorating python methods as signal emitters
2482         (ObjectType): Metaclass added for generating introspection data and the
2483         method callback vtable
2484         (Interface): Wrapper class added to wrap objects in a dbus interface
2485         (Object): Uses ObjectType as its metaclass and exports Introspect
2486         of the org.freedesktop.DBus.Introspectable interface
2487         (ValidationException, UnknownMethodException): new exceptions
2488
2489         * python/examples/*: Modified to fit with the new bindings
2490
2491 2005-04-23  Havoc Pennington  <hp@redhat.com>
2492
2493         * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
2494         reported by Tony Houghton
2495
2496         * test/test-service.c (main): test
2497         dbus_connection_get_object_path_data()
2498
2499         * dbus/dbus-object-tree.c (find_handler): be sure we always init
2500         the exact_match
2501         (_dbus_object_tree_get_user_data_unlocked): new function used by
2502         dbus_connection_get_object_path_data()
2503         (do_register): add assertion test for get_user_data_unlocked
2504         (object_tree_test_iteration): more tests
2505
2506         * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
2507         new function from Dan Reed to let you get the user data from 
2508         dbus_connection_register_object_path()
2509
2510 2005-04-23  John (J5) Palmieri  <johnp@redhat.com>
2511
2512         * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
2513         in numerous places that did not account for the NULL terminator
2514         (signature_from_seed): changed the manual string copy loop to 
2515         just use strcpy instead
2516         make check should now pass
2517
2518 2005-04-19  John (J5) Palmieri  <johnp@redhat.com>
2519
2520         * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
2521         so that it allows messages that are not signals to pass in 
2522         NULL as the interface.
2523
2524 2005-04-18  David Zeuthen  <davidz@redhat.com>
2525
2526         * glib/dbus-gmain.c (io_handler_destroy_source): 
2527         (timeout_handler_destroy_source, connection_setup_free): 
2528         Also unref the source to avoid memory leaks.
2529
2530 2005-04-13  David Zeuthen  <davidz@redhat.com>
2531
2532         * bus/config-parser.c (bus_config_parser_new): Bump this to a
2533         more reasonable, yet still totally arbitrary, value :-). 
2534
2535 2005-04-13  David Zeuthen  <davidz@redhat.com>
2536
2537         * doc/TODO: Added an "important for 1.0" item about selinux
2538         allow/deny messages
2539
2540 2005-04-13  David Zeuthen  <davidz@redhat.com>
2541
2542         * bus/selinux.c: Add c-file-style to top of file
2543         (log_audit_callback): Don't free the data here anymore
2544         (bus_selinux_check): Don't take spid and tpid since appending
2545         that to auxdata may OOM.
2546         (bus_selinux_allows_acquire_service): Handle OOM and signal back
2547         to the caller if we are OOM by taking an error object.
2548         (bus_selinux_allows_send): -do-
2549
2550         * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
2551         and bus_selinux_allows_send
2552
2553         * bus/bus.c (bus_context_check_security_policy): Pass error and
2554         pass on OOM thrown by bus_selinux_allows_send()
2555
2556         * bus/services.c (bus_registry_acquire_service): Pass error and
2557         pass on OOM thrown by bus_selinux_allows_acquire_service()
2558
2559 2005-04-13  Havoc Pennington  <hp@redhat.com>
2560
2561         * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
2562         message at a time to avoid monopolizing the main loop, bug 
2563         #2953 from Benjamin Otte
2564
2565 2005-04-09  Havoc Pennington  <hp@redhat.com>
2566
2567         * dbus/dbus-string.c (copy): change a memcpy to memmove due to
2568         possible overlap, fix from Daniel Reed
2569         (fixup_alignment): fix signedness warnings
2570         (_dbus_string_append_unichar): ditto
2571
2572 2005-04-09  Havoc Pennington  <hp@redhat.com>
2573
2574         * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
2575
2576         * glib/dbus-glib-tool.c (main): fix warning
2577
2578         * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
2579
2580         * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
2581         add a new function that can be used in simple applications that
2582         don't have a main loop and are willing to block
2583
2584 2005-04-05  David Zeuthen  <davidz@redhat.com>
2585
2586         Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
2587
2588         * glib/dbus-gmain.c:
2589         (io_handler_destroy_source): Remove from list of IO handlers
2590         of the ConnectionSetup object
2591         (timeout_handler_destroy_source): -do- for timeout handlers
2592         (io_handler_source_finalized): Don't remove from list since
2593         we now do that in io_handler_destroy_source(). Renamed from
2594         io_handler_source_destroyed
2595         (timeout_handler_source_destroyed): -do- for timeout handlers
2596         (connection_setup_free): It is now safe to iterate over all
2597         IO and timeout handlers as the _destroy_source removes them
2598         from the list synchronously
2599
2600 2005-03-30  Havoc Pennington  <hp@redhat.com>
2601
2602         * configure.in: change check to gtk 2.4
2603
2604         * tools/dbus-viewer.c (name_combo_changed_callback): remove
2605         gtk_combo_box_get_active_text() usage to decrement GTK requirement
2606         to 2.4
2607
2608 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2609
2610         * News: Update 0.32
2611
2612         * HACKING: Fixed realease instructions.  configure.in should be updated to
2613           the next release by the person who made the last release.
2614
2615 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2616
2617         * python/lvalue_cast_post_process.py - removed.  Patch has been
2618           submitted to Pyrex maintainers that fixes gcc4.0 errors
2619
2620         * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
2621
2622 2005-03-24  Daniel Reed  <n@ml.org>
2623
2624         * tools/Makefile.am: Make print-introspect and
2625         dbus-bus-introspect.xml building conditional on HAVE_GLIB.
2626
2627 2005-03-22  John (J5) Palmieri  <johnp@redhat.com>
2628
2629         * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
2630
2631         * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have 
2632           had in Red Hat packages for a while but for some reason never 
2633           got merged upstream
2634           (_dbus_is_a_number): New checks if a string
2635           can be converted to a number and does the conversion if it can
2636           (_dbus_user_database_lookup): Add check to see if the given username
2637           is a udi.  This allows udi's to be used instead of usernames in the
2638           config file.
2639           (_dbus_user_database_lookup_group): Add check to see if the given groupname
2640           is a gdi.  This allows gdi's to be used instead of groupnames in the
2641           config file.
2642
2643 2005-03-21  John (J5) Palmieri  <johnp@redhat.com>
2644
2645         * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
2646           code so that it compiles with gcc4.0
2647
2648         * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
2649           run dbus_bindings.c through lvalue_cast_post_process.py and copy the
2650           results back to dbus_binding.c
2651
2652 2005-03-20  Colin Walters  <walters@verbum.org>
2653
2654         Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
2655
2656         * configure.in: Require GTK+ 2.6.
2657         
2658 2005-03-20  Colin Walters  <walters@verbum.org>
2659
2660         * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
2661
2662 2005-03-17  Tom Parker  <palfrey@tevp.net>
2663
2664         * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
2665         print DBUS_UID_UNSET; instead print passed username.  Also
2666         be sure to actually use gid looked up in cache.
2667         
2668         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
2669         for DBUS_GID_UNSET and groupname.
2670
2671 2005-03-17  Colin Walters  <walters@verbum.org>
2672
2673         * bus/print-introspect.c: Move to tools/.
2674         * bus/run-with-tmp-session-bus.sh: Ditto.
2675         
2676         * glib/Makefile.am (dbus-glib-bindings.h): Move
2677         generation to tools/Makefile.am.
2678
2679         * test/glib/run-test.sh: Update to handle move
2680         of run-with-tmp-session-bus.sh.
2681
2682         * test/glib/test-service-glib.c: Update to handle
2683         move of dbus-glib-bindings.h.
2684
2685         * tools/print-introspect.c: Moved here
2686         from bus/, and ported to GLib bindings.
2687
2688         * tools/run-with-tmp-session-bus.sh: Moved here
2689         from bus/.
2690
2691         * tools/Makefile.am: Generate dbus-glib-bindings.h
2692         and dbus-bus-introspect.xml here.
2693
2694         * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
2695         Update.
2696
2697 2005-03-17  Colin Walters  <walters@verbum.org>
2698
2699         * bus/driver.c (write_args_for_direction): Use
2700         _dbus_string_get_const_data to retrieve string;
2701         _dbus_string_get_const_data_len doesn't actually return
2702         a NULL-terminated substring.
2703
2704         * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
2705         (main): Change to use org_freedesktop_DBus_request_name
2706         instead of using g_proxy_begin_call/end_call.
2707
2708 2005-03-15  Joe Shaw  <joeshaw@novell.com>
2709
2710         * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
2711         generating the finalizer.  Fixes from Ben Maurer.
2712
2713 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2714
2715         * mono/BusDriver.cs: Update method names: ListServices
2716         becomes ListNames; GetOwner becomes GetNameOwner.
2717
2718         * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
2719         onto the eval stack when removing the delegate.
2720
2721 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2722
2723         * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
2724         LT_CURRENT.  Set it to the autoconf variable.
2725                                                                                 
2726         * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
2727         classes that disconnects the signal handler delegate from the
2728         service object.  Fixes a big leak of proxy objects on the
2729         client side of things.  Patch from Ben Maurer
2730         <bmaurer@ximian.com>
2731
2732 2005-03-12  Colin Walters  <walters@verbum.org>
2733
2734         * bus/driver.c (write_args_for_direction): New function,
2735         parses a type signature into arguments and outputs to
2736         XML.
2737         (bus_driver_handle_introspect): Use it instead of
2738         hardcoding XML for certain signatures.
2739         
2740         * bus/Makefile.am (dbus-bus-introspect.xml): Add
2741         dependency on dbus-daemon.
2742
2743         * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
2744         argument, pass it to dbus_binding_tool_output_glib_client.
2745
2746         * glib/dbus-binding-tool-glib.c
2747         (generate_client_glue): Protect against multiple inclusion.
2748         (dbus_binding_tool_output_glib_client): Add
2749         G_BEGIN_DECLS/G_END_DECLS.
2750
2751         * glib/dbus-binding-tool-glib.c (compute_client_method_name):
2752         Change to just take iface prefix directly.
2753         (write_formal_parameters): Clarify error message.
2754         (check_supported_parameters): New function; checks to see type
2755         signatures of method parameters are supported.
2756         (generate_client_glue): Handle ignore_unsupported flag.
2757         (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
2758         parameter.
2759
2760         * glib/Makefile.am (dbus-glib-bindings.h): Pass
2761         --ignore-unsupported by default until glib bindings
2762         support arrays.
2763
2764 2005-03-11  Colin Walters  <walters@verbum.org>
2765
2766         * glib/Makefile.am: Generate dbus-glib-bindings.h and
2767         install it.
2768
2769         * bus/print-introspect.c: New file; prints introspection
2770         data for a given name and object path.
2771
2772         * bus/run-with-tmp-session-bus.sh: New file, refactored
2773         from test/glib/run-test.sh.  Creates a temporary session
2774         bus and runs another program.
2775
2776         * test/glib/run-test.sh: Refactor to invoke
2777         run-with-tmp-session-bus.sh.
2778
2779         * bus/driver.c (bus_driver_handle_introspect): Fix to print new
2780         introspection format.  Also change to use DBUS_TYPE_x_AS_STRING
2781         macros instead of hardcoding.
2782
2783         * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
2784
2785 2005-03-11  Joe Shaw  <joeshaw@novell.com>
2786
2787         * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
2788         this unref; it doesn't match up evenly in some codepaths.
2789         (_dbus_connection_block_pending_call): Unref at every exitpoint;
2790         this evenly matches with the ref near the top of this function.
2791
2792 2005-03-09  Joe Shaw  <joeshaw@novell.com>
2793
2794         * dbus/dbus-object-tree.c
2795         (_dbus_object_tree_unregister_and_unlock): If checks are enabled
2796         and we try to unregister a path that's not registered, still go
2797         through the process of unlocking and don't just return.
2798
2799 2005-03-09  Colin Walters  <walters@verbum.org>
2800
2801         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
2802         to this are generated for client-side wrappers.  Invokes a
2803         D-BUS method and returns reply values.  
2804
2805         * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
2806         function; writes signature string for argument direction.
2807         (write_args_for_direction): Change to pass input values directly
2808         instead of via address, and fix indentation.
2809         (generate_client_glue): Change to invoke dbus_g_proxy_invoke.  Also
2810         make generated wrappers inlineable.
2811
2812         * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
2813         note about using dbus_type_is_fixed.
2814
2815         * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
2816         dbus/dbus-signature.c as dbus_type_is_fixed.
2817
2818         All callers updated.
2819
2820         * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
2821         from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
2822
2823         * dbus/dbus-signature.h: Prototype.
2824
2825         * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
2826         error printf code.
2827
2828         * test/glib/test-dbus-glib.c (main): Be sure to clear error as
2829         appropriate instead of just freeing it.
2830         (main): Free returned strings using g_free.
2831
2832         * test/glib/Makefile.am (test-service-glib-glue.h)
2833         (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
2834
2835         * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
2836         simply maps a simple D-BUS type to GType.
2837         (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
2838         GType.
2839         (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
2840         initialize the value with it.
2841         (dbus_gvalue_binding_type_from_type): Unused, delete.
2842         (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
2843         various types instead of unmarshalling to value data directly.
2844         Remove can_convert boolean.
2845         (dbus_gvalue_marshal): Remove duplicate initialization; switch to
2846         returning directly instead of using can_convert boolean.
2847         (dbus_gvalue_store): New function; not related to D-BUS per-se.
2848         Stores a GValue in a pointer to a value of its corresponding C
2849         type.
2850
2851         * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
2852         add dbus_gvalue_store.
2853
2854 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2855
2856         Fix a bunch of lifecycle and memory management problems
2857         in the mono bindings.
2858
2859         * mono/Arguments.cs (Arguments): Implement IDisposable
2860
2861         * mono/Bus.cs (Bus): Don't allow public instantiation.  This is
2862         strictly a static class.
2863
2864         * mono/Connection.cs: Move the DBusObjectPathVTable and associated
2865         delegates into this file.
2866         (Connection): Implement IDisposable.
2867         (Dispose): Disconnect the connection and set the raw connection
2868         pointer to IntPtr.Zero.
2869         (~Connection): Call Dispose().
2870         (RegisterObjectPath): Added.  Manages the registration of object
2871         paths so we can cleanly disconnect them at dispose/finalize time.
2872         (UnregisterObjectPath): Ditto.
2873         (set_RawConnection): Unregister all of the object paths when
2874         changing the underlying DBusConnection.  Add them back onto the
2875         new connection, if any.
2876
2877         * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
2878         more unmanaged resources anymore, so it's not necessary.  Move all
2879         the DBusObjectPathVTable stuff out of here.
2880         (Handler): Save references to our delegates so that they don't get
2881         finalized.  Call Connection.RegisterObjectPath() instead of
2882         dbus_connection_register_object_path() directly.
2883         (Message_Called): Dispose the message after we're finished with
2884         it.
2885
2886         * mono/Message.cs (Message): Implement IDisposable.
2887         (Dispose): Dispose the Arguments, and set the RawMessage to
2888         IntPtr.Zero.
2889         (SendWithReplyAndBlock): We own the ref to the reply that comes
2890         back from dbus_connection_send_with_reply_and_block() so add a
2891         comment about that and unref it after we've constructed a managed
2892         MethodReturn class around it.  Fixes a big, big leak.
2893
2894         * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
2895         method.
2896         (BuildSignalHandler): After we've sent the Signal message, dispose
2897         of it.
2898         (BuildMethod): Dispose of the method call and reply messages after
2899         we've sent the message and extracted the data we want from the
2900         reply.
2901
2902         * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
2903         anymore.
2904         (Service_FilterCalled): Dispose of the message after we're
2905         finished with it.
2906
2907 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2908
2909         * dbus/dbus-connection.c (dbus_connection_send_with_reply):
2910         After we attach our pending call to the connection, unref
2911         it.  Fixes a leak.
2912  
2913         * mono/Connection.cs (set_RawConnection): Disconnect our
2914         filter and match callbacks from the old connection and
2915         reconnect them to the new connection, if any.
2916
2917         * mono/DBusType/Array.cs: "Code" is a static member, so
2918         don't use "this" to refer to it.  Fix for stricter checking
2919         in Mono 1.1.4.
2920  
2921         * mono/DBusType/ObjectPath.cs (Append): Don't leak the
2922         object path that we pass into unmanaged code.
2923  
2924         * mono/DBusType/String.cs (Append): Don't leak the string
2925         that we pass into unmanged code.
2926
2927 2005-03-07  John (J5) Palmieri  <johnp@redhat.com>
2928         * NEWS: Update for 0.31
2929
2930         * configure.in: Release 0.31
2931         add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
2932
2933         * qt/Makefile.am: fixed build
2934
2935         * dbus/Makefile.am: soname bump for libdbus
2936
2937         * glib/Makefile.am: soname bump for libdbus-glib
2938
2939 2005-03-05  Havoc Pennington  <hp@redhat.com>
2940
2941         * dbus/dbus-sysdeps.c:
2942         (pseudorandom_generate_random_bytes_buffer): fix to have no return
2943         value
2944         (_dbus_generate_random_bytes_buffer): fix return value
2945
2946         * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
2947         checks actually work, from Tom Parker <fdo@tevp.net>
2948
2949 2005-03-01  Colin Walters  <walters@verbum.org>
2950
2951         * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
2952         functions copied from dbus-glib-tool.c.
2953         (main): Convert lots of error code to use them.
2954         Also add some testing for introspection bits.
2955
2956 2005-03-01  Colin Walters  <walters@verbum.org>
2957         
2958         * doc/TODO: Remove introspection signature TODO.
2959
2960 2005-02-27  Colin Walters  <walters@verbum.org>
2961
2962         * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
2963         Change return value to const char * instead of int so we can do
2964         full signatures.
2965         (struct PropertyInfo, struct ArgInfo): Store char *.
2966         (property_info_new, arg_info_new): Update parameters, strdup.
2967         (property_info_unref, arg_info_unref): Free.
2968
2969         * glib/dbus-gidl.h: Update prototypes.
2970
2971         * glib/dbus-gparser.c (basic_type_from_string): Delete.
2972         (validate_signature): New function, just validates signature and
2973         sets GError.
2974         (parse_property, parse_arg): Invoke validate_signature.  Store
2975         signature instead of just type code.
2976
2977         * glib/dbus-gvalue.c (base_type_from_signature): New utility
2978         function to return a primary type for a signature, dropping
2979         information about types in container types.
2980         (dbus_gvalue_genmarshal_name_from_type)
2981         (dbus_gvalue_binding_type_from_type)
2982         (dbus_gvalue_ctype_from_type): Update to take full signature
2983          instead of type code.
2984         (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
2985
2986         * glib/dbus-gvalue.h: Update prototypes for above.
2987
2988         * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
2989         glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
2990         (introspect_properties, introspect_signals, write_interface):
2991         Update to handle signatures, and remove usage of
2992         _dbus_gutils_type_to_string.
2993         (handle_introspect): Print out type codes instead of e.g. "string"
2994         in hardcoded introspection XML; also use x_AS_STRING constants
2995         instead of hardcoding in string.
2996
2997         * glib/dbus-glib-tool.c (pretty_print): Handle signature change
2998         to string.  Remove usage of _dbus_gutils_type_to_string.
2999
3000         * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
3001
3002         * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
3003         deletion.
3004         
3005         * glib/dbus-binding-tool-glib.c (compute_marshaller)
3006         (compute_marshaller_name, generate_glue): Handle signature change
3007         to string.
3008         (write_formal_parameters, write_args_for_direction): Ditto, and
3009         remove FIXME.
3010
3011         * tools/dbus-tree-view.c (type_to_string): Delete.
3012         (info_set_func_text): Update to print full signatures.
3013
3014         * test/glib/test-service-glib.xml: Change types to new
3015         introspection format.
3016
3017 2005-02-26  Havoc Pennington  <hp@redhat.com>
3018
3019         * doc/TODO: remove the "guid" item
3020
3021         * test/glib/test-profile.c (no_bus_thread_func): use open_private
3022         (with_bus_thread_func): use open_private
3023
3024         * dbus/dbus-connection.c (dbus_connection_open_private): new
3025         function that works like the old dbus_connection_open()
3026         (dbus_connection_open): now returns an existing connection if
3027         possible
3028
3029         * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
3030         through the GUID to the transport
3031
3032         * dbus/dbus-server.c (_dbus_server_init_base): keep around the
3033         GUID in hex-encoded form.
3034
3035         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3036         pass GUID argument in to the transport
3037
3038         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
3039         guid argument
3040
3041         * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
3042
3043         * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
3044
3045 2005-02-25  Havoc Pennington  <hp@redhat.com>
3046
3047         * doc/dbus-specification.xml: document the GUID thing
3048
3049         * dbus/dbus-server.c (_dbus_server_init_base): initialize a
3050         globally unique ID for the server, and put a "guid=hexencoded"
3051         field in the address
3052
3053         * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
3054
3055         * dbus/dbus-message.c: ditto
3056
3057         * dbus/dbus-dataslot.c: ditto
3058
3059         * dbus/dbus-list.c: ditto
3060
3061         * dbus/dbus-internals.h: wait, just include
3062         dbus-threads-internal.h here
3063         
3064         * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
3065         use in main library
3066
3067         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
3068
3069 2005-02-24  Colin Walters  <walters@verbum.org>
3070
3071         * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
3072
3073 2005-02-24  John (J5) Palmieir  <johnp@redhat.com>
3074
3075         * glib/Makefile.am: added dbus-gobject.h to sources list
3076         so distcheck doesn't fail
3077         
3078 2005-02-24  Havoc Pennington  <hp@redhat.com>
3079
3080         * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
3081         you must disconnect before unref, since locking and other things
3082         are screwed up otherwise. Fix assorted other locking stuff.
3083
3084         * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
3085         fix compilation
3086
3087         * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
3088         into a private header and don't export from the library
3089
3090         * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
3091
3092 2005-02-24  Colin Walters  <walters@verbum.org>
3093         
3094         * dbus/dbus-signature.c: New file; implements various functions
3095         related to type signatures.  Includes an interator for parsing,
3096         validation functions.
3097         (dbus_type_is_basic): Moved here from
3098         dbus-marshal-basic.c:_dbus_type_is_basic.
3099         (dbus_type_is_container): Moved here from
3100         dbus-marshal-basic.c:_dbus_type_is_container.
3101
3102         All callers of _dbus_type_is_container and _dbus_type_is_basic
3103         updated, and include dbus-signature.h.
3104
3105         * dbus/dbus-signature.h: New file; prototypes for the above.
3106
3107         * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
3108         dbus-signature.h.
3109
3110         * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
3111         function factored out of _dbus_first_type_in_signature.
3112         (_dbus_first_type_in_signature_c_str): New function; returns first
3113         type code for a type signature character.
3114
3115         * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
3116         handle function moves.
3117
3118         * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
3119
3120         * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
3121         function; skips to next complete type in type signature.
3122         Implemented using previous skip_one_complete_type.  Now
3123         skip_one_complete_type just delegates to
3124         _dbus_type_signature_next.
3125
3126         * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
3127         to dbus-signature.c
3128         (_dbus_type_is_container): Ditto.
3129
3130         * doc/dbus-specification.xml: Update introspection sample to
3131         use real type signatures.
3132
3133         * dbus/dbus-test.h: Prototype signature test.
3134
3135         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
3136         signature tests.
3137
3138         * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
3139
3140 2005-02-23  John (J5) Palmieri  <johnp@redhat.com>
3141
3142         * python/dbus_bindings.pyx.in (PendingCall::get_reply):
3143         s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
3144
3145 2005-02-21  Colin Walters  <walters@verbum.org>
3146
3147         * dbus/dbus-test-main.c (main): Take optional specific test
3148         argument.
3149
3150         * dbus/dbus-test.c (run_test): New function, runs a test function
3151         with no data directory.
3152         (run_data_test): Like above, but takes data directory.
3153         (dbus_internal_do_not_use_run_tests): Take
3154         specific test argument.  Replace lots of cut n' paste code
3155         with run_test and run_data_test.
3156
3157         * dbus/dbus-test.h: Update prototype for
3158         dbus_internal_do_not_use_run_tests.
3159
3160 2005-02-20  Havoc Pennington  <hp@redhat.com>
3161
3162         Fix bugs reported by Daniel P. Berrange
3163         
3164         * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
3165         (protected_change_watch): new function
3166         (_dbus_server_toggle_watch, _dbus_server_remove_watch)
3167         (_dbus_server_add_watch): change to work like the
3168         dbus-connection.c equivalents; like those, probably kind of
3169         busted, but should at least mostly work for now
3170         (dbus_server_disconnect): drop the lock if we were already
3171         disconnected, patch from Daniel P. Berrange
3172
3173         * dbus/dbus-server.c (_dbus_server_toggle_timeout) 
3174         (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
3175         same stuff
3176
3177         * doc/TODO: todo about unscrewing this mess
3178
3179 2005-02-19  Colin Walters  <walters@verbum.org>
3180
3181         * glib/dbus-binding-tool-glib.c
3182         (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
3183
3184         * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
3185         as errno.h and sys/stat.h.
3186         (lose): New function, prints error with
3187         newline and exits.
3188         (lose_gerror): Similar, but takes GError for message.
3189         (main): Add --output argument to specify output file to write to,
3190         instead of always printing to stdout.  In this mode, determine
3191         timestamps on source files to see whether any are newer than the
3192         target file.  If not, exit.  Also convert a number of error
3193         messages to use lose (since it's shorter), and switch to using
3194         g_io_channel_shutdown.
3195
3196 2005-02-19  Havoc Pennington  <hp@redhat.com>
3197
3198         * glib/dbus-gobject.c
3199         (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
3200
3201         * glib/dbus-glib.c: fix doxygen warnings
3202
3203         * glib/dbus-gparser.c (parse_annotation): error if an annotation
3204         is found on an <arg>
3205
3206 2005-02-17  Colin Walters  <walters@verbum.org>
3207
3208         * glib/dbus-gobject.h: Don't export
3209         _dbus_glib_marshal_dbus_message_to_gvalue_array.
3210         
3211         * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
3212         (invoke_object_method): Handle it.
3213
3214         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
3215         Handle rename.
3216         
3217 2005-02-17  Colin Walters  <walters@verbum.org>
3218
3219         * bus/.cvsignore, doc/.cvsignore
3220         * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
3221         Update.
3222
3223 2005-02-17  Colin Walters  <walters@verbum.org>
3224         
3225         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
3226         Rename to DBUS_SERVICE_DBUS.
3227         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
3228         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
3229         Change the value from "org.freedesktop.Local"
3230         to "org.freedesktop.DBus.Local".
3231         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
3232         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
3233         DBUS_INTERFACE_INTROSPECTABLE.
3234         Change the value from "org.freedesktop.Introspectable"
3235         to "org.freedesktop.DBus.Introspectable".
3236         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
3237         DBUS_INTERFACE_PROPERTIES.
3238         Change the value from "org.freedesktop.Properties"
3239         to "org.freedesktop.DBus.Properties".
3240         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
3241         DBUS_INTERFACE_PEER.
3242         Change the value from "org.freedesktop.Peer"
3243         to "org.freedesktop.DBus.Peer".
3244         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
3245         DBUS_INTERFACE_LOCAL.
3246         Change the value from "org.freedesktop.Local"
3247         to "org.freedesktop.DBus.Local".
3248
3249         All other users of those constants have been changed.
3250
3251         * bus/driver.c (bus_driver_handle_introspect): Use constants.
3252
3253         * glib/dbus-gobject.c (handle_introspect): Use constants.
3254
3255         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
3256
3257 2005-02-17  Colin Walters  <walters@verbum.org>
3258
3259         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
3260         (parse_node, parse_interface, parse_method, parse_signal)
3261         (parse_property, parse_annotation): Lose if we're currently in an
3262         annotation.
3263         (parse_annotation): New function.
3264         (parser_start_element, parser_end_element): Handle annotation.
3265         (parse_method, parse_interface): Remove support for c_name attribute,
3266         switch to annotations.
3267
3268         * glib/dbus-gidl.h (interface_info_get_binding_names)
3269         (method_info_get_binding_names)
3270         (interface_info_get_binding_name, method_info_get_binding_name)
3271         (interface_info_set_binding_name, method_info_set_binding_name):
3272         Remove.
3273         (interface_info_get_annotations, method_info_get_annotations)
3274         (interface_info_get_annotation, method_info_get_annotation)
3275         (interface_info_add_annotation, method_info_add_annotation):
3276         Prototype.
3277
3278         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
3279         for "bindings".
3280         (struct MethodInfo): Ditto.
3281         Straightfoward conversion of binding methods into annotation methods
3282         as prototyped.
3283
3284         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
3285
3286         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
3287
3288         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
3289         Use new annotation API.
3290
3291         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
3292         annotation element.
3293         
3294         * doc/dbus-specification.xml: Discuss introspection annotations,
3295         include list of well-known annotations.
3296
3297         * test/glib/test-service-glib.xml: Make validate against new DTD.
3298
3299 2005-02-17  Colin Walters  <walters@verbum.org>
3300
3301         This patch is based on initial work from
3302         Paul Kuliniewicz <kuliniew@purdue.edu>.
3303
3304         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
3305         initialization of GValue from dbus type to here.
3306         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
3307         for the "glib-genmarshal" program from a DBus type.
3308         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
3309         into the C name for it we use in the glib bindings.
3310         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
3311         glib C type (not GValue).
3312         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
3313
3314         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
3315         from dbus-gobject.c.
3316
3317         * glib/dbus-gutils.h: Prototype it.
3318
3319         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
3320         (marshal_dbus_message_to_g_marshaller): Use new shared function
3321         dbus_glib_marshal_dbus_message_to_gvalue_array.
3322
3323         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
3324         Will be changed once we have annotations.
3325
3326         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
3327         GStaticRWLock.  Callers updated.
3328         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
3329         (string_table_next): New function for iterating over zero-terminated
3330         string value array.
3331         (string_table_lookup): New function; retrieves specific entry in
3332         array.
3333         (get_method_data): New function; look up method data in object data chunk.
3334         (object_error_domain_prefix_from_object_info)
3335         (object_error_code_from_object_info): New functions, but not implemented yet.
3336         (method_interface_from_object_info): New function; retrieve interface name.
3337         (method_name_from_object_info): New function; retrieve method name.
3338         (method_arg_info_from_object_info): New function; retrieve argument data.
3339         (arg_iterate): New function; iterates over serialized argument data.
3340         (method_dir_signature_from_object_info): New function; returns a
3341         GString holding type signature for arguments for just one
3342         direction (input or output).
3343         (method_input_signature_from_object_info)
3344         (method_output_signature_from_object_info): New functions.
3345         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
3346         converts dbus message arguments into a GValue array.  Used for both
3347         signal handling and method invocation.
3348         (struct DBusGlibWriteIterfaceData): New utility structure.
3349         (write_interface): New function; generate introspection XML for
3350         an interface.
3351         (introspect_interfaces): New function; gathers all interface->methods,
3352         generates introspection XML for them.
3353         (handle_introspect): Invoke introspect_interfaces.
3354         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
3355         (lookup_object_and_method): New function; examines an incoming message
3356         and attempts to match it up (via interface, method name, and argument
3357         signature) with a known object and method.
3358         (gerror_domaincode_to_dbus_error_name): New function; converts a
3359         GError domain and code into a DBus error name.  Needs GError data
3360         added to object introspection to work well.
3361         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
3362         GError.
3363         (invoke_object_method): New function to invoke an object method
3364         looked up via lookup_object_and_method.  Parses the incoming
3365         message, turns it into a GValue array, then invokes the marshaller
3366         specified in the DBusGMethodInfo.  Creates a new message with
3367         either return values or error message as appropriate.
3368         (gobject_message_function): Invoke lookup_object_and_method and
3369         invoke_object_method.
3370
3371         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
3372         (enum DBusBindingOutputMode): New enum for binding output modes.
3373         (pretty_print): Print binding names.
3374         (dbus_binding_tool_error_quark): GError bits.
3375         (version): Fix typo.
3376         (main): Create GIOChannel for output.  Parse new --mode argument,
3377         possible values are "pretty-print", "glib-server", "glib-client".
3378         Use mode to invoke appropriate function.
3379         
3380         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
3381
3382         * glib/dbus-glib-tool.h: New header, just includes GError bits
3383         for now.
3384
3385         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
3386         maps binding style to name.
3387         (struct MethodInfo): Ditto.
3388         (get_hash_keys, get_hash_key): Utility function, returns keys for
3389         a GHashTable.
3390         (interface_info_new, method_info_new): Initialize bindings.
3391         (interface_info_unref, method_info_unref): Destroy bindings.
3392         (method_info_get_binding_names, method_info_get_binding_name)
3393         (interface_info_get_binding_names, interface_info_get_binding_name):
3394         Functions for retrieving binding names.
3395         (method_info_set_binding_name, interface_info_set_binding_name):
3396         Functions for setting binding names.
3397
3398         * glib/dbus-binding-tool-glib.h: New file, has prototypes
3399         for glib binding generation.
3400
3401         * glib/dbus-binding-tool-glib.c: New file, implements server-side
3402         and client-side glib glue generation.
3403
3404         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
3405         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
3406         dbus-glib-tool.h.
3407
3408         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
3409         of using GClosureMarshal directly.
3410         (struct DBusGObjectInfo): Add n_infos member.
3411
3412         * test/glib/test-service-glib.xml: New file; contains introspection data
3413         for MyTestObject used in test-service-glib.c.
3414
3415         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
3416         (my_object_do_nothing, my_object_increment, my_object_throw_error)
3417         (my_object_uppercase, my_object_many_args): New test methods.
3418         (main): Use dbus_g_object_class_install_info to include generated object
3419         info.
3420
3421         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
3422         as well as client-side bindings.
3423
3424         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
3425         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
3426         using both the dbus_gproxy stuff directly as well as the generated bindings.
3427
3428 2005-02-15  Havoc Pennington  <hp@redhat.com>
3429
3430         * dbus/dbus-connection.c (dbus_connection_dispatch): always
3431         complete a pending call, don't run filters first.
3432
3433         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
3434         dbus_pending_call_steal_reply
3435
3436         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
3437         _dbus_connection_block_pending_call
3438         (dbus_pending_call_get_reply): change to steal_reply and return a
3439         ref
3440
3441         * dbus/dbus-connection.c
3442         (dbus_connection_send_with_reply_and_block): port to work in terms
3443         of DBusPendingCall
3444         (_dbus_connection_block_pending_call): replace block_for_reply
3445         with this
3446
3447 2005-02-14  Havoc Pennington  <hp@redhat.com>
3448
3449         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
3450         properly handle looking up group information by name; fix 
3451         from j@bootlab.org
3452
3453 2005-02-13  Havoc Pennington  <hp@redhat.com>
3454
3455         * dbus/dbus-connection.c (dbus_connection_return_message) 
3456         (dbus_connection_borrow_message): hold dispatch lock while message
3457         is outstanding
3458         (_dbus_connection_block_for_reply): hold dispatch lock while we
3459         block for the reply, so nobody steals our reply
3460         (dbus_connection_pop_message): hold the dispatch lock while we
3461         pluck the message
3462
3463 2005-02-13  Havoc Pennington  <hp@redhat.com>
3464
3465         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
3466         (_dbus_connection_release_dispatch)
3467         (_dbus_connection_acquire_io_path)
3468         (_dbus_connection_release_io_path): make the mutex and condvar
3469         control access to the "acquired" flag. Drop the connection lock
3470         while waiting on the condvar. Hopefully these are baby steps in
3471         roughly the right direction.
3472
3473 2005-02-13  Havoc Pennington  <hp@redhat.com>
3474
3475         * dbus/dbus-connection.c: use separate mutexes for the condition
3476         variables; this is some kind of baseline for sanity, but the
3477         condition variables still aren't used correctly afaict
3478
3479 2005-02-13  Havoc Pennington  <hp@redhat.com>
3480
3481         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3482         fix a double-unlock
3483
3484         * dbus/dbus-connection.c
3485         (_dbus_connection_detach_pending_call_unlocked): add this
3486
3487         Initial semi-correct pass through to fix thread locking; there are
3488         still some issues with the condition variable paths I'm pretty
3489         sure
3490         
3491         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
3492         lock/unlock calls
3493
3494         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
3495         rename to add _unlocked
3496         (struct DBusConnection): move "dispatch_acquired" and
3497         "io_path_acquired" to use only one bit each.
3498         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
3499         (dbus_connection_set_watch_functions): hacky fix to reentrancy
3500         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
3501         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
3502         (_dbus_connection_remove_timeout) 
3503         (_dbus_connection_toggle_timeout): drop lock when calling out to
3504         user functions; done in a hacky/bad way.
3505         (_dbus_connection_send_and_unlock): add a missing unlock
3506         (_dbus_connection_block_for_reply): add a missing unlock
3507
3508         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
3509         drop lock in a hacky probably unsafe way to call out to user
3510         function
3511
3512 2005-02-12  Havoc Pennington  <hp@redhat.com>
3513
3514         * tools/dbus-tree-view.c (info_set_func_text): display more
3515         details on args
3516
3517         * bus/driver.c (bus_driver_handle_list_services): list the bus
3518         driver
3519
3520         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
3521
3522         * glib/dbus-gidl.c (signal_info_get_n_args): new function
3523         (method_info_get_n_args): new function
3524
3525 2005-02-12  Havoc Pennington  <hp@redhat.com>
3526
3527         * bus/driver.c (bus_driver_handle_introspect): add introspection
3528         for bus driver
3529
3530 2005-02-12  Havoc Pennington  <hp@redhat.com>
3531
3532         * bus/driver.c: put the signature of each bus driver method in the
3533         table of handlers and check it on incoming calls; this isn't
3534         really useful, but going to add introspect support in a minute.
3535
3536 2005-02-11  Joe Shaw  <joeshaw@novell.com>
3537
3538         * mono/Connection.cs: The unpredictability of finalizers in mono
3539         prevents us from deterministically disconnecting the filters from
3540         the Service class's finalizer, so move tracking of filters and
3541         matches here.  Add API for that.
3542
3543         * mono/Service.cs: Remove the code, add code which calls the
3544         methods now on the Connection class.
3545
3546 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
3547
3548         * python/dbus.py (class Sender): added to support dbus signals better
3549         (Bus::add_signal_receiver): added expand_args parameter which defaults
3550         to True.  When expand args is True the signal handler will pass the 
3551         message arguments as parameters to the signal handler.  If False
3552         revert to previous behavior where the signal handler must get the
3553         argument list from the message.  This is to help port applications
3554         like HAL that have a tendancy to send variable length argument lists.
3555         self._match_rule_to_receivers is now a dict of dicts.
3556         (Bus::remove_signal_receiver): pop handler off the dict intead of 
3557         removing it from a list
3558         (Bus::_signal_func): change signal handlers so that interface,
3559         signal_name, service, path and message are packed into a Sender
3560         object and that is passed to the handler.  If expand_args is True
3561         extract the args list from the message and append it to the parameter
3562         list
3563         
3564         * python/dbus_bindings.pyx.in (class Signature): added to support 
3565         signiature types
3566         (MessageIter::__init__): changed iteration limit to match D-BUS
3567         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
3568         STRUCT and VARIENT type support
3569         (MessageIter::python_value_to_dbus_sig): made recursive to support
3570         recursive types
3571         (MessageIter::append*): added Signature, dict, tuple 
3572         support
3573
3574         * python/examples/example-client.py: added examples of getting tuples
3575         and dicts
3576
3577         * python/examples/example-service.py: added examples of sending tuples
3578         and dicts
3579
3580         * python/examples/example-signal-recipient.py: Fixed to handle new
3581         signal callback format
3582
3583 2005-02-10  Havoc Pennington  <hp@redhat.com>
3584
3585         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
3586         (call dbus_g_proxy_add_signal)
3587
3588         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3589         escape the hostname
3590         (_dbus_server_new_for_domain_socket): escape the path
3591
3592         * dbus/dbus-address.c (dbus_address_escape_value): new
3593         (dbus_address_unescape_value): new
3594         (dbus_parse_address): unescape values
3595
3596         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
3597
3598         * doc/dbus-specification.xml: explain how to escape values in
3599         addresses
3600
3601 2005-02-10  Havoc Pennington  <hp@redhat.com>
3602
3603         * dbus/dbus-message-factory.c (generate_special): modify test to
3604         avoid using a non-basic dict key
3605
3606         * dbus/dbus-marshal-validate-util.c: add test for the below
3607
3608         * doc/dbus-specification.xml: require that dict keys are a basic
3609         type
3610
3611         * dbus/dbus-marshal-validate.c
3612         (_dbus_validate_signature_with_reason): require that dict key is a
3613         basic type
3614
3615 2005-02-10  Havoc Pennington  <hp@redhat.com>
3616
3617         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3618         change to be _and_unlock instead of _unlocked
3619
3620         * dbus/dbus-connection.c
3621         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
3622         have no_update so we can find this bug quickly in future
3623
3624 2005-02-10  Havoc Pennington  <hp@redhat.com>
3625
3626         * dbus/dbus-message-util.c (verify_test_message): tests for string
3627         array
3628
3629         * dbus/dbus-message.c (dbus_message_append_args_valist): add
3630         support for arrays of string/signature/path
3631
3632 2005-02-10  Joe Shaw  <joeshaw@novell.com>
3633
3634         * dbus/dbus-connection.c
3635         (_dbus_connection_queue_received_message_link,
3636         _dbus_connection_message_sent): Add the path to
3637         the verbose output.
3638         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
3639         _dbus_connection_send_preallocated_unlocked(), updated the
3640         dispatch status, and unlocks.  Fixes a bug where certain
3641         situations (like a broken pipe) could cause a Disconnect message
3642         to not be sent, tricking the bus into thinking a service was still
3643         there when the process had quit.
3644         (_dbus_connection_send_preallocated): Call
3645         _dbus_connection_send_preallocated_and_unlock().
3646         (_dbus_connection_send_and_unlock): Added.  Calls
3647         _dbus_connection_send_preallocated_and_unlock().
3648         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
3649         (dbus_connection_send_with_reply): Update the dispatch status and
3650         unlock.
3651
3652         * mono/Service.cs (~Service): Added.  Removes the filter so that
3653         we don't get unmanaged code calling back into a GCed delegate.
3654         (RemoveFilter); Added.
3655
3656 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
3657
3658         * dbus/dbus-message.c (dbus_message_iter_open_container):
3659         - Removed check for iterator type being an array because
3660         get_arg_type does not work with writer iterators
3661         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
3662
3663 2005-02-07  Havoc Pennington  <hp@redhat.com>
3664
3665         * doc/dbus-specification.xml: some more language cleanups; add
3666         stuff about how to deal with invalid protocol and extension
3667         points; add _ to allowed chars in auth commands; add EXTENSION_
3668         auth command prefix
3669
3670 2005-02-06  Havoc Pennington  <hp@redhat.com>
3671
3672         * s/expected/required/ in a couple places for clarity
3673
3674 2005-02-07  Colin Walters  <walters@verbum.org>
3675
3676         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
3677         sender or proposed_recipient.
3678
3679 2005-02-06  Havoc Pennington  <hp@redhat.com>
3680
3681         * dbus/dbus-message-factory.c (generate_special): more tests
3682
3683         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
3684         array length that exceeds the maximum
3685
3686 2005-02-05  Havoc Pennington  <hp@redhat.com>
3687
3688         * dbus/dbus-message-factory.c (generate_special): more test cases,
3689         increasing coverage
3690
3691         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
3692         reason why a signature was invalid
3693
3694         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
3695         skip the length of the string before we look at it in validation
3696
3697         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
3698         equal_substring
3699
3700         * dbus/dbus-message.c (_dbus_message_loader_new): default
3701         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
3702
3703 2005-02-05  Havoc Pennington  <hp@redhat.com>
3704
3705         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
3706         if the signature of a variant was empty
3707         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
3708         struct with no element type)
3709
3710         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
3711         mangled messages to break things
3712
3713 2005-02-04  Havoc Pennington  <hp@redhat.com>
3714
3715         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
3716         g_quark_try_string() so it actually can return 0
3717         (dbus_g_proxy_connect_signal): ditto
3718
3719 2005-02-04  Havoc Pennington  <hp@redhat.com>
3720
3721         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
3722         bogus warning
3723         (tristring_from_message): assert cleanly on null path/interface
3724         (should not be possible though I decided later)
3725         (dbus_g_proxy_dispose): move proxy manager unregistration here
3726         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
3727         g_return_if_fail() checks
3728
3729 2005-02-04  Havoc Pennington  <hp@redhat.com>
3730
3731         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
3732
3733         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
3734         (with some minor changes)
3735
3736         * doc/dbus-specification.xml: add deprecated attribute to
3737         introspection format
3738
3739 2005-01-31  Havoc Pennington  <hp@redhat.com>
3740
3741         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
3742         think it's sort of right
3743
3744 2005-01-30  Havoc Pennington  <hp@redhat.com>
3745
3746         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
3747
3748 2005-01-30  Havoc Pennington  <hp@redhat.com>
3749
3750         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
3751
3752         * autogen.sh: change to autotools 1.9
3753
3754         * glib/dbus-gproxy.c: completely change how signals work
3755         (dbus_g_proxy_add_signal): new function to specify signature of a
3756         signal
3757         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
3758         and g_warning if the incoming message has the wrong signature.
3759
3760 2005-01-30  Havoc Pennington  <hp@redhat.com>
3761
3762         * tools/dbus-names-model.c (have_names_notify): fix this
3763
3764         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
3765         up the string array handling a bit 
3766
3767 2005-01-30  Havoc Pennington  <hp@redhat.com>
3768
3769         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
3770         (dbus_g_pending_call_cancel): new function
3771
3772         * dbus/dbus-glib.h: move GType decls for connection/message here;
3773         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
3774         here, just kind of rationalizing how we handle all that
3775
3776         * tools/dbus-names-model.c: new file for a tree model listing the
3777         services on a bus
3778
3779         * tools/dbus-tree-view.c (model_new): use proper typing on the
3780         model rows
3781
3782 2005-01-30  Havoc Pennington  <hp@redhat.com>
3783
3784         * glib/dbus-gmain.c: add a custom GSource back that just checks
3785         whether the message queue has anything in it; otherwise, there are 
3786         cases where we won't see messages in the queue since there was no 
3787         IO visible to the glib main loop
3788
3789         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
3790         increase default message timeout to 25 seconds
3791
3792 2005-01-30  Havoc Pennington  <hp@redhat.com>
3793
3794         * test/glib/test-profile.c (no_bus_stop_server): remove the
3795         warning about the g_warning that I just fixed
3796
3797         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
3798         custom source, seems to be a lot easier to understand and work
3799         better.
3800
3801 2005-01-30  Havoc Pennington  <hp@redhat.com>
3802
3803         I think this main loop thing is conceptually broken, but here are 
3804         some band aids. I'll maybe rewrite it in a minute.
3805         
3806         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
3807         custom GSource, so don't pass it in; confusing
3808         (gsource_server_finalize, gsource_connection_finalize): add
3809         finalize handlers that remove all the watches.  
3810
3811 2005-01-30  Havoc Pennington  <hp@redhat.com>
3812
3813         * glib/dbus-gobject.c (introspect_properties): fix the XML
3814         generated
3815
3816         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
3817         which effectively detects the use of freed messages
3818
3819         * glib/dbus-gobject.c (handle_introspect): modify and return the
3820         reply message instead of the incoming message
3821
3822         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
3823         gee, maybe it should SEND THE XML instead of just making a string
3824         and freeing it again ;-)
3825
3826         * tools/dbus-print-message.c (print_message): improve printing of
3827         messages
3828
3829         * configure.in: add debug-glib.service to the output
3830
3831 2005-01-30  Havoc Pennington  <hp@redhat.com>
3832
3833         dbus-viewer introspected and displayed the bus driver
3834         
3835         * dbus/dbus-object-tree.c 
3836         (object_tree_test_iteration): add tests for a handler registered on "/"
3837
3838         * dbus/dbus-object-tree.c
3839         (_dbus_decompose_path): fix to handle path "/" properly
3840         (run_decompose_tests): add tests for path decomposition
3841         
3842         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
3843         properly
3844
3845         * glib/dbus-gobject.c (handle_introspect): fix quotes
3846
3847         * test/glib/run-test.sh: support launching the bus, then running
3848         dbus-viewer
3849
3850         * test/glib/test-service-glib.c (main): put in a trivial gobject
3851         subclass and register it on the connection
3852
3853         * bus/driver.c (bus_driver_handle_introspect): implement
3854         introspection of the bus driver service
3855
3856         * dbus/dbus-protocol.h: add #defines for the XML namespace,
3857         identifiers, doctype decl
3858
3859         * bus/driver.c (bus_driver_handle_get_service_owner): handle
3860         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
3861         returning the service unchanged.
3862         (bus_driver_handle_message): remove old check for reply_serial in
3863         method calls, now the message type deals with that
3864         (bus_driver_handle_message): handle NULL interface
3865
3866         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
3867
3868         * glib/dbus-gloader-expat.c (description_load_from_string): allow
3869         -1 for len
3870
3871         * tools/dbus-viewer.c: add support for introspecting a service on
3872         a bus
3873
3874         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
3875         (dbus_g_pending_call_unref): add
3876
3877 2005-01-29  Havoc Pennington  <hp@redhat.com>
3878
3879         * tools/dbus-tree-view.c: add support for displaying properties.
3880         (run dbus-viewer with an introspect xml file as arg, then resize
3881         the window so the tree elements show up, not sure what that is)
3882
3883         * glib/dbus-gobject.c (handle_introspect): return
3884         org.freedesktop.Properties and org.freedesktop.Introspectable
3885         interfaces when we are introspected.
3886
3887         * doc/dbus-specification.xml: allow empty interface name when 
3888         Get/Set a property
3889
3890 2005-01-29  Havoc Pennington  <hp@redhat.com>
3891
3892         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
3893         though it uses glib, it could be extended for any binding in
3894         principle
3895
3896         * glib/dbus-gobject.c (gobject_message_function): change to the
3897         new way properties work
3898
3899         * dbus/dbus-protocol.h: add the new interfaces
3900
3901         * doc/dbus-specification.xml: document the introspection format,
3902         Introspectable interface, and add an org.freedesktop.Properties
3903         interface.
3904
3905         * glib/dbus-gparser.c: add support for a <property> element
3906
3907         * glib/dbus-gidl.c: add PropertyInfo
3908
3909         * glib/dbus-gobject.c (handle_introspect): put the outermost
3910         <node> outside the signal and property descriptions.
3911         (introspect_properties): export properties as <property> rather
3912         than as method calls
3913
3914 2005-01-28  Havoc Pennington  <hp@redhat.com>
3915
3916         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
3917         related to authentication protocol
3918
3919 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
3920
3921         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
3922                 - BUS_ACTIVATION -> BUS_STARTER
3923                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
3924                 - class MessageIter (__init__): Added recursion checking 
3925                 so we throw a nice error instead of just disconnecting from the
3926                 bus.
3927                 (get): Added arg_type parameter for recursion.
3928                 Removed the nil type
3929                 Added signiture type placeholder (not implemented)
3930                 Added struct type placeholder (not implemented)
3931                 Added varient type placeholder (not implemented)
3932                 Commented out dict type for now     
3933                 (get_element_type): renamed from get_array_type
3934                 (get_*): changed to use the dbus_message_iter_get_basic API
3935                 (get_*_array): removed in favor of recursive get_array method
3936                 (get_array): new recursive method which calls get to marshal
3937                 the elements of the array
3938                 (value_to_dbus_sig): New method returns the corrasponding
3939                 dbus signiture to a python value
3940                 (append): Comment out dict handling for now
3941                 Handle lists with the new recursive API
3942                 Comment out None handling for now
3943                 (append_nil): removed
3944                 (append_*): changed to use dbus_message_iter_append_basic API
3945                 (append_*_array): removed in favor of recursive append_array 
3946                 method
3947                 (__str__): Make it easier to print out recursive iterators
3948                 for debugging
3949                 - class Message (__str__): moved type inspection to the
3950                 MessageIter class' __str__ method
3951                 (get_iter): Added an append parameter wich defaults to False
3952                 If True use the new API's to create an append iterator
3953
3954         * python/dbus.py: Update to use new bindings API
3955                 - TYPE_ACTIVATION -> TYPE_STARTER
3956                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
3957                 - class ActivationBus -> class StarterBus
3958                 - class RemoteObject (__call__): get an append iterator
3959                 - (_dispatch_dbus_method_call): get an append iterator
3960                 - class Object (emit_signal): get an append iterator
3961
3962         * python/examples/: Fixed up the examples to work with the new API
3963                 
3964 2005-01-28  Joe Shaw  <joeshaw@novell.com>
3965
3966         * configure.in: Bump version up to 0.30.
3967
3968         * HACKING: Add a release item to bump the version number up after 
3969         a release.
3970
3971 2005-01-28  Havoc Pennington  <hp@redhat.com>
3972
3973         * doc/dbus-specification.xml: update to describe 16-bit types and
3974         dict entries
3975
3976         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
3977         assertion
3978
3979         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
3980         type
3981
3982         * dbus/dbus-marshal-recursive.c: implement
3983
3984 2005-01-27  Havoc Pennington  <hp@redhat.com>
3985
3986         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
3987
3988         * configure.in: find the right type for 16 and 32 bit ints as well
3989         as 64
3990
3991         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
3992         the 16-bit types so people don't have to stuff them in 32-bit or
3993         byte arrays.
3994
3995 2005-01-27  Havoc Pennington  <hp@redhat.com>
3996
3997         * dbus/dbus-message.c: byteswap the message if you init an
3998         iterator to read/write from it
3999         
4000         * dbus/dbus-marshal-byteswap.c: new file implementing 
4001         _dbus_marshal_byteswap()
4002
4003         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
4004
4005 2005-01-26  Havoc Pennington  <hp@redhat.com>
4006         
4007         * dbus/dbus-marshal-validate-util.c: break this out (and fix
4008         build, apparently - nobody noticed?)
4009         
4010 2005-01-26  Havoc Pennington  <hp@redhat.com>
4011
4012         * dbus/dbus-marshal-recursive.h: remove todo comment
4013
4014 2005-01-25  Joe Shaw  <joeshaw@novell.com>
4015
4016         * Land the mono binding changes to conform to the new APIs.
4017
4018         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
4019         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
4020
4021         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
4022         type code as a string.
4023         (InitAppending): Rename dbus_message_append_iter_init() to
4024         dbus_message_iter_init_append().
4025
4026         * mono/BusDriver.cs: Rename ServiceEventHandler to
4027         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
4028         Rename ServiceOwnerChanged to NameOwnerChanged.
4029
4030         * mono/Connection.cs: Rename BaseService to UniqueName, and the
4031         underlying C call.
4032
4033         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
4034
4035         * mono/Service.cs: Rename Exists to HasOwner, internally rename
4036         dbus_bus_acquire_service() to dbus_bus_request_name().
4037
4038         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
4039         of Type.UnderlyingSystemType to get the correct element type for
4040         the array.
4041         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
4042         dbus_message_get_{element|arg}_type() instead of
4043         dbus_message_iter_init_array_iterator().
4044         (Append): Replace dbus_message_iter_append_array() with
4045         dbus_message_iter_open_container() and
4046         dbus_message_iter_close_container().
4047
4048         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
4049         types have been removed.
4050         
4051         * mono/DBusType/*.cs: Replace calls of
4052         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
4053         but specify the type in the DllImport extern declaration.  Ditto
4054         for dbus_message_iter_append_[type]() ->
4055         dbus_message_iter_append_basic().
4056
4057         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
4058         NameOwnerChangedHandler.
4059
4060 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
4061
4062         * python/dbus_bindings.pyx.in: Rename of methods and bindings
4063                 - get_base_service -> get_unique_name
4064                 - bus_get_base_service -> bus_get_unique_name
4065                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
4066                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
4067                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
4068                 - bus_activate_service -> bus_start_service_by_name
4069                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
4070                 - bus_acquire_service -> bus_request_name
4071                 - dbus_bus_acquire_service -> dbus_bus_request_name
4072                 - bus_service_exists -> bus_name_has_owner
4073                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
4074
4075         * python/dbus.py: Rename of methods
4076                 - activate_service -> start_service_by_name
4077                 - bus_acquire_service -> bus_request_name
4078                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
4079                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
4080
4081         
4082 2005-01-24  Joe Shaw  <joeshaw@novell.com>
4083
4084         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
4085         signature for the method that can't be found.
4086
4087         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
4088         the message has any arguments, we need to call
4089         _dbus_type_reader_get_current_type(), not
4090         _dbus_type_reader_has_next().
4091
4092 2005-01-24  Havoc Pennington  <hp@redhat.com>
4093
4094         * dbus/dbus-message-factory.c: more testing of message validation
4095
4096         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
4097         header
4098
4099 2005-01-23  Havoc Pennington  <hp@redhat.com>
4100
4101         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
4102         get this all working, not many tests in the framework yet though
4103
4104 2005-01-22  Havoc Pennington  <hp@redhat.com>
4105
4106         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
4107         tutorial, based on work from David Wheeler.
4108
4109 2005-01-21  Havoc Pennington  <hp@redhat.com>
4110
4111         * dbus/dbus-bus.c: add more return_if_fail checks
4112
4113         * dbus/dbus-message.c (load_message): have the "no validation"
4114         mode (have to edit the code to toggle the mode for now though)
4115
4116         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
4117         skips all validation; I want to use this at least for benchmark
4118         baseline, I'm not sure if it should be a publicly-available switch.
4119
4120 2005-01-21  Havoc Pennington  <hp@redhat.com>
4121
4122         * glib/dbus-gmain.c: don't put the GLib bindings in the same
4123         toplevel doxygen group as the low-level API stuff
4124
4125         * dbus/dbus.h: note that libdbus is the low-level API
4126
4127 2005-01-20  Havoc Pennington  <hp@redhat.com>
4128
4129         * update-dbus-docs.sh: script to update docs on the web site, only
4130         works for me though. neener.
4131
4132 2005-01-20  Havoc Pennington  <hp@redhat.com>
4133
4134         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
4135         code can reveal bugs in it
4136
4137 2005-01-20  Havoc Pennington  <hp@redhat.com>
4138
4139         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
4140         select() version, patches from Tor Lillqvist
4141
4142 2005-01-20  Havoc Pennington  <hp@redhat.com>
4143
4144         * doc/dbus-tutorial.xml: replace > with &gt;
4145
4146         * bus/services.c (bus_registry_acquire_service): validate the name
4147         and return a better error if it's no good.
4148
4149         * doc/dbus-specification.xml: note NO_AUTO_START change
4150
4151         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
4152         from AUTO_START, we're toggling the default
4153
4154         * bus/dispatch.c: adapt the tests to change of auto-start default
4155
4156 2005-01-18  Havoc Pennington  <hp@redhat.com>
4157
4158         * rename dbus-daemon-1 to dbus-daemon throughout
4159
4160 2005-01-18  Havoc Pennington  <hp@redhat.com>
4161
4162         * Throughout, grand renaming to strip out the use of "service",
4163         just say "name" instead (or "bus name" when ambiguous).  Did not
4164         change the internal code of the message bus itself, only the
4165         programmer-facing API and messages.
4166         
4167         * doc/dbus-specification.xml: further update the message bus section
4168         
4169         * bus/config-parser.c (all_are_equiv): fix bug using freed string
4170         in error case
4171
4172 2005-01-17  Havoc Pennington  <hp@redhat.com>
4173
4174         * dbus/dbus-types.h: remove 16-bit types since we don't use them
4175         ever
4176
4177         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
4178         "invalid name character" not only non-ASCII
4179
4180         * doc/dbus-specification.xml: further update spec, message bus 
4181         parts are still out-of-date but the marshaling etc. stuff is now
4182         accurate-ish
4183
4184 2005-01-17  Havoc Pennington  <hp@redhat.com>
4185
4186         * doc/dbus-specification.xml: partially update spec
4187
4188 2005-01-17  Havoc Pennington  <hp@redhat.com>
4189
4190         * Throughout, align variant bodies according to the contained
4191         type, rather than always to 8. Should save a fair bit of space in
4192         message headers.
4193         
4194         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
4195         fix handling of case where p == end
4196
4197         * doc/TODO: remove the dbus_bool_t item and variant alignment items
4198
4199 2005-01-17  Havoc Pennington  <hp@redhat.com>
4200
4201         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
4202
4203         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
4204         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
4205         are marshaling/unmarshaling a boolean.
4206
4207 2005-01-16  Havoc Pennington  <hp@redhat.com>
4208
4209         This is about it on what can be disabled/deleted from libdbus
4210         easily, back below 150K anyhow. Deeper cuts are more work than 
4211         just turning the code off as I've done here.
4212         
4213         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
4214         signed int convenience funcs
4215
4216         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
4217         verbose mode
4218
4219         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
4220         things out of libdbus
4221
4222         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
4223         
4224         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
4225         tests-enabled-only, though it should probably be deleted)
4226
4227         * dbus/dbus-message-util.c: same stuff
4228
4229         * dbus/dbus-auth-util.c: same stuff
4230
4231 2005-01-16  Havoc Pennington  <hp@redhat.com>
4232
4233         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
4234
4235         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
4236         way for stripping down dbus-userdb.c stuff included in libdbus.
4237         Rename _dbus_parse_uid for consistency.
4238
4239 2005-01-16  Havoc Pennington  <hp@redhat.com>
4240
4241         * dbus/dbus-internals.c (_dbus_real_assert): print the function
4242         name the assertion failed in
4243
4244         * dbus/dbus-internals.h (_dbus_return_if_fail) 
4245         (_dbus_return_val_if_fail): assert that the name of the function
4246         containing the check doesn't start with '_', since we only want to 
4247         use checks on public functions
4248         
4249         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
4250         checks to assertions
4251
4252         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
4253         change checks to asserts for private function
4254
4255         * dbus/dbus-message.c (_dbus_message_set_serial): checks
4256         to asserts for private function
4257
4258         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
4259         broken assertion that was breaking make check
4260         (_dbus_type_reader_array_is_empty): remove this rather than fix
4261         it, was only used in assertions
4262
4263 2005-01-16  Havoc Pennington  <hp@redhat.com>
4264
4265         * test/unused-code-gc.py: hacky script to find code that's used
4266         only by the bus (not libdbus) or used only by tests or not used at
4267         all. It has some false alarms, but looks like we can clean up a
4268         lot of size from libdbus.
4269
4270         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
4271         dbus/Makefile.am: initially move 10K of binary size out of libdbus
4272         
4273 2005-01-16  Havoc Pennington  <hp@redhat.com>
4274
4275         * Add and fix docs according to Doxygen warnings throughout
4276         source.
4277         
4278         * dbus/dbus-marshal-recursive.c
4279         (_dbus_type_reader_array_is_empty): change this to just call
4280         array_reader_get_array_len() and make it static
4281
4282         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
4283         from get_array_type
4284         (dbus_message_iter_init_append): rename from append_iter_init
4285
4286         * dbus/dbus-marshal-recursive.c
4287         (_dbus_type_reader_get_element_type): rename from
4288         _dbus_type_reader_get_array_type
4289
4290 2005-01-15  Havoc Pennington  <hp@redhat.com>
4291
4292         * test/glib/test-profile.c (with_bus_server_filter): fix crash
4293
4294         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
4295         when DBUS_DISABLE_ASSERT
4296         (_dbus_marshal_set_basic): be sure we align for the string length
4297
4298         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
4299         this look faster
4300
4301         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
4302         inline macro version
4303         (_dbus_string_set_byte): provide inline macro version
4304
4305 2005-01-15  Havoc Pennington  <hp@redhat.com>
4306
4307         * Land the new message args API and type system.
4308
4309         This patch is huge, but the public API change is not 
4310         really large. The set of D-BUS types has changed somewhat, 
4311         and the arg "getters" are more geared toward language bindings;
4312         they don't make a copy, etc.
4313
4314         There are also some known issues. See these emails for details
4315         on this huge patch:
4316         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
4317         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
4318         
4319         * dbus/dbus-marshal-*: all the new stuff
4320
4321         * dbus/dbus-message.c: basically rewritten
4322
4323         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
4324         freed blocks to be all non-nul bytes so using freed memory is less
4325         likely to work right
4326
4327         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
4328         DBUS_FAIL_MALLOC=N environment variable, so you can do
4329         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
4330         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
4331         thorough.
4332
4333         * qt/message.cpp: port to the new message args API
4334         (operator<<): use str.utf8() rather than str.unicode()
4335         (pretty sure this is right from the Qt docs?)
4336
4337         * glib/dbus-gvalue.c: port to the new message args API
4338
4339         * bus/dispatch.c, bus/driver.c: port to the new message args API
4340
4341         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
4342         "locked" flag to TRUE and align_offset to 0; I guess we never
4343         looked at these anyhow, but seems cleaner.
4344
4345         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
4346         move allocation padding macro to this header; use it to implement
4347         (_DBUS_STRING_STATIC): ability to declare a static string.
4348
4349         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
4350         change to return TRUE if the interface is not set.
4351
4352         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
4353         to dbus-marshal-validate.[hc]
4354
4355         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
4356         dbus-internals.c
4357
4358         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
4359         to dbus-marshal-*.[hc]
4360
4361         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
4362         function here from dbus-marshal.c
4363
4364 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4365
4366         * NEWS: Update for 0.23.
4367
4368         * configure.in: Release 0.23.
4369
4370 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4371
4372         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
4373         dbus DLL with --debug.  Clean up after the .mdb files this leaves
4374         behind.
4375
4376         * mono/doc/Makefile.am: Need to uninstall the docs on "make
4377         uninstall"
4378
4379         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
4380         is an enum, get the enum's underlying type.  Another mono
4381         1.1.3 fix.
4382
4383 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4384
4385         Patch from Sjoerd Simons <sjoerd@luon.net>
4386
4387         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
4388         DESTDIR.  It breaks stuff.
4389
4390 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4391
4392         Patch from Tambet Ingo <tambet@ximian.com>
4393
4394         * mono/DBusType/Array.cs (Get): Get the underlying element type by
4395         calling type.GetElementType().  The code previously depended on
4396         broken Mono behavior, which was fixed in Mono 1.1.3.
4397
4398         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
4399         Activator.CreateInstance() so that the class's constructor is
4400         called with the right parameters.
4401
4402 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4403
4404         Patch from Timo Teräs <ext-timo.teras@nokia.com>
4405
4406         * dbus/dbus-connection.c
4407         (_dbus_connection_queue_received_message_link): Call
4408         _dbus_connection_remove_timeout() instead of the _locked()
4409         variant, since it's always called from
4410         _dbus_connection_handle_watch(), which handles the locking.
4411         Removed the _locked() variant since it's no longer used.
4412
4413 2005-01-03  Havoc Pennington  <hp@redhat.com>
4414
4415         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
4416         return
4417         
4418 2004-12-26  Havoc Pennington  <hp@redhat.com>
4419
4420         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
4421
4422 2005-01-03  Havoc Pennington  <hp@redhat.com>
4423
4424         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
4425         floating point
4426
4427         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
4428
4429 2005-01-02  Havoc Pennington  <hp@redhat.com>
4430
4431         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
4432
4433 2005-01-01  Havoc Pennington  <hp@redhat.com>
4434
4435         * configure.in: add -Wfloat-equal
4436
4437 2005-01-01  Havoc Pennington  <hp@redhat.com>
4438
4439         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
4440         for a variety of reasons '==' doesn't do this.
4441
4442 2004-12-31  Havoc Pennington  <hp@redhat.com>
4443
4444         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
4445         I keep wishing I had
4446
4447 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4448
4449         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
4450
4451 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4452
4453         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
4454         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
4455         dbus-protocol.h.  Because they are defines and not enums they are not
4456         autogenerated.
4457
4458 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
4459
4460         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
4461         dbus_bus_activate_service
4462
4463         * python/dbus.py (Bus.activate_service): activate a service on the
4464         bus.
4465
4466 2004-12-24  Havoc Pennington  <hp@redhat.com>
4467
4468         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
4469         file format has also changed and I haven't adapted to that yet
4470         
4471         * Makefile.am: load .gcno files from latest gcc
4472
4473 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
4474         * Patch from Rob Taylor <robtaylor@fastmail.fm>
4475
4476         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
4477         lowlevel binding
4478
4479         * python/dbus.py (get_unix_user): Added binding to 
4480         call dbus_bindings.bus_get_unix_user
4481
4482         * python/extract.py: Modified the proto_pat regex to
4483         handle unsigned long
4484
4485 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4486
4487         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
4488         better POSIX compliance.
4489
4490 2004-12-19  Havoc Pennington  <hp@redhat.com>
4491
4492         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
4493         (_dbus_string_insert_8_aligned): new functions
4494
4495         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
4496
4497 2004-12-18  Havoc Pennington  <hp@redhat.com>
4498
4499         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
4500         macro
4501
4502         * dbus/dbus-message.c: fix a comment, and add a still-unused
4503         not-implemented function
4504
4505         * dbus/dbus-marshal.h: fix comment
4506
4507         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
4508
4509 2004-12-17  Joe Shaw  <joeshaw@novell.com>
4510
4511         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
4512         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
4513         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
4514         Type.UnderlyingSystemType to get the actual system type
4515         underneath.  This code previously depended on the broken Mono
4516         behavior, which was fixed in 1.1.3.
4517
4518 2004-11-27  Havoc Pennington  <hp@redhat.com>
4519
4520         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
4521         are disabled
4522         (_dbus_string_get_const_data): inline when asserts are disabled
4523
4524         * dbus/dbus-message.c: record the _dbus_current_generation of
4525         creation so we can complain if dbus_shutdown() is used improperly.
4526         Do this only if checks are enabled.
4527
4528         * dbus/dbus-connection.c: ditto
4529         
4530 2004-11-26  Havoc Pennington  <hp@redhat.com>
4531
4532         * test/glib/test-profile.c: add with_bus mode to profile echoes
4533         that go through the bus.
4534
4535         * test/glib/run-test.sh: add ability to run test-profile
4536
4537         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
4538         config file reload.
4539
4540 2004-11-26  Havoc Pennington  <hp@redhat.com>
4541
4542         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
4543         thing was implemented
4544
4545 2004-11-26  Havoc Pennington  <hp@redhat.com>
4546
4547         * test/glib/test-profile.c: tweak a bit, add support for some
4548         made-up minimal malloc overhead with plain sockets, since in 
4549         real life some sort of buffers are unavoidable thus we could 
4550         count them in the theoretical best case
4551
4552 2004-11-26  Havoc Pennington  <hp@redhat.com>
4553
4554         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
4555         where I was trying to cache one too many messages
4556
4557 2004-11-26  Havoc Pennington  <hp@redhat.com>
4558
4559         * dbus/dbus-message.c: reimplement message cache as an array which 
4560         makes the cache about twice as fast and saves maybe 1.5% overall
4561
4562 2004-11-26  Havoc Pennington  <hp@redhat.com>
4563
4564         * dbus/dbus-threads.c (init_global_locks): forgot to put the
4565         message cache lock here
4566
4567 2004-11-26  Havoc Pennington  <hp@redhat.com>
4568
4569         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
4570         the "char byte_order" next to each other to save 4 bytes
4571         (dbus_message_new_empty_header): reduce preallocation, since the
4572         message cache should achieve a similar effect
4573         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
4574         message cache that keeps a few DBusMessage around in a pool,
4575         another 8% speedup or so.
4576
4577         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
4578
4579 2004-11-25  Havoc Pennington  <hp@redhat.com>
4580
4581         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
4582         to write, without reading or blocking, try it before the poll()
4583         and skip the poll() if nothing remains to write. This is about a
4584         3% speedup in the echo client/server
4585
4586 2004-11-25  Havoc Pennington  <hp@redhat.com>
4587
4588         The primary change here is to always write() once before adding
4589         the write watch, which gives us about a 10% performance increase.
4590         
4591         * dbus/dbus-transport-unix.c: a number of modifications to cope
4592         with removing messages_pending
4593         (check_write_watch): properly handle
4594         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
4595         messages_pending stuff
4596         (check_read_watch): properly handle WAITING_FOR_MEMORY and
4597         AUTHENTICATED cases
4598         (unix_handle_watch): after writing, see if the write watch can be
4599         removed
4600         (unix_do_iteration): assert that write_watch/read_watch are
4601         non-NULL rather than testing that they aren't, since they 
4602         aren't allowed to be NULL. check_write_watch() at the end so 
4603         we add the watch if we did not finish writing (e.g. got EAGAIN)
4604
4605         * dbus/dbus-transport-protected.h: remove messages_pending call,
4606         since it resulted in too much inefficient watch adding/removing; 
4607         instead we now require that the transport user does an iteration 
4608         after queueing outgoing messages, and after trying the first
4609         write() we add a write watch if we got EAGAIN or exceeded our 
4610         max bytes to write per iteration setting
4611
4612         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
4613         function
4614
4615         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
4616         freed and then accessed, valgrind flagged this bug, fix it
4617
4618         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
4619         as the last valid field plus 1, where really it is equal to the
4620         last valid field. Corrects some message corruption issues.
4621
4622         * dbus/dbus-mainloop.c: verbosity changes
4623
4624         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
4625         instead of aborting in one of the test codepaths
4626
4627         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
4628         caused not printing the pid ever again if a verbose was missing
4629         the newline at the end
4630         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
4631
4632         * dbus/dbus-connection.c: verbosity changes; 
4633         (dbus_connection_has_messages_to_send): new function
4634         (_dbus_connection_message_sent): no longer call transport->messages_pending
4635         (_dbus_connection_send_preallocated_unlocked): do one iteration to
4636         try to write() immediately, so we can avoid the write watch. This
4637         is the core purpose of this patchset
4638         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
4639         dump the outgoing message queue, so nobody will get confused
4640         trying to send them or thinking stuff is pending to be sent
4641
4642         * bus/test.c: verbosity changes
4643
4644         * bus/driver.c: verbosity/assertion changes
4645
4646         * bus/dispatch.c: a bunch of little tweaks to get it working again
4647         because this patchset changes when/where you need to block.
4648
4649 2004-11-23  Havoc Pennington  <hp@redhat.com>
4650
4651         * test/glib/test-profile.c: modify to accept a plain_sockets
4652         argument in which case it will bench plain sockets instead of
4653         libdbus, for comparison purposes.
4654
4655 2004-11-22  Havoc Pennington  <hp@redhat.com>
4656
4657         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
4658         threads for more time, so sysprof can get a grip on it.
4659
4660         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
4661         pointless variable
4662
4663 2004-11-13  Havoc Pennington  <hp@redhat.com>
4664
4665         * test/glib/test-profile.c: fix this thing up a bit
4666
4667         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
4668         preallocation sizes by a fair bit; not sure if this will be an
4669         overall performance win or not, but it does reduce reallocs.
4670
4671         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
4672         the test hack that forced constant realloc if asserts are
4673         disabled, so we can profile sanely. Sprinkle in some
4674         _DBUS_UNLIKELY() which are probably pointless, but before I
4675         noticed the real performance problem I put them in.
4676         (_dbus_string_validate_utf8): micro-optimize this thing a little
4677         bit, though callgrind says it didn't help; then special-case
4678         ascii, which did help a lot; then be sure we detect nul bytes as
4679         invalid, which is a bugfix.
4680         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
4681         superstition; use memset to nul the padding instead of a manual
4682         loop.
4683         (_dbus_string_get_length): inline this as a
4684         macro; it showed up in the profile because it's used for loop
4685         tests and so forth
4686
4687 2004-11-10  Colin Walters  <walters@verbum.org>
4688
4689         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
4690         for extra paranoia.
4691
4692 2004-11-09  Colin Walters  <walters@verbum.org>
4693
4694         * dbus/dbus-string.c (_dbus_string_get_length): New
4695         function, writes DBusString to C buffer.
4696
4697         * dbus/dbus-string.h: Prototype it.
4698
4699         * dbus/dbus-message.c (dbus_message_type_to_string): New
4700         function, converts message type into C string.
4701
4702         * dbus/dbus-message.h: Prototype it.
4703
4704         * bus/selinux.c (bus_selinux_check): Take source pid,
4705         target pid, and audit data.  Pass audit data to
4706         avc_has_perm.
4707         (log_audit_callback): New function, appends extra
4708         audit information.
4709         (bus_selinux_allows_acquire_service): Also take
4710         service name, add it to audit data.
4711         (bus_selinux_allows_send): Also take message
4712         type, interface, method member, error name,
4713         and destination, and add them to audit data.
4714         (log_cb): Initialize func_audit.
4715         
4716         * bus/selinux.h (bus_selinux_allows_acquire_service)
4717         (bus_selinux_allows_send): Update prototypes 
4718
4719         * bus/services.c (bus_registry_acquire_service): Pass
4720         service name to bus_selinux_allows_acquire_service.
4721
4722         * bus/bus.c (bus_context_check_security_policy): Pass
4723         additional audit data.  Move assignment of dest
4724         to its own line.
4725
4726 2004-11-07  Colin Walters  <walters@verbum.org>
4727
4728         * dbus/dbus-transport-unix.c (do_authentication): Always
4729         initialize auth_completed.
4730         
4731 2004-11-07  Colin Walters  <walters@verbum.org>
4732
4733         * bus/bus.c (load_config): Break into three
4734         separate functions: process_config_first_time_only,
4735         process_config_every_time, and process_config_postinit.
4736         (process_config_every_time): Move call of
4737         bus_registry_set_service_context_table into
4738         process_config_postinit.
4739         (process_config_postinit): New function, does
4740         any processing that needs to happen late
4741         in initialization (and also on reload).
4742         (bus_context_new): Instead of calling load_config,
4743         open config parser here and call process_config_first_time_only
4744         and process_config_every_time directly.  Later, after
4745         we have forked but before changing UID,
4746         invoke bus_selinux_full_init, and then call
4747         process_config_postinit.
4748         (bus_context_reload_config): As in bus_context_new,
4749         load parse file inside here, and call process_config_every_time
4750         and process_config_postinit.
4751
4752         * bus/services.h, bus/services.c
4753         (bus_registry_set_service_context_table): Rename
4754         from bus_registry_set_sid_table.  Take string hash from config
4755         parser, and convert them here into SIDs.
4756
4757         * bus/config-parser.c (struct BusConfigParser): Have
4758         config parser only store a mapping of service->context
4759         string.
4760         (merge_service_context_hash): New function.
4761         (merge_included): Merge context string hashes instead
4762         of using bus_selinux_id_table_union.
4763         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
4764         simply create a new string hash.
4765         (bus_config_parser_unref): Unref it.
4766         (start_selinux_child): Simply insert strings into hash,
4767         don't call bus_selinux_id_table_copy_over.
4768
4769         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
4770         (bus_selinux_id_table_copy_over): Delete.
4771
4772 2004-11-03  Colin Walters  <walters@verbum.org>
4773
4774         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
4775         variables.
4776         
4777 2004-11-03  Colin Walters  <walters@verbum.org>
4778
4779         * bus/test-main.c (test_pre_hook): Fix test logic,
4780         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
4781
4782 2004-11-02  Colin Walters  <walters@redhat.com>
4783
4784         * bus/selinux.c (bus_selinux_init): Split into two functions,
4785         bus_selinux_pre_init and bus_selinux_post_init.
4786         (bus_selinux_pre_init): Just determine whether SELinux is
4787         enabled.
4788         (bus_selinux_post_init): Do everything else.
4789
4790         * bus/main.c (main): Call bus_selinux_pre_init before parsing
4791         config file, and bus_selinux_post_init after.  This ensures that
4792         we don't lose the policyreload notification thread that
4793         bus_selinux_init created before forking previously.
4794         
4795         * bus/test-main.c (test_pre_hook): Update for split.
4796
4797 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
4798
4799         Patch from Johan Fischer <linux@fischaz.com>
4800         
4801         * mono/doc/Makefile.am (install-data-local): Added directory
4802         install for DESTDIR
4803
4804 2004-10-29  Colin Walters  <walters@redhat.com>
4805
4806         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
4807         parameter for fd to write pid to.       
4808
4809         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
4810         
4811         * bus/bus.c (bus_context_new): Pass print_pid_fd
4812         to _dbus_become_daemon (bug #1720)
4813
4814 2004-10-29  Colin Walters  <walters@redhat.com>
4815
4816         Patch from Ed Catmur <ed@catmur.co.uk>
4817
4818         * mono/doc/Makefile.am (install-data-local): Handle
4819         DESTDIR.
4820
4821 2004-10-29  Colin Walters  <walters@redhat.com>
4822
4823         * bus/.cvsignore, qt/.cvsignore: Update.
4824
4825 2004-10-29  Colin Walters  <walters@redhat.com>
4826
4827         Patch from Kristof Vansant <de_lupus@pandora.be>
4828
4829         * configure.in: Detect Slackware.
4830         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
4831         * bus/rc.messagebus.in: New file.
4832
4833 2004-10-29  Colin Walters  <walters@redhat.com>
4834
4835         * tools/dbus-monitor.c (filter_func): Return
4836         DBUS_HANDLER_RESULT_HANDLED in filter function
4837         for now.  See:
4838         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
4839
4840 2004-10-29  Colin Walters  <walters@redhat.com>
4841
4842         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
4843
4844         * bus/services.c (bus_registry_acquire_service): 
4845         Correctly retrieve service name from DBusString
4846         for printing.
4847
4848 2004-10-29  Colin Walters  <walters@redhat.com>
4849
4850         * dbus/dbus-glib.h: Update documentation to not
4851         refer to internal APIs.
4852
4853 2004-10-27  Joe Shaw  <joeshaw@novell.com>
4854
4855         * mono/Arguments.cs (GetDBusTypeConstructor):
4856         type.UnderlyingSystemType will return "System.Byte" if you do it
4857         on "byte[]", which is not what we want.  So check the type.IsArray
4858         property and use System.Array instead.
4859
4860 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
4861
4862         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
4863         the DBusUserInfo structure since this is passed into the function.
4864         This would cause a double free when the function that allocated
4865         the structure would try to free it when an error occured.
4866
4867         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
4868         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
4869         for service activation to avoid 32bit/64bit parallel install issues
4870
4871 2004-10-21  Colin Walters  <walters@verbum.org>
4872
4873         * AUTHORS: Fix my email address, the @gnu.org one
4874         has been bouncing for some time.  Also add J5.
4875         
4876 2004-10-21  Colin Walters  <walters@verbum.org>
4877
4878         * dbus/dbus-transport-unix.c (do_authentication): Return
4879         authentication status to callers.
4880         (unix_handle_watch): If we completed authentication this round,
4881         don't do another read.  Instead wait until the next iteration,
4882         after we've read any pending data in the auth buffer.
4883         (unix_do_iteration): Ditto.
4884         (unix_handle_watch): Updated for new do_authentication prototype.
4885
4886 2004-10-18  Colin Walters  <walters@verbum.org>
4887
4888         * bus/selinux.c (bus_selinux_enabled): Handle
4889         --disable-selinux case.
4890         
4891 2004-10-18  Colin Walters  <walters@verbum.org>
4892
4893         * bus/selinux.h: Add bus_selinux_enabled.
4894         
4895         * bus/selinux.c (bus_selinux_enabled): Implement it.
4896         
4897         * bus/config-parser.c (struct include): Add
4898         if_selinux_enabled member.
4899         (start_busconfig_child): Parse if_selinux_enabled
4900         attribute for include.
4901         (bus_config_parser_content): Handle it.
4902
4903         * bus/session.conf.in, bus/system.conf.in: Add
4904         inclusion of context mapping to default config files;
4905         conditional on SELinux being enabled.
4906         
4907         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
4908         
4909         * test/data/invalid-config-files/badselinux-1.conf, 
4910         test/data/invalid-config-files/badselinux-2.conf:
4911         Test files for bad syntax.
4912         
4913 2004-10-17  Colin Walters  <walters@verbum.org>
4914
4915         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
4916         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
4917         format specifier mismatches.
4918
4919 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4920
4921         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
4922         format string.
4923
4924         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
4925         pointer (bug #1540, Leonardo Boiko).
4926
4927 2004-09-28  Jon Trowbridge  <trow@ximian.com>
4928
4929         * mono/BusDriver.cs: Changed BusDriver struct to remove
4930         the ServiceCreated and ServiceDeleted events and replace them
4931         with the new ServiceOwnerChanged event.
4932
4933         * mono/example/BusListener.cs: Added a new example program,
4934         which listens for and reports any ServiceOwnerChanged events
4935         on the bus driver.
4936
4937         * mono/example/Makefile.am (DESTDIR): Build changes for the
4938         new BusListener.cs example.
4939
4940 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4941
4942         * bus/signals.c (bus_match_rule_parse): validate the components of
4943         match rules (bug #1439).
4944
4945         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
4946
4947 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4948
4949         * doc/dbus-specification.xml: document ServiceOwnerChanged
4950         signal.
4951         
4952         * bus/driver.c, bus/driver.h, bus/services.c: Use
4953         ServiceOwnerChanged signal instead of ServiceCreated and
4954         ServiceDeleted.
4955         
4956         * bus/dispatch.c: update testcase for the new signal.
4957
4958 2004-09-20  Jon Trowbridge  <trow@ximian.com>
4959
4960         Patch from Nat Friedman <nat@novell.com>
4961
4962         * mono/Makefile.am: A number of small build fixes to allow "make
4963         distcheck" to succeed.
4964
4965         * mono/example/Makefile.am: "make distcheck" fixes.
4966
4967         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
4968         key in @srcdir@.
4969
4970         * test/Makefile.am: "make distcheck" fixes.
4971
4972 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4973
4974         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
4975
4976         * doc/busconfig.dtd: update the DTD for the at_console attribute.
4977
4978         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
4979         messages after the first one (bug #1389).
4980         
4981         * bus/dispatch.c (check_double_hello_message): add a test case for
4982         the double hello message bug.
4983         (check_existent_service_activation): fix check of spawning error.
4984         
4985 2004-09-16  David Zeuthen  <david@fubar.dk>
4986
4987         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
4988
4989 2004-09-12  David Zeuthen  <david@fubar.dk>
4990
4991         Patch from Kay Sievers <kay.sievers@vrfy.org>
4992
4993         * bus/bus.c (bus_context_new):
4994         * bus/bus.h:
4995         * bus/main.c (usage)
4996         (main):
4997         Add commandline option --nofork to override configuration file
4998         setting.
4999
5000 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5001
5002         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
5003         compilers don't like it (bug #974).
5004
5005 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
5006
5007         * qt/connection.*: Applied patch by Jérôme Lodewyck
5008         <lodewyck@clipper.ens.fr> to integrate an existing
5009         connection into the Qt eventloop
5010
5011 2004-08-30  Jon Trowbridge  <trow@ximian.com>
5012
5013         * mono/BusDriver.cs: Added.  This is a class for interacting with
5014         the org.freedesktop.DBus service.
5015
5016         * mono/Message.cs: Added a mechanism to expose the message that is
5017         currently being dispatched via the static Message.Current
5018         property.  Added Message.Sender and Message.Destination
5019         properties.
5020
5021         * mono/Handler.cs: Expose the dispatched message via
5022         Message.Current when handling method calls.
5023
5024         * mono/Service.cs: Expose the dispatched message via
5025         Message.Current when handling signal emissions.
5026         
5027         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
5028         Connection.BaseService property.
5029
5030 2004-08-28  Havoc Pennington  <hp@redhat.com>
5031
5032         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
5033
5034         More fixes from Steve Grubb
5035         
5036         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
5037         (_dbus_listen_tcp_socket): fix fd leak
5038
5039         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
5040         EINTR to a bit lower in the code
5041
5042 2004-08-26  Jon Trowbridge  <trow@ximian.com>
5043
5044         * bus/driver.c (bus_driver_handle_service_exists): Respond with
5045         TRUE if we are inquiring about the existence of the built-in
5046         org.freedesktop.DBus service.
5047
5048 2004-08-25  John Palmieri  <johnp@redhat.com>
5049         * bus/config-parser.c:
5050         (struct PolicyType): Add POLICY_CONSOLE
5051         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
5052         (start_busconfig_child): Sets up console element when
5053         <policy at_console=""> is encountered in a policy file
5054         (append_rule_from_element): Convert console elements to console
5055         rules.
5056
5057         * bus/policy.c: 
5058         (bus_policy_create_client_policy): Add console rules to the client
5059         policy based on if the client is at the console
5060         (bus_policy_append_console_rule): New function for adding a
5061         console rule to a policy
5062         (bus_policy_merge): Handle console rule merging
5063
5064         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
5065         where we check for console user files
5066         
5067         * dbus/dbus-sysdeps.c:
5068         (_dbus_file_exists): New function which checks if the given
5069         file exists
5070         (_dbus_user_at_console): New function which does the system
5071         specific process of checking if the user is at the console
5072
5073         * dbus/dbus-userdb.c:
5074         (_dbus_is_console_user): New function converts a UID to user name
5075         and then calls the system specific _dbus_user_at_console to 
5076         see if the user is at the console and therefor a console user
5077
5078 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5079
5080         * bus/config-parser.c (set_limit):
5081         * bus/dbus-daemon-1.1.in:
5082         * test/data/valid-config-files/many-rules.conf: set the
5083         max_match_rules_per_connection limt from the config file. 
5084
5085         * doc/busconfig.dtd: update the DTD.
5086
5087         * bus/driver.c: remove some unused variables.
5088
5089 2004-08-24  Mikael Hallendal  <micke@imendio.com>
5090
5091         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
5092         it's been replaced by dbus_g_bus_get
5093
5094 2004-08-23  Colin Walters  <walters@redhat.com>
5095
5096         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5097
5098         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
5099
5100         * bus/selinux.c: Create a thread for policy reload notification.
5101         (bus_selinux_get_policy_root): Implement.
5102
5103         * bus/config-parser.c (start_busconfig_child)
5104         (bus_config_parser_content): Support SELinux-root relative
5105         inclusion.
5106
5107         * configure.in <HAVE_SELINUX>: Add -lpthread.
5108         
5109         * bus/test-main.c (test_pre_hook, test_post_hook): New.
5110         (test_post_hook): Move memory checking into here.
5111         (test_pre_hook, test_post_hook): Move SELinux checks in
5112         here, but conditional on a DBUS_TEST_SELINUX environment
5113         variable.  Unfortunately we can't run the SELinux checks
5114         as a normal user, since they won't have any permissions
5115         for /selinux.  So this will have to be tested manually
5116         for now, until we have virtualization for most of
5117         libselinux.
5118         
5119 2004-08-23  Havoc Pennington  <hp@redhat.com>
5120
5121         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
5122         drop supplementary groups, suggested by Steve Grubb
5123
5124 2004-08-20  Colin Walters  <walters@redhat.com>
5125
5126         * bus/config-parser.c (start_busconfig_child): Remove some unused
5127         variables.
5128         
5129         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
5130         warning.
5131
5132 2004-08-17  Joe Shaw  <joeshaw@novell.com>
5133
5134         * configure.in: If --enable-mono is passed in, if we can't find
5135         mono error out.
5136
5137         * mono/Makefile.am: Use /gacutil to install assemblies into the
5138         GAC and not /root.
5139
5140 2004-08-12  Havoc Pennington  <hp@redhat.com>
5141
5142         * NEWS: update for 0.22
5143
5144         * configure.in: release 0.22
5145
5146 2004-08-11  Colin Walters  <walters@redhat.com>
5147
5148         * tools/dbus-send.c (main, usage): Add --reply-timeout
5149         argument.
5150
5151 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5152
5153         * bus/bus.c (process_config_first_time_only): get rid of an unused
5154         DBusError that was causing a memoy leak (bug #989).
5155
5156         * dbus/dbus-keyring.c, dbus/dbus-message.c:
5157         fix compilation on Solaris/Forte C (bug #974)
5158
5159         * bus/main.c (main): plug two minuscule memleaks.
5160
5161 2004-08-10  Havoc Pennington  <hp@redhat.com>
5162
5163         * doc/dbus-tutorial.xml: add some more info on GLib bindings
5164
5165 2004-08-09  Havoc Pennington  <hp@redhat.com>
5166
5167         * COPYING: switch to Academic Free License version 2.1 instead of
5168         2.0, to resolve complaints about patent termination clause.
5169
5170 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
5171
5172         * README: added documentation for the --enable-python 
5173         configure switch.
5174
5175 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5176
5177         * bus/config-parser.c (bus_config_parser_new): fix an invalid
5178         _unref in the SELinux support.
5179
5180         * doc/busconfig.dtd: update DTD for SELinux support.
5181
5182         * bus/config-loader-libxml.c: fix error handler and parser
5183         initialisation/cleanup. OOM test now works with libxml2 HEAD.
5184
5185         * configure.in: remove the warning about libxml2.
5186
5187         * dbus/dbus-bus.c: silence doxygen warning.
5188
5189 2004-07-31  Colin Walters  <walters@redhat.com>
5190
5191         * configure.in: Move #error in SELinux check to its own line.
5192
5193 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5194
5195         * dbus/dbus-internals.h (_DBUS_SET_OOM):
5196         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
5197         dbus_error_set.
5198
5199         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
5200         broken by the change in the _SET_OOM macros.
5201
5202 2004-07-31  Colin Walters  <walters@redhat.com>
5203
5204         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
5205         BUS_SET_OOM.
5206
5207 2004-07-31  Colin Walters  <walters@redhat.com>
5208
5209         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
5210         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
5211         AC_MSG_CHECKING.
5212
5213 2004-07-24  Havoc Pennington  <hp@redhat.com>
5214
5215         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5216
5217         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
5218         functionality
5219
5220         * configure.in: add --enable-selinux
5221         
5222         * bus/policy.c (bus_policy_merge): add FIXME to a comment
5223
5224         * bus/main.c (main): initialize and shut down selinux
5225
5226         * bus/connection.c: store SELinux ID on each connection, to avoid 
5227         repeated getting of the string context and converting it into 
5228         an ID
5229
5230         * bus/bus.c (bus_context_get_policy): new accessor, though it
5231         isn't used
5232         (bus_context_check_security_policy): check whether the security
5233         context of sender connection can send to the security context of
5234         recipient connection
5235
5236         * bus/config-parser.c: add parsing for <selinux> and <associate>
5237         
5238         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
5239         implement dbus_connection_get_unix_fd()
5240
5241         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
5242         function, used by the selinux stuff
5243         
5244 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5245
5246         * bus/config-loader-libxml.c: complete the implementation of
5247         libxml backend for config file loader. Doesn't work with full OOM
5248         test yet. 
5249         
5250         * configure.in: change error when selecting libxml into a warning.
5251         
5252         * test/data/invalid-config-files: add two non-well-formed XML
5253         files. 
5254         
5255         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
5256         
5257         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
5258         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
5259         be necessary to read all the buffer. (bug #894)
5260
5261         * bus/activation.c (bus_activation_activate_service): fix a
5262         potential assertion failure (bug #896). Small optimization in the
5263         case of auto-activation messages.
5264
5265         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
5266         add test case for byte-through-vararg bug (#901). patch by Kimmo
5267         Hämäläinen. 
5268
5269 2004-07-28  Anders Carlsson  <andersca@gnome.org>
5270
5271         * python/dbus.py:
5272         * python/dbus_bindings.pyx.in:
5273         Add dbus.init_gthreads (), allow emit_signal to pass
5274         arguments to the signal.
5275         
5276 2004-07-24  Havoc Pennington  <hp@redhat.com>
5277
5278         * AUTHORS: add some people, not really comprehensively, let me
5279         know if I missed you
5280
5281 2004-07-24  Havoc Pennington  <hp@redhat.com>
5282
5283         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
5284         Owen
5285
5286         * test/Makefile.am (DIST_SUBDIRS): here also
5287
5288 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5289
5290         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
5291         breaking build on Solaris, reported by Farhad Saberi on the ML.
5292
5293         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
5294         va_arg invocation to account for integer promotion in the case of
5295         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
5296
5297         * bus/services.c (bus_service_remove_owner): fix bug #902, use
5298         _dbus_list_get_first_link, not _dbus_list_get_first.
5299
5300         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
5301
5302         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
5303         handler functions so that the asserts in _dbus_object_subtree_unref
5304         do not fail.
5305
5306         * dbus/dbus-transport-unix.c (do_reading):
5307         _dbus_transport_queue_messages return value is of type
5308         dbus_bool_t, not DBusDispatchStatus.
5309         
5310 2004-07-19  David Zeuthen  <david@fubar.dk>
5311
5312         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
5313
5314         * bus/dispatch.c:
5315         (check_get_connection_unix_user): Debug says GetProperty; but the
5316         method is called GetConnectionUnixUser
5317         (check_get_connection_unix_process_id): New function
5318         (bus_dispatch_test): Actually call check_get_connection_unix_user();
5319         also call check_get_connection_unix_process_id()
5320         
5321         * bus/driver.c:
5322         (bus_driver_handle_get_connection_unix_process_id): New function,
5323         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
5324         interface
5325         
5326         * dbus/dbus-auth.c:
5327         (handle_server_data_external_mech): Set pid from the credentials
5328         obtained from the socket
5329         
5330         * dbus/dbus-connection.c:
5331         (dbus_connection_get_unix_process_id): New function
5332         
5333         * dbus/dbus-connection.h: 
5334         Add prototype for dbus_connection_get_unix_process_id
5335         
5336         * dbus/dbus-transport.c:
5337         (_dbus_transport_get_unix_process_id): New function
5338         
5339         * dbus/dbus-transport.h:
5340         Add prototype for _dbus_transport_get_unix_process_id
5341         
5342 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5343
5344         * dbus/dbus-message.c: Message counter fix, patch by Christian
5345         Hammond <chipx86@gnupdate.org>
5346
5347 2004-07-18  Seth Nickell  <seth@gnome.org>
5348
5349         * python/dbus.py:
5350         * python/dbus_bindings.pyx.in:
5351         * python/tests/test-client.py:
5352
5353         Add dbus.ByteArray and dbus_bindings.ByteArray
5354         types so that byte streams can be passed back.
5355
5356         Give jdahlin the heaps of credit that are so
5357         rightfully his.
5358         
5359 2004-07-12  Seth Nickell  <seth@gnome.org>
5360
5361         * python/dbus.py:
5362
5363         Add message argument to the default object_method_handler
5364         function.
5365         
5366         * python/dbus_bindings.pyx.in:
5367
5368         Automatically return NIL when passed an empty list
5369         (we can't pass back a list since lists are typed
5370         and we don't have any idea what type the the client
5371         intended the list to be... :-( )
5372         
5373 2004-07-10  Seth Nickell  <seth@gnome.org>
5374
5375         * python/examples/Makefile.am:
5376
5377         Fix distcheck breakage caused by new examples.
5378
5379 2004-07-10  Seth Nickell  <seth@gnome.org>
5380
5381         * python/dbus.py:
5382
5383         Add "message" argument to service-side dbus.Object
5384         methods. This will break existing services written
5385         using the python bindings, but will allow extraction
5386         of all the message information (e.g. who its from).
5387
5388         Add improved "object oriented" signal handling/emission.
5389         
5390         * python/examples/example-service.py:
5391
5392         Nix this example.
5393         
5394         * python/examples/example-signal-emitter.py:
5395         * python/examples/example-signal-recipient.py:
5396
5397         Two new examples that show how to emit and receive
5398         signals using the new APIs.
5399         
5400         * python/examples/example-signals.py:
5401         * python/examples/gconf-proxy-service.py:
5402         * python/examples/gconf-proxy-service2.py:
5403
5404         Add "message" argument to service methods.
5405
5406 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
5407
5408         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
5409         * dbus/bus.c (dbus_bus_get_unix_user)
5410         * doc/dbus-specification.xml: implement GetConnectionUnixUser
5411         method of org.freedesktop.DBus interface.
5412
5413         * bus/dispatch.c: test case
5414
5415 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
5416
5417         * python/Makefile.am: switched include directory from glib/ to dbus/
5418         since dbus-glib.h moved
5419  
5420 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5421
5422         * configure.in: prevent building the gcj stuff and libxml loader
5423         since they are broken.
5424
5425 2004-06-20  Havoc Pennington  <hp@redhat.com>
5426
5427         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
5428         codes from the dbus error names
5429         
5430         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
5431         as dbus/dbus-glib.h and that breakage is now visible due to 
5432         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
5433         
5434         * glib/dbus-glib.h: s/gproxy/g_proxy/
5435
5436         * dbus/dbus-shared.h: new header to hold stuff shared with
5437         binding APIs
5438         
5439         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
5440         than dbus-errors.h
5441
5442         * glib/dbus-glib.h (dbus_set_g_error): move to
5443         dbus-glib-lowlevel.h
5444
5445         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
5446         of stuff to enable this
5447
5448         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
5449
5450         * a bunch of other changes with the same basic "separate glib 
5451         bindings from dbus.h" theme
5452         
5453 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
5454
5455         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
5456
5457         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
5458
5459 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5460
5461         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
5462         the reply value of the ServiceExists message.
5463
5464 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
5465
5466         * python/dbus_bindings.pyx.in: No longer need to parse path
5467         elements and pass them as arrays of strings.  The C API now
5468         accepts plain path strings.
5469         (_build_parsed_path): removed 
5470
5471 2004-06-07  Havoc Pennington  <hp@redhat.com>
5472
5473         * doc/TODO: remove auto-activation item since it's done; sort
5474         items by importance/milestone
5475
5476 2004-06-07  Havoc Pennington  <hp@redhat.com>
5477
5478         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
5479         random signature when using REQUIRED_FIELDS (this hack won't work
5480         in the long term)
5481
5482         * dbus/dbus-message.c: change the signature to be a header field,
5483         instead of message->signature special-case string. Incremental
5484         step forward. Then we can fix up code to send the signature in the
5485         message, then fix up code to validate said signature, then fix up
5486         code to not put the typecodes inline, etc.
5487         (load_one_message): don't make up the signature after the fact
5488         (decode_header_data): require signature field for the known
5489         message types
5490
5491         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
5492
5493         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
5494
5495 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
5496
5497         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5498
5499         * mono/Handler.cs: Updated to follow new path argument for
5500         (un-)registering objects.
5501
5502         * mono/example/Makefile.am:
5503         * mono/Makefile.am:
5504         * configure.in: Bumped required version for mono and use new -pkg
5505         syntax for deps
5506
5507 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5508
5509         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
5510         registration functions take the path argument as char* instead of
5511         char**.
5512
5513         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
5514         split off the path decompostion part of
5515         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
5516         warnings. 
5517
5518         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
5519         
5520 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5521  
5522         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
5523         machine approach.  A state is implemented as a function that
5524         handles incoming events as specified for that state.
5525         
5526         * doc/dbus-specification.xml: Update auth protocol state machine
5527         specification to match implementation.  Remove some leftover
5528         base64 examples.
5529
5530 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5531
5532         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
5533         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
5534         quiet doxygen.
5535
5536         * Doxyfile.in: remove deprecated options.
5537
5538         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
5539         glib/test-thread.h, glib/test-thread-client.c,
5540         glib/test-thread-server.c, glib/test-profile.c,
5541         glib/test-dbus-glib.c: remove these unused files.
5542
5543 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5544
5545         * dbus/dbus-object-tree.c
5546         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
5547         non-fallback handlers (bug #684).
5548         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
5549         (find_subtree_recurse): report wether the returned subtree is an
5550         exact match or a "fallback" match higher up in the tree.
5551         (object_tree_test_iteration): update test case.
5552
5553 2004-06-01  Seth Nickell  <seth@gnome.org>
5554
5555         * python/dbus_bindings.pyx.in:
5556         * python/tests/test-client.py:
5557
5558         Round off basic type support. Add dicts (yay!), and 
5559         remaining array types.
5560
5561         Make MessageIter more general so it works for dicts too.
5562
5563         Mark all loop variables as C integers.
5564         
5565 2004-05-31  Havoc Pennington  <hp@redhat.com>
5566
5567         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
5568         "in" before "out"
5569
5570         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
5571
5572         * glib/dbus-glib-tool.c (main): set up to have a --self-test
5573         option that runs the tests, and start filling in some code
5574         including for starters just dumping the interfaces to stdout
5575
5576         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
5577
5578         * test/data/valid-introspection-files/lots-of-types.xml: test of
5579         an example introspection file
5580
5581         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
5582         "node" (I think...)
5583
5584 2004-05-31  Seth Nickell  <seth@gnome.org>
5585
5586         * python/dbus_bindings.pyx.in:
5587         * python/tests/test-client.py:
5588
5589         Test Suite: 1
5590         Python Bindings: 0
5591
5592         Fix string array memory trashing bug... oops...
5593
5594 2004-05-30  Seth Nickell  <seth@gnome.org>
5595
5596         * python/dbus.py:
5597
5598         Add a nicer-but-less-flexible alternate API for handling 
5599         calls to virtual objects in dbus.ObjectTree.
5600
5601         Screw up the argument order to the dbus.Object constructor
5602         for consistency with dbus.ObjectTree (and to make dbus_methods
5603         optional for future extension)
5604         
5605         * python/examples/Makefile.am:
5606         * python/examples/gconf-proxy-service.py:
5607         * python/examples/gconf-proxy-service2.py:
5608
5609         Alternate implementation of gconf-proxy-service using the
5610         nicer dbus.ObjectTree API.
5611         
5612         * python/examples/example-service.py:
5613         * python/tests/test-server.py
5614
5615         Reverse the argument order to deal with dbus.Object constructor
5616         changes.
5617         
5618 2004-05-30  Seth Nickell  <seth@gnome.org>
5619
5620         * python/examples/example-client.py:
5621         * python/examples/example-service.py:
5622
5623         Take it back. Lists seem to work but they're broken
5624         in the test suite. Make the base examples use
5625         lists (works fine).
5626
5627 2004-05-30  Seth Nickell  <seth@gnome.org>
5628
5629         * python/dbus_bindings.pyx.in:
5630         * python/tests/test-client.py:
5631
5632         Add some more tests and fix errors that crop up.
5633         Unfortunately, currently it seems like marshalling
5634         and unmarshalling of lists is completely broken :-(
5635
5636 2004-05-30  Seth Nickell  <seth@gnome.org>
5637
5638         * python/dbus_bindings.pyx.in:
5639
5640         Add support for ObjectPath type.
5641
5642         * python/dbus.py:
5643
5644         Refactor message handling code to a common function.
5645         
5646         * python/tests/test-client.py:
5647         * python/tests/test-server.py:
5648
5649         Add tests that check to make sure values of all types
5650         can be echoed from a service w/o mangling.
5651         
5652 2004-05-29  Seth Nickell  <seth@gnome.org>
5653
5654         * python/dbus.py:
5655
5656         Add ObjectTree class which allows implementation
5657         of trees of "virtual" objects. Basically the python
5658         wrapper for "register_fallback".
5659         
5660         * python/examples/Makefile.am
5661         * python/examples/gconf-proxy-client.py:
5662         * python/examples/gconf-proxy-service.py:
5663
5664         Implement a simple GConf proxy service that supports
5665         get/set on string and int GConf keys using the ObjectTree.
5666         
5667 2004-05-29  Seth Nickell  <seth@gnome.org>
5668
5669         * python/dbus.py:
5670         * python/examples/example-client.py:
5671         * python/examples/example-service.py:
5672         * python/examples/list-system-services.py:
5673
5674         Add SessionBus, SystemBus and ActivationBus classes
5675         so you don't need to know the special little BUS_TYPE
5676         flag.
5677         
5678 2004-05-29  Havoc Pennington  <hp@redhat.com>
5679
5680         * bus/config-parser.c (process_test_valid_subdir): temporarily
5681         stop testing config parser OOM handling, since expat has issues
5682         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
5683
5684         * bus/dbus-daemon-1.1.in: change requested_reply to
5685         send_requested_reply/receive_requested_reply so we can send the
5686         replies, not just receive them.
5687
5688         * bus/config-parser.c: parse the new
5689         send_requested_reply/receive_requested_reply
5690
5691         * bus/policy.c (bus_client_policy_check_can_send): add
5692         requested_reply argument and use it
5693
5694         * bus/bus.c (bus_context_check_security_policy): pass through
5695         requested_reply status to message send check
5696
5697         * bus/system.conf.in: adapt to requested_reply change
5698         
5699 2004-05-28  Havoc Pennington  <hp@redhat.com>
5700
5701         * test/glib/test-service-glib.c (main): remove unused variable
5702
5703         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
5704
5705         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
5706         from the enum, no longer in use.
5707
5708         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
5709         works right.
5710
5711         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
5712         whether error_name passed in is a valid error name.
5713
5714 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
5715
5716         * dbus/dbus-message.c (dbus_message_get_args): Added support for
5717         OBJECT_PATH and OBJECT_PATH_ARRAY
5718
5719 2004-05-28  Seth Nickell  <seth@gnome.org>
5720
5721         * python/examples/Makefile.am:
5722
5723         Forget to add Makefile.am. Do not pass go.
5724
5725 2004-05-28  Michael Meeks  <michael@ximian.com>
5726
5727         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
5728         fix no int64 case.
5729
5730         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
5731
5732         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
5733         (_dbus_message_iter_get_basic_type_array): impl.
5734         drastically simplify ~all relevant _get methods to use these.
5735         (_dbus_message_iter_append_basic_array),
5736         (dbus_message_iter_append_basic): impl
5737         drastically simplify ~all relevant _append methods to use these.
5738
5739         * dbus/dbus-message-builder.c (parse_basic_type) 
5740         (parse_basic_array, lookup_basic_type): impl.
5741         (_dbus_message_data_load): prune scads of duplicate /
5742         cut & paste coding.
5743
5744         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
5745         (_dbus_demarshal_basic_type): implement,
5746         (demarshal_and_validate_len/arg): beef up debug.
5747         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
5748
5749 2004-05-27  Seth Nickell  <seth@gnome.org>
5750
5751         * configure.in:
5752         * python/Makefile.am:
5753
5754         Include the example python apps in the tarball.
5755         
5756         * python/examples/list-system-services.py
5757
5758         Add a python new example that fetches the list of services
5759         from the system bus.
5760         
5761 2004-05-27  Seth Nickell  <seth@gnome.org>
5762
5763         * python/dbus.py:
5764         * python/dbus_bindings.pyx.in:
5765
5766         Fix failure to notify that a signal was not handled,
5767         resulted in hung functions.
5768         
5769 2004-05-25  Colin Walters  <walters@redhat.com>
5770
5771         * tools/dbus-monitor.c (main): Monitor all types of messages.
5772
5773 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
5774
5775         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
5776         which unregisters the object path and disposes the handler.
5777
5778 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
5779  
5780         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
5781          
5782         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
5783         operands to && so we call dbus_message_iter_next () for the last
5784         argument also.
5785
5786 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5787
5788         * dbus/dbus-object-tree.c
5789         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
5790         children even if the requested path isn't registered.
5791         (object_tree_test_iteration): test object_tree_list_registered.
5792
5793         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
5794         it to 0.
5795         
5796 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
5797
5798         * doc/TODO: Remove resolved items.
5799
5800         * bus/expirelist.h (struct BusExpireList): remove unused n_items
5801         field.
5802         
5803         * bus/connection.c (bus_connections_expect_reply): Enforce the
5804         per-connection limit on pending replies.
5805         
5806         Patch from Jon Trowbridge <trow@ximian.com>:
5807  
5808         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
5809         up a watch that triggers a config reload when one end of the pipe
5810         becomes readable.
5811         (signal_handler): Instead of doing the config reload in our SIGHUP
5812         handler, just write to the reload pipe and let the associated
5813         watch handle the reload when control returns to the main loop.
5814  
5815         * bus/driver.c (bus_driver_handle_reload_config): Added.
5816         Implements a ReloadConfig method for requesting a configuration
5817         file reload via the bus driver.
5818  
5819 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
5820
5821         * HACKING: Updated release instructions concerning the wiki page.
5822
5823 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
5824
5825         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
5826         filter against auth->allowed_mechs; we only add allowed mechs in
5827         record_mechanisms().
5828  
5829         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
5830         ALLOWED_MECHS to auth-script format so we can set the list of
5831         allowed mechanisms.
5832  
5833         * data/auth/client-out-of-mechanisms.auth-script: New test to
5834         check client disconnects when it is out of mechanisms to try.
5835  
5836         * dbus/dbus-auth.c (process_command): Remove check for lines
5837         longer that 1 MB; we only buffer up maximum 16 kB.
5838  
5839         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5840         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
5841         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
5842         assume there might be unused bytes.
5843  
5844         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
5845         client-out-of-mechs, it is handled in process_reject(). Move check
5846         for max failures to send_rejected(), as it's a server-only thing.
5847
5848         * dbus/dbus-auth.c: Factor out protocol reply code into functions
5849         send_auth(), send_data(), send_rejected(), send_error(),
5850         send_ok(), send_begin() and send_cancel().
5851
5852 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
5853
5854         Remove base64 encoding, replace with hex encoding. Original patch
5855         from trow@ximian.com, added error handling.
5856
5857         * dbus/dbus-string.c (_dbus_string_base64_encode)
5858         (_dbus_string_base64_decode): Remove.
5859         (_dbus_string_hex_decode): Add end_return argument so we can
5860         distinguish between OOM and invalid hex encoding.
5861         (_dbus_string_test): Remove base64 tests and add test case for
5862         invalid hex.
5863
5864         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
5865         Replace base64 with hex.
5866
5867         * test/data/auth/invalid-hex-encoding.auth-script: New test case
5868         for invalid hex encoded data in auth protocol.
5869
5870 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5871
5872         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
5873         leak.
5874
5875 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5876
5877         * mono/dbus-sharp.dll.config.in: Added for GAC
5878         * mono/dbus-sharp.snk: Added for GAC
5879         * mono/Assembly.cs.in: Added for GAC
5880         * mono/Makefile.am: Changes for GAC installation        
5881         * configure.in: Added refs for dbus-sharp.dll.config.in and
5882         Assembly.cs.in. More fixes for mono testing
5883         * mono/example/Makefile.am: Changed var to CSC
5884         * Makefile.am: Changed flag name to DBUS_USE_CSC
5885
5886 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5887
5888         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
5889         * mono/doc/*: Added documentation framework
5890         * configure.in: Added monodoc check
5891         * README: Added description of mono configure flags
5892
5893 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
5894
5895         * doc/dbus-specification.xml: Added a "Required" column to the 
5896         header fields table and changed the "zero or more" verbage in
5897         the above paragraph to read "The header must contain the required 
5898         named header fields and zero or more of the optional named header 
5899         fields".
5900         * test/data/invalid-messages/*.message: Added the required PATH 
5901         named header field to the tests so that they don't fail on 
5902         'Missing path field'
5903
5904 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
5905
5906         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
5907         the stack by implicitly defining variable and parameter types and
5908         removing the hack of defining C pointers as python objects and later
5909         casting them.
5910
5911 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
5912
5913         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
5914
5915 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
5916
5917         * mono/DBusType/Dict.cs: Handle empty dicts
5918         * mono/DBusType/Array.cs: Handle empty arrays
5919         * mono/Arguments.cs: Handle empty arguments
5920
5921 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
5922
5923         * dbus-sharp.pc.in: Modified to include include Libs and Requires
5924         field
5925
5926 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
5927
5928         * test/data/valid-messages/standard-*.message: Update message
5929         test scripts to new header field names.
5930
5931 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
5932
5933         * test/break-loader.c (randomly_do_n_things): tracked down buffer
5934         overflow to times_we_did_each_thing array which would chop off the
5935         first character of the failure_dir string. Increased the size of
5936         the array to 7 to reflect the number of random mutation functions
5937         we have.
5938
5939 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
5940
5941         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
5942         unix_server->watch here, it is unreffed in disconnect.
5943         (_dbus_server_new_for_tcp_socket): convert NULL host to
5944         "localhost" here so we don't append NULL to address.
5945         
5946         * dbus/dbus-server.c (_dbus_server_test): Add test case for
5947         various addresses, including tcp with no explicit host.
5948
5949 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5950
5951         * dbus/dbus-message.c (decode_header_data, decode_string_field):
5952         fix incorrect setting of .name_offset in the HeaderField (it was
5953         off by two bytes, positioned right after the name and typecode)
5954
5955         * bus/bus.c (bus_context_new, bus_context_unref): test before
5956         calling dbus_server_free_data_slot and _dbus_user_database_unref
5957         in case of an error.
5958
5959         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
5960         by libdbus-gtool.
5961
5962 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
5963
5964         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
5965         _dbus_poll() instead of select().
5966
5967 2004-04-15  Jon Trowbridge  <trow@ximian.com>
5968
5969         * bus/main.c (signal_handler): Reload the configuration files
5970         on SIGHUP.
5971         (main): Set up our SIGHUP handler.
5972
5973         * bus/bus.c (struct BusContext): Store the config file, user and
5974         fork flag in the BusContext.
5975         (process_config_first_time_only): Added.  Contains the code
5976         (previously in bus_context_new) for setting up the BusContext from
5977         the BusConfigParser that should only be run the first time the
5978         config files are read.
5979         (process_config_every_time): Added.  Contains the code (previously
5980         in bus_context_new) for setting up the BusContext from the
5981         BusConfigParser that should be run every time the config files are
5982         read.
5983         (load_config): Added.  Builds a BusConfigParser from the config
5984         files and passes the resulting structure off to
5985         process_config_first_time_only (assuming this is the first time)
5986         and process_config_every_time.
5987         (bus_context_new): All of the config-related code has been moved
5988         to process_config_first_time_only and process_config_every_time.
5989         Now this function just does the non-config-related initializations
5990         and calls load_config.
5991         (bus_context_reload_config): Added.
5992
5993 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5994
5995         * bus/driver.c (bus_driver_handle_get_service_owner):
5996         implement a GetServiceOwner method.
5997         * doc/dbus-specification.xml: document it.
5998         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
5999         
6000         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
6001         implement, using the bus GetServiceOwner method.
6002
6003         * test/glib/test-dbus-glib.c:
6004         use dbus_gproxy_new_for_service_owner so that we can receive the
6005         signal. 
6006
6007 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
6008
6009         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6010         dbus/dbus-message.c, dbus/dbus-protocol.h
6011         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
6012
6013         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6014         dbus/dbus-message.c, dbus/dbus-protocol.h
6015         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
6016
6017         * dbus/dbus-internals.c (_dbus_header_field_to_string):
6018         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
6019         DBUS_HEADER_FIELD_SENDER resolves to "sender"
6020
6021         * doc/dbus-specification.xml (Header Fields Table):
6022         s/SERVICE/DESTINATION
6023         s/SENDER_SERVICE/SENDER
6024
6025
6026 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6027
6028         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
6029         a few seconds.
6030
6031 2004-04-13  Michael Meeks  <michael@ximian.com>
6032
6033         * glib/dbus-gobject.c (handle_introspect): split out
6034         (introspect_properties): this.
6035         (handle_introspect): implement this.
6036
6037         * test/glib/Makefile.am: use the absolute path so the bus
6038         daemon's chdir ("/") doesn't kill us dead.
6039
6040         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
6041
6042 2004-04-12  Jon Trowbridge  <trow@ximian.com>
6043
6044         * bus/config-parser.c (struct BusConfigParser): Added
6045         included_files field.
6046         (seen_include): Added.  Checks whether or not a file has already
6047         been included by any parent BusConfigParser.
6048         (bus_config_parser_new): Copy the parent's included_files.
6049         (include_file): Track which files have been included, and fail on
6050         circular inclusions.
6051         (process_test_valid_subdir): Changed printf to report if we are
6052         testing valid or invalid conf files.
6053         (all_are_equiv): Changed printf to be a bit clearer about
6054         what we are actually doing.
6055         (bus_config_parser_test): Test invalid configuration files.
6056
6057 2004-04-09  Jon Trowbridge  <trow@ximian.com>
6058
6059         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
6060         argument.  If non-null, the newly-constructed BusConfigParser will
6061         be initialized with the parent's BusLimits instead of the default
6062         values.
6063         (include_file): When including a config file, pass in
6064         the current parser as the parent and then copy the BusLimits
6065         from the included BusConfigParser pack to the current parser.
6066         (process_test_valid_subdir): Renamed from process_test_subdir.
6067         (process_test_equiv_subdir): Added.  Walks through a directory,
6068         descending into each subdirectory and loading the config files
6069         it finds there.  If any subdirectory contains two config files
6070         that don't produce identical BusConfigParser structs, fail.
6071         For now, the BusConfigParser's BusPolicies are not compared.
6072         (bus_config_parser_test): Call both process_test_valid_subdir and
6073         process_test_equiv_subdir.
6074
6075         * bus/config-loader-libxml.c (bus_config_load): Take a parent
6076         argument and pass it along to the call to bus_config_parser_new.
6077         Also made a few small changes to allow this code to compile.
6078
6079         * bus/config-loader-expat.c (bus_config_load): Take a parent
6080         argument and pass it along to the call to bus_config_parser_new.
6081
6082         * bus/bus.c (bus_context_new): Load the config file
6083         with a NULL parent argument.
6084
6085 2004-03-29  Michael Meeks  <michael@ximian.com>
6086
6087         * glib/dbus-gobject.c (introspect_properties): split
6088         out, fix mangled 'while' flow control.
6089         (introspect_signals): implement.
6090         (handle_introspect): update.
6091
6092 2004-03-29  Michael Meeks  <michael@ximian.com>
6093
6094         * glib/dbus-gobject.c (set_object_property): split out / 
6095         re-work, use the property type, and not the message type(!)
6096         (get_object_property): ditto.
6097
6098         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
6099         (dbus_gvalue_marshal): make this code re-usable, needed
6100         for signals too, also on both proxy and server side.
6101         Re-write for more efficiency / readability.
6102
6103 2004-03-29  Michael Meeks  <michael@ximian.com>
6104
6105         * dbus/dbus-message.c
6106         (dbus_message_new_error_printf): impl.
6107
6108         * dbus/dbus-connection.c
6109         (dbus_connection_unregister_object_path): fix warning.
6110
6111         * configure.in: fix no-mono-installed situation.
6112
6113 2004-03-27  Havoc Pennington  <hp@redhat.com>
6114
6115         Patch from Timo Teräs:
6116         
6117         * tools/dbus-send.c (main): if --print-reply, assume type is
6118         method call; support boolean type args
6119         
6120         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
6121         bunch of memleak and logic bugs
6122         
6123 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
6124
6125         * mono/Arguments.cs:
6126         * mono/Introspector.cs:
6127         * mono/Handler.cs:
6128         * mono/InterfaceProxy.cs:
6129         * mono/Message.cs
6130         * mono/ProxyBuilder.cs:
6131         * mono/Service.cs:
6132         Added InterfaceProxy class to avoid building proxies for every
6133         object.
6134
6135         * dbus-message.h:
6136         * dbus-message.c (dbus_message_append_args_valist)
6137         (dbus_message_iter_get_object_path)
6138         (dbus_message_iter_get_object_path_array)
6139         (dbus_message_iter_append_object_path)
6140         (dbus_message_iter_append_object_path_array):
6141         Added object_path iter functions to handle OBJECT_PATH arguments
6142         
6143 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
6144
6145         First checkin of mono bindings.
6146         * configure.in:
6147         * Makefile.am:
6148         Build stuff for the bindings
6149         * dbus-sharp.pc.in: Added for pkgconfig
6150         
6151 2004-03-21  Havoc Pennington  <hp@redhat.com>
6152
6153         * test/test-service.c (main): remove debug spew
6154
6155 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6156
6157         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
6158         arrays
6159
6160         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
6161         (dbus_message_iter_init_array_iterator)
6162         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
6163         indicate whether the iterator is empty
6164
6165         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
6166         warnings
6167
6168 2004-03-19  Havoc Pennington  <hp@redhat.com>
6169
6170         * NEWS: 0.21 updates
6171
6172         * configure.in: 0.21
6173
6174         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
6175         
6176         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
6177         you don't need pyrex to make dist
6178
6179         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
6180         sources; run moc
6181         
6182 2004-03-18  Richard Hult  <richard@imendio.com>
6183
6184         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
6185         (dbus_message_set_auto_activation): Add doxygen docs.
6186
6187 2004-03-16  Richard Hult  <richard@imendio.com>
6188
6189         * bus/activation.c: (bus_activation_service_created),
6190         (bus_activation_send_pending_auto_activation_messages),
6191         (bus_activation_activate_service):
6192         * bus/activation.h:
6193         * bus/dispatch.c: (bus_dispatch),
6194         (check_nonexistent_service_auto_activation),
6195         (check_service_auto_activated),
6196         (check_segfault_service_auto_activation),
6197         (check_existent_service_auto_activation), (bus_dispatch_test):
6198         * bus/driver.c: (bus_driver_handle_activate_service):
6199         * bus/services.c: (bus_registry_acquire_service):
6200         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
6201         (dbus_message_get_auto_activation):
6202         * dbus/dbus-message.h:
6203         * dbus/dbus-protocol.h: Implement auto-activation.
6204         
6205         * doc/dbus-specification.xml: Add auto-activation to the spec.
6206
6207 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6208
6209         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
6210         fix a bug with CUSTOM types.
6211
6212         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
6213         a unit test for this bug (used to fail).
6214
6215 2004-03-12  Mikael Hallendal  <micke@imendio.com>
6216
6217         * bus/activation.c:
6218         (babysitter_watch_callback): notify all pending activations waiting for
6219           the same exec that the activation failed.
6220         (bus_activation_activate_service): shortcut the activation if we 
6221           already waiting for the same executable to start up.
6222
6223 2004-03-12  Mikael Hallendal  <micke@imendio.com>
6224
6225         * bus/activation.c: 
6226         - Added service file reloading. 
6227           Each service files directory is kept in an hash table in 
6228           BusActivation and each BusActivationEntry knows what .service-file it
6229           was read from. So when you try to activate a service the bus will 
6230           check if it's been updated, removed or if new .service-files has 
6231           been installed.
6232         - Test code at the bottom for the service file reloading.
6233         * bus/test-main.c: (main):
6234         * bus/test.h:
6235         - added service reloading test.
6236         * dbus/dbus-sysdeps.c: 
6237         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
6238
6239 2004-03-08  Michael Meeks  <michael@ximian.com>
6240
6241         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
6242         bail immediately if disconnected, to avoid busy loop.
6243
6244         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
6245         cleanup cut/paste/inefficiency.
6246
6247 2004-03-01  David Zeuthen  <david@fubar.dk>
6248
6249         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
6250         bug where args were used twice. This bug resulted in a segfault
6251         on a Debian/PPC system when starting the messagebus daemon. Include
6252         dbus-sysdeps.h for DBUS_VA_COPY
6253
6254         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
6255
6256         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
6257         appropriate va_copy implementation. From GLib
6258         
6259 2004-02-24  Joe Shaw  <joe@ximian.com>
6260
6261         * bus/services.c (bus_registry_acquire_service): We need to pass
6262         in the service name to dbus_set_error() to prevent a crash.
6263
6264 2003-12-26  Anders Carlsson  <andersca@gnome.org>
6265
6266         * AUTHORS: Reveal my True identity.
6267
6268 2003-12-17  Mikael Hallendal  <micke@imendio.com>
6269
6270         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
6271         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
6272
6273 2003-12-13  Mikael Hallendal  <micke@imendio.com>
6274
6275         * doc/TODO: Added not about better error check of configuration files.
6276
6277 2003-12-02  Richard Hult  <richard@imendio.com>
6278
6279         * Update AFL version to 2.0 throughout the source files to reflect
6280         the update that was done a while ago.
6281
6282 2003-12-02  Richard Hult  <richard@imendio.com>
6283
6284         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
6285         wrote_dict_key to FALSE on the iter that the dict is appended to,
6286         just like when appending other types. Fixes a bug where a dict
6287         couldn't be put inside a dict.
6288         (dbus_message_iter_append_dict_key): Fix typo in warning message.
6289         (message_iter_test, _dbus_message_test): Add test case for dict
6290         inside dict.
6291
6292 2003-12-01  David Zeuthen  <david@fubar.dk>
6293
6294         * python/dbus.py: Add the actual message when calling the reciever
6295         of a signal such that parameters can be inspected. Add the method
6296         remove_signal_receiver
6297         
6298 2003-11-26  Mikael Hallendal  <micke@imendio.com>
6299
6300         * bus/*.[ch]:
6301         * dbus/*.[ch]:
6302         * glib/*.[ch]: Made ref functions return the pointer
6303
6304 2003-11-25  Zack Rusin  <zack@kde.org>
6305
6306         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
6307
6308         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
6309         wrappers,
6310
6311         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
6312         the Integrator and to better fit with the server,
6313
6314 2003-11-24  Zack Rusin  <zack@kde.org>
6315
6316         * qt/connection.h, qt/connection.cpp: removing initDbus method since
6317         the integrator handles it now
6318
6319         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
6320         since QTimer wasn't really meant to be used the way DBusTimeout is
6321
6322 2003-11-24  Zack Rusin  <zack@kde.org>
6323
6324         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
6325         Integrator class which integrates D-BUS with the Qt event loop,
6326
6327         * qt/connection.h, qt/connection.cpp: Move all the code which
6328         was dealing with D-BUS integration to the Integrator class,
6329         and start using Integrator,
6330
6331 2003-11-23  Zack Rusin  <zack@kde.org>
6332
6333         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
6334         wrapper
6335
6336         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
6337         switching namespaces to DBusQt, reworking the class,
6338
6339         * Makefile.cvs: switching dependencies so that it matches KDE 
6340         schematics,
6341         
6342         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
6343         the library
6344
6345 2003-11-19  Havoc Pennington  <hp@redhat.com>
6346
6347         * NEWS: update
6348
6349         * configure.in: bump version to 0.20
6350
6351         * configure.in (have_qt): add yet another place to look for qt
6352         (someone hand trolltech a .pc file...)
6353
6354 2003-11-01  Havoc Pennington  <hp@redhat.com>
6355
6356         * doc/dbus-specification.xml: add state machine docs on the auth
6357         protocol; just a first draft, I'm sure it's wrong.      
6358
6359 2003-10-28  David Zeuthen  <david@fubar.dk>
6360
6361         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
6362         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
6363         
6364 2003-10-28  Havoc Pennington  <hp@redhat.com>
6365
6366         * dbus/dbus-message.c (get_next_field): delete unused function
6367
6368 2003-10-28  Havoc Pennington  <hp@redhat.com>
6369
6370         * bus/expirelist.c (do_expiration_with_current_time): detect
6371         failure of the expire_func due to OOM
6372
6373         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
6374
6375         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
6376         NoReply error that's now created by the bus when the service exits
6377
6378 2003-10-28  Havoc Pennington  <hp@redhat.com>
6379
6380         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
6381         tests for set_path, set_interface, set_member, etc.
6382
6383         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
6384
6385         * dbus/dbus-message.c (set_string_field): always just delete and
6386         re-append the field; accept NULL for deletion
6387         (re_align_fields_recurse): reimplement
6388         
6389 2003-10-26  Havoc Pennington  <hp@redhat.com>
6390
6391         * dbus/dbus-connection.c: fix docs to properly describe the
6392         disconnected message
6393         (_dbus_connection_notify_disconnected): remove this function; 
6394         we can't synchronously add the disconnected message, we have to 
6395         do it after we've queued any remaining real messages
6396         (_dbus_connection_get_dispatch_status_unlocked): queue the
6397         disconnect message only if the transport has finished queueing all
6398         its real messages and is disconnected.
6399         (dbus_connection_disconnect): update the dispatch status here
6400
6401 2003-10-22  Havoc Pennington  <hp@redhat.com>
6402
6403         * bus/bus.c (bus_context_check_security_policy): fix up assertion
6404
6405         * bus/connection.c (bus_transaction_send_from_driver): set the
6406         destination to the connection's base service
6407
6408 2003-10-20  Havoc Pennington  <hp@redhat.com>
6409
6410         hmm, make check is currently not passing.
6411         
6412         * doc/dbus-specification.xml: add requirement that custom type
6413         names follow the same rules as interface names.
6414
6415         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
6416         duplication and allow 'c' to be 'custom'; dict is now 'm' for
6417         'map'
6418
6419         * doc/dbus-specification.xml: update type codes to match
6420         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
6421         CUSTOM. Add type OBJECT_PATH to the spec.
6422
6423 2003-10-17  Havoc Pennington  <hp@redhat.com>
6424
6425         * bus/driver.c (create_unique_client_name): use "." as separator
6426         in base service names instead of '-'
6427
6428         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
6429         byte at the end of the string
6430
6431         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
6432         optimization macros since string validation seems to be a slow
6433         point.
6434         
6435         * doc/dbus-specification.xml: restrict valid
6436         service/interface/member/error names. Add test suite code for the
6437         name validation.
6438
6439         * dbus/dbus-string.c: limit service/interface/member/error names 
6440         to [0-9][A-Z][a-z]_
6441
6442         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
6443         format arg to verbose spew
6444
6445         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
6446         memory, return instead of g_error
6447
6448         * test/test-service.c (path_message_func): support emitting a
6449         signal on request
6450
6451         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
6452         activation bus type if DBUS_BUS_ACTIVATION was set; default to
6453         assuming the activation bus was the session bus so that services
6454         started manually will still register.
6455         (init_connections_unlocked): fix so that in OOM situation we get
6456         the same semantics when retrying the function
6457         
6458         * test/test-service.c (main): change to use path registration, to
6459         test those codepaths; register with DBUS_BUS_ACTIVATION rather
6460         than DBUS_BUS_SESSION
6461
6462 2003-10-16  Havoc Pennington  <hp@redhat.com>
6463
6464         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
6465
6466         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
6467         coverage of the tests
6468         (coverage-report.txt): don't move the .da and .bbg files around
6469
6470 2003-10-16  Havoc Pennington  <hp@redhat.com>
6471
6472         * bus/bus.c (struct BusContext): remove struct field I didn't mean
6473         to put there
6474
6475 2003-10-16  Havoc Pennington  <hp@redhat.com>
6476
6477         * bus/connection.c (bus_pending_reply_expired): either cancel or
6478         execute, not both
6479         (bus_connections_check_reply): use unlink, not remove_link, as we
6480         don't want to free the link; fixes double free mess
6481
6482         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
6483         where no reply was received
6484
6485         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
6486         fix a refcount leak
6487
6488         * bus/signals.c (match_rule_matches): add special cases for the
6489         bus driver, so you can match on sender/destination for it.
6490
6491         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
6492         DBUS_PRINT_BACKTRACE is set
6493
6494         * dbus/dbus-internals.c: add pid to assertion failure messages
6495
6496         * dbus/dbus-connection.c: add message type code to the debug spew
6497
6498         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
6499         sender=foo not service=foo
6500
6501         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
6502         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
6503         DBUS_ACTIVATION_ADDRESS instead
6504
6505         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
6506         DBUS_SYSTEM_BUS_ADDRESS if appropriate
6507
6508         * bus/bus.c (bus_context_new): handle OOM copying bus type into
6509         context struct
6510
6511         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
6512         (dbus_message_iter_get_object_path_array): new function (half
6513         finished, disabled for the moment)
6514         
6515         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
6516         DBUS_MESSAGE_TYPE_ERROR
6517
6518         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
6519         avoid redirecting stderr to /dev/null
6520         (babysit): close stdin if not doing the "exit_with_session" thing
6521
6522         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
6523         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
6524         stdout/stdin, so things don't get confused
6525         
6526         * bus/system.conf.in: fix to allow replies, I modified .conf
6527         instead of .conf.in again.
6528
6529 2003-10-14  David Zeuthen  <david@fubar.dk>
6530
6531         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
6532         argtype to arg_type when raising unknown arg type exception.
6533         Changed type list to reflect the changes in dbus-protocol.h so 
6534         the bindings actually work.
6535
6536 2003-10-14  Havoc Pennington  <hp@redhat.com>
6537
6538         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
6539         to have a bug keeping it from outputting the .da files sometimes
6540         (string_get_string): don't append garbage nul bytes to the string.
6541
6542 2003-10-15  Seth Nickell  <seth@gnome.org>
6543
6544         * python/Makefile.am:
6545
6546         Include dbus_h_wrapper.h in the dist tarball.
6547
6548 2003-10-14  Havoc Pennington  <hp@redhat.com>
6549
6550         * bus/bus.c (bus_context_check_security_policy): revamp this to
6551         work more sanely with new policy-based requested reply setup
6552
6553         * bus/connection.c (bus_transaction_send_from_driver): set bus
6554         driver messages as no reply
6555
6556         * bus/policy.c (bus_client_policy_check_can_receive): handle a
6557         requested_reply attribute on allow/deny rules
6558
6559         * bus/system.conf: add <allow requested_reply="true"/>
6560
6561         * bus/driver.c (bus_driver_handle_message): fix check for replies
6562         sent to the bus driver, which was backward. How did this ever work
6563         at all though? I think I'm missing something.
6564
6565         * dbus/dbus-message.c (decode_header_data): require error and
6566         method return messages to have a reply serial field to be valid
6567         (_dbus_message_loader_queue_messages): break up this function;
6568         validate that reply serial and plain serial are nonzero; 
6569         clean up the OOM/error handling.
6570         (get_uint_field): don't return -1 from this
6571         (dbus_message_create_header): fix signed/unsigned bug
6572
6573         * bus/connection.c (bus_connections_expect_reply): save serial of
6574         the incoming message, not reply serial
6575
6576 2003-10-14  Havoc Pennington  <hp@redhat.com>
6577
6578         * bus/connection.c: implement pending reply tracking using
6579         BusExpireList
6580
6581         * bus/bus.c (bus_context_check_security_policy): verify that a
6582         reply is pending in order to allow a reply to be sent. Deny 
6583         messages of unknown type.
6584
6585         * bus/dbus-daemon-1.1.in: update to mention new resource limits
6586
6587         * bus/bus.c (bus_context_get_max_replies_per_connection): new
6588         (bus_context_get_reply_timeout): new
6589
6590 2003-10-13  Seth Nickell  <seth@gnome.org>
6591
6592         * python/Makefile.am:
6593
6594         Pass "make distcheck": remove a couple files from DIST_FILES
6595         that weren't included in the final version.
6596
6597 2003-10-12  Havoc Pennington  <hp@pobox.com>
6598
6599         Added test code that 1) starts an actual bus daemon and 2) uses
6600         DBusGProxy; fixed bugs that were revealed by the test. Lots 
6601         more testing possible, but this is the basic framework.
6602         
6603         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
6604         empty proxy lists from the proxy list hash
6605
6606         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
6607         couple of return_if_fail checks
6608
6609         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
6610         to allocate, so everything is cleared to NULL as it should be.
6611
6612         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
6613         source as data to dbus_connection_set_timeout_functions() as the 
6614         timeout functions expected
6615
6616         * test/glib/run-test.sh: add a little script to start up a message
6617         bus and run tests using it
6618
6619         * tools/dbus-launch.1: updates
6620
6621         * tools/dbus-launch.c (main): add --config-file option
6622
6623         * tools/dbus-launch.c (main): remove confusing else if (runprog)
6624         that could never be reached.
6625
6626         * dbus/dbus-message.c (dbus_message_new_method_return) 
6627         (dbus_message_new_error, dbus_message_new_signal): set the
6628         no-reply-expected flag on all these. Redundant, but may
6629         as well be consistent.
6630
6631 2003-10-11  Havoc Pennington  <hp@pobox.com>
6632
6633         * test/decode-gcov.c (function_solve_graph): make broken block
6634         graph a nonfatal error since it seems to be broken. Need to debug
6635         this.
6636
6637         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
6638         can't just check type > INVALID < LAST anymore
6639
6640         * dbus/dbus-message.c (dbus_message_get_signature): new function
6641         (dbus_message_has_signature): new function
6642         (struct DBusMessage): add signature field (right now it isn't sent
6643         over the wire, just generated on the fly)
6644         (dbus_message_copy): copy the signature, and init strings to
6645         proper length to avoid some reallocs
6646         (dbus_message_iter_init_array_iterator): return void, since it
6647         can't fail
6648         (dbus_message_iter_init_dict_iterator): return void since it can't fail
6649         (_dbus_message_loader_queue_messages): add silly temporary hack to
6650         fill in message->signature on load
6651
6652         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
6653         characters, so they are relatively human-readable.
6654
6655 2003-10-11  Havoc Pennington  <hp@pobox.com>
6656
6657         * dbus/dbus-message.c (_dbus_message_test): add more test
6658         coverage, but #if 0 for now since they uncover a bug 
6659         not fixed yet; I think in re_align_field_recurse()
6660         (re_align_field_recurse): add FIXME about broken assertion
6661
6662         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
6663
6664         * bus/connection.c: share a couple code bits with expirelist.c
6665
6666         * bus/expirelist.h, bus/expirelist.c: implement a generic
6667         expire-items-after-N-seconds facility, was going to share between
6668         expiring connections and replies, decided not to use for expiring
6669         connections for now.
6670
6671         * COPYING: include AFL 2.0 (still need to change all the file headers)
6672
6673 2003-10-09  Havoc Pennington  <hp@redhat.com>
6674
6675         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
6676         gcc 3.3. Not that we do anything about it yet.
6677
6678         * bus/signals.c (bus_match_rule_parse): impose max length on the
6679         match rule text
6680
6681         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
6682
6683 2003-10-09  Havoc Pennington  <hp@redhat.com>
6684
6685         Make matching rules theoretically work (add parser).
6686         
6687         * bus/bus.c (bus_context_check_security_policy): fix up to handle
6688         the case where destination is explicitly specified as bus driver
6689         and someone else is eavesdropping.
6690         
6691         * bus/policy.c (bus_client_policy_check_can_receive): fix up
6692         definition of eavesdropping and assertion
6693
6694         * tools/dbus-send.c (main): use dbus_message_type_from_string
6695
6696         * bus/signals.c (bus_match_rule_parse): implement
6697
6698         * dbus/dbus-message.c (dbus_message_type_from_string): new
6699
6700         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
6701
6702 2003-10-02  Havoc Pennington  <hp@pobox.com>
6703
6704         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
6705         dbus_gproxy_oneway_call
6706
6707         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
6708         (dbus_server_setup_with_g_main): fix to allow calling them more
6709         than once on the same args
6710         (dbus_bus_get_with_g_main): new function
6711
6712 2003-10-02  Havoc Pennington  <hp@redhat.com>
6713
6714         * doc/dbus-tutorial.xml: write some stuff
6715
6716 2003-09-29  Havoc Pennington  <hp@pobox.com>
6717
6718         * configure.in: split checks for Doxygen from XML docs, check for
6719         xmlto
6720
6721         * doc/Makefile.am: XML-ify all the docs, and add a blank
6722         dbus-tutorial.xml
6723
6724 2003-09-29  Havoc Pennington  <hp@pobox.com>
6725
6726         * Merge dbus-object-names branch. To see the entire patch 
6727         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
6728         it's huuuuge though.
6729         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
6730         
6731 2003-09-28  Havoc Pennington  <hp@pobox.com>
6732
6733         * HACKING: update to reflect new server
6734
6735 2003-09-26  Seth Nickell  <seth@gnome.org>
6736
6737         * python/dbus.py:
6738         * python/examples/example-signals.py:
6739
6740         Start implementing some notions of signals. The API
6741         is really terrible, but they sort of work (with the
6742         exception of being able to filter by service, and to
6743         transmit signals *as* a particular service). Need to
6744         figure out how to make messages come from the service
6745         we registered :-(
6746         
6747         * python/dbus_bindings.pyx.in:
6748
6749         Removed duplicate message_handler callbacks.
6750         
6751 2003-09-25  Havoc Pennington  <hp@redhat.com>
6752
6753         * bus/session.conf.in: fix my mess
6754
6755 2003-09-25  Havoc Pennington  <hp@pobox.com>
6756
6757         * bus/session.conf.in: fix security policy, reported by Seth Nickell
6758
6759 2003-09-25  Seth Nickell  <seth@gnome.org>
6760
6761         * python/examples/example-service.py:
6762
6763         Johan notices complete wrong code in example-service, but
6764         completely wrong in a way that works exactly the same (!).
6765         Johan is confused, how could this possibly work? Example
6766         code fails to serve purpose of making things clear.
6767         Seth fixes.
6768
6769 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
6770
6771         * doc/dbus-specification.sgml: don't require header fields
6772         to be 4-byte aligned and specify that fields should be
6773         distinguished from padding by the fact that zero is not
6774         a valid field name.
6775         
6776         * doc/TODO: remove re-alignment item and add item to doc
6777         the OBJECT_PATH type.
6778         
6779         * dbus/dbus-message.c:
6780         (HeaderField): rename the original member to value_offset
6781         and introduce a name_offset member to keep track of where
6782         the field actually begins.
6783         (adjust_field_offsets): remove.
6784         (append_int_field), (append_uint_field),
6785         (append_string_field): don't align the start of the header
6786         field to a 4-byte boundary.
6787         (get_next_field): impl finding the next marhsalled field
6788         after a given field.
6789         (re_align_field_recurse): impl re-aligning a number of
6790         already marshalled fields.
6791         (delete_field): impl deleting a field of any type and
6792         re-aligning any following fields.
6793         (delete_int_or_uint_field), (delete_string_field): remove.
6794         (set_int_field), (set_uint_field): no need to re-check
6795         that we have the correct type for the field.
6796         (set_string_field): ditto and impl re-aligning any
6797         following fields.
6798         (decode_header_data): update to take into account that
6799         the fields aren't 4-byte aligned any more and the new
6800         way to distinguish padding from header fields. Also,
6801         don't exit when there is too much header padding.
6802         (process_test_subdir): print the directory.
6803         (_dbus_message_test): add test to make sure a following
6804         field is re-aligned correctly after field deletion.
6805         
6806         * dbus/dbus-string.[ch]:
6807         (_dbus_string_insert_bytes): rename from insert_byte and
6808         allow the insert of multiple bytes.
6809         (_dbus_string_test): test inserting multiple bytes.
6810
6811         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
6812         warning note to docs about having to re-align any
6813         marshalled values following the string.
6814         
6815         * dbus/dbus-message-builder.c:
6816         (append_string_field), (_dbus_message_data_load):
6817         don't align the header field.
6818         
6819         * dbus/dbus-auth.c: (process_test_subdir): print the
6820         directory.
6821         
6822         * test/break-loader.c: (randomly_add_one_byte): upd. for
6823         insert_byte change.
6824         
6825         * test/data/invalid-messages/bad-header-field-alignment.message:
6826         new test case.
6827         
6828         * test/data/valid-messages/unknown-header-field.message: shove
6829         a dict in the unknown field.
6830
6831 2003-09-25  Seth Nickell  <seth@gnome.org>
6832
6833         * python/dbus.py:
6834         * python/dbus_bindings.pyx.in:
6835
6836         Handle return values.
6837         
6838         * python/examples/example-client.py:
6839         * python/examples/example-service.py:
6840
6841         Pass back return values from the service to the client.
6842         
6843 2003-09-24  Seth Nickell  <seth@gnome.org>
6844
6845         * python/dbus.py:
6846
6847         Connect Object methods (when you are sharing an object) up... pass
6848         in a list of methods to be shared. Sharing all the methods just
6849         worked out too weird. You can now create nice Services over the
6850         DBus in Python. :-)
6851         
6852         * python/dbus_bindings.pyx.in:
6853
6854         Keep references to user_data tuples passed into C functions so 
6855         Python doesn't garbage collect on us.
6856
6857         Implement MethodReturn and Error subclasses of Message for creating
6858         DBusMessage's of those types.
6859         
6860         * python/examples/example-client.py:
6861         * python/examples/example-service.py:
6862
6863         Simple example code showing both how create DBus services and objects,
6864         and how to use them.
6865
6866 2003-09-23  Havoc Pennington  <hp@pobox.com>
6867
6868         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
6869
6870 2003-09-23  Havoc Pennington  <hp@redhat.com>
6871
6872         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
6873         (dbus_gproxy_disconnect_signal): implement
6874         (dbus_gproxy_manager_remove_signal_match): implement
6875         (dbus_gproxy_manager_add_signal_match): implement
6876         (dbus_gproxy_oneway_call): implement
6877
6878 2003-09-23  Havoc Pennington  <hp@pobox.com>
6879
6880         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
6881         subclass. This means dropping the transparent thread safety of the
6882         proxy; you now need a separate proxy per-thread, or your own
6883         locking on the proxy. Probably right anyway.
6884         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
6885
6886 2003-09-22  Havoc Pennington  <hp@redhat.com>
6887
6888         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
6889
6890 2003-09-21  Seth Nickell  <seth@gnome.org>
6891
6892         First checkin of the Python bindings.
6893         
6894         * python/.cvsignore:
6895         * python/Makefile.am:
6896         * python/dbus_bindings.pyx.in:
6897         * python/dbus_h_wrapper.h:
6898
6899         Pieces for Pyrex to operate on, building a dbus_bindings.so
6900         python module for low-level access to the DBus APIs.
6901         
6902         * python/dbus.py:
6903
6904         High-level Python module for accessing DBus objects.
6905
6906         * configure.in:
6907         * Makefile.am:
6908
6909         Build stuff for the python bindings.
6910
6911         * acinclude.m4:
6912
6913         Extra macro needed for finding the Python C header files.
6914
6915 2003-09-21  Havoc Pennington  <hp@pobox.com>
6916
6917         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
6918         implementing the proxy manager, didn't get very far.
6919
6920         * dbus/dbus-bus.c (dbus_bus_add_match): new
6921         (dbus_bus_remove_match): new
6922
6923         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
6924         path_name argument; adjust the other not-yet-implemented 
6925         gproxy constructors to be what I think they should be.
6926
6927 2003-09-21  Havoc Pennington  <hp@pobox.com>
6928
6929         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
6930         by default for message bus connections.
6931
6932         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
6933         exit_on_disconnect flag is set and we process the disconnected
6934         signal.
6935         (dbus_connection_set_exit_on_disconnect): new function
6936
6937 2003-09-21  Havoc Pennington  <hp@pobox.com>
6938
6939         Get matching rules mostly working in the bus; only actually
6940         parsing the rule text remains. However, the client side of
6941         "signal connections" hasn't been started, this patch is only the
6942         bus side.
6943         
6944         * dbus/dispatch.c: fix for the matching rules changes
6945         
6946         * bus/driver.c (bus_driver_handle_remove_match)
6947         (bus_driver_handle_add_match): send an ack reply from these
6948         method calls
6949
6950         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
6951         arguments, reported by Seth Nickell
6952
6953         * bus/config-parser.c (append_rule_from_element): support
6954         eavesdrop=true|false attribute on policies so match rules 
6955         can be prevented from snooping on the system bus.
6956
6957         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
6958         and "destination" in attribute names; fix some docs bugs; 
6959         add eavesdrop=true|false attribute
6960
6961         * bus/driver.c (bus_driver_handle_add_match)
6962         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
6963         messages
6964
6965         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
6966         rid of broadcast service concept, signals are just always broadcast
6967
6968         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
6969         mostly implement matching rules stuff (currently only exposed as signal
6970         connections)
6971
6972 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
6973
6974         * doc/dbus-specification.sgml: Change the header field name
6975         to be an enum and update the rest of the spec to reference
6976         the fields using the conventinal name.
6977
6978         * dbus/dbus-protocol.h: update to reflect the spec.
6979
6980         * doc/TODO: add item to remove the 4 byte alignment requirement.
6981         
6982         * dbus/dbus-message.c: Remove the code to generalise the
6983         header/body length and serial number header fields as named
6984         header fields so we can reference field names using the 
6985         protocol values.
6986         (append_int_field), (append_uint_field), (append_string_field):
6987         Append the field name as a byte rather than four chars.
6988         (delete_int_or_uint_field), (delete_string_field): reflect the
6989         fact that the field name and typecode now occupy 4 bytes instead
6990         of 8.
6991         (decode_string_field), (decode_header_data): update to reflect
6992         protocol changes and move the field specific encoding from
6993         decode_string_field() back into decode_header_data().
6994         
6995         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
6996         Add utility to aid debugging.
6997         
6998         * dbus/dbus-message-builder.c:
6999         (append_string_field), (_dbus_message_data_load): Update to
7000         reflect protocol changes; Change the FIELD_NAME directive
7001         to HEADER_FIELD and allow it to take the field's conventional
7002         name rather than the actual value.
7003         
7004         * test/data/*/*.message: Update to use HEADER_FIELD instead
7005         of FIELD_NAME; Always align the header on an 8 byte boundary
7006         *before* updating the header length.
7007
7008 2003-09-15  Havoc Pennington  <hp@pobox.com>
7009
7010         * dbus/dbus-pending-call.c: add the get/set object data
7011         boilerplate as for DBusConnection, etc. Use generic object data
7012         for the notify callback.
7013
7014         * glib/dbus-gparser.c (parse_node): parse child nodes
7015
7016         * tools/dbus-viewer.c: more hacking on the dbus-viewer
7017         
7018         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
7019         contain functions shared between the convenience lib and the
7020         installed lib
7021
7022         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
7023         -export-symbols-regex to the GLib library
7024
7025         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
7026         fix the locking in here, and add a default handler for
7027         Introspect() that just returns sub-nodes.
7028
7029 2003-09-14  Havoc Pennington  <hp@pobox.com>
7030
7031         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
7032         rather than gfoo consistent
7033
7034         * glib/dbus-gproxy.h: delete for now, move contents to
7035         dbus-glib.h, because the include files don't work right since we
7036         aren't in the dbus/ subdir.
7037         
7038         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
7039         (dbus_gproxy_end_call): finish
7040         (dbus_gproxy_begin_call): finish
7041
7042         * glib/dbus-gmain.c (dbus_set_g_error): new
7043
7044         * glib/dbus-gobject.c (handle_introspect): include information
7045         about child nodes in the introspection
7046
7047         * dbus/dbus-connection.c (dbus_connection_list_registered): new
7048         function to help in implementation of introspection
7049
7050         * dbus/dbus-object-tree.c
7051         (_dbus_object_tree_list_registered_and_unlock): new function
7052
7053 2003-09-12  Havoc Pennington  <hp@pobox.com>
7054
7055         * glib/dbus-gidl.h: add common base class for all the foo_info
7056         types
7057
7058         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
7059         similar to kdcop
7060
7061         * test/Makefile.am: try test srcdir -ef . in addition to test
7062         srcdir = ., one of them should work (yeah lame)
7063         
7064         * glib/Makefile.am: build the "idl" parser stuff as a convenience
7065         library
7066         
7067         * glib/dbus-gparser.h: make description_load routines return
7068         NodeInfo* not Parser*
7069
7070         * Makefile.am (SUBDIRS): build test dir after all library dirs
7071
7072         * configure.in: add GTK+ detection
7073
7074 2003-09-07  Havoc Pennington  <hp@pobox.com>
7075
7076         * Make Doxygen contented.
7077
7078 2003-09-07  Havoc Pennington  <hp@pobox.com>
7079
7080         * doc/dbus-specification.sgml: more updates
7081
7082 2003-09-06  Havoc Pennington  <hp@pobox.com>
7083
7084         * doc/dbus-specification.sgml: partial updates
7085
7086         * bus/dbus-daemon-1.1.in: fix the config file docs for the
7087         zillionth time; hopefully I edited the right file this time.
7088
7089         * bus/config-parser.c (append_rule_from_element): support
7090         send_type, send_path, receive_type, receive_path
7091
7092         * bus/policy.c: add message type and path to the list of things
7093         that can be "firewalled"
7094
7095 2003-09-06  Havoc Pennington  <hp@pobox.com>
7096
7097         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
7098         (dbus_connection_register_object_path): make this not handle
7099         messages to paths below the given path
7100
7101 2003-09-03  Havoc Pennington  <hp@pobox.com>
7102
7103         * test/glib/Makefile.am: add this with random glib-linked test
7104         programs
7105
7106         * glib/Makefile.am: remove the random test programs from here,
7107         leave only the unit tests
7108
7109         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
7110         uscore/javacaps conversion, and fix     
7111         (get_object_property, set_object_property): change to .NET
7112         convention for mapping props to methods, set_FooBar/get_FooBar, 
7113         since one language has such a convention we may as well copy it. 
7114         Plus real methods in either getFooBar or get_foo_bar style won't 
7115         collide with this convention.
7116
7117 2003-09-01  Havoc Pennington  <hp@pobox.com>
7118
7119         * glib/dbus-gparser.c: implement
7120
7121         * glib/dbus-gobject.c: start implementing skeletons support
7122
7123         * configure.in: when disabling checks/assert, also define
7124         G_DISABLE_ASSERT and G_DISABLE_CHECKS
7125
7126 2003-09-01  Havoc Pennington  <hp@pobox.com>
7127
7128         * glib/Makefile.am: rearrange a bunch of files and get "make
7129         check" framework set up
7130
7131 2003-08-31  Havoc Pennington  <hp@pobox.com>
7132
7133         * fix build with --disable-tests
7134
7135 2003-08-30  Havoc Pennington  <hp@pobox.com>
7136
7137         * dbus/dbus-connection.c: purge DBusMessageHandler
7138
7139         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
7140         use callbacks everywhere
7141
7142 2003-08-30  Havoc Pennington  <hp@pobox.com>
7143
7144         * test/data/valid-config-files/system.d/test.conf: change to 
7145         root for the user so warnings don't get printed
7146
7147         * dbus/dbus-message.c: add dbus_message_get_path,
7148         dbus_message_set_path
7149         
7150         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
7151         dispatching to a path
7152
7153         * dbus/dbus-string.c (_dbus_string_validate_path): add
7154
7155         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
7156         (_dbus_marshal_object_path): implement
7157
7158         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
7159         to contain the path to the target object
7160         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
7161         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
7162
7163 2003-08-30  Havoc Pennington  <hp@pobox.com>
7164
7165         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
7166
7167 2003-08-29  Havoc Pennington  <hp@pobox.com>
7168
7169         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
7170         registered
7171         (struct DBusObjectSubtree): shrink this
7172         a lot, since we may have a lot of them
7173         (_dbus_object_tree_free_all_unlocked): implement
7174         (_dbus_object_tree_dispatch_and_unlock): implement
7175
7176 2003-08-29  Havoc Pennington  <hp@pobox.com>
7177
7178         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
7179
7180 2003-08-28  Havoc Pennington  <hp@pobox.com>
7181
7182         purge DBusObjectID
7183         
7184         * dbus/dbus-connection.c: port to no ObjectID, create a
7185         DBusObjectTree, rename ObjectTree to ObjectPath in public API
7186
7187         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
7188         everything except UnregisterFunction and MessageFunction
7189         
7190         * dbus/dbus-marshal.c: port away from DBusObjectID, 
7191         add DBUS_TYPE_OBJECT_PATH
7192         
7193         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
7194         dbus/dbus-objectid.[hc]: remove these, we are moving to 
7195         path-based object IDs
7196
7197 2003-08-25  Havoc Pennington  <hp@pobox.com>
7198
7199         Just noticed that dbus_message_test is hosed, I wonder when I
7200         broke that. I thought make check was passing earlier...
7201         
7202         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
7203         container tree, will replace most of dbus-object-registry
7204
7205         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
7206         screwup
7207
7208 2003-08-19  Havoc Pennington  <hp@pobox.com>
7209
7210         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
7211         (dbus_message_is_error): fix this function
7212
7213         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
7214         match
7215
7216         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
7217         reflect clarified man page
7218         (bus_client_policy_check_can_send): ditto
7219         
7220         * bus/session.conf.in: fixup
7221
7222         * bus/system.conf.in: fixup
7223
7224 2003-08-18  Havoc Pennington  <hp@redhat.com>
7225
7226         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
7227
7228         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7229         dumb bug created earlier (wrong order of args to
7230         decode_header_data())
7231         
7232         * tools/dbus-send.c: port
7233
7234         * tools/dbus-print-message.c (print_message): port
7235
7236         * test/data/*messages: port all messages over
7237         
7238         * dbus/dbus-message-builder.c: support including 
7239         message type
7240         
7241         * bus/driver.c: port over
7242         
7243         * bus/dispatch.c: port over to new stuff
7244
7245         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7246         rename disconnect signal to "Disconnected"
7247
7248 2003-08-17  Havoc Pennington  <hp@pobox.com>
7249
7250         This doesn't compile yet, but syncing up so I can hack on it from
7251         work. What are branches for if not broken code? ;-)
7252         
7253         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
7254         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
7255         DBUS_HEADER_FIELD_ERROR_NAME
7256         
7257         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
7258         for the interface+member pairs
7259         (string_hash): change to use g_str_hash algorithm
7260         (find_direct_function, find_string_function): refactor these to
7261         share most code.
7262         
7263         * dbus/dbus-message.c: port all of this over to support 
7264         interface/member fields instead of name field
7265
7266         * dbus/dbus-object-registry.c: port over
7267         
7268         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
7269         from _dbus_string_validate_name
7270
7271         * bus/dbus-daemon-1.1: change file format for the 
7272         <deny>/<allow> stuff to match new message naming scheme
7273
7274         * bus/policy.c: port over
7275
7276         * bus/config-parser.c: parse new format
7277         
7278 2003-08-16  Havoc Pennington  <hp@pobox.com>
7279
7280         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
7281         broken assertion
7282
7283         * glib/dbus-gproxy.c: some hacking
7284
7285 2003-08-15  Havoc Pennington  <hp@redhat.com>
7286
7287         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
7288
7289         * dbus/dbus-connection.c
7290         (dbus_connection_send_with_reply_and_block): factor out internals;
7291         change to convert any error replies to DBusError instead of 
7292         returning them as a message
7293
7294 2003-08-15  Havoc Pennington  <hp@pobox.com>
7295
7296         * dbus/dbus-connection.c, 
7297         dbus/dbus-pending-call.c: Finish the pending call stuff
7298
7299 2003-08-14  Havoc Pennington  <hp@redhat.com>
7300
7301         * dbus/dbus-pending-call.c: start on new object that will replace
7302         DBusMessageHandler and ReplyHandlerData for tracking outstanding
7303         replies
7304
7305         * dbus/dbus-gproxy.c: start on proxy object used to communicate
7306         with remote interfaces
7307
7308         * dbus/dbus-gidl.c: do the boring boilerplate in here
7309         
7310 2003-08-12  Havoc Pennington  <hp@pobox.com>
7311
7312         * bus/dispatch.c (bus_dispatch): make this return proper 
7313         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
7314
7315         * dbus/dbus-errors.c (dbus_set_error): use
7316         _dbus_string_append_printf_valist
7317
7318         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
7319         (_dbus_string_append_printf): new
7320
7321         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
7322         UNKNOWN_METHOD
7323
7324         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
7325         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
7326         message is unhandled.
7327
7328 2003-08-11  Havoc Pennington  <hp@pobox.com>
7329
7330         * bus/test.c (client_disconnect_handler): change to return
7331         HANDLED (would have been REMOVE_MESSAGE)
7332
7333         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
7334         HANDLED/NOT_YET_HANDLED instead of
7335         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
7336         should be used.
7337
7338 2003-08-10  Havoc Pennington  <hp@pobox.com>
7339
7340         * tools/dbus-send.c (main): add --type argument, for now
7341         supporting only method_call and signal types.
7342
7343         * tools/dbus-print-message.c: print message type
7344
7345         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7346         init connection->objects
7347
7348         * doc/dbus-specification.sgml: fix sgml
7349
7350         * bus/*.c: port over to object-instance API changes
7351
7352         * test/test-service.c: ditto
7353         
7354         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
7355         name, we will have to fix up the rest of the code to also handle
7356         this
7357         (dbus_message_new): generic message-creation call
7358         (set_string_field): allow appending name field
7359
7360 2003-08-06  Havoc Pennington  <hp@pobox.com>
7361
7362         * dbus/dbus-object-registry.c: implement signal connection 
7363         and dispatch
7364
7365         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
7366
7367         * dbus/dbus-internals.c (_dbus_memdup): new function
7368
7369 2003-08-02  Havoc Pennington  <hp@pobox.com>
7370
7371         * dbus/dbus-message.c (dbus_message_get_no_reply)
7372         (dbus_message_set_no_reply): add these and remove
7373         set_is_error/get_is_error
7374
7375         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
7376         remove the ERROR flag, since there's now an ERROR type
7377
7378 2003-08-01  Havoc Pennington  <hp@pobox.com>
7379
7380         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
7381         implement
7382
7383         * dbus/dbus-message.c (dbus_message_get_type): new function
7384
7385         * doc/dbus-specification.sgml: add "type" byte to messages
7386
7387 2003-08-01  Havoc Pennington  <hp@pobox.com>
7388
7389         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
7390         a message type enum to distinguish kinds of message
7391         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
7392         that need not be replied to
7393
7394 2003-08-01  Havoc Pennington  <hp@pobox.com>
7395
7396         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
7397         (unpack_8_octets): fix no-64-bit-int bug
7398
7399         * dbus/dbus-object-registry.c (validate_id): validate the 
7400         connection ID bits, not just the instance ID.
7401
7402         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
7403         the connection-global 33 bits of the object ID
7404
7405         * dbus/dbus-object-registry.c (info_from_entry): fill in 
7406         object ID in the new way
7407
7408         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
7409         define server/client/instance bits.
7410
7411 2003-07-30  Havoc Pennington  <hp@pobox.com>
7412
7413         * dbus/dbus-connection.c (dbus_connection_register_object): fix
7414         build
7415
7416 2003-07-13  Havoc Pennington  <hp@pobox.com>
7417
7418         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
7419         fields to DBusObjectVTable and DBusObjectInfo
7420
7421 2003-07-12  Havoc Pennington  <hp@pobox.com>
7422
7423         * dbus/dbus-object-registry.c: implement unit test,
7424         fix bugs discovered in process
7425
7426         * dbus/dbus-connection.c: remove handler_table and
7427         register_handler(), add DBusObjectRegistry usage
7428
7429         * dbus/dbus-objectid.c (dbus_object_id_is_null)
7430         (dbus_object_id_set_null): new functions
7431
7432 2003-07-08  Havoc Pennington  <hp@pobox.com>
7433
7434         * dbus/dbus-object.c: implement some of this
7435
7436         * dbus/dbus-object-registry.c
7437         (_dbus_object_registry_add_and_unlock): fill in the object_id out
7438         param
7439         (_dbus_object_registry_new): handle OOM
7440
7441 2003-07-08  Havoc Pennington  <hp@pobox.com>
7442
7443         * dbus/dbus-object.h: sketch out an API for registering objects
7444         with a connection, that allows us to use as little as 24 bytes
7445         per object and lets application code represent an object in 
7446         any conceivable way.
7447
7448         * dbus/dbus-object-registry.c: implement the hard bits of the
7449         DBusConnection aspect of object API. Not yet wired up.
7450         
7451 2003-07-06  Havoc Pennington  <hp@pobox.com>
7452
7453         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
7454         (_dbus_marshal_object_id): new
7455         (_dbus_demarshal_object_id): new
7456         (_dbus_marshal_get_arg_end_pos): support object ID type, and
7457         consolidate identical switch cases. Don't conditionalize handling
7458         of DBUS_TYPE_UINT64, need to handle the type always.
7459         (_dbus_marshal_validate_arg): consolidate identical cases, and
7460         handle DBUS_TYPE_OBJECT_ID
7461
7462         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
7463
7464         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
7465
7466 2003-09-28  Havoc Pennington  <hp@pobox.com>
7467
7468         * real 0.13 release
7469
7470 2003-09-28  Havoc Pennington  <hp@pobox.com>
7471
7472         * doc/Makefile.am (dbus-specification.html): testing a funky hack
7473         to work with Debian db2html
7474
7475 2003-09-28  Havoc Pennington  <hp@pobox.com>
7476
7477         * configure.in: 0.13
7478
7479         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
7480         stylesheet-images for benefit of Debian
7481         
7482         Change back to using filesystem-linked sockets for the system
7483         bus, so only root can create the default system bus address.
7484         
7485         * bus/system.conf.in: change to use
7486         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7487
7488         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
7489         from here.
7490
7491         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7492         here, and AC_DEFINE DBUS_SYSTEM_PATH
7493
7494 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7495
7496         * doc/TODO:
7497         * doc/busconfig.dtd:
7498         Add busconfig DTD.
7499         
7500 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7501
7502         * doc/dbus-specification.sgml:
7503         Add activation reply values.
7504         
7505 2003-08-05  Havoc Pennington  <hp@redhat.com>
7506
7507         * configure.in: 0.12
7508
7509 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
7510
7511         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
7512         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
7513         (add_watch), (remove_watch), (create_source):
7514         Refcount fds, fixes some reentrancy issues.
7515         
7516 2003-07-30  Havoc Pennington  <hp@redhat.com>
7517
7518         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
7519         bus address to be abstract if we have abstract sockets
7520
7521         * NEWS: update
7522
7523 2003-07-28  Havoc Pennington  <hp@redhat.com>
7524
7525         * bus/messagebus.in: fix to avoid processname/servicename 
7526         confusion, from Michael Kearey
7527         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
7528         
7529 2003-07-23  Havoc Pennington  <hp@pobox.com>
7530
7531         * dbus/dbus-message.c (dbus_message_iter_get_named): 
7532         fix from Andy Hanton to remove broken "+1"
7533
7534 2003-07-16  Havoc Pennington  <hp@pobox.com>
7535
7536         * tools/dbus-launch.c (babysit): close stdout/stderr in the
7537         babysitter process, as suggested by Thomas Leonard, so 
7538         an "eval `dbus-launch --exit-with-session`" will actually 
7539         return
7540
7541 2003-07-16  Havoc Pennington  <hp@pobox.com>
7542
7543         * configure.in: print out EXPANDED_* variables in the summary at
7544         the end; clean up the code that computes EXPANDED_ variables and
7545         get the ones using exec_prefix right. Should make things work
7546         when you build without --prefix
7547
7548 2003-06-29  Havoc Pennington  <hp@pobox.com>
7549
7550         * mono/Test.cs (class Test): fire up a main loop and run it
7551
7552         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
7553         done once, the app has to do it
7554
7555 2003-06-26  Havoc Pennington  <hp@pobox.com>
7556
7557         * mono/Connection.cs: set up connection with the glib main loop
7558
7559 2003-07-01  Havoc Pennington  <hp@redhat.com>
7560
7561         * doc/dbus-specification.sgml: clarify the format of a type code,
7562         change suggested by Jim Blandy
7563
7564 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
7565
7566         * doc/Makefile.am:
7567         * tools/Makefile.am: Don't assume srcdir == builddir.
7568
7569         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
7570         the allocated block.
7571         (_dbus_memory_test): New function.
7572         * dbus/dbus-test.h: Add _dbus_memory_test ().
7573         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
7574
7575         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
7576         of %c%c%c%c.
7577         (dbus_message_new): Remove obsolete @todo.
7578
7579         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
7580         (_dbus_marshal_set_uint64): Fix comment.
7581
7582         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
7583         hardcode FIELD_REPLY_SERIAL.
7584
7585         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
7586         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
7587
7588         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
7589         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
7590
7591 2003-06-24  Havoc Pennington  <hp@pobox.com>
7592
7593         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
7594
7595 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
7596
7597         * configure.in:
7598         * gcj/.cvsignore:
7599         * gcj/Hello.java:
7600         * gcj/Makefile.am:
7601         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
7602         * gcj/org/.cvsignore:
7603         * gcj/org/Makefile.am:
7604         * gcj/org/freedesktop/.cvsignore:
7605         * gcj/org/freedesktop/Makefile.am:
7606         * gcj/org/freedesktop/dbus/.cvsignore:
7607         * gcj/org/freedesktop/dbus/Makefile.am:
7608         * gcj/org/freedesktop/dbus/Message.java: (Message),
7609         (Message.Message):
7610         * gcj/org/freedesktop/dbus/natMessage.cc:
7611         Fix the build system.
7612
7613 2003-06-22  Havoc Pennington  <hp@pobox.com>
7614
7615         * mono/Connection.cs: add more bindings
7616
7617         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
7618         more than once.
7619
7620 2003-06-22  Havoc Pennington  <hp@pobox.com>
7621
7622         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
7623         Start wrapping more stuff.
7624
7625 2003-06-22  Havoc Pennington  <hp@pobox.com>
7626
7627         * mono/Message.cs: implement Message.Wrap() that ensures we only
7628         have a single C# wrapper per DBusMessage, assuming it works which
7629         it probably doesn't.
7630
7631         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
7632         (dbus_message_free_data_slot): new
7633         (dbus_message_set_data): new
7634         (dbus_message_get_data): new
7635
7636 2003-06-22  Havoc Pennington  <hp@pobox.com>
7637
7638         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
7639         (_dbus_data_slot_allocator_alloc): rework these to keep a
7640         reference count on each slot and automatically manage a global
7641         slot ID variable passed in by address
7642
7643         * bus/bus.c: convert to new dataslot API
7644
7645         * dbus/dbus-bus.c: convert to new dataslot API
7646
7647         * dbus/dbus-connection.c: convert to new dataslot API
7648
7649         * dbus/dbus-server.c: convert to new dataslot API
7650
7651         * glib/dbus-gmain.c: ditto
7652
7653         * bus/test.c: ditto
7654
7655         * bus/connection.c: ditto
7656
7657 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
7658
7659         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
7660         after the gcj checks so that the correct configuration tags
7661         will be added to libtool.
7662
7663         * dbus-glib-1.pc.in: No need to specify any includes since
7664         dbus-1.pc.in has those.
7665
7666 2003-06-22  Havoc Pennington  <hp@pobox.com>
7667
7668         * mono/*, gcj/*, configure.in, Makefile.am:
7669         Check in makefiles and subdirs for mono and gcj bindings.
7670         Neither binding actually exists, just trying to get through
7671         all the build and other boring bits.
7672
7673 2003-06-21  Philip Blundell  <philb@gnu.org>
7674
7675         * tools/dbus-monitor.1: Updated.
7676
7677         * tools/dbus-send.1: Likewise.
7678
7679 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
7680
7681         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
7682         for hangup and error after checking read so we won't discard
7683         pending data if both hangup and read are set.
7684
7685 2003-06-19  Philip Blundell  <philb@gnu.org>
7686
7687         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
7688
7689         * tools/dbus-send.c: Accept both --system and --session.
7690
7691         * tools/dbus-monitor.c: Same here.
7692
7693 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
7694
7695         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
7696         from C++ (Patch by Miloslav Trmac).
7697
7698 2003-06-15  Joe Shaw  <joe@assbarn.com>
7699
7700         * configure.in: Check for socklen_t.
7701
7702         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
7703
7704         * test/test-segfault.c: Add #include <sys/time.h>
7705
7706         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
7707         dbus-launch needs it.
7708
7709 2003-06-09  Havoc Pennington  <hp@redhat.com>
7710
7711         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
7712         SUN_LEN, it breaks abstract socket usage
7713
7714         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
7715         starts of lines.
7716
7717 2003-06-04  Havoc Pennington  <hp@pobox.com>
7718
7719         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
7720         using unix:abstract=/foo, and when listening in a tmpdir
7721         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
7722
7723         * dbus/dbus-transport.c (_dbus_transport_open): support
7724         unix:abstract=/foo
7725
7726         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7727         support abstract sockets
7728
7729         * dbus/dbus-transport-unix.c
7730         (_dbus_transport_new_for_domain_socket): support abstract sockets
7731
7732         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
7733         toggle as an argument, implement abstract namespace support
7734         (_dbus_listen_unix_socket): ditto
7735
7736         * configure.in: add --enable-abstract-sockets and implement
7737         a configure check for autodetection of the right value.
7738
7739 2003-06-01  Havoc Pennington  <hp@pobox.com>
7740
7741         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
7742         in /tmp (though on Linux this will end up being useless,
7743         when we add abstract namespace support)
7744
7745         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
7746         subst'ing it
7747
7748 2003-05-28  Colin Walters  <walters@verbum.org>
7749
7750         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
7751
7752 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
7753
7754         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
7755
7756 2003-05-17  Colin Walters  <walters@gnu.org>
7757
7758         * tools/dbus-send.c: Don't exit with an error code if --help was
7759         passed.  Default to using the session bus instead of the system
7760         one.
7761
7762         * tools/dbus-launch.c: Ditto.
7763
7764         * tools/dbus-monitor.c: Ditto.
7765
7766         * tools/dbus-send.1: Update with new arguments.
7767
7768         * tools/dbus-launch.c: Emit code to export variables.  New
7769         arguments -s and -c to specify shell syntax, and a bit of code to
7770         autodetect syntax.  Also, allow specifying a program to run.
7771
7772         * tools/dbus-launch.1: Update with new arguments.
7773
7774         * tools/dbus-send.1: Ditto.
7775
7776         * tools/dbus-monitor.1: Ditto.
7777
7778 2003-05-17  Havoc Pennington  <hp@pobox.com>
7779
7780         * bus/config-parser.c (merge_included): merge in policies from
7781         child configuration file.
7782
7783         * bus/policy.c (bus_policy_merge): function to merge two policies
7784         together
7785
7786 2003-05-16  Havoc Pennington  <hp@redhat.com>
7787
7788         * dbus/dbus-connection.c: disable verbose lock spew
7789
7790         * tools/dbus-send.c: add --print-reply command line option
7791
7792         * tools/dbus-print-message.h (print_message): new util function
7793         shared by dbus-send and dbus-monitor
7794
7795         * tools/dbus-monitor.c (handler_func): exit on disconnect
7796
7797         * dbus/dbus-transport-unix.c (do_reading): if the transport is
7798         disconnected, don't try to use the read_watch
7799
7800         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
7801         so we can find this bug more easily
7802
7803 2003-05-16  Havoc Pennington  <hp@redhat.com>
7804
7805         * bus/policy.c (free_rule_list_func): avoid a crash when passed
7806         NULL as DBusHashTable is annoyingly likely to do.
7807
7808 2003-05-16  Colin Walters  <walters@verbum.org>
7809
7810         * tools/dbus-monitor.c: Add --session argument and usage()
7811         function.
7812
7813         * tools/dbus-monitor.1: Update with new --session arg.
7814
7815         * bus/Makefile.am (install-data-hook): Create
7816         $(libdir)/dbus-1.0/services so that the session bus is happy.
7817
7818 2003-05-15  Havoc Pennington  <hp@redhat.com>
7819
7820         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
7821         on non-x86. ifdef's are evil.
7822
7823 2003-05-15  Havoc Pennington  <hp@redhat.com>
7824
7825         * configure.in: 0.11
7826
7827         * NEWS: update
7828
7829         * bus/Makefile.am (initddir): apparently we are supposed to put
7830         init scripts in /etc/rc.d/init.d not /etc/init.d
7831
7832         * bus/Makefile.am: remove the "you must --enable-tests to make
7833         check" as it broke distcheck
7834
7835         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
7836
7837 2003-05-13  James Willcox  <jwillcox@gnome.org>
7838
7839         * configure.in:
7840         * bus/activation.c: (bus_activation_service_created),
7841         (bus_activation_activate_service):
7842         * bus/driver.c: (bus_driver_send_service_deleted),
7843         (bus_driver_send_service_created), (bus_driver_send_service_lost),
7844         (bus_driver_send_service_acquired),
7845         (bus_driver_send_welcome_message),
7846         (bus_driver_handle_list_services):
7847         * bus/session.conf.in:
7848         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
7849         (dbus_bus_service_exists), (dbus_bus_activate_service):
7850         * dbus/dbus-bus.h:
7851
7852         Add some convenience API which lets you activate a service, and did a
7853         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
7854         and dbus_message_get_args()
7855
7856 2003-05-11  Havoc Pennington  <hp@pobox.com>
7857
7858         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
7859         calling _dbus_marshal_validate_arg() for every byte in a byte
7860         array, etc.
7861
7862         * dbus/dbus-message-handler.c: use atomic reference counting to
7863         reduce number of locks slightly; the global lock in here sucks
7864
7865         * dbus/dbus-connection.c
7866         (_dbus_connection_update_dispatch_status_and_unlock): variant of
7867         update_dispatch_status that can be called with lock held; then use
7868         in a couple places to reduce locking/unlocking
7869         (dbus_connection_send): hold the lock over the whole function
7870         instead of acquiring it twice.
7871
7872         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
7873
7874         * bus/connection.c (bus_connections_setup_connection): fix access
7875         to already-freed memory.
7876
7877         * dbus/dbus-connection.c: keep a little cache of linked list
7878         nodes, to avoid using the global linked list alloc lock in the
7879         normal send-message case. Instead we just use the connection lock
7880         that we already have to take.
7881
7882         * dbus/dbus-list.c (_dbus_list_find_last): new function
7883
7884         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
7885         change to use a struct for the atomic type; fix docs,
7886         they return value before increment, not after increment.
7887
7888         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
7889         (_dbus_string_append_8_aligned): new functions to try to
7890         microoptimize this operation.
7891         (reallocate_for_length): break this out of set_length(), to
7892         improve profile info, and also so we can consider inlining the
7893         set_length() part.
7894
7895         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
7896         strings with some preallocation, cuts down on our calls to realloc
7897         a fair bit. Though if we can get the "move entire string to empty
7898         string" optimization below to kick in here, it would be better.
7899
7900         * dbus/dbus-string.c (_dbus_string_move): just call
7901         _dbus_string_move_len
7902         (_dbus_string_move_len): add a special case for moving
7903         an entire string into an empty string; we can just
7904         swap the string data instead of doing any reallocs.
7905         (_dbus_string_init_preallocated): new function
7906
7907 2003-05-11  Havoc Pennington  <hp@pobox.com>
7908
7909         Write a "test-profile" that does echo client-server with threads;
7910         profile reveals lock contention, memcpy/realloc of buffers, and
7911         UTF-8 validation as hot spots. 20% of lock contention eliminated
7912         with dbus_atomic_inc/dec implementation on x86.  Much remaining
7913         contention is global mempool locks for GList and DBusList.
7914
7915         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
7916         x86 implementation
7917
7918         * dbus/dbus-connection.c (struct DBusConnection): use
7919         dbus_atomic_t for the reference count
7920
7921         * dbus/dbus-message.c (struct DBusMessage): declare
7922         dbus_atomic_t values as volatile
7923
7924         * configure.in: code to detect ability to use atomic integer
7925         operations in assembly, from GLib patch
7926
7927         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
7928         time, tired of it being wrong in threads and forked processes
7929
7930         * glib/test-profile.c: a little program to bounce messages back
7931         and forth between threads and eat CPU
7932
7933         * dbus/dbus-connection.c: add debug spew macros for debugging
7934         thread locks; include config.h at top; fix deadlock in
7935         dbus_connection_flush()
7936
7937 2003-05-08  Havoc Pennington  <hp@pobox.com>
7938
7939         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
7940         data from getting written, and there wasn't a good reason to
7941         use _exit really.
7942
7943         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
7944         dbus_verbose lines in test coverage
7945         (main): add list of functions sorted by # of untested blocks
7946         to the coverage report
7947
7948         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
7949
7950         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
7951
7952         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
7953         extend test coverage
7954
7955         * test/data/auth/cancel.auth-script: test canceling an
7956         authentication
7957
7958         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
7959         aren't used. in CVS history if we end up needing them.
7960
7961 2003-05-04  Havoc Pennington  <hp@pobox.com>
7962
7963         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
7964         unit test
7965
7966         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
7967         function, which assumed length was in # of strings, not bytes
7968
7969         * dbus/dbus-message.c (_dbus_message_test): add tests for some
7970         missing coverage
7971
7972         * dbus/dbus-connection.c
7973         (_dbus_connection_queue_received_message): disable function for
7974         now, we are only using it in test mode
7975
7976         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7977         remove a mistaken FIXME
7978
7979 2003-05-04  Havoc Pennington  <hp@pobox.com>
7980
7981         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
7982         unlock mutex on successful return, patch from Anders Gustafsson
7983
7984 2003-05-04  Havoc Pennington  <hp@pobox.com>
7985
7986         * dbus-glib-1.pc.in (Requires): fix dependencies, from
7987         Anders Gustafsson
7988
7989 2003-05-04  Havoc Pennington  <hp@pobox.com>
7990
7991         * tools/dbus-launch.c: implement
7992
7993         * bus/main.c (main), bus/bus.c (bus_context_new):
7994         implement --print-pid and --fork
7995
7996 2003-05-03  Havoc Pennington  <hp@redhat.com>
7997
7998         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
7999         the address had no value, and add to test suite. Fix and
8000         regression test from Miloslav Trmac
8001
8002 2003-05-03  Havoc Pennington  <hp@pobox.com>
8003
8004         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
8005         watch is invalid when handled
8006
8007         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
8008         dbus-launch utility to launch the bus from a shell script.  Didn't
8009         actually implement dbus-launch yet, it's just a placeholder still.
8010
8011 2003-05-03  Havoc Pennington  <hp@pobox.com>
8012
8013         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
8014         daemon; also documents daemon config file, so replaces
8015         doc/config-file.txt. Corrected some stuff from config-file.txt in
8016         the process of moving it.
8017
8018 2003-05-03  Havoc Pennington  <hp@pobox.com>
8019
8020         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
8021         add some man pages
8022
8023 2003-05-03  Colin Walters  <walters@verbum.org>
8024
8025         * dbus/dbus-sysdeps.c (fill_user_info): Test against
8026         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
8027
8028         * Makefile.am: Update to use new .pc versioning scheme.
8029
8030 2003-05-02  Havoc Pennington  <hp@redhat.com>
8031
8032         * bus/system.conf.in: allow send/receive to/from message bus
8033         service
8034
8035 2003-04-30  Havoc Pennington  <hp@redhat.com>
8036
8037         * configure.in: print a note when building with unit tests and
8038         without assertions
8039
8040 2003-04-30  Havoc Pennington  <hp@redhat.com>
8041
8042         * Makefile.am: add a check-local that complains if you didn't
8043         configure with --enable-tests
8044
8045 2003-04-29  Havoc Pennington  <hp@redhat.com>
8046
8047         * glib/dbus-gmain.c: docs cleanups
8048
8049         * dbus/dbus-types.h: add docs on int64 types
8050
8051         * dbus/dbus-memory.c: fix docs to avoid putting private API in
8052         public API docs section
8053
8054 2003-04-29  Havoc Pennington  <hp@redhat.com>
8055
8056         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
8057         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
8058         parallel install API version, not with the D-BUS package version.
8059
8060         * HACKING: move some of README over here
8061
8062         * README: updates, and document API/ABI policy
8063
8064         * configure.in: reindentation
8065
8066 2003-04-29  Havoc Pennington  <hp@redhat.com>
8067
8068         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
8069         to use this library" to be sure people have the right
8070         expectations.
8071
8072 2003-04-28  Havoc Pennington  <hp@redhat.com>
8073
8074         * configure.in: add --enable-docs which by default is auto yes if
8075         doxygen and db2html found, no otherwise; but can be forced on/off
8076
8077         * doc/Makefile.am: conditionalize whether to build docs on
8078         --enable-docs
8079
8080 2003-04-28  Havoc Pennington  <hp@redhat.com>
8081
8082         * configure.in: 0.10
8083
8084         * NEWS: update
8085
8086         * bus/system.conf.in: add <includedir>system.d</includedir>
8087
8088         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
8089         username was provided but not uid
8090
8091         * bus/config-parser.c (struct BusConfigParser): keep track of
8092         whether the parser is toplevel or was included; change some
8093         of the error handling if it's included.
8094
8095 2003-04-27  Havoc Pennington  <hp@pobox.com>
8096
8097         Unbreak my code...
8098
8099         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8100         report correct status if we finish processing authentication
8101         inside this function.
8102
8103         * bus/activation.c (try_send_activation_failure): use
8104         bus_transaction_send_error_reply
8105
8106         * bus/connection.c (bus_connection_get_groups): return an error
8107         explaining the problem
8108
8109         * bus/bus.c (bus_context_check_security_policy): implement
8110         restriction here that inactive connections can only send the
8111         hello message. Also, allow bus driver to send anything to
8112         any recipient.
8113
8114         * bus/connection.c (bus_connection_complete): create the
8115         BusClientPolicy here instead of on-demand.
8116         (bus_connection_get_policy): don't return an error
8117
8118         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
8119         sender field in message being replied to
8120
8121         * bus/bus.c (bus_context_check_security_policy): fix silly typo
8122         causing it to return FALSE always
8123
8124         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
8125         we checked sender rather than destination
8126
8127 2003-04-25  Havoc Pennington  <hp@redhat.com>
8128
8129         test suite is slightly hosed at the moment, will fix soon
8130
8131         * bus/connection.c (bus_connections_expire_incomplete): fix to
8132         properly disable the timeout when required
8133         (bus_connection_set_name): check whether we can remove incomplete
8134         connections timeout after we complete each connection.
8135
8136         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
8137         probably still broken.
8138
8139         * bus/services.c (bus_registry_acquire_service): implement max
8140         number of services owned, and honor allow/deny rules on which
8141         services a connection can own.
8142
8143         * bus/connection.c (bus_connection_get_policy): report errors here
8144
8145         * bus/activation.c: implement limit on number of pending
8146         activations
8147
8148 2003-04-25  Havoc Pennington  <hp@redhat.com>
8149
8150         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
8151         where we used >= 0 instead of != DBUS_UID_UNSET.
8152
8153 2003-04-25  Havoc Pennington  <hp@redhat.com>
8154
8155         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
8156         were toggled without add/remove, fix from Anders Gustafsson
8157
8158 2003-04-24  Havoc Pennington  <hp@redhat.com>
8159
8160         * test/data/valid-config-files/basic.conf: add <limit> tags to
8161         this test
8162
8163         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
8164         <limit> tag in configuration file.
8165
8166 2003-04-24  Havoc Pennington  <hp@redhat.com>
8167
8168         * bus/dispatch.c: somehow missed some name_is
8169
8170         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
8171         (_dbus_timeout_set_interval): new
8172
8173         * bus/connection.c (bus_connections_setup_connection): record time
8174         when each connection is first set up, and expire them after the
8175         auth timeout passes.
8176
8177 2003-04-24  Havoc Pennington  <hp@redhat.com>
8178
8179         * dbus/dbus-message.c (dbus_message_name_is): rename
8180         (dbus_message_service_is): rename
8181         (dbus_message_sender_is): rename
8182         (dbus_message_get_service): rename
8183
8184 2003-04-24  Havoc Pennington  <hp@redhat.com>
8185
8186         * configure.in: add --enable-checks
8187
8188         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
8189
8190         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
8191         to use thread locks.
8192         (_dbus_connection_handler_destroyed_locked): move some private
8193         functions into proper docs group
8194
8195         * dbus/dbus-internals.h: add _dbus_return_if_fail,
8196         _dbus_return_val_if_fail
8197
8198         Throughout: use dbus_return_if_fail
8199
8200 2003-04-23  James Willcox  <jwillcox@gnome.org>
8201
8202         * glib/dbus-glib.h:
8203         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
8204         (dbus_connection_setup_with_g_main),
8205         (dbus_server_setup_with_g_main):
8206         * glib/test-dbus-glib.c: (main):
8207         * glib/test-thread-client.c: (main):
8208         * glib/test-thread-server.c: (new_connection_callback), (main):
8209         * tools/dbus-monitor.c: (main):
8210
8211         Added a GMainContext argument to dbus_connection_setup_with_g_main()
8212         and dbus_server_setup_with_g_main().
8213
8214 2003-04-20  Havoc Pennington  <hp@pobox.com>
8215
8216         * doc/dbus-specification.sgml: document the restrictions on
8217         message and service names
8218
8219 2003-04-22  Havoc Pennington  <hp@redhat.com>
8220
8221         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
8222         support, and do some code cleanups to share more code and
8223         speed up array marshal/demarshal.
8224
8225         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
8226
8227         * configure.in: generate dbus-arch-deps.h
8228
8229         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
8230         64-bit typecodes
8231
8232 2003-04-22  Havoc Pennington  <hp@redhat.com>
8233
8234         * test/data/valid-messages/opposite-endian.message: fix test
8235         to use proper type for rply field
8236
8237         * test/data/invalid-messages: add tests for below validation
8238
8239         * dbus/dbus-message.c (decode_header_data): validate field types,
8240         and validate that named fields are valid names
8241         (decode_name_field): consider messages in the
8242         org.freedesktop.Local. namespace to be invalid.
8243
8244         * dbus/dbus-string.c (_dbus_string_validate_name): new
8245
8246 2003-04-19  Havoc Pennington  <hp@pobox.com>
8247
8248         * bus/driver.c (bus_driver_handle_hello): check limits and
8249         return an error if they are exceeded.
8250
8251         * bus/connection.c: maintain separate lists of active and inactive
8252         connections, and a count of each. Maintain count of completed
8253         connections per user. Implement code to check connection limits.
8254
8255         * dbus/dbus-list.c (_dbus_list_unlink): export
8256
8257         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
8258         number of bytes in the message queue for a connection
8259
8260 2003-04-18  Havoc Pennington  <hp@pobox.com>
8261
8262         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
8263
8264         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
8265         memleaks
8266
8267         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
8268         on realloc be sure to update the pointer in the keyring
8269
8270         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
8271         offset to avoid writing to unallocated memory
8272
8273         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
8274         try the next mechanism, so we properly handle OOM
8275
8276         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
8277         on OOM.
8278         (_dbus_keyring_new): fix OOM bug
8279         (_dbus_keyring_new_homedir): always set error; impose a maximum
8280         number of keys we'll load from the file, mostly to speed up the
8281         test suite and make its OOM checks more useful, but also for
8282         general sanity.
8283
8284         * dbus/dbus-auth.c (process_error_server): reject authentication
8285         if we get an error from the client
8286         (process_cancel): on cancel, send REJECTED, per the spec
8287         (process_error_client): send CANCEL if we get an error from the
8288         server.
8289
8290 2003-04-18  Havoc Pennington  <hp@pobox.com>
8291
8292         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
8293         debug spew
8294
8295         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
8296         handling problem
8297
8298         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
8299         about DBUS_TEST_HOMEDIR once
8300
8301         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
8302         the environment
8303
8304         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
8305         config file so we test the right thing
8306
8307         Throughout: assorted docs improvements
8308
8309 2003-04-18  Havoc Pennington  <hp@pobox.com>
8310
8311         * glib/dbus-gmain.c: adapt to watch changes
8312
8313         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
8314
8315         * dbus/dbus-server.h: remove dbus_server_handle_watch
8316
8317         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
8318
8319         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
8320         like DBusTimeout, so we don't need dbus_connection_handle_watch
8321         etc.
8322
8323 2003-04-17  Havoc Pennington  <hp@redhat.com>
8324
8325         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
8326         database usage so it all goes via the DBusUserDatabase cache.
8327
8328 2003-04-17  Havoc Pennington  <hp@redhat.com>
8329
8330         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
8331         there was an OOM watch we skipped, we always return TRUE so we
8332         iterate again to have a look at it again. Fixes test suite hang.
8333         Code rearrangement also lets us lose some memset and only iterate
8334         over callbacks once.
8335
8336         * bus/driver.c (bus_driver_handle_message): sense of test for
8337         reply was backward
8338
8339 2003-04-16  Havoc Pennington  <hp@pobox.com>
8340
8341         * doc/dbus-specification.sgml: make spec say serials are unsigned
8342
8343         * dbus/dbus-message.h: change message serials to unsigned
8344
8345         * dbus/dbus-connection.c: adapt to message serials being unsigned
8346
8347 2003-04-15  Havoc Pennington  <hp@pobox.com>
8348
8349         * bus/bus.c: create and keep around a shared DBusUserDatabase
8350         object.
8351
8352         * bus/connection.c (bus_connection_get_groups): don't cache
8353         groups for user in the connection object, since user database
8354         object now does that.
8355
8356 2003-04-16  Havoc Pennington  <hp@redhat.com>
8357
8358         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
8359         list of size counters
8360         (_dbus_message_loader_putback_message_link): put back a popped link
8361
8362         * dbus/dbus-connection.c
8363         (dbus_connection_set_max_live_messages_size): rename
8364         max_received_size
8365         (dbus_connection_get_outgoing_size): get size of outgoing
8366         queue
8367         (_dbus_connection_set_connection_counter): remove this cruft
8368
8369 2003-04-14  Havoc Pennington  <hp@redhat.com>
8370
8371         * dbus/dbus-userdb.c: user database abstraction, mostly to get
8372         caching, but at some point we might want to be able to use a
8373         different database.
8374
8375         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
8376         SHA1 conf file to test the sha1 auth mechanism, since the regular
8377         test always uses EXTERNAL when available.
8378
8379         * configure.in,
8380         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
8381         add conf file that requires use of sha1 auth
8382
8383 2003-04-13  Havoc Pennington  <hp@pobox.com>
8384
8385         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
8386         from Philip Blundell to send messages and monitor them.
8387
8388 2003-04-13  Havoc Pennington  <hp@pobox.com>
8389
8390         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
8391         callbacks
8392
8393         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
8394         users
8395
8396         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8397         fix to only recover unused bytes if we're already authenticated
8398         (_dbus_transport_get_is_authenticated): fix to still mark us
8399         authenticated if there are unused bytes.
8400
8401         * bus/dispatch.c: implement security policy checking
8402
8403         * bus/connection.c (bus_transaction_send_from_driver): new
8404
8405         * bus/bus.c (bus_context_check_security_policy): new
8406
8407         * bus/dispatch.c (send_service_nonexistent_error): delete this,
8408         now we just set the DBusError and it gets converted to an error
8409         reply.
8410
8411         * bus/connection.c (allow_user_function): enable code using actual
8412         data from the config file
8413
8414         * bus/policy.c (list_allows_user): handle wildcard rules for
8415         user/group connection perms
8416
8417 2003-04-13  Havoc Pennington  <hp@pobox.com>
8418
8419         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
8420
8421         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
8422
8423         * bus/policy.c (bus_policy_append_mandatory_rule)
8424         (bus_policy_append_default_rule, bus_policy_append_user_rule)
8425         (bus_policy_append_group_rule): new functions
8426
8427 2003-04-12  Havoc Pennington  <hp@pobox.com>
8428
8429         * bus/config-parser.c (bus_config_parser_new): fix a memleak
8430
8431         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
8432         the pid/gid/uid, just for paranoia.
8433
8434         * test/break-loader.c (randomly_do_n_things): find a byte
8435         containing a type code, and randomly change it to a different
8436         type code.
8437
8438 2003-04-12  Havoc Pennington  <hp@pobox.com>
8439
8440         * bus/policy.h: change BusPolicy to be the thing from the config
8441         file, and rename old BusPolicy to BusClientPolicy
8442
8443         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
8444         match change in how policy works
8445
8446         * dbus/dbus-internals.h: mark assert_not_reached as
8447         __attribute((noreturn))__
8448
8449 2003-04-11  Havoc Pennington  <hp@redhat.com>
8450
8451         * doc/dbus-specification.sgml: fix a spot with the wrong name for
8452         the broadcast service. Use boolean return for ServiceExists.
8453
8454 2003-04-11  Havoc Pennington  <hp@redhat.com>
8455
8456         * configure.in: add another directory to look for qt in.
8457
8458 2003-04-11  Havoc Pennington  <hp@redhat.com>
8459
8460         * AUTHORS: add Colin Walters
8461
8462 2003-04-11  Havoc Pennington  <hp@redhat.com>
8463
8464         * NEWS: update
8465
8466         * configure.in: 0.9
8467
8468 2003-04-11  Havoc Pennington  <hp@redhat.com>
8469
8470         * bus/messagebus.in: remove pid file when stopping the
8471         message bus, since the bus won't have privileges to remove it
8472         itself.
8473
8474 2003-04-11  Havoc Pennington  <hp@redhat.com>
8475
8476         * bus/bus.c (bus_context_new): move credentials change after
8477         creating pidfile
8478
8479 2003-04-11  Havoc Pennington  <hp@pobox.com>
8480
8481         * test/decode-gcov.c: add "below average functions" to the
8482         coverage report, and change how some of the code works.
8483
8484         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
8485         not in the coverage stats.
8486
8487         * test/test-service.c (main): use _dbus_verbose not fprintf in a
8488         couple places so running the test suite doesn't result in megaspam.
8489
8490 2003-04-11  Havoc Pennington  <hp@pobox.com>
8491
8492         * bus/dispatch.c (check_existent_service_activation): accept a no
8493         memory error in a place we didn't before
8494
8495         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
8496         in case the first one failed," since the test suite is less
8497         broken now.
8498
8499 2003-04-10  Havoc Pennington  <hp@pobox.com>
8500
8501         * bus/dispatch.c (check_segfault_service_activation): add test
8502         for launching an executable that just crashes.
8503
8504         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
8505         don't leave a million cores. We'll see how portable this is.
8506
8507 2003-04-10  Havoc Pennington  <hp@pobox.com>
8508
8509         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
8510         the possible parent failures before we fork, so that we don't
8511         fail to create a babysitter after creating the child.
8512
8513         * bus/activation.c (bus_activation_activate_service): kill child
8514         if we don't successfully complete the activation.
8515
8516 2003-04-10  Havoc Pennington  <hp@redhat.com>
8517
8518         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
8519         the connection if it's disconnected
8520
8521         * bus/activation.c (bus_activation_service_created): use new
8522         transaction features to roll back removal of pending activation if
8523         we don't successfully create the service after all. Don't remove
8524         pending activation if the function fails.
8525
8526         * dbus/dbus-list.c (_dbus_list_insert_before_link)
8527         (_dbus_list_insert_after_link): new code to facilitate
8528         services.c fixes
8529
8530         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
8531         new functionality, so we can preallocate the ability to insert
8532         into a hash table.
8533
8534         * bus/connection.c (bus_transaction_add_cancel_hook): new function
8535         allowing us to put custom hooks in a transaction to be used for
8536         cancelling said transaction
8537
8538         * doc/dbus-specification.sgml: add some discussion of secondary
8539         service owners, and disallow zero-length service names
8540
8541         * bus/services.c (bus_registry_acquire_service): new function,
8542         splits out part of bus_driver_handle_acquire_service() and fixes
8543         a bug where we didn't remove the service doing the acquiring
8544         from the secondary queue if we failed to remove the current owner
8545         from the front of the queue.
8546
8547 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8548
8549         * doc/dbus-specification.sgml:
8550         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
8551
8552 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8553
8554         * bus/.cvsignore:
8555         * glib/.cvsignore:
8556         * test/.cvsignore:
8557         Added files to cvsignore
8558
8559         * dbus/dbus-message.h:
8560         * dbus/dbus-message.c: (dbus_message_iter_get_named):
8561         Make get_named() take two out argument and return a boolean.
8562         (dbus_message_iter_get_args_valist):
8563         Update usage of get_named().
8564         (dbus_message_iter_append_byte):
8565         Fix typo
8566         (dbus_message_iter_append_named)
8567         Fix typo
8568         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
8569         More tests.
8570
8571 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8572
8573         * dbus/dbus-marshal.[ch]:
8574         Add array_type_pos argument to _dbus_marshal_validate_arg.
8575         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
8576
8577         * dbus/dbus-message.[ch]:
8578         Multi-dimensional arrays have full type specification in the
8579         outermost array. Iter code re-arranged to handle this.
8580         Added some more iter tests.
8581
8582         * doc/dbus-specification.sgml:
8583         Add me to authors.
8584         Remove old FIXME.
8585         Update new array encoding description.
8586         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
8587
8588         * test/data/invalid-messages/array-with-mixed-types.message:
8589         * test/data/valid-messages/array-of-array-of-uint32.message:
8590         Change to the new array format.
8591
8592         * test/data/invalid-messages/too-short-dict.message:
8593         Fix bug in test.
8594
8595         * test/data/valid-messages/recursive-types.message:
8596         Fix up and extend test.
8597
8598 2003-04-10  Havoc Pennington  <hp@pobox.com>
8599
8600         * bus/dispatch.c: lots of fixes
8601
8602         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
8603         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
8604         that was crack, broke the test service.
8605
8606         * dbus/dbus-transport.c (_dbus_transport_open): fix error
8607         handling to avoid piling up errors if we get a failure on the
8608         first address.
8609
8610         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
8611         pid in assertion failures.
8612
8613         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
8614         to some fixed size of file descriptor array. Don't return TRUE
8615         anytime a timeout exists, that led to lots of busy loop silliness
8616         in the tests.
8617
8618 2003-04-09  Havoc Pennington  <hp@redhat.com>
8619
8620         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
8621         I'd checked this in earlier but hadn't.
8622
8623 2003-04-09  Havoc Pennington  <hp@redhat.com>
8624
8625         * bus/dispatch.c (bus_dispatch_test): get a bit further through
8626         the activation test (man this is getting old!)
8627
8628 2003-04-09  Havoc Pennington  <hp@redhat.com>
8629
8630         * test/test-utils.c: use dispatch status function to fix this up
8631
8632         * bus/connection.c (connection_watch_callback): don't dispatch
8633         from here
8634         (connection_timeout_callback): don't dispatch from here
8635         (bus_connections_setup_connection): set the dispatch status function
8636         (bus_connection_disconnected): unset it
8637
8638         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
8639         used to add a connection to be dispatched
8640         (_dbus_loop_iterate): do the dispatching at the end of each
8641         iteration
8642
8643         * dbus/dbus-connection.c
8644         (dbus_connection_set_dispatch_status_function): new function
8645         allowing us to fix up main loop usage
8646         (_dbus_connection_last_unref): free all the various function
8647         user data
8648         (dbus_connection_dispatch): call the DispatchStatusFunction
8649         whenever this function returns
8650         (dbus_connection_handle_watch): call DispatchStatusFunction
8651         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
8652         (reply_handler_timeout): call DispatchStatusFunction
8653         (dbus_connection_flush): call DispatchStatusFunction
8654
8655 2003-04-09  Havoc Pennington  <hp@redhat.com>
8656
8657         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
8658         a memory leak
8659
8660         * bus/dispatch.c (check_service_activated): fix bug in test
8661
8662         * dbus/dbus-mainloop.c (check_timeout): fix this up
8663
8664         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
8665         verbose output so we can sort out output from different processes,
8666         e.g. in the activation case.
8667
8668 2003-04-08  Colin Walters  <walters@gnu.org>
8669
8670         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
8671         the pid file.
8672         (bus_context_new): Set it.
8673         (bus_context_unref): Use it to delete the pid file.
8674
8675 2003-04-08  Havoc Pennington  <hp@redhat.com>
8676
8677         * test/data/invalid-messages/array-with-mixed-types.message:
8678         regression test that fails for the moment
8679
8680         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
8681         tests for convenience
8682
8683         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
8684         array of nil, it broke things.
8685
8686         * test/data/invalid-messages/array-of-nil.message: regression test
8687
8688         * test/data/valid-messages/array-of-array-of-uint32.message:
8689         happened to write this so added it to suite
8690
8691 2003-04-08  Havoc Pennington  <hp@redhat.com>
8692
8693         * bus/driver.c (bus_driver_handle_acquire_service): init
8694         retval/reply before checking name
8695
8696         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
8697         recursion depth argument
8698
8699         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
8700         in the public struct for future extension
8701
8702         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
8703         typo
8704
8705         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
8706         message
8707
8708         * doc/dbus-specification.sgml: fix typo
8709
8710 2003-04-08  Alexander Larsson  <alexl@redhat.com>
8711
8712         Implemented recursive types, named types and new-style iters
8713
8714         * bus/driver.c:
8715         * glib/test-thread-client.c: (thread_func):
8716         * glib/test-thread-server.c: (handle_test_message):
8717         * test/test-service.c: (handle_echo):
8718         Update to new api
8719
8720         * dbus/Makefile.am:
8721         * dbus/dbus-dict.c:
8722         * dbus/dbus-dict.h:
8723         * dbus/dbus.h
8724         Remove DBusDict
8725
8726         * dbus/dbus-internals.c: (_dbus_type_to_string):
8727         Update for new types.
8728
8729         * dbus/dbus-marshal.[ch]:
8730         Implement recursive types and the new marshalling format.
8731         Remove hardcoded dict marshalling.
8732         Marshal named types.
8733
8734         * dbus/dbus-message-builder.c:
8735         Add BYTE_ARRAY.
8736         Remove references to old types
8737
8738         * dbus/dbus-message.[ch]:
8739         New non-refcounted iter API that supports recursive iters.
8740         Use iters for appending, including support for recursive
8741         iters.
8742         Add byte and named type support.
8743         Update everything to new marshalling formats.
8744         Add tests for new API.
8745
8746         * dbus/dbus-protocol.h:
8747         Remove old array types.
8748         Add types: BYTE, ARRAY, DICT, NAMED
8749
8750         * dbus/dbus-string.c:
8751         * dbus/dbus-sysdeps.c:
8752         Make parse_double locale safe.
8753
8754         * dbus/dbus-test-main.c:
8755         Call setlocale.
8756
8757         * dbus/dbus-test.c:
8758         Kill dict test
8759
8760         * doc/dbus-specification.sgml:
8761         Update spec
8762
8763         * test/data/incomplete-messages/missing-body.message:
8764         * test/data/invalid-messages/bad-boolean.message:
8765         * test/data/invalid-messages/bad-boolean-array.message:
8766         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
8767         * test/data/invalid-messages/boolean-has-no-value.message-raw:
8768         * test/data/invalid-messages/too-short-dict.message:
8769         * test/data/valid-messages/dict-simple.message:
8770         * test/data/valid-messages/dict.message:
8771         * test/data/valid-messages/emptiness.message:
8772         * test/data/valid-messages/lots-of-arguments.message:
8773         * test/data/valid-messages/no-padding.message:
8774         * test/data/valid-messages/recursive-types.message:
8775         Add missing NAME fields
8776         Fix up dicts & arrays
8777
8778         * test/data/invalid-messages/dict-with-nil-value.message:
8779         Removed, this is not invalid anymore.
8780
8781         * test/data/valid-messages/recursive-types.message:
8782         Add new test for deeply recursive types.
8783
8784 2003-04-07  Havoc Pennington  <hp@pobox.com>
8785
8786         * bus/driver.c (bus_driver_handle_acquire_service): return an
8787         error if you try to acquire a service that starts with ':'
8788
8789 2003-04-07  Havoc Pennington  <hp@redhat.com>
8790
8791         * doc/dbus-specification.sgml: require that base service names
8792         start with ':' and that the base service is created/deleted
8793         as first and last things a connection does on the bus
8794
8795         * bus/dispatch.c (check_existent_service_activation): lots more
8796         work on the activation test; it doesn't fully pass yet...
8797
8798         * test/test-service.c (main): fix so we don't memleak the
8799         connection to the message bus
8800         (filter_func): accept a message asking us to exit
8801
8802 2003-04-06  Havoc Pennington  <hp@pobox.com>
8803
8804         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
8805         from Colin Walters
8806
8807         * configure.in: fixes to Qt detection from Colin Walters
8808
8809         * doc/Makefile.am: Only remove generated docbook dirs if they
8810         exist, from Colin Walters
8811
8812         * dbus/dbus-bus.c: change how we set well-known connections to
8813         NULL, so that it works if a single connection is stored in
8814         two well-known array slots.
8815
8816         * test/Makefile.am: remove a lot of stuff that isn't immediately
8817         useful, it's in CVS history if we want it.
8818
8819         * test/test-service.c: use dbus-mainloop instead of that
8820         watch.[hc] crack
8821
8822 2003-04-06  Havoc Pennington  <hp@pobox.com>
8823
8824         * dbus/Makefile.am: split lists of sources into stuff that goes in
8825         the library, util functions that go in the lib and are also used
8826         elsewhere, and util functions that are used in tests/daemon but
8827         don't go in the lib.
8828
8829         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
8830         here so it can be used in test binaries also
8831
8832 2003-04-06  Havoc Pennington  <hp@pobox.com>
8833
8834         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
8835         here in the parent process, so we can return an error if it
8836         fails. Also, move some of the code into the child so the parent
8837         is less hosed if we fail midway through.
8838
8839         * bus/bus.c (bus_context_new): move pidfile detection further up
8840         in the function, before we start overwriting sockets and such.
8841
8842         * bus/messagebus.in: adjust this a bit, not sure if it will work.
8843
8844         * configure.in: add --with-system-pid-file and --with-system-socket
8845
8846 2003-04-06  Colin Walters  <walters@verbum.org>
8847
8848         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
8849
8850         * bus/system.conf.in: Declare a pidfile.
8851
8852         * bus/bus.c (bus_context_new): Test for an existing pid file, and
8853         create one (if appropriate).
8854
8855         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
8856         (struct BusConfigParser) [pidfile]: New.
8857         (element_type_to_name, merge_included, start_busconfig_child)
8858         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
8859         (bus_config_parser_unref): Free it.
8860         (bus_config_parser_get_pidfile): New function.
8861
8862         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
8863
8864         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
8865
8866         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
8867
8868         * dbus/dbus-sysdeps.h: Prototype it.
8869
8870 2003-04-06  Havoc Pennington  <hp@pobox.com>
8871
8872         * bus/bus.c (bus_context_new): print the address in here, rather
8873         than in main(), because we need to do it before forking the daemon
8874
8875         * bus/dispatch.c (send_service_nonexistent_error): set the sender
8876         on the service nonexistent error
8877
8878         * bus/driver.c (bus_driver_handle_acquire_service): set the
8879         sender on the AcquireService reply
8880
8881         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
8882         server also listen on a UNIX socket so services can connect to it.
8883
8884 2003-04-06  Havoc Pennington  <hp@pobox.com>
8885
8886         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
8887         so it detects deadlocks and also we actually init threads when
8888         debugging.
8889
8890 2003-04-06  Havoc Pennington  <hp@pobox.com>
8891
8892         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
8893         save the domain socket name, and unlink it when we disconnect the
8894         server. Means that at least when we exit normally, we won't leave
8895         a bunch of junk in /tmp
8896
8897         * dbus/dbus-transport-unix.c
8898         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
8899         memory management). (I was making a real change here but then
8900         didn't)
8901
8902 2003-04-06  Havoc Pennington  <hp@pobox.com>
8903
8904         * bus/bus.c (bus_context_new): fix wrong handling of
8905         server_data_slot_unref() in the error case.
8906
8907         * dbus/dbus-internals.h (_dbus_assert): change so it passes
8908         "(condition) != 0" to _dbus_real_assert so that
8909         "_dbus_assert (pointer)" doesn't cause a warning
8910
8911         * bus/main.c (main): accept --print-address option to print out
8912         the message bus address
8913
8914         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
8915
8916         * dbus/dbus-transport.c (_dbus_transport_open): special error for
8917         "tmpdir" option to unix: address on client side
8918
8919         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
8920         to unix: address
8921
8922         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
8923         we can use to create sockets in the test suite.
8924
8925         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
8926         cleanly. To be used for testing.
8927
8928         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
8929
8930         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
8931
8932         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
8933         handle trying to call this when there's no servers active
8934
8935 2003-04-05  Havoc Pennington  <hp@pobox.com>
8936
8937         * NEWS: update
8938
8939         * configure.in: 0.8
8940
8941 2003-04-05  Havoc Pennington  <hp@pobox.com>
8942
8943         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
8944         crash on startup. Need to get "try starting the daemon"
8945         in the test suite I guess. ;-)
8946
8947         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
8948         tracked the number of open connections; it's better done in
8949         application-specific code as you want it to span all servers etc.
8950
8951 2003-04-05  Havoc Pennington  <hp@pobox.com>
8952
8953         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
8954         patch from Colin Walters
8955
8956 2003-04-05  Havoc Pennington  <hp@pobox.com>
8957
8958         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
8959         reality; in fact multiple mechanisms are allowed.
8960
8961         * dbus/dbus-internals.c (_dbus_real_assert)
8962         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
8963         _dbus_assert_not_reached() into functions, so that they don't show
8964         up in basic block counts for test coverage, and don't use up as
8965         much disk space. Does mean slower execution speed though, so
8966         assumes --disable-asserts is the normal production case.
8967
8968 2003-04-05  Havoc Pennington  <hp@pobox.com>
8969
8970         * test/Makefile.am (dist-hook): also dist *.in files
8971
8972         * NEWS: update
8973
8974         * configure.in: 0.7
8975
8976 2003-04-05  Havoc Pennington  <hp@pobox.com>
8977
8978         * dbus/dbus-string.c: docs warning
8979
8980         * dbus/dbus-spawn.c: missing docs
8981
8982         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
8983
8984 2003-04-05  Havoc Pennington  <hp@pobox.com>
8985
8986         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
8987         magic from GLib
8988
8989         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
8990         to -1 once we've reaped the babysitter
8991         (_dbus_babysitter_handle_watch): do as much work as we can, not
8992         just one go of it
8993
8994         * bus/activation.c: add code using DBusBabysitter so that we
8995         handle it when a service fails to start up properly.
8996         (bus_activation_service_created): don't remove the activation
8997         entries as we go, just let them get removed when we free the pending
8998         activation. Unref reply messages after sending them.
8999
9000 2003-04-05  Havoc Pennington  <hp@pobox.com>
9001
9002         * test/decode-gcov.c (main): print per-directory stats in the report
9003
9004         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
9005
9006 2003-04-05  Havoc Pennington  <hp@pobox.com>
9007
9008         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
9009
9010         * test/decode-gcov.c: hack up a little program to suck data
9011         out of gcov files. Yes this is sort of silly.
9012
9013         * configure.in: define something in config.h and do an
9014         AM_CONDITIONAL when gcov is enabled
9015
9016 2003-04-04  Havoc Pennington  <hp@redhat.com>
9017
9018         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
9019         return a "babysitter" object that is used to monitor the status of
9020         the spawned process and reap it when required.
9021
9022         * test/test-segfault.c, test/test-exit.c,
9023         test/test-sleep-forever.c: binaries that do various lame things,
9024         used in the test suite.
9025
9026         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
9027
9028 2003-04-03  Havoc Pennington  <hp@pobox.com>
9029
9030         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
9031         in preparation for modifying it, dbus-sysdeps is getting
9032         a bit unmanageable.
9033
9034 2003-04-03  Havoc Pennington  <hp@redhat.com>
9035
9036         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
9037         have multiple ones
9038
9039         * bus/*.[hc]: adapt to mainloop change
9040
9041 2003-04-03  Havoc Pennington  <hp@redhat.com>
9042
9043         * bus/activation.c (load_directory): fix up memleaks
9044         (bus_activation_entry_free): free the entry
9045
9046         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
9047         we get one from the message bus; fix memleaks.
9048
9049         * dbus/dbus-message.c (dbus_set_error_from_message): new function
9050
9051 2003-04-03  Havoc Pennington  <hp@pobox.com>
9052
9053         * bus/config-parser.c (bus_config_parser_unref): free
9054         list of mechanisms, bug discovered by test suite enhancements
9055         (putting system.conf and session.conf into suite)
9056
9057         * test/Makefile.am, test/test-service.c: add placeholder for a
9058         test service that we'll activate as part of test suite. Doesn't
9059         do anything yet.
9060
9061         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
9062         setting NULL value, and use system malloc not dbus_malloc()
9063         when we have unavoidable memleakage.
9064
9065         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
9066         didn't work, and support DBUS_BUS_ACTIVATION.
9067
9068         * bus/activation.c (child_setup): pass our well-known bus type to
9069         the child
9070
9071         * bus/config-parser.c: support <type> to specify well-known type
9072
9073         * doc/dbus-specification.sgml: document the env variables to
9074         locate well-known buses and find service activator
9075
9076 2003-04-02  Havoc Pennington  <hp@redhat.com>
9077
9078         * test/Makefile.am (all-local): add a rule to copy tests to
9079         builddir, so we can have generated tests. Use this to remove the
9080         silly hack for testing system.conf and session.conf. Will use this
9081         shortly to generate .service files pointing to test binaries.
9082
9083 2003-04-02  Havoc Pennington  <hp@redhat.com>
9084
9085         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
9086         current alloc and needed new length, not max of the doubled
9087         allocation and needed new length. Also, when building tests,
9088         don't do the double-allocation stuff, just realloc every time.
9089
9090 2003-04-02  Havoc Pennington  <hp@redhat.com>
9091
9092         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
9093         in error messages
9094         (_dbus_string_get_dirname): new
9095         (_dbus_sysdeps_test): new
9096         (_dbus_directory_open): include dirnames in error messages
9097
9098         * bus/config-parser.c: interpret <include> and <includedir> and
9099         <servicedir> relative to config file location if the given
9100         filename is not absolute.
9101
9102         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
9103
9104 2003-04-02  Havoc Pennington  <hp@redhat.com>
9105
9106         * bus/connection.c (bus_transaction_send_error_reply): set sender
9107         service for the error, and unref the reply on success
9108
9109         * bus/activation.c: convert to use BusTransaction so OOM can be
9110         handled correctly
9111         (bus_activation_service_created): set sender of the message
9112
9113 2003-04-01  Havoc Pennington  <hp@redhat.com>
9114
9115         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
9116         <includedir> (at least mostly)
9117
9118         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
9119         first, then the user ID
9120
9121 2003-04-01  Havoc Pennington  <hp@pobox.com>
9122
9123         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
9124         function
9125
9126         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
9127
9128         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
9129
9130         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
9131         socket 0777, and unlink any existing socket.
9132
9133         * bus/bus.c (bus_context_new): change our UID/GID and fork if
9134         the configuration file so specifies; set up auth mechanism
9135         restrictions
9136
9137         * bus/config-parser.c (bus_config_parser_content): add support
9138         for <fork> option and fill in code for <auth>
9139
9140         * bus/system.conf.in: add <fork/> to default configuration,
9141         and limit auth mechanisms to EXTERNAL
9142
9143         * doc/config-file.txt (Elements): add <fork>
9144
9145         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
9146         (_dbus_change_identity): new function
9147
9148 2003-03-31  Havoc Pennington  <hp@redhat.com>
9149
9150         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
9151         (_dbus_listen_unix_socket): fix off-by-one error in null
9152         termination spotted by Nalin
9153
9154 2003-03-31  Havoc Pennington  <hp@redhat.com>
9155
9156         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
9157         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
9158         having a real home directory available.
9159
9160 2003-03-31  Havoc Pennington  <hp@redhat.com>
9161
9162         * bus/Makefile.am (install-data-hook): create /var/run/dbus
9163
9164         * bus/messagebus.in: add init script for Red Hat /etc/init.d
9165
9166         * configure.in: add support for specifying a style of init script
9167         to install
9168
9169 2003-03-31  Havoc Pennington  <hp@redhat.com>
9170
9171         Fix some annoying DBusString API and fix all affected code.
9172
9173         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
9174         max_length argument
9175         (_dbus_string_get_data): change to return string instead of using
9176         an out param
9177         (_dbus_string_get_const_data): ditto
9178         (_dbus_string_get_data_len): ditto
9179         (_dbus_string_get_const_data_len): ditto
9180
9181 2003-03-31  Havoc Pennington  <hp@redhat.com>
9182
9183         * bus/main.c (main): fix up the command line arguments to be nicer
9184
9185 2003-03-31  Havoc Pennington  <hp@redhat.com>
9186
9187         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
9188         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
9189         final location that lands in the config file
9190
9191         * bus/config-loader-expat.c (bus_config_load): fix type of
9192         XML_Parser variable
9193
9194         * doc/TODO: remove TODO item for dbus_bus_get()
9195
9196         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
9197
9198 2003-03-31  Havoc Pennington  <hp@pobox.com>
9199
9200         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
9201         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
9202         argument since they are always client side
9203
9204         * dbus/dbus-server.c (dbus_server_get_address): new function
9205
9206         * bus/main.c (main): take the configuration file as an argument.
9207
9208         * test/data/valid-config-files/debug-allow-all.conf: new file to
9209         use with dispatch.c tests for example
9210
9211         * bus/test-main.c (main): require test data dir
9212
9213         * bus/bus.c (bus_context_new): change this to take a
9214         configuration file name as argument
9215
9216         * doc/config-file.txt (Elements): add <servicedir>
9217
9218         * bus/system.conf, bus/session.conf: new files
9219
9220         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
9221         well-known socket if none set
9222
9223         * configure.in: create system.conf and session.conf
9224
9225 2003-03-30  Havoc Pennington  <hp@pobox.com>
9226
9227         * bus/config-parser.c: hacking
9228
9229         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
9230         to shut down, since it could cause weirdness with the DBusList
9231         lock
9232
9233         * dbus/dbus-list.c (_dbus_list_test): add tests for the
9234         link-oriented stack routines
9235         (alloc_link): free the mempool if the first alloc from it fails
9236
9237         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
9238
9239         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
9240         from GLib
9241         (_dbus_string_skip_white): new
9242
9243         * doc/config-file.txt (Elements): add <includedir>
9244
9245 2003-03-28  Havoc Pennington  <hp@pobox.com>
9246
9247         * dbus/dbus-string.c (_dbus_string_copy_data_len)
9248         (_dbus_string_copy_data): new functions
9249
9250 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
9251
9252         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
9253         * dbus/dbus-bus.h:
9254         Add dbus_bus_get.
9255
9256         * dbus/dbus-memory.c:
9257         Fix a doc comment.
9258
9259 2003-03-28  Havoc Pennington  <hp@pobox.com>
9260
9261         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
9262         I think it may have just been superstition. Not sure.
9263
9264         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
9265         failures that were not being handled.
9266
9267         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
9268
9269         * dbus/dbus-memory.c: add ability to set number of mallocs in a
9270         row that will fail on out-of-memory.
9271
9272         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
9273         function for testing out-of-memory handling.
9274
9275         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
9276         allocation functions, they do map exactly to the expat ones.
9277
9278 2003-03-27  Havoc Pennington  <hp@redhat.com>
9279
9280         * bus/config-loader-libxml.c (bus_config_load): add another error
9281         check
9282
9283 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
9284
9285         * doc/TODO:
9286         Add note about automatic service activation.
9287
9288         * doc/dbus-specification.sgml:
9289         Rename the specification and clarify a few things.
9290
9291 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
9292
9293         * Doxyfile.in:
9294         * dbus/dbus-address.c:
9295         * dbus/dbus-dict.c:
9296         * dbus/dbus-marshal.c:
9297         * dbus/dbus-server-debug-pipe.c:
9298         * dbus/dbus-transport-unix.c:
9299         Fix documentation warnings.
9300
9301 2003-03-26  Havoc Pennington  <hp@pobox.com>
9302
9303         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
9304         after every test so it's quick and easy to see which leaked, and
9305         so we test multiple dbus_shutdown() calls
9306
9307         * configure.in: change configure.in XML stuff to also support
9308         expat
9309
9310         * config-loader-libxml.c: some hacking
9311
9312         * config-loader-expat.c: some hacking
9313
9314         * config-parser.c: some hacking, plus tests
9315
9316 2003-03-25  Havoc Pennington  <hp@redhat.com>
9317
9318         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
9319
9320         * configure.in: add --with-xml option to specify XML library,
9321         right now only libxml is supported.
9322
9323         * bus/config-loader-libxml.c, config-parser.c: sync some minor
9324         nonworking code between home and work, still just stubs
9325
9326 2003-03-24  Havoc Pennington  <hp@redhat.com>
9327
9328         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
9329         file
9330
9331         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
9332         NULL argument for "message" if the error is a well-known one,
9333         fill in a generic message in this case.
9334
9335         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
9336         favor of DBusError
9337
9338         * bus/test.c (bus_test_flush_bus): add
9339
9340         * bus/policy.c (bus_policy_test): test code stub
9341
9342 2003-03-24  Havoc Pennington  <hp@pobox.com>
9343
9344         * bus/connection.c (bus_connections_setup_connection): set up
9345         the "can this user connect" function, but it always returns
9346         TRUE until we have a config file parser so we can have a config
9347         file that allows connections.
9348
9349 2003-03-23  Havoc Pennington  <hp@pobox.com>
9350
9351         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
9352         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
9353         the mutex, so we can check for proper memory management
9354         and OOM handling.
9355
9356         * dbus/dbus-dataslot.c: remove the mutex from
9357         DBusDataSlotAllocator and lock it manually when using it,
9358         to simplify fitting it into the global slots framework.
9359
9360         * dbus/dbus-threads.c (init_static_locks): rework how we're
9361         handling global locks so they are easily shut down.
9362
9363         * bus/policy.c (bus_policy_append_rule): fix
9364
9365         * bus/test-main.c (main): check for memleaks
9366
9367         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
9368         test suite check for memleaks
9369
9370         * dbus/dbus-memory.c: add support in test mode for tracking
9371         number of outstanding blocks
9372
9373 2003-03-23  Havoc Pennington  <hp@pobox.com>
9374
9375         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
9376         policies code
9377
9378         * dbus/dbus-hash.h: add ULONG hash keys
9379
9380         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
9381         (_dbus_get_group_id): new function
9382
9383 2003-03-20  Havoc Pennington  <hp@redhat.com>
9384
9385         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
9386         new function
9387         (dbus_connection_get_unix_user): new function
9388
9389 2003-03-20  Havoc Pennington  <hp@pobox.com>
9390
9391         * bus/connection.c (bus_connection_send_oom_error): assert that
9392         message has a sender
9393         (connection_execute_transaction): ditto
9394         (bus_connection_preallocate_oom_error): fix to set the sender, and
9395         set recipient to the destination service, not the bus driver
9396
9397         * bus/policy.c: hacking
9398
9399         * dbus/dbus-message.c (dbus_message_service_is): new function
9400         (dbus_message_sender_is): new
9401
9402 2003-03-19  Havoc Pennington  <hp@redhat.com>
9403
9404         * bus/policy.c: start sketching code for policy restrictions on
9405         what connections can do.
9406
9407 2003-03-18  Havoc Pennington  <hp@redhat.com>
9408
9409         * doc/TODO: some notes on high-level todo items. Little nitpick
9410         stuff is all in @todo, so no need to add it here.
9411
9412         * doc/config-file.txt: some notes on how config file might look
9413
9414 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
9415
9416         * configure.in: 0.6
9417
9418         * NEWS: Update.
9419
9420 2003-03-17  Havoc Pennington  <hp@redhat.com>
9421
9422         * dbus/dbus-internals.h: add gcc attributes so that
9423         our printf-style functions warn on bad arguments to
9424         format
9425
9426         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
9427         format bug
9428
9429         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
9430         printf format bug
9431
9432 2003-03-17  Havoc Pennington  <hp@redhat.com>
9433
9434         * bus/test-main.c (main): make it print something as it runs
9435         so make check doesn't look stuck
9436
9437         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
9438         from CVS, now obsolete
9439
9440 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9441
9442         * bus/dispatch.c: (bus_dispatch):
9443         Refetch the service name since it may have been reallocated
9444         when dbus_message_set_sender was called.
9445
9446         * dbus/dbus-sysdeps.c: (_dbus_accept):
9447         Add address and address length variables and use them to stop
9448         valgrind from complaining.
9449
9450 2003-03-17  Havoc Pennington  <hp@pobox.com>
9451
9452         All tests pass, no memleaks, no valgrind complaints.
9453
9454         * bus/test.c: refcount handler_slot
9455
9456         * bus/connection.c (bus_connections_new): refcount
9457         connection_data_slot
9458
9459         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
9460         bytes so that auth scripts pass.
9461
9462         * bus/dispatch.c: init message_handler_slot so it gets allocated
9463         properly
9464
9465         * bus/dispatch.c (message_handler_slot_ref): fix memleak
9466
9467         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
9468         dealloc server_pipe_hash when no longer used for benefit of
9469         leak checking
9470
9471         * dbus/dbus-auth.c (process_command): memleak fix
9472
9473         * bus/dispatch.c (check_hello_message): memleak fix
9474
9475 2003-03-16  Havoc Pennington  <hp@pobox.com>
9476
9477         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
9478
9479 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9480
9481         * bus/activation.c (bus_activation_activate_service): Append
9482         the pending activation entry to the list of pending activations.
9483
9484 2003-03-16  Havoc Pennington  <hp@pobox.com>
9485
9486         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
9487         connections
9488
9489         * dbus/dbus-address.c (create_entry): fix OOM handling when
9490         failing to alloc entry->method
9491
9492 2003-03-16  Havoc Pennington  <hp@pobox.com>
9493
9494         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
9495         the watch
9496
9497         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9498         add some missing dbus_set_result
9499
9500         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
9501         alloc the DBusMessageHandler
9502
9503         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
9504         the transport here, since we call this from the finalizer; it
9505         resulted in a double-finalize.
9506
9507         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
9508         where we tried to use transport->connection that was NULL,
9509         happened when transport was disconnected early on due to OOM
9510
9511         * bus/*.c: adapt to handle OOM for watches/timeouts
9512
9513         * dbus/dbus-transport-unix.c: port to handle OOM during
9514         watch handling
9515
9516         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
9517         reference to unused bytes instead of a copy
9518
9519         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
9520         out of memory
9521
9522         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
9523         FALSE on OOM
9524
9525         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
9526         of memory
9527
9528 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9529
9530         * doc/dbus-specification.sgml:
9531         Document reply message for ActivateService.
9532
9533 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9534
9535         * bus/activation.c: (bus_pending_activation_entry_free),
9536         (bus_pending_activation_free), (bus_activation_new),
9537         (bus_activation_unref), (bus_activation_service_created),
9538         (bus_activation_activate_service):
9539         * bus/activation.h:
9540         * bus/bus.c: (bus_context_new):
9541         * bus/desktop-file.c: (new_section):
9542         * bus/driver.c: (bus_driver_send_service_deleted),
9543         (bus_driver_handle_activate_service):
9544         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
9545         * bus/services.h:
9546         * dbus/dbus-connection.c:
9547         (dbus_connection_send_with_reply_and_block):
9548         * dbus/dbus-message.c: (dbus_message_append_args_valist):
9549         * dbus/dbus-protocol.h:
9550         Make activation work better. Now pending activations will be queued
9551         and the daemon won't try to activate services that are already registered.
9552
9553 2003-03-16  Havoc Pennington  <hp@pobox.com>
9554
9555         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
9556         connection data
9557
9558         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
9559         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
9560
9561 2003-03-16  Havoc Pennington  <hp@pobox.com>
9562
9563         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
9564         this. always run the test suite before commit...
9565
9566         * bus/*: adapt to DBusConnection API changes
9567
9568         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9569         requires renaming stuff to avoid dbus_connection_dispatch name
9570         conflict.
9571
9572         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
9573         function
9574
9575         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
9576         separate from _dbus_message_loader_return_buffer()
9577
9578         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
9579         this, because it's now always broken to use; the number of
9580         messages in queue vs. the number still buffered by the message
9581         loader is undefined/meaningless. Should use
9582         dbus_connection_get_dispatch_state().
9583         (dbus_connection_dispatch): rename from
9584         dbus_connection_dispatch_message
9585
9586 2003-03-16  Havoc Pennington  <hp@pobox.com>
9587
9588         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
9589         implementation
9590
9591 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9592
9593         * dbus/dbus-connection.c:
9594         (dbus_connection_send_with_reply_and_block):
9595         Decrease connection->n_incoming when removing an entry
9596         from the list.
9597         * dbus/dbus-dict.c: (dbus_dict_entry_free),
9598         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9599         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9600         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
9601         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
9602         (dbus_dict_get_byte_array):
9603         Handle NULL arrays and strings. Also add support for byte arrays.
9604
9605         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
9606         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
9607         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9608         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9609         (_dbus_demarshal_dict), (demarshal_and_validate_len),
9610         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
9611         * dbus/dbus-marshal.h:
9612         Add support for marshalling and demarshalling empty arrays and strings.
9613
9614         * dbus/dbus-message.c: (dbus_message_append_args_valist),
9615         (dbus_message_append_string_array),
9616         (dbus_message_iter_get_boolean),
9617         (dbus_message_iter_get_boolean_array),
9618         (dbus_message_iter_get_int32_array),
9619         (dbus_message_iter_get_uint32_array),
9620         (dbus_message_iter_get_double_array),
9621         (dbus_message_iter_get_byte_array),
9622         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
9623         (check_message_handling):
9624         Add support for getting empty arrays and dicts.
9625
9626         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
9627         Don't do any validation at all for now, that's better than just checking
9628         for ASCII.
9629
9630         * test/data/valid-messages/emptiness.message:
9631         New test message with lots of empty arrays.
9632
9633 2003-03-16  Havoc Pennington  <hp@pobox.com>
9634
9635         * dbus/dbus-connection.c
9636         (_dbus_connection_queue_received_message_link): new function that
9637         can't fail due to OOM
9638
9639         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
9640         new function pops a message together with a list link
9641         containing it.
9642
9643         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
9644         message queuing functions to avoid needing to alloc memory
9645
9646 2003-03-16  Havoc Pennington  <hp@pobox.com>
9647
9648         Oops - test code was only testing failure of around 30 of the
9649         mallocs in the test path, but it turns out there are 500+
9650         mallocs. I believe this was due to misguided linking setup such
9651         that there was one copy of dbus_malloc etc. in the daemon and one
9652         in the shared lib, and only daemon mallocs were tested. In any
9653         case, the test case now tests all 500+ mallocs, and doesn't pass
9654         yet, though there are lots of fixes in this patch.
9655
9656         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
9657         this so that it doesn't need to allocate memory, since it
9658         has no way of indicating failure due to OOM (and would be
9659         annoying if it did).
9660
9661         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
9662
9663         * bus/Makefile.am: rearrange to create two self-contained
9664         libraries, to avoid having libraries with overlapping symbols.
9665         that was resulting in weirdness, e.g. I'm pretty sure there
9666         were two copies of global static variables.
9667
9668         * dbus/dbus-internals.c: move the malloc debug stuff to
9669         dbus-memory.c
9670
9671         * dbus/dbus-list.c (free_link): free list mempool if it becomes
9672         empty.
9673
9674         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
9675
9676         * dbus/dbus-address.c (dbus_parse_address): free list nodes
9677         on failure.
9678
9679         * bus/dispatch.c (bus_dispatch_add_connection): free
9680         message_handler_slot when no longer using it, so
9681         memory leak checkers are happy for the test suite.
9682
9683         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
9684
9685         * bus/bus.c (new_connection_callback): disconnect in here if
9686         bus_connections_setup_connection fails.
9687
9688         * bus/connection.c (bus_connections_unref): fix to free the
9689         connections
9690         (bus_connections_setup_connection): if this fails, don't
9691         disconnect the connection, just be sure there are no side
9692         effects.
9693
9694         * dbus/dbus-string.c (undo_alignment): unbreak this
9695
9696         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
9697         leaking
9698         (_dbus_auth_new): fix the order in which we free strings
9699         on OOM failure
9700
9701         * bus/connection.c (bus_connection_disconnected): fix to
9702         not send ServiceDeleted multiple times in case of memory
9703         allocation failure
9704
9705         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
9706         get the base service name
9707         (dbus_bus_register_client): don't return base service name,
9708         instead store it on the DBusConnection and have an accessor
9709         function for it.
9710         (dbus_bus_register_client): rename dbus_bus_register()
9711
9712         * bus/dispatch.c (check_hello_message): verify that other
9713         connections on the bus also got the correct results, not
9714         just the one sending hello
9715
9716 2003-03-15  Havoc Pennington  <hp@pobox.com>
9717
9718         Make it pass the Hello handling test including all OOM codepaths.
9719         Now to do other messages...
9720
9721         * bus/services.c (bus_service_remove_owner): fix crash when
9722         removing owner from an empty list of owners
9723         (bus_registry_ensure): don't leave service in the list of
9724         a connection's owned services if we fail to put the service
9725         in the hash table.
9726
9727         * bus/connection.c (bus_connection_preallocate_oom_error): set
9728         error flag on the OOM error.
9729
9730         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
9731         handle _dbus_transport_set_connection failure
9732
9733         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
9734         to create watches up front and simply enable/disable them as
9735         needed.
9736         (unix_connection_set): this can now fail on OOM
9737
9738         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
9739         of enabling/disabling a watch or timeout.
9740
9741         * bus/loop.c (bus_loop_iterate): don't touch disabled
9742         watches/timeouts
9743
9744         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
9745
9746 2003-03-15  Havoc Pennington  <hp@pobox.com>
9747
9748         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
9749         write useful test code, after all that futzing around ;-)
9750
9751         Test does not yet pass because we can't handle OOM in
9752         _dbus_transport_messages_pending (basically,
9753         dbus_connection_preallocate_send() does not prealloc the write
9754         watch). To fix this, I think we need to add new stuff to
9755         set_watch_functions, namely a SetEnabled function so we can alloc
9756         the watch earlier, then enable it later.
9757
9758         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
9759         dbus-memory.c to the convenience lib
9760
9761         * bus/test.c: rename some static functions to keep them clearly
9762         distinct from stuff in connection.c. Handle client disconnection.
9763
9764 2003-03-14  Havoc Pennington  <hp@pobox.com>
9765
9766         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
9767         transport, tests more of the real codepath. Set up clients
9768         with bus_setup_debug_client.
9769
9770         * bus/test.c (bus_setup_debug_client): function to set up debug
9771         "clients" on the main loop
9772
9773         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
9774         support
9775
9776         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
9777         server type
9778
9779         * dbus/dbus-server-debug.c: support a debug server based on pipes
9780
9781         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
9782         (_dbus_close): new function
9783
9784         * configure.in: check for socketpair
9785
9786 2003-03-14  Havoc Pennington  <hp@redhat.com>
9787
9788         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
9789         cheesy hack
9790
9791         * dbus/dbus-transport-debug.c: rework this a good bit to be
9792         less complicated. hopefully still works.
9793
9794         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
9795         manually
9796
9797         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
9798         after running it
9799
9800         * dbus/dbus-message.c (dbus_message_copy): rename from
9801         dbus_message_new_from_message, fix it up to copy
9802         all the message fields, add test case
9803
9804         * bus/dispatch.c (bus_dispatch_test): add some more test code,
9805         not quite passing yet
9806
9807 2003-03-14  Havoc Pennington  <hp@pobox.com>
9808
9809         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
9810         until no work remains" in test code. (the large diff here
9811         is just code movement, no actual changes)
9812
9813         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
9814         1, no point waiting around for test code.
9815         (_dbus_server_debug_accept_transport): unref the timeout
9816         after adding it (right?)
9817
9818         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
9819
9820 2003-03-13  Havoc Pennington  <hp@redhat.com>
9821
9822         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
9823         out of memory
9824
9825         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
9826         of memory
9827
9828         * dbus/dbus-connection.h: Make AddWatchFunction and
9829         AddTimeoutFunction return a bool so they can fail on out-of-memory
9830
9831         * bus/bus.c (bus_context_new): set up timeout handlers
9832
9833         * bus/connection.c (bus_connections_setup_connection): set up
9834         timeout handlers
9835
9836         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
9837         can fail
9838
9839         * bus/bus.c (bus_context_new): adapt to changes
9840
9841         * bus/connection.c: adapt to changes
9842
9843         * test/watch.c: adapt to DBusWatch changes
9844
9845         * bus/dispatch.c (bus_dispatch_test): started adding this but
9846         didn't finish
9847
9848 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
9849
9850         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
9851
9852 2003-03-13  Havoc Pennington  <hp@pobox.com>
9853
9854         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
9855         set up a test framework as for the library
9856
9857 2003-03-12  Havoc Pennington  <hp@pobox.com>
9858
9859         Throughout: purge global variables, introduce BusActivation,
9860         BusConnections, BusRegistry, etc. objects instead.
9861
9862         * bus/bus.h, bus/bus.c: introduce BusContext as a global
9863         message bus object
9864
9865         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
9866         going to redo this a bit differently I think
9867
9868 2003-03-12  Havoc Pennington  <hp@redhat.com>
9869
9870         Mega-patch that gets the message bus daemon initially handling
9871         out-of-memory. Work still needed. Also lots of random
9872         moving stuff to DBusError instead of ResultCode.
9873
9874         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
9875
9876         * dbus/dbus-connection.c
9877         (dbus_connection_send_with_reply_and_block): use DBusError
9878
9879         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
9880         DBusResultCode
9881
9882         * dbus/dbus-connection.c (dbus_connection_send): drop the result
9883         code here, as the only failure possible is OOM.
9884
9885         * bus/connection.c (bus_connection_disconnect):
9886         rename bus_connection_disconnected as it's a notification only
9887
9888         * bus/driver.c (bus_driver_handle_acquire_service): don't free
9889         "name" on get_args failure, should be done by get_args;
9890         don't disconnect client for bad args, just return an error.
9891         (bus_driver_handle_service_exists): ditto
9892
9893         * bus/services.c (bus_services_list): NULL-terminate returned array
9894
9895         * bus/driver.c (bus_driver_send_service_lost)
9896         (bus_driver_send_service_acquired): send messages from driver to a
9897         specific client to the client's unique name, not to the broadcast
9898         service.
9899
9900         * dbus/dbus-message.c (decode_header_data): reject messages that
9901         contain no name field
9902         (_dbus_message_get_client_serial): rename to
9903         dbus_message_get_serial and make public
9904         (_dbus_message_set_serial): rename from set_client_serial
9905         (_dbus_message_set_reply_serial): make public
9906         (_dbus_message_get_reply_serial): make public
9907
9908         * bus/connection.c (bus_connection_foreach): allow stopping
9909         iteration by returning FALSE from foreach function.
9910
9911         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
9912         (dbus_connection_free_preallocated_send)
9913         (dbus_connection_preallocate_send): new API for sending a message
9914         without possibility of malloc failure.
9915         (dbus_connection_send_message): rename to just
9916         dbus_connection_send (and same for whole function family)
9917
9918         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
9919
9920         * dbus/dbus-sysdeps.c (_dbus_exit): new function
9921
9922         * bus/activation.c: handle/return errors
9923
9924         * dbus/dbus-errors.h: add more DBUS_ERROR #define
9925
9926         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
9927         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
9928         (_dbus_result_from_errno): move to this file
9929
9930 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
9931
9932         * dbus/dbus-marshal.c:
9933         (_dbus_marshal_set_string):
9934         Take a length argument so we can marshal the correct string
9935         length.
9936
9937         (_dbus_marshal_dict), (_dbus_demarshal_dict),
9938         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
9939         (_dbus_marshal_test):
9940         * dbus/dbus-marshal.h:
9941         Add support for marshalling and demarshalling dicts.
9942
9943         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9944         Add support for TYPE DICT.
9945
9946         * dbus/dbus-message.c: (set_string_field):
9947         Adjust header padding.
9948
9949         (dbus_message_append_args_valist), (dbus_message_append_dict),
9950         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
9951         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
9952         (check_message_handling), (check_have_valid_message):
9953         * dbus/dbus-message.h:
9954         Add functions for setting and getting dicts.
9955
9956         * dbus/dbus-protocol.h:
9957         Add DBUS_TYPE_DICT.
9958
9959         * dbus/dbus.h:
9960         Add dbus-dict.h
9961
9962         * doc/dbus-specification.sgml:
9963         Add information about how dicts are marshalled.
9964
9965         * test/data/invalid-messages/dict-with-nil-value.message:
9966         * test/data/invalid-messages/too-short-dict.message:
9967         * test/data/valid-messages/dict-simple.message:
9968         * test/data/valid-messages/dict.message:
9969         Add sample messages containing dicts.
9970
9971 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
9972
9973         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
9974
9975 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
9976
9977         * dbus/Makefile.am:
9978         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9979         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
9980         (dbus_dict_set_int32), (dbus_dict_set_uint32),
9981         (dbus_dict_set_double), (dbus_dict_set_string),
9982         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9983         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9984         (dbus_dict_set_string_array), (_dbus_dict_test):
9985         * dbus/dbus-dict.h:
9986         Fix according to comments from Havoc.
9987
9988 2003-03-06  Michael Meeks  <michael@server.home>
9989
9990         * configure.in: if we don't have kde-config, disable have_qt.
9991
9992 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
9993
9994         * dbus/Makefile.am:
9995         Add dbus-dict.[ch]
9996
9997         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9998         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
9999         (dbus_dict_remove), (dbus_dict_get_value_type),
10000         (dbus_dict_get_keys), (dbus_dict_put_boolean),
10001         (dbus_dict_put_int32), (dbus_dict_put_uint32),
10002         (dbus_dict_put_double), (dbus_dict_put_string),
10003         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
10004         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
10005         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
10006         (dbus_dict_get_int32), (dbus_dict_get_uint32),
10007         (dbus_dict_get_double), (dbus_dict_get_string),
10008         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
10009         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
10010         (dbus_dict_get_string_array), (_dbus_dict_test):
10011         * dbus/dbus-dict.h:
10012         Add DBusDict implementation
10013
10014         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
10015         * dbus/dbus-test.h:
10016         Add _dbus_dict_test
10017
10018 2003-03-04  Havoc Pennington  <hp@pobox.com>
10019
10020         * test/data/auth/*: adapt to changes
10021
10022         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
10023         USERID_BASE64 and change USERNAME_BASE64 to put in username not
10024         userid
10025
10026         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
10027         more stuff from being in a context name, to make the protocol
10028         simpler to deal with
10029
10030         * dbus/dbus-errors.c (dbus_error_has_name): new function
10031         (dbus_error_is_set): new function
10032
10033         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
10034         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
10035
10036         * dbus/dbus-connection.c (dbus_connection_flush): also read
10037         messages during a flush operation
10038
10039         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
10040
10041 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
10042
10043         * configure.in: Check for gethostbyname on Solaris.
10044
10045         * dbus/dbus-transport.c: (_dbus_transport_open):
10046         Remove duplicate "tcp" entry.
10047
10048         * doc/dbus-specification.sgml:
10049         Clarify some things.
10050
10051 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
10052
10053         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
10054         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
10055         (_dbus_keyring_test):
10056         * dbus/dbus-md5.c: (_dbus_md5_compute):
10057         * dbus/dbus-sha.c: (_dbus_sha_compute):
10058         Plug memory leaks.
10059
10060 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
10061
10062         * README: Add some things.
10063
10064 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
10065
10066         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
10067         after case DBUS_TYPE_BOOELAN.
10068
10069 2003-03-02  Havoc Pennington  <hp@pobox.com>
10070
10071         * test/break-loader.c (randomly_set_extreme_ints): add test that
10072         sets really huge and small integers
10073
10074         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
10075         that length of boolean array fits in the string, and that
10076         string has room for boolean value in single-bool case.
10077
10078         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
10079         optional value to "ALIGN" command which is what to fill the
10080         alignment with.
10081
10082         * test/data/valid-messages/no-padding.message: add regression
10083         test for the message padding problem
10084
10085 2003-03-02  Havoc Pennington  <hp@pobox.com>
10086
10087         * dbus/dbus-message.c (decode_header_data): fix to always init
10088         message_padding, from Benjamin Dauvergne
10089
10090 2003-03-02  Havoc Pennington  <hp@pobox.com>
10091
10092         * configure.in: 0.5
10093
10094         * NEWS: Update.
10095
10096 2003-03-01  Joe Shaw  <joe@assbarn.com>
10097
10098         * configure.in: Check for "struct cmsgcred" and try to access its
10099         members for BSD-like unices.
10100
10101         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
10102         _dbus_read_credentials_unix_socket().
10103         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
10104         read() for reading the credential byte off the unix socket.  Use
10105         struct cmsgcred on systems that support it.
10106
10107 2003-02-27  Alexander Larsson  <alexl@redhat.com>
10108
10109         * glib/Makefile.am:
10110         * configure.in:
10111         Make gthreads-2.0 dependency optional. Don't build thread test if
10112         its not found.
10113
10114 2003-02-27  Havoc Pennington  <hp@pobox.com>
10115
10116         * dbus/dbus-connection.c
10117         (dbus_connection_send_message_with_reply_and_block): fix doh!
10118         doh! doh! bug that resulted in never removing a reply from the
10119         queue, no wonder we called get_reply_serial so much ;-)
10120
10121         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
10122         and client serial instead of demarshaling them every time
10123
10124 2003-02-27  Havoc Pennington  <hp@pobox.com>
10125
10126         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
10127         more inlined, using dbus-string-private.h, speeds things up
10128         substantially
10129
10130         * dbus/dbus-string.c (_dbus_string_free): apply align offset
10131         when freeing the string
10132         (_dbus_string_steal_data): fix for align offset
10133         (undo_alignment): new function
10134
10135 2003-02-26  Havoc Pennington  <hp@redhat.com>
10136
10137         All kinds of audit fixes from Owen, plus initial attempt to
10138         handle unaligned memory returned from malloc.
10139
10140         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
10141         leave room for align_offset and nul byte
10142         (fixup_alignment): function to track an align_offset and
10143         ensure real->str is aligned
10144         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
10145         to allow a nul byte plus align offset
10146         (_dbus_string_lock): fix overflow issue
10147         (_dbus_string_init_const_len): add assertions on sanity of len,
10148         assign allocated to be ALLOCATION_PADDING larger than len
10149         (set_length): fixup the overflow handling
10150         (_dbus_string_get_data_len): fix overflow in assertion
10151         (open_gap): detect overflow in size of gap to be opened
10152         (_dbus_string_lengthen): add overflow check
10153         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
10154         (_dbus_string_append): add overflow check
10155         (_dbus_string_append_unichar): overflow
10156         (_dbus_string_delete): fix overflow in assertion
10157         (_dbus_string_copy_len): overflow in assertion
10158         (_dbus_string_replace_len): overflows in assertions
10159         (_dbus_string_find): change to implement in terms of
10160         _dbus_string_find_to
10161         (_dbus_string_find_to): assorted fixage
10162         (_dbus_string_equal_c_str): assert c_str != NULL,
10163         fix logic so the function works
10164         (_dbus_string_ends_with_c_str): fix overflow thingy
10165         (_dbus_string_base64_encode): overflow fix
10166         (_dbus_string_validate_ascii): overflow
10167         (_dbus_string_validate_nul): overflow
10168
10169 2003-02-26  Havoc Pennington  <hp@redhat.com>
10170
10171         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
10172
10173 2003-02-26  Alexander Larsson  <alexl@redhat.com>
10174
10175         * configure.in:
10176         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
10177
10178         * dbus/dbus-connection.c:
10179         * dbus/dbus-connection.h:
10180         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
10181         Add dbus_connection_set_wakeup_main_function and use it when queueing
10182         incoming and outgoing messages.
10183
10184
10185         * dbus/dbus-dataslot.c:
10186         Threadsafe usage of DBusDataSlotAllocator
10187
10188         * dbus/dbus-message.c: (dbus_message_get_args_iter):
10189         dbus_new can fail.
10190
10191         * dbus/dbus-server-unix.c:
10192         Add todo comment
10193
10194         * glib/dbus-gmain.c:
10195         Implement the new wakeup functions for glib.
10196
10197         * glib/Makefile.am:
10198         * glib/test-thread-client.c:
10199         * glib/test-thread-server.c:
10200         * glib/test-thread.h:
10201         Initial cut at some thread test code. Not really done yet.
10202
10203 2003-02-26  Havoc Pennington  <hp@pobox.com>
10204
10205         * dbus/dbus-connection.c
10206         (dbus_connection_send_message_with_reply_and_block): fix crash
10207         where we ref'd the outgoing message instead of the returned reply
10208
10209         * dbus/dbus-transport-unix.c (do_authentication): check read watch
10210         at the end of this function, so if we didn't need to read for
10211         authentication, we reinstall it for receiving messages
10212
10213         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
10214         a NULL sender for peer-to-peer case
10215
10216         * dbus/dbus-transport-unix.c (check_read_watch): handle
10217         !authenticated case correctly
10218
10219         * glib/dbus-gmain.c: add support for DBusServer
10220
10221         * dbus/dbus-server.c: add data slot support
10222
10223         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
10224         return values and handle errors
10225
10226         * dbus/dbus-dataslot.c: factor out the data slot stuff from
10227         DBusConnection
10228
10229         * Doxyfile.in (INPUT): add glib subdir
10230
10231         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
10232         setup_with_g_main instead of hookup_with_g_main; write docs
10233
10234 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
10235
10236         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
10237         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10238         * dbus/dbus-message.c: (dbus_message_append_boolean),
10239         (dbus_message_append_boolean_array),
10240         (dbus_message_get_args_valist), (_dbus_message_test):
10241         * dbus/dbus-message.h:
10242         * doc/dbus-specification.sgml:
10243         Various fixes as pointed out by Havoc.
10244
10245         * test/data/invalid-messages/bad-boolean-array.message:
10246         * test/data/invalid-messages/bad-boolean.message:
10247         Add invalid boolean value test cases.
10248
10249 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
10250
10251         * dbus/dbus-internals.c: (_dbus_type_to_string):
10252         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
10253         (_dbus_marshal_validate_arg):
10254         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10255         * dbus/dbus-message.c: (dbus_message_append_args_valist),
10256         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
10257         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
10258         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
10259         (dbus_message_iter_get_double),
10260         (dbus_message_iter_get_boolean_array), (message_iter_test):
10261         * dbus/dbus-message.h:
10262         * dbus/dbus-protocol.h:
10263         * doc/dbus-specification.sgml:
10264         * test/data/valid-messages/lots-of-arguments.message:
10265         Add support for boolean and boolean array types.
10266
10267 2003-02-23  Havoc Pennington  <hp@pobox.com>
10268
10269         * dbus/dbus-keyring.c: finish most of this implementation and
10270         simple unit test
10271
10272         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
10273         these barf if the error isn't cleared to NULL
10274
10275         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
10276         (_dbus_create_directory): new function
10277
10278         * dbus/dbus-errors.c (dbus_set_error): fix warning
10279
10280         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
10281         (_dbus_string_hex_decode): new function
10282         (test_hex_roundtrip): test code
10283
10284         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
10285
10286         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
10287
10288         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
10289         the save-to-temp/rename trick to atomically write the new file
10290         (_dbus_string_parse_uint): new function
10291
10292 2003-02-22  Havoc Pennington  <hp@pobox.com>
10293
10294         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
10295
10296 2003-02-22  Havoc Pennington  <hp@pobox.com>
10297
10298         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
10299         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
10300
10301         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
10302
10303         * dbus/test/data/sha-1: add US government test suite for SHA-1
10304
10305 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10306
10307         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
10308         Make string arrays NULL-terminated.
10309
10310         * dbus/dbus-memory.c: (dbus_free_string_array):
10311         * dbus/dbus-memory.h:
10312         New function for freeing NULL-terminated string arrays.
10313
10314         * dbus/dbus-message-builder.c: (append_quoted_string),
10315         (_dbus_message_data_load):
10316         Add support for array types.
10317
10318         * dbus/dbus-message.c: (check_message_handling):
10319         Add more types as test cases.
10320
10321         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
10322         (_dbus_string_parse_double):
10323         Add the start offset to the end offset.
10324
10325         * test/data/valid-messages/lots-of-arguments.message:
10326         New test message with lots of arguments.
10327
10328 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10329
10330         * dbus/dbus-message.c: (dbus_message_append_nil),
10331         (dbus_message_append_int32), (dbus_message_append_uint32),
10332         (dbus_message_append_double), (dbus_message_append_string),
10333         (dbus_message_append_int32_array),
10334         (dbus_message_append_uint32_array),
10335         (dbus_message_append_double_array),
10336         (dbus_message_append_byte_array),
10337         (dbus_message_append_string_array):
10338         Fix all out-of-memory handling in these functions.
10339
10340 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10341
10342         * dbus/dbus-message.c: (dbus_message_append_nil):
10343         Fix a silly.
10344
10345 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10346
10347         * dbus/dbus-message.c: (dbus_message_append_args_valist),
10348         (dbus_message_append_nil), (dbus_message_append_int32_array),
10349         (dbus_message_append_uint32_array),
10350         (dbus_message_append_double_array),
10351         (dbus_message_append_byte_array),
10352         (dbus_message_append_string_array), (dbus_message_get_args_valist),
10353         (dbus_message_iter_get_int32_array),
10354         (dbus_message_iter_get_uint32_array),
10355         (dbus_message_iter_get_double_array),
10356         (dbus_message_iter_get_byte_array),
10357         (dbus_message_iter_get_string_array):
10358
10359         * dbus/dbus-message.h:
10360         Add functions for appending and getting arrays.
10361
10362 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10363
10364         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
10365         element size at least 8 bytes, fixes mempool tests on
10366         64-bit machines.
10367
10368 2003-02-20  Alexander Larsson  <alexl@redhat.com>
10369
10370         * dbus/dbus-transport-unix.c (unix_do_iteration):
10371         Unlock the connection mutex during a blocking select call.
10372         Add todo about how we need a way to wake up the select.
10373
10374         * dbus/dbus-connection-internal.h:
10375         * dbus/dbus-connection.c:
10376         Add _dbus_connection_lock and _dbus_connection_unlock.
10377
10378 2003-02-19  Havoc Pennington  <hp@pobox.com>
10379
10380         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
10381         Doxyfile.in, not Doxyfile
10382
10383         * dbus/dbus-keyring.c: do some hacking on this
10384
10385         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
10386
10387         * dbus/dbus-errors.c (dbus_set_error_const): do not call
10388         dbus_error_init
10389         (dbus_set_error): remove dbus_error_init, check for message ==
10390         NULL *before* we sprintf into it, and add @todo about including
10391         system headers in this file
10392
10393         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
10394
10395         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
10396
10397         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
10398         get various bits of user information based on either username
10399         or user ID
10400         (_dbus_homedir_from_username): new function
10401
10402 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
10403
10404         * configure.in:
10405         Add check for nonposix getpwnam_r
10406
10407         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
10408         Align the pool element size to a sizeof (void *) boundary.
10409
10410         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
10411         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
10412         General Solaris fixes.
10413
10414         * test/data/valid-messages/simplest-manual.message:
10415         Explicitly state that we want little-endian packing.
10416
10417 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
10418
10419         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10420
10421         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
10422         Added to create a transport connecting using a tcp/ip socket.
10423
10424         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
10425         to a tcp socket at given host and port.
10426         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
10427         hostname and port.
10428
10429         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10430
10431         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
10432         Added to create a server listening on a TCP/IP socket.
10433
10434 2003-02-19  Havoc Pennington  <hp@pobox.com>
10435
10436         Throughout: mop up all the Doxygen warnings and undocumented
10437         stuff.
10438
10439         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
10440         to search any paths.
10441
10442         * dbus/dbus-threads.c: move global mutex initializers to
10443         dbus-internals.h, multiple prototypes was confusing doxygen
10444         besides being kind of ugly
10445
10446         * Doxyfile (PREDEFINED): have Doxygen define
10447         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
10448         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
10449         (do not abuse the feature! it's for stuff like the autogenerated
10450         macros in dbus-md5.c, not just for things you don't feel like
10451         documenting...)
10452
10453 2003-02-18  Havoc Pennington  <hp@pobox.com>
10454
10455         * dbus/dbus-string.c (_dbus_string_zero): new function
10456
10457         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
10458         wrap it in some dbus-friendly API
10459
10460         * dbus/dbus-types.h: add 16-bit types
10461
10462 2003-02-18  Joe Shaw  <joe@assbarn.com>
10463
10464         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
10465         credentials from our currently running process.
10466         (get_word): Fix a buglet where we were copying the entire length
10467         instead of relative to our position.
10468
10469         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
10470         keys on the stack... it's 640k of data.
10471
10472         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
10473         read the credentials byte off the socket, even if we don't have
10474         SO_PEERCRED.
10475         (_dbus_poll): Implement poll() using select() for systems which
10476         don't have it.
10477
10478         * glib/test-dbus-glib.c (main): Print out an error if no
10479         parameters are given.
10480
10481         * test/data/auth/fallback.auth-script: Added.  Tests that a client
10482         can fallback to a secondary auth mechanism if the first fails.
10483
10484 2003-02-18  Havoc Pennington  <hp@pobox.com>
10485
10486         * AUTHORS: add Alex
10487
10488 2003-02-17  Havoc Pennington  <hp@pobox.com>
10489
10490         * doc/dbus-specification.sgml: lots of cosmetic
10491         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
10492         env variable to DBUS_BUS_ADDRESS, s/client/application/,
10493         s/server/bus/ (except in authentication section). Add a section
10494         "Message Bus Message Routing"
10495
10496 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
10497
10498         Release 0.4
10499
10500         * NEWS: Update
10501
10502 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10503
10504         * doc/dbus-specification.sgml:
10505         Specification updates.
10506
10507 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10508
10509         * bus/activation.c: (bus_activation_init), (child_setup),
10510         (bus_activation_activate_service):
10511         * bus/activation.h:
10512         * bus/main.c: (main):
10513         Set DBUS_ADDRESS environment variable.
10514
10515         * dbus/dbus-errors.c: (dbus_set_error):
10516         Don't use va_copy since that's a C99 feature.
10517
10518         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
10519         (_dbus_spawn_async):
10520         * dbus/dbus-sysdeps.h:
10521         Add child_setup_func to _dbus_spawn_async.
10522
10523         * doc/dbus-specification.sgml:
10524         Update specification.
10525
10526         * test/spawn-test.c: (setup_func), (main):
10527         Fix test.
10528
10529 2003-02-17  Alexander Larsson  <alexl@redhat.com>
10530
10531         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
10532         Added todo.
10533
10534 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10535
10536         * doc/.cvsignore:
10537         * doc/Makefile.am:
10538         * doc/dbus-test-plan.sgml:
10539         Add test plan document.
10540
10541         * test/Makefile.am:
10542         Fix distcheck.
10543
10544 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10545
10546         * dbus/dbus-message.c: (decode_header_data),
10547         (_dbus_message_loader_return_buffer):
10548         Set the header padding amount when loading a message.
10549
10550 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10551
10552         * bus/dispatch.c: (send_one_message):
10553         Only send broadcast messages to registered connections.
10554
10555         * dbus/dbus-message.c: (dbus_message_name_is):
10556         * dbus/dbus-message.h:
10557         New convenience function.
10558
10559         * dbus/dbus-transport-debug.c: (do_reading):
10560         Only dispatch one message per run.
10561
10562         * test/Makefile.am:
10563         * test/bus-test.c: (new_connection_callback), (die),
10564         (test_hello_client1_handler), (test_hello_client2_handler),
10565         (test_hello_replies), (main):
10566
10567         * test/bus-test-loop.[ch]:
10568         Add these.
10569
10570 2003-02-16  Havoc Pennington  <hp@pobox.com>
10571
10572         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
10573         backward conditional
10574
10575 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10576
10577         * dbus/dbus-connection.c:
10578         Implement sent_message_with_reply. (with_reply_and block is still
10579         busted).
10580         Made dispatch_message not lose message if OOM.
10581
10582         * dbus/dbus-errors.h:
10583         Add NoReply error (for reply timeouts).
10584
10585 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10586
10587         * dbus/dbus-hash.c (_dbus_hash_table_unref):
10588         Actually free keys and values when destroying hashtable.
10589
10590 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10591
10592         * dbus/dbus-auth.c: (client_try_next_mechanism):
10593         Plug a leak.
10594
10595         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
10596         Return TRUE if there's no thread implementation around.
10597
10598         * glib/dbus-gmain.c: (free_source),
10599         (dbus_connection_hookup_with_g_main):
10600         Make sure to remove the GSource when the connection is finalized.
10601
10602 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10603
10604         * bus/dispatch.c: (bus_dispatch_message_handler):
10605         * dbus/dbus-errors.h:
10606         Return an error if someone tries to send a message to a service
10607         that doesn't exist.
10608
10609 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10610
10611         * bus/activation.c: (load_directory), (bus_activation_init),
10612         (bus_activation_activate_service):
10613         * bus/activation.h:
10614         * bus/driver.c:
10615         (bus_driver_handle_activate_service), (bus_driver_handle_message):
10616         More work on the activation handling.
10617
10618         * dbus/dbus-errors.h:
10619         Add some error messages
10620
10621         * dbus/dbus-message.c: (dbus_message_new_error_reply):
10622         * dbus/dbus-message.h:
10623         New function that creates an error message.
10624
10625         * dbus/dbus-protocol.h:
10626         Add ACTIVATE_SERVER message.
10627
10628         * dbus/dbus-server-unix.c: (unix_handle_watch),
10629         (_dbus_server_new_for_domain_socket):
10630         Call _dbus_fd_set_close_on_exec.
10631
10632         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
10633         (_dbus_spawn_async), (_dbus_disable_sigpipe),
10634         (_dbus_fd_set_close_on_exec):
10635         * dbus/dbus-sysdeps.h:
10636         Add _dbus_fd_set_close_on exec function. Also add function that checks
10637         that all open fds are set to close-on-exec and warns otherwise.
10638
10639         * dbus/dbus-transport-unix.c:
10640         (_dbus_transport_new_for_domain_socket):
10641         Call _dbus_fd_set_close_on_exec.
10642
10643 2003-02-16  Havoc Pennington  <hp@pobox.com>
10644
10645         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
10646         allow people to avoid setting SIGPIPE to SIG_IGN
10647         (_dbus_connection_new_for_transport): disable SIGPIPE unless
10648         we've been asked not to
10649
10650 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10651
10652         * dbus/dbus-list.c: (_dbus_list_append_link),
10653         (_dbus_list_prepend_link):
10654         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
10655         (dbus_realloc):
10656         Warning fixes.
10657
10658 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10659
10660         * bus/Makefile.am:
10661         * bus/activation.c: (bus_activation_entry_free),
10662         (add_desktop_file_entry), (load_directory), (bus_activation_init):
10663         * bus/activation.h:
10664         * bus/main.c: (main):
10665         Add simple activation support, doesn't work yet though.
10666
10667 2003-02-15   Zack Rusin  <zack@kde.org>
10668
10669         * qt/dbus-qthread.cpp:  small casting fix
10670
10671 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10672
10673         * dbus/dbus-errors.c: (dbus_set_error):
10674         * dbus/dbus-errors.h:
10675         Add a few errors and make dbus_set_error void.
10676
10677         * dbus/dbus-sysdeps.c:
10678         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
10679         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
10680         * dbus/dbus-sysdeps.h:
10681         Add _dbus_spawn_async.
10682
10683         * test/spawn-test.c: (main):
10684         Test for _dbus_spawn_async.
10685
10686 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10687
10688         * dbus/dbus-internals.h:
10689         Fix build without tests.
10690
10691         * dbus/dbus-list.c: (alloc_link):
10692         Fix a segfault when a malloc fails.
10693
10694         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
10695         (dbus_malloc0), (dbus_realloc):
10696         Add support for malloc debugging.
10697
10698 2003-02-15  Alexander Larsson  <alexl@redhat.com>
10699
10700         * dbus/dbus-threads.c:
10701         * dbus/dbus-threads.h:
10702         Add condvars. Remove static mutext from API.
10703         Implement static mutexes by initializing them from threads_init.
10704
10705         * glib/dbus-gthread.c:
10706         * qt/dbus-qthread.cpp:
10707         Update with the thread api changes.
10708
10709
10710         * dbus/dbus-list.c:
10711         * dbus/dbus-list.h:
10712         Turn StaticMutex into normal mutex + init function.
10713         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
10714         _dbus_list_append_link, _dbus_list_prepend_link
10715
10716
10717         * dbus/dbus-sysdeps.c:
10718         * dbus/dbus-sysdeps.h:
10719         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
10720         _dbus_atomic_dec. Only slow fallback implementation at the moment.
10721
10722         * dbus/dbus-protocol.h:
10723         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
10724
10725         * dbus/dbus-message.c:
10726         Make ref/unref atomic.
10727         Fix some docs.
10728
10729         * dbus/dbus-connection-internal.h:
10730         * dbus/dbus-connection.c:
10731         * dbus/dbus-connection.h:
10732         Make threadsafe.
10733         Change _peek to _borrow,_return & _steal_borrowed.
10734         Change disconnect callback to event.
10735         Make dbus_connection_dispatch_messages reentrant.
10736
10737         * dbus/dbus-transport.c:
10738         Don't ref the connection on calls to the transport
10739         implementation.
10740
10741         * dbus/dbus-message-handler.c:
10742         Make threadsafe.
10743
10744         * glib/dbus-gmain.c:
10745         Don't use peek_message anymore
10746
10747         * test/Makefile.am:
10748         * test/debug-thread.c:
10749         * test/debug-thread.h:
10750         Simple thread implementation that asserts() on deadlocks in
10751         single-threaded code.
10752
10753         * test/bus-test.c:
10754         (main) Call debug_threads_init.
10755
10756         * test/watch.c:
10757         Use disconnect message instead of disconnect callback.
10758
10759         * bus/connection.c:
10760         * bus/connection.h:
10761         Don't call dbus_connection_set_disconnect_function. Instead export
10762         bus_connection_disconnect.
10763
10764         * bus/dispatch.c:
10765         Call bus_connection_disconnect when we get a disconnected message.
10766
10767 2003-02-15  Havoc Pennington  <hp@pobox.com>
10768
10769         * dbus/dbus-message.c (dbus_message_new): fool around with the
10770         docs
10771
10772 2003-02-14  Havoc Pennington  <hp@pobox.com>
10773
10774         * dbus/dbus-mempool.c: fail if the debug functions so indicate
10775
10776         * dbus/dbus-memory.c: fail if the debug functions indicate we
10777         should
10778
10779         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
10780         (_dbus_decrement_fail_alloc_counter): debug functions to
10781         simulate memory allocation failures
10782
10783 2003-02-14  Havoc Pennington  <hp@pobox.com>
10784
10785         * dbus/dbus-errors.h (struct DBusError): add a word of padding
10786         to DBusError
10787
10788 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10789
10790         * bus/driver.c: (bus_driver_handle_hello):
10791         * bus/driver.h:
10792         * bus/services.c: (bus_service_lookup):
10793         Reorder message sending so we get a more sane order.
10794
10795         * test/bus-test.c: (message_handler):
10796         Fix tyop.
10797
10798 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10799
10800         * bus/driver.c: (bus_driver_send_service_deleted),
10801         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10802         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10803         (bus_driver_send_welcome_message),
10804         (bus_driver_handle_list_services),
10805         (bus_driver_handle_acquire_service),
10806         (bus_driver_handle_service_exists):
10807         * dbus/dbus-bus.c: (dbus_bus_register_client),
10808         (dbus_bus_acquire_service), (dbus_bus_service_exists):
10809         * dbus/dbus-errors.c: (dbus_result_to_string):
10810         * dbus/dbus-errors.h:
10811         * dbus/dbus-message.c: (dbus_message_append_args),
10812         (dbus_message_append_args_valist), (dbus_message_get_args),
10813         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
10814         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
10815         (dbus_message_iter_get_byte_array),
10816         (dbus_message_iter_get_string_array), (message_iter_test),
10817         (check_message_handling), (_dbus_message_test):
10818         * dbus/dbus-message.h:
10819         * test/bus-test.c: (main):
10820         Change fields to arguments in messages, so that they won't be
10821         confused with header fields.
10822
10823         * glib/test-dbus-glib.c: (main):
10824         Remove append_fields from hello message.
10825
10826 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10827
10828         * dbus/dbus-errors.c:
10829         * dbus/dbus-message.c:
10830         * dbus/dbus-string.c:
10831         Documentation fixes.
10832
10833 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10834
10835         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
10836         (remove_timeout):
10837         Implement support for timeouts in dbus-glib.
10838
10839 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10840
10841         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10842         * dbus/dbus-message.c: (process_test_subdir):
10843         * test/break-loader.c: (find_breaks_based_on):
10844         Plug some memory leaks.
10845
10846 2003-02-13  Richard Hult  <rhult@codefactory.se>
10847
10848         * bus/main.c: Fix build.
10849
10850         * dbus/dbus-errors.h:
10851         * dbus/dbus-errors.c: Fix copyright for Anders.
10852
10853 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10854
10855         * bus/Makefile.am:
10856         Add utils.[ch]
10857
10858         * bus/connection.c: (bus_connection_foreach):
10859         Fix a warning.
10860
10861         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10862         (unescape_string), (new_section), (parse_section_start),
10863         (parse_key_value), (report_error), (bus_desktop_file_load),
10864         (bus_desktop_file_get_string):
10865         * bus/desktop-file.h:
10866         Use DBusError for error reporting.
10867
10868         * bus/dispatch.c: (send_one_message),
10869         (bus_dispatch_message_handler):
10870         * bus/driver.c: (bus_driver_send_service_deleted),
10871         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10872         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10873         (bus_driver_send_welcome_message),
10874         (bus_driver_handle_list_services),
10875         (bus_driver_handle_acquire_service),
10876         (bus_driver_handle_service_exists):
10877         * bus/loop.c: (bus_loop_run):
10878         * bus/main.c:
10879         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
10880
10881         * bus/utils.c: (bus_wait_for_memory):
10882         * bus/utils.h:
10883         New files with general utility functions.
10884
10885         * dbus/dbus-internals.h:
10886         Remove _DBUS_HANDLE_OOM.
10887
10888 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10889
10890         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
10891         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
10892         * dbus/dbus-errors.h:
10893         Add DBusError structure.
10894
10895 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10896
10897         * test/data/valid-messages/standard-acquire-service.message:
10898         * test/data/valid-messages/standard-hello.message:
10899         * test/data/valid-messages/standard-list-services.message:
10900         * test/data/valid-messages/standard-service-exists.message:
10901         Add some standard messages.
10902
10903 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10904
10905         * bus/driver.c: (bus_driver_send_welcome_message),
10906         (bus_driver_handle_list_services),
10907         (bus_driver_handle_acquire_service),
10908         (bus_driver_handle_service_exists), (bus_driver_handle_message):
10909         Update for API changes in libdbus.
10910
10911         * dbus/dbus-message.c: (dbus_message_new_reply):
10912         * dbus/dbus-message.h:
10913         Remove the name argument. The spec states that replies shouldn't
10914         have a name.
10915
10916 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10917
10918         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
10919         (report_error), (bus_desktop_file_load), (lookup_section),
10920         (lookup_line), (bus_desktop_file_get_raw),
10921         (bus_desktop_file_get_string):
10922         * bus/desktop-file.h:
10923         Some fixes, and new functions for getting a key value from a section.
10924
10925 2003-02-13  Havoc Pennington  <hp@pobox.com>
10926
10927         * test/data/auth/fail-after-n-attempts.auth-script: new test
10928
10929         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
10930         reject the client.
10931
10932 2003-02-13  Havoc Pennington  <hp@pobox.com>
10933
10934         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
10935         dbus_credentials_match were backward
10936
10937         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
10938         NO_CREDENTIALS and ROOT_CREDENTIALS
10939
10940         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
10941         into here. Never process more commands after we've reached an
10942         end state; store further data as unused bytes.
10943
10944         * test/data/auth/*: add more auth tests
10945
10946         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
10947         command to match exact string and EXPECT_UNUSED to match unused
10948         bytes
10949
10950         * test/Makefile.am (dist-hook): fix to dist all the test stuff
10951
10952 2003-02-12  Havoc Pennington  <hp@pobox.com>
10953
10954         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
10955         \r off of popped lines
10956
10957         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
10958         scripts
10959
10960         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
10961         SEND, append \r\n
10962
10963 2003-02-12  Havoc Pennington  <hp@pobox.com>
10964
10965         * dbus/Makefile.am: remove break-loader from the build, since it
10966         moved.
10967
10968         * configure.in: add --enable-gcov to turn on coverage profiling
10969         flags and disable optimization
10970
10971 2003-02-10  Havoc Pennington  <hp@pobox.com>
10972
10973         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
10974         initial cut at test framework for DBusAuth from laptop.
10975         Doesn't quite work yet but it compiles and I need to get
10976         it off the 266mhz laptop. ;-)
10977
10978         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
10979         fix a memleak in error case
10980
10981 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
10982
10983         * bus/Makefile.am:
10984         * bus/desktop-file.c:
10985         * bus/desktop-file.h:
10986         Add a desktop file parser.
10987
10988 2003-02-11  Zack Rusin  <zack@kde.org>
10989
10990         * qt/message.[h|cpp]: sample implementation
10991         of the KDE wrapper for DBusMessage
10992
10993 2003-02-09  Zack Rusin  <zack@kde.org>
10994
10995         * test/bus-test.c: make_it_compile
10996         * doc/dbus-specification.sgml: minimal semantic fix
10997
10998 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
10999
11000         Release 0.3
11001
11002         * NEWS: Update
11003
11004 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
11005
11006         * dbus/Makefile.am:
11007         * dbus/dbus-break-loader.c:
11008         * test/Makefile.am:
11009         * test/break-loader.c:
11010         Move dbus-break-loader to test/ and rename it to break-loader.
11011
11012 2003-02-02  Havoc Pennington  <hp@pobox.com>
11013
11014         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
11015         for code to manage cookies in your home directory
11016
11017         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
11018
11019         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
11020         to authenticate, then disconnect the client.
11021
11022 2003-02-03  Alexander Larsson  <alexl@redhat.com>
11023
11024         * dbus/dbus-message.c (dbus_message_append_fields):
11025         Correct docs.
11026
11027 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11028
11029         * doc/dbus-specification.sgml:
11030         Update address format section.
11031
11032 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11033
11034         * test/Makefile.am:
11035         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
11036         (message_handler), (new_connection_callback), (loop_quit),
11037         (loop_run), (main):
11038         Add bus test.
11039
11040 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11041
11042         * bus/driver.c: (bus_driver_handle_service_exists):
11043         Simplify the code a bit.
11044
11045         * dbus/dbus-bus.c: (dbus_bus_service_exists):
11046         Fix a silly.
11047
11048 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11049
11050         * bus/Makefile.am:
11051         Add libdbus-daemon.la and link to it.
11052
11053 2003-02-01  James Willcox  <jwillcox@gnome.org>
11054
11055         * bus/driver.c: (bus_driver_handle_own_service):
11056         Actually include the service reply code in the message.
11057
11058 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11059
11060         * bus/driver.c: (bus_driver_handle_service_exists):
11061         Don't unref the incoming message.
11062
11063 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11064
11065         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
11066
11067 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
11068
11069         * dbus/dbus-server.c: (dbus_server_listen):
11070         * dbus/dbus-transport.c: (_dbus_transport_open):
11071         ifdef out the calls to the debug transport and server.
11072
11073 2003-02-02  Alexander Larsson  <alexl@redhat.com>
11074
11075         * dbus/dbus-watch.c (dbus_watch_get_flags):
11076         Add note in the docs that ERROR or HANGUP won't be returned
11077         and are assumed always on.
11078
11079         * glib/dbus-gmain.c (add_watch):
11080         Always add IO_ERR | IO_HUP
11081
11082         * dbus/dbus-message.h:
11083         Add semicolon after dbus_message_iter_get_string_array().
11084         Makes qt code build again
11085
11086 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
11087
11088         * bus/driver.c: (create_unique_client_name),
11089         (bus_driver_handle_hello):
11090         Don't take a name, just use a numeric id to identify
11091         each client.
11092
11093         * dbus/Makefile.am:
11094         * dbus/dbus-bus.c: (dbus_bus_register_client),
11095         (dbus_bus_acquire_service), (dbus_bus_service_exists):
11096         * dbus/dbus-bus.h:
11097         Add new convenience functions for communicating with the bus.
11098
11099         * dbus/dbus-message.h:
11100
11101         * dbus/dbus-protocol.h:
11102         Fix a typo.
11103
11104 2003-02-01  Alexander Larsson  <alexl@redhat.com>
11105
11106         * dbus/dbus-message.c (dbus_message_append_fields):
11107         Add some more doc comments.
11108
11109 2003-02-01  Havoc Pennington  <hp@pobox.com>
11110
11111         * dbus/dbus-break-loader.c (randomly_modify_length): change
11112         a 4-byte value in the message as if it were a length
11113
11114         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
11115         execute bit on saved files
11116
11117 2003-02-01  Havoc Pennington  <hp@pobox.com>
11118
11119         * dbus/dbus-break-loader.c (main): new program to find messages
11120         that break the loader.
11121
11122         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
11123         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
11124
11125         * dbus/dbus-string.c (_dbus_string_set_byte): new
11126
11127 2003-01-31  Havoc Pennington  <hp@pobox.com>
11128
11129         * dbus/dbus-message.c: refactor the test code to be more general,
11130         in preparation for writing a "randomly permute test cases to
11131         try to break the loader" program.
11132
11133 2003-01-31  Havoc Pennington  <hp@pobox.com>
11134
11135         * doc/dbus-specification.sgml: work on the specification
11136
11137         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
11138         the protocol version of the message.
11139
11140         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
11141         no longer specifies that.
11142         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
11143         1/2/3/4)
11144
11145         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
11146         "break" for DBUS_TYPE_NIL, remove @todo
11147
11148 2003-01-31  Havoc Pennington  <hp@pobox.com>
11149
11150         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
11151         just set_is_error/get_is_error as this is a commonly-used
11152         function, and write docs.
11153
11154 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
11155
11156         * dbus/dbus-address.c: (dbus_address_entry_free):
11157         Free key and value lists.
11158
11159         * dbus/dbus-internals.c: (_dbus_type_to_string):
11160         Add the types we didn't have.
11161
11162         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
11163         (_dbus_marshal_validate_arg):
11164         Add NIL types.
11165
11166         * dbus/dbus-message.c: (dbus_message_set_sender):
11167         Remove todo about being able to set sender to NULL.
11168
11169         (dbus_message_set_is_error_reply),
11170         (dbus_message_get_is_error_reply):
11171         * dbus/dbus-message.h:
11172         New functions.
11173
11174         * dbus/dbus-protocol.h:
11175         Add error reply flag.
11176
11177         * test/data/valid-messages/opposite-endian.message:
11178         Add NIL type to test.
11179
11180 2003-01-31  Havoc Pennington  <hp@pobox.com>
11181
11182         * doc/dbus-specification.sgml: fully specify the header.  Add
11183         flags and major protocol version, and change header/body len to
11184         unsigned.
11185
11186         * dbus/dbus-message-builder.c (append_saved_length): append length
11187         as uint32
11188
11189         * dbus/dbus-message.c (dbus_message_create_header): change header
11190         length and body length to unsigned. Add the new fields from the
11191         spec
11192         (_dbus_message_loader_return_buffer): unsigned header/body len
11193
11194 2003-01-30  Havoc Pennington  <hp@pobox.com>
11195
11196         * dbus/dbus-auth.c: rework to use only REJECTED, no
11197         MECHANISMS
11198
11199         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
11200         use REJECTED, suggested by Mark McLoughlin
11201
11202 2003-01-30  Havoc Pennington  <hp@pobox.com>
11203
11204         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
11205         a better way to report errors here. e.g.  "unix address lacks
11206         path" or something. also "no such file" when the path doesn't
11207         exist, etc.
11208
11209         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
11210         leaking list nodes
11211         (dbus_parse_address): add @todo about documenting address format,
11212         and allowing , and ; to be escaped
11213
11214 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
11215
11216         * dbus/Makefile.am:
11217         Add dbus-address.[ch]
11218
11219         * dbus/dbus-address.c: (dbus_address_entry_free),
11220         (dbus_address_entries_free), (create_entry),
11221         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
11222         (dbus_parse_address), (_dbus_address_test):
11223         * dbus/dbus-address.h:
11224         New files for dealing with address parsing.
11225
11226         * dbus/dbus-connection.c:
11227         Document timeout functions.
11228
11229         * dbus/dbus-message.c:
11230         Document dbus_message_new_from_message.
11231
11232         * dbus/dbus-server-debug.c:
11233         Document.
11234
11235         * dbus/dbus-server.c: (dbus_server_listen):
11236         Parse address and use correct server implementation.
11237
11238         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
11239         * dbus/dbus-string.h:
11240         New function with test.
11241
11242         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
11243         * dbus/dbus-test.h:
11244         Add address tests.
11245
11246         * dbus/dbus-transport-debug.c:
11247         Document.
11248
11249         * dbus/dbus-transport.c: (_dbus_transport_open):
11250         Parse address and use correct transport implementation.
11251
11252 2003-01-30  Havoc Pennington  <hp@pobox.com>
11253
11254         * dbus/dbus-message.c: use message->byte_order instead of
11255         DBUS_COMPILER_BYTE_ORDER throughout.
11256         (dbus_message_create_header): pad header to align the
11257         start of the body of the message to 8-byte boundary
11258
11259         * dbus/dbus-marshal.h: make all the demarshalers take const
11260         DBusString arguments.
11261
11262         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
11263         validate message args here, so we don't have to do slow validation
11264         later, and so we catch bad messages as they are incoming. Also add
11265         better checks on header_len and body_len. Also fill in
11266         message->byte_order
11267
11268         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
11269         implemented properly)
11270         (_dbus_string_validate_nul): new function to check all-nul
11271
11272         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
11273         get_arg_end_pos and remove all validation
11274         (_dbus_marshal_validate_arg): actually do validation here.
11275
11276 2003-01-29  Havoc Pennington  <hp@pobox.com>
11277
11278         * dbus/dbus-message.c (check_message_handling): fix assertion
11279         failure on set_client_serial
11280
11281 2003-01-28  Havoc Pennington  <hp@pobox.com>
11282
11283         * dbus/dbus-server-debug.c: Add doc section comments
11284
11285         * dbus/dbus-transport-debug.c: add doc section comments
11286
11287 2003-01-28  Havoc Pennington  <hp@redhat.com>
11288
11289         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
11290         the reverse order from how I had it
11291         (_dbus_string_base64_encode): reverse encoding order. I was
11292         basically byteswapping everything during encoding.
11293
11294 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
11295
11296         * dbus/dbus-connection-internal.h:
11297         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
11298         (_dbus_connection_remove_timeout):
11299         Add functions for adding and removing timeouts.
11300
11301         * dbus/dbus-message.c: (dbus_message_new_from_message):
11302         Add new function that takes a message and creates an exact
11303         copy of it, but with the refcount set to 1.
11304         (check_message_handling):
11305         Fix build error.
11306
11307         * dbus/dbus-server-protected.h:
11308         * dbus/dbus-server.c: (_dbus_server_init_base),
11309         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
11310         (dbus_server_set_timeout_functions):
11311         (_dbus_server_remove_timeout):
11312         New functions so that a server can add and remove timeouts.
11313
11314         (dbus_server_listen):
11315         Add commented out call to dbus_server_debug_new.
11316
11317         * dbus/dbus-timeout.c: (_dbus_timeout_new):
11318         Actually set the handler, doh.
11319
11320         * dbus/dbus-transport.c: (_dbus_transport_open):
11321         Add commented out call to dbus_transport_debug_client_new.
11322
11323         * dbus/Makefile.am:
11324         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
11325
11326 2003-01-28  Havoc Pennington  <hp@pobox.com>
11327
11328         * dbus/dbus-message.c (check_message_handling): function to check
11329         on the loaded message, iterates over it etc.
11330
11331 2003-01-28  Havoc Pennington  <hp@pobox.com>
11332
11333         * test/Makefile.am (dist-hook): fix make distdir
11334
11335         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
11336
11337 2003-01-27  Havoc Pennington  <hp@pobox.com>
11338
11339         * dbus/dbus-mempool.c (time_for_size): replace printf with
11340         _dbus_verbose
11341
11342         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
11343         empty lines; fix the SAVE_LENGTH stuff to be
11344         START_LENGTH/END_LENGTH so it actually works; couple other
11345         bugfixes
11346
11347         * test/Makefile.am (dist-hook): add dist-hook for .message files
11348
11349         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
11350         can be constant or locked.
11351         (_dbus_string_free): allow freeing a const string as
11352         documented/intended
11353
11354         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
11355
11356         * dbus/dbus-test-main.c (main): take an argument which is the
11357         directory containing test data
11358
11359         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
11360         argument to this and load all the messages in test/data/
11361         checking that they can be loaded or not loaded as appropriate.
11362
11363 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
11364
11365         * bus/dispatch.c: (bus_dispatch_message_handler):
11366         Dispatch messages sent to services.
11367
11368         * bus/driver.c: (bus_driver_send_service_deleted),
11369         (bus_driver_send_service_created), (bus_driver_send_service_lost),
11370         (bus_driver_send_service_acquired):
11371         Add helper functions for sending service related messages.
11372
11373         (bus_driver_send_welcome_message):
11374         Send HELLO_REPLY instead of WELCOME.
11375
11376         (bus_driver_handle_list_services):
11377         Send LIST_SERVICES_REPLY instead of SERVICES.
11378
11379         (bus_driver_handle_own_service),
11380         (bus_driver_handle_service_exists):
11381         New message handlers.
11382
11383         (bus_driver_handle_message):
11384         Invoke new message handlers.
11385
11386         (bus_driver_remove_connection):
11387         Don't remove any services here since that's done automatically
11388         by bus_service_remove_owner now.
11389
11390         * bus/driver.h:
11391         New function signatures.
11392
11393         * bus/services.c: (bus_service_add_owner):
11394         Send ServiceAcquired message if we're the only primary owner.
11395
11396         (bus_service_remove_owner):
11397         Send ServiceAcquired/ServiceLost messages.
11398
11399         (bus_service_set_prohibit_replacement),
11400         (bus_service_get_prohibit_replacement):
11401         Functions for setting prohibit replacement.
11402
11403         (bus_service_has_owner):
11404         New function that checks if a connection is in the owner queue of
11405         a certain service.
11406
11407         * bus/services.h:
11408         Add new function signatures.
11409
11410         * dbus/dbus-list.c: (_dbus_list_test):
11411         Add tests for _dbus_list_remove_last and traversing the list backwards.
11412
11413         * dbus/dbus-list.h:
11414         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
11415         go any further, so return NULL then.
11416
11417         * dbus/dbus-protocol.h:
11418         Add new messages, service flags and service replies.
11419
11420 2003-01-26  Havoc Pennington  <hp@pobox.com>
11421
11422         * dbus/dbus-message-builder.c: implement, completely untested.
11423
11424         * test/data/*: add data to be used in testing.
11425         ".message" files are our simple loadable text format.
11426         ".message-raw" will be binary dumps of messages.
11427
11428         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11429
11430 2003-01-26  Havoc Pennington  <hp@pobox.com>
11431
11432         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
11433
11434         * dbus/dbus-errors.c (dbus_result_to_string): add
11435         file errors
11436
11437         * dbus/dbus-message-builder.c: new file, will contain code to load
11438         up messages from files. Not implemented yet.
11439
11440 2003-01-26  Havoc Pennington  <hp@pobox.com>
11441
11442         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
11443         the sender by setting to NULL
11444
11445 2003-01-26  Havoc Pennington  <hp@pobox.com>
11446
11447         The unit tests pass, but otherwise untested.  If it breaks, the
11448         tests should have been better. ;-)
11449
11450         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
11451         the connection.
11452
11453         * dbus/dbus-message.c: redo everything so we maintain
11454         message->header as the only copy of the various fields.
11455         This avoids the possibility of out-of-memory in some cases,
11456         for example dbus_message_lock() can't run out of memory anymore,
11457         and avoids extra copying. Figured I may as well go ahead and do
11458         this since it was busted for dbus_message_lock to not return
11459         failure on OOM, and dbus_message_write_header was totally
11460         unchecked for OOM. Also fixed some random other bugs.
11461
11462         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
11463         that strings are nul-terminated. Also, end_pos can be equal
11464         to string length just not greater than, I think.
11465         (_dbus_marshal_set_int32): new function
11466         (_dbus_marshal_set_uint32): new function
11467         (_dbus_marshal_set_string): new function
11468
11469         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
11470         a warning, init timeout_list to NULL
11471         (dbus_connection_send_message): don't use uninitialized variable
11472         "serial"
11473
11474         * dbus/dbus-string.c (_dbus_string_replace_len): new function
11475
11476 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11477
11478         * bus/driver.c: (bus_driver_handle_hello),
11479         (bus_driver_send_welcome_message):
11480         Plug leaks
11481
11482 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11483
11484         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
11485         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11486         (dbus_connection_unref):
11487         * dbus/dbus-marshal.c: (_dbus_marshal_test):
11488         * dbus/dbus-message.c: (dbus_message_unref),
11489         Plug memory leaks.
11490
11491         (dbus_message_get_fields):
11492         Remove debugging printout.
11493
11494         (_dbus_message_loader_return_buffer):
11495         Don't store the header string.
11496
11497         (_dbus_message_test):
11498         Plug leaks.
11499
11500 2003-01-26  Richard Hult  <rhult@codefactory.se>
11501
11502         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
11503         the file descriptor list, since it can change under us.
11504
11505 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11506
11507         * glib/dbus-gmain.c: (dbus_connection_prepare),
11508         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
11509         (remove_watch), (dbus_connection_hookup_with_g_main):
11510         Rewrite the glib handling to use its own GSource instead of a
11511         GIOChannel so we can catch messages put in the queue while waiting
11512         for a reply.
11513
11514 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11515
11516         * bus/Makefile.am:
11517         * bus/connection.c: (connection_disconnect_handler),
11518         (connection_watch_callback), (bus_connection_setup):
11519         * bus/dispatch.c: (send_one_message),
11520         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
11521         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
11522         * bus/dispatch.h:
11523         * bus/driver.c: (bus_driver_send_service_deleted),
11524         (bus_driver_send_service_created), (bus_driver_handle_hello),
11525         (bus_driver_send_welcome_message),
11526         (bus_driver_handle_list_services), (bus_driver_remove_connection),
11527         (bus_driver_handle_message):
11528         * bus/driver.h:
11529         Refactor code, put the message dispatching in its own file. Use
11530         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
11531         is disconnected.
11532
11533 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11534
11535         * dbus/dbus-internals.h:
11536         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
11537
11538         * dbus/dbus-message.c: (dbus_message_get_sender):
11539         * dbus/dbus-message.h:
11540         Implement dbus_message_get_sender.
11541
11542         * dbus/dbus-protocol.h:
11543         Add message and service defines.
11544
11545 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11546
11547         * dbus/dbus-connection.c: (dbus_connection_send_message):
11548         * dbus/dbus-message-internal.h:
11549         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
11550         (dbus_message_write_header):
11551         Remove _dbus_messag_unlock and don't set the client serial on a
11552         message if one already exists.
11553
11554 2003-01-24  Havoc Pennington  <hp@pobox.com>
11555
11556         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
11557         list_pool
11558
11559         * bus/driver.c (bus_driver_handle_list_services): fix a leak
11560         on OOM
11561
11562 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11563
11564         * dbus/dbus-list.c: (alloc_link), (free_link):
11565         Use a memory pool for the links.
11566
11567 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11568
11569         * bus/connection.c: (bus_connection_foreach):
11570         * bus/connection.h:
11571         Add new bus_connection_foreach function.
11572
11573         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
11574         Add function that broadcasts a message to all clients.
11575
11576         (bus_driver_send_service_created), (bus_driver_handle_hello),
11577         (bus_driver_send_welcome_message),
11578         (bus_driver_handle_list_services), (bus_driver_message_handler):
11579         Implement functions that take care of listing services, and notifying
11580         clients when new services are created.
11581
11582         * bus/services.c: (bus_services_list):
11583         * bus/services.h:
11584         Add new function that returns an array of strings with the currently
11585         registered services.
11586
11587         * glib/dbus-glib.h:
11588         * glib/dbus-gmain.c:
11589         Update copyright year.
11590
11591 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11592
11593         * dbus/dbus-connection.c: (dbus_connection_send_message):
11594         Unlock the message in case it was sent earlier.
11595
11596         (dbus_connection_send_message_with_reply_and_block):
11597         Remove the reply message from the list.
11598
11599         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
11600         Set array_len and new_pos correctly.
11601
11602         (_dbus_marshal_test):
11603         Remove debug output.
11604
11605         * dbus/dbus-message-internal.h:
11606         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
11607         New function that returns the reply serial.
11608
11609         (_dbus_message_unlock):
11610         New function that unlocks a message and resets its header.
11611
11612         (dbus_message_append_string_array),
11613         (dbus_message_get_fields_valist),
11614         (dbus_message_iter_get_field_type),
11615         (dbus_message_iter_get_string_array),
11616         (dbus_message_get_fields),
11617         (dbus_message_append_fields_valist):
11618         Handle string arrays.
11619
11620         (dbus_message_set_sender):
11621         Make this function public since the bus daemon needs it.
11622
11623         (decode_header_data):
11624         Set the reply serial to -1 initially.
11625
11626         * dbus/dbus-message.h:
11627         Add dbus_message_set_sender.
11628
11629 2003-01-24  Havoc Pennington  <hp@pobox.com>
11630
11631         * doc/dbus-specification.sgml: add some stuff
11632
11633 2003-01-22  Havoc Pennington  <hp@pobox.com>
11634
11635         * doc/dbus-specification.sgml: Start to document the protocol.
11636
11637 2003-01-22  Havoc Pennington  <hp@pobox.com>
11638
11639         * dbus/dbus-connection.c
11640         (dbus_connection_send_message_with_reply_and_block): add some @todo
11641
11642         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11643
11644 2003-01-21  Havoc Pennington  <hp@pobox.com>
11645
11646         (patch untested because can't compile)
11647
11648         * bus/driver.c (create_unique_client_name): make this function
11649         never recycle client names. Also, caller should initialize
11650         the DBusString.
11651
11652         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
11653
11654 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11655
11656         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11657         (_dbus_marshal_int32), (_dbus_marshal_uint32),
11658         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
11659         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
11660         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
11661         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
11662         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
11663         * dbus/dbus-marshal.h:
11664         * dbus/dbus-protocol.h:
11665         Add support for marshalling and demarshalling integer, double
11666         and string arrays.
11667
11668 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11669
11670         * bus/Makefile.am:
11671         Add driver.[ch]
11672
11673         * bus/connection.c: (connection_disconnect_handler):
11674         Remove the connection from the bus driver's list.
11675
11676         (connection_watch_callback): Dispatch messages.
11677
11678         (free_connection_data): Free connection name.
11679
11680         (bus_connection_setup): Add connection to the bus driver's list.
11681         (bus_connection_remove_owned_service):
11682         (bus_connection_set_name), (bus_connection_get_name):
11683         Add functions for setting and getting the connection's name.
11684
11685         * bus/connection.h:
11686         Add function headers.
11687
11688         * bus/driver.c: (create_unique_client_name),
11689         (bus_driver_handle_hello_message),
11690         (bus_driver_send_welcome_message), (bus_driver_message_handler),
11691         (bus_driver_add_connection), (bus_driver_remove_connection):
11692         * bus/driver.h:
11693         * bus/main.c:
11694         * bus/services.c: (bus_service_free):
11695         * bus/services.h:
11696         New file that handles communication and registreation with the bus
11697         itself.
11698
11699 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11700
11701         * dbus/dbus-connection.c: (dbus_connection_send_message):
11702         Add a new client_serial parameter.
11703
11704         (dbus_connection_send_message_with_reply):
11705         Remove a @todo since we've implemented the blocking function.
11706
11707         (dbus_connection_send_message_with_reply_and_block):
11708         New function that sends a message and waits for a reply and
11709         then returns the reply.
11710
11711         * dbus/dbus-connection.h:
11712         Add new functions.
11713
11714         * dbus/dbus-errors.c: (dbus_result_to_string):
11715         * dbus/dbus-errors.h:
11716         Add new DBUS_RESULT.
11717
11718         * dbus/dbus-message-internal.h:
11719         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
11720         (_dbus_message_set_sender), (dbus_message_write_header),
11721         (dbus_message_new_reply), (decode_header_data),
11722         (_dbus_message_loader_return_buffer), (_dbus_message_test):
11723         * dbus/dbus-message.h:
11724         Add new functions that set the reply serial and sender.
11725         Also marshal and demarshal them correctly and add test.
11726
11727         * dbus/dbus-protocol.h:
11728         Add new DBUS_MESSAGE_TYPE_SENDER.
11729
11730         * glib/dbus-glib.h:
11731         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
11732         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
11733         (dbus_connection_hookup_with_g_main):
11734         * glib/test-dbus-glib.c: (main):
11735         Rewrite to use GIOChannel and remove the GSource crack.
11736
11737         * test/echo-client.c: (main):
11738         * test/watch.c: (check_messages):
11739         Update for changed APIs
11740
11741 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11742
11743         * dbus/Makefile.am: Add dbus-timeout.[cħ]
11744
11745         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
11746         Create a DBusTimeoutList.
11747         (dbus_connection_set_timeout_functions): Add new function to
11748         set timeout callbacks
11749
11750         * dbus/dbus-connection.h: Add public DBusTimeout API.
11751
11752         * dbus/dbus-message.c: (dbus_message_get_service):
11753         * dbus/dbus-message.h:  New function.
11754
11755         * dbus/dbus-server.c: Fix small doc typo.
11756
11757         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
11758
11759 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11760
11761         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
11762         of the string, just as long as specified.
11763
11764 2003-01-19  Havoc Pennington  <hp@pobox.com>
11765
11766         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
11767         new function
11768
11769         * dbus/dbus-server.c (dbus_server_set_max_connections)
11770         (dbus_server_get_max_connections, dbus_server_get_n_connections):
11771         keep track of current number of connections, and add API for
11772         setting a max (but haven't implemented enforcing the max yet)
11773
11774 2003-01-18  Havoc Pennington  <hp@pobox.com>
11775
11776         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
11777         reading/writing if read_watch != NULL or write_watch != NULL.
11778
11779         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
11780         the message loader code to actually load message->header and
11781         message->body into the newly-created message.
11782
11783         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
11784         in OOM case
11785
11786         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
11787         (dbus_connection_get_max_message_size)
11788         (dbus_connection_set_max_live_messages_size)
11789         (dbus_connection_get_max_live_messages_size): implement some
11790         resource limitation functions
11791
11792         * dbus/dbus-resources.c: new file implementing some of the
11793         resource limits stuff
11794
11795         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
11796         missing docs, add @todo to handle OOM etc.
11797
11798         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
11799         docs
11800
11801 2003-01-18  Havoc Pennington  <hp@pobox.com>
11802
11803         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
11804         connection if it hasn't been already.
11805
11806         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
11807         replace with DisconnectFunction.
11808
11809 2003-01-18  Havoc Pennington  <hp@pobox.com>
11810
11811         Building --disable-verbose-mode --disable-asserts --disable-tests
11812         cuts the library from 112K to 45K or so
11813
11814         * configure.in: check for varargs macro support,
11815         add --enable-verbose-mode, --enable-asserts.
11816
11817         * dbus/dbus-internals.h (_dbus_assert): support
11818         DBUS_DISABLE_ASSERT
11819         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
11820
11821 2003-01-18  Havoc Pennington  <hp@pobox.com>
11822
11823         * dbus/dbus-test.c: include config.h so that tests actually run
11824
11825         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
11826         so the failure mode when that assumption fails will be plenty
11827         obvious.
11828
11829 2003-01-18  Havoc Pennington  <hp@pobox.com>
11830
11831         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
11832
11833         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
11834         the distribution
11835
11836         * test/Makefile.am: don't use special variable "TESTS" for echo-*
11837         since we don't want to use those in make check
11838
11839 2003-01-15  Havoc Pennington  <hp@redhat.com>
11840
11841         Release 0.2
11842
11843         * NEWS: update
11844
11845 2003-01-15  Havoc Pennington  <hp@redhat.com>
11846
11847         * test/Makefile.am: fix so that test source code ends up in the
11848         distribution on make distcheck
11849
11850 2003-01-15  Havoc Pennington  <hp@redhat.com>
11851
11852         Release 0.1.
11853
11854         * NEWS: update
11855
11856 2003-01-15  Havoc Pennington  <hp@redhat.com>
11857
11858         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
11859         fix build when --disable-tests
11860
11861         * Makefile.am (EXTRA_DIST): put HACKING in here
11862
11863         * HACKING: document procedure for making a tarball release.
11864
11865 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
11866
11867         * bus/connection.c: (connection_error_handler),
11868         (bus_connection_setup):
11869         * bus/main.c: (main):
11870         Make sure that the DBusConnectionData struct is NULLed
11871         out to prevent a segfault.
11872
11873         * dbus/dbus-errors.c: (dbus_result_to_string):
11874         * dbus/dbus-errors.h:
11875         * dbus/dbus-message.c: (dbus_message_get_fields),
11876         (dbus_message_get_fields_valist), (_dbus_message_test):
11877         * dbus/dbus-message.h:
11878         Make dbus_message_get_fields return a result code so we can
11879         track invalid fields as well as oom.
11880
11881 2003-01-11  Havoc Pennington  <hp@pobox.com>
11882
11883         * configure.in: change --enable-test/--enable-ansi action-if-given
11884         to enable_foo=$enableval instead of enable_foo=yes
11885
11886 2003-01-08  Havoc Pennington  <hp@pobox.com>
11887
11888         * dbus/dbus-string.c (_dbus_string_align_length): new function
11889
11890         * dbus/dbus-test-main.c: move main() for test app here
11891         * dbus/dbus-test.c
11892         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
11893         symbol to run tests, because dbus-test isn't in the main
11894         library
11895
11896         Code review nitpicks.
11897
11898         * dbus/dbus-message.c (dbus_message_write_header): add newlines
11899         for people with narrow emacs ;-). Assert client_serial was filled
11900         in. Assert message->name != NULL.
11901         (dbus_message_append_fields): have "first_field_type" arg separate
11902         from va list, needed for C++ binding that also uses varargs IIRC
11903         and helps with type safety
11904         (dbus_message_new): add @todo about using DBusString to store
11905         service/name internally
11906         (dbus_message_new): don't leak ->service and ->name on OOM later
11907         in the function
11908         (dbus_message_unref): free the service name
11909         (dbus_message_get_fields): same change to varargs
11910         i.e. first_field_type
11911         (_dbus_message_loader_return_buffer): assert that the message data
11912         is aligned (if not it's a bug in our code). Put in verbose griping
11913         about why we set corrupted = TRUE.
11914         (decode_header_data): add FIXME that char* is evil.  Was going to
11915         add FIXME about evil locale-specific string.h strncmp, but just
11916         switched to wacky string-as-uint32 optimization. Move check for
11917         "no room for field name" above get_const_data_len() to avoid
11918         assertion failure in get_const_data_len if we have trailing 2
11919         bytes or the like. Check for service and name fields being
11920         provided twice. Don't leak service/name on error. Require field
11921         names to be aligned to 4 bytes.
11922
11923         * dbus/dbus-marshal.c: move byte swap stuff to header
11924         (_dbus_pack_int32): uscore-prefix
11925         (_dbus_unpack_int32): uscore-prefix
11926         (_dbus_unpack_uint32): export
11927         (_dbus_demarshal_string): add @todo complaining about use of
11928         memcpy()
11929         (_dbus_marshal_get_field_end_pos): add @todo about bad error
11930         handling allowing corrupt data to go unchecked
11931
11932 2003-01-08  Havoc Pennington  <hp@redhat.com>
11933
11934         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
11935         to the select() as needed for authentication. (should be using
11936         _dbus_poll() not select, but for another day)
11937
11938         * dbus/dbus.h: include dbus/dbus-protocol.h
11939
11940 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
11941
11942         * dbus/Makefile.am (dbusinclude_HEADERS): Install
11943         dbus-connection.h
11944
11945 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
11946
11947         * dbus/dbus-internals.c: (_dbus_type_to_string):
11948         New function that returns a string describing a type.
11949
11950         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
11951         * dbus/dbus-marshal.h:
11952         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
11953         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
11954         (dbus_message_iter_get_byte_array):
11955         * dbus/dbus-message.h:
11956         Add new convenience functions for appending and getting message fields.
11957         Also add demarshalling routines for byte arrays.
11958
11959 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11960
11961         * dbus/dbus-connection-internal.h:
11962         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11963         (_dbus_connection_get_next_client_serial),
11964         (dbus_connection_send_message):
11965         * dbus/dbus-internals.h:
11966         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
11967         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
11968         (_dbus_marshal_uint32), (_dbus_demarshal_double),
11969         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
11970         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
11971         (_dbus_verbose_bytes), (_dbus_marshal_test):
11972         * dbus/dbus-marshal.h:
11973         * dbus/dbus-message-internal.h:
11974         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
11975         (dbus_message_write_header), (_dbus_message_lock),
11976         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
11977         (dbus_message_get_name), (dbus_message_append_int32),
11978         (dbus_message_append_uint32), (dbus_message_append_double),
11979         (dbus_message_append_string), (dbus_message_append_byte_array),
11980         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
11981         (dbus_message_iter_unref), (dbus_message_iter_has_next),
11982         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
11983         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
11984         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
11985         (decode_header_data), (_dbus_message_loader_return_buffer),
11986         (message_iter_test), (_dbus_message_test):
11987         * dbus/dbus-message.h:
11988         * dbus/dbus-protocol.h:
11989         * dbus/dbus-test.c: (main):
11990         * dbus/dbus-test.h:
11991         * glib/test-dbus-glib.c: (message_handler), (main):
11992         * test/echo-client.c: (main):
11993         * test/watch.c: (check_messages):
11994         Make messages sendable and receivable for real.
11995
11996 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11997
11998         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11999         (_dbus_marshal_string), (_dbus_marshal_byte_array):
12000         * dbus/dbus-message.c: (dbus_message_append_int32),
12001         (dbus_message_append_uint32), (dbus_message_append_double),
12002         (dbus_message_append_string), (dbus_message_append_byte_array):
12003         Handle OOM restoration.
12004
12005 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
12006
12007         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12008         (_dbus_demarshal_string), (_dbus_marshal_test):
12009         * dbus/dbus-marshal.h:
12010         * dbus/dbus-message.c: (dbus_message_get_name),
12011         Document these functions.
12012
12013         (dbus_message_append_int32), (dbus_message_append_uint32),
12014         (dbus_message_append_double), (dbus_message_append_string),
12015         (dbus_message_append_byte_array):
12016         * dbus/dbus-message.h:
12017         Add functions for adding message fields of different types.
12018
12019         * dbus/dbus-protocol.h:
12020         Add the different types.
12021
12022 2003-01-05  Havoc Pennington  <hp@pobox.com>
12023
12024         * bus/connection.c: implement routines for handling connections,
12025         first thing is keeping a list of owned services on each connection
12026         and setting up watches etc.
12027
12028         * bus/services.c: implement a mapping from service names to lists
12029         of connections
12030
12031         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
12032
12033         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
12034         to use static mutexes for global data
12035
12036         * dbus/dbus-connection.c (dbus_connection_set_data): add new
12037         collection of functions to set/get application-specific data
12038         on the DBusConnection.
12039
12040 2003-01-04  Havoc Pennington  <hp@pobox.com>
12041
12042         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
12043         (_dbus_poll): new function
12044
12045         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
12046         copied from GLib
12047
12048         * bus/loop.c: initial code for the daemon main loop
12049
12050 2003-01-04  Havoc Pennington  <hp@pobox.com>
12051
12052         * test/watch.c (error_handler): make it safe if the error handler
12053         is called multiple times (if we s/error handler/disconnect
12054         handler/ we should just guarantee it's called only once)
12055
12056         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
12057         error handler on disconnect (it's quite possible we should
12058         just change the error handler to a "disconnect handler," I'm
12059         not sure we have any other meaningful errors)
12060
12061         * configure.in: check for getpwnam_r
12062
12063         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
12064         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
12065         mechanism as in SASL spec, using socket credentials
12066
12067         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
12068         (_dbus_send_credentials_unix_socket): new function
12069
12070         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
12071         dbus_accept()
12072         (_dbus_write): only check errno if <0 returned
12073         (_dbus_write_two): ditto
12074
12075 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
12076
12077         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
12078         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
12079         (_dbus_marshal_test):
12080         * dbus/dbus-marshal.h:
12081         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
12082         to _dbus_marshal_utf8_string. Also fix some tests.
12083
12084 2002-12-28  Harri Porten  <porten@kde.org>
12085
12086         * configure.in: added check for C++ compiler and a very cheesy
12087         check for the Qt integration
12088
12089         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
12090
12091         * qt/Makefile.am: added
12092
12093         * qt/.cvsignore: added
12094
12095         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
12096         latter, added #ifdef QT_THREAD_SUPPORT guard.
12097
12098         * dbus/Makefile.am: added missing headers for make dist
12099
12100 2002-12-28  Kristian Rietveld  <kris@gtk.org>
12101
12102         * dbus/Makefile.am: fixup export-symbols-regex.
12103
12104 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
12105
12106         * acinclude.m4: Add this file and put the
12107         PKG_CHECK_MODULE macro in it.
12108
12109 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
12110
12111         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12112         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12113         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12114         (_dbus_marshal_test):
12115         Make the demarshalling routines align the pos argument.
12116         Add string marshalling tests and fix the obvious bugs
12117         discovered.
12118
12119 2002-12-26  Havoc Pennington  <hp@pobox.com>
12120
12121         * dbus/dbus-auth.c: fixes fixes fixes
12122
12123         * dbus/dbus-transport-unix.c: wire up support for
12124         encoding/decoding data on the wire
12125
12126         * dbus/dbus-auth.c (_dbus_auth_encode_data)
12127         (_dbus_auth_decode_data): append to target string
12128         instead of nuking it.
12129
12130 2002-12-26  Havoc Pennington  <hp@pobox.com>
12131
12132         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
12133         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
12134         doh
12135
12136         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
12137         avoid swap_bytes() overhead (ignoring possible assembly stuff for
12138         now). Main point is because I wanted unpack_uint32 to implement
12139         _dbus_verbose_bytes
12140         (_dbus_verbose_bytes): new function
12141
12142         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
12143
12144         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
12145         mechanism to handle a corrupt message stream
12146         (_dbus_message_loader_new): fix preallocation to only prealloc,
12147         not prelengthen
12148
12149         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
12150         (_dbus_string_test): enhance tests for copy/move and fix the
12151         functions
12152
12153         * dbus/dbus-transport-unix.c: Hold references in more places to
12154         avoid reentrancy problems
12155
12156         * dbus/dbus-transport.c: ditto
12157
12158         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
12159         leak reference count in no-message case
12160
12161         * test/watch.c (do_mainloop): handle adding/removing watches
12162         during iteration over the watches. Also, ref the connection/server
12163         stored on a watch, so we don't try to mangle a destroyed one.
12164
12165         * dbus/dbus-transport-unix.c (do_authentication): perform
12166         authentication
12167
12168         * dbus/dbus-auth.c (get_state): add a state
12169         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
12170         (_dbus_auth_get_unused_bytes): append the unused bytes
12171         to the passed in string, rather than prepend
12172
12173         * dbus/dbus-transport.c (_dbus_transport_init_base): create
12174         the auth conversation DBusAuth
12175
12176         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
12177         (_dbus_transport_new_for_domain_socket): when creating a
12178         transport, pass in whether it's a client-side or server-side
12179         transport so we know which DBusAuth to create
12180
12181 2002-12-03  Havoc Pennington  <hp@pobox.com>
12182
12183         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
12184         _after_ finalizing the derived members
12185         (unix_connection_set): unref watch if we fail to add it
12186
12187         * dbus/dbus-connection.c (dbus_connection_unref): delete the
12188         transport first, so that the connection owned by the
12189         transport will be valid as the transport finalizes.
12190
12191         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
12192         if necessary, and remove watches from the connection.
12193
12194         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
12195
12196 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
12197
12198         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12199         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12200         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12201         (_dbus_marshal_test):
12202         * dbus/dbus-marshal.h:
12203         Add string marshal functions and have the demarshal functions
12204         return the new position.
12205
12206 2002-12-25  Havoc Pennington  <hp@pobox.com>
12207
12208         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
12209         it is a simple protocol that just maps directly to SASL.
12210
12211         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
12212         initial implementation, not actually used yet.
12213
12214         * dbus/dbus-string.c (_dbus_string_find): new function
12215         (_dbus_string_equal): new function
12216         (_dbus_string_base64_encode): new function
12217         (_dbus_string_base64_decode): new function
12218
12219 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
12220
12221         * dbus/Makefile.am:
12222         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
12223         (_dbus_marshal_int32), (_dbus_marshal_uint32),
12224         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12225         (_dbus_demarshal_uint32), (_dbus_marshal_test):
12226         * dbus/dbus-marshal.h:
12227         * dbus/dbus-protocol.h:
12228         * dbus/dbus-test.c: (main):
12229         * dbus/dbus-test.h:
12230         Add un-optimized marshalling/demarshalling routines.
12231
12232 2002-12-25  Harri Porten  <porten@kde.org>
12233
12234         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
12235
12236 2002-12-24  Zack Rusin  <zack@kde.org>
12237
12238         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
12239         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
12240         main loop stuff
12241
12242 2002-12-24  Havoc Pennington  <hp@pobox.com>
12243
12244         * glib/dbus-gthread.c: fix include
12245
12246         * glib/dbus-glib.h: rename DBusMessageHandler for now.
12247         I think glib API needs to change, though, as you don't
12248         want to use DBusMessageFunction, you want to use the
12249         DBusMessageHandler object. Probably
12250         dbus_connection_open_with_g_main_loop()
12251         and dbus_connection_setup_g_main_loop() or something like that
12252         (but think of better names...) that just create a connection
12253         that has watch/timeout functions etc. already set up.
12254
12255         * dbus/dbus-connection.c
12256         (dbus_connection_send_message_with_reply): new function just to
12257         show how the message handler helps us deal with replies.
12258
12259         * dbus/dbus-list.c (_dbus_list_remove_last): new function
12260
12261         * dbus/dbus-string.c (_dbus_string_test): free a string that
12262         wasn't
12263
12264         * dbus/dbus-hash.c: use memory pools for the hash entries
12265         (rebuild_table): be more paranoid about overflow, and
12266         shrink table when we can
12267         (_dbus_hash_test): reduce number of sprintfs and write
12268         valid C89. Add tests for case where we grow and then
12269         shrink the hash table.
12270
12271         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
12272
12273         * dbus/dbus-connection.c (dbus_connection_register_handler)
12274         (dbus_connection_unregister_handler): new functions
12275
12276         * dbus/dbus-message.c (dbus_message_get_name): new
12277
12278         * dbus/dbus-list.c: fix docs typo
12279
12280         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
12281         an object representing a handler for messages.
12282
12283 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
12284
12285         * glib/dbus-glib.h:
12286         * glib/dbus-gthread.c: (dbus_gthread_init):
12287         Don't use the gdbus prefix for public functions.
12288
12289 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
12290
12291         * Makefile.am:
12292         * configure.in:
12293         Add GLib checks and fixup .pc files
12294
12295         * glib/Makefile.am:
12296         * glib/dbus-glib.h:
12297         * glib/dbus-gmain.c: (gdbus_connection_prepare),
12298         (gdbus_connection_check), (gdbus_connection_dispatch),
12299         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
12300         (dbus_connection_gsource_new):
12301         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
12302         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
12303         * glib/test-dbus-glib.c: (message_handler), (main):
12304         Add GLib support.
12305
12306 2002-12-15  Harri Porten  <porten@kde.org>
12307
12308         * autogen.sh: check for libtoolize before attempting to use it
12309
12310         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
12311         struct.
12312
12313         * .cvsignore: ignore more stamp files
12314
12315         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
12316
12317         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
12318         without make install.
12319
12320 2002-12-15  Havoc Pennington  <hp@pobox.com>
12321
12322         * dbus/dbus-threads.c: add thread stubs that a higher library
12323         layer can fill in. e.g. the GLib wrapper might fill them in with
12324         GThread stuff. We still need to use this thread API to
12325         thread-safe-ize the library.
12326
12327 2002-12-12  Havoc Pennington  <hp@pobox.com>
12328
12329         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
12330         below new interfaces and include fewer system headers.
12331
12332         * dbus/dbus-sysdeps.c (_dbus_read): new function
12333         (_dbus_write): new function
12334         (_dbus_write_two): new function
12335         (_dbus_connect_unix_socket): new function
12336         (_dbus_listen_unix_socket): new function
12337
12338         * dbus/dbus-message-internal.h: change interfaces to use
12339         DBusString
12340
12341 2002-12-11  Havoc Pennington  <hp@pobox.com>
12342
12343         * dbus/dbus-types.h: add dbus_unichar
12344
12345         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
12346
12347         * dbus/dbus-connection.c (dbus_connection_send_message): return
12348         TRUE on success
12349
12350         * dbus/dbus-transport.c: include dbus-watch.h
12351
12352         * dbus/dbus-connection.c: include dbus-message-internal.h
12353
12354         * HACKING: add file with coding guidelines stuff.
12355
12356         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
12357         handling here, for security purposes (as in vsftpd). Not actually
12358         using this class yet.
12359
12360         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
12361         system/libc usage here, as in vsftpd, for ease of auditing (and
12362         should also simplify portability). Haven't actually moved all the
12363         system/libc usage into here yet.
12364
12365 2002-11-25  Havoc Pennington  <hp@pobox.com>
12366
12367         * dbus/dbus-internals.c (_dbus_verbose): fix to not
12368         always print the first verbose message.
12369
12370 2002-11-24  Havoc Pennington  <hp@pobox.com>
12371
12372         * test/echo-client.c, test/echo-server.c: cheesy test
12373         clients.
12374
12375         * configure.in (AC_CHECK_FUNCS): check for writev
12376
12377         * dbus/dbus-message.c (_dbus_message_get_network_data): new
12378         function
12379
12380         * dbus/dbus-list.c (_dbus_list_foreach): new function
12381
12382         * dbus/dbus-internals.c (_dbus_verbose): new function
12383
12384         * dbus/dbus-server.c, dbus/dbus-server.h: public object
12385         representing a server that listens for connections.
12386
12387         * dbus/.cvsignore: create
12388
12389         * dbus/dbus-errors.h, dbus/dbus-errors.c:
12390         public API for reporting errors
12391
12392         * dbus/dbus-connection.h, dbus/dbus-connection.c:
12393         public object representing a connection that
12394         sends/receives messages. (Same object used for
12395         both client and server.)
12396
12397         * dbus/dbus-transport.h, dbus/dbus-transport.c:
12398         Basic abstraction for different kinds of stream
12399         that we might read/write messages from.
12400
12401 2002-11-23  Havoc Pennington  <hp@pobox.com>
12402
12403         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
12404         _DBUS_INT_MAX
12405
12406         * dbus/dbus-test.c (main): add list test, and include
12407         dbus-test.h as intended
12408
12409         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
12410         (_dbus_hash_table_remove_int): return value indicates
12411         whether the entry existed to remove
12412
12413         * dbus/dbus-list.c: add linked list utility class,
12414         with docs and tests
12415
12416         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
12417         array sometimes.
12418
12419 2002-11-23  Havoc Pennington  <hp@pobox.com>
12420
12421         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
12422         DBUS_END_DECLS to nothing, that should fix this once and for all
12423
12424         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
12425
12426         * dbus/dbus-message.c, dbus/dbus-hash.c:
12427         add some missing @brief
12428
12429 2002-11-23  Havoc Pennington  <hp@pobox.com>
12430
12431         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
12432         to avoid confusing Doxygen
12433
12434         * dbus/dbus-hash.c: @} not }@
12435
12436         * dbus/dbus-message.c (struct DBusMessage): split out
12437         internals docs
12438
12439 2002-11-23  Havoc Pennington  <hp@pobox.com>
12440
12441         * configure.in: pile on more warning flags if using gcc
12442
12443         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
12444         to document static functions
12445
12446         * configure.in: add summary to end of configure so it
12447         looks nice and attractive
12448
12449         * dbus/dbus-hash.c: finish implementation and write unit
12450         tests and docs
12451
12452         * configure.in: add --enable-tests to enable unit tests
12453
12454         * dbus/dbus-test.c: test program to run unit tests
12455         for all files in dbus/*, initially runs a test for
12456         dbus-hash.c
12457
12458         * dbus/dbus-internals.h: file to hold some internal utility stuff
12459
12460 2002-11-22  Havoc Pennington  <hp@redhat.com>
12461
12462         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
12463         "ported" away from Tcl
12464
12465         * dbus/dbus-types.h: header for types such as dbus_bool_t
12466
12467 2002-11-22  Havoc Pennington  <hp@redhat.com>
12468
12469         * dbus/dbus.h: fixups for doc warnings
12470
12471         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
12472         macros
12473         (QUIET): make it quiet so we can see warnings
12474
12475         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
12476
12477 2002-11-22  Havoc Pennington  <hp@redhat.com>
12478
12479         * Makefile.am: include "Doxyfile" target in all-local
12480
12481         * configure.in: generate the Doxyfile
12482
12483         * Doxyfile.in: move Doxyfile here, so we can use
12484         configure to generate a Doxyfile with the right
12485         version number etc.
12486
12487 2002-11-22  Havoc Pennington  <hp@redhat.com>
12488
12489         * dbus/dbus-message.c: move inline docs into .c file
12490
12491         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
12492         so all docs are under doc/
12493         (MAN_EXTENSION): generate man pages. Use extension
12494         ".3dbus" which matches ".3qt" on my system,
12495         I guess this is OK, I don't know really.
12496         (FILE_PATTERNS): look for .c files not .h, makes sense
12497         for plain C I think
12498
12499 2002-11-22  Havoc Pennington  <hp@pobox.com>
12500
12501         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
12502         because any app can be a server, and any app can be a client,
12503         the bus is a special kind of server.
12504
12505 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
12506
12507         * Doxyfile : adding. Still needs Makefile rules to be generated
12508         automatically (just run "doxygen" in the toplevel dir for now to
12509         generate docs)
12510
12511         * dbus/dbus-message.h : Adding sample docs (javadoc since
12512         resembles gtk-doc a little more)
12513
12514         * dbus/dbus.h : Adding sample docs
12515
12516 2002-11-21  Havoc Pennington  <hp@redhat.com>
12517
12518         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
12519         so we can allow ourselves to include files directly,
12520         instead of having to use dbus.h
12521
12522         * dbus/dbus.h: fill in
12523
12524         * dbus/dbus-message.h: sketch out a sample header file.
12525         Include griping if you include it directly instead of
12526         via dbus.h
12527
12528         * dbus/dbus-macros.h: new file with macros for extern "C",
12529         TRUE/FALSE, NULL, etc.
12530
12531         * doc/file-boilerplate.c: put include guards in here
12532
12533 2002-11-21  Havoc Pennington  <hp@redhat.com>
12534
12535         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
12536
12537         * COPYING: include the GPL as well, and license code
12538         under both AFL and GPL.
12539
12540 2002-11-21  Havoc Pennington  <hp@redhat.com>
12541
12542         * acconfig.h: get rid of this
12543
12544         * autogen.sh (run_configure): add --no-configure option
12545
12546         * configure.in: remove AC_ARG_PROGRAM to make
12547         autoconf complain less. add AC_PREREQ.
12548         add AC_DEFINE third arg.
12549
12550 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
12551
12552         * doc/Makefile.am:
12553         Fix references so we can distcheck.
12554
12555 2002-11-21  Havoc Pennington  <hp@redhat.com>
12556
12557         * Initial module creation
12558