new Qt bindings
[platform/upstream/dbus.git] / ChangeLog
1 2005-09-23  Harald Fernengel  <harry@kdevelop.org>
2         * dbus/qt: New Qt bindings
3
4 2005-09-12  Waldo Bastian  <bastian@kde.org>
5
6         * dbus/dbus-marshal-validate.c,
7         doc/dbus-specification.xml, test/Makefile.am,
8         test/test-names.c: allow hyphens in bus names.
9
10 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
11
12         * test/data/auth/fallback.auth-script: we don't
13         retry the EXTERNAL method when we know its going
14         to fail anymore.
15
16 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
17
18         * dbus/dbus-connection-internal.h: rename
19         (add|remove|toggle)_(watch|timeout) to unlocked()
20         
21         * dbus/dbus-connection.c: ditto.
22         
23         * dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
24         Update some callers for the renaming.
25
26 2005-09-10  Mark McLoughlin  <mark@skynet.ie>
27
28         * dbus/dbus-auth.c: (record_mechanisms): don't
29         retry the first auth mechanism because we know
30         we're just going to get rejected again.
31         
32         * dbus/dbus-keyring.c: (_dbus_keyring_reload):
33         Fix thinko ... and what a nasty little bugger to
34         track down you were ...
35
36         * dbus/dbus-connection.c:
37         (_dbus_connection_add_watch),
38         (_dbus_connection_remove_watch): add note about
39         these needing the connection to be locked.
40         (_dbus_connection_get_dispatch_status_unlocked):
41         set status to DATA_REMAINS when we queue the
42         disconnected message.
43         
44         * bus/dispatch.c:
45         (bus_dispatch): fix warning.
46         (check_existent_service_no_auto_start):
47         Expect ChildSignaled error too.
48         (check_existent_hello_from_self): fix another
49         couple of warnings.
50         
51 2005-09-08  Joe Shaw  <joeshaw@novell.com>
52
53         Patches from James Willcox <snorp@snorp.net>
54
55         * mono/Makefile.am: Add Int16.cs and UInt16.cs
56
57         * mono/DBusType/Array.cs: Handle multidimensional arrays, and
58         support array "out" parameters.
59
60         * mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
61         for 16-bit int support.
62
63 2005-09-06  John (J5) Palmieri  <johnp@redhat.com>
64
65         * Released 0.50
66
67         * Patch from Steve Grubb:
68         - bus/activation.c (bus_activation_service_reload_test): clean up
69         some indentation
70         - dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional 
71         - dbus/dbus-message-factory.c (generate_special): fix a couple of
72         buffer overflows in the test suite.  This is non critical because
73         it can not be exploited and this code is only run when doing a 
74         make check.
75
76         * Patch from Yaakov Selkowitz: Build fixes for Cygwin
77         - configure.in: Don't check and link against kdecore, only qt headers
78         - dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
79         - gcj/org/freedesktop/dbus/Makefile.am:
80         add libdbus_gcj_1_la_LDFLAGS = -no-undefined
81         - glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
82         and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
83         - qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
84         - tools/Makefile.am: Add platform extentions to binaries 
85         (i.e. .exe on windows)
86
87         * configure.in: 
88         - Make it so if no suitable version of python is found we only 
89         disable building python instead of exiting the configure script
90         - Require version 2.4 of glib for glib bindings
91         - Up version to 0.50
92
93         * python/__init__.py: Sync version with libdbus to (0,50,0)
94         
95 2005-09-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
96
97         * dbus/dbus-object-tree.c (find_subtree_recurse):
98         a couple of optimizations (bug #710):
99         - do a binary search in the tree
100         - insert a new child at the right place directly, no need for
101           qsort anymore
102         - do the "double alloc" thing when allocating children
103
104 2005-08-31  John (J5) Palmieri  <johnp@redhat.com>
105
106         * python/Makefile.am: Break on pyrexc errors instead of ignoring them
107
108         * python/dbus_bindings.pyx: Memory management foo
109         (global): remove hacky _user_data_references global list
110         (GIL_safe_cunregister_function_handler): userdata now stuffed into
111         tuples. Unref user_data
112         (GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
113         (Connection::__del__): Remove and replace with __dealloc__ method
114         (Connection::add_filter): Stuff user_data into a tuple.  Use Py_INCREF
115         to keep tuple from being deallocated instead of the global var hack
116         (Connection::register_object_path): Stuff user_data into a tuple.
117         Use Py_INCREF to keep tuple from being deallocated instead of the 
118         global var hack
119         (Connection::register_fallback): Stuff user_data into a tuple.
120         Use Py_INCREF to keep tuple from being deallocated instead of the 
121         global var hack
122         (GIL_safe_pending_call_notification): Don't unref the message
123         because it gets unreffed when going out of scope.  Py_XDECREF
124         the user_data
125         (PendingCall::__del__): Remove and replace with __dealloc__ method
126         (PendingCall::set_notify): ref the pending call because we will
127         need it to stick around for when the notify callback gets called
128         (Message::__del__): Remove and replace with __dealloc__ method
129
130         * python/dbus_glib_bindings.pyx (init_gthreads): Changed to 
131         gthreads_init to match up with the dbus call
132
133         * python/glib.py (init_threads): Changed to threads_init to match
134         up with gobject.threads_init().  init_threads is kept for backwards
135         compat but will most likely be deprecated in the future
136
137         * test/python/test-client.py: 
138         - revamp to use Python's unittest functionality
139         - add async call tests
140         - setup threads in glib and dbus so we make sure locks are working
141         
142 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
143
144         * python/dbus_bindings.pyx 
145         (_pending_call_notification, cunregister_function_handler, 
146         cmessage_function_handler): All callback functions have been rearranged 
147         to workaround a bug in Pyrex when working with the GIL which is Python's 
148         global lock when dealing with threads.  They have been split into
149         a wrapper function (which assumes the name of the old function) and
150         a _GIL_safe_<function name> function which contains the functionality
151         of the old function.  This ensures that Pyrex does not write code
152         the lock is released.
153         
154
155 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
156
157         * python/dbus_bindings.pyx (_pending_call_notification): Obtain the
158         GIL global lock when calling back into Python
159
160 2005-08-29  John (J5) Palmieri  <johnp@redhat.com>
161
162         * Release 0.36.2
163
164         * Add Havoc's patch that never got applied to HEAD (Bug #2436):
165
166         * bus/policy.c (bus_policy_allow_user): change default "user is
167         allowed" to be "user has same uid as the bus itself"; any
168         allow/deny rules will override.
169
170         * bus/session.conf.in: don't allow all users, since now by default
171         the user that ran the bus can connect.
172
173 2005-08-26  Colin Walters  <walters@verbum.org>
174
175         * tools/dbus-print-message.c (print_message): Flush stdout
176         after printing a message, so that redirecting to a file, then
177         hitting Ctrl-C works.
178
179 2005-08-25  John (J5) Palmieri  <johnp@redhat.com>
180
181         * python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
182         (EmptyMessage): new class that subclasses Message.  This is a workaround
183         to a Pyrex bug that fails to call __del__ when the Message object goes out
184         of scope.  For some reason subclassing Message fixes this bug
185         (Bus::send_with_reply_and_block): use EmptyMessage instead of Message
186         - s/Message(_create=0)/EmptyMessage everywhere else
187         
188         * test/python/test-{server|client}.py: add the python/.libs directory
189         to the lookup path so dbus_bindings and dbus_glib_bindings don't
190         get picked up from the system
191
192 2005-08-25  Colin Walters  <walters@verbum.org>
193
194         * glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
195         to Ryan Lortie for the suggestion.
196
197 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
198
199         * test/python: Add python regression test
200
201         * configure.in: Add test/python/Makefile
202
203         * test/Makefile.am: Add the python directory to SUBDIRS
204
205 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
206
207         * Release 0.36.1
208
209         * python/_dbus.py: 
210         (Interface::connect_to_signal): propigate keywords for match on args
211         (Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
212
213         * python/proxies.py (ProxyObject::connect_to_signal):
214         propigate keywords for match on args
215
216         * Makefile.am: point everything to pyexecdir since python borks
217         on multilib
218
219 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
220
221         * Release 0.36
222
223 2005-08-23  Colin Walters  <walters@verbum.org>
224
225         * test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
226
227 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
228
229         * python/dbus_glib_bindings.pyx: reorder imports and c definitions
230         to fix some wranings. We now use dbus_bindings.DBusConnection instead
231         of defining DBusConnection ourselves.
232
233 2005-08-18  John (J5) Palmieri  <johnp@redhat.com>
234
235         * python/dbus.pth: New path file to fix up problems when installing
236         c libraries to lib64 and python files to lib.
237
238         * python/Makefile.am: install dbus.pth in the correct spot
239
240 2005-08-17  John (J5) Palmieri  <johnp@redhat.com>
241         * ChangeLog: clean up my last entry a bit
242
243         * doc/introspect.xsl: New stylesheet for converting introspection data
244         into browser renderable xhtml. Contributed by Lennart Poettering.
245
246         * doc/introspect.dtd: Fixups in the introspect format from Lennart
247         Poettering.
248
249         * doc/dbus-tutorial.xml: 
250         - Add Colin Walter to the Authors section for authoring the GLib
251         section
252         - Add descriptions of the new signature and type functionality
253         in the Python complex type mapping section
254         - Add a sidenote on the new args matching functionality in 
255         the Python bindings
256         - Fixed up some of the examples to use the gobject.MainLoop
257         instead of gtk.main
258         
259         * python/_dbus.py:
260         (Bus::_create_args_dict): New. Converts a hash of arg matches
261         to a more useable format
262         (Bus::add_signal_receiver): add a **keywords parameter for catching
263         arg match parameters
264         (Bus::remove_signal_receiver): add a **keywords parameter for catching
265         arg match parameters
266         
267         * python/matchrules.py:
268         (MatchTree::exec_matches): Check for arg matches
269         (SignalMatchRule::add_args_match): New method
270         (SignalMatchRule::execute): Added args_list parameter as an optimization
271         so we don't have to marshal the args more than once
272         (SignalMatchRule::match_args_from_list): New method that checks to see
273         if the rule's arg matches match an argument list.  Only arguments
274         set in the rule are checked.
275         (SignalMatchRule::match_args_from_rule): New method that checks to see
276         if the rule's arg matches match another rule's.  All args have to match
277         in order for this method to return true.  If either rule has more args
278         then it is not a match.
279         (SignalMatchRule::is_match): Add args match
280         (SignalMatchRule::repr): Add args to the final output if they exist
281
282 2005-08-17  Ross Burton  <ross@burtonini.com>
283
284         * glib/dbus-gproxy.c:
285         (dbus_g_proxy_call_no_reply): unref the message once sent.
286         (dbus_g_proxy_call): protect against NULL proxy.
287
288 2005-08-16  John (J5) Palmieri  <johnp@redhat.com>
289
290         * python/__init__.py: Version updated (0, 43, 0)
291         
292         * python/dbus_bindings.pyx: 
293         - Fixed type objects to have self passed into __init__
294         - Added the Variant type
295         - Add the ability to specify types or signatures for Array, Variant 
296         and Dictionary
297         (Connection::send_with_reply_handlers): return a PendingCall object
298         (_pending_call_notification): handle the case when an error is returned 
299         without an error message in the body
300         (MessageIter::get_boolean): return True or False instead of an integer
301         (MessageIter::python_value_to_dbus_sig): add direct checking of types 
302         and add checks for objects with embeded signatures or types (Array, 
303         Variant and Dictionary)
304         (MessageIter::append_byte): handle case when the value is a dbus.Byte
305         (MessageIter::append_dict): handle embeded types or signatures
306         (MessageIter::append_array): handle embeded types or signatures
307         (MessageIter::append_variant): new method
308         
309         * python/proxies.py:
310         (DeferedMethod): New. Dummy executable object used when queuing calls 
311         blocking on introspection data
312         (ProxyMethod::__call__): add the timeout keyword for specifying longer 
313         or shorter timeouts for method calls
314         (ProxyObject): Add first pass at an introspection state machine
315         (ProxyObject::__init__): Add introspect keyword for turing off an on 
316         introspection. 
317         (ProxyObject::_Introspect): Internal Introspect call that bypasses 
318         the usual mechanisms for sending messages.  This is to avoid a deadlock
319         where the Intospect call would be queued waiting for the Introspect 
320         call to finish ;-)
321         (ProxyObject::_introspect_reply_handler): New.  This method is called 
322         when introspection returns with no error
323         (ProxyObject::_introspect_error_handler): New.  This method is called 
324         when introspection encounters an error
325         (ProxyObject::__getattr__): Code to handle different introspection 
326         states.  Queue async calls or block blocking calls if we are 
327         introspecting.  Pass through as normal if we are not or are done with 
328         introspecting.
329         
330         * python/service.py: Import signal and method from decorators.py
331
332         * python/types.py: Add Variant type
333
334 2005-08-16  Colin Walters  <walters@verbum.org>
335
336         * glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
337         DBusError message is NULL.
338
339 2005-08-09  Havoc Pennington  <hp@redhat.com>
340
341         * dbus/dbus-errors.c: apply patch from Timo Teras to make a
342         malloc'd copy of the name parameter
343
344 2005-08-09  Havoc Pennington  <hp@redhat.com>
345
346         * dbus/dbus-message.c (dbus_message_set_reply_serial): print
347         warning if the reply serial is set to 0
348
349 2005-08-04  Colin Walters  <walters@verbum.org>
350
351         * glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
352         (dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
353         (dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
354         (dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
355         (dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
356         (dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
357         (dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
358         * glib/dbus-gvalue.h (dbus_g_value_types_init)
359         (dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
360         (dbus_gvalue_demarshal_message, dbus_gvalue_marshal):
361         
362         Prefix name with _ to ensure they're not exported.  All callers
363         updated.
364
365         * glib/dbus-gvalue.c (typecode_to_gtype)
366         (dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
367         (signature_iter_to_g_type_dict)
368         (signature_iter_to_g_type_array)
369         (dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
370         (dbus_gtypes_from_arg_signature):
371         Move to dbus-gsignature.c.
372
373         * glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
374         dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
375         (dbus_binding_tool_output_glib_client): Ditto.
376
377         * glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
378         and dbus-gsignature.h
379
380         * test/glib/test-service-glib.c (my_object_rec_arrays): Delete
381         unused variable.
382
383 2005-08-03  Colin Walters  <walters@verbum.org>
384
385         * glib/dbus-gobject.c: Add tests on hardcoded object info; this should
386         catch any incompatible changes accidentally made.
387
388 2005-08-03  Havoc Pennington  <hp@redhat.com>
389
390         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
391         typo, from Julien Puydt
392
393         * bus/connection.c (bus_connection_disconnected): we were always
394         doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
395
396 2005-08-01  Colin Walters  <walters@verbum.org>
397
398         Patch from Joe Markus Clarke:   
399         
400         * glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
401         use-after-free.
402
403 2005-08-01  Colin Walters  <walters@verbum.org>
404         
405         Patch from Joe Markus Clarke:   
406         
407         * tools/dbus-send.c (main): 
408         
409         Don't use C99 style initializers (bug #3933).
410         
411 2005-08-01  Colin Walters  <walters@verbum.org>
412
413         Patch from Joe Markus Clarke:   
414
415         * glib/dbus-gvalue.c (dbus_g_value_types_init): 
416         * glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init) 
417         * glib/dbus-gobject.c (write_interface):
418
419         Don't use C99 style initializers (bug #3933).
420
421 2005-07-31  Havoc Pennington  <hp@redhat.com>
422
423         * tools/dbus-viewer.c (load_child_nodes): fix invocation of
424         dbus_g_proxy_call, fix from Piotr Zielinski bug #3920
425
426 2005-07-30  Havoc Pennington  <hp@redhat.com>
427
428         * fix a bunch of Doxygen warnings and mistakes
429
430 2005-07-30  Havoc Pennington  <hp@redhat.com>
431
432         * dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
433         DBUS_BUILD_TESTS since it's now used in production code
434
435 2005-07-29  Havoc Pennington  <hp@redhat.com>
436
437         * test/glib/test-profile.c (write_junk): initialize the junk
438         buffer so valgrind doesn't have a breakdown
439
440 2005-07-29  Havoc Pennington  <hp@redhat.com>
441
442         * bus/signals.c (bus_signals_test): add match_rule_equal() tests
443         (match_rule_matches): remove unused arg
444         (test_matching): add tests for match_rule_matches()
445
446         * bus/signals.c (bus_match_rule_parse_arg_match): add ability to
447         do arg0='foo' arg5='bar' in the match rules
448         (match_rule_matches): don't match if the arg0='foo' doesn't match.
449
450         * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
451
452 2005-07-29  Ross Burton  <ross@openedhand.com>
453
454         * dbus/dbus-connection.c:
455         Don't create a DBusCondVar which is never used.
456
457 2005-07-27  Ross Burton  <ross@openedhand.com>
458
459         * dbus/dbus-message.c:
460         Reduce the size of the maximum cached message to 10K.
461
462 2005-07-25  Ross Burton  <ross@openedhand.com>
463
464         * glib/dbus-gproxy.c:
465         Remove matches when all proxies are unregistered.
466
467 2005-07-24  Colin Walters  <walters@verbum.org>
468
469         * glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
470         typedata; recursive arrays won't have it.
471
472         * test/glib/test-dbus-glib.c:
473         * test/glib/test-service-glib.c:
474         * test/glib/test-service-glib.xml: Add recursive arrays tests.
475         
476 2005-07-20  John (J5) Palmieir  <johnp@redhat.com>
477
478         * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
479         proxies.py, service.py: Cleanup of code after running it through the
480         pyflakes code checker mostly dealing with undefined names.  
481         (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
482
483 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
484
485         * NEWS: Update to 0.35.2
486
487 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
488
489         * python/_dbus.py: Remove import of the dbus.services
490         module as it no longer exists (patch from Dimitur Kirov)
491
492         * python/service.py (Object::__init__): Fixed typo
493         s/name/bus_name (patch from Dimitur Kirov)
494
495         * python/examples/example-signal-emitter.py: import dbus.glib
496         to get the main loop and use glib mainloop instead of gtk so
497         X doesn't have to be running.
498
499         * python/examples/example-signal-recipient.py: import dbus.glib
500         to get the main loop and use glib mainloop instead of gtk so
501         X doesn't have to be running. Import the decorators module
502         directly.
503
504         * test/glib/Makefile.am:  Added DIST_EXTRA files that distcheck
505         didn't pick up on but are needed to build
506
507         * configure.in: upped version to 0.35.2
508
509         * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
510         added Colin Walters' SELinux API rename patch from head 
511         s/unix sercurity context/selinux security context/
512
513 2005-07-16  John (J5) Palmieri  <johnp@redhat.com>
514
515         * python/Makefile.am: dbus_binding.pxd.in should be included 
516         in EXTRA_DIST not dbus_binding.pxd
517         fix up $(srcdir) hopefully for the last time
518
519         * NEWS: Update to 0.35.1
520
521 2005-07-16  Colin Walters  <walters@verbum.org>
522
523         * bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
524         from bus_driver_handle_get_connection_unix_security_context.  Update for
525         error usage.
526         (message_handlers): Update for renames.
527
528         * bus/selinux.c (bus_selinux_allows_send): Handle OOM on
529         _dbus_string_init failure correctly.
530         (bus_selinux_append_context): Convert SID to context.  Append it
531         as a byte array.
532         (bus_selinux_shutdown): Handle the case where bus_selinux_full_init
533         hasn't been called.
534
535         * bus/selinux.h: Update prototype.
536
537         * dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
538         from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.
539
540 2005-07-15  Colin Walters  <walters@verbum.org>
541
542         * doc/TODO: Add note about convenience wrappers.
543
544 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
545
546         * NEWS: Update to 0.35
547
548 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
549
550         * glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
551         so distcheck doesn't fail
552
553         * glib/examples/Makefile.am: Add example-service.xml and 
554         example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail
555
556         * glib/examples/statemachine/Makefile.am: Add statemachine.xml and
557         statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail
558
559         * python/Makefile.am: Preprend $(srcdir)/ to source files so the
560         compiler looks in the right places during distcheck
561
562 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
563
564         * glib/example/Makefile.am: Fix a typo which cause make distcheck
565         to fail
566
567 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
568
569         * python/examples/example-service.py,
570         python/examples/example-signal-emitter.py: Fixed up examples
571         for API changes
572
573 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
574
575         * python/__init__.py: Upped to version (0,42,0) because of
576         the API change
577
578 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
579
580         * ChangeLog: fix date in last entry
581
582         * configure.in, bus/system.conf.in: add the ability to configure 
583         the system bus user at compiletime with the --with-dbus-user flag
584         (patch from Kristof Vansant)
585
586 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
587
588         * bus/dispatch.c, test/test-service.c: Add testcase
589         for sending messages to oneself (TODO item).
590
591         * python/service.py (class Object): Swap ordering of bus_name 
592         and object_path parameters to better support inheritance.
593
594         * doc/dbus-tutorial.xml: change Python docs to reflect change
595         in parameter ordering and fix the inheritance section.
596
597         * doc/TODO: remove sending message to oneself TODO item
598
599 2005-07-15  Ross Burton  <ross@openedhand.com>
600
601         * glib/dbus-gproxy.c:
602         Fix a leak when calling methods via the proxy.
603
604 2005-07-15  Colin Walters  <walters@verbum.org>
605
606         * bus/selinux.c (bus_selinux_append_context): Wrap in
607         HAVE_SELINUX.
608
609 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
610
611         * python/_dbus.py (Bus::remove_signal_receiver):
612         don't add a callback to the match if none has been passed in
613         
614         * python/matchrules.py (SignalMatchTree::remove): if the rule
615         being matched does not have a callback treat it as a wildcard
616         fix matching logic
617
618         * doc/dbus-tutorial.xml: Add Python tutorial
619
620 2005-07-14  Colin Walters  <walters@verbum.org>
621
622         * bus/driver.c
623         (bus_driver_handle_get_connection_unix_security_context): New function.
624         (message_handlers): Add.
625
626         * bus/selinux.c (bus_selinux_append_context): New function; appends
627         security context to message.
628
629         * bus/selinux.h: Prototype.
630
631         * dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.
632
633 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
634
635         * bus/activation.c: clean up all tabs to be 8 spaces 
636         (bus_activation_activate_service): make sure we clean up
637         if activation fails
638
639         * bus/dispatch.c: clean up all tabs to be 8 spaces 
640         (check_shell_fail_service_auto_start): New function
641         tests to make sure we get fail properly when trying to auto start a service
642         with a faulty command line
643         (check_shell_service_success_auto_start): New function tests to make sure
644         auto started services get the arguments on the command line
645
646         * test/test-shell-service.c: Added service for testing auto-starting with 
647         command line arguments
648
649         * test/data/valid-service-files/debug-shell-echo-fail.service.in, 
650         test/data/valid-service-files/debug-shell-echo-success.service.in:
651         Added service files for testing auto-starting with command line arguments
652
653         * */.cvsignore: added a bunch of generated files to various .cvsignore files
654
655 2005-07-14  Rodrigo Moya  <rodrigo@novell.com>
656
657         * dbus/dbus-shell.[ch]: copy/pasted code from GLib.
658         
659         * dbus/Makefile.am: added new files to build.
660
661         * bus/activation.c (bus_activation_activate_service): support
662         activation commands with parameters.
663
664         * test/shell-test.c: added test program for the shell parsing
665         code.
666
667 2005-07-13  David Zeuthen  <davidz@redhat.com>
668
669         * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
670         64 bit signed and unsigned parameters
671
672 2005-07-13  John (J5) Palmieri  <johnp@redhat.com>
673
674         * python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
675
676         * python/service.py (class Name): renamed BusName to make it clearer
677         what the object is for (a name on the bus)
678
679         * python/examples/example-service.py,
680         python/examples/example-signal-emitter.py: change the Name object to
681         BusName
682
683 2005-07-12  Colin Walters  <walters@verbum.org>
684
685         Patch from Jim Gettys <Jim.Gettys@hp.com>.
686
687         * tools/dbus-launch.c: Include sys/select.h.
688
689 2005-07-12  John (J5) Palmieri  <johnp@redhat.com>
690         * python/dbus_bindings.pyx.in: removed
691
692         * python/dbus_bindings.pyx: Added.
693         - Fixed some memleaks (patch from 
694         Sean Meiners <sean.meiners@linspireinc.com>)
695         - Broke out the #include "dbus_h_wrapper.h" and put it in its
696         own pxd file (Pyrex definition)
697         - Broke out glib dependancies into its own pyx module
698         
699         * python/dbus_bindings.pdx: Added.
700         - Defines C class Connection for exporting to other modules
701
702         * python/dbus_glib_bindings.pyx: Added.
703         - New module to handle lowlevel dbus-glib mainloop integration
704
705         * python/glib.py: Added.
706         - Registers the glib mainloop when you import this module
707
708         * python/services.py: Removed (renamed to service.py)
709         
710         * python/service.py: Added.
711         - (class Server): renamed Name
712
713         * python/__init__.py: Bump ro version (0,41,0)
714         -don't import the decorators or service module
715         by default.  These now reside in the dbus.service namespace
716
717         * python/_dbus.py (Bus::__init__): Add code run the main loop 
718         setup function on creation 
719
720         * python/examples/example-service.py,
721         python/examples/example-signal-emitter.py: update examples
722
723         * python/examples/gconf-proxy-service.py,
724         python/examples/gconf-proxy-service2.py: TODO fix these up
725
726         * doc/TODO: Addition
727         - Added a Python Bindings 1.0 section
728         - added "Add match on args or match on details to match rules"
729
730
731 2005-07-12  Colin Walters  <walters@verbum.org>
732
733         * glib/examples/statemachine/Makefile.am (statemachine-server-glue.h) 
734         (statemachine-glue.h): 
735         * glib/examples/Makefile.am (example-service-glue.h) 
736         (example-signal-emitter-glue.h): 
737         * glib/Makefile.am (dbus-glib-error-switch.h): 
738         Add libtool --mode=execute so we use the built library instead
739         of any installed one.
740
741 2005-07-11  Colin Walters  <walters@verbum.org>
742
743         * glib/dbus-gvalue.c (struct _DBusGValue): Delete.
744         (dbus_g_value_types_init): Remove assertion.
745         (dbus_g_value_get_g_type, dbus_g_value_open)
746         (dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
747         (dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
748         functions related to DBusGValue.  Now we marshal/demarshal
749         structures as GValueArray.
750         (dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
751         structures.
752         (signature_iter_to_g_type_array): Don't call
753         signature_iter_to_g_type_struct.
754         (signature_iter_to_g_type_struct): Delete.
755         (dbus_gvalue_to_signature): Delete.
756         (dbus_gvalue_to_signature): New function with same name as other
757         one; we can convert structures to signatures.
758         (demarshal_valuearray): New function.
759         (get_type_demarshaller): Use it.
760         (demarshal_recurse): Delete.
761         (marshal_proxy): New function.
762         (marshal_map): Warn if we can't determine signature from type.
763         (marshal_collection_ptrarray): Ditto.
764         (marshal_collection_array): Ditto.
765         (get_type_marshaller): Use marshal_valuearray.
766         (marshal_recurse): Delete.
767         (_dbus_gvalue_test): Add some tests.
768
769         * dbus/dbus-glib.h (struct _DBusGValueIterator): 
770         (dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
771         (dbus_g_value_open, dbus_g_value_iterator_get_value)
772         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
773         (dbus_g_value_free): Remove prototypes.
774
775         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
776         G_TYPE_VALUE_ARRAY.
777
778         * glib/examples/example-service.c:
779         * glib/examples/example-client.c: Implement GetTuple.
780
781         * test/glib/test-dbus-glib.c:
782         * test/glib/test-service-glib.c:
783         * test/glib/test-service-glib.xml: Add structure tests.
784
785 2005-07-10  Colin Walters  <walters@verbum.org>
786
787         * doc/TODO: Knock off some GLib items with this patch.
788
789         * glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error) 
790         (_dbus_gvalue_signals_error): New functions.
791
792         * glib/dbus-gvalue-utils.h: Prototype them.
793
794         * glib/dbus-gobject.c (arg_iterate): Update to handle return vals
795         and change to not output const/retval flags for input args.  All
796         callers updated.
797         (invoke_object_method): Refactor to handle return values.  Add
798         some more comments in various places.  Remove debug g_print.
799
800         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
801
802         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
803         Handle G_TYPE_NONE.
804         (compute_gsignature): New function; refactored from code from
805         compute_marshaller and compute_marshaller_name.  Enhance to
806         handle return values and async ops more cleanly.  Update for
807         async ops returning NONE instead of BOOLEAN.
808         (compute_marshaller, compute_marshaller_name): Call compute_gsignature
809         and output appropriate string.
810         (generate_glue): Handle return value annotation.  Also don't dump
811         constness flag for input arguments.
812
813         * glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
814         files shared between installed library and utilities.
815         (libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
816         (libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
817         binding tool can access gtype utility functions.
818
819         * test/glib/test-service-glib.c: 
820         * test/glib/test-service-glib.xml: 
821         * test/glib/test-dbus-glib.c: Add some tests for return values.
822
823 2005-07-09  Colin Walters  <walters@verbum.org>
824
825         * glib/dbus-gparser.c (parse_annotation): Add annotations to
826         argument if available, not method.
827
828         * glib/dbus-gobject.c (arg_iterate): More verbose warnings.
829         (invoke_object_method): First, remove some redundant
830         GValues (object_value, error_value) in favor of working on
831         array directly.  Second, rework constness to be less buggy.
832         Now we iterate directly over the argument metadata instead
833         of parallel iterating over output signature and metadata.
834
835         * glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
836
837         * glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
838         annotation on input args.
839         
840 2005-07-09  Colin Walters  <walters@verbum.org>
841
842         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
843         Define.
844
845         * glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
846         annotation.
847
848         * glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
849         (method_dir_signature_from_object_info): Handle arg_iterate change.
850         (write_interface): Ditto.
851         (lookup_object_info): Don't barf if format_version is > 0.
852         (invoke_object_method): Handle arg constness.
853
854         * glib/dbus-gidl.c (struct ArgInfo): Add annotations.
855         (arg_info_new): Create.
856         (arg_info_unref): Destroy.
857         (arg_info_get_annotations, arg_info_get_annotation) 
858         (arg_info_add_annotation): New functions.
859
860         * glib/dbus-gidl.h: Prototype them.
861
862         * glib/dbus-gparser.c (parse_annotation): Allow annotations in
863         args, disallow them in properties.
864         (parse_annotation): Handle arg annotations.
865
866         * test/glib/test-service-glib.xml: 
867         * test/glib/test-service-glib.c: Update to make some methods
868         const.
869
870 2005-07-08  Colin Walters  <walters@verbum.org>
871
872         * test/glib/test-service-glib.xml: 
873         * test/glib/test-service-glib.c:
874         * test/glib/test-dbus-glib.c: Test a{sv}.
875
876         * glib/examples/statemachine/statemachine.c:
877         * glib/examples/statemachine/statemachine-server.c:
878         * glib/examples/statemachine/statemachine-client.c: Fix some bugs,
879         add progress bar, etc.
880
881         * glib/dbus-gvalue.c (register_array, register_dict): Delete; not
882         needed anymore due to generic array/map marshalling.
883         (dbus_g_value_types_init): Don't register basic arrays or the
884         string/string hash.
885         (dbus_gtype_from_signature_iter): Don't try to recurse into
886         variants.
887         (dbus_gtype_to_signature): Check collection/map before type
888         metadata.
889         (demarshal_garray_basic): Renamed to demarshal_collection_array.
890         (demarshal_ghashtable): Renamed to demarshal_map; fix to use new
891         generic map creation/append functions instead of hash table
892         specifically.
893         (get_type_demarshaller): Handle maps.
894         (demarshal_collection): Dispatch on collection type to either
895         demarshal_collection_ptrarray or demarshal_collection_array.
896         (get_type_marshaller): Handle maps.
897         (marshal_collection): Dispatch collection type to either
898         marshal_collection_ptrarray or marshal_collection_array.
899         (_dbus_gvalue_test): New test.
900
901         * glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
902         (hash_free_from_gtype): Use it to free GValues.
903         (hashtable_append): New function.
904         (ptrarray_append): Fix prototype.
905         (slist_append): Ditto.
906         (_dbus_gvalue_utils_test): Extend tests.
907
908         * glib/dbus-gtype-specialized.c
909         (dbus_g_type_specialized_init_append): Renamed from
910         dbus_g_type_specialized_collection_init_append.  Remove const from
911         value, since we steal it.
912         (dbus_g_type_specialized_map_append): New function.
913
914         * glib/dbus-gtype-specialized.h: Update prototypes.
915         Add DBusGTypeSpecializedMapAppendFunc.
916
917         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
918         _dbus_gvalue_test.
919         
920         * glib/dbus-gtest.h: Prototype it.
921
922 2005-07-08  Ross Burton  <ross@openedhand.com>
923
924         * dbus/dbus-glib.h:
925         Add DBysGAsyncData for the async bindings.
926
927         * glib/dbus-binding-tool-glib.c:
928         Re-enable the async bindings.
929
930         * test/glib/test-dbus-glib.c:
931         Add a test for the generated async bindings.
932
933 2005-07-08  Colin Walters  <walters@verbum.org>
934
935         * doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
936         connection concept.
937         
938 2005-07-08  Colin Walters  <walters@verbum.org>
939         
940         * tools/Makefile.am: Kill of print-introspect in favor of using
941         dbus-send --print-reply=literal.
942
943         * test/glib/test-service-glib.xml: 
944         * test/glib/test-service-glib.c (my_object_get_objs): New test
945         for "ao".
946
947         * test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
948         (main): Test GetObjs.
949
950         * glib/examples/statemachine/Makefile.am:
951         * glib/examples/statemachine/sm-marshal.list:
952         * glib/examples/statemachine/statemachine-client.c:
953         * glib/examples/statemachine/statemachine-server.c:
954         * glib/examples/statemachine/statemachine-server.xml:
955         * glib/examples/statemachine/statemachine.c:
956         * glib/examples/statemachine/statemachine.h:
957         * glib/examples/statemachine/statemachine.xml:
958
959         New example.
960
961         * glib/examples/example-service.c (main): Move invocation
962         of dbus_g_object_type_install_info earlier, to emphasize it
963         should only be done once.
964
965         * glib/examples/example-signal-emitter.c (main): Ditto.
966
967         * glib/examples/Makefile.am (SUBDIRS): Include statemachine.
968
969         * glib/dbus-gvalue.h (dbus_gtype_to_signature)
970         (dbus_gvalue_marshal): Update prototypes.
971
972         * glib/dbus-gvalue.c: Update all marshalling functions to take
973         const GValue instead of GValue.
974         (signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
975         types.
976         (dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
977         change.
978         (dbus_gtype_to_signature): Handle generic collecitons and maps.
979         Return a newly-allocated string.
980         (demarshal_proxy, demarshal_object_path, demarshal_object)
981         (demarshal_strv, demarshal_ghashtable): Set error, don't assert if
982         we get the wrong types from message.
983         (get_type_demarshaller): New function, extracted from
984         dbus_gvalue_demarshal.
985         (demarshal_collection): New function, demarshals generic
986         collection.
987         (dbus_gvalue_demarshal): Just invoke result of
988         get_type_demarshaller.  Throw error if we don't have one.
989         (marshal_garray_basic): Abort on OOM.
990         (get_type_marshaller): New function, extracted from
991         dbus_gvalue_marshal.
992         (collection_marshal_iterator, marshal_collection): New functions;
993         implements generic marshalling for an iteratable specialized
994         collection.
995         (dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
996
997         * glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
998         G_TYPE_STRING.
999         (ptrarray_value_from_gvalue): Ditto.
1000         (ptrarray_append, ptrarray_free): New functions.
1001         (slist_constructor, slist_iterator, slist_copy_elt, slist_copy) 
1002         (slist_append, slist_end_append, slist_free): New functions.
1003         (dbus_g_type_specialized_builtins_init): Add append fuctions
1004         for GPtrArray and GSList.  Register GSList.
1005         (test_specialized_hash, _dbus_gvalue_utils_test): New functions.
1006
1007         * glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
1008         New.
1009         (dbus_g_type_specialized_collection_init_append)
1010         (dbus_g_type_specialized_collection_append)
1011         (dbus_g_type_specialized_collection_end_append): Prototype.
1012         (DBusGTypeSpecializedCollectionVtable): Add append_func and
1013         end_append_func.
1014
1015         * glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append) 
1016         (dbus_g_type_specialized_collection_append) 
1017         (dbus_g_type_specialized_collection_end_append): New functions.
1018         (dbus_g_type_map_value_iterate): Take const GValue.
1019         (dbus_g_type_collection_value_iterate): Ditto.
1020
1021         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1022         _dbus_gvalue_utils_test.
1023         
1024         * glib/dbus-gtest.h: Prototype it.
1025
1026         * glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
1027         using uninitialized owner_list.
1028         (dbus_g_proxy_begin_call_internal): Move return_if_fail to
1029         public API.
1030         (dbus_g_proxy_end_call_internal): Update to use error set
1031         from dbus_gvalue_demarshal instead of setting it here.
1032         (dbus_g_proxy_begin_call): Move return_if_fail here.
1033
1034         * glib/dbus-gobject.c (write_interface): Update for
1035         dbus_gtype_to_signature returning new string.
1036
1037         * configure.in: Add glib/examples/statemachine.
1038
1039 2005-07-08  Joe Shaw  <joeshaw@novell.com>
1040
1041         * configure.in: Add a configure option, --with-console-auth-dir
1042         
1043         * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
1044         new setting.  Patch from Kay Sievers.
1045
1046 2005-07-06  Colin Walters  <walters@verbum.org>
1047
1048         * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
1049         (DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
1050         (dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
1051         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
1052         Delete in favor of dbus_g_proxy_begin_call and
1053         dbus_g_proxy_cancel_call.
1054         (DBusGProxyCall, DBusGProxyCallNotify): New.
1055         (dbus_g_proxy_begin_call): Change prototype to take callback, user
1056         data, and destroy function.  This replaces
1057         dbus_g_pending_call_set_notify.
1058         (dbus_g_proxy_cancel_call): Prototype.
1059         (DBusGAsyncData): Delete, shouldn't be needed anymore.
1060
1061         * glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
1062         pending_calls map.
1063         (struct _DBusGProxyManager): Add bus_proxy member, which is an
1064         internal proxy for calls to the bus. Remove
1065         pending_nameowner_calls, now the internal proxy keeps track.
1066         (dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
1067         pending_nameowner_calls.
1068         (got_name_owner_cb): Update prototype, and use
1069         dbus_g_proxy_end_call.
1070         (got_name_owner_cb): Remove reference to pending_nameowner_calls.
1071         (dbus_g_proxy_manager_register): Delete directly libdbus code in
1072         favor of using internal proxy.
1073         (dbus_g_proxy_manager_unregister): Update to use
1074         dbus_g_proxy_cancel_call for any pending GetNameOwner call.
1075         (dbus_g_proxy_init): Initialize pending calls map.
1076         (dbus_g_proxy_constructor): New.
1077         (dbus_g_proxy_class_init): Add get/set property functions,
1078         constructor, and add NAME, PATH, and INTERFACE properties.
1079         (cancel_pending_call): New function.
1080         (dbus_g_proxy_dispose): Iterate over any outstanding calls and
1081         cancel them.
1082         (dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
1083         (GPendingNotifyClosure): New structure.
1084         (d_pending_call_notify, d_pending_call_free): Moved here from
1085         dbus-glib.c.
1086         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
1087         ordering.
1088         (manager_begin_bus_call): New internal function for talking to
1089         internal bus proxy.
1090         (dbus_g_proxy_new): Construct object using GObjet properties.
1091         (dbus_g_proxy_begin_call_internal): Update to take user data, etc.
1092         Create closure of same, and insert call into map of pending calls.
1093         (dbus_g_proxy_end_call_internal): Take call id instead of pending
1094         call.  Look up pending call in current set.  Remove it when we've
1095         completed.
1096         (dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
1097         (dbus_g_proxy_begin_call): Change API to take callback, user data,
1098         and destroy function directly.
1099         (dbus_g_proxy_end_call): Update to take DBusGProxyCall.
1100         (dbus_g_proxy_call): Invoke with NULL callback.
1101         (dbus_g_proxy_cancel_call): New function, replaces
1102         dbus_g_pending_call_cancel.
1103
1104         * glib/dbus-gparser.c (validate_signature): Fix call to
1105         dbus_set_g_error.
1106
1107         * glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
1108         New quark for attaching metadata to GType.
1109         (info_hash): Delete.
1110         (lookup_object_info): Look up using quark.
1111         (dbus_g_object_type_install_info): Check that a type is classed,
1112         not that it's an object.  Also just install type data using quark
1113         instead of using global hash.
1114
1115         * glib/dbus-glib.c (dbus_g_pending_call_ref) 
1116         (dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
1117         (GPendingNotifyClosure): Delete.
1118         (d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
1119         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
1120
1121         * glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
1122         client method generation until we can fix it...
1123         
1124         * tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
1125         (load_from_service_thread_func): Ditto.
1126
1127         * tools/dbus-names-model.c (struct NamesModel): Hold
1128         DBusGProxyCall.
1129         (have_names_notify): Update prototype, use
1130         dbus_g_proxy_cancel_call.
1131         (names_model_reload): Update for new dbus_g_proxy_begin_call API.
1132
1133         * tools/dbus-monitor.c (filter_func): Update for print_message
1134         API change.
1135
1136         * test/glib/test-dbus-glib.c: Add more tests for async
1137         invocations.  Update many begin_call/end_call pairs to just use
1138         dbus_g_proxy_call.
1139
1140         * tools/dbus-send.c (main): Add --print-reply=literal mode.  This
1141         allows us to dump print-introspect.c.
1142
1143         * tools/dbus-print-message.h (print_message): Add literal argument
1144         to print_message which is intended to allow printing arguments without
1145         metadata like "string=".
1146
1147         * tools/dbus-print-message.c (print_iter): Add literal argument.
1148         (print_message): Allow printing string messages literally.
1149
1150 2005-07-05  Colin Walters  <walters@verbum.org>
1151
1152         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1153         Remove value refcount leak, original patch from Jorn Baayen
1154         <jorn@openedhand.com>.  Also remove useless extra value in favor
1155         of prepending to value array directly.
1156
1157 2005-07-02  Colin Walters  <walters@verbum.org>
1158
1159         * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
1160
1161 2005-07-01  Colin Walters  <walters@verbum.org>
1162
1163         Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
1164         
1165         * glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
1166         (dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
1167         G_TYPE_LONG as DBUS_TYPE_INT32, G_TYPE_ULONG as DBUS_TYPE_UINT32,
1168         and G_TYPE_FLOAT as DBUS_TYPE_DOUBLE.
1169
1170 2005-06-30  Colin Walters  <walters@verbum.org>
1171
1172         * test/glib/test-dbus-glib.c:
1173         * test/glib/test-service-glib.c:
1174         * test/glib/test-service-glib.xml: Update tests for new error
1175         setting bits, also add async tests (patch from Ross Burton).
1176
1177         * test/glib/Makefile.am (test_service_glib_LDADD): Add
1178         DBUS_GLIB_THREADS_LIBS.
1179
1180         * glib/dbus-gproxy.c (get_name_owner)
1181         (dbus_g_pending_call_end_valist): Ditto.
1182
1183         * glib/dbus-gobject.c (error_metadata): New mapping from GError
1184         domain (GQuark) to DBusGErrorInfo.  
1185         (gerror_domaincode_to_dbus_error_name): Attempt to look up error
1186         quark in error_metadata.  Take message interface as default
1187         error message interface.
1188         (gerror_to_dbus_error_message): Pass message interface.
1189         (dbus_set_g_error): Resurrected.
1190         (dbus_g_error_info_free): New function.
1191         (dbus_g_object_type_install_info): Use g_type_class_ref instead
1192         of _peek to actually create the object class if it hasn't been
1193         created yet.
1194         (dbus_g_error_domain_register): New function.
1195
1196         * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
1197
1198         * glib/dbus-gparser.c (validate_signature): Ditto.
1199
1200         * dbus/dbus-glib.h (dbus_g_error_set): Delete.
1201         (dbus_g_error_domain_register): Prototype.
1202
1203         * glib/dbus-glib.c (dbus_g_error_set): Delete.
1204         Update tests.
1205
1206 2005-06-29  Colin Walters  <walters@verbum.org>
1207
1208         * dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY.  Add
1209         DBUS_TYPE_G_OBJECT_PATH.
1210
1211         * glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
1212         for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
1213         be handled more generically).  Add DBUS_TYPE_G_OBJECT_PATH.
1214         (dbus_g_object_path_get_g_type): New function.
1215         (dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
1216         to DBUS_TYPE_G_OBJECT_PATH by default.
1217         (demarshal_proxy): Remove unused name variable.
1218         (demarshal_object_path, marshal_object_path): New functions.
1219         (demarshal_proxy_array, marshal_proxy_array): Delete.
1220         
1221         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
1222         DBUS_TYPE_G_OBJECT_PATH to char *.
1223         (dbus_g_type_get_lookup_function): Map builtin
1224         DBUS_TYPE_G_OBJECT_PATH.
1225
1226         * test/glib/test-dbus-glib.c
1227         * test/glib/test-service-glib.c (my_object_objpath): 
1228         Adapt tests to new object path marshalling.
1229
1230 2005-06-29  John (J5) Palmieri  <johnp@redhat.com>
1231
1232         * configure.in: force check for Python >= 2.4
1233
1234 2005-06-29  Colin Walters  <walters@verbum.org>
1235         
1236         Patch from Ross Burton <ross@openedhand.com>
1237         
1238         * glib/dbus-gobject.c (invoke_object_method): Unset object
1239         value in all cases, not only in async case.
1240
1241 2005-06-29  Colin Walters  <walters@verbum.org>
1242
1243         * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
1244         name_call for keeping track of any outgoing GetNameOwner call.
1245         Also add for_owner and associated.
1246         (struct _DBusGProxyManager): Add owner_names, which is hash table
1247         that maps a base name to a list of names it owns (that we're
1248         interested in).  Add pending_nameowner_calls which is a list of
1249         all outstanding GetNameOwner; avoids us having to iterate over
1250         every proxy.  Add unassociated_proxies which keeps track of name
1251         proxies with no associated name owner.
1252         (dbus_g_proxy_manager_unref): Destroy owner_names.
1253         (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
1254         name refcounts.
1255         (find_name_in_info, name_owner_foreach)
1256         (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
1257         (dbus_g_proxy_manager_monitor_name_owner)
1258         (dbus_g_proxy_manager_unmonitor_name_owner)
1259         (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
1260         New functions; they manipulate the owner_names mapping.
1261         (got_name_owner_cb): New function.
1262         (get_name_owner): New function, extracted from
1263         dbus_g_proxy_new_for_name_owner.
1264         (dbus_g_proxy_manager_register): For now we need to keep track of
1265         all NameOwnerChanged.  Also if the proxy is for a name, if we
1266         don't already know the name owner, queue a new GetNameOwner
1267         request and add it to our list of unassociated proxies.  Otherwise
1268         inc the refcount.
1269         (dbus_g_proxy_manager_unregister): If this proxy is for a name,
1270         cancel any pending GetNameOwner call, etc.
1271         (dbus_g_proxy_manager_filter): Handle NameOwnerChanged.  Also use
1272         the owner_names mapping to look up the current names for the
1273         signal source, and dispatch to any proxies for that name.
1274         (dbus_g_proxy_new): Initialize new members.
1275         (dbus_g_proxy_new_for_name): Delete unused proxy variable.
1276         (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
1277         (dbus_g_pending_call_end_valist): New function, extracted from
1278         dbus_g_proxy_end_call_internal.  Useful when we don't have a proxy
1279         but want to use the GLib infrastructure.  Also note how many
1280         arguments in reply were over.
1281         (dbus_g_pending_call_end): New function, just call
1282         dbus_g_pending_call_end_valist.
1283         (dbus_g_proxy_end_call_internal): Just call
1284         dbus_g_pending_call_end_valist.
1285
1286         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
1287         of builtin marshaller for STRING_STRING_STRING.
1288
1289         * test/glib/test-dbus-glib.c: 
1290         * test/glib/test-service-glib.c:
1291         * test/glib/test-service-glib.xml:
1292         Extend tests to cover name proxies, destruction of owner proxies,
1293         etc.
1294         
1295         * glib/examples/example-signal-recipient.c
1296         (dbus_g_proxy_new_for_name_owner): Create a name proxy.
1297         
1298         * tools/dbus-send.c (main): Print D-BUS error name in addition
1299         to message.
1300
1301 2005-06-28  John (J5) Palmieri  <johnp@redhat.com>
1302
1303         * python/dbus_bindings.pyx.in (cunregister_function_handler,
1304         cmessage_function_handler): Patch from 
1305         Anthony Baxter <anthony@interlink.com.au> fixes threading problems
1306         by using the Py_GILState_Ensure/Release to synchronize with the
1307         python runtime.
1308         
1309 2005-06-28  Ray Strode  <rstrode@redhat.com>
1310
1311         *  dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
1312         babysitter helper process on last unref, bug #2813.
1313
1314 2005-06-27  Colin Walters  <walters@verbum.org>
1315
1316         * test/glib/test-dbus-glib.c: 
1317         * test/glib/test-service-glib.c:
1318         * test/glib/test-service-glib.xml:
1319         Test hash table signal emitting.
1320
1321         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
1322         types to their fundamental basis types, since this is what
1323         marshallers operate on.  Also add an entry for VOID__BOXED.
1324         (dbus_g_object_register_marshaller_array): Convert to fundamental.
1325
1326 2005-06-26  Havoc Pennington  <hp@redhat.com>
1327
1328         * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
1329         from Don Park
1330
1331 2005-06-26  Colin Walters  <walters@verbum.org>
1332
1333         * glib/dbus-glib.c (dbus_set_g_error): Delete.
1334         (dbus_g_error_set): New public function from its ashes; used by
1335         both service-side method implementation and GLib bindings
1336         internals.
1337         (dbus_g_error_has_name, dbus_g_error_get_name): New function.
1338         (_dbus_glib_test): Add some tests.
1339
1340         * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
1341
1342         * test/glib/test-service-glib.c (my_object_throw_error): Use
1343         dbus_g_error_set.
1344
1345         * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
1346         errors thrown by dbus_g_error_set.
1347
1348         * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
1349
1350         * glib/dbus-gparser.c (validate_signature): Ditto.
1351
1352         * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner) 
1353         (dbus_g_proxy_end_call_internal): Ditto.
1354
1355         * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
1356         converts DBUS_ERROR_x to DBUS_GERROR_x.
1357         (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
1358
1359         * doc/TODO: Remove error TODO.
1360
1361         * doc/dbus-tutorial.xml: Update with documentation about error
1362         handling.
1363
1364         * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
1365         sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
1366         GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.
1367
1368 2005-06-22  Colin Walters  <walters@verbum.org>
1369         
1370         Patch from Ross Burton <ross@openedhand.com>
1371
1372         * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
1373
1374 2005-06-20  Colin Walters  <walters@verbum.org>
1375
1376         * configure.in: Add glib/examples.
1377
1378         * glib/Makefile.am: Add examples/
1379
1380         * glib/examples/.cvsignore
1381         * glib/examples/Makefile.am
1382         * glib/examples/example-client.c
1383         * glib/examples/example-service.c
1384         * glib/examples/example-service.xml
1385         * glib/examples/example-signal-emitter.c
1386         * glib/examples/example-signal-emitter.xml
1387         * glib/examples/example-signal-recipient.c:
1388         New files; GLib binding examples, ported from
1389         python/examples.
1390
1391 2005-06-20  Colin Walters  <walters@verbum.org>
1392
1393         * dbus/dbus-glib.h: 
1394         * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
1395         dbus_g_proxy_call.
1396
1397         * glib/dbus-binding-tool-glib.c: 
1398         * doc/dbus-tutorial.xml: 
1399         * test/glib/test-dbus-glib.c: Update for rename.
1400         
1401 2005-06-20  Colin Walters  <walters@verbum.org>
1402
1403         Patch suggested by Ross Burton <ross@openedhand.com>
1404
1405         * glib/dbus-gobject.c (export_signals): Free signal name.
1406         (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
1407         memory leak.  Add a bit of documentation.
1408         (dbus_g_method_return_error): Free context, and note we do
1409         so.
1410
1411 2005-06-18  Murray Cumming  <murrayc@murrayc.com>
1412
1413         * dbus/dbus-glib.h:
1414         * glib/dbus-gobject.c:
1415         * glib/dbus-gproxy.c:
1416         * glib/dbus-gvalue.c: Predeclare structs as 
1417         typedef struct _Something Something instead of 
1418         typedef struct Something Something, so we can 
1419         redeclare the prototypes. Other GNOME libraries 
1420         do this already.
1421
1422 2005-06-17  Colin Walters  <walters@verbum.org>
1423
1424         * tools/dbus-names-model.c (have_names_notify): Fix call
1425         to dbus_g_proxy_end_call.
1426         
1427 2005-06-17  Colin Walters  <walters@verbum.org>
1428
1429         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
1430         spew warnings if we get malformed remote signals.
1431
1432         * glib/dbus-gobject.c (propsig_iterate): New function.
1433         (lookup_object_info): New function, extracted from
1434         lookup_object_and_method.
1435         (introspect_properties, introspect_signals): Delete; these
1436         are merged into write_interface.
1437         (write_interface): Write out signals and properties here;
1438         dump the org.gtk.object stuff and use the interface given
1439         in the introspection data blob.  Also fix up property XML.
1440         (lookup_values): New function.
1441         (introspect_interfaces): Gather a mapping from interface to a
1442         list of its methods, signals, and properties, then write out
1443         each interface.
1444         (lookup_object_and_method): Use lookup_object_info.
1445         (struct DBusGSignalClosure): Add interface.
1446         (dbus_g_signal_closure_new): Add interface. Don't dup signame;
1447         we can just use the constant data.
1448         (dbus_g_signal_closure_finalize): Don't free signal name.
1449         (signal_emitter_marshaller): Use interface from signal closure.
1450         (export_signals): Only export signals mentioned in introspection
1451         blob.
1452         (dbus_g_connection_register_g_object): Warn if we have no
1453         introspection data for an object.
1454         (funcsig_equal): Remove unused variable.
1455         (dbus_g_object_register_marshaller): Take varargs instead of
1456         list.
1457         (dbus_g_object_register_marshaller_array): New function,
1458         extracted from old dbus_g_object_register_marshaller.
1459
1460         * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
1461         signals and property data.
1462         (write_quoted_string): New function, extracted from generate_glue.
1463         (generate_glue): Write signals and properties to introspection
1464         blob.
1465
1466         * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
1467         exported_signals and exported_properties.
1468         (dbus_g_object_register_marshaller): Update prototype.
1469         (dbus_g_object_register_marshaller_array): Prototype.
1470         
1471         * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
1472
1473         * test/glib/test-service-glib.c: Add new test signals and method
1474         to emit them.
1475
1476         * test/glib/test-service-glib.xml: Add some test signals.
1477
1478         * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
1479         and my-object-marshal.h
1480         (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
1481         my-object-marshal.c.
1482         (my-object-marshal.c, my-object-marshal.h): Implement.
1483
1484         * test/glib/.cvsignore: Update.
1485
1486         * doc/TODO: Remove two GLib TODO items fixed by this
1487         patch.
1488
1489 2005-06-16  Colin Walters  <walters@verbum.org>
1490
1491         * doc/TODO: Update for GLib bindings.
1492         
1493 2005-06-16  Colin Walters  <walters@verbum.org>
1494
1495         * glib/dbus-binding-tool-glib.c:
1496         * glib/dbus-gobject.c:
1497         * glib/dbus-gproxy.c:  Add Nokia copyright; Patch
1498         from Ross Burton, for his GLib bindings work.
1499
1500 2005-06-16  Colin Walters  <walters@verbum.org>
1501
1502         * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
1503         to iterate instead of walking to G_TYPE_INVALID.
1504
1505         Patch based on a patch from Ryan Gammon.
1506
1507 2005-06-16  Colin Walters  <walters@verbum.org>
1508
1509         * bus/bus.c (bus_context_new): Set parser to NULL
1510         after we unref it (Patch from Chris Boscolo, #2174).
1511         
1512 2005-06-16  Colin Walters  <walters@verbum.org>
1513
1514         * python/dbus_bindings.pyx.in: Import size_t,
1515         __int64_t, __uint64_t, and __signed.
1516
1517         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
1518         Define cmsg struct, output it.
1519         (_dbus_read_credentials_unix_socket):
1520         Use cmsg struct.
1521         
1522         Patch from Joe Markus Clarke for FreeBSD support.
1523         
1524 2005-06-16  Colin Walters  <walters@verbum.org>
1525
1526         * tools/dbus-send.c (append_array): Use strtok.
1527         (append_dict): New function.
1528         (type_from_name): New function, extracted from main.
1529         (main): Handle sending dicts.
1530
1531         * tools/dbus-print-message.c (print_iter): Print dict
1532         entries.
1533         
1534 2005-06-16  Colin Walters  <walters@verbum.org>
1535
1536         * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
1537         values as the empty string (#2948).
1538         
1539 2005-06-16  Colin Walters  <walters@verbum.org>
1540
1541         * dbus/Makefile.am:
1542         * mono/doc/Makefile.am:
1543         * test/glib/Makefile.am:
1544
1545         Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
1546
1547 2005-06-16  Colin Walters  <walters@verbum.org>
1548
1549         * dbus/dbus-marshal-header.c (_dbus_header_load): Set
1550         header byte order from expected byte order (Patch from Chris Wilson, #3475).
1551
1552         * dbus/dbus-marshal-byteswap.c (byteswap_body_helper): 
1553         Increment pointer after swapping fixed array.  Add assertion
1554         for array length.
1555                 
1556 2005-06-15  Colin Walters  <walters@verbum.org>
1557
1558         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
1559         Fix call to dbus_set_error.  (Patch from Michael Banck, #3461)
1560         
1561 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1562
1563         * NEWS: Update to 0.34
1564
1565 2005-06-15  David Zeuthen  <davidz@redhat.com>
1566
1567         * configure.in (LT_CURRENT): Revert back to 1 as the library
1568         hasn't changed and we've certainly not committed to protocol
1569         stability yet.  All this does is to break ABI. See commit note
1570         from hp@redhat.com 2005-05-05 for details.
1571         
1572 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1573
1574         * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method 
1575         (_dbus_connection_run_builtin_filters): New method
1576         (dbus_connection_dispatch): Run the builtin filters which in turn
1577         runs the peer filter which handles Ping messages.
1578
1579         * doc/TODO: 
1580          - Ping isn't handled: This patch fixes it
1581          
1582          - Add a test case for the Ping message: added TODO item
1583
1584 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1585
1586         * dbus/dbus-message.c:
1587         (dbus_message_has_path): New method
1588         (dbus_message_has_interface): New method
1589         (dbus_message_has_member): New method
1590
1591         * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
1592         New method
1593
1594         * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that 
1595         the keyring directory is private to the user
1596
1597         * doc/TODO:
1598          - The convenience functions in dbus-bus.h should perhaps have
1599          the signatures that they would have if they were autogenerated
1600          stubs. e.g. the acquire service function. We should also evaluate
1601          which of these functions to include, in light of the fact that
1602          GLib/Qt native stubs will probably also exist.: Punted
1603
1604          - add dbus_message_has_path(), maybe has_member/interface:
1605          fixed in this patch
1606
1607          - in dbus-keyring.c, enforce that the keyring dir is not
1608          world readable/writable: Fixed in this patch
1609
1610 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1611
1612         * dbus/dbus-marshal-validate.h: Added a new validation
1613         error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for 
1614         out of memory errors when validating signitures
1615
1616         * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
1617         in places where we previously used DBUS_VALID and a FALSE return 
1618         value to indicate OOM
1619         
1620         * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
1621         Use a stack to track the number of elements inside containers.  The 
1622         stack values are then used to validate that dict entries have only two
1623         elements within them.
1624         (validate_body_helper): check the reason for failure when validating
1625         varients
1626         
1627         * dbus/dbus-message.c (load_message): use 
1628         DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used 
1629         DBUS_VALID and a FALSE return value to indicate OOM
1630
1631         * doc/TODO: remove "- validate dict entry number of fields" as this
1632         patch fixes it
1633
1634 2005-06-14  David Zeuthen  <davidz@redhat.com>
1635
1636         * bus/bus.c (process_config_every_time): Drop existing conf-dir
1637         watches (if applicable) and add new watches
1638
1639         * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
1640         (main): Setup SIGIO signal handler if using D_NOTIFY
1641
1642         * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
1643
1644         * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
1645         (merge_included): Also merge conf_dirs list
1646         (bus_config_parser_unref): Clear conf_dirs list
1647         (include_dir): Add directory to conf_dirs list
1648         (bus_config_parser_get_conf_dirs): New function
1649
1650         * bus/dir-watch.[ch]: New files
1651
1652         * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
1653
1654         * configure.in: Add checks for D_NOTIFY on Linux
1655
1656 2005-06-14  Colin Walters  <walters@verbum.org>
1657
1658         * glib/dbus-binding-tool-glib.c:
1659         * glib/dbus-gobject.c:
1660         * glib/dbus-gvalue.c: Fix indentation and brace style.
1661         
1662 2005-06-14  Ross Burton <ross@openedhand.com>.
1663
1664         * glib/dbus-glib.h: Make DBusGMethodInvocation
1665         a private structure.  Rearrange prototypes a bit.
1666         
1667         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
1668         documentation for first_arg_type.
1669         
1670         * glib/dbus-gobject.c: Move DBusGMethodInvocation
1671         here, add documentation.  Move dbus_g_method_return
1672         and dbus_g_method_return_error into public API
1673         section.
1674
1675 2005-06-14  Colin Walters  <walters@verbum.org>
1676
1677         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
1678         Add missing return statements, noticed by Ross Burton.
1679         
1680 2005-06-13  Ross Burton <ross@openedhand.com>.
1681
1682         * glib/dbus-gobject.c: Handle errors on message
1683         demarshalling by sending error message back.
1684         * glib/dbus-gvalue.c: Initialize return variables.
1685
1686 2005-06-13  Colin Walters  <walters@verbum.org>
1687
1688         * glib/Makefile.am: Fix thinko in last patch.
1689
1690 2005-06-13  Colin Walters  <walters@verbum.org>
1691
1692         * glib/Makefile.am: Move dbus-gtype-specialized.c
1693         and dbus-gtype-specialized.h into a _HEADERS variable,
1694         install them.
1695
1696 2005-06-12  Colin Walters  <walters@verbum.org>
1697
1698         Async signals and various bugfixes and testing by
1699         Ross Burton <ross@openedhand.com>.
1700
1701         * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
1702         (dbus_gvalue_genmarshal_name_from_type)
1703         (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
1704         (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
1705         (dbus_g_value_types_init, dbus_gtype_from_signature)
1706         (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
1707         (dbus_gtypes_from_arg_signature): New function prototypes.
1708         (dbus_gvalue_demarshal): Take context and error arguments.
1709         (dbus_gvalue_demarshal_variant): New function.
1710         (dbus_gvalue_demarshal_message): New function.
1711         (dbus_gvalue_store): Delete.
1712
1713         * glib/dbus-gvalue.c:
1714
1715         File has been almost entirely rewritten; now we special-case
1716         more types such as DBUS_TYPE_SIGNATURE, handle arrays and
1717         hash tables correctly, etc.  Full support for recursive values
1718         is not yet complete.
1719
1720         * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
1721         argument of signal to G_TYPE_POINTER since we now pass a
1722         structure.
1723         (lookup_g_marshaller): Delete in favor of
1724         _dbus_gobject_lookup_marshaller.
1725         (marshal_dbus_message_to_g_marshaller): Use
1726         _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
1727         to handle remote signal callbacks.
1728         (dbus_g_proxy_new_from_proxy): New function; creates a new
1729         DBusGProxy by copying an existing one.
1730         (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
1731         (dbus_g_proxy_get_path): New functions.
1732         (dbus_g_proxy_marshal_args_to_message): New function;
1733         factored out of existing code.
1734         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
1735         from a varargs array.
1736         (dbus_g_proxy_begin_call_internal): New function.
1737         (dbus_g_proxy_end_call_internal): New function.
1738         (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
1739         as arguments; simply invoke dbus_g_proxy_begin_call_internal
1740         after collecting args into value array.
1741         (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
1742         invoke dbus_g_proxy_end_call_internal.
1743         (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
1744         end_call_internal.
1745         (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
1746         types.
1747         (array_free_all): New function.
1748         (dbus_g_proxy_add_signal): Take GTypes.
1749
1750         * glib/dbus-gobject.h:
1751         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
1752         (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
1753         Prototype.
1754
1755         * glib/dbus-gobject.c: Add a global marshal_table hash which
1756         stores mappings from type signatures to marshallers.  Change lots
1757         of invocations of dbus_gtype_to_dbus_type to
1758         dbus_gtype_to_signature.
1759         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
1760         (introspect_signals): Fix test for query.return_type.
1761         (set_object_property): Update invocation of dbus_gvalue_demarshal.
1762         (invoke_object_method): Many changes.  Handle asynchronous
1763         invocations.  Convert arguments with
1764         dbus_gvalue_demarshal_message.  Handle errors.  Use
1765         DBusSignatureIter instead of strlen on args. Handle all arguments
1766         generically.  Special-case variants.
1767         (dbus_g_method_return, dbus_g_method_return_error): New function.
1768         (DBusGSignalClosure): New structure, closes over signal
1769         information.
1770         (dbus_g_signal_closure_new): New function.
1771         (dbus_g_signal_closure_finalize): New function.
1772         (signal_emitter_marshaller): New function; is special marshaller
1773         which emits signals on bus.
1774         (export_signals): New function; introspects object signals and
1775         connects to them.
1776         (dbus_g_object_type_install_info): Take GType instead of
1777         GObjectClass.
1778         (dbus_g_connection_register_g_object): Invoke export_signals.
1779         (dbus_g_connection_lookup_g_object): New function.
1780         (DBusGFuncSignature) New structure; used for mapping type
1781         signatures to marshallers.
1782         (funcsig_hash): New function; hashes DBusGFuncSignature.
1783         (funcsig_equal): New function; compares DBusGFuncSignature.
1784         (_dbus_gobject_lookup_marshaller): New function.
1785         (dbus_g_object_register_marshaller): New function; used to
1786         register a marshaller at runtime for a particular signature.
1787
1788         * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
1789
1790         * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
1791         which notes a server method implementation should be
1792         asynchronous.
1793
1794         * glib/dbus-binding-tool-glib.c
1795         (dbus_binding_tool_output_glib_server): Call
1796         dbus_g_value_types_init.
1797         (write_formal_parameters): Use dbus_gtype_from_signature.  Handle
1798         variants specially.
1799         (dbus_g_type_get_lookup_function): Turn GType into an invocation
1800         of a lookup function.
1801         (write_args_for_direction): Use dbus_g_type_get_lookup_function.
1802         (write_untyped_out_args): New method; write output arguments.
1803         (write_formal_declarations_for_direction): Function for
1804         writing prototypes.
1805         (write_formal_parameters_for_direction): Function for
1806         writing implementations.
1807         (write_typed_args_for_direction): Function for writing
1808         arguments prefixed with GTypes.
1809         (write_async_method_client): Write out async version
1810         of method.
1811
1812         * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
1813         (dbus_g_type_get_marshal_name): Move mapping from GType
1814         to marshal name into here.
1815         (dbus_g_type_get_c_name): Move into here.
1816         (compute_marshaller): Convert signature to type with
1817         dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
1818         (compute_marshaller_name): Ditto.
1819         (compute_marshaller): Handle async signal annotations.
1820         (gather_marshallers): Return if we don't have a known
1821         prefix.
1822         (generate_glue): Collect introspection blob here, and
1823         write all of the blob at the end.  This allows an object
1824         with multiple interfaces to work.
1825         Mark async methods in introspection blob.
1826
1827         * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
1828         dbus-gtype-specialized.c, dbus-gtype-specialized.h,
1829         dbus-gvalue-utils.h, dbus-gvalue-utils.c.
1830
1831         * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
1832         avoids people accidentally using DBUS_TYPE_* which should
1833         not be necessary anymore.
1834         Do include dbus-gtype-specialized.h, which are utilities
1835         for GLib container types.
1836         Add various #defines for types such as
1837         DBUS_TYPE_G_BOOLEAN_ARRAY.
1838         (DBusGValueIterator, DBusGValue): Define, not fully used
1839         yet.
1840         (dbus_g_value_get_g_type): Type for recursive value.
1841         (dbus_g_value_open, dbus_g_value_iterator_get_value)
1842         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
1843         (dbus_g_value_free): Prototypes.
1844         (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
1845         (dbus_g_proxy_set_interface): Prototype.
1846         (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
1847         (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
1848         types.
1849         (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
1850         Accessors.
1851         (DBusGAsyncData, DBusGMethodInvocation): Structures for
1852         doing async invocations.
1853         (dbus_g_method_return, dbus_g_method_return_error):
1854         Prototypes.
1855         * doc/dbus-tutorial.xml: Update GLib section.
1856         
1857         * tools/dbus-viewer.c (load_child_nodes): Update
1858         for new invocation type of dbus_g_proxy_end_call.
1859         (load_from_service_thread_func): Ditto.
1860
1861         * tools/print-introspect.c (main): Ditto.
1862
1863         * tools/dbus-names-model.c (have_names_notify)
1864         (names_model_reload, names_model_set_connection)
1865         Use GTypes.
1866
1867         * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
1868         needed since Python bindings use GLib bindings.
1869
1870         * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
1871         Add --prefix argument.
1872
1873         * tools/Makefile.am: Define DBUS_COMPILATION.  Remove
1874         unneeded --ignore-unsupported arg.
1875         
1876         * test/glib/test-service-glib.c: 
1877         * test/glib/test-service-glib.xml:
1878         * test/glib/test-dbus-glib.c: Add many more tests.
1879
1880 2005-06-06  David Zeuthen  <davidz@redhat.com>
1881
1882         * doc/TODO: Add item about need to remove deprecated functions.
1883
1884         * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
1885
1886         * dbus/dbus-connection.c (dbus_connection_disconnect): New function
1887         to repair the ABI which was broken with the last commit.
1888
1889 2005-06-02  John (J5) Palmieri <johnp@redhat.com>
1890
1891         *  dbus/dbus-connection.c, dbus/dbus-connection.h 
1892         (dbus_connection_disconnect): renamed to dbus_connection_close 
1893         for API symmetry with dbus_connection_open
1894         (_dbus_connection_open_internal): 
1895         s/dbus_connection_disconnect/dbus_connection_close
1896
1897         * dbus/dbus-bus.c (dbus_bus_get):
1898         s/dbus_connection_disconnect/dbus_connection_close
1899
1900         * bus/connection.c (bus_connections_unref, 
1901         bus_connections_setup_connection, bus_connections_expire_incomplete):
1902         s/dbus_connection_disconnect/dbus_connection_close
1903
1904         * bus/dispatch.c (bus_dispatch, kill_client_connection, 
1905         kill_client_connection_unchecked, check_hello_connection):
1906         s/dbus_connection_disconnect/dbus_connection_close
1907
1908         * bus/bus.c (new_connection_callback):
1909         s/dbus_connection_disconnect/dbus_connection_close
1910
1911         * tools/dbus-send.c (main):
1912         s/dbus_connection_disconnect/dbus_connection_close
1913
1914         * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
1915         s/dbus_connection_disconnect/dbus_connection_close
1916         
1917         * test/test-service.c (path_message_func, filter_func):
1918         s/dbus_connection_disconnect/dbus_connection_close
1919         
1920         * doc/TODO: remove connection_open/connection_disconnect lacks symmetry         item that was just fixed
1921         
1922 2005-05-25  Colin Walters  <walters@verbum.org>
1923
1924         * dbus/dbus-protocol.h: Move various bus service #defines such
1925           as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
1926           dbus/dbus-shared.h.
1927         * dbus/dbus-shared.h: Various defines moved here.
1928         * dbus/dbus-marshal-header.c: Include dbus-shared.h.
1929
1930 2005-05-25  John (J5) Palmieri  <johnp@redhat.com>
1931
1932         * python/__init__.py: Python bindings deserve a minor version
1933         update.  Upped to (0, 40, 2)
1934
1935 2005-05-24  John (J5) Palmieri  <johnp@redhat.com>
1936
1937         * python/decorators.py: add explicitly_pass_message decorator
1938         for passing in the dbus message as keyword for edge case signal
1939         handling
1940
1941         * python/matchrules.py (SignalMatchRule.__repr__): fix output
1942         to conform with what dbus expects for match rules
1943         (SignalMatchRule.execute): add the dbus message as a keyword
1944         if the signal handler has requested it
1945
1946         * python/examples/example/signal-recipient.py: added some more
1947         examples on how to hook up to signals
1948
1949 2005-05-23  John (J5) Palmieri  <johnp@redhat.com>
1950
1951         * python/decorators.py: import dbus_bindings
1952
1953         * python/matchrules.py (SignalMatchRule, SignalMatchTree, 
1954         SignalMatchNode): new classes that implement wildcard signal
1955         callback matching using a tree lookup. Heavily modified from a
1956         patch sent by Celso Pinto (fd.o bug #3241)
1957
1958         * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
1959         use new match classes to handle signals.
1960
1961 2005-05-19  John (J5) Palmieri  <johnp@redhat.com>
1962         
1963         * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
1964
1965 2005-05-18  Havoc Pennington  <hp@redhat.com>
1966
1967         * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
1968         gettext. Not really worth requiring yet perhaps, but any
1969         production quality 1.0 would require it so we should go ahead and
1970         get things set up. We do have a couple token calls to
1971         bindtextdomain in the code already.
1972
1973 2005-05-16  John (J5) Palmieri  <johnp@redhat.com>
1974
1975         * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
1976         when using recursive g_main_loops
1977
1978         * python/_dbus.py (class Bus): add the ProxyObjectClass
1979         alias for ProxyObject to make it easier for the Twisted 
1980         networking framework to integrate dbus.
1981
1982         * python/proxies.py (class ProxyObject): add the ProxyMethodClass
1983         alias for ProxyMethod to make it easier for the Twisted 
1984         networking framework to integrate dbus. 
1985
1986 2005-05-11  Ross Burton  <ross@openedhand.com>
1987
1988         * glib/dbus-glib-tool.c: Add --prefix argument.
1989         * glib/dbus-binding-tool-glib.h: Add prefix argument.
1990         * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
1991         Add prefix argument.
1992         (generate_glue): Pass prefix argument down.
1993         (dbus_binding_tool_output_glib_server): Pass prefix to
1994         glib-genmarshal.
1995         
1996 2005-05-11  Colin Walters  <walters@verbum.org>
1997
1998         * tools/dbus-send.c (append_array): New function.
1999         (append_arg): Broken out from main.
2000         (main): Add cheesy hack to send arrays and variants.
2001         (usage): Update.
2002         * tools/dbus-print-message.c (print_iter): Broken out
2003         from main.
2004
2005 2005-05-11  Colin Walters  <walters@verbum.org>
2006
2007         * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
2008         New function, returns signature string for signature iter.
2009         * dbus/dbus-signature.h: Prototype it.
2010         * dbus/dbus-message.c (dbus_message_iter_get_signature):
2011         New function, returns signature string for message iter.
2012         (dbus_message_iter_get_array_len): New function, returns
2013         length of array.
2014         (dbus_message_iter_get_fixed_array): Fix assertion; this
2015         function should be used when the iter is pointing to the
2016         contents of an array
2017         * dbus/dbus-message.h: Prototypes.
2018         * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
2019         New function; returns length of an array.
2020         * dbus/dbus-marshal-recursive.h: Prototype it.
2021         
2022 2005-05-11  Colin Walters  <walters@verbum.org>
2023
2024         * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
2025         compilation error.
2026         
2027 2005-05-08  Havoc Pennington  <hp@redhat.com>
2028
2029         * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
2030         daemon's pid, not the parent's pid, to the file descriptor.
2031         Reported by Taj Morton.
2032
2033 2005-05-05  Havoc Pennington  <hp@redhat.com>
2034
2035         * configure.in (LT_*): add notes on how the libtool versioning
2036         works to save thinking. Increment soname to indicate protocol
2037         breakage (though really the library interface hasn't changed I
2038         guess)
2039
2040         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
2041         verify the GUID received from server matches what we were
2042         expecting, if we had an expectation
2043
2044         * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
2045         (_dbus_auth_get_guid_from_server): new function
2046         (send_begin): parse the OK args
2047
2048         * doc/dbus-specification.xml: add GUID to the auth protocol
2049
2050 2005-05-05  John (J5) Palmieri  <johnp@redhat.com>
2051
2052         * Fix my name in previous changelog ;)
2053
2054         * python/proxies.py (ProxyObject.__getattr__): add further patch
2055         from Anthony Baxter to throw an AttributeError when python 
2056         __special__ functions are called instead of marshling them over 
2057         the bus (Bug#1685 comment 3).
2058
2059 2005-05-04  John (J5) Palmieri  <johnp@redhat.com>
2060
2061         * python/Makefile.am: changed to use pyexecdir for the binding
2062         shared libraries (Bug#2494)
2063
2064         * python/exceptions.py: bring exceptions over from the bindings
2065         so they can be used in applications (Bug#2036)
2066         Make all exceptions derive from DBusException
2067
2068         * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
2069         of classes so that print obj doesn't throw an exception (Bug #1685)
2070
2071 2005-05-03  Ross Burton  <ross@openedhand.com>
2072
2073         * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
2074         Return if we get an error during registration.  Set up a
2075         weak reference on object to unregister if object is destroyed.
2076         (unregister_gobject): New function.
2077         
2078 2005-05-01  John (J5) Palmieri  <johnp@redhat.com>
2079
2080         * python/dbus_bindings.pyx.in: 
2081         - added new type classes for hinting to the marashaler what type 
2082         to send over the wire
2083         - added int16 and uint16 marshalers
2084         - Fixed a bug in the type constants that caused int32 to go out
2085         as uint16 over the wire
2086         * python/dbus.py: split up into different files and renamed _dbus.py
2087         * python/__init__.py, python/_util.py, python/decorators.py, 
2088         python/exceptions.py, python/proxies.py, python/services.py,
2089         python/types.py: new files split off from dbus.py
2090         * python/Makefile.am: Add new files, remove dbus.py and 
2091         install all python files to <python module dir>/dbus
2092         * python/examples/*: Added #!/usr/bin/env python to the top of
2093         every example.  Patch provided by Tatavarty Kalyan
2094
2095 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2096
2097         * NEWS: Update to 0.33
2098
2099 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2100
2101         * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
2102         method for doing async calls
2103         (_pending_call_notification): New C function for handling pendning call
2104         callbacks
2105         (set_notify): New method for setting pending call notification
2106         
2107         * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
2108         Async capabilities added to remote method calls
2109         (Sender): class removed
2110         (RemoteService): class removed
2111         (ObjectTree): class removed for now
2112         (RemoteObject): Renamed to ProxyObject
2113         (RemoteMethod): Renamed to ProxyMethod
2114         (method): Decorator added for decorating python methods as dbus methods
2115         (signal): Decorator added for decorating python methods as signal emitters
2116         (ObjectType): Metaclass added for generating introspection data and the
2117         method callback vtable
2118         (Interface): Wrapper class added to wrap objects in a dbus interface
2119         (Object): Uses ObjectType as its metaclass and exports Introspect
2120         of the org.freedesktop.DBus.Introspectable interface
2121         (ValidationException, UnknownMethodException): new exceptions
2122
2123         * python/examples/*: Modified to fit with the new bindings
2124
2125 2005-04-23  Havoc Pennington  <hp@redhat.com>
2126
2127         * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
2128         reported by Tony Houghton
2129
2130         * test/test-service.c (main): test
2131         dbus_connection_get_object_path_data()
2132
2133         * dbus/dbus-object-tree.c (find_handler): be sure we always init
2134         the exact_match
2135         (_dbus_object_tree_get_user_data_unlocked): new function used by
2136         dbus_connection_get_object_path_data()
2137         (do_register): add assertion test for get_user_data_unlocked
2138         (object_tree_test_iteration): more tests
2139
2140         * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
2141         new function from Dan Reed to let you get the user data from 
2142         dbus_connection_register_object_path()
2143
2144 2005-04-23  John (J5) Palmieri  <johnp@redhat.com>
2145
2146         * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
2147         in numerous places that did not account for the NULL terminator
2148         (signature_from_seed): changed the manual string copy loop to 
2149         just use strcpy instead
2150         make check should now pass
2151
2152 2005-04-19  John (J5) Palmieri  <johnp@redhat.com>
2153
2154         * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
2155         so that it allows messages that are not signals to pass in 
2156         NULL as the interface.
2157
2158 2005-04-18  David Zeuthen  <davidz@redhat.com>
2159
2160         * glib/dbus-gmain.c (io_handler_destroy_source): 
2161         (timeout_handler_destroy_source, connection_setup_free): 
2162         Also unref the source to avoid memory leaks.
2163
2164 2005-04-13  David Zeuthen  <davidz@redhat.com>
2165
2166         * bus/config-parser.c (bus_config_parser_new): Bump this to a
2167         more reasonable, yet still totally arbitrary, value :-). 
2168
2169 2005-04-13  David Zeuthen  <davidz@redhat.com>
2170
2171         * doc/TODO: Added an "important for 1.0" item about selinux
2172         allow/deny messages
2173
2174 2005-04-13  David Zeuthen  <davidz@redhat.com>
2175
2176         * bus/selinux.c: Add c-file-style to top of file
2177         (log_audit_callback): Don't free the data here anymore
2178         (bus_selinux_check): Don't take spid and tpid since appending
2179         that to auxdata may OOM.
2180         (bus_selinux_allows_acquire_service): Handle OOM and signal back
2181         to the caller if we are OOM by taking an error object.
2182         (bus_selinux_allows_send): -do-
2183
2184         * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
2185         and bus_selinux_allows_send
2186
2187         * bus/bus.c (bus_context_check_security_policy): Pass error and
2188         pass on OOM thrown by bus_selinux_allows_send()
2189
2190         * bus/services.c (bus_registry_acquire_service): Pass error and
2191         pass on OOM thrown by bus_selinux_allows_acquire_service()
2192
2193 2005-04-13  Havoc Pennington  <hp@redhat.com>
2194
2195         * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
2196         message at a time to avoid monopolizing the main loop, bug 
2197         #2953 from Benjamin Otte
2198
2199 2005-04-09  Havoc Pennington  <hp@redhat.com>
2200
2201         * dbus/dbus-string.c (copy): change a memcpy to memmove due to
2202         possible overlap, fix from Daniel Reed
2203         (fixup_alignment): fix signedness warnings
2204         (_dbus_string_append_unichar): ditto
2205
2206 2005-04-09  Havoc Pennington  <hp@redhat.com>
2207
2208         * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
2209
2210         * glib/dbus-glib-tool.c (main): fix warning
2211
2212         * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
2213
2214         * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
2215         add a new function that can be used in simple applications that
2216         don't have a main loop and are willing to block
2217
2218 2005-04-05  David Zeuthen  <davidz@redhat.com>
2219
2220         Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
2221
2222         * glib/dbus-gmain.c:
2223         (io_handler_destroy_source): Remove from list of IO handlers
2224         of the ConnectionSetup object
2225         (timeout_handler_destroy_source): -do- for timeout handlers
2226         (io_handler_source_finalized): Don't remove from list since
2227         we now do that in io_handler_destroy_source(). Renamed from
2228         io_handler_source_destroyed
2229         (timeout_handler_source_destroyed): -do- for timeout handlers
2230         (connection_setup_free): It is now safe to iterate over all
2231         IO and timeout handlers as the _destroy_source removes them
2232         from the list synchronously
2233
2234 2005-03-30  Havoc Pennington  <hp@redhat.com>
2235
2236         * configure.in: change check to gtk 2.4
2237
2238         * tools/dbus-viewer.c (name_combo_changed_callback): remove
2239         gtk_combo_box_get_active_text() usage to decrement GTK requirement
2240         to 2.4
2241
2242 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2243
2244         * News: Update 0.32
2245
2246         * HACKING: Fixed realease instructions.  configure.in should be updated to
2247           the next release by the person who made the last release.
2248
2249 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2250
2251         * python/lvalue_cast_post_process.py - removed.  Patch has been
2252           submitted to Pyrex maintainers that fixes gcc4.0 errors
2253
2254         * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
2255
2256 2005-03-24  Daniel Reed  <n@ml.org>
2257
2258         * tools/Makefile.am: Make print-introspect and
2259         dbus-bus-introspect.xml building conditional on HAVE_GLIB.
2260
2261 2005-03-22  John (J5) Palmieri  <johnp@redhat.com>
2262
2263         * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
2264
2265         * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have 
2266           had in Red Hat packages for a while but for some reason never 
2267           got merged upstream
2268           (_dbus_is_a_number): New checks if a string
2269           can be converted to a number and does the conversion if it can
2270           (_dbus_user_database_lookup): Add check to see if the given username
2271           is a udi.  This allows udi's to be used instead of usernames in the
2272           config file.
2273           (_dbus_user_database_lookup_group): Add check to see if the given groupname
2274           is a gdi.  This allows gdi's to be used instead of groupnames in the
2275           config file.
2276
2277 2005-03-21  John (J5) Palmieri  <johnp@redhat.com>
2278
2279         * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
2280           code so that it compiles with gcc4.0
2281
2282         * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
2283           run dbus_bindings.c through lvalue_cast_post_process.py and copy the
2284           results back to dbus_binding.c
2285
2286 2005-03-20  Colin Walters  <walters@verbum.org>
2287
2288         Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
2289
2290         * configure.in: Require GTK+ 2.6.
2291         
2292 2005-03-20  Colin Walters  <walters@verbum.org>
2293
2294         * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
2295
2296 2005-03-17  Tom Parker  <palfrey@tevp.net>
2297
2298         * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
2299         print DBUS_UID_UNSET; instead print passed username.  Also
2300         be sure to actually use gid looked up in cache.
2301         
2302         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
2303         for DBUS_GID_UNSET and groupname.
2304
2305 2005-03-17  Colin Walters  <walters@verbum.org>
2306
2307         * bus/print-introspect.c: Move to tools/.
2308         * bus/run-with-tmp-session-bus.sh: Ditto.
2309         
2310         * glib/Makefile.am (dbus-glib-bindings.h): Move
2311         generation to tools/Makefile.am.
2312
2313         * test/glib/run-test.sh: Update to handle move
2314         of run-with-tmp-session-bus.sh.
2315
2316         * test/glib/test-service-glib.c: Update to handle
2317         move of dbus-glib-bindings.h.
2318
2319         * tools/print-introspect.c: Moved here
2320         from bus/, and ported to GLib bindings.
2321
2322         * tools/run-with-tmp-session-bus.sh: Moved here
2323         from bus/.
2324
2325         * tools/Makefile.am: Generate dbus-glib-bindings.h
2326         and dbus-bus-introspect.xml here.
2327
2328         * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
2329         Update.
2330
2331 2005-03-17  Colin Walters  <walters@verbum.org>
2332
2333         * bus/driver.c (write_args_for_direction): Use
2334         _dbus_string_get_const_data to retrieve string;
2335         _dbus_string_get_const_data_len doesn't actually return
2336         a NULL-terminated substring.
2337
2338         * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
2339         (main): Change to use org_freedesktop_DBus_request_name
2340         instead of using g_proxy_begin_call/end_call.
2341
2342 2005-03-15  Joe Shaw  <joeshaw@novell.com>
2343
2344         * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
2345         generating the finalizer.  Fixes from Ben Maurer.
2346
2347 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2348
2349         * mono/BusDriver.cs: Update method names: ListServices
2350         becomes ListNames; GetOwner becomes GetNameOwner.
2351
2352         * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
2353         onto the eval stack when removing the delegate.
2354
2355 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2356
2357         * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
2358         LT_CURRENT.  Set it to the autoconf variable.
2359                                                                                 
2360         * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
2361         classes that disconnects the signal handler delegate from the
2362         service object.  Fixes a big leak of proxy objects on the
2363         client side of things.  Patch from Ben Maurer
2364         <bmaurer@ximian.com>
2365
2366 2005-03-12  Colin Walters  <walters@verbum.org>
2367
2368         * bus/driver.c (write_args_for_direction): New function,
2369         parses a type signature into arguments and outputs to
2370         XML.
2371         (bus_driver_handle_introspect): Use it instead of
2372         hardcoding XML for certain signatures.
2373         
2374         * bus/Makefile.am (dbus-bus-introspect.xml): Add
2375         dependency on dbus-daemon.
2376
2377         * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
2378         argument, pass it to dbus_binding_tool_output_glib_client.
2379
2380         * glib/dbus-binding-tool-glib.c
2381         (generate_client_glue): Protect against multiple inclusion.
2382         (dbus_binding_tool_output_glib_client): Add
2383         G_BEGIN_DECLS/G_END_DECLS.
2384
2385         * glib/dbus-binding-tool-glib.c (compute_client_method_name):
2386         Change to just take iface prefix directly.
2387         (write_formal_parameters): Clarify error message.
2388         (check_supported_parameters): New function; checks to see type
2389         signatures of method parameters are supported.
2390         (generate_client_glue): Handle ignore_unsupported flag.
2391         (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
2392         parameter.
2393
2394         * glib/Makefile.am (dbus-glib-bindings.h): Pass
2395         --ignore-unsupported by default until glib bindings
2396         support arrays.
2397
2398 2005-03-11  Colin Walters  <walters@verbum.org>
2399
2400         * glib/Makefile.am: Generate dbus-glib-bindings.h and
2401         install it.
2402
2403         * bus/print-introspect.c: New file; prints introspection
2404         data for a given name and object path.
2405
2406         * bus/run-with-tmp-session-bus.sh: New file, refactored
2407         from test/glib/run-test.sh.  Creates a temporary session
2408         bus and runs another program.
2409
2410         * test/glib/run-test.sh: Refactor to invoke
2411         run-with-tmp-session-bus.sh.
2412
2413         * bus/driver.c (bus_driver_handle_introspect): Fix to print new
2414         introspection format.  Also change to use DBUS_TYPE_x_AS_STRING
2415         macros instead of hardcoding.
2416
2417         * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
2418
2419 2005-03-11  Joe Shaw  <joeshaw@novell.com>
2420
2421         * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
2422         this unref; it doesn't match up evenly in some codepaths.
2423         (_dbus_connection_block_pending_call): Unref at every exitpoint;
2424         this evenly matches with the ref near the top of this function.
2425
2426 2005-03-09  Joe Shaw  <joeshaw@novell.com>
2427
2428         * dbus/dbus-object-tree.c
2429         (_dbus_object_tree_unregister_and_unlock): If checks are enabled
2430         and we try to unregister a path that's not registered, still go
2431         through the process of unlocking and don't just return.
2432
2433 2005-03-09  Colin Walters  <walters@verbum.org>
2434
2435         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
2436         to this are generated for client-side wrappers.  Invokes a
2437         D-BUS method and returns reply values.  
2438
2439         * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
2440         function; writes signature string for argument direction.
2441         (write_args_for_direction): Change to pass input values directly
2442         instead of via address, and fix indentation.
2443         (generate_client_glue): Change to invoke dbus_g_proxy_invoke.  Also
2444         make generated wrappers inlineable.
2445
2446         * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
2447         note about using dbus_type_is_fixed.
2448
2449         * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
2450         dbus/dbus-signature.c as dbus_type_is_fixed.
2451
2452         All callers updated.
2453
2454         * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
2455         from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
2456
2457         * dbus/dbus-signature.h: Prototype.
2458
2459         * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
2460         error printf code.
2461
2462         * test/glib/test-dbus-glib.c (main): Be sure to clear error as
2463         appropriate instead of just freeing it.
2464         (main): Free returned strings using g_free.
2465
2466         * test/glib/Makefile.am (test-service-glib-glue.h)
2467         (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
2468
2469         * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
2470         simply maps a simple D-BUS type to GType.
2471         (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
2472         GType.
2473         (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
2474         initialize the value with it.
2475         (dbus_gvalue_binding_type_from_type): Unused, delete.
2476         (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
2477         various types instead of unmarshalling to value data directly.
2478         Remove can_convert boolean.
2479         (dbus_gvalue_marshal): Remove duplicate initialization; switch to
2480         returning directly instead of using can_convert boolean.
2481         (dbus_gvalue_store): New function; not related to D-BUS per-se.
2482         Stores a GValue in a pointer to a value of its corresponding C
2483         type.
2484
2485         * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
2486         add dbus_gvalue_store.
2487
2488 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2489
2490         Fix a bunch of lifecycle and memory management problems
2491         in the mono bindings.
2492
2493         * mono/Arguments.cs (Arguments): Implement IDisposable
2494
2495         * mono/Bus.cs (Bus): Don't allow public instantiation.  This is
2496         strictly a static class.
2497
2498         * mono/Connection.cs: Move the DBusObjectPathVTable and associated
2499         delegates into this file.
2500         (Connection): Implement IDisposable.
2501         (Dispose): Disconnect the connection and set the raw connection
2502         pointer to IntPtr.Zero.
2503         (~Connection): Call Dispose().
2504         (RegisterObjectPath): Added.  Manages the registration of object
2505         paths so we can cleanly disconnect them at dispose/finalize time.
2506         (UnregisterObjectPath): Ditto.
2507         (set_RawConnection): Unregister all of the object paths when
2508         changing the underlying DBusConnection.  Add them back onto the
2509         new connection, if any.
2510
2511         * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
2512         more unmanaged resources anymore, so it's not necessary.  Move all
2513         the DBusObjectPathVTable stuff out of here.
2514         (Handler): Save references to our delegates so that they don't get
2515         finalized.  Call Connection.RegisterObjectPath() instead of
2516         dbus_connection_register_object_path() directly.
2517         (Message_Called): Dispose the message after we're finished with
2518         it.
2519
2520         * mono/Message.cs (Message): Implement IDisposable.
2521         (Dispose): Dispose the Arguments, and set the RawMessage to
2522         IntPtr.Zero.
2523         (SendWithReplyAndBlock): We own the ref to the reply that comes
2524         back from dbus_connection_send_with_reply_and_block() so add a
2525         comment about that and unref it after we've constructed a managed
2526         MethodReturn class around it.  Fixes a big, big leak.
2527
2528         * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
2529         method.
2530         (BuildSignalHandler): After we've sent the Signal message, dispose
2531         of it.
2532         (BuildMethod): Dispose of the method call and reply messages after
2533         we've sent the message and extracted the data we want from the
2534         reply.
2535
2536         * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
2537         anymore.
2538         (Service_FilterCalled): Dispose of the message after we're
2539         finished with it.
2540
2541 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2542
2543         * dbus/dbus-connection.c (dbus_connection_send_with_reply):
2544         After we attach our pending call to the connection, unref
2545         it.  Fixes a leak.
2546  
2547         * mono/Connection.cs (set_RawConnection): Disconnect our
2548         filter and match callbacks from the old connection and
2549         reconnect them to the new connection, if any.
2550
2551         * mono/DBusType/Array.cs: "Code" is a static member, so
2552         don't use "this" to refer to it.  Fix for stricter checking
2553         in Mono 1.1.4.
2554  
2555         * mono/DBusType/ObjectPath.cs (Append): Don't leak the
2556         object path that we pass into unmanaged code.
2557  
2558         * mono/DBusType/String.cs (Append): Don't leak the string
2559         that we pass into unmanged code.
2560
2561 2005-03-07  John (J5) Palmieri  <johnp@redhat.com>
2562         * NEWS: Update for 0.31
2563
2564         * configure.in: Release 0.31
2565         add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
2566
2567         * qt/Makefile.am: fixed build
2568
2569         * dbus/Makefile.am: soname bump for libdbus
2570
2571         * glib/Makefile.am: soname bump for libdbus-glib
2572
2573 2005-03-05  Havoc Pennington  <hp@redhat.com>
2574
2575         * dbus/dbus-sysdeps.c:
2576         (pseudorandom_generate_random_bytes_buffer): fix to have no return
2577         value
2578         (_dbus_generate_random_bytes_buffer): fix return value
2579
2580         * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
2581         checks actually work, from Tom Parker <fdo@tevp.net>
2582
2583 2005-03-01  Colin Walters  <walters@verbum.org>
2584
2585         * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
2586         functions copied from dbus-glib-tool.c.
2587         (main): Convert lots of error code to use them.
2588         Also add some testing for introspection bits.
2589
2590 2005-03-01  Colin Walters  <walters@verbum.org>
2591         
2592         * doc/TODO: Remove introspection signature TODO.
2593
2594 2005-02-27  Colin Walters  <walters@verbum.org>
2595
2596         * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
2597         Change return value to const char * instead of int so we can do
2598         full signatures.
2599         (struct PropertyInfo, struct ArgInfo): Store char *.
2600         (property_info_new, arg_info_new): Update parameters, strdup.
2601         (property_info_unref, arg_info_unref): Free.
2602
2603         * glib/dbus-gidl.h: Update prototypes.
2604
2605         * glib/dbus-gparser.c (basic_type_from_string): Delete.
2606         (validate_signature): New function, just validates signature and
2607         sets GError.
2608         (parse_property, parse_arg): Invoke validate_signature.  Store
2609         signature instead of just type code.
2610
2611         * glib/dbus-gvalue.c (base_type_from_signature): New utility
2612         function to return a primary type for a signature, dropping
2613         information about types in container types.
2614         (dbus_gvalue_genmarshal_name_from_type)
2615         (dbus_gvalue_binding_type_from_type)
2616         (dbus_gvalue_ctype_from_type): Update to take full signature
2617          instead of type code.
2618         (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
2619
2620         * glib/dbus-gvalue.h: Update prototypes for above.
2621
2622         * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
2623         glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
2624         (introspect_properties, introspect_signals, write_interface):
2625         Update to handle signatures, and remove usage of
2626         _dbus_gutils_type_to_string.
2627         (handle_introspect): Print out type codes instead of e.g. "string"
2628         in hardcoded introspection XML; also use x_AS_STRING constants
2629         instead of hardcoding in string.
2630
2631         * glib/dbus-glib-tool.c (pretty_print): Handle signature change
2632         to string.  Remove usage of _dbus_gutils_type_to_string.
2633
2634         * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
2635
2636         * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
2637         deletion.
2638         
2639         * glib/dbus-binding-tool-glib.c (compute_marshaller)
2640         (compute_marshaller_name, generate_glue): Handle signature change
2641         to string.
2642         (write_formal_parameters, write_args_for_direction): Ditto, and
2643         remove FIXME.
2644
2645         * tools/dbus-tree-view.c (type_to_string): Delete.
2646         (info_set_func_text): Update to print full signatures.
2647
2648         * test/glib/test-service-glib.xml: Change types to new
2649         introspection format.
2650
2651 2005-02-26  Havoc Pennington  <hp@redhat.com>
2652
2653         * doc/TODO: remove the "guid" item
2654
2655         * test/glib/test-profile.c (no_bus_thread_func): use open_private
2656         (with_bus_thread_func): use open_private
2657
2658         * dbus/dbus-connection.c (dbus_connection_open_private): new
2659         function that works like the old dbus_connection_open()
2660         (dbus_connection_open): now returns an existing connection if
2661         possible
2662
2663         * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
2664         through the GUID to the transport
2665
2666         * dbus/dbus-server.c (_dbus_server_init_base): keep around the
2667         GUID in hex-encoded form.
2668
2669         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2670         pass GUID argument in to the transport
2671
2672         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
2673         guid argument
2674
2675         * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
2676
2677         * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
2678
2679 2005-02-25  Havoc Pennington  <hp@redhat.com>
2680
2681         * doc/dbus-specification.xml: document the GUID thing
2682
2683         * dbus/dbus-server.c (_dbus_server_init_base): initialize a
2684         globally unique ID for the server, and put a "guid=hexencoded"
2685         field in the address
2686
2687         * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
2688
2689         * dbus/dbus-message.c: ditto
2690
2691         * dbus/dbus-dataslot.c: ditto
2692
2693         * dbus/dbus-list.c: ditto
2694
2695         * dbus/dbus-internals.h: wait, just include
2696         dbus-threads-internal.h here
2697         
2698         * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
2699         use in main library
2700
2701         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
2702
2703 2005-02-24  Colin Walters  <walters@verbum.org>
2704
2705         * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
2706
2707 2005-02-24  John (J5) Palmieir  <johnp@redhat.com>
2708
2709         * glib/Makefile.am: added dbus-gobject.h to sources list
2710         so distcheck doesn't fail
2711         
2712 2005-02-24  Havoc Pennington  <hp@redhat.com>
2713
2714         * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
2715         you must disconnect before unref, since locking and other things
2716         are screwed up otherwise. Fix assorted other locking stuff.
2717
2718         * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
2719         fix compilation
2720
2721         * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
2722         into a private header and don't export from the library
2723
2724         * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
2725
2726 2005-02-24  Colin Walters  <walters@verbum.org>
2727         
2728         * dbus/dbus-signature.c: New file; implements various functions
2729         related to type signatures.  Includes an interator for parsing,
2730         validation functions.
2731         (dbus_type_is_basic): Moved here from
2732         dbus-marshal-basic.c:_dbus_type_is_basic.
2733         (dbus_type_is_container): Moved here from
2734         dbus-marshal-basic.c:_dbus_type_is_container.
2735
2736         All callers of _dbus_type_is_container and _dbus_type_is_basic
2737         updated, and include dbus-signature.h.
2738
2739         * dbus/dbus-signature.h: New file; prototypes for the above.
2740
2741         * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
2742         dbus-signature.h.
2743
2744         * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
2745         function factored out of _dbus_first_type_in_signature.
2746         (_dbus_first_type_in_signature_c_str): New function; returns first
2747         type code for a type signature character.
2748
2749         * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
2750         handle function moves.
2751
2752         * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
2753
2754         * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
2755         function; skips to next complete type in type signature.
2756         Implemented using previous skip_one_complete_type.  Now
2757         skip_one_complete_type just delegates to
2758         _dbus_type_signature_next.
2759
2760         * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
2761         to dbus-signature.c
2762         (_dbus_type_is_container): Ditto.
2763
2764         * doc/dbus-specification.xml: Update introspection sample to
2765         use real type signatures.
2766
2767         * dbus/dbus-test.h: Prototype signature test.
2768
2769         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
2770         signature tests.
2771
2772         * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
2773
2774 2005-02-23  John (J5) Palmieri  <johnp@redhat.com>
2775
2776         * python/dbus_bindings.pyx.in (PendingCall::get_reply):
2777         s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
2778
2779 2005-02-21  Colin Walters  <walters@verbum.org>
2780
2781         * dbus/dbus-test-main.c (main): Take optional specific test
2782         argument.
2783
2784         * dbus/dbus-test.c (run_test): New function, runs a test function
2785         with no data directory.
2786         (run_data_test): Like above, but takes data directory.
2787         (dbus_internal_do_not_use_run_tests): Take
2788         specific test argument.  Replace lots of cut n' paste code
2789         with run_test and run_data_test.
2790
2791         * dbus/dbus-test.h: Update prototype for
2792         dbus_internal_do_not_use_run_tests.
2793
2794 2005-02-20  Havoc Pennington  <hp@redhat.com>
2795
2796         Fix bugs reported by Daniel P. Berrange
2797         
2798         * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
2799         (protected_change_watch): new function
2800         (_dbus_server_toggle_watch, _dbus_server_remove_watch)
2801         (_dbus_server_add_watch): change to work like the
2802         dbus-connection.c equivalents; like those, probably kind of
2803         busted, but should at least mostly work for now
2804         (dbus_server_disconnect): drop the lock if we were already
2805         disconnected, patch from Daniel P. Berrange
2806
2807         * dbus/dbus-server.c (_dbus_server_toggle_timeout) 
2808         (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
2809         same stuff
2810
2811         * doc/TODO: todo about unscrewing this mess
2812
2813 2005-02-19  Colin Walters  <walters@verbum.org>
2814
2815         * glib/dbus-binding-tool-glib.c
2816         (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
2817
2818         * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
2819         as errno.h and sys/stat.h.
2820         (lose): New function, prints error with
2821         newline and exits.
2822         (lose_gerror): Similar, but takes GError for message.
2823         (main): Add --output argument to specify output file to write to,
2824         instead of always printing to stdout.  In this mode, determine
2825         timestamps on source files to see whether any are newer than the
2826         target file.  If not, exit.  Also convert a number of error
2827         messages to use lose (since it's shorter), and switch to using
2828         g_io_channel_shutdown.
2829
2830 2005-02-19  Havoc Pennington  <hp@redhat.com>
2831
2832         * glib/dbus-gobject.c
2833         (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
2834
2835         * glib/dbus-glib.c: fix doxygen warnings
2836
2837         * glib/dbus-gparser.c (parse_annotation): error if an annotation
2838         is found on an <arg>
2839
2840 2005-02-17  Colin Walters  <walters@verbum.org>
2841
2842         * glib/dbus-gobject.h: Don't export
2843         _dbus_glib_marshal_dbus_message_to_gvalue_array.
2844         
2845         * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
2846         (invoke_object_method): Handle it.
2847
2848         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
2849         Handle rename.
2850         
2851 2005-02-17  Colin Walters  <walters@verbum.org>
2852
2853         * bus/.cvsignore, doc/.cvsignore
2854         * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
2855         Update.
2856
2857 2005-02-17  Colin Walters  <walters@verbum.org>
2858         
2859         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
2860         Rename to DBUS_SERVICE_DBUS.
2861         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
2862         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
2863         Change the value from "org.freedesktop.Local"
2864         to "org.freedesktop.DBus.Local".
2865         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
2866         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
2867         DBUS_INTERFACE_INTROSPECTABLE.
2868         Change the value from "org.freedesktop.Introspectable"
2869         to "org.freedesktop.DBus.Introspectable".
2870         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
2871         DBUS_INTERFACE_PROPERTIES.
2872         Change the value from "org.freedesktop.Properties"
2873         to "org.freedesktop.DBus.Properties".
2874         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
2875         DBUS_INTERFACE_PEER.
2876         Change the value from "org.freedesktop.Peer"
2877         to "org.freedesktop.DBus.Peer".
2878         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
2879         DBUS_INTERFACE_LOCAL.
2880         Change the value from "org.freedesktop.Local"
2881         to "org.freedesktop.DBus.Local".
2882
2883         All other users of those constants have been changed.
2884
2885         * bus/driver.c (bus_driver_handle_introspect): Use constants.
2886
2887         * glib/dbus-gobject.c (handle_introspect): Use constants.
2888
2889         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
2890
2891 2005-02-17  Colin Walters  <walters@verbum.org>
2892
2893         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
2894         (parse_node, parse_interface, parse_method, parse_signal)
2895         (parse_property, parse_annotation): Lose if we're currently in an
2896         annotation.
2897         (parse_annotation): New function.
2898         (parser_start_element, parser_end_element): Handle annotation.
2899         (parse_method, parse_interface): Remove support for c_name attribute,
2900         switch to annotations.
2901
2902         * glib/dbus-gidl.h (interface_info_get_binding_names)
2903         (method_info_get_binding_names)
2904         (interface_info_get_binding_name, method_info_get_binding_name)
2905         (interface_info_set_binding_name, method_info_set_binding_name):
2906         Remove.
2907         (interface_info_get_annotations, method_info_get_annotations)
2908         (interface_info_get_annotation, method_info_get_annotation)
2909         (interface_info_add_annotation, method_info_add_annotation):
2910         Prototype.
2911
2912         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
2913         for "bindings".
2914         (struct MethodInfo): Ditto.
2915         Straightfoward conversion of binding methods into annotation methods
2916         as prototyped.
2917
2918         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
2919
2920         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
2921
2922         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
2923         Use new annotation API.
2924
2925         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
2926         annotation element.
2927         
2928         * doc/dbus-specification.xml: Discuss introspection annotations,
2929         include list of well-known annotations.
2930
2931         * test/glib/test-service-glib.xml: Make validate against new DTD.
2932
2933 2005-02-17  Colin Walters  <walters@verbum.org>
2934
2935         This patch is based on initial work from
2936         Paul Kuliniewicz <kuliniew@purdue.edu>.
2937
2938         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
2939         initialization of GValue from dbus type to here.
2940         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
2941         for the "glib-genmarshal" program from a DBus type.
2942         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
2943         into the C name for it we use in the glib bindings.
2944         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
2945         glib C type (not GValue).
2946         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
2947
2948         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
2949         from dbus-gobject.c.
2950
2951         * glib/dbus-gutils.h: Prototype it.
2952
2953         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
2954         (marshal_dbus_message_to_g_marshaller): Use new shared function
2955         dbus_glib_marshal_dbus_message_to_gvalue_array.
2956
2957         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
2958         Will be changed once we have annotations.
2959
2960         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
2961         GStaticRWLock.  Callers updated.
2962         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
2963         (string_table_next): New function for iterating over zero-terminated
2964         string value array.
2965         (string_table_lookup): New function; retrieves specific entry in
2966         array.
2967         (get_method_data): New function; look up method data in object data chunk.
2968         (object_error_domain_prefix_from_object_info)
2969         (object_error_code_from_object_info): New functions, but not implemented yet.
2970         (method_interface_from_object_info): New function; retrieve interface name.
2971         (method_name_from_object_info): New function; retrieve method name.
2972         (method_arg_info_from_object_info): New function; retrieve argument data.
2973         (arg_iterate): New function; iterates over serialized argument data.
2974         (method_dir_signature_from_object_info): New function; returns a
2975         GString holding type signature for arguments for just one
2976         direction (input or output).
2977         (method_input_signature_from_object_info)
2978         (method_output_signature_from_object_info): New functions.
2979         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
2980         converts dbus message arguments into a GValue array.  Used for both
2981         signal handling and method invocation.
2982         (struct DBusGlibWriteIterfaceData): New utility structure.
2983         (write_interface): New function; generate introspection XML for
2984         an interface.
2985         (introspect_interfaces): New function; gathers all interface->methods,
2986         generates introspection XML for them.
2987         (handle_introspect): Invoke introspect_interfaces.
2988         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
2989         (lookup_object_and_method): New function; examines an incoming message
2990         and attempts to match it up (via interface, method name, and argument
2991         signature) with a known object and method.
2992         (gerror_domaincode_to_dbus_error_name): New function; converts a
2993         GError domain and code into a DBus error name.  Needs GError data
2994         added to object introspection to work well.
2995         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
2996         GError.
2997         (invoke_object_method): New function to invoke an object method
2998         looked up via lookup_object_and_method.  Parses the incoming
2999         message, turns it into a GValue array, then invokes the marshaller
3000         specified in the DBusGMethodInfo.  Creates a new message with
3001         either return values or error message as appropriate.
3002         (gobject_message_function): Invoke lookup_object_and_method and
3003         invoke_object_method.
3004
3005         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
3006         (enum DBusBindingOutputMode): New enum for binding output modes.
3007         (pretty_print): Print binding names.
3008         (dbus_binding_tool_error_quark): GError bits.
3009         (version): Fix typo.
3010         (main): Create GIOChannel for output.  Parse new --mode argument,
3011         possible values are "pretty-print", "glib-server", "glib-client".
3012         Use mode to invoke appropriate function.
3013         
3014         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
3015
3016         * glib/dbus-glib-tool.h: New header, just includes GError bits
3017         for now.
3018
3019         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
3020         maps binding style to name.
3021         (struct MethodInfo): Ditto.
3022         (get_hash_keys, get_hash_key): Utility function, returns keys for
3023         a GHashTable.
3024         (interface_info_new, method_info_new): Initialize bindings.
3025         (interface_info_unref, method_info_unref): Destroy bindings.
3026         (method_info_get_binding_names, method_info_get_binding_name)
3027         (interface_info_get_binding_names, interface_info_get_binding_name):
3028         Functions for retrieving binding names.
3029         (method_info_set_binding_name, interface_info_set_binding_name):
3030         Functions for setting binding names.
3031
3032         * glib/dbus-binding-tool-glib.h: New file, has prototypes
3033         for glib binding generation.
3034
3035         * glib/dbus-binding-tool-glib.c: New file, implements server-side
3036         and client-side glib glue generation.
3037
3038         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
3039         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
3040         dbus-glib-tool.h.
3041
3042         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
3043         of using GClosureMarshal directly.
3044         (struct DBusGObjectInfo): Add n_infos member.
3045
3046         * test/glib/test-service-glib.xml: New file; contains introspection data
3047         for MyTestObject used in test-service-glib.c.
3048
3049         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
3050         (my_object_do_nothing, my_object_increment, my_object_throw_error)
3051         (my_object_uppercase, my_object_many_args): New test methods.
3052         (main): Use dbus_g_object_class_install_info to include generated object
3053         info.
3054
3055         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
3056         as well as client-side bindings.
3057
3058         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
3059         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
3060         using both the dbus_gproxy stuff directly as well as the generated bindings.
3061
3062 2005-02-15  Havoc Pennington  <hp@redhat.com>
3063
3064         * dbus/dbus-connection.c (dbus_connection_dispatch): always
3065         complete a pending call, don't run filters first.
3066
3067         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
3068         dbus_pending_call_steal_reply
3069
3070         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
3071         _dbus_connection_block_pending_call
3072         (dbus_pending_call_get_reply): change to steal_reply and return a
3073         ref
3074
3075         * dbus/dbus-connection.c
3076         (dbus_connection_send_with_reply_and_block): port to work in terms
3077         of DBusPendingCall
3078         (_dbus_connection_block_pending_call): replace block_for_reply
3079         with this
3080
3081 2005-02-14  Havoc Pennington  <hp@redhat.com>
3082
3083         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
3084         properly handle looking up group information by name; fix 
3085         from j@bootlab.org
3086
3087 2005-02-13  Havoc Pennington  <hp@redhat.com>
3088
3089         * dbus/dbus-connection.c (dbus_connection_return_message) 
3090         (dbus_connection_borrow_message): hold dispatch lock while message
3091         is outstanding
3092         (_dbus_connection_block_for_reply): hold dispatch lock while we
3093         block for the reply, so nobody steals our reply
3094         (dbus_connection_pop_message): hold the dispatch lock while we
3095         pluck the message
3096
3097 2005-02-13  Havoc Pennington  <hp@redhat.com>
3098
3099         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
3100         (_dbus_connection_release_dispatch)
3101         (_dbus_connection_acquire_io_path)
3102         (_dbus_connection_release_io_path): make the mutex and condvar
3103         control access to the "acquired" flag. Drop the connection lock
3104         while waiting on the condvar. Hopefully these are baby steps in
3105         roughly the right direction.
3106
3107 2005-02-13  Havoc Pennington  <hp@redhat.com>
3108
3109         * dbus/dbus-connection.c: use separate mutexes for the condition
3110         variables; this is some kind of baseline for sanity, but the
3111         condition variables still aren't used correctly afaict
3112
3113 2005-02-13  Havoc Pennington  <hp@redhat.com>
3114
3115         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3116         fix a double-unlock
3117
3118         * dbus/dbus-connection.c
3119         (_dbus_connection_detach_pending_call_unlocked): add this
3120
3121         Initial semi-correct pass through to fix thread locking; there are
3122         still some issues with the condition variable paths I'm pretty
3123         sure
3124         
3125         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
3126         lock/unlock calls
3127
3128         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
3129         rename to add _unlocked
3130         (struct DBusConnection): move "dispatch_acquired" and
3131         "io_path_acquired" to use only one bit each.
3132         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
3133         (dbus_connection_set_watch_functions): hacky fix to reentrancy
3134         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
3135         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
3136         (_dbus_connection_remove_timeout) 
3137         (_dbus_connection_toggle_timeout): drop lock when calling out to
3138         user functions; done in a hacky/bad way.
3139         (_dbus_connection_send_and_unlock): add a missing unlock
3140         (_dbus_connection_block_for_reply): add a missing unlock
3141
3142         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
3143         drop lock in a hacky probably unsafe way to call out to user
3144         function
3145
3146 2005-02-12  Havoc Pennington  <hp@redhat.com>
3147
3148         * tools/dbus-tree-view.c (info_set_func_text): display more
3149         details on args
3150
3151         * bus/driver.c (bus_driver_handle_list_services): list the bus
3152         driver
3153
3154         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
3155
3156         * glib/dbus-gidl.c (signal_info_get_n_args): new function
3157         (method_info_get_n_args): new function
3158
3159 2005-02-12  Havoc Pennington  <hp@redhat.com>
3160
3161         * bus/driver.c (bus_driver_handle_introspect): add introspection
3162         for bus driver
3163
3164 2005-02-12  Havoc Pennington  <hp@redhat.com>
3165
3166         * bus/driver.c: put the signature of each bus driver method in the
3167         table of handlers and check it on incoming calls; this isn't
3168         really useful, but going to add introspect support in a minute.
3169
3170 2005-02-11  Joe Shaw  <joeshaw@novell.com>
3171
3172         * mono/Connection.cs: The unpredictability of finalizers in mono
3173         prevents us from deterministically disconnecting the filters from
3174         the Service class's finalizer, so move tracking of filters and
3175         matches here.  Add API for that.
3176
3177         * mono/Service.cs: Remove the code, add code which calls the
3178         methods now on the Connection class.
3179
3180 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
3181
3182         * python/dbus.py (class Sender): added to support dbus signals better
3183         (Bus::add_signal_receiver): added expand_args parameter which defaults
3184         to True.  When expand args is True the signal handler will pass the 
3185         message arguments as parameters to the signal handler.  If False
3186         revert to previous behavior where the signal handler must get the
3187         argument list from the message.  This is to help port applications
3188         like HAL that have a tendancy to send variable length argument lists.
3189         self._match_rule_to_receivers is now a dict of dicts.
3190         (Bus::remove_signal_receiver): pop handler off the dict intead of 
3191         removing it from a list
3192         (Bus::_signal_func): change signal handlers so that interface,
3193         signal_name, service, path and message are packed into a Sender
3194         object and that is passed to the handler.  If expand_args is True
3195         extract the args list from the message and append it to the parameter
3196         list
3197         
3198         * python/dbus_bindings.pyx.in (class Signature): added to support 
3199         signiature types
3200         (MessageIter::__init__): changed iteration limit to match D-BUS
3201         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
3202         STRUCT and VARIENT type support
3203         (MessageIter::python_value_to_dbus_sig): made recursive to support
3204         recursive types
3205         (MessageIter::append*): added Signature, dict, tuple 
3206         support
3207
3208         * python/examples/example-client.py: added examples of getting tuples
3209         and dicts
3210
3211         * python/examples/example-service.py: added examples of sending tuples
3212         and dicts
3213
3214         * python/examples/example-signal-recipient.py: Fixed to handle new
3215         signal callback format
3216
3217 2005-02-10  Havoc Pennington  <hp@redhat.com>
3218
3219         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
3220         (call dbus_g_proxy_add_signal)
3221
3222         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3223         escape the hostname
3224         (_dbus_server_new_for_domain_socket): escape the path
3225
3226         * dbus/dbus-address.c (dbus_address_escape_value): new
3227         (dbus_address_unescape_value): new
3228         (dbus_parse_address): unescape values
3229
3230         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
3231
3232         * doc/dbus-specification.xml: explain how to escape values in
3233         addresses
3234
3235 2005-02-10  Havoc Pennington  <hp@redhat.com>
3236
3237         * dbus/dbus-message-factory.c (generate_special): modify test to
3238         avoid using a non-basic dict key
3239
3240         * dbus/dbus-marshal-validate-util.c: add test for the below
3241
3242         * doc/dbus-specification.xml: require that dict keys are a basic
3243         type
3244
3245         * dbus/dbus-marshal-validate.c
3246         (_dbus_validate_signature_with_reason): require that dict key is a
3247         basic type
3248
3249 2005-02-10  Havoc Pennington  <hp@redhat.com>
3250
3251         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3252         change to be _and_unlock instead of _unlocked
3253
3254         * dbus/dbus-connection.c
3255         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
3256         have no_update so we can find this bug quickly in future
3257
3258 2005-02-10  Havoc Pennington  <hp@redhat.com>
3259
3260         * dbus/dbus-message-util.c (verify_test_message): tests for string
3261         array
3262
3263         * dbus/dbus-message.c (dbus_message_append_args_valist): add
3264         support for arrays of string/signature/path
3265
3266 2005-02-10  Joe Shaw  <joeshaw@novell.com>
3267
3268         * dbus/dbus-connection.c
3269         (_dbus_connection_queue_received_message_link,
3270         _dbus_connection_message_sent): Add the path to
3271         the verbose output.
3272         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
3273         _dbus_connection_send_preallocated_unlocked(), updated the
3274         dispatch status, and unlocks.  Fixes a bug where certain
3275         situations (like a broken pipe) could cause a Disconnect message
3276         to not be sent, tricking the bus into thinking a service was still
3277         there when the process had quit.
3278         (_dbus_connection_send_preallocated): Call
3279         _dbus_connection_send_preallocated_and_unlock().
3280         (_dbus_connection_send_and_unlock): Added.  Calls
3281         _dbus_connection_send_preallocated_and_unlock().
3282         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
3283         (dbus_connection_send_with_reply): Update the dispatch status and
3284         unlock.
3285
3286         * mono/Service.cs (~Service): Added.  Removes the filter so that
3287         we don't get unmanaged code calling back into a GCed delegate.
3288         (RemoveFilter); Added.
3289
3290 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
3291
3292         * dbus/dbus-message.c (dbus_message_iter_open_container):
3293         - Removed check for iterator type being an array because
3294         get_arg_type does not work with writer iterators
3295         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
3296
3297 2005-02-07  Havoc Pennington  <hp@redhat.com>
3298
3299         * doc/dbus-specification.xml: some more language cleanups; add
3300         stuff about how to deal with invalid protocol and extension
3301         points; add _ to allowed chars in auth commands; add EXTENSION_
3302         auth command prefix
3303
3304 2005-02-06  Havoc Pennington  <hp@redhat.com>
3305
3306         * s/expected/required/ in a couple places for clarity
3307
3308 2005-02-07  Colin Walters  <walters@verbum.org>
3309
3310         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
3311         sender or proposed_recipient.
3312
3313 2005-02-06  Havoc Pennington  <hp@redhat.com>
3314
3315         * dbus/dbus-message-factory.c (generate_special): more tests
3316
3317         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
3318         array length that exceeds the maximum
3319
3320 2005-02-05  Havoc Pennington  <hp@redhat.com>
3321
3322         * dbus/dbus-message-factory.c (generate_special): more test cases,
3323         increasing coverage
3324
3325         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
3326         reason why a signature was invalid
3327
3328         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
3329         skip the length of the string before we look at it in validation
3330
3331         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
3332         equal_substring
3333
3334         * dbus/dbus-message.c (_dbus_message_loader_new): default
3335         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
3336
3337 2005-02-05  Havoc Pennington  <hp@redhat.com>
3338
3339         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
3340         if the signature of a variant was empty
3341         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
3342         struct with no element type)
3343
3344         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
3345         mangled messages to break things
3346
3347 2005-02-04  Havoc Pennington  <hp@redhat.com>
3348
3349         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
3350         g_quark_try_string() so it actually can return 0
3351         (dbus_g_proxy_connect_signal): ditto
3352
3353 2005-02-04  Havoc Pennington  <hp@redhat.com>
3354
3355         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
3356         bogus warning
3357         (tristring_from_message): assert cleanly on null path/interface
3358         (should not be possible though I decided later)
3359         (dbus_g_proxy_dispose): move proxy manager unregistration here
3360         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
3361         g_return_if_fail() checks
3362
3363 2005-02-04  Havoc Pennington  <hp@redhat.com>
3364
3365         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
3366
3367         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
3368         (with some minor changes)
3369
3370         * doc/dbus-specification.xml: add deprecated attribute to
3371         introspection format
3372
3373 2005-01-31  Havoc Pennington  <hp@redhat.com>
3374
3375         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
3376         think it's sort of right
3377
3378 2005-01-30  Havoc Pennington  <hp@redhat.com>
3379
3380         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
3381
3382 2005-01-30  Havoc Pennington  <hp@redhat.com>
3383
3384         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
3385
3386         * autogen.sh: change to autotools 1.9
3387
3388         * glib/dbus-gproxy.c: completely change how signals work
3389         (dbus_g_proxy_add_signal): new function to specify signature of a
3390         signal
3391         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
3392         and g_warning if the incoming message has the wrong signature.
3393
3394 2005-01-30  Havoc Pennington  <hp@redhat.com>
3395
3396         * tools/dbus-names-model.c (have_names_notify): fix this
3397
3398         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
3399         up the string array handling a bit 
3400
3401 2005-01-30  Havoc Pennington  <hp@redhat.com>
3402
3403         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
3404         (dbus_g_pending_call_cancel): new function
3405
3406         * dbus/dbus-glib.h: move GType decls for connection/message here;
3407         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
3408         here, just kind of rationalizing how we handle all that
3409
3410         * tools/dbus-names-model.c: new file for a tree model listing the
3411         services on a bus
3412
3413         * tools/dbus-tree-view.c (model_new): use proper typing on the
3414         model rows
3415
3416 2005-01-30  Havoc Pennington  <hp@redhat.com>
3417
3418         * glib/dbus-gmain.c: add a custom GSource back that just checks
3419         whether the message queue has anything in it; otherwise, there are 
3420         cases where we won't see messages in the queue since there was no 
3421         IO visible to the glib main loop
3422
3423         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
3424         increase default message timeout to 25 seconds
3425
3426 2005-01-30  Havoc Pennington  <hp@redhat.com>
3427
3428         * test/glib/test-profile.c (no_bus_stop_server): remove the
3429         warning about the g_warning that I just fixed
3430
3431         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
3432         custom source, seems to be a lot easier to understand and work
3433         better.
3434
3435 2005-01-30  Havoc Pennington  <hp@redhat.com>
3436
3437         I think this main loop thing is conceptually broken, but here are 
3438         some band aids. I'll maybe rewrite it in a minute.
3439         
3440         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
3441         custom GSource, so don't pass it in; confusing
3442         (gsource_server_finalize, gsource_connection_finalize): add
3443         finalize handlers that remove all the watches.  
3444
3445 2005-01-30  Havoc Pennington  <hp@redhat.com>
3446
3447         * glib/dbus-gobject.c (introspect_properties): fix the XML
3448         generated
3449
3450         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
3451         which effectively detects the use of freed messages
3452
3453         * glib/dbus-gobject.c (handle_introspect): modify and return the
3454         reply message instead of the incoming message
3455
3456         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
3457         gee, maybe it should SEND THE XML instead of just making a string
3458         and freeing it again ;-)
3459
3460         * tools/dbus-print-message.c (print_message): improve printing of
3461         messages
3462
3463         * configure.in: add debug-glib.service to the output
3464
3465 2005-01-30  Havoc Pennington  <hp@redhat.com>
3466
3467         dbus-viewer introspected and displayed the bus driver
3468         
3469         * dbus/dbus-object-tree.c 
3470         (object_tree_test_iteration): add tests for a handler registered on "/"
3471
3472         * dbus/dbus-object-tree.c
3473         (_dbus_decompose_path): fix to handle path "/" properly
3474         (run_decompose_tests): add tests for path decomposition
3475         
3476         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
3477         properly
3478
3479         * glib/dbus-gobject.c (handle_introspect): fix quotes
3480
3481         * test/glib/run-test.sh: support launching the bus, then running
3482         dbus-viewer
3483
3484         * test/glib/test-service-glib.c (main): put in a trivial gobject
3485         subclass and register it on the connection
3486
3487         * bus/driver.c (bus_driver_handle_introspect): implement
3488         introspection of the bus driver service
3489
3490         * dbus/dbus-protocol.h: add #defines for the XML namespace,
3491         identifiers, doctype decl
3492
3493         * bus/driver.c (bus_driver_handle_get_service_owner): handle
3494         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
3495         returning the service unchanged.
3496         (bus_driver_handle_message): remove old check for reply_serial in
3497         method calls, now the message type deals with that
3498         (bus_driver_handle_message): handle NULL interface
3499
3500         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
3501
3502         * glib/dbus-gloader-expat.c (description_load_from_string): allow
3503         -1 for len
3504
3505         * tools/dbus-viewer.c: add support for introspecting a service on
3506         a bus
3507
3508         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
3509         (dbus_g_pending_call_unref): add
3510
3511 2005-01-29  Havoc Pennington  <hp@redhat.com>
3512
3513         * tools/dbus-tree-view.c: add support for displaying properties.
3514         (run dbus-viewer with an introspect xml file as arg, then resize
3515         the window so the tree elements show up, not sure what that is)
3516
3517         * glib/dbus-gobject.c (handle_introspect): return
3518         org.freedesktop.Properties and org.freedesktop.Introspectable
3519         interfaces when we are introspected.
3520
3521         * doc/dbus-specification.xml: allow empty interface name when 
3522         Get/Set a property
3523
3524 2005-01-29  Havoc Pennington  <hp@redhat.com>
3525
3526         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
3527         though it uses glib, it could be extended for any binding in
3528         principle
3529
3530         * glib/dbus-gobject.c (gobject_message_function): change to the
3531         new way properties work
3532
3533         * dbus/dbus-protocol.h: add the new interfaces
3534
3535         * doc/dbus-specification.xml: document the introspection format,
3536         Introspectable interface, and add an org.freedesktop.Properties
3537         interface.
3538
3539         * glib/dbus-gparser.c: add support for a <property> element
3540
3541         * glib/dbus-gidl.c: add PropertyInfo
3542
3543         * glib/dbus-gobject.c (handle_introspect): put the outermost
3544         <node> outside the signal and property descriptions.
3545         (introspect_properties): export properties as <property> rather
3546         than as method calls
3547
3548 2005-01-28  Havoc Pennington  <hp@redhat.com>
3549
3550         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
3551         related to authentication protocol
3552
3553 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
3554
3555         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
3556                 - BUS_ACTIVATION -> BUS_STARTER
3557                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
3558                 - class MessageIter (__init__): Added recursion checking 
3559                 so we throw a nice error instead of just disconnecting from the
3560                 bus.
3561                 (get): Added arg_type parameter for recursion.
3562                 Removed the nil type
3563                 Added signiture type placeholder (not implemented)
3564                 Added struct type placeholder (not implemented)
3565                 Added varient type placeholder (not implemented)
3566                 Commented out dict type for now     
3567                 (get_element_type): renamed from get_array_type
3568                 (get_*): changed to use the dbus_message_iter_get_basic API
3569                 (get_*_array): removed in favor of recursive get_array method
3570                 (get_array): new recursive method which calls get to marshal
3571                 the elements of the array
3572                 (value_to_dbus_sig): New method returns the corrasponding
3573                 dbus signiture to a python value
3574                 (append): Comment out dict handling for now
3575                 Handle lists with the new recursive API
3576                 Comment out None handling for now
3577                 (append_nil): removed
3578                 (append_*): changed to use dbus_message_iter_append_basic API
3579                 (append_*_array): removed in favor of recursive append_array 
3580                 method
3581                 (__str__): Make it easier to print out recursive iterators
3582                 for debugging
3583                 - class Message (__str__): moved type inspection to the
3584                 MessageIter class' __str__ method
3585                 (get_iter): Added an append parameter wich defaults to False
3586                 If True use the new API's to create an append iterator
3587
3588         * python/dbus.py: Update to use new bindings API
3589                 - TYPE_ACTIVATION -> TYPE_STARTER
3590                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
3591                 - class ActivationBus -> class StarterBus
3592                 - class RemoteObject (__call__): get an append iterator
3593                 - (_dispatch_dbus_method_call): get an append iterator
3594                 - class Object (emit_signal): get an append iterator
3595
3596         * python/examples/: Fixed up the examples to work with the new API
3597                 
3598 2005-01-28  Joe Shaw  <joeshaw@novell.com>
3599
3600         * configure.in: Bump version up to 0.30.
3601
3602         * HACKING: Add a release item to bump the version number up after 
3603         a release.
3604
3605 2005-01-28  Havoc Pennington  <hp@redhat.com>
3606
3607         * doc/dbus-specification.xml: update to describe 16-bit types and
3608         dict entries
3609
3610         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
3611         assertion
3612
3613         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
3614         type
3615
3616         * dbus/dbus-marshal-recursive.c: implement
3617
3618 2005-01-27  Havoc Pennington  <hp@redhat.com>
3619
3620         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
3621
3622         * configure.in: find the right type for 16 and 32 bit ints as well
3623         as 64
3624
3625         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
3626         the 16-bit types so people don't have to stuff them in 32-bit or
3627         byte arrays.
3628
3629 2005-01-27  Havoc Pennington  <hp@redhat.com>
3630
3631         * dbus/dbus-message.c: byteswap the message if you init an
3632         iterator to read/write from it
3633         
3634         * dbus/dbus-marshal-byteswap.c: new file implementing 
3635         _dbus_marshal_byteswap()
3636
3637         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
3638
3639 2005-01-26  Havoc Pennington  <hp@redhat.com>
3640         
3641         * dbus/dbus-marshal-validate-util.c: break this out (and fix
3642         build, apparently - nobody noticed?)
3643         
3644 2005-01-26  Havoc Pennington  <hp@redhat.com>
3645
3646         * dbus/dbus-marshal-recursive.h: remove todo comment
3647
3648 2005-01-25  Joe Shaw  <joeshaw@novell.com>
3649
3650         * Land the mono binding changes to conform to the new APIs.
3651
3652         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
3653         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
3654
3655         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
3656         type code as a string.
3657         (InitAppending): Rename dbus_message_append_iter_init() to
3658         dbus_message_iter_init_append().
3659
3660         * mono/BusDriver.cs: Rename ServiceEventHandler to
3661         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
3662         Rename ServiceOwnerChanged to NameOwnerChanged.
3663
3664         * mono/Connection.cs: Rename BaseService to UniqueName, and the
3665         underlying C call.
3666
3667         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
3668
3669         * mono/Service.cs: Rename Exists to HasOwner, internally rename
3670         dbus_bus_acquire_service() to dbus_bus_request_name().
3671
3672         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
3673         of Type.UnderlyingSystemType to get the correct element type for
3674         the array.
3675         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
3676         dbus_message_get_{element|arg}_type() instead of
3677         dbus_message_iter_init_array_iterator().
3678         (Append): Replace dbus_message_iter_append_array() with
3679         dbus_message_iter_open_container() and
3680         dbus_message_iter_close_container().
3681
3682         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
3683         types have been removed.
3684         
3685         * mono/DBusType/*.cs: Replace calls of
3686         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
3687         but specify the type in the DllImport extern declaration.  Ditto
3688         for dbus_message_iter_append_[type]() ->
3689         dbus_message_iter_append_basic().
3690
3691         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
3692         NameOwnerChangedHandler.
3693
3694 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
3695
3696         * python/dbus_bindings.pyx.in: Rename of methods and bindings
3697                 - get_base_service -> get_unique_name
3698                 - bus_get_base_service -> bus_get_unique_name
3699                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
3700                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
3701                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
3702                 - bus_activate_service -> bus_start_service_by_name
3703                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
3704                 - bus_acquire_service -> bus_request_name
3705                 - dbus_bus_acquire_service -> dbus_bus_request_name
3706                 - bus_service_exists -> bus_name_has_owner
3707                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
3708
3709         * python/dbus.py: Rename of methods
3710                 - activate_service -> start_service_by_name
3711                 - bus_acquire_service -> bus_request_name
3712                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
3713                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
3714
3715         
3716 2005-01-24  Joe Shaw  <joeshaw@novell.com>
3717
3718         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
3719         signature for the method that can't be found.
3720
3721         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
3722         the message has any arguments, we need to call
3723         _dbus_type_reader_get_current_type(), not
3724         _dbus_type_reader_has_next().
3725
3726 2005-01-24  Havoc Pennington  <hp@redhat.com>
3727
3728         * dbus/dbus-message-factory.c: more testing of message validation
3729
3730         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
3731         header
3732
3733 2005-01-23  Havoc Pennington  <hp@redhat.com>
3734
3735         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
3736         get this all working, not many tests in the framework yet though
3737
3738 2005-01-22  Havoc Pennington  <hp@redhat.com>
3739
3740         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
3741         tutorial, based on work from David Wheeler.
3742
3743 2005-01-21  Havoc Pennington  <hp@redhat.com>
3744
3745         * dbus/dbus-bus.c: add more return_if_fail checks
3746
3747         * dbus/dbus-message.c (load_message): have the "no validation"
3748         mode (have to edit the code to toggle the mode for now though)
3749
3750         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
3751         skips all validation; I want to use this at least for benchmark
3752         baseline, I'm not sure if it should be a publicly-available switch.
3753
3754 2005-01-21  Havoc Pennington  <hp@redhat.com>
3755
3756         * glib/dbus-gmain.c: don't put the GLib bindings in the same
3757         toplevel doxygen group as the low-level API stuff
3758
3759         * dbus/dbus.h: note that libdbus is the low-level API
3760
3761 2005-01-20  Havoc Pennington  <hp@redhat.com>
3762
3763         * update-dbus-docs.sh: script to update docs on the web site, only
3764         works for me though. neener.
3765
3766 2005-01-20  Havoc Pennington  <hp@redhat.com>
3767
3768         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
3769         code can reveal bugs in it
3770
3771 2005-01-20  Havoc Pennington  <hp@redhat.com>
3772
3773         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
3774         select() version, patches from Tor Lillqvist
3775
3776 2005-01-20  Havoc Pennington  <hp@redhat.com>
3777
3778         * doc/dbus-tutorial.xml: replace > with &gt;
3779
3780         * bus/services.c (bus_registry_acquire_service): validate the name
3781         and return a better error if it's no good.
3782
3783         * doc/dbus-specification.xml: note NO_AUTO_START change
3784
3785         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
3786         from AUTO_START, we're toggling the default
3787
3788         * bus/dispatch.c: adapt the tests to change of auto-start default
3789
3790 2005-01-18  Havoc Pennington  <hp@redhat.com>
3791
3792         * rename dbus-daemon-1 to dbus-daemon throughout
3793
3794 2005-01-18  Havoc Pennington  <hp@redhat.com>
3795
3796         * Throughout, grand renaming to strip out the use of "service",
3797         just say "name" instead (or "bus name" when ambiguous).  Did not
3798         change the internal code of the message bus itself, only the
3799         programmer-facing API and messages.
3800         
3801         * doc/dbus-specification.xml: further update the message bus section
3802         
3803         * bus/config-parser.c (all_are_equiv): fix bug using freed string
3804         in error case
3805
3806 2005-01-17  Havoc Pennington  <hp@redhat.com>
3807
3808         * dbus/dbus-types.h: remove 16-bit types since we don't use them
3809         ever
3810
3811         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
3812         "invalid name character" not only non-ASCII
3813
3814         * doc/dbus-specification.xml: further update spec, message bus 
3815         parts are still out-of-date but the marshaling etc. stuff is now
3816         accurate-ish
3817
3818 2005-01-17  Havoc Pennington  <hp@redhat.com>
3819
3820         * doc/dbus-specification.xml: partially update spec
3821
3822 2005-01-17  Havoc Pennington  <hp@redhat.com>
3823
3824         * Throughout, align variant bodies according to the contained
3825         type, rather than always to 8. Should save a fair bit of space in
3826         message headers.
3827         
3828         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
3829         fix handling of case where p == end
3830
3831         * doc/TODO: remove the dbus_bool_t item and variant alignment items
3832
3833 2005-01-17  Havoc Pennington  <hp@redhat.com>
3834
3835         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
3836
3837         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
3838         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
3839         are marshaling/unmarshaling a boolean.
3840
3841 2005-01-16  Havoc Pennington  <hp@redhat.com>
3842
3843         This is about it on what can be disabled/deleted from libdbus
3844         easily, back below 150K anyhow. Deeper cuts are more work than 
3845         just turning the code off as I've done here.
3846         
3847         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
3848         signed int convenience funcs
3849
3850         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
3851         verbose mode
3852
3853         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
3854         things out of libdbus
3855
3856         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
3857         
3858         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
3859         tests-enabled-only, though it should probably be deleted)
3860
3861         * dbus/dbus-message-util.c: same stuff
3862
3863         * dbus/dbus-auth-util.c: same stuff
3864
3865 2005-01-16  Havoc Pennington  <hp@redhat.com>
3866
3867         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
3868
3869         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
3870         way for stripping down dbus-userdb.c stuff included in libdbus.
3871         Rename _dbus_parse_uid for consistency.
3872
3873 2005-01-16  Havoc Pennington  <hp@redhat.com>
3874
3875         * dbus/dbus-internals.c (_dbus_real_assert): print the function
3876         name the assertion failed in
3877
3878         * dbus/dbus-internals.h (_dbus_return_if_fail) 
3879         (_dbus_return_val_if_fail): assert that the name of the function
3880         containing the check doesn't start with '_', since we only want to 
3881         use checks on public functions
3882         
3883         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
3884         checks to assertions
3885
3886         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
3887         change checks to asserts for private function
3888
3889         * dbus/dbus-message.c (_dbus_message_set_serial): checks
3890         to asserts for private function
3891
3892         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
3893         broken assertion that was breaking make check
3894         (_dbus_type_reader_array_is_empty): remove this rather than fix
3895         it, was only used in assertions
3896
3897 2005-01-16  Havoc Pennington  <hp@redhat.com>
3898
3899         * test/unused-code-gc.py: hacky script to find code that's used
3900         only by the bus (not libdbus) or used only by tests or not used at
3901         all. It has some false alarms, but looks like we can clean up a
3902         lot of size from libdbus.
3903
3904         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
3905         dbus/Makefile.am: initially move 10K of binary size out of libdbus
3906         
3907 2005-01-16  Havoc Pennington  <hp@redhat.com>
3908
3909         * Add and fix docs according to Doxygen warnings throughout
3910         source.
3911         
3912         * dbus/dbus-marshal-recursive.c
3913         (_dbus_type_reader_array_is_empty): change this to just call
3914         array_reader_get_array_len() and make it static
3915
3916         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
3917         from get_array_type
3918         (dbus_message_iter_init_append): rename from append_iter_init
3919
3920         * dbus/dbus-marshal-recursive.c
3921         (_dbus_type_reader_get_element_type): rename from
3922         _dbus_type_reader_get_array_type
3923
3924 2005-01-15  Havoc Pennington  <hp@redhat.com>
3925
3926         * test/glib/test-profile.c (with_bus_server_filter): fix crash
3927
3928         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
3929         when DBUS_DISABLE_ASSERT
3930         (_dbus_marshal_set_basic): be sure we align for the string length
3931
3932         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
3933         this look faster
3934
3935         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
3936         inline macro version
3937         (_dbus_string_set_byte): provide inline macro version
3938
3939 2005-01-15  Havoc Pennington  <hp@redhat.com>
3940
3941         * Land the new message args API and type system.
3942
3943         This patch is huge, but the public API change is not 
3944         really large. The set of D-BUS types has changed somewhat, 
3945         and the arg "getters" are more geared toward language bindings;
3946         they don't make a copy, etc.
3947
3948         There are also some known issues. See these emails for details
3949         on this huge patch:
3950         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
3951         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
3952         
3953         * dbus/dbus-marshal-*: all the new stuff
3954
3955         * dbus/dbus-message.c: basically rewritten
3956
3957         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
3958         freed blocks to be all non-nul bytes so using freed memory is less
3959         likely to work right
3960
3961         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
3962         DBUS_FAIL_MALLOC=N environment variable, so you can do
3963         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
3964         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
3965         thorough.
3966
3967         * qt/message.cpp: port to the new message args API
3968         (operator<<): use str.utf8() rather than str.unicode()
3969         (pretty sure this is right from the Qt docs?)
3970
3971         * glib/dbus-gvalue.c: port to the new message args API
3972
3973         * bus/dispatch.c, bus/driver.c: port to the new message args API
3974
3975         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
3976         "locked" flag to TRUE and align_offset to 0; I guess we never
3977         looked at these anyhow, but seems cleaner.
3978
3979         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
3980         move allocation padding macro to this header; use it to implement
3981         (_DBUS_STRING_STATIC): ability to declare a static string.
3982
3983         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
3984         change to return TRUE if the interface is not set.
3985
3986         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
3987         to dbus-marshal-validate.[hc]
3988
3989         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
3990         dbus-internals.c
3991
3992         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
3993         to dbus-marshal-*.[hc]
3994
3995         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
3996         function here from dbus-marshal.c
3997
3998 2005-01-12  Joe Shaw  <joeshaw@novell.com>
3999
4000         * NEWS: Update for 0.23.
4001
4002         * configure.in: Release 0.23.
4003
4004 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4005
4006         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
4007         dbus DLL with --debug.  Clean up after the .mdb files this leaves
4008         behind.
4009
4010         * mono/doc/Makefile.am: Need to uninstall the docs on "make
4011         uninstall"
4012
4013         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
4014         is an enum, get the enum's underlying type.  Another mono
4015         1.1.3 fix.
4016
4017 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4018
4019         Patch from Sjoerd Simons <sjoerd@luon.net>
4020
4021         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
4022         DESTDIR.  It breaks stuff.
4023
4024 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4025
4026         Patch from Tambet Ingo <tambet@ximian.com>
4027
4028         * mono/DBusType/Array.cs (Get): Get the underlying element type by
4029         calling type.GetElementType().  The code previously depended on
4030         broken Mono behavior, which was fixed in Mono 1.1.3.
4031
4032         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
4033         Activator.CreateInstance() so that the class's constructor is
4034         called with the right parameters.
4035
4036 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4037
4038         Patch from Timo Teräs <ext-timo.teras@nokia.com>
4039
4040         * dbus/dbus-connection.c
4041         (_dbus_connection_queue_received_message_link): Call
4042         _dbus_connection_remove_timeout() instead of the _locked()
4043         variant, since it's always called from
4044         _dbus_connection_handle_watch(), which handles the locking.
4045         Removed the _locked() variant since it's no longer used.
4046
4047 2005-01-03  Havoc Pennington  <hp@redhat.com>
4048
4049         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
4050         return
4051         
4052 2004-12-26  Havoc Pennington  <hp@redhat.com>
4053
4054         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
4055
4056 2005-01-03  Havoc Pennington  <hp@redhat.com>
4057
4058         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
4059         floating point
4060
4061         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
4062
4063 2005-01-02  Havoc Pennington  <hp@redhat.com>
4064
4065         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
4066
4067 2005-01-01  Havoc Pennington  <hp@redhat.com>
4068
4069         * configure.in: add -Wfloat-equal
4070
4071 2005-01-01  Havoc Pennington  <hp@redhat.com>
4072
4073         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
4074         for a variety of reasons '==' doesn't do this.
4075
4076 2004-12-31  Havoc Pennington  <hp@redhat.com>
4077
4078         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
4079         I keep wishing I had
4080
4081 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4082
4083         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
4084
4085 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4086
4087         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
4088         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
4089         dbus-protocol.h.  Because they are defines and not enums they are not
4090         autogenerated.
4091
4092 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
4093
4094         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
4095         dbus_bus_activate_service
4096
4097         * python/dbus.py (Bus.activate_service): activate a service on the
4098         bus.
4099
4100 2004-12-24  Havoc Pennington  <hp@redhat.com>
4101
4102         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
4103         file format has also changed and I haven't adapted to that yet
4104         
4105         * Makefile.am: load .gcno files from latest gcc
4106
4107 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
4108         * Patch from Rob Taylor <robtaylor@fastmail.fm>
4109
4110         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
4111         lowlevel binding
4112
4113         * python/dbus.py (get_unix_user): Added binding to 
4114         call dbus_bindings.bus_get_unix_user
4115
4116         * python/extract.py: Modified the proto_pat regex to
4117         handle unsigned long
4118
4119 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4120
4121         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
4122         better POSIX compliance.
4123
4124 2004-12-19  Havoc Pennington  <hp@redhat.com>
4125
4126         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
4127         (_dbus_string_insert_8_aligned): new functions
4128
4129         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
4130
4131 2004-12-18  Havoc Pennington  <hp@redhat.com>
4132
4133         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
4134         macro
4135
4136         * dbus/dbus-message.c: fix a comment, and add a still-unused
4137         not-implemented function
4138
4139         * dbus/dbus-marshal.h: fix comment
4140
4141         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
4142
4143 2004-12-17  Joe Shaw  <joeshaw@novell.com>
4144
4145         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
4146         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
4147         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
4148         Type.UnderlyingSystemType to get the actual system type
4149         underneath.  This code previously depended on the broken Mono
4150         behavior, which was fixed in 1.1.3.
4151
4152 2004-11-27  Havoc Pennington  <hp@redhat.com>
4153
4154         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
4155         are disabled
4156         (_dbus_string_get_const_data): inline when asserts are disabled
4157
4158         * dbus/dbus-message.c: record the _dbus_current_generation of
4159         creation so we can complain if dbus_shutdown() is used improperly.
4160         Do this only if checks are enabled.
4161
4162         * dbus/dbus-connection.c: ditto
4163         
4164 2004-11-26  Havoc Pennington  <hp@redhat.com>
4165
4166         * test/glib/test-profile.c: add with_bus mode to profile echoes
4167         that go through the bus.
4168
4169         * test/glib/run-test.sh: add ability to run test-profile
4170
4171         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
4172         config file reload.
4173
4174 2004-11-26  Havoc Pennington  <hp@redhat.com>
4175
4176         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
4177         thing was implemented
4178
4179 2004-11-26  Havoc Pennington  <hp@redhat.com>
4180
4181         * test/glib/test-profile.c: tweak a bit, add support for some
4182         made-up minimal malloc overhead with plain sockets, since in 
4183         real life some sort of buffers are unavoidable thus we could 
4184         count them in the theoretical best case
4185
4186 2004-11-26  Havoc Pennington  <hp@redhat.com>
4187
4188         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
4189         where I was trying to cache one too many messages
4190
4191 2004-11-26  Havoc Pennington  <hp@redhat.com>
4192
4193         * dbus/dbus-message.c: reimplement message cache as an array which 
4194         makes the cache about twice as fast and saves maybe 1.5% overall
4195
4196 2004-11-26  Havoc Pennington  <hp@redhat.com>
4197
4198         * dbus/dbus-threads.c (init_global_locks): forgot to put the
4199         message cache lock here
4200
4201 2004-11-26  Havoc Pennington  <hp@redhat.com>
4202
4203         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
4204         the "char byte_order" next to each other to save 4 bytes
4205         (dbus_message_new_empty_header): reduce preallocation, since the
4206         message cache should achieve a similar effect
4207         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
4208         message cache that keeps a few DBusMessage around in a pool,
4209         another 8% speedup or so.
4210
4211         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
4212
4213 2004-11-25  Havoc Pennington  <hp@redhat.com>
4214
4215         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
4216         to write, without reading or blocking, try it before the poll()
4217         and skip the poll() if nothing remains to write. This is about a
4218         3% speedup in the echo client/server
4219
4220 2004-11-25  Havoc Pennington  <hp@redhat.com>
4221
4222         The primary change here is to always write() once before adding
4223         the write watch, which gives us about a 10% performance increase.
4224         
4225         * dbus/dbus-transport-unix.c: a number of modifications to cope
4226         with removing messages_pending
4227         (check_write_watch): properly handle
4228         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
4229         messages_pending stuff
4230         (check_read_watch): properly handle WAITING_FOR_MEMORY and
4231         AUTHENTICATED cases
4232         (unix_handle_watch): after writing, see if the write watch can be
4233         removed
4234         (unix_do_iteration): assert that write_watch/read_watch are
4235         non-NULL rather than testing that they aren't, since they 
4236         aren't allowed to be NULL. check_write_watch() at the end so 
4237         we add the watch if we did not finish writing (e.g. got EAGAIN)
4238
4239         * dbus/dbus-transport-protected.h: remove messages_pending call,
4240         since it resulted in too much inefficient watch adding/removing; 
4241         instead we now require that the transport user does an iteration 
4242         after queueing outgoing messages, and after trying the first
4243         write() we add a write watch if we got EAGAIN or exceeded our 
4244         max bytes to write per iteration setting
4245
4246         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
4247         function
4248
4249         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
4250         freed and then accessed, valgrind flagged this bug, fix it
4251
4252         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
4253         as the last valid field plus 1, where really it is equal to the
4254         last valid field. Corrects some message corruption issues.
4255
4256         * dbus/dbus-mainloop.c: verbosity changes
4257
4258         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
4259         instead of aborting in one of the test codepaths
4260
4261         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
4262         caused not printing the pid ever again if a verbose was missing
4263         the newline at the end
4264         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
4265
4266         * dbus/dbus-connection.c: verbosity changes; 
4267         (dbus_connection_has_messages_to_send): new function
4268         (_dbus_connection_message_sent): no longer call transport->messages_pending
4269         (_dbus_connection_send_preallocated_unlocked): do one iteration to
4270         try to write() immediately, so we can avoid the write watch. This
4271         is the core purpose of this patchset
4272         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
4273         dump the outgoing message queue, so nobody will get confused
4274         trying to send them or thinking stuff is pending to be sent
4275
4276         * bus/test.c: verbosity changes
4277
4278         * bus/driver.c: verbosity/assertion changes
4279
4280         * bus/dispatch.c: a bunch of little tweaks to get it working again
4281         because this patchset changes when/where you need to block.
4282
4283 2004-11-23  Havoc Pennington  <hp@redhat.com>
4284
4285         * test/glib/test-profile.c: modify to accept a plain_sockets
4286         argument in which case it will bench plain sockets instead of
4287         libdbus, for comparison purposes.
4288
4289 2004-11-22  Havoc Pennington  <hp@redhat.com>
4290
4291         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
4292         threads for more time, so sysprof can get a grip on it.
4293
4294         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
4295         pointless variable
4296
4297 2004-11-13  Havoc Pennington  <hp@redhat.com>
4298
4299         * test/glib/test-profile.c: fix this thing up a bit
4300
4301         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
4302         preallocation sizes by a fair bit; not sure if this will be an
4303         overall performance win or not, but it does reduce reallocs.
4304
4305         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
4306         the test hack that forced constant realloc if asserts are
4307         disabled, so we can profile sanely. Sprinkle in some
4308         _DBUS_UNLIKELY() which are probably pointless, but before I
4309         noticed the real performance problem I put them in.
4310         (_dbus_string_validate_utf8): micro-optimize this thing a little
4311         bit, though callgrind says it didn't help; then special-case
4312         ascii, which did help a lot; then be sure we detect nul bytes as
4313         invalid, which is a bugfix.
4314         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
4315         superstition; use memset to nul the padding instead of a manual
4316         loop.
4317         (_dbus_string_get_length): inline this as a
4318         macro; it showed up in the profile because it's used for loop
4319         tests and so forth
4320
4321 2004-11-10  Colin Walters  <walters@verbum.org>
4322
4323         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
4324         for extra paranoia.
4325
4326 2004-11-09  Colin Walters  <walters@verbum.org>
4327
4328         * dbus/dbus-string.c (_dbus_string_get_length): New
4329         function, writes DBusString to C buffer.
4330
4331         * dbus/dbus-string.h: Prototype it.
4332
4333         * dbus/dbus-message.c (dbus_message_type_to_string): New
4334         function, converts message type into C string.
4335
4336         * dbus/dbus-message.h: Prototype it.
4337
4338         * bus/selinux.c (bus_selinux_check): Take source pid,
4339         target pid, and audit data.  Pass audit data to
4340         avc_has_perm.
4341         (log_audit_callback): New function, appends extra
4342         audit information.
4343         (bus_selinux_allows_acquire_service): Also take
4344         service name, add it to audit data.
4345         (bus_selinux_allows_send): Also take message
4346         type, interface, method member, error name,
4347         and destination, and add them to audit data.
4348         (log_cb): Initialize func_audit.
4349         
4350         * bus/selinux.h (bus_selinux_allows_acquire_service)
4351         (bus_selinux_allows_send): Update prototypes 
4352
4353         * bus/services.c (bus_registry_acquire_service): Pass
4354         service name to bus_selinux_allows_acquire_service.
4355
4356         * bus/bus.c (bus_context_check_security_policy): Pass
4357         additional audit data.  Move assignment of dest
4358         to its own line.
4359
4360 2004-11-07  Colin Walters  <walters@verbum.org>
4361
4362         * dbus/dbus-transport-unix.c (do_authentication): Always
4363         initialize auth_completed.
4364         
4365 2004-11-07  Colin Walters  <walters@verbum.org>
4366
4367         * bus/bus.c (load_config): Break into three
4368         separate functions: process_config_first_time_only,
4369         process_config_every_time, and process_config_postinit.
4370         (process_config_every_time): Move call of
4371         bus_registry_set_service_context_table into
4372         process_config_postinit.
4373         (process_config_postinit): New function, does
4374         any processing that needs to happen late
4375         in initialization (and also on reload).
4376         (bus_context_new): Instead of calling load_config,
4377         open config parser here and call process_config_first_time_only
4378         and process_config_every_time directly.  Later, after
4379         we have forked but before changing UID,
4380         invoke bus_selinux_full_init, and then call
4381         process_config_postinit.
4382         (bus_context_reload_config): As in bus_context_new,
4383         load parse file inside here, and call process_config_every_time
4384         and process_config_postinit.
4385
4386         * bus/services.h, bus/services.c
4387         (bus_registry_set_service_context_table): Rename
4388         from bus_registry_set_sid_table.  Take string hash from config
4389         parser, and convert them here into SIDs.
4390
4391         * bus/config-parser.c (struct BusConfigParser): Have
4392         config parser only store a mapping of service->context
4393         string.
4394         (merge_service_context_hash): New function.
4395         (merge_included): Merge context string hashes instead
4396         of using bus_selinux_id_table_union.
4397         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
4398         simply create a new string hash.
4399         (bus_config_parser_unref): Unref it.
4400         (start_selinux_child): Simply insert strings into hash,
4401         don't call bus_selinux_id_table_copy_over.
4402
4403         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
4404         (bus_selinux_id_table_copy_over): Delete.
4405
4406 2004-11-03  Colin Walters  <walters@verbum.org>
4407
4408         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
4409         variables.
4410         
4411 2004-11-03  Colin Walters  <walters@verbum.org>
4412
4413         * bus/test-main.c (test_pre_hook): Fix test logic,
4414         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
4415
4416 2004-11-02  Colin Walters  <walters@redhat.com>
4417
4418         * bus/selinux.c (bus_selinux_init): Split into two functions,
4419         bus_selinux_pre_init and bus_selinux_post_init.
4420         (bus_selinux_pre_init): Just determine whether SELinux is
4421         enabled.
4422         (bus_selinux_post_init): Do everything else.
4423
4424         * bus/main.c (main): Call bus_selinux_pre_init before parsing
4425         config file, and bus_selinux_post_init after.  This ensures that
4426         we don't lose the policyreload notification thread that
4427         bus_selinux_init created before forking previously.
4428         
4429         * bus/test-main.c (test_pre_hook): Update for split.
4430
4431 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
4432
4433         Patch from Johan Fischer <linux@fischaz.com>
4434         
4435         * mono/doc/Makefile.am (install-data-local): Added directory
4436         install for DESTDIR
4437
4438 2004-10-29  Colin Walters  <walters@redhat.com>
4439
4440         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
4441         parameter for fd to write pid to.       
4442
4443         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
4444         
4445         * bus/bus.c (bus_context_new): Pass print_pid_fd
4446         to _dbus_become_daemon (bug #1720)
4447
4448 2004-10-29  Colin Walters  <walters@redhat.com>
4449
4450         Patch from Ed Catmur <ed@catmur.co.uk>
4451
4452         * mono/doc/Makefile.am (install-data-local): Handle
4453         DESTDIR.
4454
4455 2004-10-29  Colin Walters  <walters@redhat.com>
4456
4457         * bus/.cvsignore, qt/.cvsignore: Update.
4458
4459 2004-10-29  Colin Walters  <walters@redhat.com>
4460
4461         Patch from Kristof Vansant <de_lupus@pandora.be>
4462
4463         * configure.in: Detect Slackware.
4464         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
4465         * bus/rc.messagebus.in: New file.
4466
4467 2004-10-29  Colin Walters  <walters@redhat.com>
4468
4469         * tools/dbus-monitor.c (filter_func): Return
4470         DBUS_HANDLER_RESULT_HANDLED in filter function
4471         for now.  See:
4472         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
4473
4474 2004-10-29  Colin Walters  <walters@redhat.com>
4475
4476         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
4477
4478         * bus/services.c (bus_registry_acquire_service): 
4479         Correctly retrieve service name from DBusString
4480         for printing.
4481
4482 2004-10-29  Colin Walters  <walters@redhat.com>
4483
4484         * dbus/dbus-glib.h: Update documentation to not
4485         refer to internal APIs.
4486
4487 2004-10-27  Joe Shaw  <joeshaw@novell.com>
4488
4489         * mono/Arguments.cs (GetDBusTypeConstructor):
4490         type.UnderlyingSystemType will return "System.Byte" if you do it
4491         on "byte[]", which is not what we want.  So check the type.IsArray
4492         property and use System.Array instead.
4493
4494 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
4495
4496         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
4497         the DBusUserInfo structure since this is passed into the function.
4498         This would cause a double free when the function that allocated
4499         the structure would try to free it when an error occured.
4500
4501         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
4502         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
4503         for service activation to avoid 32bit/64bit parallel install issues
4504
4505 2004-10-21  Colin Walters  <walters@verbum.org>
4506
4507         * AUTHORS: Fix my email address, the @gnu.org one
4508         has been bouncing for some time.  Also add J5.
4509         
4510 2004-10-21  Colin Walters  <walters@verbum.org>
4511
4512         * dbus/dbus-transport-unix.c (do_authentication): Return
4513         authentication status to callers.
4514         (unix_handle_watch): If we completed authentication this round,
4515         don't do another read.  Instead wait until the next iteration,
4516         after we've read any pending data in the auth buffer.
4517         (unix_do_iteration): Ditto.
4518         (unix_handle_watch): Updated for new do_authentication prototype.
4519
4520 2004-10-18  Colin Walters  <walters@verbum.org>
4521
4522         * bus/selinux.c (bus_selinux_enabled): Handle
4523         --disable-selinux case.
4524         
4525 2004-10-18  Colin Walters  <walters@verbum.org>
4526
4527         * bus/selinux.h: Add bus_selinux_enabled.
4528         
4529         * bus/selinux.c (bus_selinux_enabled): Implement it.
4530         
4531         * bus/config-parser.c (struct include): Add
4532         if_selinux_enabled member.
4533         (start_busconfig_child): Parse if_selinux_enabled
4534         attribute for include.
4535         (bus_config_parser_content): Handle it.
4536
4537         * bus/session.conf.in, bus/system.conf.in: Add
4538         inclusion of context mapping to default config files;
4539         conditional on SELinux being enabled.
4540         
4541         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
4542         
4543         * test/data/invalid-config-files/badselinux-1.conf, 
4544         test/data/invalid-config-files/badselinux-2.conf:
4545         Test files for bad syntax.
4546         
4547 2004-10-17  Colin Walters  <walters@verbum.org>
4548
4549         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
4550         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
4551         format specifier mismatches.
4552
4553 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4554
4555         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
4556         format string.
4557
4558         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
4559         pointer (bug #1540, Leonardo Boiko).
4560
4561 2004-09-28  Jon Trowbridge  <trow@ximian.com>
4562
4563         * mono/BusDriver.cs: Changed BusDriver struct to remove
4564         the ServiceCreated and ServiceDeleted events and replace them
4565         with the new ServiceOwnerChanged event.
4566
4567         * mono/example/BusListener.cs: Added a new example program,
4568         which listens for and reports any ServiceOwnerChanged events
4569         on the bus driver.
4570
4571         * mono/example/Makefile.am (DESTDIR): Build changes for the
4572         new BusListener.cs example.
4573
4574 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4575
4576         * bus/signals.c (bus_match_rule_parse): validate the components of
4577         match rules (bug #1439).
4578
4579         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
4580
4581 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4582
4583         * doc/dbus-specification.xml: document ServiceOwnerChanged
4584         signal.
4585         
4586         * bus/driver.c, bus/driver.h, bus/services.c: Use
4587         ServiceOwnerChanged signal instead of ServiceCreated and
4588         ServiceDeleted.
4589         
4590         * bus/dispatch.c: update testcase for the new signal.
4591
4592 2004-09-20  Jon Trowbridge  <trow@ximian.com>
4593
4594         Patch from Nat Friedman <nat@novell.com>
4595
4596         * mono/Makefile.am: A number of small build fixes to allow "make
4597         distcheck" to succeed.
4598
4599         * mono/example/Makefile.am: "make distcheck" fixes.
4600
4601         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
4602         key in @srcdir@.
4603
4604         * test/Makefile.am: "make distcheck" fixes.
4605
4606 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4607
4608         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
4609
4610         * doc/busconfig.dtd: update the DTD for the at_console attribute.
4611
4612         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
4613         messages after the first one (bug #1389).
4614         
4615         * bus/dispatch.c (check_double_hello_message): add a test case for
4616         the double hello message bug.
4617         (check_existent_service_activation): fix check of spawning error.
4618         
4619 2004-09-16  David Zeuthen  <david@fubar.dk>
4620
4621         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
4622
4623 2004-09-12  David Zeuthen  <david@fubar.dk>
4624
4625         Patch from Kay Sievers <kay.sievers@vrfy.org>
4626
4627         * bus/bus.c (bus_context_new):
4628         * bus/bus.h:
4629         * bus/main.c (usage)
4630         (main):
4631         Add commandline option --nofork to override configuration file
4632         setting.
4633
4634 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4635
4636         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
4637         compilers don't like it (bug #974).
4638
4639 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
4640
4641         * qt/connection.*: Applied patch by Jérôme Lodewyck
4642         <lodewyck@clipper.ens.fr> to integrate an existing
4643         connection into the Qt eventloop
4644
4645 2004-08-30  Jon Trowbridge  <trow@ximian.com>
4646
4647         * mono/BusDriver.cs: Added.  This is a class for interacting with
4648         the org.freedesktop.DBus service.
4649
4650         * mono/Message.cs: Added a mechanism to expose the message that is
4651         currently being dispatched via the static Message.Current
4652         property.  Added Message.Sender and Message.Destination
4653         properties.
4654
4655         * mono/Handler.cs: Expose the dispatched message via
4656         Message.Current when handling method calls.
4657
4658         * mono/Service.cs: Expose the dispatched message via
4659         Message.Current when handling signal emissions.
4660         
4661         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
4662         Connection.BaseService property.
4663
4664 2004-08-28  Havoc Pennington  <hp@redhat.com>
4665
4666         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
4667
4668         More fixes from Steve Grubb
4669         
4670         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
4671         (_dbus_listen_tcp_socket): fix fd leak
4672
4673         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
4674         EINTR to a bit lower in the code
4675
4676 2004-08-26  Jon Trowbridge  <trow@ximian.com>
4677
4678         * bus/driver.c (bus_driver_handle_service_exists): Respond with
4679         TRUE if we are inquiring about the existence of the built-in
4680         org.freedesktop.DBus service.
4681
4682 2004-08-25  John Palmieri  <johnp@redhat.com>
4683         * bus/config-parser.c:
4684         (struct PolicyType): Add POLICY_CONSOLE
4685         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
4686         (start_busconfig_child): Sets up console element when
4687         <policy at_console=""> is encountered in a policy file
4688         (append_rule_from_element): Convert console elements to console
4689         rules.
4690
4691         * bus/policy.c: 
4692         (bus_policy_create_client_policy): Add console rules to the client
4693         policy based on if the client is at the console
4694         (bus_policy_append_console_rule): New function for adding a
4695         console rule to a policy
4696         (bus_policy_merge): Handle console rule merging
4697
4698         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
4699         where we check for console user files
4700         
4701         * dbus/dbus-sysdeps.c:
4702         (_dbus_file_exists): New function which checks if the given
4703         file exists
4704         (_dbus_user_at_console): New function which does the system
4705         specific process of checking if the user is at the console
4706
4707         * dbus/dbus-userdb.c:
4708         (_dbus_is_console_user): New function converts a UID to user name
4709         and then calls the system specific _dbus_user_at_console to 
4710         see if the user is at the console and therefor a console user
4711
4712 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4713
4714         * bus/config-parser.c (set_limit):
4715         * bus/dbus-daemon-1.1.in:
4716         * test/data/valid-config-files/many-rules.conf: set the
4717         max_match_rules_per_connection limt from the config file. 
4718
4719         * doc/busconfig.dtd: update the DTD.
4720
4721         * bus/driver.c: remove some unused variables.
4722
4723 2004-08-24  Mikael Hallendal  <micke@imendio.com>
4724
4725         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
4726         it's been replaced by dbus_g_bus_get
4727
4728 2004-08-23  Colin Walters  <walters@redhat.com>
4729
4730         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
4731
4732         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
4733
4734         * bus/selinux.c: Create a thread for policy reload notification.
4735         (bus_selinux_get_policy_root): Implement.
4736
4737         * bus/config-parser.c (start_busconfig_child)
4738         (bus_config_parser_content): Support SELinux-root relative
4739         inclusion.
4740
4741         * configure.in <HAVE_SELINUX>: Add -lpthread.
4742         
4743         * bus/test-main.c (test_pre_hook, test_post_hook): New.
4744         (test_post_hook): Move memory checking into here.
4745         (test_pre_hook, test_post_hook): Move SELinux checks in
4746         here, but conditional on a DBUS_TEST_SELINUX environment
4747         variable.  Unfortunately we can't run the SELinux checks
4748         as a normal user, since they won't have any permissions
4749         for /selinux.  So this will have to be tested manually
4750         for now, until we have virtualization for most of
4751         libselinux.
4752         
4753 2004-08-23  Havoc Pennington  <hp@redhat.com>
4754
4755         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
4756         drop supplementary groups, suggested by Steve Grubb
4757
4758 2004-08-20  Colin Walters  <walters@redhat.com>
4759
4760         * bus/config-parser.c (start_busconfig_child): Remove some unused
4761         variables.
4762         
4763         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
4764         warning.
4765
4766 2004-08-17  Joe Shaw  <joeshaw@novell.com>
4767
4768         * configure.in: If --enable-mono is passed in, if we can't find
4769         mono error out.
4770
4771         * mono/Makefile.am: Use /gacutil to install assemblies into the
4772         GAC and not /root.
4773
4774 2004-08-12  Havoc Pennington  <hp@redhat.com>
4775
4776         * NEWS: update for 0.22
4777
4778         * configure.in: release 0.22
4779
4780 2004-08-11  Colin Walters  <walters@redhat.com>
4781
4782         * tools/dbus-send.c (main, usage): Add --reply-timeout
4783         argument.
4784
4785 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4786
4787         * bus/bus.c (process_config_first_time_only): get rid of an unused
4788         DBusError that was causing a memoy leak (bug #989).
4789
4790         * dbus/dbus-keyring.c, dbus/dbus-message.c:
4791         fix compilation on Solaris/Forte C (bug #974)
4792
4793         * bus/main.c (main): plug two minuscule memleaks.
4794
4795 2004-08-10  Havoc Pennington  <hp@redhat.com>
4796
4797         * doc/dbus-tutorial.xml: add some more info on GLib bindings
4798
4799 2004-08-09  Havoc Pennington  <hp@redhat.com>
4800
4801         * COPYING: switch to Academic Free License version 2.1 instead of
4802         2.0, to resolve complaints about patent termination clause.
4803
4804 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
4805
4806         * README: added documentation for the --enable-python 
4807         configure switch.
4808
4809 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4810
4811         * bus/config-parser.c (bus_config_parser_new): fix an invalid
4812         _unref in the SELinux support.
4813
4814         * doc/busconfig.dtd: update DTD for SELinux support.
4815
4816         * bus/config-loader-libxml.c: fix error handler and parser
4817         initialisation/cleanup. OOM test now works with libxml2 HEAD.
4818
4819         * configure.in: remove the warning about libxml2.
4820
4821         * dbus/dbus-bus.c: silence doxygen warning.
4822
4823 2004-07-31  Colin Walters  <walters@redhat.com>
4824
4825         * configure.in: Move #error in SELinux check to its own line.
4826
4827 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4828
4829         * dbus/dbus-internals.h (_DBUS_SET_OOM):
4830         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
4831         dbus_error_set.
4832
4833         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
4834         broken by the change in the _SET_OOM macros.
4835
4836 2004-07-31  Colin Walters  <walters@redhat.com>
4837
4838         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
4839         BUS_SET_OOM.
4840
4841 2004-07-31  Colin Walters  <walters@redhat.com>
4842
4843         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
4844         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
4845         AC_MSG_CHECKING.
4846
4847 2004-07-24  Havoc Pennington  <hp@redhat.com>
4848
4849         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
4850
4851         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
4852         functionality
4853
4854         * configure.in: add --enable-selinux
4855         
4856         * bus/policy.c (bus_policy_merge): add FIXME to a comment
4857
4858         * bus/main.c (main): initialize and shut down selinux
4859
4860         * bus/connection.c: store SELinux ID on each connection, to avoid 
4861         repeated getting of the string context and converting it into 
4862         an ID
4863
4864         * bus/bus.c (bus_context_get_policy): new accessor, though it
4865         isn't used
4866         (bus_context_check_security_policy): check whether the security
4867         context of sender connection can send to the security context of
4868         recipient connection
4869
4870         * bus/config-parser.c: add parsing for <selinux> and <associate>
4871         
4872         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
4873         implement dbus_connection_get_unix_fd()
4874
4875         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
4876         function, used by the selinux stuff
4877         
4878 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4879
4880         * bus/config-loader-libxml.c: complete the implementation of
4881         libxml backend for config file loader. Doesn't work with full OOM
4882         test yet. 
4883         
4884         * configure.in: change error when selecting libxml into a warning.
4885         
4886         * test/data/invalid-config-files: add two non-well-formed XML
4887         files. 
4888         
4889         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
4890         
4891         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
4892         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
4893         be necessary to read all the buffer. (bug #894)
4894
4895         * bus/activation.c (bus_activation_activate_service): fix a
4896         potential assertion failure (bug #896). Small optimization in the
4897         case of auto-activation messages.
4898
4899         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
4900         add test case for byte-through-vararg bug (#901). patch by Kimmo
4901         Hämäläinen. 
4902
4903 2004-07-28  Anders Carlsson  <andersca@gnome.org>
4904
4905         * python/dbus.py:
4906         * python/dbus_bindings.pyx.in:
4907         Add dbus.init_gthreads (), allow emit_signal to pass
4908         arguments to the signal.
4909         
4910 2004-07-24  Havoc Pennington  <hp@redhat.com>
4911
4912         * AUTHORS: add some people, not really comprehensively, let me
4913         know if I missed you
4914
4915 2004-07-24  Havoc Pennington  <hp@redhat.com>
4916
4917         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
4918         Owen
4919
4920         * test/Makefile.am (DIST_SUBDIRS): here also
4921
4922 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4923
4924         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
4925         breaking build on Solaris, reported by Farhad Saberi on the ML.
4926
4927         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
4928         va_arg invocation to account for integer promotion in the case of
4929         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
4930
4931         * bus/services.c (bus_service_remove_owner): fix bug #902, use
4932         _dbus_list_get_first_link, not _dbus_list_get_first.
4933
4934         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
4935
4936         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
4937         handler functions so that the asserts in _dbus_object_subtree_unref
4938         do not fail.
4939
4940         * dbus/dbus-transport-unix.c (do_reading):
4941         _dbus_transport_queue_messages return value is of type
4942         dbus_bool_t, not DBusDispatchStatus.
4943         
4944 2004-07-19  David Zeuthen  <david@fubar.dk>
4945
4946         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
4947
4948         * bus/dispatch.c:
4949         (check_get_connection_unix_user): Debug says GetProperty; but the
4950         method is called GetConnectionUnixUser
4951         (check_get_connection_unix_process_id): New function
4952         (bus_dispatch_test): Actually call check_get_connection_unix_user();
4953         also call check_get_connection_unix_process_id()
4954         
4955         * bus/driver.c:
4956         (bus_driver_handle_get_connection_unix_process_id): New function,
4957         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
4958         interface
4959         
4960         * dbus/dbus-auth.c:
4961         (handle_server_data_external_mech): Set pid from the credentials
4962         obtained from the socket
4963         
4964         * dbus/dbus-connection.c:
4965         (dbus_connection_get_unix_process_id): New function
4966         
4967         * dbus/dbus-connection.h: 
4968         Add prototype for dbus_connection_get_unix_process_id
4969         
4970         * dbus/dbus-transport.c:
4971         (_dbus_transport_get_unix_process_id): New function
4972         
4973         * dbus/dbus-transport.h:
4974         Add prototype for _dbus_transport_get_unix_process_id
4975         
4976 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4977
4978         * dbus/dbus-message.c: Message counter fix, patch by Christian
4979         Hammond <chipx86@gnupdate.org>
4980
4981 2004-07-18  Seth Nickell  <seth@gnome.org>
4982
4983         * python/dbus.py:
4984         * python/dbus_bindings.pyx.in:
4985         * python/tests/test-client.py:
4986
4987         Add dbus.ByteArray and dbus_bindings.ByteArray
4988         types so that byte streams can be passed back.
4989
4990         Give jdahlin the heaps of credit that are so
4991         rightfully his.
4992         
4993 2004-07-12  Seth Nickell  <seth@gnome.org>
4994
4995         * python/dbus.py:
4996
4997         Add message argument to the default object_method_handler
4998         function.
4999         
5000         * python/dbus_bindings.pyx.in:
5001
5002         Automatically return NIL when passed an empty list
5003         (we can't pass back a list since lists are typed
5004         and we don't have any idea what type the the client
5005         intended the list to be... :-( )
5006         
5007 2004-07-10  Seth Nickell  <seth@gnome.org>
5008
5009         * python/examples/Makefile.am:
5010
5011         Fix distcheck breakage caused by new examples.
5012
5013 2004-07-10  Seth Nickell  <seth@gnome.org>
5014
5015         * python/dbus.py:
5016
5017         Add "message" argument to service-side dbus.Object
5018         methods. This will break existing services written
5019         using the python bindings, but will allow extraction
5020         of all the message information (e.g. who its from).
5021
5022         Add improved "object oriented" signal handling/emission.
5023         
5024         * python/examples/example-service.py:
5025
5026         Nix this example.
5027         
5028         * python/examples/example-signal-emitter.py:
5029         * python/examples/example-signal-recipient.py:
5030
5031         Two new examples that show how to emit and receive
5032         signals using the new APIs.
5033         
5034         * python/examples/example-signals.py:
5035         * python/examples/gconf-proxy-service.py:
5036         * python/examples/gconf-proxy-service2.py:
5037
5038         Add "message" argument to service methods.
5039
5040 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
5041
5042         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
5043         * dbus/bus.c (dbus_bus_get_unix_user)
5044         * doc/dbus-specification.xml: implement GetConnectionUnixUser
5045         method of org.freedesktop.DBus interface.
5046
5047         * bus/dispatch.c: test case
5048
5049 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
5050
5051         * python/Makefile.am: switched include directory from glib/ to dbus/
5052         since dbus-glib.h moved
5053  
5054 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5055
5056         * configure.in: prevent building the gcj stuff and libxml loader
5057         since they are broken.
5058
5059 2004-06-20  Havoc Pennington  <hp@redhat.com>
5060
5061         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
5062         codes from the dbus error names
5063         
5064         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
5065         as dbus/dbus-glib.h and that breakage is now visible due to 
5066         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
5067         
5068         * glib/dbus-glib.h: s/gproxy/g_proxy/
5069
5070         * dbus/dbus-shared.h: new header to hold stuff shared with
5071         binding APIs
5072         
5073         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
5074         than dbus-errors.h
5075
5076         * glib/dbus-glib.h (dbus_set_g_error): move to
5077         dbus-glib-lowlevel.h
5078
5079         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
5080         of stuff to enable this
5081
5082         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
5083
5084         * a bunch of other changes with the same basic "separate glib 
5085         bindings from dbus.h" theme
5086         
5087 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
5088
5089         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
5090
5091         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
5092
5093 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5094
5095         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
5096         the reply value of the ServiceExists message.
5097
5098 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
5099
5100         * python/dbus_bindings.pyx.in: No longer need to parse path
5101         elements and pass them as arrays of strings.  The C API now
5102         accepts plain path strings.
5103         (_build_parsed_path): removed 
5104
5105 2004-06-07  Havoc Pennington  <hp@redhat.com>
5106
5107         * doc/TODO: remove auto-activation item since it's done; sort
5108         items by importance/milestone
5109
5110 2004-06-07  Havoc Pennington  <hp@redhat.com>
5111
5112         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
5113         random signature when using REQUIRED_FIELDS (this hack won't work
5114         in the long term)
5115
5116         * dbus/dbus-message.c: change the signature to be a header field,
5117         instead of message->signature special-case string. Incremental
5118         step forward. Then we can fix up code to send the signature in the
5119         message, then fix up code to validate said signature, then fix up
5120         code to not put the typecodes inline, etc.
5121         (load_one_message): don't make up the signature after the fact
5122         (decode_header_data): require signature field for the known
5123         message types
5124
5125         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
5126
5127         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
5128
5129 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
5130
5131         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5132
5133         * mono/Handler.cs: Updated to follow new path argument for
5134         (un-)registering objects.
5135
5136         * mono/example/Makefile.am:
5137         * mono/Makefile.am:
5138         * configure.in: Bumped required version for mono and use new -pkg
5139         syntax for deps
5140
5141 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5142
5143         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
5144         registration functions take the path argument as char* instead of
5145         char**.
5146
5147         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
5148         split off the path decompostion part of
5149         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
5150         warnings. 
5151
5152         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
5153         
5154 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5155  
5156         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
5157         machine approach.  A state is implemented as a function that
5158         handles incoming events as specified for that state.
5159         
5160         * doc/dbus-specification.xml: Update auth protocol state machine
5161         specification to match implementation.  Remove some leftover
5162         base64 examples.
5163
5164 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5165
5166         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
5167         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
5168         quiet doxygen.
5169
5170         * Doxyfile.in: remove deprecated options.
5171
5172         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
5173         glib/test-thread.h, glib/test-thread-client.c,
5174         glib/test-thread-server.c, glib/test-profile.c,
5175         glib/test-dbus-glib.c: remove these unused files.
5176
5177 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5178
5179         * dbus/dbus-object-tree.c
5180         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
5181         non-fallback handlers (bug #684).
5182         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
5183         (find_subtree_recurse): report wether the returned subtree is an
5184         exact match or a "fallback" match higher up in the tree.
5185         (object_tree_test_iteration): update test case.
5186
5187 2004-06-01  Seth Nickell  <seth@gnome.org>
5188
5189         * python/dbus_bindings.pyx.in:
5190         * python/tests/test-client.py:
5191
5192         Round off basic type support. Add dicts (yay!), and 
5193         remaining array types.
5194
5195         Make MessageIter more general so it works for dicts too.
5196
5197         Mark all loop variables as C integers.
5198         
5199 2004-05-31  Havoc Pennington  <hp@redhat.com>
5200
5201         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
5202         "in" before "out"
5203
5204         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
5205
5206         * glib/dbus-glib-tool.c (main): set up to have a --self-test
5207         option that runs the tests, and start filling in some code
5208         including for starters just dumping the interfaces to stdout
5209
5210         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
5211
5212         * test/data/valid-introspection-files/lots-of-types.xml: test of
5213         an example introspection file
5214
5215         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
5216         "node" (I think...)
5217
5218 2004-05-31  Seth Nickell  <seth@gnome.org>
5219
5220         * python/dbus_bindings.pyx.in:
5221         * python/tests/test-client.py:
5222
5223         Test Suite: 1
5224         Python Bindings: 0
5225
5226         Fix string array memory trashing bug... oops...
5227
5228 2004-05-30  Seth Nickell  <seth@gnome.org>
5229
5230         * python/dbus.py:
5231
5232         Add a nicer-but-less-flexible alternate API for handling 
5233         calls to virtual objects in dbus.ObjectTree.
5234
5235         Screw up the argument order to the dbus.Object constructor
5236         for consistency with dbus.ObjectTree (and to make dbus_methods
5237         optional for future extension)
5238         
5239         * python/examples/Makefile.am:
5240         * python/examples/gconf-proxy-service.py:
5241         * python/examples/gconf-proxy-service2.py:
5242
5243         Alternate implementation of gconf-proxy-service using the
5244         nicer dbus.ObjectTree API.
5245         
5246         * python/examples/example-service.py:
5247         * python/tests/test-server.py
5248
5249         Reverse the argument order to deal with dbus.Object constructor
5250         changes.
5251         
5252 2004-05-30  Seth Nickell  <seth@gnome.org>
5253
5254         * python/examples/example-client.py:
5255         * python/examples/example-service.py:
5256
5257         Take it back. Lists seem to work but they're broken
5258         in the test suite. Make the base examples use
5259         lists (works fine).
5260
5261 2004-05-30  Seth Nickell  <seth@gnome.org>
5262
5263         * python/dbus_bindings.pyx.in:
5264         * python/tests/test-client.py:
5265
5266         Add some more tests and fix errors that crop up.
5267         Unfortunately, currently it seems like marshalling
5268         and unmarshalling of lists is completely broken :-(
5269
5270 2004-05-30  Seth Nickell  <seth@gnome.org>
5271
5272         * python/dbus_bindings.pyx.in:
5273
5274         Add support for ObjectPath type.
5275
5276         * python/dbus.py:
5277
5278         Refactor message handling code to a common function.
5279         
5280         * python/tests/test-client.py:
5281         * python/tests/test-server.py:
5282
5283         Add tests that check to make sure values of all types
5284         can be echoed from a service w/o mangling.
5285         
5286 2004-05-29  Seth Nickell  <seth@gnome.org>
5287
5288         * python/dbus.py:
5289
5290         Add ObjectTree class which allows implementation
5291         of trees of "virtual" objects. Basically the python
5292         wrapper for "register_fallback".
5293         
5294         * python/examples/Makefile.am
5295         * python/examples/gconf-proxy-client.py:
5296         * python/examples/gconf-proxy-service.py:
5297
5298         Implement a simple GConf proxy service that supports
5299         get/set on string and int GConf keys using the ObjectTree.
5300         
5301 2004-05-29  Seth Nickell  <seth@gnome.org>
5302
5303         * python/dbus.py:
5304         * python/examples/example-client.py:
5305         * python/examples/example-service.py:
5306         * python/examples/list-system-services.py:
5307
5308         Add SessionBus, SystemBus and ActivationBus classes
5309         so you don't need to know the special little BUS_TYPE
5310         flag.
5311         
5312 2004-05-29  Havoc Pennington  <hp@redhat.com>
5313
5314         * bus/config-parser.c (process_test_valid_subdir): temporarily
5315         stop testing config parser OOM handling, since expat has issues
5316         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
5317
5318         * bus/dbus-daemon-1.1.in: change requested_reply to
5319         send_requested_reply/receive_requested_reply so we can send the
5320         replies, not just receive them.
5321
5322         * bus/config-parser.c: parse the new
5323         send_requested_reply/receive_requested_reply
5324
5325         * bus/policy.c (bus_client_policy_check_can_send): add
5326         requested_reply argument and use it
5327
5328         * bus/bus.c (bus_context_check_security_policy): pass through
5329         requested_reply status to message send check
5330
5331         * bus/system.conf.in: adapt to requested_reply change
5332         
5333 2004-05-28  Havoc Pennington  <hp@redhat.com>
5334
5335         * test/glib/test-service-glib.c (main): remove unused variable
5336
5337         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
5338
5339         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
5340         from the enum, no longer in use.
5341
5342         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
5343         works right.
5344
5345         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
5346         whether error_name passed in is a valid error name.
5347
5348 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
5349
5350         * dbus/dbus-message.c (dbus_message_get_args): Added support for
5351         OBJECT_PATH and OBJECT_PATH_ARRAY
5352
5353 2004-05-28  Seth Nickell  <seth@gnome.org>
5354
5355         * python/examples/Makefile.am:
5356
5357         Forget to add Makefile.am. Do not pass go.
5358
5359 2004-05-28  Michael Meeks  <michael@ximian.com>
5360
5361         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
5362         fix no int64 case.
5363
5364         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
5365
5366         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
5367         (_dbus_message_iter_get_basic_type_array): impl.
5368         drastically simplify ~all relevant _get methods to use these.
5369         (_dbus_message_iter_append_basic_array),
5370         (dbus_message_iter_append_basic): impl
5371         drastically simplify ~all relevant _append methods to use these.
5372
5373         * dbus/dbus-message-builder.c (parse_basic_type) 
5374         (parse_basic_array, lookup_basic_type): impl.
5375         (_dbus_message_data_load): prune scads of duplicate /
5376         cut & paste coding.
5377
5378         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
5379         (_dbus_demarshal_basic_type): implement,
5380         (demarshal_and_validate_len/arg): beef up debug.
5381         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
5382
5383 2004-05-27  Seth Nickell  <seth@gnome.org>
5384
5385         * configure.in:
5386         * python/Makefile.am:
5387
5388         Include the example python apps in the tarball.
5389         
5390         * python/examples/list-system-services.py
5391
5392         Add a python new example that fetches the list of services
5393         from the system bus.
5394         
5395 2004-05-27  Seth Nickell  <seth@gnome.org>
5396
5397         * python/dbus.py:
5398         * python/dbus_bindings.pyx.in:
5399
5400         Fix failure to notify that a signal was not handled,
5401         resulted in hung functions.
5402         
5403 2004-05-25  Colin Walters  <walters@redhat.com>
5404
5405         * tools/dbus-monitor.c (main): Monitor all types of messages.
5406
5407 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
5408
5409         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
5410         which unregisters the object path and disposes the handler.
5411
5412 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
5413  
5414         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
5415          
5416         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
5417         operands to && so we call dbus_message_iter_next () for the last
5418         argument also.
5419
5420 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5421
5422         * dbus/dbus-object-tree.c
5423         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
5424         children even if the requested path isn't registered.
5425         (object_tree_test_iteration): test object_tree_list_registered.
5426
5427         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
5428         it to 0.
5429         
5430 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
5431
5432         * doc/TODO: Remove resolved items.
5433
5434         * bus/expirelist.h (struct BusExpireList): remove unused n_items
5435         field.
5436         
5437         * bus/connection.c (bus_connections_expect_reply): Enforce the
5438         per-connection limit on pending replies.
5439         
5440         Patch from Jon Trowbridge <trow@ximian.com>:
5441  
5442         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
5443         up a watch that triggers a config reload when one end of the pipe
5444         becomes readable.
5445         (signal_handler): Instead of doing the config reload in our SIGHUP
5446         handler, just write to the reload pipe and let the associated
5447         watch handle the reload when control returns to the main loop.
5448  
5449         * bus/driver.c (bus_driver_handle_reload_config): Added.
5450         Implements a ReloadConfig method for requesting a configuration
5451         file reload via the bus driver.
5452  
5453 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
5454
5455         * HACKING: Updated release instructions concerning the wiki page.
5456
5457 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
5458
5459         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
5460         filter against auth->allowed_mechs; we only add allowed mechs in
5461         record_mechanisms().
5462  
5463         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
5464         ALLOWED_MECHS to auth-script format so we can set the list of
5465         allowed mechanisms.
5466  
5467         * data/auth/client-out-of-mechanisms.auth-script: New test to
5468         check client disconnects when it is out of mechanisms to try.
5469  
5470         * dbus/dbus-auth.c (process_command): Remove check for lines
5471         longer that 1 MB; we only buffer up maximum 16 kB.
5472  
5473         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5474         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
5475         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
5476         assume there might be unused bytes.
5477  
5478         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
5479         client-out-of-mechs, it is handled in process_reject(). Move check
5480         for max failures to send_rejected(), as it's a server-only thing.
5481
5482         * dbus/dbus-auth.c: Factor out protocol reply code into functions
5483         send_auth(), send_data(), send_rejected(), send_error(),
5484         send_ok(), send_begin() and send_cancel().
5485
5486 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
5487
5488         Remove base64 encoding, replace with hex encoding. Original patch
5489         from trow@ximian.com, added error handling.
5490
5491         * dbus/dbus-string.c (_dbus_string_base64_encode)
5492         (_dbus_string_base64_decode): Remove.
5493         (_dbus_string_hex_decode): Add end_return argument so we can
5494         distinguish between OOM and invalid hex encoding.
5495         (_dbus_string_test): Remove base64 tests and add test case for
5496         invalid hex.
5497
5498         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
5499         Replace base64 with hex.
5500
5501         * test/data/auth/invalid-hex-encoding.auth-script: New test case
5502         for invalid hex encoded data in auth protocol.
5503
5504 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5505
5506         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
5507         leak.
5508
5509 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5510
5511         * mono/dbus-sharp.dll.config.in: Added for GAC
5512         * mono/dbus-sharp.snk: Added for GAC
5513         * mono/Assembly.cs.in: Added for GAC
5514         * mono/Makefile.am: Changes for GAC installation        
5515         * configure.in: Added refs for dbus-sharp.dll.config.in and
5516         Assembly.cs.in. More fixes for mono testing
5517         * mono/example/Makefile.am: Changed var to CSC
5518         * Makefile.am: Changed flag name to DBUS_USE_CSC
5519
5520 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5521
5522         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
5523         * mono/doc/*: Added documentation framework
5524         * configure.in: Added monodoc check
5525         * README: Added description of mono configure flags
5526
5527 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
5528
5529         * doc/dbus-specification.xml: Added a "Required" column to the 
5530         header fields table and changed the "zero or more" verbage in
5531         the above paragraph to read "The header must contain the required 
5532         named header fields and zero or more of the optional named header 
5533         fields".
5534         * test/data/invalid-messages/*.message: Added the required PATH 
5535         named header field to the tests so that they don't fail on 
5536         'Missing path field'
5537
5538 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
5539
5540         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
5541         the stack by implicitly defining variable and parameter types and
5542         removing the hack of defining C pointers as python objects and later
5543         casting them.
5544
5545 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
5546
5547         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
5548
5549 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
5550
5551         * mono/DBusType/Dict.cs: Handle empty dicts
5552         * mono/DBusType/Array.cs: Handle empty arrays
5553         * mono/Arguments.cs: Handle empty arguments
5554
5555 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
5556
5557         * dbus-sharp.pc.in: Modified to include include Libs and Requires
5558         field
5559
5560 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
5561
5562         * test/data/valid-messages/standard-*.message: Update message
5563         test scripts to new header field names.
5564
5565 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
5566
5567         * test/break-loader.c (randomly_do_n_things): tracked down buffer
5568         overflow to times_we_did_each_thing array which would chop off the
5569         first character of the failure_dir string. Increased the size of
5570         the array to 7 to reflect the number of random mutation functions
5571         we have.
5572
5573 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
5574
5575         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
5576         unix_server->watch here, it is unreffed in disconnect.
5577         (_dbus_server_new_for_tcp_socket): convert NULL host to
5578         "localhost" here so we don't append NULL to address.
5579         
5580         * dbus/dbus-server.c (_dbus_server_test): Add test case for
5581         various addresses, including tcp with no explicit host.
5582
5583 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5584
5585         * dbus/dbus-message.c (decode_header_data, decode_string_field):
5586         fix incorrect setting of .name_offset in the HeaderField (it was
5587         off by two bytes, positioned right after the name and typecode)
5588
5589         * bus/bus.c (bus_context_new, bus_context_unref): test before
5590         calling dbus_server_free_data_slot and _dbus_user_database_unref
5591         in case of an error.
5592
5593         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
5594         by libdbus-gtool.
5595
5596 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
5597
5598         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
5599         _dbus_poll() instead of select().
5600
5601 2004-04-15  Jon Trowbridge  <trow@ximian.com>
5602
5603         * bus/main.c (signal_handler): Reload the configuration files
5604         on SIGHUP.
5605         (main): Set up our SIGHUP handler.
5606
5607         * bus/bus.c (struct BusContext): Store the config file, user and
5608         fork flag in the BusContext.
5609         (process_config_first_time_only): Added.  Contains the code
5610         (previously in bus_context_new) for setting up the BusContext from
5611         the BusConfigParser that should only be run the first time the
5612         config files are read.
5613         (process_config_every_time): Added.  Contains the code (previously
5614         in bus_context_new) for setting up the BusContext from the
5615         BusConfigParser that should be run every time the config files are
5616         read.
5617         (load_config): Added.  Builds a BusConfigParser from the config
5618         files and passes the resulting structure off to
5619         process_config_first_time_only (assuming this is the first time)
5620         and process_config_every_time.
5621         (bus_context_new): All of the config-related code has been moved
5622         to process_config_first_time_only and process_config_every_time.
5623         Now this function just does the non-config-related initializations
5624         and calls load_config.
5625         (bus_context_reload_config): Added.
5626
5627 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5628
5629         * bus/driver.c (bus_driver_handle_get_service_owner):
5630         implement a GetServiceOwner method.
5631         * doc/dbus-specification.xml: document it.
5632         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
5633         
5634         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
5635         implement, using the bus GetServiceOwner method.
5636
5637         * test/glib/test-dbus-glib.c:
5638         use dbus_gproxy_new_for_service_owner so that we can receive the
5639         signal. 
5640
5641 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
5642
5643         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
5644         dbus/dbus-message.c, dbus/dbus-protocol.h
5645         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
5646
5647         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
5648         dbus/dbus-message.c, dbus/dbus-protocol.h
5649         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
5650
5651         * dbus/dbus-internals.c (_dbus_header_field_to_string):
5652         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
5653         DBUS_HEADER_FIELD_SENDER resolves to "sender"
5654
5655         * doc/dbus-specification.xml (Header Fields Table):
5656         s/SERVICE/DESTINATION
5657         s/SENDER_SERVICE/SENDER
5658
5659
5660 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5661
5662         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
5663         a few seconds.
5664
5665 2004-04-13  Michael Meeks  <michael@ximian.com>
5666
5667         * glib/dbus-gobject.c (handle_introspect): split out
5668         (introspect_properties): this.
5669         (handle_introspect): implement this.
5670
5671         * test/glib/Makefile.am: use the absolute path so the bus
5672         daemon's chdir ("/") doesn't kill us dead.
5673
5674         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
5675
5676 2004-04-12  Jon Trowbridge  <trow@ximian.com>
5677
5678         * bus/config-parser.c (struct BusConfigParser): Added
5679         included_files field.
5680         (seen_include): Added.  Checks whether or not a file has already
5681         been included by any parent BusConfigParser.
5682         (bus_config_parser_new): Copy the parent's included_files.
5683         (include_file): Track which files have been included, and fail on
5684         circular inclusions.
5685         (process_test_valid_subdir): Changed printf to report if we are
5686         testing valid or invalid conf files.
5687         (all_are_equiv): Changed printf to be a bit clearer about
5688         what we are actually doing.
5689         (bus_config_parser_test): Test invalid configuration files.
5690
5691 2004-04-09  Jon Trowbridge  <trow@ximian.com>
5692
5693         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
5694         argument.  If non-null, the newly-constructed BusConfigParser will
5695         be initialized with the parent's BusLimits instead of the default
5696         values.
5697         (include_file): When including a config file, pass in
5698         the current parser as the parent and then copy the BusLimits
5699         from the included BusConfigParser pack to the current parser.
5700         (process_test_valid_subdir): Renamed from process_test_subdir.
5701         (process_test_equiv_subdir): Added.  Walks through a directory,
5702         descending into each subdirectory and loading the config files
5703         it finds there.  If any subdirectory contains two config files
5704         that don't produce identical BusConfigParser structs, fail.
5705         For now, the BusConfigParser's BusPolicies are not compared.
5706         (bus_config_parser_test): Call both process_test_valid_subdir and
5707         process_test_equiv_subdir.
5708
5709         * bus/config-loader-libxml.c (bus_config_load): Take a parent
5710         argument and pass it along to the call to bus_config_parser_new.
5711         Also made a few small changes to allow this code to compile.
5712
5713         * bus/config-loader-expat.c (bus_config_load): Take a parent
5714         argument and pass it along to the call to bus_config_parser_new.
5715
5716         * bus/bus.c (bus_context_new): Load the config file
5717         with a NULL parent argument.
5718
5719 2004-03-29  Michael Meeks  <michael@ximian.com>
5720
5721         * glib/dbus-gobject.c (introspect_properties): split
5722         out, fix mangled 'while' flow control.
5723         (introspect_signals): implement.
5724         (handle_introspect): update.
5725
5726 2004-03-29  Michael Meeks  <michael@ximian.com>
5727
5728         * glib/dbus-gobject.c (set_object_property): split out / 
5729         re-work, use the property type, and not the message type(!)
5730         (get_object_property): ditto.
5731
5732         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
5733         (dbus_gvalue_marshal): make this code re-usable, needed
5734         for signals too, also on both proxy and server side.
5735         Re-write for more efficiency / readability.
5736
5737 2004-03-29  Michael Meeks  <michael@ximian.com>
5738
5739         * dbus/dbus-message.c
5740         (dbus_message_new_error_printf): impl.
5741
5742         * dbus/dbus-connection.c
5743         (dbus_connection_unregister_object_path): fix warning.
5744
5745         * configure.in: fix no-mono-installed situation.
5746
5747 2004-03-27  Havoc Pennington  <hp@redhat.com>
5748
5749         Patch from Timo Teräs:
5750         
5751         * tools/dbus-send.c (main): if --print-reply, assume type is
5752         method call; support boolean type args
5753         
5754         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
5755         bunch of memleak and logic bugs
5756         
5757 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
5758
5759         * mono/Arguments.cs:
5760         * mono/Introspector.cs:
5761         * mono/Handler.cs:
5762         * mono/InterfaceProxy.cs:
5763         * mono/Message.cs
5764         * mono/ProxyBuilder.cs:
5765         * mono/Service.cs:
5766         Added InterfaceProxy class to avoid building proxies for every
5767         object.
5768
5769         * dbus-message.h:
5770         * dbus-message.c (dbus_message_append_args_valist)
5771         (dbus_message_iter_get_object_path)
5772         (dbus_message_iter_get_object_path_array)
5773         (dbus_message_iter_append_object_path)
5774         (dbus_message_iter_append_object_path_array):
5775         Added object_path iter functions to handle OBJECT_PATH arguments
5776         
5777 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
5778
5779         First checkin of mono bindings.
5780         * configure.in:
5781         * Makefile.am:
5782         Build stuff for the bindings
5783         * dbus-sharp.pc.in: Added for pkgconfig
5784         
5785 2004-03-21  Havoc Pennington  <hp@redhat.com>
5786
5787         * test/test-service.c (main): remove debug spew
5788
5789 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5790
5791         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
5792         arrays
5793
5794         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
5795         (dbus_message_iter_init_array_iterator)
5796         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
5797         indicate whether the iterator is empty
5798
5799         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
5800         warnings
5801
5802 2004-03-19  Havoc Pennington  <hp@redhat.com>
5803
5804         * NEWS: 0.21 updates
5805
5806         * configure.in: 0.21
5807
5808         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
5809         
5810         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
5811         you don't need pyrex to make dist
5812
5813         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
5814         sources; run moc
5815         
5816 2004-03-18  Richard Hult  <richard@imendio.com>
5817
5818         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
5819         (dbus_message_set_auto_activation): Add doxygen docs.
5820
5821 2004-03-16  Richard Hult  <richard@imendio.com>
5822
5823         * bus/activation.c: (bus_activation_service_created),
5824         (bus_activation_send_pending_auto_activation_messages),
5825         (bus_activation_activate_service):
5826         * bus/activation.h:
5827         * bus/dispatch.c: (bus_dispatch),
5828         (check_nonexistent_service_auto_activation),
5829         (check_service_auto_activated),
5830         (check_segfault_service_auto_activation),
5831         (check_existent_service_auto_activation), (bus_dispatch_test):
5832         * bus/driver.c: (bus_driver_handle_activate_service):
5833         * bus/services.c: (bus_registry_acquire_service):
5834         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
5835         (dbus_message_get_auto_activation):
5836         * dbus/dbus-message.h:
5837         * dbus/dbus-protocol.h: Implement auto-activation.
5838         
5839         * doc/dbus-specification.xml: Add auto-activation to the spec.
5840
5841 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5842
5843         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
5844         fix a bug with CUSTOM types.
5845
5846         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
5847         a unit test for this bug (used to fail).
5848
5849 2004-03-12  Mikael Hallendal  <micke@imendio.com>
5850
5851         * bus/activation.c:
5852         (babysitter_watch_callback): notify all pending activations waiting for
5853           the same exec that the activation failed.
5854         (bus_activation_activate_service): shortcut the activation if we 
5855           already waiting for the same executable to start up.
5856
5857 2004-03-12  Mikael Hallendal  <micke@imendio.com>
5858
5859         * bus/activation.c: 
5860         - Added service file reloading. 
5861           Each service files directory is kept in an hash table in 
5862           BusActivation and each BusActivationEntry knows what .service-file it
5863           was read from. So when you try to activate a service the bus will 
5864           check if it's been updated, removed or if new .service-files has 
5865           been installed.
5866         - Test code at the bottom for the service file reloading.
5867         * bus/test-main.c: (main):
5868         * bus/test.h:
5869         - added service reloading test.
5870         * dbus/dbus-sysdeps.c: 
5871         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
5872
5873 2004-03-08  Michael Meeks  <michael@ximian.com>
5874
5875         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
5876         bail immediately if disconnected, to avoid busy loop.
5877
5878         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
5879         cleanup cut/paste/inefficiency.
5880
5881 2004-03-01  David Zeuthen  <david@fubar.dk>
5882
5883         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
5884         bug where args were used twice. This bug resulted in a segfault
5885         on a Debian/PPC system when starting the messagebus daemon. Include
5886         dbus-sysdeps.h for DBUS_VA_COPY
5887
5888         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
5889
5890         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
5891         appropriate va_copy implementation. From GLib
5892         
5893 2004-02-24  Joe Shaw  <joe@ximian.com>
5894
5895         * bus/services.c (bus_registry_acquire_service): We need to pass
5896         in the service name to dbus_set_error() to prevent a crash.
5897
5898 2003-12-26  Anders Carlsson  <andersca@gnome.org>
5899
5900         * AUTHORS: Reveal my True identity.
5901
5902 2003-12-17  Mikael Hallendal  <micke@imendio.com>
5903
5904         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
5905         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
5906
5907 2003-12-13  Mikael Hallendal  <micke@imendio.com>
5908
5909         * doc/TODO: Added not about better error check of configuration files.
5910
5911 2003-12-02  Richard Hult  <richard@imendio.com>
5912
5913         * Update AFL version to 2.0 throughout the source files to reflect
5914         the update that was done a while ago.
5915
5916 2003-12-02  Richard Hult  <richard@imendio.com>
5917
5918         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
5919         wrote_dict_key to FALSE on the iter that the dict is appended to,
5920         just like when appending other types. Fixes a bug where a dict
5921         couldn't be put inside a dict.
5922         (dbus_message_iter_append_dict_key): Fix typo in warning message.
5923         (message_iter_test, _dbus_message_test): Add test case for dict
5924         inside dict.
5925
5926 2003-12-01  David Zeuthen  <david@fubar.dk>
5927
5928         * python/dbus.py: Add the actual message when calling the reciever
5929         of a signal such that parameters can be inspected. Add the method
5930         remove_signal_receiver
5931         
5932 2003-11-26  Mikael Hallendal  <micke@imendio.com>
5933
5934         * bus/*.[ch]:
5935         * dbus/*.[ch]:
5936         * glib/*.[ch]: Made ref functions return the pointer
5937
5938 2003-11-25  Zack Rusin  <zack@kde.org>
5939
5940         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
5941
5942         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
5943         wrappers,
5944
5945         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
5946         the Integrator and to better fit with the server,
5947
5948 2003-11-24  Zack Rusin  <zack@kde.org>
5949
5950         * qt/connection.h, qt/connection.cpp: removing initDbus method since
5951         the integrator handles it now
5952
5953         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
5954         since QTimer wasn't really meant to be used the way DBusTimeout is
5955
5956 2003-11-24  Zack Rusin  <zack@kde.org>
5957
5958         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
5959         Integrator class which integrates D-BUS with the Qt event loop,
5960
5961         * qt/connection.h, qt/connection.cpp: Move all the code which
5962         was dealing with D-BUS integration to the Integrator class,
5963         and start using Integrator,
5964
5965 2003-11-23  Zack Rusin  <zack@kde.org>
5966
5967         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
5968         wrapper
5969
5970         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
5971         switching namespaces to DBusQt, reworking the class,
5972
5973         * Makefile.cvs: switching dependencies so that it matches KDE 
5974         schematics,
5975         
5976         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
5977         the library
5978
5979 2003-11-19  Havoc Pennington  <hp@redhat.com>
5980
5981         * NEWS: update
5982
5983         * configure.in: bump version to 0.20
5984
5985         * configure.in (have_qt): add yet another place to look for qt
5986         (someone hand trolltech a .pc file...)
5987
5988 2003-11-01  Havoc Pennington  <hp@redhat.com>
5989
5990         * doc/dbus-specification.xml: add state machine docs on the auth
5991         protocol; just a first draft, I'm sure it's wrong.      
5992
5993 2003-10-28  David Zeuthen  <david@fubar.dk>
5994
5995         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
5996         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
5997         
5998 2003-10-28  Havoc Pennington  <hp@redhat.com>
5999
6000         * dbus/dbus-message.c (get_next_field): delete unused function
6001
6002 2003-10-28  Havoc Pennington  <hp@redhat.com>
6003
6004         * bus/expirelist.c (do_expiration_with_current_time): detect
6005         failure of the expire_func due to OOM
6006
6007         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
6008
6009         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
6010         NoReply error that's now created by the bus when the service exits
6011
6012 2003-10-28  Havoc Pennington  <hp@redhat.com>
6013
6014         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
6015         tests for set_path, set_interface, set_member, etc.
6016
6017         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
6018
6019         * dbus/dbus-message.c (set_string_field): always just delete and
6020         re-append the field; accept NULL for deletion
6021         (re_align_fields_recurse): reimplement
6022         
6023 2003-10-26  Havoc Pennington  <hp@redhat.com>
6024
6025         * dbus/dbus-connection.c: fix docs to properly describe the
6026         disconnected message
6027         (_dbus_connection_notify_disconnected): remove this function; 
6028         we can't synchronously add the disconnected message, we have to 
6029         do it after we've queued any remaining real messages
6030         (_dbus_connection_get_dispatch_status_unlocked): queue the
6031         disconnect message only if the transport has finished queueing all
6032         its real messages and is disconnected.
6033         (dbus_connection_disconnect): update the dispatch status here
6034
6035 2003-10-22  Havoc Pennington  <hp@redhat.com>
6036
6037         * bus/bus.c (bus_context_check_security_policy): fix up assertion
6038
6039         * bus/connection.c (bus_transaction_send_from_driver): set the
6040         destination to the connection's base service
6041
6042 2003-10-20  Havoc Pennington  <hp@redhat.com>
6043
6044         hmm, make check is currently not passing.
6045         
6046         * doc/dbus-specification.xml: add requirement that custom type
6047         names follow the same rules as interface names.
6048
6049         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
6050         duplication and allow 'c' to be 'custom'; dict is now 'm' for
6051         'map'
6052
6053         * doc/dbus-specification.xml: update type codes to match
6054         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
6055         CUSTOM. Add type OBJECT_PATH to the spec.
6056
6057 2003-10-17  Havoc Pennington  <hp@redhat.com>
6058
6059         * bus/driver.c (create_unique_client_name): use "." as separator
6060         in base service names instead of '-'
6061
6062         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
6063         byte at the end of the string
6064
6065         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
6066         optimization macros since string validation seems to be a slow
6067         point.
6068         
6069         * doc/dbus-specification.xml: restrict valid
6070         service/interface/member/error names. Add test suite code for the
6071         name validation.
6072
6073         * dbus/dbus-string.c: limit service/interface/member/error names 
6074         to [0-9][A-Z][a-z]_
6075
6076         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
6077         format arg to verbose spew
6078
6079         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
6080         memory, return instead of g_error
6081
6082         * test/test-service.c (path_message_func): support emitting a
6083         signal on request
6084
6085         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
6086         activation bus type if DBUS_BUS_ACTIVATION was set; default to
6087         assuming the activation bus was the session bus so that services
6088         started manually will still register.
6089         (init_connections_unlocked): fix so that in OOM situation we get
6090         the same semantics when retrying the function
6091         
6092         * test/test-service.c (main): change to use path registration, to
6093         test those codepaths; register with DBUS_BUS_ACTIVATION rather
6094         than DBUS_BUS_SESSION
6095
6096 2003-10-16  Havoc Pennington  <hp@redhat.com>
6097
6098         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
6099
6100         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
6101         coverage of the tests
6102         (coverage-report.txt): don't move the .da and .bbg files around
6103
6104 2003-10-16  Havoc Pennington  <hp@redhat.com>
6105
6106         * bus/bus.c (struct BusContext): remove struct field I didn't mean
6107         to put there
6108
6109 2003-10-16  Havoc Pennington  <hp@redhat.com>
6110
6111         * bus/connection.c (bus_pending_reply_expired): either cancel or
6112         execute, not both
6113         (bus_connections_check_reply): use unlink, not remove_link, as we
6114         don't want to free the link; fixes double free mess
6115
6116         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
6117         where no reply was received
6118
6119         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
6120         fix a refcount leak
6121
6122         * bus/signals.c (match_rule_matches): add special cases for the
6123         bus driver, so you can match on sender/destination for it.
6124
6125         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
6126         DBUS_PRINT_BACKTRACE is set
6127
6128         * dbus/dbus-internals.c: add pid to assertion failure messages
6129
6130         * dbus/dbus-connection.c: add message type code to the debug spew
6131
6132         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
6133         sender=foo not service=foo
6134
6135         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
6136         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
6137         DBUS_ACTIVATION_ADDRESS instead
6138
6139         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
6140         DBUS_SYSTEM_BUS_ADDRESS if appropriate
6141
6142         * bus/bus.c (bus_context_new): handle OOM copying bus type into
6143         context struct
6144
6145         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
6146         (dbus_message_iter_get_object_path_array): new function (half
6147         finished, disabled for the moment)
6148         
6149         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
6150         DBUS_MESSAGE_TYPE_ERROR
6151
6152         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
6153         avoid redirecting stderr to /dev/null
6154         (babysit): close stdin if not doing the "exit_with_session" thing
6155
6156         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
6157         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
6158         stdout/stdin, so things don't get confused
6159         
6160         * bus/system.conf.in: fix to allow replies, I modified .conf
6161         instead of .conf.in again.
6162
6163 2003-10-14  David Zeuthen  <david@fubar.dk>
6164
6165         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
6166         argtype to arg_type when raising unknown arg type exception.
6167         Changed type list to reflect the changes in dbus-protocol.h so 
6168         the bindings actually work.
6169
6170 2003-10-14  Havoc Pennington  <hp@redhat.com>
6171
6172         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
6173         to have a bug keeping it from outputting the .da files sometimes
6174         (string_get_string): don't append garbage nul bytes to the string.
6175
6176 2003-10-15  Seth Nickell  <seth@gnome.org>
6177
6178         * python/Makefile.am:
6179
6180         Include dbus_h_wrapper.h in the dist tarball.
6181
6182 2003-10-14  Havoc Pennington  <hp@redhat.com>
6183
6184         * bus/bus.c (bus_context_check_security_policy): revamp this to
6185         work more sanely with new policy-based requested reply setup
6186
6187         * bus/connection.c (bus_transaction_send_from_driver): set bus
6188         driver messages as no reply
6189
6190         * bus/policy.c (bus_client_policy_check_can_receive): handle a
6191         requested_reply attribute on allow/deny rules
6192
6193         * bus/system.conf: add <allow requested_reply="true"/>
6194
6195         * bus/driver.c (bus_driver_handle_message): fix check for replies
6196         sent to the bus driver, which was backward. How did this ever work
6197         at all though? I think I'm missing something.
6198
6199         * dbus/dbus-message.c (decode_header_data): require error and
6200         method return messages to have a reply serial field to be valid
6201         (_dbus_message_loader_queue_messages): break up this function;
6202         validate that reply serial and plain serial are nonzero; 
6203         clean up the OOM/error handling.
6204         (get_uint_field): don't return -1 from this
6205         (dbus_message_create_header): fix signed/unsigned bug
6206
6207         * bus/connection.c (bus_connections_expect_reply): save serial of
6208         the incoming message, not reply serial
6209
6210 2003-10-14  Havoc Pennington  <hp@redhat.com>
6211
6212         * bus/connection.c: implement pending reply tracking using
6213         BusExpireList
6214
6215         * bus/bus.c (bus_context_check_security_policy): verify that a
6216         reply is pending in order to allow a reply to be sent. Deny 
6217         messages of unknown type.
6218
6219         * bus/dbus-daemon-1.1.in: update to mention new resource limits
6220
6221         * bus/bus.c (bus_context_get_max_replies_per_connection): new
6222         (bus_context_get_reply_timeout): new
6223
6224 2003-10-13  Seth Nickell  <seth@gnome.org>
6225
6226         * python/Makefile.am:
6227
6228         Pass "make distcheck": remove a couple files from DIST_FILES
6229         that weren't included in the final version.
6230
6231 2003-10-12  Havoc Pennington  <hp@pobox.com>
6232
6233         Added test code that 1) starts an actual bus daemon and 2) uses
6234         DBusGProxy; fixed bugs that were revealed by the test. Lots 
6235         more testing possible, but this is the basic framework.
6236         
6237         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
6238         empty proxy lists from the proxy list hash
6239
6240         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
6241         couple of return_if_fail checks
6242
6243         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
6244         to allocate, so everything is cleared to NULL as it should be.
6245
6246         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
6247         source as data to dbus_connection_set_timeout_functions() as the 
6248         timeout functions expected
6249
6250         * test/glib/run-test.sh: add a little script to start up a message
6251         bus and run tests using it
6252
6253         * tools/dbus-launch.1: updates
6254
6255         * tools/dbus-launch.c (main): add --config-file option
6256
6257         * tools/dbus-launch.c (main): remove confusing else if (runprog)
6258         that could never be reached.
6259
6260         * dbus/dbus-message.c (dbus_message_new_method_return) 
6261         (dbus_message_new_error, dbus_message_new_signal): set the
6262         no-reply-expected flag on all these. Redundant, but may
6263         as well be consistent.
6264
6265 2003-10-11  Havoc Pennington  <hp@pobox.com>
6266
6267         * test/decode-gcov.c (function_solve_graph): make broken block
6268         graph a nonfatal error since it seems to be broken. Need to debug
6269         this.
6270
6271         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
6272         can't just check type > INVALID < LAST anymore
6273
6274         * dbus/dbus-message.c (dbus_message_get_signature): new function
6275         (dbus_message_has_signature): new function
6276         (struct DBusMessage): add signature field (right now it isn't sent
6277         over the wire, just generated on the fly)
6278         (dbus_message_copy): copy the signature, and init strings to
6279         proper length to avoid some reallocs
6280         (dbus_message_iter_init_array_iterator): return void, since it
6281         can't fail
6282         (dbus_message_iter_init_dict_iterator): return void since it can't fail
6283         (_dbus_message_loader_queue_messages): add silly temporary hack to
6284         fill in message->signature on load
6285
6286         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
6287         characters, so they are relatively human-readable.
6288
6289 2003-10-11  Havoc Pennington  <hp@pobox.com>
6290
6291         * dbus/dbus-message.c (_dbus_message_test): add more test
6292         coverage, but #if 0 for now since they uncover a bug 
6293         not fixed yet; I think in re_align_field_recurse()
6294         (re_align_field_recurse): add FIXME about broken assertion
6295
6296         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
6297
6298         * bus/connection.c: share a couple code bits with expirelist.c
6299
6300         * bus/expirelist.h, bus/expirelist.c: implement a generic
6301         expire-items-after-N-seconds facility, was going to share between
6302         expiring connections and replies, decided not to use for expiring
6303         connections for now.
6304
6305         * COPYING: include AFL 2.0 (still need to change all the file headers)
6306
6307 2003-10-09  Havoc Pennington  <hp@redhat.com>
6308
6309         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
6310         gcc 3.3. Not that we do anything about it yet.
6311
6312         * bus/signals.c (bus_match_rule_parse): impose max length on the
6313         match rule text
6314
6315         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
6316
6317 2003-10-09  Havoc Pennington  <hp@redhat.com>
6318
6319         Make matching rules theoretically work (add parser).
6320         
6321         * bus/bus.c (bus_context_check_security_policy): fix up to handle
6322         the case where destination is explicitly specified as bus driver
6323         and someone else is eavesdropping.
6324         
6325         * bus/policy.c (bus_client_policy_check_can_receive): fix up
6326         definition of eavesdropping and assertion
6327
6328         * tools/dbus-send.c (main): use dbus_message_type_from_string
6329
6330         * bus/signals.c (bus_match_rule_parse): implement
6331
6332         * dbus/dbus-message.c (dbus_message_type_from_string): new
6333
6334         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
6335
6336 2003-10-02  Havoc Pennington  <hp@pobox.com>
6337
6338         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
6339         dbus_gproxy_oneway_call
6340
6341         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
6342         (dbus_server_setup_with_g_main): fix to allow calling them more
6343         than once on the same args
6344         (dbus_bus_get_with_g_main): new function
6345
6346 2003-10-02  Havoc Pennington  <hp@redhat.com>
6347
6348         * doc/dbus-tutorial.xml: write some stuff
6349
6350 2003-09-29  Havoc Pennington  <hp@pobox.com>
6351
6352         * configure.in: split checks for Doxygen from XML docs, check for
6353         xmlto
6354
6355         * doc/Makefile.am: XML-ify all the docs, and add a blank
6356         dbus-tutorial.xml
6357
6358 2003-09-29  Havoc Pennington  <hp@pobox.com>
6359
6360         * Merge dbus-object-names branch. To see the entire patch 
6361         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
6362         it's huuuuge though.
6363         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
6364         
6365 2003-09-28  Havoc Pennington  <hp@pobox.com>
6366
6367         * HACKING: update to reflect new server
6368
6369 2003-09-26  Seth Nickell  <seth@gnome.org>
6370
6371         * python/dbus.py:
6372         * python/examples/example-signals.py:
6373
6374         Start implementing some notions of signals. The API
6375         is really terrible, but they sort of work (with the
6376         exception of being able to filter by service, and to
6377         transmit signals *as* a particular service). Need to
6378         figure out how to make messages come from the service
6379         we registered :-(
6380         
6381         * python/dbus_bindings.pyx.in:
6382
6383         Removed duplicate message_handler callbacks.
6384         
6385 2003-09-25  Havoc Pennington  <hp@redhat.com>
6386
6387         * bus/session.conf.in: fix my mess
6388
6389 2003-09-25  Havoc Pennington  <hp@pobox.com>
6390
6391         * bus/session.conf.in: fix security policy, reported by Seth Nickell
6392
6393 2003-09-25  Seth Nickell  <seth@gnome.org>
6394
6395         * python/examples/example-service.py:
6396
6397         Johan notices complete wrong code in example-service, but
6398         completely wrong in a way that works exactly the same (!).
6399         Johan is confused, how could this possibly work? Example
6400         code fails to serve purpose of making things clear.
6401         Seth fixes.
6402
6403 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
6404
6405         * doc/dbus-specification.sgml: don't require header fields
6406         to be 4-byte aligned and specify that fields should be
6407         distinguished from padding by the fact that zero is not
6408         a valid field name.
6409         
6410         * doc/TODO: remove re-alignment item and add item to doc
6411         the OBJECT_PATH type.
6412         
6413         * dbus/dbus-message.c:
6414         (HeaderField): rename the original member to value_offset
6415         and introduce a name_offset member to keep track of where
6416         the field actually begins.
6417         (adjust_field_offsets): remove.
6418         (append_int_field), (append_uint_field),
6419         (append_string_field): don't align the start of the header
6420         field to a 4-byte boundary.
6421         (get_next_field): impl finding the next marhsalled field
6422         after a given field.
6423         (re_align_field_recurse): impl re-aligning a number of
6424         already marshalled fields.
6425         (delete_field): impl deleting a field of any type and
6426         re-aligning any following fields.
6427         (delete_int_or_uint_field), (delete_string_field): remove.
6428         (set_int_field), (set_uint_field): no need to re-check
6429         that we have the correct type for the field.
6430         (set_string_field): ditto and impl re-aligning any
6431         following fields.
6432         (decode_header_data): update to take into account that
6433         the fields aren't 4-byte aligned any more and the new
6434         way to distinguish padding from header fields. Also,
6435         don't exit when there is too much header padding.
6436         (process_test_subdir): print the directory.
6437         (_dbus_message_test): add test to make sure a following
6438         field is re-aligned correctly after field deletion.
6439         
6440         * dbus/dbus-string.[ch]:
6441         (_dbus_string_insert_bytes): rename from insert_byte and
6442         allow the insert of multiple bytes.
6443         (_dbus_string_test): test inserting multiple bytes.
6444
6445         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
6446         warning note to docs about having to re-align any
6447         marshalled values following the string.
6448         
6449         * dbus/dbus-message-builder.c:
6450         (append_string_field), (_dbus_message_data_load):
6451         don't align the header field.
6452         
6453         * dbus/dbus-auth.c: (process_test_subdir): print the
6454         directory.
6455         
6456         * test/break-loader.c: (randomly_add_one_byte): upd. for
6457         insert_byte change.
6458         
6459         * test/data/invalid-messages/bad-header-field-alignment.message:
6460         new test case.
6461         
6462         * test/data/valid-messages/unknown-header-field.message: shove
6463         a dict in the unknown field.
6464
6465 2003-09-25  Seth Nickell  <seth@gnome.org>
6466
6467         * python/dbus.py:
6468         * python/dbus_bindings.pyx.in:
6469
6470         Handle return values.
6471         
6472         * python/examples/example-client.py:
6473         * python/examples/example-service.py:
6474
6475         Pass back return values from the service to the client.
6476         
6477 2003-09-24  Seth Nickell  <seth@gnome.org>
6478
6479         * python/dbus.py:
6480
6481         Connect Object methods (when you are sharing an object) up... pass
6482         in a list of methods to be shared. Sharing all the methods just
6483         worked out too weird. You can now create nice Services over the
6484         DBus in Python. :-)
6485         
6486         * python/dbus_bindings.pyx.in:
6487
6488         Keep references to user_data tuples passed into C functions so 
6489         Python doesn't garbage collect on us.
6490
6491         Implement MethodReturn and Error subclasses of Message for creating
6492         DBusMessage's of those types.
6493         
6494         * python/examples/example-client.py:
6495         * python/examples/example-service.py:
6496
6497         Simple example code showing both how create DBus services and objects,
6498         and how to use them.
6499
6500 2003-09-23  Havoc Pennington  <hp@pobox.com>
6501
6502         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
6503
6504 2003-09-23  Havoc Pennington  <hp@redhat.com>
6505
6506         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
6507         (dbus_gproxy_disconnect_signal): implement
6508         (dbus_gproxy_manager_remove_signal_match): implement
6509         (dbus_gproxy_manager_add_signal_match): implement
6510         (dbus_gproxy_oneway_call): implement
6511
6512 2003-09-23  Havoc Pennington  <hp@pobox.com>
6513
6514         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
6515         subclass. This means dropping the transparent thread safety of the
6516         proxy; you now need a separate proxy per-thread, or your own
6517         locking on the proxy. Probably right anyway.
6518         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
6519
6520 2003-09-22  Havoc Pennington  <hp@redhat.com>
6521
6522         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
6523
6524 2003-09-21  Seth Nickell  <seth@gnome.org>
6525
6526         First checkin of the Python bindings.
6527         
6528         * python/.cvsignore:
6529         * python/Makefile.am:
6530         * python/dbus_bindings.pyx.in:
6531         * python/dbus_h_wrapper.h:
6532
6533         Pieces for Pyrex to operate on, building a dbus_bindings.so
6534         python module for low-level access to the DBus APIs.
6535         
6536         * python/dbus.py:
6537
6538         High-level Python module for accessing DBus objects.
6539
6540         * configure.in:
6541         * Makefile.am:
6542
6543         Build stuff for the python bindings.
6544
6545         * acinclude.m4:
6546
6547         Extra macro needed for finding the Python C header files.
6548
6549 2003-09-21  Havoc Pennington  <hp@pobox.com>
6550
6551         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
6552         implementing the proxy manager, didn't get very far.
6553
6554         * dbus/dbus-bus.c (dbus_bus_add_match): new
6555         (dbus_bus_remove_match): new
6556
6557         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
6558         path_name argument; adjust the other not-yet-implemented 
6559         gproxy constructors to be what I think they should be.
6560
6561 2003-09-21  Havoc Pennington  <hp@pobox.com>
6562
6563         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
6564         by default for message bus connections.
6565
6566         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
6567         exit_on_disconnect flag is set and we process the disconnected
6568         signal.
6569         (dbus_connection_set_exit_on_disconnect): new function
6570
6571 2003-09-21  Havoc Pennington  <hp@pobox.com>
6572
6573         Get matching rules mostly working in the bus; only actually
6574         parsing the rule text remains. However, the client side of
6575         "signal connections" hasn't been started, this patch is only the
6576         bus side.
6577         
6578         * dbus/dispatch.c: fix for the matching rules changes
6579         
6580         * bus/driver.c (bus_driver_handle_remove_match)
6581         (bus_driver_handle_add_match): send an ack reply from these
6582         method calls
6583
6584         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
6585         arguments, reported by Seth Nickell
6586
6587         * bus/config-parser.c (append_rule_from_element): support
6588         eavesdrop=true|false attribute on policies so match rules 
6589         can be prevented from snooping on the system bus.
6590
6591         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
6592         and "destination" in attribute names; fix some docs bugs; 
6593         add eavesdrop=true|false attribute
6594
6595         * bus/driver.c (bus_driver_handle_add_match)
6596         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
6597         messages
6598
6599         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
6600         rid of broadcast service concept, signals are just always broadcast
6601
6602         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
6603         mostly implement matching rules stuff (currently only exposed as signal
6604         connections)
6605
6606 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
6607
6608         * doc/dbus-specification.sgml: Change the header field name
6609         to be an enum and update the rest of the spec to reference
6610         the fields using the conventinal name.
6611
6612         * dbus/dbus-protocol.h: update to reflect the spec.
6613
6614         * doc/TODO: add item to remove the 4 byte alignment requirement.
6615         
6616         * dbus/dbus-message.c: Remove the code to generalise the
6617         header/body length and serial number header fields as named
6618         header fields so we can reference field names using the 
6619         protocol values.
6620         (append_int_field), (append_uint_field), (append_string_field):
6621         Append the field name as a byte rather than four chars.
6622         (delete_int_or_uint_field), (delete_string_field): reflect the
6623         fact that the field name and typecode now occupy 4 bytes instead
6624         of 8.
6625         (decode_string_field), (decode_header_data): update to reflect
6626         protocol changes and move the field specific encoding from
6627         decode_string_field() back into decode_header_data().
6628         
6629         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
6630         Add utility to aid debugging.
6631         
6632         * dbus/dbus-message-builder.c:
6633         (append_string_field), (_dbus_message_data_load): Update to
6634         reflect protocol changes; Change the FIELD_NAME directive
6635         to HEADER_FIELD and allow it to take the field's conventional
6636         name rather than the actual value.
6637         
6638         * test/data/*/*.message: Update to use HEADER_FIELD instead
6639         of FIELD_NAME; Always align the header on an 8 byte boundary
6640         *before* updating the header length.
6641
6642 2003-09-15  Havoc Pennington  <hp@pobox.com>
6643
6644         * dbus/dbus-pending-call.c: add the get/set object data
6645         boilerplate as for DBusConnection, etc. Use generic object data
6646         for the notify callback.
6647
6648         * glib/dbus-gparser.c (parse_node): parse child nodes
6649
6650         * tools/dbus-viewer.c: more hacking on the dbus-viewer
6651         
6652         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
6653         contain functions shared between the convenience lib and the
6654         installed lib
6655
6656         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
6657         -export-symbols-regex to the GLib library
6658
6659         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
6660         fix the locking in here, and add a default handler for
6661         Introspect() that just returns sub-nodes.
6662
6663 2003-09-14  Havoc Pennington  <hp@pobox.com>
6664
6665         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
6666         rather than gfoo consistent
6667
6668         * glib/dbus-gproxy.h: delete for now, move contents to
6669         dbus-glib.h, because the include files don't work right since we
6670         aren't in the dbus/ subdir.
6671         
6672         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
6673         (dbus_gproxy_end_call): finish
6674         (dbus_gproxy_begin_call): finish
6675
6676         * glib/dbus-gmain.c (dbus_set_g_error): new
6677
6678         * glib/dbus-gobject.c (handle_introspect): include information
6679         about child nodes in the introspection
6680
6681         * dbus/dbus-connection.c (dbus_connection_list_registered): new
6682         function to help in implementation of introspection
6683
6684         * dbus/dbus-object-tree.c
6685         (_dbus_object_tree_list_registered_and_unlock): new function
6686
6687 2003-09-12  Havoc Pennington  <hp@pobox.com>
6688
6689         * glib/dbus-gidl.h: add common base class for all the foo_info
6690         types
6691
6692         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
6693         similar to kdcop
6694
6695         * test/Makefile.am: try test srcdir -ef . in addition to test
6696         srcdir = ., one of them should work (yeah lame)
6697         
6698         * glib/Makefile.am: build the "idl" parser stuff as a convenience
6699         library
6700         
6701         * glib/dbus-gparser.h: make description_load routines return
6702         NodeInfo* not Parser*
6703
6704         * Makefile.am (SUBDIRS): build test dir after all library dirs
6705
6706         * configure.in: add GTK+ detection
6707
6708 2003-09-07  Havoc Pennington  <hp@pobox.com>
6709
6710         * Make Doxygen contented.
6711
6712 2003-09-07  Havoc Pennington  <hp@pobox.com>
6713
6714         * doc/dbus-specification.sgml: more updates
6715
6716 2003-09-06  Havoc Pennington  <hp@pobox.com>
6717
6718         * doc/dbus-specification.sgml: partial updates
6719
6720         * bus/dbus-daemon-1.1.in: fix the config file docs for the
6721         zillionth time; hopefully I edited the right file this time.
6722
6723         * bus/config-parser.c (append_rule_from_element): support
6724         send_type, send_path, receive_type, receive_path
6725
6726         * bus/policy.c: add message type and path to the list of things
6727         that can be "firewalled"
6728
6729 2003-09-06  Havoc Pennington  <hp@pobox.com>
6730
6731         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
6732         (dbus_connection_register_object_path): make this not handle
6733         messages to paths below the given path
6734
6735 2003-09-03  Havoc Pennington  <hp@pobox.com>
6736
6737         * test/glib/Makefile.am: add this with random glib-linked test
6738         programs
6739
6740         * glib/Makefile.am: remove the random test programs from here,
6741         leave only the unit tests
6742
6743         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
6744         uscore/javacaps conversion, and fix     
6745         (get_object_property, set_object_property): change to .NET
6746         convention for mapping props to methods, set_FooBar/get_FooBar, 
6747         since one language has such a convention we may as well copy it. 
6748         Plus real methods in either getFooBar or get_foo_bar style won't 
6749         collide with this convention.
6750
6751 2003-09-01  Havoc Pennington  <hp@pobox.com>
6752
6753         * glib/dbus-gparser.c: implement
6754
6755         * glib/dbus-gobject.c: start implementing skeletons support
6756
6757         * configure.in: when disabling checks/assert, also define
6758         G_DISABLE_ASSERT and G_DISABLE_CHECKS
6759
6760 2003-09-01  Havoc Pennington  <hp@pobox.com>
6761
6762         * glib/Makefile.am: rearrange a bunch of files and get "make
6763         check" framework set up
6764
6765 2003-08-31  Havoc Pennington  <hp@pobox.com>
6766
6767         * fix build with --disable-tests
6768
6769 2003-08-30  Havoc Pennington  <hp@pobox.com>
6770
6771         * dbus/dbus-connection.c: purge DBusMessageHandler
6772
6773         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
6774         use callbacks everywhere
6775
6776 2003-08-30  Havoc Pennington  <hp@pobox.com>
6777
6778         * test/data/valid-config-files/system.d/test.conf: change to 
6779         root for the user so warnings don't get printed
6780
6781         * dbus/dbus-message.c: add dbus_message_get_path,
6782         dbus_message_set_path
6783         
6784         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
6785         dispatching to a path
6786
6787         * dbus/dbus-string.c (_dbus_string_validate_path): add
6788
6789         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
6790         (_dbus_marshal_object_path): implement
6791
6792         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
6793         to contain the path to the target object
6794         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
6795         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
6796
6797 2003-08-30  Havoc Pennington  <hp@pobox.com>
6798
6799         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
6800
6801 2003-08-29  Havoc Pennington  <hp@pobox.com>
6802
6803         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
6804         registered
6805         (struct DBusObjectSubtree): shrink this
6806         a lot, since we may have a lot of them
6807         (_dbus_object_tree_free_all_unlocked): implement
6808         (_dbus_object_tree_dispatch_and_unlock): implement
6809
6810 2003-08-29  Havoc Pennington  <hp@pobox.com>
6811
6812         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
6813
6814 2003-08-28  Havoc Pennington  <hp@pobox.com>
6815
6816         purge DBusObjectID
6817         
6818         * dbus/dbus-connection.c: port to no ObjectID, create a
6819         DBusObjectTree, rename ObjectTree to ObjectPath in public API
6820
6821         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
6822         everything except UnregisterFunction and MessageFunction
6823         
6824         * dbus/dbus-marshal.c: port away from DBusObjectID, 
6825         add DBUS_TYPE_OBJECT_PATH
6826         
6827         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
6828         dbus/dbus-objectid.[hc]: remove these, we are moving to 
6829         path-based object IDs
6830
6831 2003-08-25  Havoc Pennington  <hp@pobox.com>
6832
6833         Just noticed that dbus_message_test is hosed, I wonder when I
6834         broke that. I thought make check was passing earlier...
6835         
6836         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
6837         container tree, will replace most of dbus-object-registry
6838
6839         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
6840         screwup
6841
6842 2003-08-19  Havoc Pennington  <hp@pobox.com>
6843
6844         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
6845         (dbus_message_is_error): fix this function
6846
6847         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
6848         match
6849
6850         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
6851         reflect clarified man page
6852         (bus_client_policy_check_can_send): ditto
6853         
6854         * bus/session.conf.in: fixup
6855
6856         * bus/system.conf.in: fixup
6857
6858 2003-08-18  Havoc Pennington  <hp@redhat.com>
6859
6860         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
6861
6862         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6863         dumb bug created earlier (wrong order of args to
6864         decode_header_data())
6865         
6866         * tools/dbus-send.c: port
6867
6868         * tools/dbus-print-message.c (print_message): port
6869
6870         * test/data/*messages: port all messages over
6871         
6872         * dbus/dbus-message-builder.c: support including 
6873         message type
6874         
6875         * bus/driver.c: port over
6876         
6877         * bus/dispatch.c: port over to new stuff
6878
6879         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6880         rename disconnect signal to "Disconnected"
6881
6882 2003-08-17  Havoc Pennington  <hp@pobox.com>
6883
6884         This doesn't compile yet, but syncing up so I can hack on it from
6885         work. What are branches for if not broken code? ;-)
6886         
6887         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
6888         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
6889         DBUS_HEADER_FIELD_ERROR_NAME
6890         
6891         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
6892         for the interface+member pairs
6893         (string_hash): change to use g_str_hash algorithm
6894         (find_direct_function, find_string_function): refactor these to
6895         share most code.
6896         
6897         * dbus/dbus-message.c: port all of this over to support 
6898         interface/member fields instead of name field
6899
6900         * dbus/dbus-object-registry.c: port over
6901         
6902         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
6903         from _dbus_string_validate_name
6904
6905         * bus/dbus-daemon-1.1: change file format for the 
6906         <deny>/<allow> stuff to match new message naming scheme
6907
6908         * bus/policy.c: port over
6909
6910         * bus/config-parser.c: parse new format
6911         
6912 2003-08-16  Havoc Pennington  <hp@pobox.com>
6913
6914         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
6915         broken assertion
6916
6917         * glib/dbus-gproxy.c: some hacking
6918
6919 2003-08-15  Havoc Pennington  <hp@redhat.com>
6920
6921         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
6922
6923         * dbus/dbus-connection.c
6924         (dbus_connection_send_with_reply_and_block): factor out internals;
6925         change to convert any error replies to DBusError instead of 
6926         returning them as a message
6927
6928 2003-08-15  Havoc Pennington  <hp@pobox.com>
6929
6930         * dbus/dbus-connection.c, 
6931         dbus/dbus-pending-call.c: Finish the pending call stuff
6932
6933 2003-08-14  Havoc Pennington  <hp@redhat.com>
6934
6935         * dbus/dbus-pending-call.c: start on new object that will replace
6936         DBusMessageHandler and ReplyHandlerData for tracking outstanding
6937         replies
6938
6939         * dbus/dbus-gproxy.c: start on proxy object used to communicate
6940         with remote interfaces
6941
6942         * dbus/dbus-gidl.c: do the boring boilerplate in here
6943         
6944 2003-08-12  Havoc Pennington  <hp@pobox.com>
6945
6946         * bus/dispatch.c (bus_dispatch): make this return proper 
6947         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
6948
6949         * dbus/dbus-errors.c (dbus_set_error): use
6950         _dbus_string_append_printf_valist
6951
6952         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
6953         (_dbus_string_append_printf): new
6954
6955         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
6956         UNKNOWN_METHOD
6957
6958         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
6959         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
6960         message is unhandled.
6961
6962 2003-08-11  Havoc Pennington  <hp@pobox.com>
6963
6964         * bus/test.c (client_disconnect_handler): change to return
6965         HANDLED (would have been REMOVE_MESSAGE)
6966
6967         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
6968         HANDLED/NOT_YET_HANDLED instead of
6969         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
6970         should be used.
6971
6972 2003-08-10  Havoc Pennington  <hp@pobox.com>
6973
6974         * tools/dbus-send.c (main): add --type argument, for now
6975         supporting only method_call and signal types.
6976
6977         * tools/dbus-print-message.c: print message type
6978
6979         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6980         init connection->objects
6981
6982         * doc/dbus-specification.sgml: fix sgml
6983
6984         * bus/*.c: port over to object-instance API changes
6985
6986         * test/test-service.c: ditto
6987         
6988         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
6989         name, we will have to fix up the rest of the code to also handle
6990         this
6991         (dbus_message_new): generic message-creation call
6992         (set_string_field): allow appending name field
6993
6994 2003-08-06  Havoc Pennington  <hp@pobox.com>
6995
6996         * dbus/dbus-object-registry.c: implement signal connection 
6997         and dispatch
6998
6999         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
7000
7001         * dbus/dbus-internals.c (_dbus_memdup): new function
7002
7003 2003-08-02  Havoc Pennington  <hp@pobox.com>
7004
7005         * dbus/dbus-message.c (dbus_message_get_no_reply)
7006         (dbus_message_set_no_reply): add these and remove
7007         set_is_error/get_is_error
7008
7009         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
7010         remove the ERROR flag, since there's now an ERROR type
7011
7012 2003-08-01  Havoc Pennington  <hp@pobox.com>
7013
7014         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
7015         implement
7016
7017         * dbus/dbus-message.c (dbus_message_get_type): new function
7018
7019         * doc/dbus-specification.sgml: add "type" byte to messages
7020
7021 2003-08-01  Havoc Pennington  <hp@pobox.com>
7022
7023         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
7024         a message type enum to distinguish kinds of message
7025         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
7026         that need not be replied to
7027
7028 2003-08-01  Havoc Pennington  <hp@pobox.com>
7029
7030         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
7031         (unpack_8_octets): fix no-64-bit-int bug
7032
7033         * dbus/dbus-object-registry.c (validate_id): validate the 
7034         connection ID bits, not just the instance ID.
7035
7036         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
7037         the connection-global 33 bits of the object ID
7038
7039         * dbus/dbus-object-registry.c (info_from_entry): fill in 
7040         object ID in the new way
7041
7042         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
7043         define server/client/instance bits.
7044
7045 2003-07-30  Havoc Pennington  <hp@pobox.com>
7046
7047         * dbus/dbus-connection.c (dbus_connection_register_object): fix
7048         build
7049
7050 2003-07-13  Havoc Pennington  <hp@pobox.com>
7051
7052         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
7053         fields to DBusObjectVTable and DBusObjectInfo
7054
7055 2003-07-12  Havoc Pennington  <hp@pobox.com>
7056
7057         * dbus/dbus-object-registry.c: implement unit test,
7058         fix bugs discovered in process
7059
7060         * dbus/dbus-connection.c: remove handler_table and
7061         register_handler(), add DBusObjectRegistry usage
7062
7063         * dbus/dbus-objectid.c (dbus_object_id_is_null)
7064         (dbus_object_id_set_null): new functions
7065
7066 2003-07-08  Havoc Pennington  <hp@pobox.com>
7067
7068         * dbus/dbus-object.c: implement some of this
7069
7070         * dbus/dbus-object-registry.c
7071         (_dbus_object_registry_add_and_unlock): fill in the object_id out
7072         param
7073         (_dbus_object_registry_new): handle OOM
7074
7075 2003-07-08  Havoc Pennington  <hp@pobox.com>
7076
7077         * dbus/dbus-object.h: sketch out an API for registering objects
7078         with a connection, that allows us to use as little as 24 bytes
7079         per object and lets application code represent an object in 
7080         any conceivable way.
7081
7082         * dbus/dbus-object-registry.c: implement the hard bits of the
7083         DBusConnection aspect of object API. Not yet wired up.
7084         
7085 2003-07-06  Havoc Pennington  <hp@pobox.com>
7086
7087         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
7088         (_dbus_marshal_object_id): new
7089         (_dbus_demarshal_object_id): new
7090         (_dbus_marshal_get_arg_end_pos): support object ID type, and
7091         consolidate identical switch cases. Don't conditionalize handling
7092         of DBUS_TYPE_UINT64, need to handle the type always.
7093         (_dbus_marshal_validate_arg): consolidate identical cases, and
7094         handle DBUS_TYPE_OBJECT_ID
7095
7096         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
7097
7098         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
7099
7100 2003-09-28  Havoc Pennington  <hp@pobox.com>
7101
7102         * real 0.13 release
7103
7104 2003-09-28  Havoc Pennington  <hp@pobox.com>
7105
7106         * doc/Makefile.am (dbus-specification.html): testing a funky hack
7107         to work with Debian db2html
7108
7109 2003-09-28  Havoc Pennington  <hp@pobox.com>
7110
7111         * configure.in: 0.13
7112
7113         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
7114         stylesheet-images for benefit of Debian
7115         
7116         Change back to using filesystem-linked sockets for the system
7117         bus, so only root can create the default system bus address.
7118         
7119         * bus/system.conf.in: change to use
7120         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7121
7122         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
7123         from here.
7124
7125         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7126         here, and AC_DEFINE DBUS_SYSTEM_PATH
7127
7128 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7129
7130         * doc/TODO:
7131         * doc/busconfig.dtd:
7132         Add busconfig DTD.
7133         
7134 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7135
7136         * doc/dbus-specification.sgml:
7137         Add activation reply values.
7138         
7139 2003-08-05  Havoc Pennington  <hp@redhat.com>
7140
7141         * configure.in: 0.12
7142
7143 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
7144
7145         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
7146         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
7147         (add_watch), (remove_watch), (create_source):
7148         Refcount fds, fixes some reentrancy issues.
7149         
7150 2003-07-30  Havoc Pennington  <hp@redhat.com>
7151
7152         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
7153         bus address to be abstract if we have abstract sockets
7154
7155         * NEWS: update
7156
7157 2003-07-28  Havoc Pennington  <hp@redhat.com>
7158
7159         * bus/messagebus.in: fix to avoid processname/servicename 
7160         confusion, from Michael Kearey
7161         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
7162         
7163 2003-07-23  Havoc Pennington  <hp@pobox.com>
7164
7165         * dbus/dbus-message.c (dbus_message_iter_get_named): 
7166         fix from Andy Hanton to remove broken "+1"
7167
7168 2003-07-16  Havoc Pennington  <hp@pobox.com>
7169
7170         * tools/dbus-launch.c (babysit): close stdout/stderr in the
7171         babysitter process, as suggested by Thomas Leonard, so 
7172         an "eval `dbus-launch --exit-with-session`" will actually 
7173         return
7174
7175 2003-07-16  Havoc Pennington  <hp@pobox.com>
7176
7177         * configure.in: print out EXPANDED_* variables in the summary at
7178         the end; clean up the code that computes EXPANDED_ variables and
7179         get the ones using exec_prefix right. Should make things work
7180         when you build without --prefix
7181
7182 2003-06-29  Havoc Pennington  <hp@pobox.com>
7183
7184         * mono/Test.cs (class Test): fire up a main loop and run it
7185
7186         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
7187         done once, the app has to do it
7188
7189 2003-06-26  Havoc Pennington  <hp@pobox.com>
7190
7191         * mono/Connection.cs: set up connection with the glib main loop
7192
7193 2003-07-01  Havoc Pennington  <hp@redhat.com>
7194
7195         * doc/dbus-specification.sgml: clarify the format of a type code,
7196         change suggested by Jim Blandy
7197
7198 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
7199
7200         * doc/Makefile.am:
7201         * tools/Makefile.am: Don't assume srcdir == builddir.
7202
7203         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
7204         the allocated block.
7205         (_dbus_memory_test): New function.
7206         * dbus/dbus-test.h: Add _dbus_memory_test ().
7207         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
7208
7209         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
7210         of %c%c%c%c.
7211         (dbus_message_new): Remove obsolete @todo.
7212
7213         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
7214         (_dbus_marshal_set_uint64): Fix comment.
7215
7216         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
7217         hardcode FIELD_REPLY_SERIAL.
7218
7219         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
7220         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
7221
7222         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
7223         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
7224
7225 2003-06-24  Havoc Pennington  <hp@pobox.com>
7226
7227         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
7228
7229 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
7230
7231         * configure.in:
7232         * gcj/.cvsignore:
7233         * gcj/Hello.java:
7234         * gcj/Makefile.am:
7235         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
7236         * gcj/org/.cvsignore:
7237         * gcj/org/Makefile.am:
7238         * gcj/org/freedesktop/.cvsignore:
7239         * gcj/org/freedesktop/Makefile.am:
7240         * gcj/org/freedesktop/dbus/.cvsignore:
7241         * gcj/org/freedesktop/dbus/Makefile.am:
7242         * gcj/org/freedesktop/dbus/Message.java: (Message),
7243         (Message.Message):
7244         * gcj/org/freedesktop/dbus/natMessage.cc:
7245         Fix the build system.
7246
7247 2003-06-22  Havoc Pennington  <hp@pobox.com>
7248
7249         * mono/Connection.cs: add more bindings
7250
7251         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
7252         more than once.
7253
7254 2003-06-22  Havoc Pennington  <hp@pobox.com>
7255
7256         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
7257         Start wrapping more stuff.
7258
7259 2003-06-22  Havoc Pennington  <hp@pobox.com>
7260
7261         * mono/Message.cs: implement Message.Wrap() that ensures we only
7262         have a single C# wrapper per DBusMessage, assuming it works which
7263         it probably doesn't.
7264
7265         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
7266         (dbus_message_free_data_slot): new
7267         (dbus_message_set_data): new
7268         (dbus_message_get_data): new
7269
7270 2003-06-22  Havoc Pennington  <hp@pobox.com>
7271
7272         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
7273         (_dbus_data_slot_allocator_alloc): rework these to keep a
7274         reference count on each slot and automatically manage a global
7275         slot ID variable passed in by address
7276
7277         * bus/bus.c: convert to new dataslot API
7278
7279         * dbus/dbus-bus.c: convert to new dataslot API
7280
7281         * dbus/dbus-connection.c: convert to new dataslot API
7282
7283         * dbus/dbus-server.c: convert to new dataslot API
7284
7285         * glib/dbus-gmain.c: ditto
7286
7287         * bus/test.c: ditto
7288
7289         * bus/connection.c: ditto
7290
7291 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
7292
7293         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
7294         after the gcj checks so that the correct configuration tags
7295         will be added to libtool.
7296
7297         * dbus-glib-1.pc.in: No need to specify any includes since
7298         dbus-1.pc.in has those.
7299
7300 2003-06-22  Havoc Pennington  <hp@pobox.com>
7301
7302         * mono/*, gcj/*, configure.in, Makefile.am:
7303         Check in makefiles and subdirs for mono and gcj bindings.
7304         Neither binding actually exists, just trying to get through
7305         all the build and other boring bits.
7306
7307 2003-06-21  Philip Blundell  <philb@gnu.org>
7308
7309         * tools/dbus-monitor.1: Updated.
7310
7311         * tools/dbus-send.1: Likewise.
7312
7313 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
7314
7315         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
7316         for hangup and error after checking read so we won't discard
7317         pending data if both hangup and read are set.
7318
7319 2003-06-19  Philip Blundell  <philb@gnu.org>
7320
7321         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
7322
7323         * tools/dbus-send.c: Accept both --system and --session.
7324
7325         * tools/dbus-monitor.c: Same here.
7326
7327 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
7328
7329         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
7330         from C++ (Patch by Miloslav Trmac).
7331
7332 2003-06-15  Joe Shaw  <joe@assbarn.com>
7333
7334         * configure.in: Check for socklen_t.
7335
7336         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
7337
7338         * test/test-segfault.c: Add #include <sys/time.h>
7339
7340         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
7341         dbus-launch needs it.
7342
7343 2003-06-09  Havoc Pennington  <hp@redhat.com>
7344
7345         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
7346         SUN_LEN, it breaks abstract socket usage
7347
7348         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
7349         starts of lines.
7350
7351 2003-06-04  Havoc Pennington  <hp@pobox.com>
7352
7353         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
7354         using unix:abstract=/foo, and when listening in a tmpdir
7355         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
7356
7357         * dbus/dbus-transport.c (_dbus_transport_open): support
7358         unix:abstract=/foo
7359
7360         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7361         support abstract sockets
7362
7363         * dbus/dbus-transport-unix.c
7364         (_dbus_transport_new_for_domain_socket): support abstract sockets
7365
7366         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
7367         toggle as an argument, implement abstract namespace support
7368         (_dbus_listen_unix_socket): ditto
7369
7370         * configure.in: add --enable-abstract-sockets and implement
7371         a configure check for autodetection of the right value.
7372
7373 2003-06-01  Havoc Pennington  <hp@pobox.com>
7374
7375         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
7376         in /tmp (though on Linux this will end up being useless,
7377         when we add abstract namespace support)
7378
7379         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
7380         subst'ing it
7381
7382 2003-05-28  Colin Walters  <walters@verbum.org>
7383
7384         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
7385
7386 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
7387
7388         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
7389
7390 2003-05-17  Colin Walters  <walters@gnu.org>
7391
7392         * tools/dbus-send.c: Don't exit with an error code if --help was
7393         passed.  Default to using the session bus instead of the system
7394         one.
7395
7396         * tools/dbus-launch.c: Ditto.
7397
7398         * tools/dbus-monitor.c: Ditto.
7399
7400         * tools/dbus-send.1: Update with new arguments.
7401
7402         * tools/dbus-launch.c: Emit code to export variables.  New
7403         arguments -s and -c to specify shell syntax, and a bit of code to
7404         autodetect syntax.  Also, allow specifying a program to run.
7405
7406         * tools/dbus-launch.1: Update with new arguments.
7407
7408         * tools/dbus-send.1: Ditto.
7409
7410         * tools/dbus-monitor.1: Ditto.
7411
7412 2003-05-17  Havoc Pennington  <hp@pobox.com>
7413
7414         * bus/config-parser.c (merge_included): merge in policies from
7415         child configuration file.
7416
7417         * bus/policy.c (bus_policy_merge): function to merge two policies
7418         together
7419
7420 2003-05-16  Havoc Pennington  <hp@redhat.com>
7421
7422         * dbus/dbus-connection.c: disable verbose lock spew
7423
7424         * tools/dbus-send.c: add --print-reply command line option
7425
7426         * tools/dbus-print-message.h (print_message): new util function
7427         shared by dbus-send and dbus-monitor
7428
7429         * tools/dbus-monitor.c (handler_func): exit on disconnect
7430
7431         * dbus/dbus-transport-unix.c (do_reading): if the transport is
7432         disconnected, don't try to use the read_watch
7433
7434         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
7435         so we can find this bug more easily
7436
7437 2003-05-16  Havoc Pennington  <hp@redhat.com>
7438
7439         * bus/policy.c (free_rule_list_func): avoid a crash when passed
7440         NULL as DBusHashTable is annoyingly likely to do.
7441
7442 2003-05-16  Colin Walters  <walters@verbum.org>
7443
7444         * tools/dbus-monitor.c: Add --session argument and usage()
7445         function.
7446
7447         * tools/dbus-monitor.1: Update with new --session arg.
7448
7449         * bus/Makefile.am (install-data-hook): Create
7450         $(libdir)/dbus-1.0/services so that the session bus is happy.
7451
7452 2003-05-15  Havoc Pennington  <hp@redhat.com>
7453
7454         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
7455         on non-x86. ifdef's are evil.
7456
7457 2003-05-15  Havoc Pennington  <hp@redhat.com>
7458
7459         * configure.in: 0.11
7460
7461         * NEWS: update
7462
7463         * bus/Makefile.am (initddir): apparently we are supposed to put
7464         init scripts in /etc/rc.d/init.d not /etc/init.d
7465
7466         * bus/Makefile.am: remove the "you must --enable-tests to make
7467         check" as it broke distcheck
7468
7469         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
7470
7471 2003-05-13  James Willcox  <jwillcox@gnome.org>
7472
7473         * configure.in:
7474         * bus/activation.c: (bus_activation_service_created),
7475         (bus_activation_activate_service):
7476         * bus/driver.c: (bus_driver_send_service_deleted),
7477         (bus_driver_send_service_created), (bus_driver_send_service_lost),
7478         (bus_driver_send_service_acquired),
7479         (bus_driver_send_welcome_message),
7480         (bus_driver_handle_list_services):
7481         * bus/session.conf.in:
7482         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
7483         (dbus_bus_service_exists), (dbus_bus_activate_service):
7484         * dbus/dbus-bus.h:
7485
7486         Add some convenience API which lets you activate a service, and did a
7487         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
7488         and dbus_message_get_args()
7489
7490 2003-05-11  Havoc Pennington  <hp@pobox.com>
7491
7492         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
7493         calling _dbus_marshal_validate_arg() for every byte in a byte
7494         array, etc.
7495
7496         * dbus/dbus-message-handler.c: use atomic reference counting to
7497         reduce number of locks slightly; the global lock in here sucks
7498
7499         * dbus/dbus-connection.c
7500         (_dbus_connection_update_dispatch_status_and_unlock): variant of
7501         update_dispatch_status that can be called with lock held; then use
7502         in a couple places to reduce locking/unlocking
7503         (dbus_connection_send): hold the lock over the whole function
7504         instead of acquiring it twice.
7505
7506         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
7507
7508         * bus/connection.c (bus_connections_setup_connection): fix access
7509         to already-freed memory.
7510
7511         * dbus/dbus-connection.c: keep a little cache of linked list
7512         nodes, to avoid using the global linked list alloc lock in the
7513         normal send-message case. Instead we just use the connection lock
7514         that we already have to take.
7515
7516         * dbus/dbus-list.c (_dbus_list_find_last): new function
7517
7518         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
7519         change to use a struct for the atomic type; fix docs,
7520         they return value before increment, not after increment.
7521
7522         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
7523         (_dbus_string_append_8_aligned): new functions to try to
7524         microoptimize this operation.
7525         (reallocate_for_length): break this out of set_length(), to
7526         improve profile info, and also so we can consider inlining the
7527         set_length() part.
7528
7529         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
7530         strings with some preallocation, cuts down on our calls to realloc
7531         a fair bit. Though if we can get the "move entire string to empty
7532         string" optimization below to kick in here, it would be better.
7533
7534         * dbus/dbus-string.c (_dbus_string_move): just call
7535         _dbus_string_move_len
7536         (_dbus_string_move_len): add a special case for moving
7537         an entire string into an empty string; we can just
7538         swap the string data instead of doing any reallocs.
7539         (_dbus_string_init_preallocated): new function
7540
7541 2003-05-11  Havoc Pennington  <hp@pobox.com>
7542
7543         Write a "test-profile" that does echo client-server with threads;
7544         profile reveals lock contention, memcpy/realloc of buffers, and
7545         UTF-8 validation as hot spots. 20% of lock contention eliminated
7546         with dbus_atomic_inc/dec implementation on x86.  Much remaining
7547         contention is global mempool locks for GList and DBusList.
7548
7549         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
7550         x86 implementation
7551
7552         * dbus/dbus-connection.c (struct DBusConnection): use
7553         dbus_atomic_t for the reference count
7554
7555         * dbus/dbus-message.c (struct DBusMessage): declare
7556         dbus_atomic_t values as volatile
7557
7558         * configure.in: code to detect ability to use atomic integer
7559         operations in assembly, from GLib patch
7560
7561         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
7562         time, tired of it being wrong in threads and forked processes
7563
7564         * glib/test-profile.c: a little program to bounce messages back
7565         and forth between threads and eat CPU
7566
7567         * dbus/dbus-connection.c: add debug spew macros for debugging
7568         thread locks; include config.h at top; fix deadlock in
7569         dbus_connection_flush()
7570
7571 2003-05-08  Havoc Pennington  <hp@pobox.com>
7572
7573         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
7574         data from getting written, and there wasn't a good reason to
7575         use _exit really.
7576
7577         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
7578         dbus_verbose lines in test coverage
7579         (main): add list of functions sorted by # of untested blocks
7580         to the coverage report
7581
7582         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
7583
7584         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
7585
7586         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
7587         extend test coverage
7588
7589         * test/data/auth/cancel.auth-script: test canceling an
7590         authentication
7591
7592         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
7593         aren't used. in CVS history if we end up needing them.
7594
7595 2003-05-04  Havoc Pennington  <hp@pobox.com>
7596
7597         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
7598         unit test
7599
7600         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
7601         function, which assumed length was in # of strings, not bytes
7602
7603         * dbus/dbus-message.c (_dbus_message_test): add tests for some
7604         missing coverage
7605
7606         * dbus/dbus-connection.c
7607         (_dbus_connection_queue_received_message): disable function for
7608         now, we are only using it in test mode
7609
7610         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7611         remove a mistaken FIXME
7612
7613 2003-05-04  Havoc Pennington  <hp@pobox.com>
7614
7615         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
7616         unlock mutex on successful return, patch from Anders Gustafsson
7617
7618 2003-05-04  Havoc Pennington  <hp@pobox.com>
7619
7620         * dbus-glib-1.pc.in (Requires): fix dependencies, from
7621         Anders Gustafsson
7622
7623 2003-05-04  Havoc Pennington  <hp@pobox.com>
7624
7625         * tools/dbus-launch.c: implement
7626
7627         * bus/main.c (main), bus/bus.c (bus_context_new):
7628         implement --print-pid and --fork
7629
7630 2003-05-03  Havoc Pennington  <hp@redhat.com>
7631
7632         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
7633         the address had no value, and add to test suite. Fix and
7634         regression test from Miloslav Trmac
7635
7636 2003-05-03  Havoc Pennington  <hp@pobox.com>
7637
7638         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
7639         watch is invalid when handled
7640
7641         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
7642         dbus-launch utility to launch the bus from a shell script.  Didn't
7643         actually implement dbus-launch yet, it's just a placeholder still.
7644
7645 2003-05-03  Havoc Pennington  <hp@pobox.com>
7646
7647         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
7648         daemon; also documents daemon config file, so replaces
7649         doc/config-file.txt. Corrected some stuff from config-file.txt in
7650         the process of moving it.
7651
7652 2003-05-03  Havoc Pennington  <hp@pobox.com>
7653
7654         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
7655         add some man pages
7656
7657 2003-05-03  Colin Walters  <walters@verbum.org>
7658
7659         * dbus/dbus-sysdeps.c (fill_user_info): Test against
7660         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
7661
7662         * Makefile.am: Update to use new .pc versioning scheme.
7663
7664 2003-05-02  Havoc Pennington  <hp@redhat.com>
7665
7666         * bus/system.conf.in: allow send/receive to/from message bus
7667         service
7668
7669 2003-04-30  Havoc Pennington  <hp@redhat.com>
7670
7671         * configure.in: print a note when building with unit tests and
7672         without assertions
7673
7674 2003-04-30  Havoc Pennington  <hp@redhat.com>
7675
7676         * Makefile.am: add a check-local that complains if you didn't
7677         configure with --enable-tests
7678
7679 2003-04-29  Havoc Pennington  <hp@redhat.com>
7680
7681         * glib/dbus-gmain.c: docs cleanups
7682
7683         * dbus/dbus-types.h: add docs on int64 types
7684
7685         * dbus/dbus-memory.c: fix docs to avoid putting private API in
7686         public API docs section
7687
7688 2003-04-29  Havoc Pennington  <hp@redhat.com>
7689
7690         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
7691         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
7692         parallel install API version, not with the D-BUS package version.
7693
7694         * HACKING: move some of README over here
7695
7696         * README: updates, and document API/ABI policy
7697
7698         * configure.in: reindentation
7699
7700 2003-04-29  Havoc Pennington  <hp@redhat.com>
7701
7702         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
7703         to use this library" to be sure people have the right
7704         expectations.
7705
7706 2003-04-28  Havoc Pennington  <hp@redhat.com>
7707
7708         * configure.in: add --enable-docs which by default is auto yes if
7709         doxygen and db2html found, no otherwise; but can be forced on/off
7710
7711         * doc/Makefile.am: conditionalize whether to build docs on
7712         --enable-docs
7713
7714 2003-04-28  Havoc Pennington  <hp@redhat.com>
7715
7716         * configure.in: 0.10
7717
7718         * NEWS: update
7719
7720         * bus/system.conf.in: add <includedir>system.d</includedir>
7721
7722         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
7723         username was provided but not uid
7724
7725         * bus/config-parser.c (struct BusConfigParser): keep track of
7726         whether the parser is toplevel or was included; change some
7727         of the error handling if it's included.
7728
7729 2003-04-27  Havoc Pennington  <hp@pobox.com>
7730
7731         Unbreak my code...
7732
7733         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
7734         report correct status if we finish processing authentication
7735         inside this function.
7736
7737         * bus/activation.c (try_send_activation_failure): use
7738         bus_transaction_send_error_reply
7739
7740         * bus/connection.c (bus_connection_get_groups): return an error
7741         explaining the problem
7742
7743         * bus/bus.c (bus_context_check_security_policy): implement
7744         restriction here that inactive connections can only send the
7745         hello message. Also, allow bus driver to send anything to
7746         any recipient.
7747
7748         * bus/connection.c (bus_connection_complete): create the
7749         BusClientPolicy here instead of on-demand.
7750         (bus_connection_get_policy): don't return an error
7751
7752         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
7753         sender field in message being replied to
7754
7755         * bus/bus.c (bus_context_check_security_policy): fix silly typo
7756         causing it to return FALSE always
7757
7758         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
7759         we checked sender rather than destination
7760
7761 2003-04-25  Havoc Pennington  <hp@redhat.com>
7762
7763         test suite is slightly hosed at the moment, will fix soon
7764
7765         * bus/connection.c (bus_connections_expire_incomplete): fix to
7766         properly disable the timeout when required
7767         (bus_connection_set_name): check whether we can remove incomplete
7768         connections timeout after we complete each connection.
7769
7770         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
7771         probably still broken.
7772
7773         * bus/services.c (bus_registry_acquire_service): implement max
7774         number of services owned, and honor allow/deny rules on which
7775         services a connection can own.
7776
7777         * bus/connection.c (bus_connection_get_policy): report errors here
7778
7779         * bus/activation.c: implement limit on number of pending
7780         activations
7781
7782 2003-04-25  Havoc Pennington  <hp@redhat.com>
7783
7784         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
7785         where we used >= 0 instead of != DBUS_UID_UNSET.
7786
7787 2003-04-25  Havoc Pennington  <hp@redhat.com>
7788
7789         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
7790         were toggled without add/remove, fix from Anders Gustafsson
7791
7792 2003-04-24  Havoc Pennington  <hp@redhat.com>
7793
7794         * test/data/valid-config-files/basic.conf: add <limit> tags to
7795         this test
7796
7797         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
7798         <limit> tag in configuration file.
7799
7800 2003-04-24  Havoc Pennington  <hp@redhat.com>
7801
7802         * bus/dispatch.c: somehow missed some name_is
7803
7804         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
7805         (_dbus_timeout_set_interval): new
7806
7807         * bus/connection.c (bus_connections_setup_connection): record time
7808         when each connection is first set up, and expire them after the
7809         auth timeout passes.
7810
7811 2003-04-24  Havoc Pennington  <hp@redhat.com>
7812
7813         * dbus/dbus-message.c (dbus_message_name_is): rename
7814         (dbus_message_service_is): rename
7815         (dbus_message_sender_is): rename
7816         (dbus_message_get_service): rename
7817
7818 2003-04-24  Havoc Pennington  <hp@redhat.com>
7819
7820         * configure.in: add --enable-checks
7821
7822         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
7823
7824         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
7825         to use thread locks.
7826         (_dbus_connection_handler_destroyed_locked): move some private
7827         functions into proper docs group
7828
7829         * dbus/dbus-internals.h: add _dbus_return_if_fail,
7830         _dbus_return_val_if_fail
7831
7832         Throughout: use dbus_return_if_fail
7833
7834 2003-04-23  James Willcox  <jwillcox@gnome.org>
7835
7836         * glib/dbus-glib.h:
7837         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
7838         (dbus_connection_setup_with_g_main),
7839         (dbus_server_setup_with_g_main):
7840         * glib/test-dbus-glib.c: (main):
7841         * glib/test-thread-client.c: (main):
7842         * glib/test-thread-server.c: (new_connection_callback), (main):
7843         * tools/dbus-monitor.c: (main):
7844
7845         Added a GMainContext argument to dbus_connection_setup_with_g_main()
7846         and dbus_server_setup_with_g_main().
7847
7848 2003-04-20  Havoc Pennington  <hp@pobox.com>
7849
7850         * doc/dbus-specification.sgml: document the restrictions on
7851         message and service names
7852
7853 2003-04-22  Havoc Pennington  <hp@redhat.com>
7854
7855         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
7856         support, and do some code cleanups to share more code and
7857         speed up array marshal/demarshal.
7858
7859         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
7860
7861         * configure.in: generate dbus-arch-deps.h
7862
7863         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
7864         64-bit typecodes
7865
7866 2003-04-22  Havoc Pennington  <hp@redhat.com>
7867
7868         * test/data/valid-messages/opposite-endian.message: fix test
7869         to use proper type for rply field
7870
7871         * test/data/invalid-messages: add tests for below validation
7872
7873         * dbus/dbus-message.c (decode_header_data): validate field types,
7874         and validate that named fields are valid names
7875         (decode_name_field): consider messages in the
7876         org.freedesktop.Local. namespace to be invalid.
7877
7878         * dbus/dbus-string.c (_dbus_string_validate_name): new
7879
7880 2003-04-19  Havoc Pennington  <hp@pobox.com>
7881
7882         * bus/driver.c (bus_driver_handle_hello): check limits and
7883         return an error if they are exceeded.
7884
7885         * bus/connection.c: maintain separate lists of active and inactive
7886         connections, and a count of each. Maintain count of completed
7887         connections per user. Implement code to check connection limits.
7888
7889         * dbus/dbus-list.c (_dbus_list_unlink): export
7890
7891         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
7892         number of bytes in the message queue for a connection
7893
7894 2003-04-18  Havoc Pennington  <hp@pobox.com>
7895
7896         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
7897
7898         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
7899         memleaks
7900
7901         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
7902         on realloc be sure to update the pointer in the keyring
7903
7904         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
7905         offset to avoid writing to unallocated memory
7906
7907         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
7908         try the next mechanism, so we properly handle OOM
7909
7910         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
7911         on OOM.
7912         (_dbus_keyring_new): fix OOM bug
7913         (_dbus_keyring_new_homedir): always set error; impose a maximum
7914         number of keys we'll load from the file, mostly to speed up the
7915         test suite and make its OOM checks more useful, but also for
7916         general sanity.
7917
7918         * dbus/dbus-auth.c (process_error_server): reject authentication
7919         if we get an error from the client
7920         (process_cancel): on cancel, send REJECTED, per the spec
7921         (process_error_client): send CANCEL if we get an error from the
7922         server.
7923
7924 2003-04-18  Havoc Pennington  <hp@pobox.com>
7925
7926         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
7927         debug spew
7928
7929         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
7930         handling problem
7931
7932         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
7933         about DBUS_TEST_HOMEDIR once
7934
7935         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
7936         the environment
7937
7938         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
7939         config file so we test the right thing
7940
7941         Throughout: assorted docs improvements
7942
7943 2003-04-18  Havoc Pennington  <hp@pobox.com>
7944
7945         * glib/dbus-gmain.c: adapt to watch changes
7946
7947         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
7948
7949         * dbus/dbus-server.h: remove dbus_server_handle_watch
7950
7951         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
7952
7953         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
7954         like DBusTimeout, so we don't need dbus_connection_handle_watch
7955         etc.
7956
7957 2003-04-17  Havoc Pennington  <hp@redhat.com>
7958
7959         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
7960         database usage so it all goes via the DBusUserDatabase cache.
7961
7962 2003-04-17  Havoc Pennington  <hp@redhat.com>
7963
7964         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
7965         there was an OOM watch we skipped, we always return TRUE so we
7966         iterate again to have a look at it again. Fixes test suite hang.
7967         Code rearrangement also lets us lose some memset and only iterate
7968         over callbacks once.
7969
7970         * bus/driver.c (bus_driver_handle_message): sense of test for
7971         reply was backward
7972
7973 2003-04-16  Havoc Pennington  <hp@pobox.com>
7974
7975         * doc/dbus-specification.sgml: make spec say serials are unsigned
7976
7977         * dbus/dbus-message.h: change message serials to unsigned
7978
7979         * dbus/dbus-connection.c: adapt to message serials being unsigned
7980
7981 2003-04-15  Havoc Pennington  <hp@pobox.com>
7982
7983         * bus/bus.c: create and keep around a shared DBusUserDatabase
7984         object.
7985
7986         * bus/connection.c (bus_connection_get_groups): don't cache
7987         groups for user in the connection object, since user database
7988         object now does that.
7989
7990 2003-04-16  Havoc Pennington  <hp@redhat.com>
7991
7992         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
7993         list of size counters
7994         (_dbus_message_loader_putback_message_link): put back a popped link
7995
7996         * dbus/dbus-connection.c
7997         (dbus_connection_set_max_live_messages_size): rename
7998         max_received_size
7999         (dbus_connection_get_outgoing_size): get size of outgoing
8000         queue
8001         (_dbus_connection_set_connection_counter): remove this cruft
8002
8003 2003-04-14  Havoc Pennington  <hp@redhat.com>
8004
8005         * dbus/dbus-userdb.c: user database abstraction, mostly to get
8006         caching, but at some point we might want to be able to use a
8007         different database.
8008
8009         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
8010         SHA1 conf file to test the sha1 auth mechanism, since the regular
8011         test always uses EXTERNAL when available.
8012
8013         * configure.in,
8014         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
8015         add conf file that requires use of sha1 auth
8016
8017 2003-04-13  Havoc Pennington  <hp@pobox.com>
8018
8019         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
8020         from Philip Blundell to send messages and monitor them.
8021
8022 2003-04-13  Havoc Pennington  <hp@pobox.com>
8023
8024         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
8025         callbacks
8026
8027         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
8028         users
8029
8030         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8031         fix to only recover unused bytes if we're already authenticated
8032         (_dbus_transport_get_is_authenticated): fix to still mark us
8033         authenticated if there are unused bytes.
8034
8035         * bus/dispatch.c: implement security policy checking
8036
8037         * bus/connection.c (bus_transaction_send_from_driver): new
8038
8039         * bus/bus.c (bus_context_check_security_policy): new
8040
8041         * bus/dispatch.c (send_service_nonexistent_error): delete this,
8042         now we just set the DBusError and it gets converted to an error
8043         reply.
8044
8045         * bus/connection.c (allow_user_function): enable code using actual
8046         data from the config file
8047
8048         * bus/policy.c (list_allows_user): handle wildcard rules for
8049         user/group connection perms
8050
8051 2003-04-13  Havoc Pennington  <hp@pobox.com>
8052
8053         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
8054
8055         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
8056
8057         * bus/policy.c (bus_policy_append_mandatory_rule)
8058         (bus_policy_append_default_rule, bus_policy_append_user_rule)
8059         (bus_policy_append_group_rule): new functions
8060
8061 2003-04-12  Havoc Pennington  <hp@pobox.com>
8062
8063         * bus/config-parser.c (bus_config_parser_new): fix a memleak
8064
8065         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
8066         the pid/gid/uid, just for paranoia.
8067
8068         * test/break-loader.c (randomly_do_n_things): find a byte
8069         containing a type code, and randomly change it to a different
8070         type code.
8071
8072 2003-04-12  Havoc Pennington  <hp@pobox.com>
8073
8074         * bus/policy.h: change BusPolicy to be the thing from the config
8075         file, and rename old BusPolicy to BusClientPolicy
8076
8077         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
8078         match change in how policy works
8079
8080         * dbus/dbus-internals.h: mark assert_not_reached as
8081         __attribute((noreturn))__
8082
8083 2003-04-11  Havoc Pennington  <hp@redhat.com>
8084
8085         * doc/dbus-specification.sgml: fix a spot with the wrong name for
8086         the broadcast service. Use boolean return for ServiceExists.
8087
8088 2003-04-11  Havoc Pennington  <hp@redhat.com>
8089
8090         * configure.in: add another directory to look for qt in.
8091
8092 2003-04-11  Havoc Pennington  <hp@redhat.com>
8093
8094         * AUTHORS: add Colin Walters
8095
8096 2003-04-11  Havoc Pennington  <hp@redhat.com>
8097
8098         * NEWS: update
8099
8100         * configure.in: 0.9
8101
8102 2003-04-11  Havoc Pennington  <hp@redhat.com>
8103
8104         * bus/messagebus.in: remove pid file when stopping the
8105         message bus, since the bus won't have privileges to remove it
8106         itself.
8107
8108 2003-04-11  Havoc Pennington  <hp@redhat.com>
8109
8110         * bus/bus.c (bus_context_new): move credentials change after
8111         creating pidfile
8112
8113 2003-04-11  Havoc Pennington  <hp@pobox.com>
8114
8115         * test/decode-gcov.c: add "below average functions" to the
8116         coverage report, and change how some of the code works.
8117
8118         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
8119         not in the coverage stats.
8120
8121         * test/test-service.c (main): use _dbus_verbose not fprintf in a
8122         couple places so running the test suite doesn't result in megaspam.
8123
8124 2003-04-11  Havoc Pennington  <hp@pobox.com>
8125
8126         * bus/dispatch.c (check_existent_service_activation): accept a no
8127         memory error in a place we didn't before
8128
8129         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
8130         in case the first one failed," since the test suite is less
8131         broken now.
8132
8133 2003-04-10  Havoc Pennington  <hp@pobox.com>
8134
8135         * bus/dispatch.c (check_segfault_service_activation): add test
8136         for launching an executable that just crashes.
8137
8138         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
8139         don't leave a million cores. We'll see how portable this is.
8140
8141 2003-04-10  Havoc Pennington  <hp@pobox.com>
8142
8143         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
8144         the possible parent failures before we fork, so that we don't
8145         fail to create a babysitter after creating the child.
8146
8147         * bus/activation.c (bus_activation_activate_service): kill child
8148         if we don't successfully complete the activation.
8149
8150 2003-04-10  Havoc Pennington  <hp@redhat.com>
8151
8152         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
8153         the connection if it's disconnected
8154
8155         * bus/activation.c (bus_activation_service_created): use new
8156         transaction features to roll back removal of pending activation if
8157         we don't successfully create the service after all. Don't remove
8158         pending activation if the function fails.
8159
8160         * dbus/dbus-list.c (_dbus_list_insert_before_link)
8161         (_dbus_list_insert_after_link): new code to facilitate
8162         services.c fixes
8163
8164         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
8165         new functionality, so we can preallocate the ability to insert
8166         into a hash table.
8167
8168         * bus/connection.c (bus_transaction_add_cancel_hook): new function
8169         allowing us to put custom hooks in a transaction to be used for
8170         cancelling said transaction
8171
8172         * doc/dbus-specification.sgml: add some discussion of secondary
8173         service owners, and disallow zero-length service names
8174
8175         * bus/services.c (bus_registry_acquire_service): new function,
8176         splits out part of bus_driver_handle_acquire_service() and fixes
8177         a bug where we didn't remove the service doing the acquiring
8178         from the secondary queue if we failed to remove the current owner
8179         from the front of the queue.
8180
8181 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8182
8183         * doc/dbus-specification.sgml:
8184         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
8185
8186 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8187
8188         * bus/.cvsignore:
8189         * glib/.cvsignore:
8190         * test/.cvsignore:
8191         Added files to cvsignore
8192
8193         * dbus/dbus-message.h:
8194         * dbus/dbus-message.c: (dbus_message_iter_get_named):
8195         Make get_named() take two out argument and return a boolean.
8196         (dbus_message_iter_get_args_valist):
8197         Update usage of get_named().
8198         (dbus_message_iter_append_byte):
8199         Fix typo
8200         (dbus_message_iter_append_named)
8201         Fix typo
8202         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
8203         More tests.
8204
8205 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8206
8207         * dbus/dbus-marshal.[ch]:
8208         Add array_type_pos argument to _dbus_marshal_validate_arg.
8209         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
8210
8211         * dbus/dbus-message.[ch]:
8212         Multi-dimensional arrays have full type specification in the
8213         outermost array. Iter code re-arranged to handle this.
8214         Added some more iter tests.
8215
8216         * doc/dbus-specification.sgml:
8217         Add me to authors.
8218         Remove old FIXME.
8219         Update new array encoding description.
8220         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
8221
8222         * test/data/invalid-messages/array-with-mixed-types.message:
8223         * test/data/valid-messages/array-of-array-of-uint32.message:
8224         Change to the new array format.
8225
8226         * test/data/invalid-messages/too-short-dict.message:
8227         Fix bug in test.
8228
8229         * test/data/valid-messages/recursive-types.message:
8230         Fix up and extend test.
8231
8232 2003-04-10  Havoc Pennington  <hp@pobox.com>
8233
8234         * bus/dispatch.c: lots of fixes
8235
8236         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
8237         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
8238         that was crack, broke the test service.
8239
8240         * dbus/dbus-transport.c (_dbus_transport_open): fix error
8241         handling to avoid piling up errors if we get a failure on the
8242         first address.
8243
8244         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
8245         pid in assertion failures.
8246
8247         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
8248         to some fixed size of file descriptor array. Don't return TRUE
8249         anytime a timeout exists, that led to lots of busy loop silliness
8250         in the tests.
8251
8252 2003-04-09  Havoc Pennington  <hp@redhat.com>
8253
8254         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
8255         I'd checked this in earlier but hadn't.
8256
8257 2003-04-09  Havoc Pennington  <hp@redhat.com>
8258
8259         * bus/dispatch.c (bus_dispatch_test): get a bit further through
8260         the activation test (man this is getting old!)
8261
8262 2003-04-09  Havoc Pennington  <hp@redhat.com>
8263
8264         * test/test-utils.c: use dispatch status function to fix this up
8265
8266         * bus/connection.c (connection_watch_callback): don't dispatch
8267         from here
8268         (connection_timeout_callback): don't dispatch from here
8269         (bus_connections_setup_connection): set the dispatch status function
8270         (bus_connection_disconnected): unset it
8271
8272         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
8273         used to add a connection to be dispatched
8274         (_dbus_loop_iterate): do the dispatching at the end of each
8275         iteration
8276
8277         * dbus/dbus-connection.c
8278         (dbus_connection_set_dispatch_status_function): new function
8279         allowing us to fix up main loop usage
8280         (_dbus_connection_last_unref): free all the various function
8281         user data
8282         (dbus_connection_dispatch): call the DispatchStatusFunction
8283         whenever this function returns
8284         (dbus_connection_handle_watch): call DispatchStatusFunction
8285         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
8286         (reply_handler_timeout): call DispatchStatusFunction
8287         (dbus_connection_flush): call DispatchStatusFunction
8288
8289 2003-04-09  Havoc Pennington  <hp@redhat.com>
8290
8291         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
8292         a memory leak
8293
8294         * bus/dispatch.c (check_service_activated): fix bug in test
8295
8296         * dbus/dbus-mainloop.c (check_timeout): fix this up
8297
8298         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
8299         verbose output so we can sort out output from different processes,
8300         e.g. in the activation case.
8301
8302 2003-04-08  Colin Walters  <walters@gnu.org>
8303
8304         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
8305         the pid file.
8306         (bus_context_new): Set it.
8307         (bus_context_unref): Use it to delete the pid file.
8308
8309 2003-04-08  Havoc Pennington  <hp@redhat.com>
8310
8311         * test/data/invalid-messages/array-with-mixed-types.message:
8312         regression test that fails for the moment
8313
8314         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
8315         tests for convenience
8316
8317         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
8318         array of nil, it broke things.
8319
8320         * test/data/invalid-messages/array-of-nil.message: regression test
8321
8322         * test/data/valid-messages/array-of-array-of-uint32.message:
8323         happened to write this so added it to suite
8324
8325 2003-04-08  Havoc Pennington  <hp@redhat.com>
8326
8327         * bus/driver.c (bus_driver_handle_acquire_service): init
8328         retval/reply before checking name
8329
8330         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
8331         recursion depth argument
8332
8333         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
8334         in the public struct for future extension
8335
8336         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
8337         typo
8338
8339         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
8340         message
8341
8342         * doc/dbus-specification.sgml: fix typo
8343
8344 2003-04-08  Alexander Larsson  <alexl@redhat.com>
8345
8346         Implemented recursive types, named types and new-style iters
8347
8348         * bus/driver.c:
8349         * glib/test-thread-client.c: (thread_func):
8350         * glib/test-thread-server.c: (handle_test_message):
8351         * test/test-service.c: (handle_echo):
8352         Update to new api
8353
8354         * dbus/Makefile.am:
8355         * dbus/dbus-dict.c:
8356         * dbus/dbus-dict.h:
8357         * dbus/dbus.h
8358         Remove DBusDict
8359
8360         * dbus/dbus-internals.c: (_dbus_type_to_string):
8361         Update for new types.
8362
8363         * dbus/dbus-marshal.[ch]:
8364         Implement recursive types and the new marshalling format.
8365         Remove hardcoded dict marshalling.
8366         Marshal named types.
8367
8368         * dbus/dbus-message-builder.c:
8369         Add BYTE_ARRAY.
8370         Remove references to old types
8371
8372         * dbus/dbus-message.[ch]:
8373         New non-refcounted iter API that supports recursive iters.
8374         Use iters for appending, including support for recursive
8375         iters.
8376         Add byte and named type support.
8377         Update everything to new marshalling formats.
8378         Add tests for new API.
8379
8380         * dbus/dbus-protocol.h:
8381         Remove old array types.
8382         Add types: BYTE, ARRAY, DICT, NAMED
8383
8384         * dbus/dbus-string.c:
8385         * dbus/dbus-sysdeps.c:
8386         Make parse_double locale safe.
8387
8388         * dbus/dbus-test-main.c:
8389         Call setlocale.
8390
8391         * dbus/dbus-test.c:
8392         Kill dict test
8393
8394         * doc/dbus-specification.sgml:
8395         Update spec
8396
8397         * test/data/incomplete-messages/missing-body.message:
8398         * test/data/invalid-messages/bad-boolean.message:
8399         * test/data/invalid-messages/bad-boolean-array.message:
8400         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
8401         * test/data/invalid-messages/boolean-has-no-value.message-raw:
8402         * test/data/invalid-messages/too-short-dict.message:
8403         * test/data/valid-messages/dict-simple.message:
8404         * test/data/valid-messages/dict.message:
8405         * test/data/valid-messages/emptiness.message:
8406         * test/data/valid-messages/lots-of-arguments.message:
8407         * test/data/valid-messages/no-padding.message:
8408         * test/data/valid-messages/recursive-types.message:
8409         Add missing NAME fields
8410         Fix up dicts & arrays
8411
8412         * test/data/invalid-messages/dict-with-nil-value.message:
8413         Removed, this is not invalid anymore.
8414
8415         * test/data/valid-messages/recursive-types.message:
8416         Add new test for deeply recursive types.
8417
8418 2003-04-07  Havoc Pennington  <hp@pobox.com>
8419
8420         * bus/driver.c (bus_driver_handle_acquire_service): return an
8421         error if you try to acquire a service that starts with ':'
8422
8423 2003-04-07  Havoc Pennington  <hp@redhat.com>
8424
8425         * doc/dbus-specification.sgml: require that base service names
8426         start with ':' and that the base service is created/deleted
8427         as first and last things a connection does on the bus
8428
8429         * bus/dispatch.c (check_existent_service_activation): lots more
8430         work on the activation test; it doesn't fully pass yet...
8431
8432         * test/test-service.c (main): fix so we don't memleak the
8433         connection to the message bus
8434         (filter_func): accept a message asking us to exit
8435
8436 2003-04-06  Havoc Pennington  <hp@pobox.com>
8437
8438         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
8439         from Colin Walters
8440
8441         * configure.in: fixes to Qt detection from Colin Walters
8442
8443         * doc/Makefile.am: Only remove generated docbook dirs if they
8444         exist, from Colin Walters
8445
8446         * dbus/dbus-bus.c: change how we set well-known connections to
8447         NULL, so that it works if a single connection is stored in
8448         two well-known array slots.
8449
8450         * test/Makefile.am: remove a lot of stuff that isn't immediately
8451         useful, it's in CVS history if we want it.
8452
8453         * test/test-service.c: use dbus-mainloop instead of that
8454         watch.[hc] crack
8455
8456 2003-04-06  Havoc Pennington  <hp@pobox.com>
8457
8458         * dbus/Makefile.am: split lists of sources into stuff that goes in
8459         the library, util functions that go in the lib and are also used
8460         elsewhere, and util functions that are used in tests/daemon but
8461         don't go in the lib.
8462
8463         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
8464         here so it can be used in test binaries also
8465
8466 2003-04-06  Havoc Pennington  <hp@pobox.com>
8467
8468         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
8469         here in the parent process, so we can return an error if it
8470         fails. Also, move some of the code into the child so the parent
8471         is less hosed if we fail midway through.
8472
8473         * bus/bus.c (bus_context_new): move pidfile detection further up
8474         in the function, before we start overwriting sockets and such.
8475
8476         * bus/messagebus.in: adjust this a bit, not sure if it will work.
8477
8478         * configure.in: add --with-system-pid-file and --with-system-socket
8479
8480 2003-04-06  Colin Walters  <walters@verbum.org>
8481
8482         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
8483
8484         * bus/system.conf.in: Declare a pidfile.
8485
8486         * bus/bus.c (bus_context_new): Test for an existing pid file, and
8487         create one (if appropriate).
8488
8489         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
8490         (struct BusConfigParser) [pidfile]: New.
8491         (element_type_to_name, merge_included, start_busconfig_child)
8492         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
8493         (bus_config_parser_unref): Free it.
8494         (bus_config_parser_get_pidfile): New function.
8495
8496         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
8497
8498         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
8499
8500         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
8501
8502         * dbus/dbus-sysdeps.h: Prototype it.
8503
8504 2003-04-06  Havoc Pennington  <hp@pobox.com>
8505
8506         * bus/bus.c (bus_context_new): print the address in here, rather
8507         than in main(), because we need to do it before forking the daemon
8508
8509         * bus/dispatch.c (send_service_nonexistent_error): set the sender
8510         on the service nonexistent error
8511
8512         * bus/driver.c (bus_driver_handle_acquire_service): set the
8513         sender on the AcquireService reply
8514
8515         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
8516         server also listen on a UNIX socket so services can connect to it.
8517
8518 2003-04-06  Havoc Pennington  <hp@pobox.com>
8519
8520         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
8521         so it detects deadlocks and also we actually init threads when
8522         debugging.
8523
8524 2003-04-06  Havoc Pennington  <hp@pobox.com>
8525
8526         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
8527         save the domain socket name, and unlink it when we disconnect the
8528         server. Means that at least when we exit normally, we won't leave
8529         a bunch of junk in /tmp
8530
8531         * dbus/dbus-transport-unix.c
8532         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
8533         memory management). (I was making a real change here but then
8534         didn't)
8535
8536 2003-04-06  Havoc Pennington  <hp@pobox.com>
8537
8538         * bus/bus.c (bus_context_new): fix wrong handling of
8539         server_data_slot_unref() in the error case.
8540
8541         * dbus/dbus-internals.h (_dbus_assert): change so it passes
8542         "(condition) != 0" to _dbus_real_assert so that
8543         "_dbus_assert (pointer)" doesn't cause a warning
8544
8545         * bus/main.c (main): accept --print-address option to print out
8546         the message bus address
8547
8548         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
8549
8550         * dbus/dbus-transport.c (_dbus_transport_open): special error for
8551         "tmpdir" option to unix: address on client side
8552
8553         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
8554         to unix: address
8555
8556         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
8557         we can use to create sockets in the test suite.
8558
8559         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
8560         cleanly. To be used for testing.
8561
8562         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
8563
8564         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
8565
8566         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
8567         handle trying to call this when there's no servers active
8568
8569 2003-04-05  Havoc Pennington  <hp@pobox.com>
8570
8571         * NEWS: update
8572
8573         * configure.in: 0.8
8574
8575 2003-04-05  Havoc Pennington  <hp@pobox.com>
8576
8577         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
8578         crash on startup. Need to get "try starting the daemon"
8579         in the test suite I guess. ;-)
8580
8581         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
8582         tracked the number of open connections; it's better done in
8583         application-specific code as you want it to span all servers etc.
8584
8585 2003-04-05  Havoc Pennington  <hp@pobox.com>
8586
8587         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
8588         patch from Colin Walters
8589
8590 2003-04-05  Havoc Pennington  <hp@pobox.com>
8591
8592         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
8593         reality; in fact multiple mechanisms are allowed.
8594
8595         * dbus/dbus-internals.c (_dbus_real_assert)
8596         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
8597         _dbus_assert_not_reached() into functions, so that they don't show
8598         up in basic block counts for test coverage, and don't use up as
8599         much disk space. Does mean slower execution speed though, so
8600         assumes --disable-asserts is the normal production case.
8601
8602 2003-04-05  Havoc Pennington  <hp@pobox.com>
8603
8604         * test/Makefile.am (dist-hook): also dist *.in files
8605
8606         * NEWS: update
8607
8608         * configure.in: 0.7
8609
8610 2003-04-05  Havoc Pennington  <hp@pobox.com>
8611
8612         * dbus/dbus-string.c: docs warning
8613
8614         * dbus/dbus-spawn.c: missing docs
8615
8616         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
8617
8618 2003-04-05  Havoc Pennington  <hp@pobox.com>
8619
8620         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
8621         magic from GLib
8622
8623         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
8624         to -1 once we've reaped the babysitter
8625         (_dbus_babysitter_handle_watch): do as much work as we can, not
8626         just one go of it
8627
8628         * bus/activation.c: add code using DBusBabysitter so that we
8629         handle it when a service fails to start up properly.
8630         (bus_activation_service_created): don't remove the activation
8631         entries as we go, just let them get removed when we free the pending
8632         activation. Unref reply messages after sending them.
8633
8634 2003-04-05  Havoc Pennington  <hp@pobox.com>
8635
8636         * test/decode-gcov.c (main): print per-directory stats in the report
8637
8638         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
8639
8640 2003-04-05  Havoc Pennington  <hp@pobox.com>
8641
8642         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
8643
8644         * test/decode-gcov.c: hack up a little program to suck data
8645         out of gcov files. Yes this is sort of silly.
8646
8647         * configure.in: define something in config.h and do an
8648         AM_CONDITIONAL when gcov is enabled
8649
8650 2003-04-04  Havoc Pennington  <hp@redhat.com>
8651
8652         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
8653         return a "babysitter" object that is used to monitor the status of
8654         the spawned process and reap it when required.
8655
8656         * test/test-segfault.c, test/test-exit.c,
8657         test/test-sleep-forever.c: binaries that do various lame things,
8658         used in the test suite.
8659
8660         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
8661
8662 2003-04-03  Havoc Pennington  <hp@pobox.com>
8663
8664         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
8665         in preparation for modifying it, dbus-sysdeps is getting
8666         a bit unmanageable.
8667
8668 2003-04-03  Havoc Pennington  <hp@redhat.com>
8669
8670         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
8671         have multiple ones
8672
8673         * bus/*.[hc]: adapt to mainloop change
8674
8675 2003-04-03  Havoc Pennington  <hp@redhat.com>
8676
8677         * bus/activation.c (load_directory): fix up memleaks
8678         (bus_activation_entry_free): free the entry
8679
8680         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
8681         we get one from the message bus; fix memleaks.
8682
8683         * dbus/dbus-message.c (dbus_set_error_from_message): new function
8684
8685 2003-04-03  Havoc Pennington  <hp@pobox.com>
8686
8687         * bus/config-parser.c (bus_config_parser_unref): free
8688         list of mechanisms, bug discovered by test suite enhancements
8689         (putting system.conf and session.conf into suite)
8690
8691         * test/Makefile.am, test/test-service.c: add placeholder for a
8692         test service that we'll activate as part of test suite. Doesn't
8693         do anything yet.
8694
8695         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
8696         setting NULL value, and use system malloc not dbus_malloc()
8697         when we have unavoidable memleakage.
8698
8699         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
8700         didn't work, and support DBUS_BUS_ACTIVATION.
8701
8702         * bus/activation.c (child_setup): pass our well-known bus type to
8703         the child
8704
8705         * bus/config-parser.c: support <type> to specify well-known type
8706
8707         * doc/dbus-specification.sgml: document the env variables to
8708         locate well-known buses and find service activator
8709
8710 2003-04-02  Havoc Pennington  <hp@redhat.com>
8711
8712         * test/Makefile.am (all-local): add a rule to copy tests to
8713         builddir, so we can have generated tests. Use this to remove the
8714         silly hack for testing system.conf and session.conf. Will use this
8715         shortly to generate .service files pointing to test binaries.
8716
8717 2003-04-02  Havoc Pennington  <hp@redhat.com>
8718
8719         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
8720         current alloc and needed new length, not max of the doubled
8721         allocation and needed new length. Also, when building tests,
8722         don't do the double-allocation stuff, just realloc every time.
8723
8724 2003-04-02  Havoc Pennington  <hp@redhat.com>
8725
8726         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
8727         in error messages
8728         (_dbus_string_get_dirname): new
8729         (_dbus_sysdeps_test): new
8730         (_dbus_directory_open): include dirnames in error messages
8731
8732         * bus/config-parser.c: interpret <include> and <includedir> and
8733         <servicedir> relative to config file location if the given
8734         filename is not absolute.
8735
8736         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
8737
8738 2003-04-02  Havoc Pennington  <hp@redhat.com>
8739
8740         * bus/connection.c (bus_transaction_send_error_reply): set sender
8741         service for the error, and unref the reply on success
8742
8743         * bus/activation.c: convert to use BusTransaction so OOM can be
8744         handled correctly
8745         (bus_activation_service_created): set sender of the message
8746
8747 2003-04-01  Havoc Pennington  <hp@redhat.com>
8748
8749         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
8750         <includedir> (at least mostly)
8751
8752         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
8753         first, then the user ID
8754
8755 2003-04-01  Havoc Pennington  <hp@pobox.com>
8756
8757         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
8758         function
8759
8760         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
8761
8762         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
8763
8764         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
8765         socket 0777, and unlink any existing socket.
8766
8767         * bus/bus.c (bus_context_new): change our UID/GID and fork if
8768         the configuration file so specifies; set up auth mechanism
8769         restrictions
8770
8771         * bus/config-parser.c (bus_config_parser_content): add support
8772         for <fork> option and fill in code for <auth>
8773
8774         * bus/system.conf.in: add <fork/> to default configuration,
8775         and limit auth mechanisms to EXTERNAL
8776
8777         * doc/config-file.txt (Elements): add <fork>
8778
8779         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
8780         (_dbus_change_identity): new function
8781
8782 2003-03-31  Havoc Pennington  <hp@redhat.com>
8783
8784         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
8785         (_dbus_listen_unix_socket): fix off-by-one error in null
8786         termination spotted by Nalin
8787
8788 2003-03-31  Havoc Pennington  <hp@redhat.com>
8789
8790         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
8791         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
8792         having a real home directory available.
8793
8794 2003-03-31  Havoc Pennington  <hp@redhat.com>
8795
8796         * bus/Makefile.am (install-data-hook): create /var/run/dbus
8797
8798         * bus/messagebus.in: add init script for Red Hat /etc/init.d
8799
8800         * configure.in: add support for specifying a style of init script
8801         to install
8802
8803 2003-03-31  Havoc Pennington  <hp@redhat.com>
8804
8805         Fix some annoying DBusString API and fix all affected code.
8806
8807         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
8808         max_length argument
8809         (_dbus_string_get_data): change to return string instead of using
8810         an out param
8811         (_dbus_string_get_const_data): ditto
8812         (_dbus_string_get_data_len): ditto
8813         (_dbus_string_get_const_data_len): ditto
8814
8815 2003-03-31  Havoc Pennington  <hp@redhat.com>
8816
8817         * bus/main.c (main): fix up the command line arguments to be nicer
8818
8819 2003-03-31  Havoc Pennington  <hp@redhat.com>
8820
8821         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
8822         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
8823         final location that lands in the config file
8824
8825         * bus/config-loader-expat.c (bus_config_load): fix type of
8826         XML_Parser variable
8827
8828         * doc/TODO: remove TODO item for dbus_bus_get()
8829
8830         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
8831
8832 2003-03-31  Havoc Pennington  <hp@pobox.com>
8833
8834         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
8835         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
8836         argument since they are always client side
8837
8838         * dbus/dbus-server.c (dbus_server_get_address): new function
8839
8840         * bus/main.c (main): take the configuration file as an argument.
8841
8842         * test/data/valid-config-files/debug-allow-all.conf: new file to
8843         use with dispatch.c tests for example
8844
8845         * bus/test-main.c (main): require test data dir
8846
8847         * bus/bus.c (bus_context_new): change this to take a
8848         configuration file name as argument
8849
8850         * doc/config-file.txt (Elements): add <servicedir>
8851
8852         * bus/system.conf, bus/session.conf: new files
8853
8854         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
8855         well-known socket if none set
8856
8857         * configure.in: create system.conf and session.conf
8858
8859 2003-03-30  Havoc Pennington  <hp@pobox.com>
8860
8861         * bus/config-parser.c: hacking
8862
8863         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
8864         to shut down, since it could cause weirdness with the DBusList
8865         lock
8866
8867         * dbus/dbus-list.c (_dbus_list_test): add tests for the
8868         link-oriented stack routines
8869         (alloc_link): free the mempool if the first alloc from it fails
8870
8871         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
8872
8873         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
8874         from GLib
8875         (_dbus_string_skip_white): new
8876
8877         * doc/config-file.txt (Elements): add <includedir>
8878
8879 2003-03-28  Havoc Pennington  <hp@pobox.com>
8880
8881         * dbus/dbus-string.c (_dbus_string_copy_data_len)
8882         (_dbus_string_copy_data): new functions
8883
8884 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
8885
8886         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
8887         * dbus/dbus-bus.h:
8888         Add dbus_bus_get.
8889
8890         * dbus/dbus-memory.c:
8891         Fix a doc comment.
8892
8893 2003-03-28  Havoc Pennington  <hp@pobox.com>
8894
8895         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
8896         I think it may have just been superstition. Not sure.
8897
8898         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
8899         failures that were not being handled.
8900
8901         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
8902
8903         * dbus/dbus-memory.c: add ability to set number of mallocs in a
8904         row that will fail on out-of-memory.
8905
8906         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
8907         function for testing out-of-memory handling.
8908
8909         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
8910         allocation functions, they do map exactly to the expat ones.
8911
8912 2003-03-27  Havoc Pennington  <hp@redhat.com>
8913
8914         * bus/config-loader-libxml.c (bus_config_load): add another error
8915         check
8916
8917 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
8918
8919         * doc/TODO:
8920         Add note about automatic service activation.
8921
8922         * doc/dbus-specification.sgml:
8923         Rename the specification and clarify a few things.
8924
8925 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
8926
8927         * Doxyfile.in:
8928         * dbus/dbus-address.c:
8929         * dbus/dbus-dict.c:
8930         * dbus/dbus-marshal.c:
8931         * dbus/dbus-server-debug-pipe.c:
8932         * dbus/dbus-transport-unix.c:
8933         Fix documentation warnings.
8934
8935 2003-03-26  Havoc Pennington  <hp@pobox.com>
8936
8937         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
8938         after every test so it's quick and easy to see which leaked, and
8939         so we test multiple dbus_shutdown() calls
8940
8941         * configure.in: change configure.in XML stuff to also support
8942         expat
8943
8944         * config-loader-libxml.c: some hacking
8945
8946         * config-loader-expat.c: some hacking
8947
8948         * config-parser.c: some hacking, plus tests
8949
8950 2003-03-25  Havoc Pennington  <hp@redhat.com>
8951
8952         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
8953
8954         * configure.in: add --with-xml option to specify XML library,
8955         right now only libxml is supported.
8956
8957         * bus/config-loader-libxml.c, config-parser.c: sync some minor
8958         nonworking code between home and work, still just stubs
8959
8960 2003-03-24  Havoc Pennington  <hp@redhat.com>
8961
8962         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
8963         file
8964
8965         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
8966         NULL argument for "message" if the error is a well-known one,
8967         fill in a generic message in this case.
8968
8969         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
8970         favor of DBusError
8971
8972         * bus/test.c (bus_test_flush_bus): add
8973
8974         * bus/policy.c (bus_policy_test): test code stub
8975
8976 2003-03-24  Havoc Pennington  <hp@pobox.com>
8977
8978         * bus/connection.c (bus_connections_setup_connection): set up
8979         the "can this user connect" function, but it always returns
8980         TRUE until we have a config file parser so we can have a config
8981         file that allows connections.
8982
8983 2003-03-23  Havoc Pennington  <hp@pobox.com>
8984
8985         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
8986         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
8987         the mutex, so we can check for proper memory management
8988         and OOM handling.
8989
8990         * dbus/dbus-dataslot.c: remove the mutex from
8991         DBusDataSlotAllocator and lock it manually when using it,
8992         to simplify fitting it into the global slots framework.
8993
8994         * dbus/dbus-threads.c (init_static_locks): rework how we're
8995         handling global locks so they are easily shut down.
8996
8997         * bus/policy.c (bus_policy_append_rule): fix
8998
8999         * bus/test-main.c (main): check for memleaks
9000
9001         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
9002         test suite check for memleaks
9003
9004         * dbus/dbus-memory.c: add support in test mode for tracking
9005         number of outstanding blocks
9006
9007 2003-03-23  Havoc Pennington  <hp@pobox.com>
9008
9009         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
9010         policies code
9011
9012         * dbus/dbus-hash.h: add ULONG hash keys
9013
9014         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
9015         (_dbus_get_group_id): new function
9016
9017 2003-03-20  Havoc Pennington  <hp@redhat.com>
9018
9019         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
9020         new function
9021         (dbus_connection_get_unix_user): new function
9022
9023 2003-03-20  Havoc Pennington  <hp@pobox.com>
9024
9025         * bus/connection.c (bus_connection_send_oom_error): assert that
9026         message has a sender
9027         (connection_execute_transaction): ditto
9028         (bus_connection_preallocate_oom_error): fix to set the sender, and
9029         set recipient to the destination service, not the bus driver
9030
9031         * bus/policy.c: hacking
9032
9033         * dbus/dbus-message.c (dbus_message_service_is): new function
9034         (dbus_message_sender_is): new
9035
9036 2003-03-19  Havoc Pennington  <hp@redhat.com>
9037
9038         * bus/policy.c: start sketching code for policy restrictions on
9039         what connections can do.
9040
9041 2003-03-18  Havoc Pennington  <hp@redhat.com>
9042
9043         * doc/TODO: some notes on high-level todo items. Little nitpick
9044         stuff is all in @todo, so no need to add it here.
9045
9046         * doc/config-file.txt: some notes on how config file might look
9047
9048 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
9049
9050         * configure.in: 0.6
9051
9052         * NEWS: Update.
9053
9054 2003-03-17  Havoc Pennington  <hp@redhat.com>
9055
9056         * dbus/dbus-internals.h: add gcc attributes so that
9057         our printf-style functions warn on bad arguments to
9058         format
9059
9060         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
9061         format bug
9062
9063         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
9064         printf format bug
9065
9066 2003-03-17  Havoc Pennington  <hp@redhat.com>
9067
9068         * bus/test-main.c (main): make it print something as it runs
9069         so make check doesn't look stuck
9070
9071         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
9072         from CVS, now obsolete
9073
9074 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9075
9076         * bus/dispatch.c: (bus_dispatch):
9077         Refetch the service name since it may have been reallocated
9078         when dbus_message_set_sender was called.
9079
9080         * dbus/dbus-sysdeps.c: (_dbus_accept):
9081         Add address and address length variables and use them to stop
9082         valgrind from complaining.
9083
9084 2003-03-17  Havoc Pennington  <hp@pobox.com>
9085
9086         All tests pass, no memleaks, no valgrind complaints.
9087
9088         * bus/test.c: refcount handler_slot
9089
9090         * bus/connection.c (bus_connections_new): refcount
9091         connection_data_slot
9092
9093         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
9094         bytes so that auth scripts pass.
9095
9096         * bus/dispatch.c: init message_handler_slot so it gets allocated
9097         properly
9098
9099         * bus/dispatch.c (message_handler_slot_ref): fix memleak
9100
9101         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
9102         dealloc server_pipe_hash when no longer used for benefit of
9103         leak checking
9104
9105         * dbus/dbus-auth.c (process_command): memleak fix
9106
9107         * bus/dispatch.c (check_hello_message): memleak fix
9108
9109 2003-03-16  Havoc Pennington  <hp@pobox.com>
9110
9111         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
9112
9113 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9114
9115         * bus/activation.c (bus_activation_activate_service): Append
9116         the pending activation entry to the list of pending activations.
9117
9118 2003-03-16  Havoc Pennington  <hp@pobox.com>
9119
9120         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
9121         connections
9122
9123         * dbus/dbus-address.c (create_entry): fix OOM handling when
9124         failing to alloc entry->method
9125
9126 2003-03-16  Havoc Pennington  <hp@pobox.com>
9127
9128         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
9129         the watch
9130
9131         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9132         add some missing dbus_set_result
9133
9134         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
9135         alloc the DBusMessageHandler
9136
9137         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
9138         the transport here, since we call this from the finalizer; it
9139         resulted in a double-finalize.
9140
9141         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
9142         where we tried to use transport->connection that was NULL,
9143         happened when transport was disconnected early on due to OOM
9144
9145         * bus/*.c: adapt to handle OOM for watches/timeouts
9146
9147         * dbus/dbus-transport-unix.c: port to handle OOM during
9148         watch handling
9149
9150         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
9151         reference to unused bytes instead of a copy
9152
9153         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
9154         out of memory
9155
9156         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
9157         FALSE on OOM
9158
9159         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
9160         of memory
9161
9162 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9163
9164         * doc/dbus-specification.sgml:
9165         Document reply message for ActivateService.
9166
9167 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9168
9169         * bus/activation.c: (bus_pending_activation_entry_free),
9170         (bus_pending_activation_free), (bus_activation_new),
9171         (bus_activation_unref), (bus_activation_service_created),
9172         (bus_activation_activate_service):
9173         * bus/activation.h:
9174         * bus/bus.c: (bus_context_new):
9175         * bus/desktop-file.c: (new_section):
9176         * bus/driver.c: (bus_driver_send_service_deleted),
9177         (bus_driver_handle_activate_service):
9178         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
9179         * bus/services.h:
9180         * dbus/dbus-connection.c:
9181         (dbus_connection_send_with_reply_and_block):
9182         * dbus/dbus-message.c: (dbus_message_append_args_valist):
9183         * dbus/dbus-protocol.h:
9184         Make activation work better. Now pending activations will be queued
9185         and the daemon won't try to activate services that are already registered.
9186
9187 2003-03-16  Havoc Pennington  <hp@pobox.com>
9188
9189         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
9190         connection data
9191
9192         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
9193         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
9194
9195 2003-03-16  Havoc Pennington  <hp@pobox.com>
9196
9197         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
9198         this. always run the test suite before commit...
9199
9200         * bus/*: adapt to DBusConnection API changes
9201
9202         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9203         requires renaming stuff to avoid dbus_connection_dispatch name
9204         conflict.
9205
9206         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
9207         function
9208
9209         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
9210         separate from _dbus_message_loader_return_buffer()
9211
9212         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
9213         this, because it's now always broken to use; the number of
9214         messages in queue vs. the number still buffered by the message
9215         loader is undefined/meaningless. Should use
9216         dbus_connection_get_dispatch_state().
9217         (dbus_connection_dispatch): rename from
9218         dbus_connection_dispatch_message
9219
9220 2003-03-16  Havoc Pennington  <hp@pobox.com>
9221
9222         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
9223         implementation
9224
9225 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9226
9227         * dbus/dbus-connection.c:
9228         (dbus_connection_send_with_reply_and_block):
9229         Decrease connection->n_incoming when removing an entry
9230         from the list.
9231         * dbus/dbus-dict.c: (dbus_dict_entry_free),
9232         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9233         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9234         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
9235         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
9236         (dbus_dict_get_byte_array):
9237         Handle NULL arrays and strings. Also add support for byte arrays.
9238
9239         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
9240         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
9241         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9242         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9243         (_dbus_demarshal_dict), (demarshal_and_validate_len),
9244         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
9245         * dbus/dbus-marshal.h:
9246         Add support for marshalling and demarshalling empty arrays and strings.
9247
9248         * dbus/dbus-message.c: (dbus_message_append_args_valist),
9249         (dbus_message_append_string_array),
9250         (dbus_message_iter_get_boolean),
9251         (dbus_message_iter_get_boolean_array),
9252         (dbus_message_iter_get_int32_array),
9253         (dbus_message_iter_get_uint32_array),
9254         (dbus_message_iter_get_double_array),
9255         (dbus_message_iter_get_byte_array),
9256         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
9257         (check_message_handling):
9258         Add support for getting empty arrays and dicts.
9259
9260         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
9261         Don't do any validation at all for now, that's better than just checking
9262         for ASCII.
9263
9264         * test/data/valid-messages/emptiness.message:
9265         New test message with lots of empty arrays.
9266
9267 2003-03-16  Havoc Pennington  <hp@pobox.com>
9268
9269         * dbus/dbus-connection.c
9270         (_dbus_connection_queue_received_message_link): new function that
9271         can't fail due to OOM
9272
9273         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
9274         new function pops a message together with a list link
9275         containing it.
9276
9277         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
9278         message queuing functions to avoid needing to alloc memory
9279
9280 2003-03-16  Havoc Pennington  <hp@pobox.com>
9281
9282         Oops - test code was only testing failure of around 30 of the
9283         mallocs in the test path, but it turns out there are 500+
9284         mallocs. I believe this was due to misguided linking setup such
9285         that there was one copy of dbus_malloc etc. in the daemon and one
9286         in the shared lib, and only daemon mallocs were tested. In any
9287         case, the test case now tests all 500+ mallocs, and doesn't pass
9288         yet, though there are lots of fixes in this patch.
9289
9290         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
9291         this so that it doesn't need to allocate memory, since it
9292         has no way of indicating failure due to OOM (and would be
9293         annoying if it did).
9294
9295         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
9296
9297         * bus/Makefile.am: rearrange to create two self-contained
9298         libraries, to avoid having libraries with overlapping symbols.
9299         that was resulting in weirdness, e.g. I'm pretty sure there
9300         were two copies of global static variables.
9301
9302         * dbus/dbus-internals.c: move the malloc debug stuff to
9303         dbus-memory.c
9304
9305         * dbus/dbus-list.c (free_link): free list mempool if it becomes
9306         empty.
9307
9308         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
9309
9310         * dbus/dbus-address.c (dbus_parse_address): free list nodes
9311         on failure.
9312
9313         * bus/dispatch.c (bus_dispatch_add_connection): free
9314         message_handler_slot when no longer using it, so
9315         memory leak checkers are happy for the test suite.
9316
9317         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
9318
9319         * bus/bus.c (new_connection_callback): disconnect in here if
9320         bus_connections_setup_connection fails.
9321
9322         * bus/connection.c (bus_connections_unref): fix to free the
9323         connections
9324         (bus_connections_setup_connection): if this fails, don't
9325         disconnect the connection, just be sure there are no side
9326         effects.
9327
9328         * dbus/dbus-string.c (undo_alignment): unbreak this
9329
9330         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
9331         leaking
9332         (_dbus_auth_new): fix the order in which we free strings
9333         on OOM failure
9334
9335         * bus/connection.c (bus_connection_disconnected): fix to
9336         not send ServiceDeleted multiple times in case of memory
9337         allocation failure
9338
9339         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
9340         get the base service name
9341         (dbus_bus_register_client): don't return base service name,
9342         instead store it on the DBusConnection and have an accessor
9343         function for it.
9344         (dbus_bus_register_client): rename dbus_bus_register()
9345
9346         * bus/dispatch.c (check_hello_message): verify that other
9347         connections on the bus also got the correct results, not
9348         just the one sending hello
9349
9350 2003-03-15  Havoc Pennington  <hp@pobox.com>
9351
9352         Make it pass the Hello handling test including all OOM codepaths.
9353         Now to do other messages...
9354
9355         * bus/services.c (bus_service_remove_owner): fix crash when
9356         removing owner from an empty list of owners
9357         (bus_registry_ensure): don't leave service in the list of
9358         a connection's owned services if we fail to put the service
9359         in the hash table.
9360
9361         * bus/connection.c (bus_connection_preallocate_oom_error): set
9362         error flag on the OOM error.
9363
9364         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
9365         handle _dbus_transport_set_connection failure
9366
9367         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
9368         to create watches up front and simply enable/disable them as
9369         needed.
9370         (unix_connection_set): this can now fail on OOM
9371
9372         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
9373         of enabling/disabling a watch or timeout.
9374
9375         * bus/loop.c (bus_loop_iterate): don't touch disabled
9376         watches/timeouts
9377
9378         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
9379
9380 2003-03-15  Havoc Pennington  <hp@pobox.com>
9381
9382         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
9383         write useful test code, after all that futzing around ;-)
9384
9385         Test does not yet pass because we can't handle OOM in
9386         _dbus_transport_messages_pending (basically,
9387         dbus_connection_preallocate_send() does not prealloc the write
9388         watch). To fix this, I think we need to add new stuff to
9389         set_watch_functions, namely a SetEnabled function so we can alloc
9390         the watch earlier, then enable it later.
9391
9392         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
9393         dbus-memory.c to the convenience lib
9394
9395         * bus/test.c: rename some static functions to keep them clearly
9396         distinct from stuff in connection.c. Handle client disconnection.
9397
9398 2003-03-14  Havoc Pennington  <hp@pobox.com>
9399
9400         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
9401         transport, tests more of the real codepath. Set up clients
9402         with bus_setup_debug_client.
9403
9404         * bus/test.c (bus_setup_debug_client): function to set up debug
9405         "clients" on the main loop
9406
9407         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
9408         support
9409
9410         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
9411         server type
9412
9413         * dbus/dbus-server-debug.c: support a debug server based on pipes
9414
9415         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
9416         (_dbus_close): new function
9417
9418         * configure.in: check for socketpair
9419
9420 2003-03-14  Havoc Pennington  <hp@redhat.com>
9421
9422         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
9423         cheesy hack
9424
9425         * dbus/dbus-transport-debug.c: rework this a good bit to be
9426         less complicated. hopefully still works.
9427
9428         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
9429         manually
9430
9431         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
9432         after running it
9433
9434         * dbus/dbus-message.c (dbus_message_copy): rename from
9435         dbus_message_new_from_message, fix it up to copy
9436         all the message fields, add test case
9437
9438         * bus/dispatch.c (bus_dispatch_test): add some more test code,
9439         not quite passing yet
9440
9441 2003-03-14  Havoc Pennington  <hp@pobox.com>
9442
9443         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
9444         until no work remains" in test code. (the large diff here
9445         is just code movement, no actual changes)
9446
9447         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
9448         1, no point waiting around for test code.
9449         (_dbus_server_debug_accept_transport): unref the timeout
9450         after adding it (right?)
9451
9452         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
9453
9454 2003-03-13  Havoc Pennington  <hp@redhat.com>
9455
9456         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
9457         out of memory
9458
9459         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
9460         of memory
9461
9462         * dbus/dbus-connection.h: Make AddWatchFunction and
9463         AddTimeoutFunction return a bool so they can fail on out-of-memory
9464
9465         * bus/bus.c (bus_context_new): set up timeout handlers
9466
9467         * bus/connection.c (bus_connections_setup_connection): set up
9468         timeout handlers
9469
9470         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
9471         can fail
9472
9473         * bus/bus.c (bus_context_new): adapt to changes
9474
9475         * bus/connection.c: adapt to changes
9476
9477         * test/watch.c: adapt to DBusWatch changes
9478
9479         * bus/dispatch.c (bus_dispatch_test): started adding this but
9480         didn't finish
9481
9482 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
9483
9484         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
9485
9486 2003-03-13  Havoc Pennington  <hp@pobox.com>
9487
9488         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
9489         set up a test framework as for the library
9490
9491 2003-03-12  Havoc Pennington  <hp@pobox.com>
9492
9493         Throughout: purge global variables, introduce BusActivation,
9494         BusConnections, BusRegistry, etc. objects instead.
9495
9496         * bus/bus.h, bus/bus.c: introduce BusContext as a global
9497         message bus object
9498
9499         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
9500         going to redo this a bit differently I think
9501
9502 2003-03-12  Havoc Pennington  <hp@redhat.com>
9503
9504         Mega-patch that gets the message bus daemon initially handling
9505         out-of-memory. Work still needed. Also lots of random
9506         moving stuff to DBusError instead of ResultCode.
9507
9508         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
9509
9510         * dbus/dbus-connection.c
9511         (dbus_connection_send_with_reply_and_block): use DBusError
9512
9513         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
9514         DBusResultCode
9515
9516         * dbus/dbus-connection.c (dbus_connection_send): drop the result
9517         code here, as the only failure possible is OOM.
9518
9519         * bus/connection.c (bus_connection_disconnect):
9520         rename bus_connection_disconnected as it's a notification only
9521
9522         * bus/driver.c (bus_driver_handle_acquire_service): don't free
9523         "name" on get_args failure, should be done by get_args;
9524         don't disconnect client for bad args, just return an error.
9525         (bus_driver_handle_service_exists): ditto
9526
9527         * bus/services.c (bus_services_list): NULL-terminate returned array
9528
9529         * bus/driver.c (bus_driver_send_service_lost)
9530         (bus_driver_send_service_acquired): send messages from driver to a
9531         specific client to the client's unique name, not to the broadcast
9532         service.
9533
9534         * dbus/dbus-message.c (decode_header_data): reject messages that
9535         contain no name field
9536         (_dbus_message_get_client_serial): rename to
9537         dbus_message_get_serial and make public
9538         (_dbus_message_set_serial): rename from set_client_serial
9539         (_dbus_message_set_reply_serial): make public
9540         (_dbus_message_get_reply_serial): make public
9541
9542         * bus/connection.c (bus_connection_foreach): allow stopping
9543         iteration by returning FALSE from foreach function.
9544
9545         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
9546         (dbus_connection_free_preallocated_send)
9547         (dbus_connection_preallocate_send): new API for sending a message
9548         without possibility of malloc failure.
9549         (dbus_connection_send_message): rename to just
9550         dbus_connection_send (and same for whole function family)
9551
9552         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
9553
9554         * dbus/dbus-sysdeps.c (_dbus_exit): new function
9555
9556         * bus/activation.c: handle/return errors
9557
9558         * dbus/dbus-errors.h: add more DBUS_ERROR #define
9559
9560         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
9561         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
9562         (_dbus_result_from_errno): move to this file
9563
9564 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
9565
9566         * dbus/dbus-marshal.c:
9567         (_dbus_marshal_set_string):
9568         Take a length argument so we can marshal the correct string
9569         length.
9570
9571         (_dbus_marshal_dict), (_dbus_demarshal_dict),
9572         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
9573         (_dbus_marshal_test):
9574         * dbus/dbus-marshal.h:
9575         Add support for marshalling and demarshalling dicts.
9576
9577         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9578         Add support for TYPE DICT.
9579
9580         * dbus/dbus-message.c: (set_string_field):
9581         Adjust header padding.
9582
9583         (dbus_message_append_args_valist), (dbus_message_append_dict),
9584         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
9585         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
9586         (check_message_handling), (check_have_valid_message):
9587         * dbus/dbus-message.h:
9588         Add functions for setting and getting dicts.
9589
9590         * dbus/dbus-protocol.h:
9591         Add DBUS_TYPE_DICT.
9592
9593         * dbus/dbus.h:
9594         Add dbus-dict.h
9595
9596         * doc/dbus-specification.sgml:
9597         Add information about how dicts are marshalled.
9598
9599         * test/data/invalid-messages/dict-with-nil-value.message:
9600         * test/data/invalid-messages/too-short-dict.message:
9601         * test/data/valid-messages/dict-simple.message:
9602         * test/data/valid-messages/dict.message:
9603         Add sample messages containing dicts.
9604
9605 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
9606
9607         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
9608
9609 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
9610
9611         * dbus/Makefile.am:
9612         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9613         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
9614         (dbus_dict_set_int32), (dbus_dict_set_uint32),
9615         (dbus_dict_set_double), (dbus_dict_set_string),
9616         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9617         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9618         (dbus_dict_set_string_array), (_dbus_dict_test):
9619         * dbus/dbus-dict.h:
9620         Fix according to comments from Havoc.
9621
9622 2003-03-06  Michael Meeks  <michael@server.home>
9623
9624         * configure.in: if we don't have kde-config, disable have_qt.
9625
9626 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
9627
9628         * dbus/Makefile.am:
9629         Add dbus-dict.[ch]
9630
9631         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9632         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
9633         (dbus_dict_remove), (dbus_dict_get_value_type),
9634         (dbus_dict_get_keys), (dbus_dict_put_boolean),
9635         (dbus_dict_put_int32), (dbus_dict_put_uint32),
9636         (dbus_dict_put_double), (dbus_dict_put_string),
9637         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
9638         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
9639         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
9640         (dbus_dict_get_int32), (dbus_dict_get_uint32),
9641         (dbus_dict_get_double), (dbus_dict_get_string),
9642         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
9643         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
9644         (dbus_dict_get_string_array), (_dbus_dict_test):
9645         * dbus/dbus-dict.h:
9646         Add DBusDict implementation
9647
9648         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
9649         * dbus/dbus-test.h:
9650         Add _dbus_dict_test
9651
9652 2003-03-04  Havoc Pennington  <hp@pobox.com>
9653
9654         * test/data/auth/*: adapt to changes
9655
9656         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
9657         USERID_BASE64 and change USERNAME_BASE64 to put in username not
9658         userid
9659
9660         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
9661         more stuff from being in a context name, to make the protocol
9662         simpler to deal with
9663
9664         * dbus/dbus-errors.c (dbus_error_has_name): new function
9665         (dbus_error_is_set): new function
9666
9667         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
9668         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
9669
9670         * dbus/dbus-connection.c (dbus_connection_flush): also read
9671         messages during a flush operation
9672
9673         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
9674
9675 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
9676
9677         * configure.in: Check for gethostbyname on Solaris.
9678
9679         * dbus/dbus-transport.c: (_dbus_transport_open):
9680         Remove duplicate "tcp" entry.
9681
9682         * doc/dbus-specification.sgml:
9683         Clarify some things.
9684
9685 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
9686
9687         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
9688         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
9689         (_dbus_keyring_test):
9690         * dbus/dbus-md5.c: (_dbus_md5_compute):
9691         * dbus/dbus-sha.c: (_dbus_sha_compute):
9692         Plug memory leaks.
9693
9694 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
9695
9696         * README: Add some things.
9697
9698 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
9699
9700         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
9701         after case DBUS_TYPE_BOOELAN.
9702
9703 2003-03-02  Havoc Pennington  <hp@pobox.com>
9704
9705         * test/break-loader.c (randomly_set_extreme_ints): add test that
9706         sets really huge and small integers
9707
9708         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
9709         that length of boolean array fits in the string, and that
9710         string has room for boolean value in single-bool case.
9711
9712         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
9713         optional value to "ALIGN" command which is what to fill the
9714         alignment with.
9715
9716         * test/data/valid-messages/no-padding.message: add regression
9717         test for the message padding problem
9718
9719 2003-03-02  Havoc Pennington  <hp@pobox.com>
9720
9721         * dbus/dbus-message.c (decode_header_data): fix to always init
9722         message_padding, from Benjamin Dauvergne
9723
9724 2003-03-02  Havoc Pennington  <hp@pobox.com>
9725
9726         * configure.in: 0.5
9727
9728         * NEWS: Update.
9729
9730 2003-03-01  Joe Shaw  <joe@assbarn.com>
9731
9732         * configure.in: Check for "struct cmsgcred" and try to access its
9733         members for BSD-like unices.
9734
9735         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
9736         _dbus_read_credentials_unix_socket().
9737         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
9738         read() for reading the credential byte off the unix socket.  Use
9739         struct cmsgcred on systems that support it.
9740
9741 2003-02-27  Alexander Larsson  <alexl@redhat.com>
9742
9743         * glib/Makefile.am:
9744         * configure.in:
9745         Make gthreads-2.0 dependency optional. Don't build thread test if
9746         its not found.
9747
9748 2003-02-27  Havoc Pennington  <hp@pobox.com>
9749
9750         * dbus/dbus-connection.c
9751         (dbus_connection_send_message_with_reply_and_block): fix doh!
9752         doh! doh! bug that resulted in never removing a reply from the
9753         queue, no wonder we called get_reply_serial so much ;-)
9754
9755         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
9756         and client serial instead of demarshaling them every time
9757
9758 2003-02-27  Havoc Pennington  <hp@pobox.com>
9759
9760         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
9761         more inlined, using dbus-string-private.h, speeds things up
9762         substantially
9763
9764         * dbus/dbus-string.c (_dbus_string_free): apply align offset
9765         when freeing the string
9766         (_dbus_string_steal_data): fix for align offset
9767         (undo_alignment): new function
9768
9769 2003-02-26  Havoc Pennington  <hp@redhat.com>
9770
9771         All kinds of audit fixes from Owen, plus initial attempt to
9772         handle unaligned memory returned from malloc.
9773
9774         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
9775         leave room for align_offset and nul byte
9776         (fixup_alignment): function to track an align_offset and
9777         ensure real->str is aligned
9778         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
9779         to allow a nul byte plus align offset
9780         (_dbus_string_lock): fix overflow issue
9781         (_dbus_string_init_const_len): add assertions on sanity of len,
9782         assign allocated to be ALLOCATION_PADDING larger than len
9783         (set_length): fixup the overflow handling
9784         (_dbus_string_get_data_len): fix overflow in assertion
9785         (open_gap): detect overflow in size of gap to be opened
9786         (_dbus_string_lengthen): add overflow check
9787         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
9788         (_dbus_string_append): add overflow check
9789         (_dbus_string_append_unichar): overflow
9790         (_dbus_string_delete): fix overflow in assertion
9791         (_dbus_string_copy_len): overflow in assertion
9792         (_dbus_string_replace_len): overflows in assertions
9793         (_dbus_string_find): change to implement in terms of
9794         _dbus_string_find_to
9795         (_dbus_string_find_to): assorted fixage
9796         (_dbus_string_equal_c_str): assert c_str != NULL,
9797         fix logic so the function works
9798         (_dbus_string_ends_with_c_str): fix overflow thingy
9799         (_dbus_string_base64_encode): overflow fix
9800         (_dbus_string_validate_ascii): overflow
9801         (_dbus_string_validate_nul): overflow
9802
9803 2003-02-26  Havoc Pennington  <hp@redhat.com>
9804
9805         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
9806
9807 2003-02-26  Alexander Larsson  <alexl@redhat.com>
9808
9809         * configure.in:
9810         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
9811
9812         * dbus/dbus-connection.c:
9813         * dbus/dbus-connection.h:
9814         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
9815         Add dbus_connection_set_wakeup_main_function and use it when queueing
9816         incoming and outgoing messages.
9817
9818
9819         * dbus/dbus-dataslot.c:
9820         Threadsafe usage of DBusDataSlotAllocator
9821
9822         * dbus/dbus-message.c: (dbus_message_get_args_iter):
9823         dbus_new can fail.
9824
9825         * dbus/dbus-server-unix.c:
9826         Add todo comment
9827
9828         * glib/dbus-gmain.c:
9829         Implement the new wakeup functions for glib.
9830
9831         * glib/Makefile.am:
9832         * glib/test-thread-client.c:
9833         * glib/test-thread-server.c:
9834         * glib/test-thread.h:
9835         Initial cut at some thread test code. Not really done yet.
9836
9837 2003-02-26  Havoc Pennington  <hp@pobox.com>
9838
9839         * dbus/dbus-connection.c
9840         (dbus_connection_send_message_with_reply_and_block): fix crash
9841         where we ref'd the outgoing message instead of the returned reply
9842
9843         * dbus/dbus-transport-unix.c (do_authentication): check read watch
9844         at the end of this function, so if we didn't need to read for
9845         authentication, we reinstall it for receiving messages
9846
9847         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
9848         a NULL sender for peer-to-peer case
9849
9850         * dbus/dbus-transport-unix.c (check_read_watch): handle
9851         !authenticated case correctly
9852
9853         * glib/dbus-gmain.c: add support for DBusServer
9854
9855         * dbus/dbus-server.c: add data slot support
9856
9857         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
9858         return values and handle errors
9859
9860         * dbus/dbus-dataslot.c: factor out the data slot stuff from
9861         DBusConnection
9862
9863         * Doxyfile.in (INPUT): add glib subdir
9864
9865         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
9866         setup_with_g_main instead of hookup_with_g_main; write docs
9867
9868 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
9869
9870         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
9871         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9872         * dbus/dbus-message.c: (dbus_message_append_boolean),
9873         (dbus_message_append_boolean_array),
9874         (dbus_message_get_args_valist), (_dbus_message_test):
9875         * dbus/dbus-message.h:
9876         * doc/dbus-specification.sgml:
9877         Various fixes as pointed out by Havoc.
9878
9879         * test/data/invalid-messages/bad-boolean-array.message:
9880         * test/data/invalid-messages/bad-boolean.message:
9881         Add invalid boolean value test cases.
9882
9883 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
9884
9885         * dbus/dbus-internals.c: (_dbus_type_to_string):
9886         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
9887         (_dbus_marshal_validate_arg):
9888         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9889         * dbus/dbus-message.c: (dbus_message_append_args_valist),
9890         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
9891         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
9892         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
9893         (dbus_message_iter_get_double),
9894         (dbus_message_iter_get_boolean_array), (message_iter_test):
9895         * dbus/dbus-message.h:
9896         * dbus/dbus-protocol.h:
9897         * doc/dbus-specification.sgml:
9898         * test/data/valid-messages/lots-of-arguments.message:
9899         Add support for boolean and boolean array types.
9900
9901 2003-02-23  Havoc Pennington  <hp@pobox.com>
9902
9903         * dbus/dbus-keyring.c: finish most of this implementation and
9904         simple unit test
9905
9906         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
9907         these barf if the error isn't cleared to NULL
9908
9909         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
9910         (_dbus_create_directory): new function
9911
9912         * dbus/dbus-errors.c (dbus_set_error): fix warning
9913
9914         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
9915         (_dbus_string_hex_decode): new function
9916         (test_hex_roundtrip): test code
9917
9918         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
9919
9920         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
9921
9922         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
9923         the save-to-temp/rename trick to atomically write the new file
9924         (_dbus_string_parse_uint): new function
9925
9926 2003-02-22  Havoc Pennington  <hp@pobox.com>
9927
9928         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
9929
9930 2003-02-22  Havoc Pennington  <hp@pobox.com>
9931
9932         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
9933         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
9934
9935         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
9936
9937         * dbus/test/data/sha-1: add US government test suite for SHA-1
9938
9939 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
9940
9941         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
9942         Make string arrays NULL-terminated.
9943
9944         * dbus/dbus-memory.c: (dbus_free_string_array):
9945         * dbus/dbus-memory.h:
9946         New function for freeing NULL-terminated string arrays.
9947
9948         * dbus/dbus-message-builder.c: (append_quoted_string),
9949         (_dbus_message_data_load):
9950         Add support for array types.
9951
9952         * dbus/dbus-message.c: (check_message_handling):
9953         Add more types as test cases.
9954
9955         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
9956         (_dbus_string_parse_double):
9957         Add the start offset to the end offset.
9958
9959         * test/data/valid-messages/lots-of-arguments.message:
9960         New test message with lots of arguments.
9961
9962 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
9963
9964         * dbus/dbus-message.c: (dbus_message_append_nil),
9965         (dbus_message_append_int32), (dbus_message_append_uint32),
9966         (dbus_message_append_double), (dbus_message_append_string),
9967         (dbus_message_append_int32_array),
9968         (dbus_message_append_uint32_array),
9969         (dbus_message_append_double_array),
9970         (dbus_message_append_byte_array),
9971         (dbus_message_append_string_array):
9972         Fix all out-of-memory handling in these functions.
9973
9974 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
9975
9976         * dbus/dbus-message.c: (dbus_message_append_nil):
9977         Fix a silly.
9978
9979 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
9980
9981         * dbus/dbus-message.c: (dbus_message_append_args_valist),
9982         (dbus_message_append_nil), (dbus_message_append_int32_array),
9983         (dbus_message_append_uint32_array),
9984         (dbus_message_append_double_array),
9985         (dbus_message_append_byte_array),
9986         (dbus_message_append_string_array), (dbus_message_get_args_valist),
9987         (dbus_message_iter_get_int32_array),
9988         (dbus_message_iter_get_uint32_array),
9989         (dbus_message_iter_get_double_array),
9990         (dbus_message_iter_get_byte_array),
9991         (dbus_message_iter_get_string_array):
9992
9993         * dbus/dbus-message.h:
9994         Add functions for appending and getting arrays.
9995
9996 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
9997
9998         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
9999         element size at least 8 bytes, fixes mempool tests on
10000         64-bit machines.
10001
10002 2003-02-20  Alexander Larsson  <alexl@redhat.com>
10003
10004         * dbus/dbus-transport-unix.c (unix_do_iteration):
10005         Unlock the connection mutex during a blocking select call.
10006         Add todo about how we need a way to wake up the select.
10007
10008         * dbus/dbus-connection-internal.h:
10009         * dbus/dbus-connection.c:
10010         Add _dbus_connection_lock and _dbus_connection_unlock.
10011
10012 2003-02-19  Havoc Pennington  <hp@pobox.com>
10013
10014         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
10015         Doxyfile.in, not Doxyfile
10016
10017         * dbus/dbus-keyring.c: do some hacking on this
10018
10019         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
10020
10021         * dbus/dbus-errors.c (dbus_set_error_const): do not call
10022         dbus_error_init
10023         (dbus_set_error): remove dbus_error_init, check for message ==
10024         NULL *before* we sprintf into it, and add @todo about including
10025         system headers in this file
10026
10027         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
10028
10029         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
10030
10031         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
10032         get various bits of user information based on either username
10033         or user ID
10034         (_dbus_homedir_from_username): new function
10035
10036 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
10037
10038         * configure.in:
10039         Add check for nonposix getpwnam_r
10040
10041         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
10042         Align the pool element size to a sizeof (void *) boundary.
10043
10044         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
10045         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
10046         General Solaris fixes.
10047
10048         * test/data/valid-messages/simplest-manual.message:
10049         Explicitly state that we want little-endian packing.
10050
10051 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
10052
10053         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10054
10055         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
10056         Added to create a transport connecting using a tcp/ip socket.
10057
10058         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
10059         to a tcp socket at given host and port.
10060         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
10061         hostname and port.
10062
10063         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10064
10065         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
10066         Added to create a server listening on a TCP/IP socket.
10067
10068 2003-02-19  Havoc Pennington  <hp@pobox.com>
10069
10070         Throughout: mop up all the Doxygen warnings and undocumented
10071         stuff.
10072
10073         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
10074         to search any paths.
10075
10076         * dbus/dbus-threads.c: move global mutex initializers to
10077         dbus-internals.h, multiple prototypes was confusing doxygen
10078         besides being kind of ugly
10079
10080         * Doxyfile (PREDEFINED): have Doxygen define
10081         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
10082         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
10083         (do not abuse the feature! it's for stuff like the autogenerated
10084         macros in dbus-md5.c, not just for things you don't feel like
10085         documenting...)
10086
10087 2003-02-18  Havoc Pennington  <hp@pobox.com>
10088
10089         * dbus/dbus-string.c (_dbus_string_zero): new function
10090
10091         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
10092         wrap it in some dbus-friendly API
10093
10094         * dbus/dbus-types.h: add 16-bit types
10095
10096 2003-02-18  Joe Shaw  <joe@assbarn.com>
10097
10098         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
10099         credentials from our currently running process.
10100         (get_word): Fix a buglet where we were copying the entire length
10101         instead of relative to our position.
10102
10103         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
10104         keys on the stack... it's 640k of data.
10105
10106         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
10107         read the credentials byte off the socket, even if we don't have
10108         SO_PEERCRED.
10109         (_dbus_poll): Implement poll() using select() for systems which
10110         don't have it.
10111
10112         * glib/test-dbus-glib.c (main): Print out an error if no
10113         parameters are given.
10114
10115         * test/data/auth/fallback.auth-script: Added.  Tests that a client
10116         can fallback to a secondary auth mechanism if the first fails.
10117
10118 2003-02-18  Havoc Pennington  <hp@pobox.com>
10119
10120         * AUTHORS: add Alex
10121
10122 2003-02-17  Havoc Pennington  <hp@pobox.com>
10123
10124         * doc/dbus-specification.sgml: lots of cosmetic
10125         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
10126         env variable to DBUS_BUS_ADDRESS, s/client/application/,
10127         s/server/bus/ (except in authentication section). Add a section
10128         "Message Bus Message Routing"
10129
10130 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
10131
10132         Release 0.4
10133
10134         * NEWS: Update
10135
10136 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10137
10138         * doc/dbus-specification.sgml:
10139         Specification updates.
10140
10141 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10142
10143         * bus/activation.c: (bus_activation_init), (child_setup),
10144         (bus_activation_activate_service):
10145         * bus/activation.h:
10146         * bus/main.c: (main):
10147         Set DBUS_ADDRESS environment variable.
10148
10149         * dbus/dbus-errors.c: (dbus_set_error):
10150         Don't use va_copy since that's a C99 feature.
10151
10152         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
10153         (_dbus_spawn_async):
10154         * dbus/dbus-sysdeps.h:
10155         Add child_setup_func to _dbus_spawn_async.
10156
10157         * doc/dbus-specification.sgml:
10158         Update specification.
10159
10160         * test/spawn-test.c: (setup_func), (main):
10161         Fix test.
10162
10163 2003-02-17  Alexander Larsson  <alexl@redhat.com>
10164
10165         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
10166         Added todo.
10167
10168 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10169
10170         * doc/.cvsignore:
10171         * doc/Makefile.am:
10172         * doc/dbus-test-plan.sgml:
10173         Add test plan document.
10174
10175         * test/Makefile.am:
10176         Fix distcheck.
10177
10178 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10179
10180         * dbus/dbus-message.c: (decode_header_data),
10181         (_dbus_message_loader_return_buffer):
10182         Set the header padding amount when loading a message.
10183
10184 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10185
10186         * bus/dispatch.c: (send_one_message):
10187         Only send broadcast messages to registered connections.
10188
10189         * dbus/dbus-message.c: (dbus_message_name_is):
10190         * dbus/dbus-message.h:
10191         New convenience function.
10192
10193         * dbus/dbus-transport-debug.c: (do_reading):
10194         Only dispatch one message per run.
10195
10196         * test/Makefile.am:
10197         * test/bus-test.c: (new_connection_callback), (die),
10198         (test_hello_client1_handler), (test_hello_client2_handler),
10199         (test_hello_replies), (main):
10200
10201         * test/bus-test-loop.[ch]:
10202         Add these.
10203
10204 2003-02-16  Havoc Pennington  <hp@pobox.com>
10205
10206         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
10207         backward conditional
10208
10209 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10210
10211         * dbus/dbus-connection.c:
10212         Implement sent_message_with_reply. (with_reply_and block is still
10213         busted).
10214         Made dispatch_message not lose message if OOM.
10215
10216         * dbus/dbus-errors.h:
10217         Add NoReply error (for reply timeouts).
10218
10219 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10220
10221         * dbus/dbus-hash.c (_dbus_hash_table_unref):
10222         Actually free keys and values when destroying hashtable.
10223
10224 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10225
10226         * dbus/dbus-auth.c: (client_try_next_mechanism):
10227         Plug a leak.
10228
10229         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
10230         Return TRUE if there's no thread implementation around.
10231
10232         * glib/dbus-gmain.c: (free_source),
10233         (dbus_connection_hookup_with_g_main):
10234         Make sure to remove the GSource when the connection is finalized.
10235
10236 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10237
10238         * bus/dispatch.c: (bus_dispatch_message_handler):
10239         * dbus/dbus-errors.h:
10240         Return an error if someone tries to send a message to a service
10241         that doesn't exist.
10242
10243 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10244
10245         * bus/activation.c: (load_directory), (bus_activation_init),
10246         (bus_activation_activate_service):
10247         * bus/activation.h:
10248         * bus/driver.c:
10249         (bus_driver_handle_activate_service), (bus_driver_handle_message):
10250         More work on the activation handling.
10251
10252         * dbus/dbus-errors.h:
10253         Add some error messages
10254
10255         * dbus/dbus-message.c: (dbus_message_new_error_reply):
10256         * dbus/dbus-message.h:
10257         New function that creates an error message.
10258
10259         * dbus/dbus-protocol.h:
10260         Add ACTIVATE_SERVER message.
10261
10262         * dbus/dbus-server-unix.c: (unix_handle_watch),
10263         (_dbus_server_new_for_domain_socket):
10264         Call _dbus_fd_set_close_on_exec.
10265
10266         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
10267         (_dbus_spawn_async), (_dbus_disable_sigpipe),
10268         (_dbus_fd_set_close_on_exec):
10269         * dbus/dbus-sysdeps.h:
10270         Add _dbus_fd_set_close_on exec function. Also add function that checks
10271         that all open fds are set to close-on-exec and warns otherwise.
10272
10273         * dbus/dbus-transport-unix.c:
10274         (_dbus_transport_new_for_domain_socket):
10275         Call _dbus_fd_set_close_on_exec.
10276
10277 2003-02-16  Havoc Pennington  <hp@pobox.com>
10278
10279         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
10280         allow people to avoid setting SIGPIPE to SIG_IGN
10281         (_dbus_connection_new_for_transport): disable SIGPIPE unless
10282         we've been asked not to
10283
10284 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10285
10286         * dbus/dbus-list.c: (_dbus_list_append_link),
10287         (_dbus_list_prepend_link):
10288         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
10289         (dbus_realloc):
10290         Warning fixes.
10291
10292 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10293
10294         * bus/Makefile.am:
10295         * bus/activation.c: (bus_activation_entry_free),
10296         (add_desktop_file_entry), (load_directory), (bus_activation_init):
10297         * bus/activation.h:
10298         * bus/main.c: (main):
10299         Add simple activation support, doesn't work yet though.
10300
10301 2003-02-15   Zack Rusin  <zack@kde.org>
10302
10303         * qt/dbus-qthread.cpp:  small casting fix
10304
10305 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10306
10307         * dbus/dbus-errors.c: (dbus_set_error):
10308         * dbus/dbus-errors.h:
10309         Add a few errors and make dbus_set_error void.
10310
10311         * dbus/dbus-sysdeps.c:
10312         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
10313         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
10314         * dbus/dbus-sysdeps.h:
10315         Add _dbus_spawn_async.
10316
10317         * test/spawn-test.c: (main):
10318         Test for _dbus_spawn_async.
10319
10320 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10321
10322         * dbus/dbus-internals.h:
10323         Fix build without tests.
10324
10325         * dbus/dbus-list.c: (alloc_link):
10326         Fix a segfault when a malloc fails.
10327
10328         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
10329         (dbus_malloc0), (dbus_realloc):
10330         Add support for malloc debugging.
10331
10332 2003-02-15  Alexander Larsson  <alexl@redhat.com>
10333
10334         * dbus/dbus-threads.c:
10335         * dbus/dbus-threads.h:
10336         Add condvars. Remove static mutext from API.
10337         Implement static mutexes by initializing them from threads_init.
10338
10339         * glib/dbus-gthread.c:
10340         * qt/dbus-qthread.cpp:
10341         Update with the thread api changes.
10342
10343
10344         * dbus/dbus-list.c:
10345         * dbus/dbus-list.h:
10346         Turn StaticMutex into normal mutex + init function.
10347         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
10348         _dbus_list_append_link, _dbus_list_prepend_link
10349
10350
10351         * dbus/dbus-sysdeps.c:
10352         * dbus/dbus-sysdeps.h:
10353         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
10354         _dbus_atomic_dec. Only slow fallback implementation at the moment.
10355
10356         * dbus/dbus-protocol.h:
10357         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
10358
10359         * dbus/dbus-message.c:
10360         Make ref/unref atomic.
10361         Fix some docs.
10362
10363         * dbus/dbus-connection-internal.h:
10364         * dbus/dbus-connection.c:
10365         * dbus/dbus-connection.h:
10366         Make threadsafe.
10367         Change _peek to _borrow,_return & _steal_borrowed.
10368         Change disconnect callback to event.
10369         Make dbus_connection_dispatch_messages reentrant.
10370
10371         * dbus/dbus-transport.c:
10372         Don't ref the connection on calls to the transport
10373         implementation.
10374
10375         * dbus/dbus-message-handler.c:
10376         Make threadsafe.
10377
10378         * glib/dbus-gmain.c:
10379         Don't use peek_message anymore
10380
10381         * test/Makefile.am:
10382         * test/debug-thread.c:
10383         * test/debug-thread.h:
10384         Simple thread implementation that asserts() on deadlocks in
10385         single-threaded code.
10386
10387         * test/bus-test.c:
10388         (main) Call debug_threads_init.
10389
10390         * test/watch.c:
10391         Use disconnect message instead of disconnect callback.
10392
10393         * bus/connection.c:
10394         * bus/connection.h:
10395         Don't call dbus_connection_set_disconnect_function. Instead export
10396         bus_connection_disconnect.
10397
10398         * bus/dispatch.c:
10399         Call bus_connection_disconnect when we get a disconnected message.
10400
10401 2003-02-15  Havoc Pennington  <hp@pobox.com>
10402
10403         * dbus/dbus-message.c (dbus_message_new): fool around with the
10404         docs
10405
10406 2003-02-14  Havoc Pennington  <hp@pobox.com>
10407
10408         * dbus/dbus-mempool.c: fail if the debug functions so indicate
10409
10410         * dbus/dbus-memory.c: fail if the debug functions indicate we
10411         should
10412
10413         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
10414         (_dbus_decrement_fail_alloc_counter): debug functions to
10415         simulate memory allocation failures
10416
10417 2003-02-14  Havoc Pennington  <hp@pobox.com>
10418
10419         * dbus/dbus-errors.h (struct DBusError): add a word of padding
10420         to DBusError
10421
10422 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10423
10424         * bus/driver.c: (bus_driver_handle_hello):
10425         * bus/driver.h:
10426         * bus/services.c: (bus_service_lookup):
10427         Reorder message sending so we get a more sane order.
10428
10429         * test/bus-test.c: (message_handler):
10430         Fix tyop.
10431
10432 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10433
10434         * bus/driver.c: (bus_driver_send_service_deleted),
10435         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10436         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10437         (bus_driver_send_welcome_message),
10438         (bus_driver_handle_list_services),
10439         (bus_driver_handle_acquire_service),
10440         (bus_driver_handle_service_exists):
10441         * dbus/dbus-bus.c: (dbus_bus_register_client),
10442         (dbus_bus_acquire_service), (dbus_bus_service_exists):
10443         * dbus/dbus-errors.c: (dbus_result_to_string):
10444         * dbus/dbus-errors.h:
10445         * dbus/dbus-message.c: (dbus_message_append_args),
10446         (dbus_message_append_args_valist), (dbus_message_get_args),
10447         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
10448         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
10449         (dbus_message_iter_get_byte_array),
10450         (dbus_message_iter_get_string_array), (message_iter_test),
10451         (check_message_handling), (_dbus_message_test):
10452         * dbus/dbus-message.h:
10453         * test/bus-test.c: (main):
10454         Change fields to arguments in messages, so that they won't be
10455         confused with header fields.
10456
10457         * glib/test-dbus-glib.c: (main):
10458         Remove append_fields from hello message.
10459
10460 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10461
10462         * dbus/dbus-errors.c:
10463         * dbus/dbus-message.c:
10464         * dbus/dbus-string.c:
10465         Documentation fixes.
10466
10467 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10468
10469         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
10470         (remove_timeout):
10471         Implement support for timeouts in dbus-glib.
10472
10473 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10474
10475         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10476         * dbus/dbus-message.c: (process_test_subdir):
10477         * test/break-loader.c: (find_breaks_based_on):
10478         Plug some memory leaks.
10479
10480 2003-02-13  Richard Hult  <rhult@codefactory.se>
10481
10482         * bus/main.c: Fix build.
10483
10484         * dbus/dbus-errors.h:
10485         * dbus/dbus-errors.c: Fix copyright for Anders.
10486
10487 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10488
10489         * bus/Makefile.am:
10490         Add utils.[ch]
10491
10492         * bus/connection.c: (bus_connection_foreach):
10493         Fix a warning.
10494
10495         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10496         (unescape_string), (new_section), (parse_section_start),
10497         (parse_key_value), (report_error), (bus_desktop_file_load),
10498         (bus_desktop_file_get_string):
10499         * bus/desktop-file.h:
10500         Use DBusError for error reporting.
10501
10502         * bus/dispatch.c: (send_one_message),
10503         (bus_dispatch_message_handler):
10504         * bus/driver.c: (bus_driver_send_service_deleted),
10505         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10506         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10507         (bus_driver_send_welcome_message),
10508         (bus_driver_handle_list_services),
10509         (bus_driver_handle_acquire_service),
10510         (bus_driver_handle_service_exists):
10511         * bus/loop.c: (bus_loop_run):
10512         * bus/main.c:
10513         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
10514
10515         * bus/utils.c: (bus_wait_for_memory):
10516         * bus/utils.h:
10517         New files with general utility functions.
10518
10519         * dbus/dbus-internals.h:
10520         Remove _DBUS_HANDLE_OOM.
10521
10522 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10523
10524         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
10525         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
10526         * dbus/dbus-errors.h:
10527         Add DBusError structure.
10528
10529 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10530
10531         * test/data/valid-messages/standard-acquire-service.message:
10532         * test/data/valid-messages/standard-hello.message:
10533         * test/data/valid-messages/standard-list-services.message:
10534         * test/data/valid-messages/standard-service-exists.message:
10535         Add some standard messages.
10536
10537 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10538
10539         * bus/driver.c: (bus_driver_send_welcome_message),
10540         (bus_driver_handle_list_services),
10541         (bus_driver_handle_acquire_service),
10542         (bus_driver_handle_service_exists), (bus_driver_handle_message):
10543         Update for API changes in libdbus.
10544
10545         * dbus/dbus-message.c: (dbus_message_new_reply):
10546         * dbus/dbus-message.h:
10547         Remove the name argument. The spec states that replies shouldn't
10548         have a name.
10549
10550 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10551
10552         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
10553         (report_error), (bus_desktop_file_load), (lookup_section),
10554         (lookup_line), (bus_desktop_file_get_raw),
10555         (bus_desktop_file_get_string):
10556         * bus/desktop-file.h:
10557         Some fixes, and new functions for getting a key value from a section.
10558
10559 2003-02-13  Havoc Pennington  <hp@pobox.com>
10560
10561         * test/data/auth/fail-after-n-attempts.auth-script: new test
10562
10563         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
10564         reject the client.
10565
10566 2003-02-13  Havoc Pennington  <hp@pobox.com>
10567
10568         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
10569         dbus_credentials_match were backward
10570
10571         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
10572         NO_CREDENTIALS and ROOT_CREDENTIALS
10573
10574         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
10575         into here. Never process more commands after we've reached an
10576         end state; store further data as unused bytes.
10577
10578         * test/data/auth/*: add more auth tests
10579
10580         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
10581         command to match exact string and EXPECT_UNUSED to match unused
10582         bytes
10583
10584         * test/Makefile.am (dist-hook): fix to dist all the test stuff
10585
10586 2003-02-12  Havoc Pennington  <hp@pobox.com>
10587
10588         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
10589         \r off of popped lines
10590
10591         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
10592         scripts
10593
10594         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
10595         SEND, append \r\n
10596
10597 2003-02-12  Havoc Pennington  <hp@pobox.com>
10598
10599         * dbus/Makefile.am: remove break-loader from the build, since it
10600         moved.
10601
10602         * configure.in: add --enable-gcov to turn on coverage profiling
10603         flags and disable optimization
10604
10605 2003-02-10  Havoc Pennington  <hp@pobox.com>
10606
10607         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
10608         initial cut at test framework for DBusAuth from laptop.
10609         Doesn't quite work yet but it compiles and I need to get
10610         it off the 266mhz laptop. ;-)
10611
10612         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
10613         fix a memleak in error case
10614
10615 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
10616
10617         * bus/Makefile.am:
10618         * bus/desktop-file.c:
10619         * bus/desktop-file.h:
10620         Add a desktop file parser.
10621
10622 2003-02-11  Zack Rusin  <zack@kde.org>
10623
10624         * qt/message.[h|cpp]: sample implementation
10625         of the KDE wrapper for DBusMessage
10626
10627 2003-02-09  Zack Rusin  <zack@kde.org>
10628
10629         * test/bus-test.c: make_it_compile
10630         * doc/dbus-specification.sgml: minimal semantic fix
10631
10632 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
10633
10634         Release 0.3
10635
10636         * NEWS: Update
10637
10638 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
10639
10640         * dbus/Makefile.am:
10641         * dbus/dbus-break-loader.c:
10642         * test/Makefile.am:
10643         * test/break-loader.c:
10644         Move dbus-break-loader to test/ and rename it to break-loader.
10645
10646 2003-02-02  Havoc Pennington  <hp@pobox.com>
10647
10648         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
10649         for code to manage cookies in your home directory
10650
10651         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
10652
10653         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
10654         to authenticate, then disconnect the client.
10655
10656 2003-02-03  Alexander Larsson  <alexl@redhat.com>
10657
10658         * dbus/dbus-message.c (dbus_message_append_fields):
10659         Correct docs.
10660
10661 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10662
10663         * doc/dbus-specification.sgml:
10664         Update address format section.
10665
10666 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10667
10668         * test/Makefile.am:
10669         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
10670         (message_handler), (new_connection_callback), (loop_quit),
10671         (loop_run), (main):
10672         Add bus test.
10673
10674 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10675
10676         * bus/driver.c: (bus_driver_handle_service_exists):
10677         Simplify the code a bit.
10678
10679         * dbus/dbus-bus.c: (dbus_bus_service_exists):
10680         Fix a silly.
10681
10682 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10683
10684         * bus/Makefile.am:
10685         Add libdbus-daemon.la and link to it.
10686
10687 2003-02-01  James Willcox  <jwillcox@gnome.org>
10688
10689         * bus/driver.c: (bus_driver_handle_own_service):
10690         Actually include the service reply code in the message.
10691
10692 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10693
10694         * bus/driver.c: (bus_driver_handle_service_exists):
10695         Don't unref the incoming message.
10696
10697 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10698
10699         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
10700
10701 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10702
10703         * dbus/dbus-server.c: (dbus_server_listen):
10704         * dbus/dbus-transport.c: (_dbus_transport_open):
10705         ifdef out the calls to the debug transport and server.
10706
10707 2003-02-02  Alexander Larsson  <alexl@redhat.com>
10708
10709         * dbus/dbus-watch.c (dbus_watch_get_flags):
10710         Add note in the docs that ERROR or HANGUP won't be returned
10711         and are assumed always on.
10712
10713         * glib/dbus-gmain.c (add_watch):
10714         Always add IO_ERR | IO_HUP
10715
10716         * dbus/dbus-message.h:
10717         Add semicolon after dbus_message_iter_get_string_array().
10718         Makes qt code build again
10719
10720 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
10721
10722         * bus/driver.c: (create_unique_client_name),
10723         (bus_driver_handle_hello):
10724         Don't take a name, just use a numeric id to identify
10725         each client.
10726
10727         * dbus/Makefile.am:
10728         * dbus/dbus-bus.c: (dbus_bus_register_client),
10729         (dbus_bus_acquire_service), (dbus_bus_service_exists):
10730         * dbus/dbus-bus.h:
10731         Add new convenience functions for communicating with the bus.
10732
10733         * dbus/dbus-message.h:
10734
10735         * dbus/dbus-protocol.h:
10736         Fix a typo.
10737
10738 2003-02-01  Alexander Larsson  <alexl@redhat.com>
10739
10740         * dbus/dbus-message.c (dbus_message_append_fields):
10741         Add some more doc comments.
10742
10743 2003-02-01  Havoc Pennington  <hp@pobox.com>
10744
10745         * dbus/dbus-break-loader.c (randomly_modify_length): change
10746         a 4-byte value in the message as if it were a length
10747
10748         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
10749         execute bit on saved files
10750
10751 2003-02-01  Havoc Pennington  <hp@pobox.com>
10752
10753         * dbus/dbus-break-loader.c (main): new program to find messages
10754         that break the loader.
10755
10756         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
10757         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
10758
10759         * dbus/dbus-string.c (_dbus_string_set_byte): new
10760
10761 2003-01-31  Havoc Pennington  <hp@pobox.com>
10762
10763         * dbus/dbus-message.c: refactor the test code to be more general,
10764         in preparation for writing a "randomly permute test cases to
10765         try to break the loader" program.
10766
10767 2003-01-31  Havoc Pennington  <hp@pobox.com>
10768
10769         * doc/dbus-specification.sgml: work on the specification
10770
10771         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
10772         the protocol version of the message.
10773
10774         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
10775         no longer specifies that.
10776         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
10777         1/2/3/4)
10778
10779         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
10780         "break" for DBUS_TYPE_NIL, remove @todo
10781
10782 2003-01-31  Havoc Pennington  <hp@pobox.com>
10783
10784         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
10785         just set_is_error/get_is_error as this is a commonly-used
10786         function, and write docs.
10787
10788 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
10789
10790         * dbus/dbus-address.c: (dbus_address_entry_free):
10791         Free key and value lists.
10792
10793         * dbus/dbus-internals.c: (_dbus_type_to_string):
10794         Add the types we didn't have.
10795
10796         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
10797         (_dbus_marshal_validate_arg):
10798         Add NIL types.
10799
10800         * dbus/dbus-message.c: (dbus_message_set_sender):
10801         Remove todo about being able to set sender to NULL.
10802
10803         (dbus_message_set_is_error_reply),
10804         (dbus_message_get_is_error_reply):
10805         * dbus/dbus-message.h:
10806         New functions.
10807
10808         * dbus/dbus-protocol.h:
10809         Add error reply flag.
10810
10811         * test/data/valid-messages/opposite-endian.message:
10812         Add NIL type to test.
10813
10814 2003-01-31  Havoc Pennington  <hp@pobox.com>
10815
10816         * doc/dbus-specification.sgml: fully specify the header.  Add
10817         flags and major protocol version, and change header/body len to
10818         unsigned.
10819
10820         * dbus/dbus-message-builder.c (append_saved_length): append length
10821         as uint32
10822
10823         * dbus/dbus-message.c (dbus_message_create_header): change header
10824         length and body length to unsigned. Add the new fields from the
10825         spec
10826         (_dbus_message_loader_return_buffer): unsigned header/body len
10827
10828 2003-01-30  Havoc Pennington  <hp@pobox.com>
10829
10830         * dbus/dbus-auth.c: rework to use only REJECTED, no
10831         MECHANISMS
10832
10833         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
10834         use REJECTED, suggested by Mark McLoughlin
10835
10836 2003-01-30  Havoc Pennington  <hp@pobox.com>
10837
10838         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
10839         a better way to report errors here. e.g.  "unix address lacks
10840         path" or something. also "no such file" when the path doesn't
10841         exist, etc.
10842
10843         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
10844         leaking list nodes
10845         (dbus_parse_address): add @todo about documenting address format,
10846         and allowing , and ; to be escaped
10847
10848 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
10849
10850         * dbus/Makefile.am:
10851         Add dbus-address.[ch]
10852
10853         * dbus/dbus-address.c: (dbus_address_entry_free),
10854         (dbus_address_entries_free), (create_entry),
10855         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
10856         (dbus_parse_address), (_dbus_address_test):
10857         * dbus/dbus-address.h:
10858         New files for dealing with address parsing.
10859
10860         * dbus/dbus-connection.c:
10861         Document timeout functions.
10862
10863         * dbus/dbus-message.c:
10864         Document dbus_message_new_from_message.
10865
10866         * dbus/dbus-server-debug.c:
10867         Document.
10868
10869         * dbus/dbus-server.c: (dbus_server_listen):
10870         Parse address and use correct server implementation.
10871
10872         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
10873         * dbus/dbus-string.h:
10874         New function with test.
10875
10876         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
10877         * dbus/dbus-test.h:
10878         Add address tests.
10879
10880         * dbus/dbus-transport-debug.c:
10881         Document.
10882
10883         * dbus/dbus-transport.c: (_dbus_transport_open):
10884         Parse address and use correct transport implementation.
10885
10886 2003-01-30  Havoc Pennington  <hp@pobox.com>
10887
10888         * dbus/dbus-message.c: use message->byte_order instead of
10889         DBUS_COMPILER_BYTE_ORDER throughout.
10890         (dbus_message_create_header): pad header to align the
10891         start of the body of the message to 8-byte boundary
10892
10893         * dbus/dbus-marshal.h: make all the demarshalers take const
10894         DBusString arguments.
10895
10896         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
10897         validate message args here, so we don't have to do slow validation
10898         later, and so we catch bad messages as they are incoming. Also add
10899         better checks on header_len and body_len. Also fill in
10900         message->byte_order
10901
10902         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
10903         implemented properly)
10904         (_dbus_string_validate_nul): new function to check all-nul
10905
10906         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
10907         get_arg_end_pos and remove all validation
10908         (_dbus_marshal_validate_arg): actually do validation here.
10909
10910 2003-01-29  Havoc Pennington  <hp@pobox.com>
10911
10912         * dbus/dbus-message.c (check_message_handling): fix assertion
10913         failure on set_client_serial
10914
10915 2003-01-28  Havoc Pennington  <hp@pobox.com>
10916
10917         * dbus/dbus-server-debug.c: Add doc section comments
10918
10919         * dbus/dbus-transport-debug.c: add doc section comments
10920
10921 2003-01-28  Havoc Pennington  <hp@redhat.com>
10922
10923         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
10924         the reverse order from how I had it
10925         (_dbus_string_base64_encode): reverse encoding order. I was
10926         basically byteswapping everything during encoding.
10927
10928 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
10929
10930         * dbus/dbus-connection-internal.h:
10931         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
10932         (_dbus_connection_remove_timeout):
10933         Add functions for adding and removing timeouts.
10934
10935         * dbus/dbus-message.c: (dbus_message_new_from_message):
10936         Add new function that takes a message and creates an exact
10937         copy of it, but with the refcount set to 1.
10938         (check_message_handling):
10939         Fix build error.
10940
10941         * dbus/dbus-server-protected.h:
10942         * dbus/dbus-server.c: (_dbus_server_init_base),
10943         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
10944         (dbus_server_set_timeout_functions):
10945         (_dbus_server_remove_timeout):
10946         New functions so that a server can add and remove timeouts.
10947
10948         (dbus_server_listen):
10949         Add commented out call to dbus_server_debug_new.
10950
10951         * dbus/dbus-timeout.c: (_dbus_timeout_new):
10952         Actually set the handler, doh.
10953
10954         * dbus/dbus-transport.c: (_dbus_transport_open):
10955         Add commented out call to dbus_transport_debug_client_new.
10956
10957         * dbus/Makefile.am:
10958         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
10959
10960 2003-01-28  Havoc Pennington  <hp@pobox.com>
10961
10962         * dbus/dbus-message.c (check_message_handling): function to check
10963         on the loaded message, iterates over it etc.
10964
10965 2003-01-28  Havoc Pennington  <hp@pobox.com>
10966
10967         * test/Makefile.am (dist-hook): fix make distdir
10968
10969         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
10970
10971 2003-01-27  Havoc Pennington  <hp@pobox.com>
10972
10973         * dbus/dbus-mempool.c (time_for_size): replace printf with
10974         _dbus_verbose
10975
10976         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
10977         empty lines; fix the SAVE_LENGTH stuff to be
10978         START_LENGTH/END_LENGTH so it actually works; couple other
10979         bugfixes
10980
10981         * test/Makefile.am (dist-hook): add dist-hook for .message files
10982
10983         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
10984         can be constant or locked.
10985         (_dbus_string_free): allow freeing a const string as
10986         documented/intended
10987
10988         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
10989
10990         * dbus/dbus-test-main.c (main): take an argument which is the
10991         directory containing test data
10992
10993         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
10994         argument to this and load all the messages in test/data/
10995         checking that they can be loaded or not loaded as appropriate.
10996
10997 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
10998
10999         * bus/dispatch.c: (bus_dispatch_message_handler):
11000         Dispatch messages sent to services.
11001
11002         * bus/driver.c: (bus_driver_send_service_deleted),
11003         (bus_driver_send_service_created), (bus_driver_send_service_lost),
11004         (bus_driver_send_service_acquired):
11005         Add helper functions for sending service related messages.
11006
11007         (bus_driver_send_welcome_message):
11008         Send HELLO_REPLY instead of WELCOME.
11009
11010         (bus_driver_handle_list_services):
11011         Send LIST_SERVICES_REPLY instead of SERVICES.
11012
11013         (bus_driver_handle_own_service),
11014         (bus_driver_handle_service_exists):
11015         New message handlers.
11016
11017         (bus_driver_handle_message):
11018         Invoke new message handlers.
11019
11020         (bus_driver_remove_connection):
11021         Don't remove any services here since that's done automatically
11022         by bus_service_remove_owner now.
11023
11024         * bus/driver.h:
11025         New function signatures.
11026
11027         * bus/services.c: (bus_service_add_owner):
11028         Send ServiceAcquired message if we're the only primary owner.
11029
11030         (bus_service_remove_owner):
11031         Send ServiceAcquired/ServiceLost messages.
11032
11033         (bus_service_set_prohibit_replacement),
11034         (bus_service_get_prohibit_replacement):
11035         Functions for setting prohibit replacement.
11036
11037         (bus_service_has_owner):
11038         New function that checks if a connection is in the owner queue of
11039         a certain service.
11040
11041         * bus/services.h:
11042         Add new function signatures.
11043
11044         * dbus/dbus-list.c: (_dbus_list_test):
11045         Add tests for _dbus_list_remove_last and traversing the list backwards.
11046
11047         * dbus/dbus-list.h:
11048         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
11049         go any further, so return NULL then.
11050
11051         * dbus/dbus-protocol.h:
11052         Add new messages, service flags and service replies.
11053
11054 2003-01-26  Havoc Pennington  <hp@pobox.com>
11055
11056         * dbus/dbus-message-builder.c: implement, completely untested.
11057
11058         * test/data/*: add data to be used in testing.
11059         ".message" files are our simple loadable text format.
11060         ".message-raw" will be binary dumps of messages.
11061
11062         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11063
11064 2003-01-26  Havoc Pennington  <hp@pobox.com>
11065
11066         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
11067
11068         * dbus/dbus-errors.c (dbus_result_to_string): add
11069         file errors
11070
11071         * dbus/dbus-message-builder.c: new file, will contain code to load
11072         up messages from files. Not implemented yet.
11073
11074 2003-01-26  Havoc Pennington  <hp@pobox.com>
11075
11076         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
11077         the sender by setting to NULL
11078
11079 2003-01-26  Havoc Pennington  <hp@pobox.com>
11080
11081         The unit tests pass, but otherwise untested.  If it breaks, the
11082         tests should have been better. ;-)
11083
11084         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
11085         the connection.
11086
11087         * dbus/dbus-message.c: redo everything so we maintain
11088         message->header as the only copy of the various fields.
11089         This avoids the possibility of out-of-memory in some cases,
11090         for example dbus_message_lock() can't run out of memory anymore,
11091         and avoids extra copying. Figured I may as well go ahead and do
11092         this since it was busted for dbus_message_lock to not return
11093         failure on OOM, and dbus_message_write_header was totally
11094         unchecked for OOM. Also fixed some random other bugs.
11095
11096         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
11097         that strings are nul-terminated. Also, end_pos can be equal
11098         to string length just not greater than, I think.
11099         (_dbus_marshal_set_int32): new function
11100         (_dbus_marshal_set_uint32): new function
11101         (_dbus_marshal_set_string): new function
11102
11103         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
11104         a warning, init timeout_list to NULL
11105         (dbus_connection_send_message): don't use uninitialized variable
11106         "serial"
11107
11108         * dbus/dbus-string.c (_dbus_string_replace_len): new function
11109
11110 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11111
11112         * bus/driver.c: (bus_driver_handle_hello),
11113         (bus_driver_send_welcome_message):
11114         Plug leaks
11115
11116 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11117
11118         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
11119         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11120         (dbus_connection_unref):
11121         * dbus/dbus-marshal.c: (_dbus_marshal_test):
11122         * dbus/dbus-message.c: (dbus_message_unref),
11123         Plug memory leaks.
11124
11125         (dbus_message_get_fields):
11126         Remove debugging printout.
11127
11128         (_dbus_message_loader_return_buffer):
11129         Don't store the header string.
11130
11131         (_dbus_message_test):
11132         Plug leaks.
11133
11134 2003-01-26  Richard Hult  <rhult@codefactory.se>
11135
11136         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
11137         the file descriptor list, since it can change under us.
11138
11139 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11140
11141         * glib/dbus-gmain.c: (dbus_connection_prepare),
11142         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
11143         (remove_watch), (dbus_connection_hookup_with_g_main):
11144         Rewrite the glib handling to use its own GSource instead of a
11145         GIOChannel so we can catch messages put in the queue while waiting
11146         for a reply.
11147
11148 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11149
11150         * bus/Makefile.am:
11151         * bus/connection.c: (connection_disconnect_handler),
11152         (connection_watch_callback), (bus_connection_setup):
11153         * bus/dispatch.c: (send_one_message),
11154         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
11155         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
11156         * bus/dispatch.h:
11157         * bus/driver.c: (bus_driver_send_service_deleted),
11158         (bus_driver_send_service_created), (bus_driver_handle_hello),
11159         (bus_driver_send_welcome_message),
11160         (bus_driver_handle_list_services), (bus_driver_remove_connection),
11161         (bus_driver_handle_message):
11162         * bus/driver.h:
11163         Refactor code, put the message dispatching in its own file. Use
11164         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
11165         is disconnected.
11166
11167 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11168
11169         * dbus/dbus-internals.h:
11170         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
11171
11172         * dbus/dbus-message.c: (dbus_message_get_sender):
11173         * dbus/dbus-message.h:
11174         Implement dbus_message_get_sender.
11175
11176         * dbus/dbus-protocol.h:
11177         Add message and service defines.
11178
11179 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11180
11181         * dbus/dbus-connection.c: (dbus_connection_send_message):
11182         * dbus/dbus-message-internal.h:
11183         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
11184         (dbus_message_write_header):
11185         Remove _dbus_messag_unlock and don't set the client serial on a
11186         message if one already exists.
11187
11188 2003-01-24  Havoc Pennington  <hp@pobox.com>
11189
11190         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
11191         list_pool
11192
11193         * bus/driver.c (bus_driver_handle_list_services): fix a leak
11194         on OOM
11195
11196 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11197
11198         * dbus/dbus-list.c: (alloc_link), (free_link):
11199         Use a memory pool for the links.
11200
11201 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11202
11203         * bus/connection.c: (bus_connection_foreach):
11204         * bus/connection.h:
11205         Add new bus_connection_foreach function.
11206
11207         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
11208         Add function that broadcasts a message to all clients.
11209
11210         (bus_driver_send_service_created), (bus_driver_handle_hello),
11211         (bus_driver_send_welcome_message),
11212         (bus_driver_handle_list_services), (bus_driver_message_handler):
11213         Implement functions that take care of listing services, and notifying
11214         clients when new services are created.
11215
11216         * bus/services.c: (bus_services_list):
11217         * bus/services.h:
11218         Add new function that returns an array of strings with the currently
11219         registered services.
11220
11221         * glib/dbus-glib.h:
11222         * glib/dbus-gmain.c:
11223         Update copyright year.
11224
11225 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11226
11227         * dbus/dbus-connection.c: (dbus_connection_send_message):
11228         Unlock the message in case it was sent earlier.
11229
11230         (dbus_connection_send_message_with_reply_and_block):
11231         Remove the reply message from the list.
11232
11233         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
11234         Set array_len and new_pos correctly.
11235
11236         (_dbus_marshal_test):
11237         Remove debug output.
11238
11239         * dbus/dbus-message-internal.h:
11240         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
11241         New function that returns the reply serial.
11242
11243         (_dbus_message_unlock):
11244         New function that unlocks a message and resets its header.
11245
11246         (dbus_message_append_string_array),
11247         (dbus_message_get_fields_valist),
11248         (dbus_message_iter_get_field_type),
11249         (dbus_message_iter_get_string_array),
11250         (dbus_message_get_fields),
11251         (dbus_message_append_fields_valist):
11252         Handle string arrays.
11253
11254         (dbus_message_set_sender):
11255         Make this function public since the bus daemon needs it.
11256
11257         (decode_header_data):
11258         Set the reply serial to -1 initially.
11259
11260         * dbus/dbus-message.h:
11261         Add dbus_message_set_sender.
11262
11263 2003-01-24  Havoc Pennington  <hp@pobox.com>
11264
11265         * doc/dbus-specification.sgml: add some stuff
11266
11267 2003-01-22  Havoc Pennington  <hp@pobox.com>
11268
11269         * doc/dbus-specification.sgml: Start to document the protocol.
11270
11271 2003-01-22  Havoc Pennington  <hp@pobox.com>
11272
11273         * dbus/dbus-connection.c
11274         (dbus_connection_send_message_with_reply_and_block): add some @todo
11275
11276         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11277
11278 2003-01-21  Havoc Pennington  <hp@pobox.com>
11279
11280         (patch untested because can't compile)
11281
11282         * bus/driver.c (create_unique_client_name): make this function
11283         never recycle client names. Also, caller should initialize
11284         the DBusString.
11285
11286         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
11287
11288 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11289
11290         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11291         (_dbus_marshal_int32), (_dbus_marshal_uint32),
11292         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
11293         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
11294         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
11295         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
11296         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
11297         * dbus/dbus-marshal.h:
11298         * dbus/dbus-protocol.h:
11299         Add support for marshalling and demarshalling integer, double
11300         and string arrays.
11301
11302 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11303
11304         * bus/Makefile.am:
11305         Add driver.[ch]
11306
11307         * bus/connection.c: (connection_disconnect_handler):
11308         Remove the connection from the bus driver's list.
11309
11310         (connection_watch_callback): Dispatch messages.
11311
11312         (free_connection_data): Free connection name.
11313
11314         (bus_connection_setup): Add connection to the bus driver's list.
11315         (bus_connection_remove_owned_service):
11316         (bus_connection_set_name), (bus_connection_get_name):
11317         Add functions for setting and getting the connection's name.
11318
11319         * bus/connection.h:
11320         Add function headers.
11321
11322         * bus/driver.c: (create_unique_client_name),
11323         (bus_driver_handle_hello_message),
11324         (bus_driver_send_welcome_message), (bus_driver_message_handler),
11325         (bus_driver_add_connection), (bus_driver_remove_connection):
11326         * bus/driver.h:
11327         * bus/main.c:
11328         * bus/services.c: (bus_service_free):
11329         * bus/services.h:
11330         New file that handles communication and registreation with the bus
11331         itself.
11332
11333 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11334
11335         * dbus/dbus-connection.c: (dbus_connection_send_message):
11336         Add a new client_serial parameter.
11337
11338         (dbus_connection_send_message_with_reply):
11339         Remove a @todo since we've implemented the blocking function.
11340
11341         (dbus_connection_send_message_with_reply_and_block):
11342         New function that sends a message and waits for a reply and
11343         then returns the reply.
11344
11345         * dbus/dbus-connection.h:
11346         Add new functions.
11347
11348         * dbus/dbus-errors.c: (dbus_result_to_string):
11349         * dbus/dbus-errors.h:
11350         Add new DBUS_RESULT.
11351
11352         * dbus/dbus-message-internal.h:
11353         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
11354         (_dbus_message_set_sender), (dbus_message_write_header),
11355         (dbus_message_new_reply), (decode_header_data),
11356         (_dbus_message_loader_return_buffer), (_dbus_message_test):
11357         * dbus/dbus-message.h:
11358         Add new functions that set the reply serial and sender.
11359         Also marshal and demarshal them correctly and add test.
11360
11361         * dbus/dbus-protocol.h:
11362         Add new DBUS_MESSAGE_TYPE_SENDER.
11363
11364         * glib/dbus-glib.h:
11365         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
11366         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
11367         (dbus_connection_hookup_with_g_main):
11368         * glib/test-dbus-glib.c: (main):
11369         Rewrite to use GIOChannel and remove the GSource crack.
11370
11371         * test/echo-client.c: (main):
11372         * test/watch.c: (check_messages):
11373         Update for changed APIs
11374
11375 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11376
11377         * dbus/Makefile.am: Add dbus-timeout.[cħ]
11378
11379         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
11380         Create a DBusTimeoutList.
11381         (dbus_connection_set_timeout_functions): Add new function to
11382         set timeout callbacks
11383
11384         * dbus/dbus-connection.h: Add public DBusTimeout API.
11385
11386         * dbus/dbus-message.c: (dbus_message_get_service):
11387         * dbus/dbus-message.h:  New function.
11388
11389         * dbus/dbus-server.c: Fix small doc typo.
11390
11391         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
11392
11393 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11394
11395         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
11396         of the string, just as long as specified.
11397
11398 2003-01-19  Havoc Pennington  <hp@pobox.com>
11399
11400         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
11401         new function
11402
11403         * dbus/dbus-server.c (dbus_server_set_max_connections)
11404         (dbus_server_get_max_connections, dbus_server_get_n_connections):
11405         keep track of current number of connections, and add API for
11406         setting a max (but haven't implemented enforcing the max yet)
11407
11408 2003-01-18  Havoc Pennington  <hp@pobox.com>
11409
11410         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
11411         reading/writing if read_watch != NULL or write_watch != NULL.
11412
11413         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
11414         the message loader code to actually load message->header and
11415         message->body into the newly-created message.
11416
11417         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
11418         in OOM case
11419
11420         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
11421         (dbus_connection_get_max_message_size)
11422         (dbus_connection_set_max_live_messages_size)
11423         (dbus_connection_get_max_live_messages_size): implement some
11424         resource limitation functions
11425
11426         * dbus/dbus-resources.c: new file implementing some of the
11427         resource limits stuff
11428
11429         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
11430         missing docs, add @todo to handle OOM etc.
11431
11432         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
11433         docs
11434
11435 2003-01-18  Havoc Pennington  <hp@pobox.com>
11436
11437         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
11438         connection if it hasn't been already.
11439
11440         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
11441         replace with DisconnectFunction.
11442
11443 2003-01-18  Havoc Pennington  <hp@pobox.com>
11444
11445         Building --disable-verbose-mode --disable-asserts --disable-tests
11446         cuts the library from 112K to 45K or so
11447
11448         * configure.in: check for varargs macro support,
11449         add --enable-verbose-mode, --enable-asserts.
11450
11451         * dbus/dbus-internals.h (_dbus_assert): support
11452         DBUS_DISABLE_ASSERT
11453         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
11454
11455 2003-01-18  Havoc Pennington  <hp@pobox.com>
11456
11457         * dbus/dbus-test.c: include config.h so that tests actually run
11458
11459         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
11460         so the failure mode when that assumption fails will be plenty
11461         obvious.
11462
11463 2003-01-18  Havoc Pennington  <hp@pobox.com>
11464
11465         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
11466
11467         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
11468         the distribution
11469
11470         * test/Makefile.am: don't use special variable "TESTS" for echo-*
11471         since we don't want to use those in make check
11472
11473 2003-01-15  Havoc Pennington  <hp@redhat.com>
11474
11475         Release 0.2
11476
11477         * NEWS: update
11478
11479 2003-01-15  Havoc Pennington  <hp@redhat.com>
11480
11481         * test/Makefile.am: fix so that test source code ends up in the
11482         distribution on make distcheck
11483
11484 2003-01-15  Havoc Pennington  <hp@redhat.com>
11485
11486         Release 0.1.
11487
11488         * NEWS: update
11489
11490 2003-01-15  Havoc Pennington  <hp@redhat.com>
11491
11492         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
11493         fix build when --disable-tests
11494
11495         * Makefile.am (EXTRA_DIST): put HACKING in here
11496
11497         * HACKING: document procedure for making a tarball release.
11498
11499 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
11500
11501         * bus/connection.c: (connection_error_handler),
11502         (bus_connection_setup):
11503         * bus/main.c: (main):
11504         Make sure that the DBusConnectionData struct is NULLed
11505         out to prevent a segfault.
11506
11507         * dbus/dbus-errors.c: (dbus_result_to_string):
11508         * dbus/dbus-errors.h:
11509         * dbus/dbus-message.c: (dbus_message_get_fields),
11510         (dbus_message_get_fields_valist), (_dbus_message_test):
11511         * dbus/dbus-message.h:
11512         Make dbus_message_get_fields return a result code so we can
11513         track invalid fields as well as oom.
11514
11515 2003-01-11  Havoc Pennington  <hp@pobox.com>
11516
11517         * configure.in: change --enable-test/--enable-ansi action-if-given
11518         to enable_foo=$enableval instead of enable_foo=yes
11519
11520 2003-01-08  Havoc Pennington  <hp@pobox.com>
11521
11522         * dbus/dbus-string.c (_dbus_string_align_length): new function
11523
11524         * dbus/dbus-test-main.c: move main() for test app here
11525         * dbus/dbus-test.c
11526         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
11527         symbol to run tests, because dbus-test isn't in the main
11528         library
11529
11530         Code review nitpicks.
11531
11532         * dbus/dbus-message.c (dbus_message_write_header): add newlines
11533         for people with narrow emacs ;-). Assert client_serial was filled
11534         in. Assert message->name != NULL.
11535         (dbus_message_append_fields): have "first_field_type" arg separate
11536         from va list, needed for C++ binding that also uses varargs IIRC
11537         and helps with type safety
11538         (dbus_message_new): add @todo about using DBusString to store
11539         service/name internally
11540         (dbus_message_new): don't leak ->service and ->name on OOM later
11541         in the function
11542         (dbus_message_unref): free the service name
11543         (dbus_message_get_fields): same change to varargs
11544         i.e. first_field_type
11545         (_dbus_message_loader_return_buffer): assert that the message data
11546         is aligned (if not it's a bug in our code). Put in verbose griping
11547         about why we set corrupted = TRUE.
11548         (decode_header_data): add FIXME that char* is evil.  Was going to
11549         add FIXME about evil locale-specific string.h strncmp, but just
11550         switched to wacky string-as-uint32 optimization. Move check for
11551         "no room for field name" above get_const_data_len() to avoid
11552         assertion failure in get_const_data_len if we have trailing 2
11553         bytes or the like. Check for service and name fields being
11554         provided twice. Don't leak service/name on error. Require field
11555         names to be aligned to 4 bytes.
11556
11557         * dbus/dbus-marshal.c: move byte swap stuff to header
11558         (_dbus_pack_int32): uscore-prefix
11559         (_dbus_unpack_int32): uscore-prefix
11560         (_dbus_unpack_uint32): export
11561         (_dbus_demarshal_string): add @todo complaining about use of
11562         memcpy()
11563         (_dbus_marshal_get_field_end_pos): add @todo about bad error
11564         handling allowing corrupt data to go unchecked
11565
11566 2003-01-08  Havoc Pennington  <hp@redhat.com>
11567
11568         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
11569         to the select() as needed for authentication. (should be using
11570         _dbus_poll() not select, but for another day)
11571
11572         * dbus/dbus.h: include dbus/dbus-protocol.h
11573
11574 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
11575
11576         * dbus/Makefile.am (dbusinclude_HEADERS): Install
11577         dbus-connection.h
11578
11579 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
11580
11581         * dbus/dbus-internals.c: (_dbus_type_to_string):
11582         New function that returns a string describing a type.
11583
11584         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
11585         * dbus/dbus-marshal.h:
11586         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
11587         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
11588         (dbus_message_iter_get_byte_array):
11589         * dbus/dbus-message.h:
11590         Add new convenience functions for appending and getting message fields.
11591         Also add demarshalling routines for byte arrays.
11592
11593 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11594
11595         * dbus/dbus-connection-internal.h:
11596         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11597         (_dbus_connection_get_next_client_serial),
11598         (dbus_connection_send_message):
11599         * dbus/dbus-internals.h:
11600         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
11601         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
11602         (_dbus_marshal_uint32), (_dbus_demarshal_double),
11603         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
11604         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
11605         (_dbus_verbose_bytes), (_dbus_marshal_test):
11606         * dbus/dbus-marshal.h:
11607         * dbus/dbus-message-internal.h:
11608         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
11609         (dbus_message_write_header), (_dbus_message_lock),
11610         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
11611         (dbus_message_get_name), (dbus_message_append_int32),
11612         (dbus_message_append_uint32), (dbus_message_append_double),
11613         (dbus_message_append_string), (dbus_message_append_byte_array),
11614         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
11615         (dbus_message_iter_unref), (dbus_message_iter_has_next),
11616         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
11617         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
11618         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
11619         (decode_header_data), (_dbus_message_loader_return_buffer),
11620         (message_iter_test), (_dbus_message_test):
11621         * dbus/dbus-message.h:
11622         * dbus/dbus-protocol.h:
11623         * dbus/dbus-test.c: (main):
11624         * dbus/dbus-test.h:
11625         * glib/test-dbus-glib.c: (message_handler), (main):
11626         * test/echo-client.c: (main):
11627         * test/watch.c: (check_messages):
11628         Make messages sendable and receivable for real.
11629
11630 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11631
11632         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11633         (_dbus_marshal_string), (_dbus_marshal_byte_array):
11634         * dbus/dbus-message.c: (dbus_message_append_int32),
11635         (dbus_message_append_uint32), (dbus_message_append_double),
11636         (dbus_message_append_string), (dbus_message_append_byte_array):
11637         Handle OOM restoration.
11638
11639 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11640
11641         * dbus/dbus-marshal.c: (_dbus_marshal_string),
11642         (_dbus_demarshal_string), (_dbus_marshal_test):
11643         * dbus/dbus-marshal.h:
11644         * dbus/dbus-message.c: (dbus_message_get_name),
11645         Document these functions.
11646
11647         (dbus_message_append_int32), (dbus_message_append_uint32),
11648         (dbus_message_append_double), (dbus_message_append_string),
11649         (dbus_message_append_byte_array):
11650         * dbus/dbus-message.h:
11651         Add functions for adding message fields of different types.
11652
11653         * dbus/dbus-protocol.h:
11654         Add the different types.
11655
11656 2003-01-05  Havoc Pennington  <hp@pobox.com>
11657
11658         * bus/connection.c: implement routines for handling connections,
11659         first thing is keeping a list of owned services on each connection
11660         and setting up watches etc.
11661
11662         * bus/services.c: implement a mapping from service names to lists
11663         of connections
11664
11665         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
11666
11667         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
11668         to use static mutexes for global data
11669
11670         * dbus/dbus-connection.c (dbus_connection_set_data): add new
11671         collection of functions to set/get application-specific data
11672         on the DBusConnection.
11673
11674 2003-01-04  Havoc Pennington  <hp@pobox.com>
11675
11676         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
11677         (_dbus_poll): new function
11678
11679         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
11680         copied from GLib
11681
11682         * bus/loop.c: initial code for the daemon main loop
11683
11684 2003-01-04  Havoc Pennington  <hp@pobox.com>
11685
11686         * test/watch.c (error_handler): make it safe if the error handler
11687         is called multiple times (if we s/error handler/disconnect
11688         handler/ we should just guarantee it's called only once)
11689
11690         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
11691         error handler on disconnect (it's quite possible we should
11692         just change the error handler to a "disconnect handler," I'm
11693         not sure we have any other meaningful errors)
11694
11695         * configure.in: check for getpwnam_r
11696
11697         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
11698         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
11699         mechanism as in SASL spec, using socket credentials
11700
11701         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
11702         (_dbus_send_credentials_unix_socket): new function
11703
11704         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
11705         dbus_accept()
11706         (_dbus_write): only check errno if <0 returned
11707         (_dbus_write_two): ditto
11708
11709 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
11710
11711         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
11712         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
11713         (_dbus_marshal_test):
11714         * dbus/dbus-marshal.h:
11715         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
11716         to _dbus_marshal_utf8_string. Also fix some tests.
11717
11718 2002-12-28  Harri Porten  <porten@kde.org>
11719
11720         * configure.in: added check for C++ compiler and a very cheesy
11721         check for the Qt integration
11722
11723         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
11724
11725         * qt/Makefile.am: added
11726
11727         * qt/.cvsignore: added
11728
11729         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
11730         latter, added #ifdef QT_THREAD_SUPPORT guard.
11731
11732         * dbus/Makefile.am: added missing headers for make dist
11733
11734 2002-12-28  Kristian Rietveld  <kris@gtk.org>
11735
11736         * dbus/Makefile.am: fixup export-symbols-regex.
11737
11738 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
11739
11740         * acinclude.m4: Add this file and put the
11741         PKG_CHECK_MODULE macro in it.
11742
11743 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
11744
11745         * dbus/dbus-marshal.c: (_dbus_marshal_string),
11746         (_dbus_demarshal_double), (_dbus_demarshal_int32),
11747         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
11748         (_dbus_marshal_test):
11749         Make the demarshalling routines align the pos argument.
11750         Add string marshalling tests and fix the obvious bugs
11751         discovered.
11752
11753 2002-12-26  Havoc Pennington  <hp@pobox.com>
11754
11755         * dbus/dbus-auth.c: fixes fixes fixes
11756
11757         * dbus/dbus-transport-unix.c: wire up support for
11758         encoding/decoding data on the wire
11759
11760         * dbus/dbus-auth.c (_dbus_auth_encode_data)
11761         (_dbus_auth_decode_data): append to target string
11762         instead of nuking it.
11763
11764 2002-12-26  Havoc Pennington  <hp@pobox.com>
11765
11766         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
11767         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
11768         doh
11769
11770         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
11771         avoid swap_bytes() overhead (ignoring possible assembly stuff for
11772         now). Main point is because I wanted unpack_uint32 to implement
11773         _dbus_verbose_bytes
11774         (_dbus_verbose_bytes): new function
11775
11776         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
11777
11778         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
11779         mechanism to handle a corrupt message stream
11780         (_dbus_message_loader_new): fix preallocation to only prealloc,
11781         not prelengthen
11782
11783         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
11784         (_dbus_string_test): enhance tests for copy/move and fix the
11785         functions
11786
11787         * dbus/dbus-transport-unix.c: Hold references in more places to
11788         avoid reentrancy problems
11789
11790         * dbus/dbus-transport.c: ditto
11791
11792         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
11793         leak reference count in no-message case
11794
11795         * test/watch.c (do_mainloop): handle adding/removing watches
11796         during iteration over the watches. Also, ref the connection/server
11797         stored on a watch, so we don't try to mangle a destroyed one.
11798
11799         * dbus/dbus-transport-unix.c (do_authentication): perform
11800         authentication
11801
11802         * dbus/dbus-auth.c (get_state): add a state
11803         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
11804         (_dbus_auth_get_unused_bytes): append the unused bytes
11805         to the passed in string, rather than prepend
11806
11807         * dbus/dbus-transport.c (_dbus_transport_init_base): create
11808         the auth conversation DBusAuth
11809
11810         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
11811         (_dbus_transport_new_for_domain_socket): when creating a
11812         transport, pass in whether it's a client-side or server-side
11813         transport so we know which DBusAuth to create
11814
11815 2002-12-03  Havoc Pennington  <hp@pobox.com>
11816
11817         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
11818         _after_ finalizing the derived members
11819         (unix_connection_set): unref watch if we fail to add it
11820
11821         * dbus/dbus-connection.c (dbus_connection_unref): delete the
11822         transport first, so that the connection owned by the
11823         transport will be valid as the transport finalizes.
11824
11825         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
11826         if necessary, and remove watches from the connection.
11827
11828         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
11829
11830 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
11831
11832         * dbus/dbus-marshal.c: (_dbus_marshal_string),
11833         (_dbus_demarshal_double), (_dbus_demarshal_int32),
11834         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
11835         (_dbus_marshal_test):
11836         * dbus/dbus-marshal.h:
11837         Add string marshal functions and have the demarshal functions
11838         return the new position.
11839
11840 2002-12-25  Havoc Pennington  <hp@pobox.com>
11841
11842         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
11843         it is a simple protocol that just maps directly to SASL.
11844
11845         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
11846         initial implementation, not actually used yet.
11847
11848         * dbus/dbus-string.c (_dbus_string_find): new function
11849         (_dbus_string_equal): new function
11850         (_dbus_string_base64_encode): new function
11851         (_dbus_string_base64_decode): new function
11852
11853 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
11854
11855         * dbus/Makefile.am:
11856         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
11857         (_dbus_marshal_int32), (_dbus_marshal_uint32),
11858         (_dbus_demarshal_double), (_dbus_demarshal_int32),
11859         (_dbus_demarshal_uint32), (_dbus_marshal_test):
11860         * dbus/dbus-marshal.h:
11861         * dbus/dbus-protocol.h:
11862         * dbus/dbus-test.c: (main):
11863         * dbus/dbus-test.h:
11864         Add un-optimized marshalling/demarshalling routines.
11865
11866 2002-12-25  Harri Porten  <porten@kde.org>
11867
11868         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
11869
11870 2002-12-24  Zack Rusin  <zack@kde.org>
11871
11872         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
11873         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
11874         main loop stuff
11875
11876 2002-12-24  Havoc Pennington  <hp@pobox.com>
11877
11878         * glib/dbus-gthread.c: fix include
11879
11880         * glib/dbus-glib.h: rename DBusMessageHandler for now.
11881         I think glib API needs to change, though, as you don't
11882         want to use DBusMessageFunction, you want to use the
11883         DBusMessageHandler object. Probably
11884         dbus_connection_open_with_g_main_loop()
11885         and dbus_connection_setup_g_main_loop() or something like that
11886         (but think of better names...) that just create a connection
11887         that has watch/timeout functions etc. already set up.
11888
11889         * dbus/dbus-connection.c
11890         (dbus_connection_send_message_with_reply): new function just to
11891         show how the message handler helps us deal with replies.
11892
11893         * dbus/dbus-list.c (_dbus_list_remove_last): new function
11894
11895         * dbus/dbus-string.c (_dbus_string_test): free a string that
11896         wasn't
11897
11898         * dbus/dbus-hash.c: use memory pools for the hash entries
11899         (rebuild_table): be more paranoid about overflow, and
11900         shrink table when we can
11901         (_dbus_hash_test): reduce number of sprintfs and write
11902         valid C89. Add tests for case where we grow and then
11903         shrink the hash table.
11904
11905         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
11906
11907         * dbus/dbus-connection.c (dbus_connection_register_handler)
11908         (dbus_connection_unregister_handler): new functions
11909
11910         * dbus/dbus-message.c (dbus_message_get_name): new
11911
11912         * dbus/dbus-list.c: fix docs typo
11913
11914         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
11915         an object representing a handler for messages.
11916
11917 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
11918
11919         * glib/dbus-glib.h:
11920         * glib/dbus-gthread.c: (dbus_gthread_init):
11921         Don't use the gdbus prefix for public functions.
11922
11923 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
11924
11925         * Makefile.am:
11926         * configure.in:
11927         Add GLib checks and fixup .pc files
11928
11929         * glib/Makefile.am:
11930         * glib/dbus-glib.h:
11931         * glib/dbus-gmain.c: (gdbus_connection_prepare),
11932         (gdbus_connection_check), (gdbus_connection_dispatch),
11933         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
11934         (dbus_connection_gsource_new):
11935         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
11936         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
11937         * glib/test-dbus-glib.c: (message_handler), (main):
11938         Add GLib support.
11939
11940 2002-12-15  Harri Porten  <porten@kde.org>
11941
11942         * autogen.sh: check for libtoolize before attempting to use it
11943
11944         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
11945         struct.
11946
11947         * .cvsignore: ignore more stamp files
11948
11949         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
11950
11951         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
11952         without make install.
11953
11954 2002-12-15  Havoc Pennington  <hp@pobox.com>
11955
11956         * dbus/dbus-threads.c: add thread stubs that a higher library
11957         layer can fill in. e.g. the GLib wrapper might fill them in with
11958         GThread stuff. We still need to use this thread API to
11959         thread-safe-ize the library.
11960
11961 2002-12-12  Havoc Pennington  <hp@pobox.com>
11962
11963         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
11964         below new interfaces and include fewer system headers.
11965
11966         * dbus/dbus-sysdeps.c (_dbus_read): new function
11967         (_dbus_write): new function
11968         (_dbus_write_two): new function
11969         (_dbus_connect_unix_socket): new function
11970         (_dbus_listen_unix_socket): new function
11971
11972         * dbus/dbus-message-internal.h: change interfaces to use
11973         DBusString
11974
11975 2002-12-11  Havoc Pennington  <hp@pobox.com>
11976
11977         * dbus/dbus-types.h: add dbus_unichar
11978
11979         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
11980
11981         * dbus/dbus-connection.c (dbus_connection_send_message): return
11982         TRUE on success
11983
11984         * dbus/dbus-transport.c: include dbus-watch.h
11985
11986         * dbus/dbus-connection.c: include dbus-message-internal.h
11987
11988         * HACKING: add file with coding guidelines stuff.
11989
11990         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
11991         handling here, for security purposes (as in vsftpd). Not actually
11992         using this class yet.
11993
11994         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
11995         system/libc usage here, as in vsftpd, for ease of auditing (and
11996         should also simplify portability). Haven't actually moved all the
11997         system/libc usage into here yet.
11998
11999 2002-11-25  Havoc Pennington  <hp@pobox.com>
12000
12001         * dbus/dbus-internals.c (_dbus_verbose): fix to not
12002         always print the first verbose message.
12003
12004 2002-11-24  Havoc Pennington  <hp@pobox.com>
12005
12006         * test/echo-client.c, test/echo-server.c: cheesy test
12007         clients.
12008
12009         * configure.in (AC_CHECK_FUNCS): check for writev
12010
12011         * dbus/dbus-message.c (_dbus_message_get_network_data): new
12012         function
12013
12014         * dbus/dbus-list.c (_dbus_list_foreach): new function
12015
12016         * dbus/dbus-internals.c (_dbus_verbose): new function
12017
12018         * dbus/dbus-server.c, dbus/dbus-server.h: public object
12019         representing a server that listens for connections.
12020
12021         * dbus/.cvsignore: create
12022
12023         * dbus/dbus-errors.h, dbus/dbus-errors.c:
12024         public API for reporting errors
12025
12026         * dbus/dbus-connection.h, dbus/dbus-connection.c:
12027         public object representing a connection that
12028         sends/receives messages. (Same object used for
12029         both client and server.)
12030
12031         * dbus/dbus-transport.h, dbus/dbus-transport.c:
12032         Basic abstraction for different kinds of stream
12033         that we might read/write messages from.
12034
12035 2002-11-23  Havoc Pennington  <hp@pobox.com>
12036
12037         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
12038         _DBUS_INT_MAX
12039
12040         * dbus/dbus-test.c (main): add list test, and include
12041         dbus-test.h as intended
12042
12043         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
12044         (_dbus_hash_table_remove_int): return value indicates
12045         whether the entry existed to remove
12046
12047         * dbus/dbus-list.c: add linked list utility class,
12048         with docs and tests
12049
12050         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
12051         array sometimes.
12052
12053 2002-11-23  Havoc Pennington  <hp@pobox.com>
12054
12055         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
12056         DBUS_END_DECLS to nothing, that should fix this once and for all
12057
12058         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
12059
12060         * dbus/dbus-message.c, dbus/dbus-hash.c:
12061         add some missing @brief
12062
12063 2002-11-23  Havoc Pennington  <hp@pobox.com>
12064
12065         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
12066         to avoid confusing Doxygen
12067
12068         * dbus/dbus-hash.c: @} not }@
12069
12070         * dbus/dbus-message.c (struct DBusMessage): split out
12071         internals docs
12072
12073 2002-11-23  Havoc Pennington  <hp@pobox.com>
12074
12075         * configure.in: pile on more warning flags if using gcc
12076
12077         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
12078         to document static functions
12079
12080         * configure.in: add summary to end of configure so it
12081         looks nice and attractive
12082
12083         * dbus/dbus-hash.c: finish implementation and write unit
12084         tests and docs
12085
12086         * configure.in: add --enable-tests to enable unit tests
12087
12088         * dbus/dbus-test.c: test program to run unit tests
12089         for all files in dbus/*, initially runs a test for
12090         dbus-hash.c
12091
12092         * dbus/dbus-internals.h: file to hold some internal utility stuff
12093
12094 2002-11-22  Havoc Pennington  <hp@redhat.com>
12095
12096         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
12097         "ported" away from Tcl
12098
12099         * dbus/dbus-types.h: header for types such as dbus_bool_t
12100
12101 2002-11-22  Havoc Pennington  <hp@redhat.com>
12102
12103         * dbus/dbus.h: fixups for doc warnings
12104
12105         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
12106         macros
12107         (QUIET): make it quiet so we can see warnings
12108
12109         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
12110
12111 2002-11-22  Havoc Pennington  <hp@redhat.com>
12112
12113         * Makefile.am: include "Doxyfile" target in all-local
12114
12115         * configure.in: generate the Doxyfile
12116
12117         * Doxyfile.in: move Doxyfile here, so we can use
12118         configure to generate a Doxyfile with the right
12119         version number etc.
12120
12121 2002-11-22  Havoc Pennington  <hp@redhat.com>
12122
12123         * dbus/dbus-message.c: move inline docs into .c file
12124
12125         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
12126         so all docs are under doc/
12127         (MAN_EXTENSION): generate man pages. Use extension
12128         ".3dbus" which matches ".3qt" on my system,
12129         I guess this is OK, I don't know really.
12130         (FILE_PATTERNS): look for .c files not .h, makes sense
12131         for plain C I think
12132
12133 2002-11-22  Havoc Pennington  <hp@pobox.com>
12134
12135         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
12136         because any app can be a server, and any app can be a client,
12137         the bus is a special kind of server.
12138
12139 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
12140
12141         * Doxyfile : adding. Still needs Makefile rules to be generated
12142         automatically (just run "doxygen" in the toplevel dir for now to
12143         generate docs)
12144
12145         * dbus/dbus-message.h : Adding sample docs (javadoc since
12146         resembles gtk-doc a little more)
12147
12148         * dbus/dbus.h : Adding sample docs
12149
12150 2002-11-21  Havoc Pennington  <hp@redhat.com>
12151
12152         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
12153         so we can allow ourselves to include files directly,
12154         instead of having to use dbus.h
12155
12156         * dbus/dbus.h: fill in
12157
12158         * dbus/dbus-message.h: sketch out a sample header file.
12159         Include griping if you include it directly instead of
12160         via dbus.h
12161
12162         * dbus/dbus-macros.h: new file with macros for extern "C",
12163         TRUE/FALSE, NULL, etc.
12164
12165         * doc/file-boilerplate.c: put include guards in here
12166
12167 2002-11-21  Havoc Pennington  <hp@redhat.com>
12168
12169         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
12170
12171         * COPYING: include the GPL as well, and license code
12172         under both AFL and GPL.
12173
12174 2002-11-21  Havoc Pennington  <hp@redhat.com>
12175
12176         * acconfig.h: get rid of this
12177
12178         * autogen.sh (run_configure): add --no-configure option
12179
12180         * configure.in: remove AC_ARG_PROGRAM to make
12181         autoconf complain less. add AC_PREREQ.
12182         add AC_DEFINE third arg.
12183
12184 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
12185
12186         * doc/Makefile.am:
12187         Fix references so we can distcheck.
12188
12189 2002-11-21  Havoc Pennington  <hp@redhat.com>
12190
12191         * Initial module creation
12192