Cleanups
[platform/upstream/dbus.git] / ChangeLog
1 2005-10-27  Ross Burton  <ross@openedhand.com>
2
3         * dbus/dbus-marshal-header.c:
4         Remove dead code.
5
6         * glib/dbus-gobject.c:
7         Stop compiler warning.
8
9 2005-10-25  Ross Burton  <ross@openedhand.com>
10
11         * dbus/dbus-auth.c:
12         * dbus/dbus-server-unix.c:
13         * dbus/dbus-transport-unix.c:
14         * glib/dbus-gmain.c:
15         * glib/dbus-gobject.c:
16         Add some const keywords.
17
18 2005-10-25  Ross Burton  <ross@openedhand.com>
19
20         * doc/dbus-specification.xml:
21         Document the NoReply annotation.
22
23         * glib/dbus-binding-tool-glib.h:
24         * glib/dbus-binding-tool-glib.c:
25         Respect the NoReply annotation.
26
27 2005-10-24  Robert McQueen <robot101@debian.org>
28
29         * python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
30         derive from unicode instead of str, and encode/decode UTF-8 when
31         marshalling/unmarshalling bus messages
32
33         * python/introspect_parser.py: encode introspection data as UTF-8
34         before passing the buffer into libxml2
35
36         * test/python/test-client.py: add unicode test strings
37
38         * test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
39         ignore generated python test files
40
41 2005-10-17  John (J5) Palmieri  <johnp@redhat.com>
42
43         * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
44         and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
45         (gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
46
47         * glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
48         DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
49         when constructing struct signatures
50
51         * python/_dbus.py (Bus): handle private connections using the
52         private keyword in the constructor. defaults to private=False
53         (Bus::close): new method to close a connection to the bus
54
55         * python/dbus_bindings.pyx (Connection::close): renamed method
56         was previously called disconnect
57         (bus_get): now supports getting a private connection
58
59         * python/proxies.py (ProxyMethod::__call__): check if ignore_reply
60         keyword is set to True.  if it is, execute the method without waiting
61         for a reply
62         (ProxyObject::_introspect_execute_queue): new method for executing
63         all the pending methods that were waiting for the introspect to
64         finish.  this is called when introspect either succeeds or fails
65         (ProxyObject::_introspect_error_handler): call queued methods
66
67 2005-10-14  John (J5) Palmieri  <johnp@redhat.com>
68
69         * python/dbus_bindings.pyx (MessageIter::append_strict): check for
70         STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
71
72         * python/service.py (Object::_message_cb): handle exceptions correctly
73         by sending them over the wire to the calling app.  This makes sure
74         the client returns immediately instead of waiting the 15 seconds to
75         timeout.
76
77         * test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect): 
78         Add a test to benchmark how long it takes to introspect a service and 
79         call a method which returns a large element (pretty fast)
80
81         * test/python/test-service.py (TestObject::GetComplexArray): new test 
82         method which pushes a lot of data
83
84 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
85
86         * python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):        
87         reclaim memory outside of the loop and use del istead of just setting
88         the key to None
89
90 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
91
92         * python/service.py (ObjectType::_reflect_on_signal): Always close
93         signal tag even when there are no arguments
94
95 2005-10-13  John (J5) Palmieri  <johnp@redhat.com>
96
97         * configure.in: Set mono, mono-docs and Qt3 to default
98         to no instead of auto when building.  These bindings do not
99         have full time maintainers and will not be supported for the
100         1.0 release.
101
102 2005-10-12  John (J5) Palmieri  <johnp@redhat.com>
103
104         patches from Michael Krivoruchko <misha at sun.com>: 
105         
106         * dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
107         _dbus_connection_message_sent, 
108         _dbus_connection_send_preallocated_unlocked_no_update, 
109         _dbus_connection_pop_message_link_unlocked): handle the case when path 
110         is NULL when calling _dbus_verbose
111
112         * configure.in: check for functions getpeerucred and getpeereid
113
114         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides 
115         support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+, 
116         OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid). 
117         Patch was only tested on Solaris 10 x86 so it might be issues
118         with other platforms (i.e. BSDs and MacOSX)
119         
120
121 2005-10-05  John (J5) Palmieri  <johnp@redhat.com>
122
123         * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal 
124         instead of marshal basic so we can handle recursive types in a variant
125
126         * test/glib/test-dbus-glib.c: Add test for marshaling recurive types
127         in variants
128
129         * test/glib/test-service-glib.c, test-service-glib.xml
130         (my_object_echo_variant [EchoVariant], 
131         my_object_process_variant_of_array_of_ints123
132         [ProcessVariantOfArrayOfInts123]): 
133         Add two test methods
134
135         * python/introspect_parser.py: New module for parsing introspect
136         data.
137
138         * python/dbus_bindings.pyx:
139         (various places): when throwing errors fix to use errormsg instead 
140         of message local variable because Pyrex can get confused with other 
141         message variables (initial patch by Robert McQueen 
142         <robert.mcqueen at collabora.co.uk>)
143         (MessageIter::parse_signature_block): new method for getting the next
144         block in a signiture.
145         (MessageIter::append_strict): new method for appending values strictly
146         using the passed in signature instead of guessing at the type
147         (MessageItter:: append_dict, append_struct, append_array): use 
148         signatures to marshal children if the signature is available
149         
150         * python/exceptions.py (IntrospectionParserException): new exception
151
152         * python/proxies.py (ProxyMethod::__call__): Marshal args with 
153         introspected signatures if available, else we fall back to the
154         old way of doing things.
155         (ProxyObject::_introspect_reply_handler ): parse introspection data
156         
157         * python/service.py (ObjectType::_reflect_on_method): Properly
158         terminate <method> if there are no args in the reflection data
159
160         * test/python/test-client.py: add tests for talking with the GLib
161         test server.  This gives us better coverage for introspection since
162         python to python will always generate arguments as variants.  It also
163         allows us to test the robustness of the GLib bindings and interlanguage
164         communications.
165
166         
167 2005-10-03  John (J5) Palmieri  <johnp@redhat.com>
168
169         * bus/driver.c (bus_driver_handle_introspect): Add signals
170         to the introspect data. (patch from Daniel P. Berrange 
171         <dan at berrange.com>)
172
173         * bus/dispatch.c (check_existent_ping): Add testcase for Ping
174         
175         * dbus/dbus-connection.c (_dbus_connection_peer_filter,
176         _dbus_connection_run_builtin_filters): Changed these to
177         be unlock_no_update functions and call 
178         _dbus_connection_send_unlocked_no_update instead of
179         dbus_connection_send to avoid locking errors.
180         
181         * doc/TODO: Removed the make Ping test TODO
182         
183 2005-09-26  John (J5) Palmieri  <johnp@redhat.com>
184
185         * dbus/Python.pyx: Fixed memory leaks when throwing errors.
186         We now copy the message from a DBusError and then free 
187         the error object befor throwing the error
188
189         * glib/dbus-glib-tool.c: removed extra comma at the end of the
190         DBusBindingOutputMode enum which was causing a warning.
191         #include <time.h> so using time_t is explicitly defined
192
193 2005-09-26  John (J5) Palmieri  <johnp@redhat.com>
194
195         * Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
196         - dbus/dbus-bus.c
197         (internal_bus_get): new method that take over the heavy lifting
198         of dbus_bus_get and adds the ability to get a private connection
199         to the bus
200         (dbus_bus_get): wrapper to internal_bus_get that provides the same
201         interface as in previous versions
202         (dbus_bus_get_private): new method that is a wrapper to 
203         internal_bus_get to get a private connection to the bus
204
205         - dbus/dbus-bus.h
206         (dbus_bus_get_private): add as a public libdbus interface
207
208         - dbus-1.pc.in: output system_bus_default_address and 
209         sysconfdir variables so apps can use them when compiling
210
211 2005-09-23  Harald Fernengel  <harry@kdevelop.org>
212         * dbus/qt: New Qt bindings
213
214 2005-09-12  Waldo Bastian  <bastian@kde.org>
215
216         * dbus/dbus-marshal-validate.c,
217         doc/dbus-specification.xml, test/Makefile.am,
218         test/test-names.c: allow hyphens in bus names.
219
220 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
221
222         * test/data/auth/fallback.auth-script: we don't
223         retry the EXTERNAL method when we know its going
224         to fail anymore.
225
226 2005-09-11  Mark McLoughlin  <mark@skynet.ie>
227
228         * dbus/dbus-connection-internal.h: rename
229         (add|remove|toggle)_(watch|timeout) to unlocked()
230         
231         * dbus/dbus-connection.c: ditto.
232         
233         * dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
234         Update some callers for the renaming.
235
236 2005-09-10  Mark McLoughlin  <mark@skynet.ie>
237
238         * dbus/dbus-auth.c: (record_mechanisms): don't
239         retry the first auth mechanism because we know
240         we're just going to get rejected again.
241         
242         * dbus/dbus-keyring.c: (_dbus_keyring_reload):
243         Fix thinko ... and what a nasty little bugger to
244         track down you were ...
245
246         * dbus/dbus-connection.c:
247         (_dbus_connection_add_watch),
248         (_dbus_connection_remove_watch): add note about
249         these needing the connection to be locked.
250         (_dbus_connection_get_dispatch_status_unlocked):
251         set status to DATA_REMAINS when we queue the
252         disconnected message.
253         
254         * bus/dispatch.c:
255         (bus_dispatch): fix warning.
256         (check_existent_service_no_auto_start):
257         Expect ChildSignaled error too.
258         (check_existent_hello_from_self): fix another
259         couple of warnings.
260         
261 2005-09-08  Joe Shaw  <joeshaw@novell.com>
262
263         Patches from James Willcox <snorp@snorp.net>
264
265         * mono/Makefile.am: Add Int16.cs and UInt16.cs
266
267         * mono/DBusType/Array.cs: Handle multidimensional arrays, and
268         support array "out" parameters.
269
270         * mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
271         for 16-bit int support.
272
273 2005-09-06  John (J5) Palmieri  <johnp@redhat.com>
274
275         * Released 0.50
276
277         * Patch from Steve Grubb:
278         - bus/activation.c (bus_activation_service_reload_test): clean up
279         some indentation
280         - dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional 
281         - dbus/dbus-message-factory.c (generate_special): fix a couple of
282         buffer overflows in the test suite.  This is non critical because
283         it can not be exploited and this code is only run when doing a 
284         make check.
285
286         * Patch from Yaakov Selkowitz: Build fixes for Cygwin
287         - configure.in: Don't check and link against kdecore, only qt headers
288         - dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
289         - gcj/org/freedesktop/dbus/Makefile.am:
290         add libdbus_gcj_1_la_LDFLAGS = -no-undefined
291         - glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
292         and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
293         - qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
294         - tools/Makefile.am: Add platform extentions to binaries 
295         (i.e. .exe on windows)
296
297         * configure.in: 
298         - Make it so if no suitable version of python is found we only 
299         disable building python instead of exiting the configure script
300         - Require version 2.4 of glib for glib bindings
301         - Up version to 0.50
302
303         * python/__init__.py: Sync version with libdbus to (0,50,0)
304         
305 2005-09-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
306
307         * dbus/dbus-object-tree.c (find_subtree_recurse):
308         a couple of optimizations (bug #710):
309         - do a binary search in the tree
310         - insert a new child at the right place directly, no need for
311           qsort anymore
312         - do the "double alloc" thing when allocating children
313
314 2005-08-31  John (J5) Palmieri  <johnp@redhat.com>
315
316         * python/Makefile.am: Break on pyrexc errors instead of ignoring them
317
318         * python/dbus_bindings.pyx: Memory management foo
319         (global): remove hacky _user_data_references global list
320         (GIL_safe_cunregister_function_handler): userdata now stuffed into
321         tuples. Unref user_data
322         (GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
323         (Connection::__del__): Remove and replace with __dealloc__ method
324         (Connection::add_filter): Stuff user_data into a tuple.  Use Py_INCREF
325         to keep tuple from being deallocated instead of the global var hack
326         (Connection::register_object_path): Stuff user_data into a tuple.
327         Use Py_INCREF to keep tuple from being deallocated instead of the 
328         global var hack
329         (Connection::register_fallback): Stuff user_data into a tuple.
330         Use Py_INCREF to keep tuple from being deallocated instead of the 
331         global var hack
332         (GIL_safe_pending_call_notification): Don't unref the message
333         because it gets unreffed when going out of scope.  Py_XDECREF
334         the user_data
335         (PendingCall::__del__): Remove and replace with __dealloc__ method
336         (PendingCall::set_notify): ref the pending call because we will
337         need it to stick around for when the notify callback gets called
338         (Message::__del__): Remove and replace with __dealloc__ method
339
340         * python/dbus_glib_bindings.pyx (init_gthreads): Changed to 
341         gthreads_init to match up with the dbus call
342
343         * python/glib.py (init_threads): Changed to threads_init to match
344         up with gobject.threads_init().  init_threads is kept for backwards
345         compat but will most likely be deprecated in the future
346
347         * test/python/test-client.py: 
348         - revamp to use Python's unittest functionality
349         - add async call tests
350         - setup threads in glib and dbus so we make sure locks are working
351         
352 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
353
354         * python/dbus_bindings.pyx 
355         (_pending_call_notification, cunregister_function_handler, 
356         cmessage_function_handler): All callback functions have been rearranged 
357         to workaround a bug in Pyrex when working with the GIL which is Python's 
358         global lock when dealing with threads.  They have been split into
359         a wrapper function (which assumes the name of the old function) and
360         a _GIL_safe_<function name> function which contains the functionality
361         of the old function.  This ensures that Pyrex does not write code
362         the lock is released.
363         
364
365 2005-08-30  John (J5) Palmieri  <johnp@redhat.com>
366
367         * python/dbus_bindings.pyx (_pending_call_notification): Obtain the
368         GIL global lock when calling back into Python
369
370 2005-08-29  John (J5) Palmieri  <johnp@redhat.com>
371
372         * Release 0.36.2
373
374         * Add Havoc's patch that never got applied to HEAD (Bug #2436):
375
376         * bus/policy.c (bus_policy_allow_user): change default "user is
377         allowed" to be "user has same uid as the bus itself"; any
378         allow/deny rules will override.
379
380         * bus/session.conf.in: don't allow all users, since now by default
381         the user that ran the bus can connect.
382
383 2005-08-26  Colin Walters  <walters@verbum.org>
384
385         * tools/dbus-print-message.c (print_message): Flush stdout
386         after printing a message, so that redirecting to a file, then
387         hitting Ctrl-C works.
388
389 2005-08-25  John (J5) Palmieri  <johnp@redhat.com>
390
391         * python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
392         (EmptyMessage): new class that subclasses Message.  This is a workaround
393         to a Pyrex bug that fails to call __del__ when the Message object goes out
394         of scope.  For some reason subclassing Message fixes this bug
395         (Bus::send_with_reply_and_block): use EmptyMessage instead of Message
396         - s/Message(_create=0)/EmptyMessage everywhere else
397         
398         * test/python/test-{server|client}.py: add the python/.libs directory
399         to the lookup path so dbus_bindings and dbus_glib_bindings don't
400         get picked up from the system
401
402 2005-08-25  Colin Walters  <walters@verbum.org>
403
404         * glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
405         to Ryan Lortie for the suggestion.
406
407 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
408
409         * test/python: Add python regression test
410
411         * configure.in: Add test/python/Makefile
412
413         * test/Makefile.am: Add the python directory to SUBDIRS
414
415 2005-08-24  John (J5) Palmieri  <johnp@redhat.com>
416
417         * Release 0.36.1
418
419         * python/_dbus.py: 
420         (Interface::connect_to_signal): propigate keywords for match on args
421         (Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
422
423         * python/proxies.py (ProxyObject::connect_to_signal):
424         propigate keywords for match on args
425
426         * Makefile.am: point everything to pyexecdir since python borks
427         on multilib
428
429 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
430
431         * Release 0.36
432
433 2005-08-23  Colin Walters  <walters@verbum.org>
434
435         * test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
436
437 2005-08-23  John (J5) Palmieri  <johnp@redhat.com>
438
439         * python/dbus_glib_bindings.pyx: reorder imports and c definitions
440         to fix some wranings. We now use dbus_bindings.DBusConnection instead
441         of defining DBusConnection ourselves.
442
443 2005-08-18  John (J5) Palmieri  <johnp@redhat.com>
444
445         * python/dbus.pth: New path file to fix up problems when installing
446         c libraries to lib64 and python files to lib.
447
448         * python/Makefile.am: install dbus.pth in the correct spot
449
450 2005-08-17  John (J5) Palmieri  <johnp@redhat.com>
451         * ChangeLog: clean up my last entry a bit
452
453         * doc/introspect.xsl: New stylesheet for converting introspection data
454         into browser renderable xhtml. Contributed by Lennart Poettering.
455
456         * doc/introspect.dtd: Fixups in the introspect format from Lennart
457         Poettering.
458
459         * doc/dbus-tutorial.xml: 
460         - Add Colin Walter to the Authors section for authoring the GLib
461         section
462         - Add descriptions of the new signature and type functionality
463         in the Python complex type mapping section
464         - Add a sidenote on the new args matching functionality in 
465         the Python bindings
466         - Fixed up some of the examples to use the gobject.MainLoop
467         instead of gtk.main
468         
469         * python/_dbus.py:
470         (Bus::_create_args_dict): New. Converts a hash of arg matches
471         to a more useable format
472         (Bus::add_signal_receiver): add a **keywords parameter for catching
473         arg match parameters
474         (Bus::remove_signal_receiver): add a **keywords parameter for catching
475         arg match parameters
476         
477         * python/matchrules.py:
478         (MatchTree::exec_matches): Check for arg matches
479         (SignalMatchRule::add_args_match): New method
480         (SignalMatchRule::execute): Added args_list parameter as an optimization
481         so we don't have to marshal the args more than once
482         (SignalMatchRule::match_args_from_list): New method that checks to see
483         if the rule's arg matches match an argument list.  Only arguments
484         set in the rule are checked.
485         (SignalMatchRule::match_args_from_rule): New method that checks to see
486         if the rule's arg matches match another rule's.  All args have to match
487         in order for this method to return true.  If either rule has more args
488         then it is not a match.
489         (SignalMatchRule::is_match): Add args match
490         (SignalMatchRule::repr): Add args to the final output if they exist
491
492 2005-08-17  Ross Burton  <ross@burtonini.com>
493
494         * glib/dbus-gproxy.c:
495         (dbus_g_proxy_call_no_reply): unref the message once sent.
496         (dbus_g_proxy_call): protect against NULL proxy.
497
498 2005-08-16  John (J5) Palmieri  <johnp@redhat.com>
499
500         * python/__init__.py: Version updated (0, 43, 0)
501         
502         * python/dbus_bindings.pyx: 
503         - Fixed type objects to have self passed into __init__
504         - Added the Variant type
505         - Add the ability to specify types or signatures for Array, Variant 
506         and Dictionary
507         (Connection::send_with_reply_handlers): return a PendingCall object
508         (_pending_call_notification): handle the case when an error is returned 
509         without an error message in the body
510         (MessageIter::get_boolean): return True or False instead of an integer
511         (MessageIter::python_value_to_dbus_sig): add direct checking of types 
512         and add checks for objects with embeded signatures or types (Array, 
513         Variant and Dictionary)
514         (MessageIter::append_byte): handle case when the value is a dbus.Byte
515         (MessageIter::append_dict): handle embeded types or signatures
516         (MessageIter::append_array): handle embeded types or signatures
517         (MessageIter::append_variant): new method
518         
519         * python/proxies.py:
520         (DeferedMethod): New. Dummy executable object used when queuing calls 
521         blocking on introspection data
522         (ProxyMethod::__call__): add the timeout keyword for specifying longer 
523         or shorter timeouts for method calls
524         (ProxyObject): Add first pass at an introspection state machine
525         (ProxyObject::__init__): Add introspect keyword for turing off an on 
526         introspection. 
527         (ProxyObject::_Introspect): Internal Introspect call that bypasses 
528         the usual mechanisms for sending messages.  This is to avoid a deadlock
529         where the Intospect call would be queued waiting for the Introspect 
530         call to finish ;-)
531         (ProxyObject::_introspect_reply_handler): New.  This method is called 
532         when introspection returns with no error
533         (ProxyObject::_introspect_error_handler): New.  This method is called 
534         when introspection encounters an error
535         (ProxyObject::__getattr__): Code to handle different introspection 
536         states.  Queue async calls or block blocking calls if we are 
537         introspecting.  Pass through as normal if we are not or are done with 
538         introspecting.
539         
540         * python/service.py: Import signal and method from decorators.py
541
542         * python/types.py: Add Variant type
543
544 2005-08-16  Colin Walters  <walters@verbum.org>
545
546         * glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
547         DBusError message is NULL.
548
549 2005-08-09  Havoc Pennington  <hp@redhat.com>
550
551         * dbus/dbus-errors.c: apply patch from Timo Teras to make a
552         malloc'd copy of the name parameter
553
554 2005-08-09  Havoc Pennington  <hp@redhat.com>
555
556         * dbus/dbus-message.c (dbus_message_set_reply_serial): print
557         warning if the reply serial is set to 0
558
559 2005-08-04  Colin Walters  <walters@verbum.org>
560
561         * glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
562         (dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
563         (dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
564         (dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
565         (dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
566         (dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
567         (dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
568         * glib/dbus-gvalue.h (dbus_g_value_types_init)
569         (dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
570         (dbus_gvalue_demarshal_message, dbus_gvalue_marshal):
571         
572         Prefix name with _ to ensure they're not exported.  All callers
573         updated.
574
575         * glib/dbus-gvalue.c (typecode_to_gtype)
576         (dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
577         (signature_iter_to_g_type_dict)
578         (signature_iter_to_g_type_array)
579         (dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
580         (dbus_gtypes_from_arg_signature):
581         Move to dbus-gsignature.c.
582
583         * glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
584         dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
585         (dbus_binding_tool_output_glib_client): Ditto.
586
587         * glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
588         and dbus-gsignature.h
589
590         * test/glib/test-service-glib.c (my_object_rec_arrays): Delete
591         unused variable.
592
593 2005-08-03  Colin Walters  <walters@verbum.org>
594
595         * glib/dbus-gobject.c: Add tests on hardcoded object info; this should
596         catch any incompatible changes accidentally made.
597
598 2005-08-03  Havoc Pennington  <hp@redhat.com>
599
600         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
601         typo, from Julien Puydt
602
603         * bus/connection.c (bus_connection_disconnected): we were always
604         doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
605
606 2005-08-01  Colin Walters  <walters@verbum.org>
607
608         Patch from Joe Markus Clarke:   
609         
610         * glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
611         use-after-free.
612
613 2005-08-01  Colin Walters  <walters@verbum.org>
614         
615         Patch from Joe Markus Clarke:   
616         
617         * tools/dbus-send.c (main): 
618         
619         Don't use C99 style initializers (bug #3933).
620         
621 2005-08-01  Colin Walters  <walters@verbum.org>
622
623         Patch from Joe Markus Clarke:   
624
625         * glib/dbus-gvalue.c (dbus_g_value_types_init): 
626         * glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init) 
627         * glib/dbus-gobject.c (write_interface):
628
629         Don't use C99 style initializers (bug #3933).
630
631 2005-07-31  Havoc Pennington  <hp@redhat.com>
632
633         * tools/dbus-viewer.c (load_child_nodes): fix invocation of
634         dbus_g_proxy_call, fix from Piotr Zielinski bug #3920
635
636 2005-07-30  Havoc Pennington  <hp@redhat.com>
637
638         * fix a bunch of Doxygen warnings and mistakes
639
640 2005-07-30  Havoc Pennington  <hp@redhat.com>
641
642         * dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
643         DBUS_BUILD_TESTS since it's now used in production code
644
645 2005-07-29  Havoc Pennington  <hp@redhat.com>
646
647         * test/glib/test-profile.c (write_junk): initialize the junk
648         buffer so valgrind doesn't have a breakdown
649
650 2005-07-29  Havoc Pennington  <hp@redhat.com>
651
652         * bus/signals.c (bus_signals_test): add match_rule_equal() tests
653         (match_rule_matches): remove unused arg
654         (test_matching): add tests for match_rule_matches()
655
656         * bus/signals.c (bus_match_rule_parse_arg_match): add ability to
657         do arg0='foo' arg5='bar' in the match rules
658         (match_rule_matches): don't match if the arg0='foo' doesn't match.
659
660         * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
661
662 2005-07-29  Ross Burton  <ross@openedhand.com>
663
664         * dbus/dbus-connection.c:
665         Don't create a DBusCondVar which is never used.
666
667 2005-07-27  Ross Burton  <ross@openedhand.com>
668
669         * dbus/dbus-message.c:
670         Reduce the size of the maximum cached message to 10K.
671
672 2005-07-25  Ross Burton  <ross@openedhand.com>
673
674         * glib/dbus-gproxy.c:
675         Remove matches when all proxies are unregistered.
676
677 2005-07-24  Colin Walters  <walters@verbum.org>
678
679         * glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
680         typedata; recursive arrays won't have it.
681
682         * test/glib/test-dbus-glib.c:
683         * test/glib/test-service-glib.c:
684         * test/glib/test-service-glib.xml: Add recursive arrays tests.
685         
686 2005-07-20  John (J5) Palmieir  <johnp@redhat.com>
687
688         * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
689         proxies.py, service.py: Cleanup of code after running it through the
690         pyflakes code checker mostly dealing with undefined names.  
691         (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
692
693 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
694
695         * NEWS: Update to 0.35.2
696
697 2005-07-17  John (J5) Palmieri  <johnp@redhat.com>
698
699         * python/_dbus.py: Remove import of the dbus.services
700         module as it no longer exists (patch from Dimitur Kirov)
701
702         * python/service.py (Object::__init__): Fixed typo
703         s/name/bus_name (patch from Dimitur Kirov)
704
705         * python/examples/example-signal-emitter.py: import dbus.glib
706         to get the main loop and use glib mainloop instead of gtk so
707         X doesn't have to be running.
708
709         * python/examples/example-signal-recipient.py: import dbus.glib
710         to get the main loop and use glib mainloop instead of gtk so
711         X doesn't have to be running. Import the decorators module
712         directly.
713
714         * test/glib/Makefile.am:  Added DIST_EXTRA files that distcheck
715         didn't pick up on but are needed to build
716
717         * configure.in: upped version to 0.35.2
718
719         * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
720         added Colin Walters' SELinux API rename patch from head 
721         s/unix sercurity context/selinux security context/
722
723 2005-07-16  John (J5) Palmieri  <johnp@redhat.com>
724
725         * python/Makefile.am: dbus_binding.pxd.in should be included 
726         in EXTRA_DIST not dbus_binding.pxd
727         fix up $(srcdir) hopefully for the last time
728
729         * NEWS: Update to 0.35.1
730
731 2005-07-16  Colin Walters  <walters@verbum.org>
732
733         * bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
734         from bus_driver_handle_get_connection_unix_security_context.  Update for
735         error usage.
736         (message_handlers): Update for renames.
737
738         * bus/selinux.c (bus_selinux_allows_send): Handle OOM on
739         _dbus_string_init failure correctly.
740         (bus_selinux_append_context): Convert SID to context.  Append it
741         as a byte array.
742         (bus_selinux_shutdown): Handle the case where bus_selinux_full_init
743         hasn't been called.
744
745         * bus/selinux.h: Update prototype.
746
747         * dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
748         from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.
749
750 2005-07-15  Colin Walters  <walters@verbum.org>
751
752         * doc/TODO: Add note about convenience wrappers.
753
754 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
755
756         * NEWS: Update to 0.35
757
758 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
759
760         * glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
761         so distcheck doesn't fail
762
763         * glib/examples/Makefile.am: Add example-service.xml and 
764         example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail
765
766         * glib/examples/statemachine/Makefile.am: Add statemachine.xml and
767         statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail
768
769         * python/Makefile.am: Preprend $(srcdir)/ to source files so the
770         compiler looks in the right places during distcheck
771
772 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
773
774         * glib/example/Makefile.am: Fix a typo which cause make distcheck
775         to fail
776
777 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
778
779         * python/examples/example-service.py,
780         python/examples/example-signal-emitter.py: Fixed up examples
781         for API changes
782
783 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
784
785         * python/__init__.py: Upped to version (0,42,0) because of
786         the API change
787
788 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
789
790         * ChangeLog: fix date in last entry
791
792         * configure.in, bus/system.conf.in: add the ability to configure 
793         the system bus user at compiletime with the --with-dbus-user flag
794         (patch from Kristof Vansant)
795
796 2005-07-15  John (J5) Palmieri  <johnp@redhat.com>
797
798         * bus/dispatch.c, test/test-service.c: Add testcase
799         for sending messages to oneself (TODO item).
800
801         * python/service.py (class Object): Swap ordering of bus_name 
802         and object_path parameters to better support inheritance.
803
804         * doc/dbus-tutorial.xml: change Python docs to reflect change
805         in parameter ordering and fix the inheritance section.
806
807         * doc/TODO: remove sending message to oneself TODO item
808
809 2005-07-15  Ross Burton  <ross@openedhand.com>
810
811         * glib/dbus-gproxy.c:
812         Fix a leak when calling methods via the proxy.
813
814 2005-07-15  Colin Walters  <walters@verbum.org>
815
816         * bus/selinux.c (bus_selinux_append_context): Wrap in
817         HAVE_SELINUX.
818
819 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
820
821         * python/_dbus.py (Bus::remove_signal_receiver):
822         don't add a callback to the match if none has been passed in
823         
824         * python/matchrules.py (SignalMatchTree::remove): if the rule
825         being matched does not have a callback treat it as a wildcard
826         fix matching logic
827
828         * doc/dbus-tutorial.xml: Add Python tutorial
829
830 2005-07-14  Colin Walters  <walters@verbum.org>
831
832         * bus/driver.c
833         (bus_driver_handle_get_connection_unix_security_context): New function.
834         (message_handlers): Add.
835
836         * bus/selinux.c (bus_selinux_append_context): New function; appends
837         security context to message.
838
839         * bus/selinux.h: Prototype.
840
841         * dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.
842
843 2005-07-14  John (J5) Palmieri  <johnp@redhat.com>
844
845         * bus/activation.c: clean up all tabs to be 8 spaces 
846         (bus_activation_activate_service): make sure we clean up
847         if activation fails
848
849         * bus/dispatch.c: clean up all tabs to be 8 spaces 
850         (check_shell_fail_service_auto_start): New function
851         tests to make sure we get fail properly when trying to auto start a service
852         with a faulty command line
853         (check_shell_service_success_auto_start): New function tests to make sure
854         auto started services get the arguments on the command line
855
856         * test/test-shell-service.c: Added service for testing auto-starting with 
857         command line arguments
858
859         * test/data/valid-service-files/debug-shell-echo-fail.service.in, 
860         test/data/valid-service-files/debug-shell-echo-success.service.in:
861         Added service files for testing auto-starting with command line arguments
862
863         * */.cvsignore: added a bunch of generated files to various .cvsignore files
864
865 2005-07-14  Rodrigo Moya  <rodrigo@novell.com>
866
867         * dbus/dbus-shell.[ch]: copy/pasted code from GLib.
868         
869         * dbus/Makefile.am: added new files to build.
870
871         * bus/activation.c (bus_activation_activate_service): support
872         activation commands with parameters.
873
874         * test/shell-test.c: added test program for the shell parsing
875         code.
876
877 2005-07-13  David Zeuthen  <davidz@redhat.com>
878
879         * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
880         64 bit signed and unsigned parameters
881
882 2005-07-13  John (J5) Palmieri  <johnp@redhat.com>
883
884         * python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
885
886         * python/service.py (class Name): renamed BusName to make it clearer
887         what the object is for (a name on the bus)
888
889         * python/examples/example-service.py,
890         python/examples/example-signal-emitter.py: change the Name object to
891         BusName
892
893 2005-07-12  Colin Walters  <walters@verbum.org>
894
895         Patch from Jim Gettys <Jim.Gettys@hp.com>.
896
897         * tools/dbus-launch.c: Include sys/select.h.
898
899 2005-07-12  John (J5) Palmieri  <johnp@redhat.com>
900         * python/dbus_bindings.pyx.in: removed
901
902         * python/dbus_bindings.pyx: Added.
903         - Fixed some memleaks (patch from 
904         Sean Meiners <sean.meiners@linspireinc.com>)
905         - Broke out the #include "dbus_h_wrapper.h" and put it in its
906         own pxd file (Pyrex definition)
907         - Broke out glib dependancies into its own pyx module
908         
909         * python/dbus_bindings.pdx: Added.
910         - Defines C class Connection for exporting to other modules
911
912         * python/dbus_glib_bindings.pyx: Added.
913         - New module to handle lowlevel dbus-glib mainloop integration
914
915         * python/glib.py: Added.
916         - Registers the glib mainloop when you import this module
917
918         * python/services.py: Removed (renamed to service.py)
919         
920         * python/service.py: Added.
921         - (class Server): renamed Name
922
923         * python/__init__.py: Bump ro version (0,41,0)
924         -don't import the decorators or service module
925         by default.  These now reside in the dbus.service namespace
926
927         * python/_dbus.py (Bus::__init__): Add code run the main loop 
928         setup function on creation 
929
930         * python/examples/example-service.py,
931         python/examples/example-signal-emitter.py: update examples
932
933         * python/examples/gconf-proxy-service.py,
934         python/examples/gconf-proxy-service2.py: TODO fix these up
935
936         * doc/TODO: Addition
937         - Added a Python Bindings 1.0 section
938         - added "Add match on args or match on details to match rules"
939
940
941 2005-07-12  Colin Walters  <walters@verbum.org>
942
943         * glib/examples/statemachine/Makefile.am (statemachine-server-glue.h) 
944         (statemachine-glue.h): 
945         * glib/examples/Makefile.am (example-service-glue.h) 
946         (example-signal-emitter-glue.h): 
947         * glib/Makefile.am (dbus-glib-error-switch.h): 
948         Add libtool --mode=execute so we use the built library instead
949         of any installed one.
950
951 2005-07-11  Colin Walters  <walters@verbum.org>
952
953         * glib/dbus-gvalue.c (struct _DBusGValue): Delete.
954         (dbus_g_value_types_init): Remove assertion.
955         (dbus_g_value_get_g_type, dbus_g_value_open)
956         (dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
957         (dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
958         functions related to DBusGValue.  Now we marshal/demarshal
959         structures as GValueArray.
960         (dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
961         structures.
962         (signature_iter_to_g_type_array): Don't call
963         signature_iter_to_g_type_struct.
964         (signature_iter_to_g_type_struct): Delete.
965         (dbus_gvalue_to_signature): Delete.
966         (dbus_gvalue_to_signature): New function with same name as other
967         one; we can convert structures to signatures.
968         (demarshal_valuearray): New function.
969         (get_type_demarshaller): Use it.
970         (demarshal_recurse): Delete.
971         (marshal_proxy): New function.
972         (marshal_map): Warn if we can't determine signature from type.
973         (marshal_collection_ptrarray): Ditto.
974         (marshal_collection_array): Ditto.
975         (get_type_marshaller): Use marshal_valuearray.
976         (marshal_recurse): Delete.
977         (_dbus_gvalue_test): Add some tests.
978
979         * dbus/dbus-glib.h (struct _DBusGValueIterator): 
980         (dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
981         (dbus_g_value_open, dbus_g_value_iterator_get_value)
982         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
983         (dbus_g_value_free): Remove prototypes.
984
985         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
986         G_TYPE_VALUE_ARRAY.
987
988         * glib/examples/example-service.c:
989         * glib/examples/example-client.c: Implement GetTuple.
990
991         * test/glib/test-dbus-glib.c:
992         * test/glib/test-service-glib.c:
993         * test/glib/test-service-glib.xml: Add structure tests.
994
995 2005-07-10  Colin Walters  <walters@verbum.org>
996
997         * doc/TODO: Knock off some GLib items with this patch.
998
999         * glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error) 
1000         (_dbus_gvalue_signals_error): New functions.
1001
1002         * glib/dbus-gvalue-utils.h: Prototype them.
1003
1004         * glib/dbus-gobject.c (arg_iterate): Update to handle return vals
1005         and change to not output const/retval flags for input args.  All
1006         callers updated.
1007         (invoke_object_method): Refactor to handle return values.  Add
1008         some more comments in various places.  Remove debug g_print.
1009
1010         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
1011
1012         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
1013         Handle G_TYPE_NONE.
1014         (compute_gsignature): New function; refactored from code from
1015         compute_marshaller and compute_marshaller_name.  Enhance to
1016         handle return values and async ops more cleanly.  Update for
1017         async ops returning NONE instead of BOOLEAN.
1018         (compute_marshaller, compute_marshaller_name): Call compute_gsignature
1019         and output appropriate string.
1020         (generate_glue): Handle return value annotation.  Also don't dump
1021         constness flag for input arguments.
1022
1023         * glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
1024         files shared between installed library and utilities.
1025         (libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
1026         (libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
1027         binding tool can access gtype utility functions.
1028
1029         * test/glib/test-service-glib.c: 
1030         * test/glib/test-service-glib.xml: 
1031         * test/glib/test-dbus-glib.c: Add some tests for return values.
1032
1033 2005-07-09  Colin Walters  <walters@verbum.org>
1034
1035         * glib/dbus-gparser.c (parse_annotation): Add annotations to
1036         argument if available, not method.
1037
1038         * glib/dbus-gobject.c (arg_iterate): More verbose warnings.
1039         (invoke_object_method): First, remove some redundant
1040         GValues (object_value, error_value) in favor of working on
1041         array directly.  Second, rework constness to be less buggy.
1042         Now we iterate directly over the argument metadata instead
1043         of parallel iterating over output signature and metadata.
1044
1045         * glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
1046
1047         * glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
1048         annotation on input args.
1049         
1050 2005-07-09  Colin Walters  <walters@verbum.org>
1051
1052         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
1053         Define.
1054
1055         * glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
1056         annotation.
1057
1058         * glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
1059         (method_dir_signature_from_object_info): Handle arg_iterate change.
1060         (write_interface): Ditto.
1061         (lookup_object_info): Don't barf if format_version is > 0.
1062         (invoke_object_method): Handle arg constness.
1063
1064         * glib/dbus-gidl.c (struct ArgInfo): Add annotations.
1065         (arg_info_new): Create.
1066         (arg_info_unref): Destroy.
1067         (arg_info_get_annotations, arg_info_get_annotation) 
1068         (arg_info_add_annotation): New functions.
1069
1070         * glib/dbus-gidl.h: Prototype them.
1071
1072         * glib/dbus-gparser.c (parse_annotation): Allow annotations in
1073         args, disallow them in properties.
1074         (parse_annotation): Handle arg annotations.
1075
1076         * test/glib/test-service-glib.xml: 
1077         * test/glib/test-service-glib.c: Update to make some methods
1078         const.
1079
1080 2005-07-08  Colin Walters  <walters@verbum.org>
1081
1082         * test/glib/test-service-glib.xml: 
1083         * test/glib/test-service-glib.c:
1084         * test/glib/test-dbus-glib.c: Test a{sv}.
1085
1086         * glib/examples/statemachine/statemachine.c:
1087         * glib/examples/statemachine/statemachine-server.c:
1088         * glib/examples/statemachine/statemachine-client.c: Fix some bugs,
1089         add progress bar, etc.
1090
1091         * glib/dbus-gvalue.c (register_array, register_dict): Delete; not
1092         needed anymore due to generic array/map marshalling.
1093         (dbus_g_value_types_init): Don't register basic arrays or the
1094         string/string hash.
1095         (dbus_gtype_from_signature_iter): Don't try to recurse into
1096         variants.
1097         (dbus_gtype_to_signature): Check collection/map before type
1098         metadata.
1099         (demarshal_garray_basic): Renamed to demarshal_collection_array.
1100         (demarshal_ghashtable): Renamed to demarshal_map; fix to use new
1101         generic map creation/append functions instead of hash table
1102         specifically.
1103         (get_type_demarshaller): Handle maps.
1104         (demarshal_collection): Dispatch on collection type to either
1105         demarshal_collection_ptrarray or demarshal_collection_array.
1106         (get_type_marshaller): Handle maps.
1107         (marshal_collection): Dispatch collection type to either
1108         marshal_collection_ptrarray or marshal_collection_array.
1109         (_dbus_gvalue_test): New test.
1110
1111         * glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
1112         (hash_free_from_gtype): Use it to free GValues.
1113         (hashtable_append): New function.
1114         (ptrarray_append): Fix prototype.
1115         (slist_append): Ditto.
1116         (_dbus_gvalue_utils_test): Extend tests.
1117
1118         * glib/dbus-gtype-specialized.c
1119         (dbus_g_type_specialized_init_append): Renamed from
1120         dbus_g_type_specialized_collection_init_append.  Remove const from
1121         value, since we steal it.
1122         (dbus_g_type_specialized_map_append): New function.
1123
1124         * glib/dbus-gtype-specialized.h: Update prototypes.
1125         Add DBusGTypeSpecializedMapAppendFunc.
1126
1127         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1128         _dbus_gvalue_test.
1129         
1130         * glib/dbus-gtest.h: Prototype it.
1131
1132 2005-07-08  Ross Burton  <ross@openedhand.com>
1133
1134         * dbus/dbus-glib.h:
1135         Add DBysGAsyncData for the async bindings.
1136
1137         * glib/dbus-binding-tool-glib.c:
1138         Re-enable the async bindings.
1139
1140         * test/glib/test-dbus-glib.c:
1141         Add a test for the generated async bindings.
1142
1143 2005-07-08  Colin Walters  <walters@verbum.org>
1144
1145         * doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
1146         connection concept.
1147         
1148 2005-07-08  Colin Walters  <walters@verbum.org>
1149         
1150         * tools/Makefile.am: Kill of print-introspect in favor of using
1151         dbus-send --print-reply=literal.
1152
1153         * test/glib/test-service-glib.xml: 
1154         * test/glib/test-service-glib.c (my_object_get_objs): New test
1155         for "ao".
1156
1157         * test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
1158         (main): Test GetObjs.
1159
1160         * glib/examples/statemachine/Makefile.am:
1161         * glib/examples/statemachine/sm-marshal.list:
1162         * glib/examples/statemachine/statemachine-client.c:
1163         * glib/examples/statemachine/statemachine-server.c:
1164         * glib/examples/statemachine/statemachine-server.xml:
1165         * glib/examples/statemachine/statemachine.c:
1166         * glib/examples/statemachine/statemachine.h:
1167         * glib/examples/statemachine/statemachine.xml:
1168
1169         New example.
1170
1171         * glib/examples/example-service.c (main): Move invocation
1172         of dbus_g_object_type_install_info earlier, to emphasize it
1173         should only be done once.
1174
1175         * glib/examples/example-signal-emitter.c (main): Ditto.
1176
1177         * glib/examples/Makefile.am (SUBDIRS): Include statemachine.
1178
1179         * glib/dbus-gvalue.h (dbus_gtype_to_signature)
1180         (dbus_gvalue_marshal): Update prototypes.
1181
1182         * glib/dbus-gvalue.c: Update all marshalling functions to take
1183         const GValue instead of GValue.
1184         (signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
1185         types.
1186         (dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
1187         change.
1188         (dbus_gtype_to_signature): Handle generic collecitons and maps.
1189         Return a newly-allocated string.
1190         (demarshal_proxy, demarshal_object_path, demarshal_object)
1191         (demarshal_strv, demarshal_ghashtable): Set error, don't assert if
1192         we get the wrong types from message.
1193         (get_type_demarshaller): New function, extracted from
1194         dbus_gvalue_demarshal.
1195         (demarshal_collection): New function, demarshals generic
1196         collection.
1197         (dbus_gvalue_demarshal): Just invoke result of
1198         get_type_demarshaller.  Throw error if we don't have one.
1199         (marshal_garray_basic): Abort on OOM.
1200         (get_type_marshaller): New function, extracted from
1201         dbus_gvalue_marshal.
1202         (collection_marshal_iterator, marshal_collection): New functions;
1203         implements generic marshalling for an iteratable specialized
1204         collection.
1205         (dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
1206
1207         * glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
1208         G_TYPE_STRING.
1209         (ptrarray_value_from_gvalue): Ditto.
1210         (ptrarray_append, ptrarray_free): New functions.
1211         (slist_constructor, slist_iterator, slist_copy_elt, slist_copy) 
1212         (slist_append, slist_end_append, slist_free): New functions.
1213         (dbus_g_type_specialized_builtins_init): Add append fuctions
1214         for GPtrArray and GSList.  Register GSList.
1215         (test_specialized_hash, _dbus_gvalue_utils_test): New functions.
1216
1217         * glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
1218         New.
1219         (dbus_g_type_specialized_collection_init_append)
1220         (dbus_g_type_specialized_collection_append)
1221         (dbus_g_type_specialized_collection_end_append): Prototype.
1222         (DBusGTypeSpecializedCollectionVtable): Add append_func and
1223         end_append_func.
1224
1225         * glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append) 
1226         (dbus_g_type_specialized_collection_append) 
1227         (dbus_g_type_specialized_collection_end_append): New functions.
1228         (dbus_g_type_map_value_iterate): Take const GValue.
1229         (dbus_g_type_collection_value_iterate): Ditto.
1230
1231         * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1232         _dbus_gvalue_utils_test.
1233         
1234         * glib/dbus-gtest.h: Prototype it.
1235
1236         * glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
1237         using uninitialized owner_list.
1238         (dbus_g_proxy_begin_call_internal): Move return_if_fail to
1239         public API.
1240         (dbus_g_proxy_end_call_internal): Update to use error set
1241         from dbus_gvalue_demarshal instead of setting it here.
1242         (dbus_g_proxy_begin_call): Move return_if_fail here.
1243
1244         * glib/dbus-gobject.c (write_interface): Update for
1245         dbus_gtype_to_signature returning new string.
1246
1247         * configure.in: Add glib/examples/statemachine.
1248
1249 2005-07-08  Joe Shaw  <joeshaw@novell.com>
1250
1251         * configure.in: Add a configure option, --with-console-auth-dir
1252         
1253         * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
1254         new setting.  Patch from Kay Sievers.
1255
1256 2005-07-06  Colin Walters  <walters@verbum.org>
1257
1258         * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
1259         (DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
1260         (dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
1261         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
1262         Delete in favor of dbus_g_proxy_begin_call and
1263         dbus_g_proxy_cancel_call.
1264         (DBusGProxyCall, DBusGProxyCallNotify): New.
1265         (dbus_g_proxy_begin_call): Change prototype to take callback, user
1266         data, and destroy function.  This replaces
1267         dbus_g_pending_call_set_notify.
1268         (dbus_g_proxy_cancel_call): Prototype.
1269         (DBusGAsyncData): Delete, shouldn't be needed anymore.
1270
1271         * glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
1272         pending_calls map.
1273         (struct _DBusGProxyManager): Add bus_proxy member, which is an
1274         internal proxy for calls to the bus. Remove
1275         pending_nameowner_calls, now the internal proxy keeps track.
1276         (dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
1277         pending_nameowner_calls.
1278         (got_name_owner_cb): Update prototype, and use
1279         dbus_g_proxy_end_call.
1280         (got_name_owner_cb): Remove reference to pending_nameowner_calls.
1281         (dbus_g_proxy_manager_register): Delete directly libdbus code in
1282         favor of using internal proxy.
1283         (dbus_g_proxy_manager_unregister): Update to use
1284         dbus_g_proxy_cancel_call for any pending GetNameOwner call.
1285         (dbus_g_proxy_init): Initialize pending calls map.
1286         (dbus_g_proxy_constructor): New.
1287         (dbus_g_proxy_class_init): Add get/set property functions,
1288         constructor, and add NAME, PATH, and INTERFACE properties.
1289         (cancel_pending_call): New function.
1290         (dbus_g_proxy_dispose): Iterate over any outstanding calls and
1291         cancel them.
1292         (dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
1293         (GPendingNotifyClosure): New structure.
1294         (d_pending_call_notify, d_pending_call_free): Moved here from
1295         dbus-glib.c.
1296         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
1297         ordering.
1298         (manager_begin_bus_call): New internal function for talking to
1299         internal bus proxy.
1300         (dbus_g_proxy_new): Construct object using GObjet properties.
1301         (dbus_g_proxy_begin_call_internal): Update to take user data, etc.
1302         Create closure of same, and insert call into map of pending calls.
1303         (dbus_g_proxy_end_call_internal): Take call id instead of pending
1304         call.  Look up pending call in current set.  Remove it when we've
1305         completed.
1306         (dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
1307         (dbus_g_proxy_begin_call): Change API to take callback, user data,
1308         and destroy function directly.
1309         (dbus_g_proxy_end_call): Update to take DBusGProxyCall.
1310         (dbus_g_proxy_call): Invoke with NULL callback.
1311         (dbus_g_proxy_cancel_call): New function, replaces
1312         dbus_g_pending_call_cancel.
1313
1314         * glib/dbus-gparser.c (validate_signature): Fix call to
1315         dbus_set_g_error.
1316
1317         * glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
1318         New quark for attaching metadata to GType.
1319         (info_hash): Delete.
1320         (lookup_object_info): Look up using quark.
1321         (dbus_g_object_type_install_info): Check that a type is classed,
1322         not that it's an object.  Also just install type data using quark
1323         instead of using global hash.
1324
1325         * glib/dbus-glib.c (dbus_g_pending_call_ref) 
1326         (dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
1327         (GPendingNotifyClosure): Delete.
1328         (d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
1329         (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
1330
1331         * glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
1332         client method generation until we can fix it...
1333         
1334         * tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
1335         (load_from_service_thread_func): Ditto.
1336
1337         * tools/dbus-names-model.c (struct NamesModel): Hold
1338         DBusGProxyCall.
1339         (have_names_notify): Update prototype, use
1340         dbus_g_proxy_cancel_call.
1341         (names_model_reload): Update for new dbus_g_proxy_begin_call API.
1342
1343         * tools/dbus-monitor.c (filter_func): Update for print_message
1344         API change.
1345
1346         * test/glib/test-dbus-glib.c: Add more tests for async
1347         invocations.  Update many begin_call/end_call pairs to just use
1348         dbus_g_proxy_call.
1349
1350         * tools/dbus-send.c (main): Add --print-reply=literal mode.  This
1351         allows us to dump print-introspect.c.
1352
1353         * tools/dbus-print-message.h (print_message): Add literal argument
1354         to print_message which is intended to allow printing arguments without
1355         metadata like "string=".
1356
1357         * tools/dbus-print-message.c (print_iter): Add literal argument.
1358         (print_message): Allow printing string messages literally.
1359
1360 2005-07-05  Colin Walters  <walters@verbum.org>
1361
1362         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1363         Remove value refcount leak, original patch from Jorn Baayen
1364         <jorn@openedhand.com>.  Also remove useless extra value in favor
1365         of prepending to value array directly.
1366
1367 2005-07-02  Colin Walters  <walters@verbum.org>
1368
1369         * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
1370
1371 2005-07-01  Colin Walters  <walters@verbum.org>
1372
1373         Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
1374         
1375         * glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
1376         (dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
1377         G_TYPE_LONG as DBUS_TYPE_INT32, G_TYPE_ULONG as DBUS_TYPE_UINT32,
1378         and G_TYPE_FLOAT as DBUS_TYPE_DOUBLE.
1379
1380 2005-06-30  Colin Walters  <walters@verbum.org>
1381
1382         * test/glib/test-dbus-glib.c:
1383         * test/glib/test-service-glib.c:
1384         * test/glib/test-service-glib.xml: Update tests for new error
1385         setting bits, also add async tests (patch from Ross Burton).
1386
1387         * test/glib/Makefile.am (test_service_glib_LDADD): Add
1388         DBUS_GLIB_THREADS_LIBS.
1389
1390         * glib/dbus-gproxy.c (get_name_owner)
1391         (dbus_g_pending_call_end_valist): Ditto.
1392
1393         * glib/dbus-gobject.c (error_metadata): New mapping from GError
1394         domain (GQuark) to DBusGErrorInfo.  
1395         (gerror_domaincode_to_dbus_error_name): Attempt to look up error
1396         quark in error_metadata.  Take message interface as default
1397         error message interface.
1398         (gerror_to_dbus_error_message): Pass message interface.
1399         (dbus_set_g_error): Resurrected.
1400         (dbus_g_error_info_free): New function.
1401         (dbus_g_object_type_install_info): Use g_type_class_ref instead
1402         of _peek to actually create the object class if it hasn't been
1403         created yet.
1404         (dbus_g_error_domain_register): New function.
1405
1406         * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
1407
1408         * glib/dbus-gparser.c (validate_signature): Ditto.
1409
1410         * dbus/dbus-glib.h (dbus_g_error_set): Delete.
1411         (dbus_g_error_domain_register): Prototype.
1412
1413         * glib/dbus-glib.c (dbus_g_error_set): Delete.
1414         Update tests.
1415
1416 2005-06-29  Colin Walters  <walters@verbum.org>
1417
1418         * dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY.  Add
1419         DBUS_TYPE_G_OBJECT_PATH.
1420
1421         * glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
1422         for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
1423         be handled more generically).  Add DBUS_TYPE_G_OBJECT_PATH.
1424         (dbus_g_object_path_get_g_type): New function.
1425         (dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
1426         to DBUS_TYPE_G_OBJECT_PATH by default.
1427         (demarshal_proxy): Remove unused name variable.
1428         (demarshal_object_path, marshal_object_path): New functions.
1429         (demarshal_proxy_array, marshal_proxy_array): Delete.
1430         
1431         * glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
1432         DBUS_TYPE_G_OBJECT_PATH to char *.
1433         (dbus_g_type_get_lookup_function): Map builtin
1434         DBUS_TYPE_G_OBJECT_PATH.
1435
1436         * test/glib/test-dbus-glib.c
1437         * test/glib/test-service-glib.c (my_object_objpath): 
1438         Adapt tests to new object path marshalling.
1439
1440 2005-06-29  John (J5) Palmieri  <johnp@redhat.com>
1441
1442         * configure.in: force check for Python >= 2.4
1443
1444 2005-06-29  Colin Walters  <walters@verbum.org>
1445         
1446         Patch from Ross Burton <ross@openedhand.com>
1447         
1448         * glib/dbus-gobject.c (invoke_object_method): Unset object
1449         value in all cases, not only in async case.
1450
1451 2005-06-29  Colin Walters  <walters@verbum.org>
1452
1453         * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
1454         name_call for keeping track of any outgoing GetNameOwner call.
1455         Also add for_owner and associated.
1456         (struct _DBusGProxyManager): Add owner_names, which is hash table
1457         that maps a base name to a list of names it owns (that we're
1458         interested in).  Add pending_nameowner_calls which is a list of
1459         all outstanding GetNameOwner; avoids us having to iterate over
1460         every proxy.  Add unassociated_proxies which keeps track of name
1461         proxies with no associated name owner.
1462         (dbus_g_proxy_manager_unref): Destroy owner_names.
1463         (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
1464         name refcounts.
1465         (find_name_in_info, name_owner_foreach)
1466         (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
1467         (dbus_g_proxy_manager_monitor_name_owner)
1468         (dbus_g_proxy_manager_unmonitor_name_owner)
1469         (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
1470         New functions; they manipulate the owner_names mapping.
1471         (got_name_owner_cb): New function.
1472         (get_name_owner): New function, extracted from
1473         dbus_g_proxy_new_for_name_owner.
1474         (dbus_g_proxy_manager_register): For now we need to keep track of
1475         all NameOwnerChanged.  Also if the proxy is for a name, if we
1476         don't already know the name owner, queue a new GetNameOwner
1477         request and add it to our list of unassociated proxies.  Otherwise
1478         inc the refcount.
1479         (dbus_g_proxy_manager_unregister): If this proxy is for a name,
1480         cancel any pending GetNameOwner call, etc.
1481         (dbus_g_proxy_manager_filter): Handle NameOwnerChanged.  Also use
1482         the owner_names mapping to look up the current names for the
1483         signal source, and dispatch to any proxies for that name.
1484         (dbus_g_proxy_new): Initialize new members.
1485         (dbus_g_proxy_new_for_name): Delete unused proxy variable.
1486         (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
1487         (dbus_g_pending_call_end_valist): New function, extracted from
1488         dbus_g_proxy_end_call_internal.  Useful when we don't have a proxy
1489         but want to use the GLib infrastructure.  Also note how many
1490         arguments in reply were over.
1491         (dbus_g_pending_call_end): New function, just call
1492         dbus_g_pending_call_end_valist.
1493         (dbus_g_proxy_end_call_internal): Just call
1494         dbus_g_pending_call_end_valist.
1495
1496         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
1497         of builtin marshaller for STRING_STRING_STRING.
1498
1499         * test/glib/test-dbus-glib.c: 
1500         * test/glib/test-service-glib.c:
1501         * test/glib/test-service-glib.xml:
1502         Extend tests to cover name proxies, destruction of owner proxies,
1503         etc.
1504         
1505         * glib/examples/example-signal-recipient.c
1506         (dbus_g_proxy_new_for_name_owner): Create a name proxy.
1507         
1508         * tools/dbus-send.c (main): Print D-BUS error name in addition
1509         to message.
1510
1511 2005-06-28  John (J5) Palmieri  <johnp@redhat.com>
1512
1513         * python/dbus_bindings.pyx.in (cunregister_function_handler,
1514         cmessage_function_handler): Patch from 
1515         Anthony Baxter <anthony@interlink.com.au> fixes threading problems
1516         by using the Py_GILState_Ensure/Release to synchronize with the
1517         python runtime.
1518         
1519 2005-06-28  Ray Strode  <rstrode@redhat.com>
1520
1521         *  dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
1522         babysitter helper process on last unref, bug #2813.
1523
1524 2005-06-27  Colin Walters  <walters@verbum.org>
1525
1526         * test/glib/test-dbus-glib.c: 
1527         * test/glib/test-service-glib.c:
1528         * test/glib/test-service-glib.xml:
1529         Test hash table signal emitting.
1530
1531         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
1532         types to their fundamental basis types, since this is what
1533         marshallers operate on.  Also add an entry for VOID__BOXED.
1534         (dbus_g_object_register_marshaller_array): Convert to fundamental.
1535
1536 2005-06-26  Havoc Pennington  <hp@redhat.com>
1537
1538         * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
1539         from Don Park
1540
1541 2005-06-26  Colin Walters  <walters@verbum.org>
1542
1543         * glib/dbus-glib.c (dbus_set_g_error): Delete.
1544         (dbus_g_error_set): New public function from its ashes; used by
1545         both service-side method implementation and GLib bindings
1546         internals.
1547         (dbus_g_error_has_name, dbus_g_error_get_name): New function.
1548         (_dbus_glib_test): Add some tests.
1549
1550         * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
1551
1552         * test/glib/test-service-glib.c (my_object_throw_error): Use
1553         dbus_g_error_set.
1554
1555         * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
1556         errors thrown by dbus_g_error_set.
1557
1558         * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
1559
1560         * glib/dbus-gparser.c (validate_signature): Ditto.
1561
1562         * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner) 
1563         (dbus_g_proxy_end_call_internal): Ditto.
1564
1565         * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
1566         converts DBUS_ERROR_x to DBUS_GERROR_x.
1567         (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
1568
1569         * doc/TODO: Remove error TODO.
1570
1571         * doc/dbus-tutorial.xml: Update with documentation about error
1572         handling.
1573
1574         * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
1575         sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
1576         GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.
1577
1578 2005-06-22  Colin Walters  <walters@verbum.org>
1579         
1580         Patch from Ross Burton <ross@openedhand.com>
1581
1582         * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
1583
1584 2005-06-20  Colin Walters  <walters@verbum.org>
1585
1586         * configure.in: Add glib/examples.
1587
1588         * glib/Makefile.am: Add examples/
1589
1590         * glib/examples/.cvsignore
1591         * glib/examples/Makefile.am
1592         * glib/examples/example-client.c
1593         * glib/examples/example-service.c
1594         * glib/examples/example-service.xml
1595         * glib/examples/example-signal-emitter.c
1596         * glib/examples/example-signal-emitter.xml
1597         * glib/examples/example-signal-recipient.c:
1598         New files; GLib binding examples, ported from
1599         python/examples.
1600
1601 2005-06-20  Colin Walters  <walters@verbum.org>
1602
1603         * dbus/dbus-glib.h: 
1604         * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
1605         dbus_g_proxy_call.
1606
1607         * glib/dbus-binding-tool-glib.c: 
1608         * doc/dbus-tutorial.xml: 
1609         * test/glib/test-dbus-glib.c: Update for rename.
1610         
1611 2005-06-20  Colin Walters  <walters@verbum.org>
1612
1613         Patch suggested by Ross Burton <ross@openedhand.com>
1614
1615         * glib/dbus-gobject.c (export_signals): Free signal name.
1616         (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
1617         memory leak.  Add a bit of documentation.
1618         (dbus_g_method_return_error): Free context, and note we do
1619         so.
1620
1621 2005-06-18  Murray Cumming  <murrayc@murrayc.com>
1622
1623         * dbus/dbus-glib.h:
1624         * glib/dbus-gobject.c:
1625         * glib/dbus-gproxy.c:
1626         * glib/dbus-gvalue.c: Predeclare structs as 
1627         typedef struct _Something Something instead of 
1628         typedef struct Something Something, so we can 
1629         redeclare the prototypes. Other GNOME libraries 
1630         do this already.
1631
1632 2005-06-17  Colin Walters  <walters@verbum.org>
1633
1634         * tools/dbus-names-model.c (have_names_notify): Fix call
1635         to dbus_g_proxy_end_call.
1636         
1637 2005-06-17  Colin Walters  <walters@verbum.org>
1638
1639         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
1640         spew warnings if we get malformed remote signals.
1641
1642         * glib/dbus-gobject.c (propsig_iterate): New function.
1643         (lookup_object_info): New function, extracted from
1644         lookup_object_and_method.
1645         (introspect_properties, introspect_signals): Delete; these
1646         are merged into write_interface.
1647         (write_interface): Write out signals and properties here;
1648         dump the org.gtk.object stuff and use the interface given
1649         in the introspection data blob.  Also fix up property XML.
1650         (lookup_values): New function.
1651         (introspect_interfaces): Gather a mapping from interface to a
1652         list of its methods, signals, and properties, then write out
1653         each interface.
1654         (lookup_object_and_method): Use lookup_object_info.
1655         (struct DBusGSignalClosure): Add interface.
1656         (dbus_g_signal_closure_new): Add interface. Don't dup signame;
1657         we can just use the constant data.
1658         (dbus_g_signal_closure_finalize): Don't free signal name.
1659         (signal_emitter_marshaller): Use interface from signal closure.
1660         (export_signals): Only export signals mentioned in introspection
1661         blob.
1662         (dbus_g_connection_register_g_object): Warn if we have no
1663         introspection data for an object.
1664         (funcsig_equal): Remove unused variable.
1665         (dbus_g_object_register_marshaller): Take varargs instead of
1666         list.
1667         (dbus_g_object_register_marshaller_array): New function,
1668         extracted from old dbus_g_object_register_marshaller.
1669
1670         * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
1671         signals and property data.
1672         (write_quoted_string): New function, extracted from generate_glue.
1673         (generate_glue): Write signals and properties to introspection
1674         blob.
1675
1676         * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
1677         exported_signals and exported_properties.
1678         (dbus_g_object_register_marshaller): Update prototype.
1679         (dbus_g_object_register_marshaller_array): Prototype.
1680         
1681         * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
1682
1683         * test/glib/test-service-glib.c: Add new test signals and method
1684         to emit them.
1685
1686         * test/glib/test-service-glib.xml: Add some test signals.
1687
1688         * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
1689         and my-object-marshal.h
1690         (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
1691         my-object-marshal.c.
1692         (my-object-marshal.c, my-object-marshal.h): Implement.
1693
1694         * test/glib/.cvsignore: Update.
1695
1696         * doc/TODO: Remove two GLib TODO items fixed by this
1697         patch.
1698
1699 2005-06-16  Colin Walters  <walters@verbum.org>
1700
1701         * doc/TODO: Update for GLib bindings.
1702         
1703 2005-06-16  Colin Walters  <walters@verbum.org>
1704
1705         * glib/dbus-binding-tool-glib.c:
1706         * glib/dbus-gobject.c:
1707         * glib/dbus-gproxy.c:  Add Nokia copyright; Patch
1708         from Ross Burton, for his GLib bindings work.
1709
1710 2005-06-16  Colin Walters  <walters@verbum.org>
1711
1712         * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
1713         to iterate instead of walking to G_TYPE_INVALID.
1714
1715         Patch based on a patch from Ryan Gammon.
1716
1717 2005-06-16  Colin Walters  <walters@verbum.org>
1718
1719         * bus/bus.c (bus_context_new): Set parser to NULL
1720         after we unref it (Patch from Chris Boscolo, #2174).
1721         
1722 2005-06-16  Colin Walters  <walters@verbum.org>
1723
1724         * python/dbus_bindings.pyx.in: Import size_t,
1725         __int64_t, __uint64_t, and __signed.
1726
1727         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
1728         Define cmsg struct, output it.
1729         (_dbus_read_credentials_unix_socket):
1730         Use cmsg struct.
1731         
1732         Patch from Joe Markus Clarke for FreeBSD support.
1733         
1734 2005-06-16  Colin Walters  <walters@verbum.org>
1735
1736         * tools/dbus-send.c (append_array): Use strtok.
1737         (append_dict): New function.
1738         (type_from_name): New function, extracted from main.
1739         (main): Handle sending dicts.
1740
1741         * tools/dbus-print-message.c (print_iter): Print dict
1742         entries.
1743         
1744 2005-06-16  Colin Walters  <walters@verbum.org>
1745
1746         * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
1747         values as the empty string (#2948).
1748         
1749 2005-06-16  Colin Walters  <walters@verbum.org>
1750
1751         * dbus/Makefile.am:
1752         * mono/doc/Makefile.am:
1753         * test/glib/Makefile.am:
1754
1755         Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
1756
1757 2005-06-16  Colin Walters  <walters@verbum.org>
1758
1759         * dbus/dbus-marshal-header.c (_dbus_header_load): Set
1760         header byte order from expected byte order (Patch from Chris Wilson, #3475).
1761
1762         * dbus/dbus-marshal-byteswap.c (byteswap_body_helper): 
1763         Increment pointer after swapping fixed array.  Add assertion
1764         for array length.
1765                 
1766 2005-06-15  Colin Walters  <walters@verbum.org>
1767
1768         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
1769         Fix call to dbus_set_error.  (Patch from Michael Banck, #3461)
1770         
1771 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1772
1773         * NEWS: Update to 0.34
1774
1775 2005-06-15  David Zeuthen  <davidz@redhat.com>
1776
1777         * configure.in (LT_CURRENT): Revert back to 1 as the library
1778         hasn't changed and we've certainly not committed to protocol
1779         stability yet.  All this does is to break ABI. See commit note
1780         from hp@redhat.com 2005-05-05 for details.
1781         
1782 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1783
1784         * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method 
1785         (_dbus_connection_run_builtin_filters): New method
1786         (dbus_connection_dispatch): Run the builtin filters which in turn
1787         runs the peer filter which handles Ping messages.
1788
1789         * doc/TODO: 
1790          - Ping isn't handled: This patch fixes it
1791          
1792          - Add a test case for the Ping message: added TODO item
1793
1794 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1795
1796         * dbus/dbus-message.c:
1797         (dbus_message_has_path): New method
1798         (dbus_message_has_interface): New method
1799         (dbus_message_has_member): New method
1800
1801         * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
1802         New method
1803
1804         * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that 
1805         the keyring directory is private to the user
1806
1807         * doc/TODO:
1808          - The convenience functions in dbus-bus.h should perhaps have
1809          the signatures that they would have if they were autogenerated
1810          stubs. e.g. the acquire service function. We should also evaluate
1811          which of these functions to include, in light of the fact that
1812          GLib/Qt native stubs will probably also exist.: Punted
1813
1814          - add dbus_message_has_path(), maybe has_member/interface:
1815          fixed in this patch
1816
1817          - in dbus-keyring.c, enforce that the keyring dir is not
1818          world readable/writable: Fixed in this patch
1819
1820 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
1821
1822         * dbus/dbus-marshal-validate.h: Added a new validation
1823         error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for 
1824         out of memory errors when validating signitures
1825
1826         * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
1827         in places where we previously used DBUS_VALID and a FALSE return 
1828         value to indicate OOM
1829         
1830         * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
1831         Use a stack to track the number of elements inside containers.  The 
1832         stack values are then used to validate that dict entries have only two
1833         elements within them.
1834         (validate_body_helper): check the reason for failure when validating
1835         varients
1836         
1837         * dbus/dbus-message.c (load_message): use 
1838         DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used 
1839         DBUS_VALID and a FALSE return value to indicate OOM
1840
1841         * doc/TODO: remove "- validate dict entry number of fields" as this
1842         patch fixes it
1843
1844 2005-06-14  David Zeuthen  <davidz@redhat.com>
1845
1846         * bus/bus.c (process_config_every_time): Drop existing conf-dir
1847         watches (if applicable) and add new watches
1848
1849         * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
1850         (main): Setup SIGIO signal handler if using D_NOTIFY
1851
1852         * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
1853
1854         * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
1855         (merge_included): Also merge conf_dirs list
1856         (bus_config_parser_unref): Clear conf_dirs list
1857         (include_dir): Add directory to conf_dirs list
1858         (bus_config_parser_get_conf_dirs): New function
1859
1860         * bus/dir-watch.[ch]: New files
1861
1862         * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
1863
1864         * configure.in: Add checks for D_NOTIFY on Linux
1865
1866 2005-06-14  Colin Walters  <walters@verbum.org>
1867
1868         * glib/dbus-binding-tool-glib.c:
1869         * glib/dbus-gobject.c:
1870         * glib/dbus-gvalue.c: Fix indentation and brace style.
1871         
1872 2005-06-14  Ross Burton <ross@openedhand.com>.
1873
1874         * glib/dbus-glib.h: Make DBusGMethodInvocation
1875         a private structure.  Rearrange prototypes a bit.
1876         
1877         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
1878         documentation for first_arg_type.
1879         
1880         * glib/dbus-gobject.c: Move DBusGMethodInvocation
1881         here, add documentation.  Move dbus_g_method_return
1882         and dbus_g_method_return_error into public API
1883         section.
1884
1885 2005-06-14  Colin Walters  <walters@verbum.org>
1886
1887         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
1888         Add missing return statements, noticed by Ross Burton.
1889         
1890 2005-06-13  Ross Burton <ross@openedhand.com>.
1891
1892         * glib/dbus-gobject.c: Handle errors on message
1893         demarshalling by sending error message back.
1894         * glib/dbus-gvalue.c: Initialize return variables.
1895
1896 2005-06-13  Colin Walters  <walters@verbum.org>
1897
1898         * glib/Makefile.am: Fix thinko in last patch.
1899
1900 2005-06-13  Colin Walters  <walters@verbum.org>
1901
1902         * glib/Makefile.am: Move dbus-gtype-specialized.c
1903         and dbus-gtype-specialized.h into a _HEADERS variable,
1904         install them.
1905
1906 2005-06-12  Colin Walters  <walters@verbum.org>
1907
1908         Async signals and various bugfixes and testing by
1909         Ross Burton <ross@openedhand.com>.
1910
1911         * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
1912         (dbus_gvalue_genmarshal_name_from_type)
1913         (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
1914         (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
1915         (dbus_g_value_types_init, dbus_gtype_from_signature)
1916         (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
1917         (dbus_gtypes_from_arg_signature): New function prototypes.
1918         (dbus_gvalue_demarshal): Take context and error arguments.
1919         (dbus_gvalue_demarshal_variant): New function.
1920         (dbus_gvalue_demarshal_message): New function.
1921         (dbus_gvalue_store): Delete.
1922
1923         * glib/dbus-gvalue.c:
1924
1925         File has been almost entirely rewritten; now we special-case
1926         more types such as DBUS_TYPE_SIGNATURE, handle arrays and
1927         hash tables correctly, etc.  Full support for recursive values
1928         is not yet complete.
1929
1930         * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
1931         argument of signal to G_TYPE_POINTER since we now pass a
1932         structure.
1933         (lookup_g_marshaller): Delete in favor of
1934         _dbus_gobject_lookup_marshaller.
1935         (marshal_dbus_message_to_g_marshaller): Use
1936         _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
1937         to handle remote signal callbacks.
1938         (dbus_g_proxy_new_from_proxy): New function; creates a new
1939         DBusGProxy by copying an existing one.
1940         (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
1941         (dbus_g_proxy_get_path): New functions.
1942         (dbus_g_proxy_marshal_args_to_message): New function;
1943         factored out of existing code.
1944         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
1945         from a varargs array.
1946         (dbus_g_proxy_begin_call_internal): New function.
1947         (dbus_g_proxy_end_call_internal): New function.
1948         (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
1949         as arguments; simply invoke dbus_g_proxy_begin_call_internal
1950         after collecting args into value array.
1951         (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
1952         invoke dbus_g_proxy_end_call_internal.
1953         (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
1954         end_call_internal.
1955         (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
1956         types.
1957         (array_free_all): New function.
1958         (dbus_g_proxy_add_signal): Take GTypes.
1959
1960         * glib/dbus-gobject.h:
1961         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
1962         (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
1963         Prototype.
1964
1965         * glib/dbus-gobject.c: Add a global marshal_table hash which
1966         stores mappings from type signatures to marshallers.  Change lots
1967         of invocations of dbus_gtype_to_dbus_type to
1968         dbus_gtype_to_signature.
1969         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
1970         (introspect_signals): Fix test for query.return_type.
1971         (set_object_property): Update invocation of dbus_gvalue_demarshal.
1972         (invoke_object_method): Many changes.  Handle asynchronous
1973         invocations.  Convert arguments with
1974         dbus_gvalue_demarshal_message.  Handle errors.  Use
1975         DBusSignatureIter instead of strlen on args. Handle all arguments
1976         generically.  Special-case variants.
1977         (dbus_g_method_return, dbus_g_method_return_error): New function.
1978         (DBusGSignalClosure): New structure, closes over signal
1979         information.
1980         (dbus_g_signal_closure_new): New function.
1981         (dbus_g_signal_closure_finalize): New function.
1982         (signal_emitter_marshaller): New function; is special marshaller
1983         which emits signals on bus.
1984         (export_signals): New function; introspects object signals and
1985         connects to them.
1986         (dbus_g_object_type_install_info): Take GType instead of
1987         GObjectClass.
1988         (dbus_g_connection_register_g_object): Invoke export_signals.
1989         (dbus_g_connection_lookup_g_object): New function.
1990         (DBusGFuncSignature) New structure; used for mapping type
1991         signatures to marshallers.
1992         (funcsig_hash): New function; hashes DBusGFuncSignature.
1993         (funcsig_equal): New function; compares DBusGFuncSignature.
1994         (_dbus_gobject_lookup_marshaller): New function.
1995         (dbus_g_object_register_marshaller): New function; used to
1996         register a marshaller at runtime for a particular signature.
1997
1998         * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
1999
2000         * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
2001         which notes a server method implementation should be
2002         asynchronous.
2003
2004         * glib/dbus-binding-tool-glib.c
2005         (dbus_binding_tool_output_glib_server): Call
2006         dbus_g_value_types_init.
2007         (write_formal_parameters): Use dbus_gtype_from_signature.  Handle
2008         variants specially.
2009         (dbus_g_type_get_lookup_function): Turn GType into an invocation
2010         of a lookup function.
2011         (write_args_for_direction): Use dbus_g_type_get_lookup_function.
2012         (write_untyped_out_args): New method; write output arguments.
2013         (write_formal_declarations_for_direction): Function for
2014         writing prototypes.
2015         (write_formal_parameters_for_direction): Function for
2016         writing implementations.
2017         (write_typed_args_for_direction): Function for writing
2018         arguments prefixed with GTypes.
2019         (write_async_method_client): Write out async version
2020         of method.
2021
2022         * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
2023         (dbus_g_type_get_marshal_name): Move mapping from GType
2024         to marshal name into here.
2025         (dbus_g_type_get_c_name): Move into here.
2026         (compute_marshaller): Convert signature to type with
2027         dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
2028         (compute_marshaller_name): Ditto.
2029         (compute_marshaller): Handle async signal annotations.
2030         (gather_marshallers): Return if we don't have a known
2031         prefix.
2032         (generate_glue): Collect introspection blob here, and
2033         write all of the blob at the end.  This allows an object
2034         with multiple interfaces to work.
2035         Mark async methods in introspection blob.
2036
2037         * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
2038         dbus-gtype-specialized.c, dbus-gtype-specialized.h,
2039         dbus-gvalue-utils.h, dbus-gvalue-utils.c.
2040
2041         * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
2042         avoids people accidentally using DBUS_TYPE_* which should
2043         not be necessary anymore.
2044         Do include dbus-gtype-specialized.h, which are utilities
2045         for GLib container types.
2046         Add various #defines for types such as
2047         DBUS_TYPE_G_BOOLEAN_ARRAY.
2048         (DBusGValueIterator, DBusGValue): Define, not fully used
2049         yet.
2050         (dbus_g_value_get_g_type): Type for recursive value.
2051         (dbus_g_value_open, dbus_g_value_iterator_get_value)
2052         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
2053         (dbus_g_value_free): Prototypes.
2054         (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
2055         (dbus_g_proxy_set_interface): Prototype.
2056         (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
2057         (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
2058         types.
2059         (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
2060         Accessors.
2061         (DBusGAsyncData, DBusGMethodInvocation): Structures for
2062         doing async invocations.
2063         (dbus_g_method_return, dbus_g_method_return_error):
2064         Prototypes.
2065         * doc/dbus-tutorial.xml: Update GLib section.
2066         
2067         * tools/dbus-viewer.c (load_child_nodes): Update
2068         for new invocation type of dbus_g_proxy_end_call.
2069         (load_from_service_thread_func): Ditto.
2070
2071         * tools/print-introspect.c (main): Ditto.
2072
2073         * tools/dbus-names-model.c (have_names_notify)
2074         (names_model_reload, names_model_set_connection)
2075         Use GTypes.
2076
2077         * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
2078         needed since Python bindings use GLib bindings.
2079
2080         * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
2081         Add --prefix argument.
2082
2083         * tools/Makefile.am: Define DBUS_COMPILATION.  Remove
2084         unneeded --ignore-unsupported arg.
2085         
2086         * test/glib/test-service-glib.c: 
2087         * test/glib/test-service-glib.xml:
2088         * test/glib/test-dbus-glib.c: Add many more tests.
2089
2090 2005-06-06  David Zeuthen  <davidz@redhat.com>
2091
2092         * doc/TODO: Add item about need to remove deprecated functions.
2093
2094         * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
2095
2096         * dbus/dbus-connection.c (dbus_connection_disconnect): New function
2097         to repair the ABI which was broken with the last commit.
2098
2099 2005-06-02  John (J5) Palmieri <johnp@redhat.com>
2100
2101         *  dbus/dbus-connection.c, dbus/dbus-connection.h 
2102         (dbus_connection_disconnect): renamed to dbus_connection_close 
2103         for API symmetry with dbus_connection_open
2104         (_dbus_connection_open_internal): 
2105         s/dbus_connection_disconnect/dbus_connection_close
2106
2107         * dbus/dbus-bus.c (dbus_bus_get):
2108         s/dbus_connection_disconnect/dbus_connection_close
2109
2110         * bus/connection.c (bus_connections_unref, 
2111         bus_connections_setup_connection, bus_connections_expire_incomplete):
2112         s/dbus_connection_disconnect/dbus_connection_close
2113
2114         * bus/dispatch.c (bus_dispatch, kill_client_connection, 
2115         kill_client_connection_unchecked, check_hello_connection):
2116         s/dbus_connection_disconnect/dbus_connection_close
2117
2118         * bus/bus.c (new_connection_callback):
2119         s/dbus_connection_disconnect/dbus_connection_close
2120
2121         * tools/dbus-send.c (main):
2122         s/dbus_connection_disconnect/dbus_connection_close
2123
2124         * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
2125         s/dbus_connection_disconnect/dbus_connection_close
2126         
2127         * test/test-service.c (path_message_func, filter_func):
2128         s/dbus_connection_disconnect/dbus_connection_close
2129         
2130         * doc/TODO: remove connection_open/connection_disconnect lacks symmetry         item that was just fixed
2131         
2132 2005-05-25  Colin Walters  <walters@verbum.org>
2133
2134         * dbus/dbus-protocol.h: Move various bus service #defines such
2135           as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
2136           dbus/dbus-shared.h.
2137         * dbus/dbus-shared.h: Various defines moved here.
2138         * dbus/dbus-marshal-header.c: Include dbus-shared.h.
2139
2140 2005-05-25  John (J5) Palmieri  <johnp@redhat.com>
2141
2142         * python/__init__.py: Python bindings deserve a minor version
2143         update.  Upped to (0, 40, 2)
2144
2145 2005-05-24  John (J5) Palmieri  <johnp@redhat.com>
2146
2147         * python/decorators.py: add explicitly_pass_message decorator
2148         for passing in the dbus message as keyword for edge case signal
2149         handling
2150
2151         * python/matchrules.py (SignalMatchRule.__repr__): fix output
2152         to conform with what dbus expects for match rules
2153         (SignalMatchRule.execute): add the dbus message as a keyword
2154         if the signal handler has requested it
2155
2156         * python/examples/example/signal-recipient.py: added some more
2157         examples on how to hook up to signals
2158
2159 2005-05-23  John (J5) Palmieri  <johnp@redhat.com>
2160
2161         * python/decorators.py: import dbus_bindings
2162
2163         * python/matchrules.py (SignalMatchRule, SignalMatchTree, 
2164         SignalMatchNode): new classes that implement wildcard signal
2165         callback matching using a tree lookup. Heavily modified from a
2166         patch sent by Celso Pinto (fd.o bug #3241)
2167
2168         * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
2169         use new match classes to handle signals.
2170
2171 2005-05-19  John (J5) Palmieri  <johnp@redhat.com>
2172         
2173         * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
2174
2175 2005-05-18  Havoc Pennington  <hp@redhat.com>
2176
2177         * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
2178         gettext. Not really worth requiring yet perhaps, but any
2179         production quality 1.0 would require it so we should go ahead and
2180         get things set up. We do have a couple token calls to
2181         bindtextdomain in the code already.
2182
2183 2005-05-16  John (J5) Palmieri  <johnp@redhat.com>
2184
2185         * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
2186         when using recursive g_main_loops
2187
2188         * python/_dbus.py (class Bus): add the ProxyObjectClass
2189         alias for ProxyObject to make it easier for the Twisted 
2190         networking framework to integrate dbus.
2191
2192         * python/proxies.py (class ProxyObject): add the ProxyMethodClass
2193         alias for ProxyMethod to make it easier for the Twisted 
2194         networking framework to integrate dbus. 
2195
2196 2005-05-11  Ross Burton  <ross@openedhand.com>
2197
2198         * glib/dbus-glib-tool.c: Add --prefix argument.
2199         * glib/dbus-binding-tool-glib.h: Add prefix argument.
2200         * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
2201         Add prefix argument.
2202         (generate_glue): Pass prefix argument down.
2203         (dbus_binding_tool_output_glib_server): Pass prefix to
2204         glib-genmarshal.
2205         
2206 2005-05-11  Colin Walters  <walters@verbum.org>
2207
2208         * tools/dbus-send.c (append_array): New function.
2209         (append_arg): Broken out from main.
2210         (main): Add cheesy hack to send arrays and variants.
2211         (usage): Update.
2212         * tools/dbus-print-message.c (print_iter): Broken out
2213         from main.
2214
2215 2005-05-11  Colin Walters  <walters@verbum.org>
2216
2217         * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
2218         New function, returns signature string for signature iter.
2219         * dbus/dbus-signature.h: Prototype it.
2220         * dbus/dbus-message.c (dbus_message_iter_get_signature):
2221         New function, returns signature string for message iter.
2222         (dbus_message_iter_get_array_len): New function, returns
2223         length of array.
2224         (dbus_message_iter_get_fixed_array): Fix assertion; this
2225         function should be used when the iter is pointing to the
2226         contents of an array
2227         * dbus/dbus-message.h: Prototypes.
2228         * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
2229         New function; returns length of an array.
2230         * dbus/dbus-marshal-recursive.h: Prototype it.
2231         
2232 2005-05-11  Colin Walters  <walters@verbum.org>
2233
2234         * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
2235         compilation error.
2236         
2237 2005-05-08  Havoc Pennington  <hp@redhat.com>
2238
2239         * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
2240         daemon's pid, not the parent's pid, to the file descriptor.
2241         Reported by Taj Morton.
2242
2243 2005-05-05  Havoc Pennington  <hp@redhat.com>
2244
2245         * configure.in (LT_*): add notes on how the libtool versioning
2246         works to save thinking. Increment soname to indicate protocol
2247         breakage (though really the library interface hasn't changed I
2248         guess)
2249
2250         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
2251         verify the GUID received from server matches what we were
2252         expecting, if we had an expectation
2253
2254         * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
2255         (_dbus_auth_get_guid_from_server): new function
2256         (send_begin): parse the OK args
2257
2258         * doc/dbus-specification.xml: add GUID to the auth protocol
2259
2260 2005-05-05  John (J5) Palmieri  <johnp@redhat.com>
2261
2262         * Fix my name in previous changelog ;)
2263
2264         * python/proxies.py (ProxyObject.__getattr__): add further patch
2265         from Anthony Baxter to throw an AttributeError when python 
2266         __special__ functions are called instead of marshling them over 
2267         the bus (Bug#1685 comment 3).
2268
2269 2005-05-04  John (J5) Palmieri  <johnp@redhat.com>
2270
2271         * python/Makefile.am: changed to use pyexecdir for the binding
2272         shared libraries (Bug#2494)
2273
2274         * python/exceptions.py: bring exceptions over from the bindings
2275         so they can be used in applications (Bug#2036)
2276         Make all exceptions derive from DBusException
2277
2278         * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
2279         of classes so that print obj doesn't throw an exception (Bug #1685)
2280
2281 2005-05-03  Ross Burton  <ross@openedhand.com>
2282
2283         * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
2284         Return if we get an error during registration.  Set up a
2285         weak reference on object to unregister if object is destroyed.
2286         (unregister_gobject): New function.
2287         
2288 2005-05-01  John (J5) Palmieri  <johnp@redhat.com>
2289
2290         * python/dbus_bindings.pyx.in: 
2291         - added new type classes for hinting to the marashaler what type 
2292         to send over the wire
2293         - added int16 and uint16 marshalers
2294         - Fixed a bug in the type constants that caused int32 to go out
2295         as uint16 over the wire
2296         * python/dbus.py: split up into different files and renamed _dbus.py
2297         * python/__init__.py, python/_util.py, python/decorators.py, 
2298         python/exceptions.py, python/proxies.py, python/services.py,
2299         python/types.py: new files split off from dbus.py
2300         * python/Makefile.am: Add new files, remove dbus.py and 
2301         install all python files to <python module dir>/dbus
2302         * python/examples/*: Added #!/usr/bin/env python to the top of
2303         every example.  Patch provided by Tatavarty Kalyan
2304
2305 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2306
2307         * NEWS: Update to 0.33
2308
2309 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
2310
2311         * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
2312         method for doing async calls
2313         (_pending_call_notification): New C function for handling pendning call
2314         callbacks
2315         (set_notify): New method for setting pending call notification
2316         
2317         * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
2318         Async capabilities added to remote method calls
2319         (Sender): class removed
2320         (RemoteService): class removed
2321         (ObjectTree): class removed for now
2322         (RemoteObject): Renamed to ProxyObject
2323         (RemoteMethod): Renamed to ProxyMethod
2324         (method): Decorator added for decorating python methods as dbus methods
2325         (signal): Decorator added for decorating python methods as signal emitters
2326         (ObjectType): Metaclass added for generating introspection data and the
2327         method callback vtable
2328         (Interface): Wrapper class added to wrap objects in a dbus interface
2329         (Object): Uses ObjectType as its metaclass and exports Introspect
2330         of the org.freedesktop.DBus.Introspectable interface
2331         (ValidationException, UnknownMethodException): new exceptions
2332
2333         * python/examples/*: Modified to fit with the new bindings
2334
2335 2005-04-23  Havoc Pennington  <hp@redhat.com>
2336
2337         * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
2338         reported by Tony Houghton
2339
2340         * test/test-service.c (main): test
2341         dbus_connection_get_object_path_data()
2342
2343         * dbus/dbus-object-tree.c (find_handler): be sure we always init
2344         the exact_match
2345         (_dbus_object_tree_get_user_data_unlocked): new function used by
2346         dbus_connection_get_object_path_data()
2347         (do_register): add assertion test for get_user_data_unlocked
2348         (object_tree_test_iteration): more tests
2349
2350         * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
2351         new function from Dan Reed to let you get the user data from 
2352         dbus_connection_register_object_path()
2353
2354 2005-04-23  John (J5) Palmieri  <johnp@redhat.com>
2355
2356         * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
2357         in numerous places that did not account for the NULL terminator
2358         (signature_from_seed): changed the manual string copy loop to 
2359         just use strcpy instead
2360         make check should now pass
2361
2362 2005-04-19  John (J5) Palmieri  <johnp@redhat.com>
2363
2364         * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
2365         so that it allows messages that are not signals to pass in 
2366         NULL as the interface.
2367
2368 2005-04-18  David Zeuthen  <davidz@redhat.com>
2369
2370         * glib/dbus-gmain.c (io_handler_destroy_source): 
2371         (timeout_handler_destroy_source, connection_setup_free): 
2372         Also unref the source to avoid memory leaks.
2373
2374 2005-04-13  David Zeuthen  <davidz@redhat.com>
2375
2376         * bus/config-parser.c (bus_config_parser_new): Bump this to a
2377         more reasonable, yet still totally arbitrary, value :-). 
2378
2379 2005-04-13  David Zeuthen  <davidz@redhat.com>
2380
2381         * doc/TODO: Added an "important for 1.0" item about selinux
2382         allow/deny messages
2383
2384 2005-04-13  David Zeuthen  <davidz@redhat.com>
2385
2386         * bus/selinux.c: Add c-file-style to top of file
2387         (log_audit_callback): Don't free the data here anymore
2388         (bus_selinux_check): Don't take spid and tpid since appending
2389         that to auxdata may OOM.
2390         (bus_selinux_allows_acquire_service): Handle OOM and signal back
2391         to the caller if we are OOM by taking an error object.
2392         (bus_selinux_allows_send): -do-
2393
2394         * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
2395         and bus_selinux_allows_send
2396
2397         * bus/bus.c (bus_context_check_security_policy): Pass error and
2398         pass on OOM thrown by bus_selinux_allows_send()
2399
2400         * bus/services.c (bus_registry_acquire_service): Pass error and
2401         pass on OOM thrown by bus_selinux_allows_acquire_service()
2402
2403 2005-04-13  Havoc Pennington  <hp@redhat.com>
2404
2405         * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
2406         message at a time to avoid monopolizing the main loop, bug 
2407         #2953 from Benjamin Otte
2408
2409 2005-04-09  Havoc Pennington  <hp@redhat.com>
2410
2411         * dbus/dbus-string.c (copy): change a memcpy to memmove due to
2412         possible overlap, fix from Daniel Reed
2413         (fixup_alignment): fix signedness warnings
2414         (_dbus_string_append_unichar): ditto
2415
2416 2005-04-09  Havoc Pennington  <hp@redhat.com>
2417
2418         * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
2419
2420         * glib/dbus-glib-tool.c (main): fix warning
2421
2422         * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
2423
2424         * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
2425         add a new function that can be used in simple applications that
2426         don't have a main loop and are willing to block
2427
2428 2005-04-05  David Zeuthen  <davidz@redhat.com>
2429
2430         Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
2431
2432         * glib/dbus-gmain.c:
2433         (io_handler_destroy_source): Remove from list of IO handlers
2434         of the ConnectionSetup object
2435         (timeout_handler_destroy_source): -do- for timeout handlers
2436         (io_handler_source_finalized): Don't remove from list since
2437         we now do that in io_handler_destroy_source(). Renamed from
2438         io_handler_source_destroyed
2439         (timeout_handler_source_destroyed): -do- for timeout handlers
2440         (connection_setup_free): It is now safe to iterate over all
2441         IO and timeout handlers as the _destroy_source removes them
2442         from the list synchronously
2443
2444 2005-03-30  Havoc Pennington  <hp@redhat.com>
2445
2446         * configure.in: change check to gtk 2.4
2447
2448         * tools/dbus-viewer.c (name_combo_changed_callback): remove
2449         gtk_combo_box_get_active_text() usage to decrement GTK requirement
2450         to 2.4
2451
2452 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2453
2454         * News: Update 0.32
2455
2456         * HACKING: Fixed realease instructions.  configure.in should be updated to
2457           the next release by the person who made the last release.
2458
2459 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
2460
2461         * python/lvalue_cast_post_process.py - removed.  Patch has been
2462           submitted to Pyrex maintainers that fixes gcc4.0 errors
2463
2464         * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
2465
2466 2005-03-24  Daniel Reed  <n@ml.org>
2467
2468         * tools/Makefile.am: Make print-introspect and
2469         dbus-bus-introspect.xml building conditional on HAVE_GLIB.
2470
2471 2005-03-22  John (J5) Palmieri  <johnp@redhat.com>
2472
2473         * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
2474
2475         * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have 
2476           had in Red Hat packages for a while but for some reason never 
2477           got merged upstream
2478           (_dbus_is_a_number): New checks if a string
2479           can be converted to a number and does the conversion if it can
2480           (_dbus_user_database_lookup): Add check to see if the given username
2481           is a udi.  This allows udi's to be used instead of usernames in the
2482           config file.
2483           (_dbus_user_database_lookup_group): Add check to see if the given groupname
2484           is a gdi.  This allows gdi's to be used instead of groupnames in the
2485           config file.
2486
2487 2005-03-21  John (J5) Palmieri  <johnp@redhat.com>
2488
2489         * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
2490           code so that it compiles with gcc4.0
2491
2492         * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
2493           run dbus_bindings.c through lvalue_cast_post_process.py and copy the
2494           results back to dbus_binding.c
2495
2496 2005-03-20  Colin Walters  <walters@verbum.org>
2497
2498         Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
2499
2500         * configure.in: Require GTK+ 2.6.
2501         
2502 2005-03-20  Colin Walters  <walters@verbum.org>
2503
2504         * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
2505
2506 2005-03-17  Tom Parker  <palfrey@tevp.net>
2507
2508         * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
2509         print DBUS_UID_UNSET; instead print passed username.  Also
2510         be sure to actually use gid looked up in cache.
2511         
2512         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
2513         for DBUS_GID_UNSET and groupname.
2514
2515 2005-03-17  Colin Walters  <walters@verbum.org>
2516
2517         * bus/print-introspect.c: Move to tools/.
2518         * bus/run-with-tmp-session-bus.sh: Ditto.
2519         
2520         * glib/Makefile.am (dbus-glib-bindings.h): Move
2521         generation to tools/Makefile.am.
2522
2523         * test/glib/run-test.sh: Update to handle move
2524         of run-with-tmp-session-bus.sh.
2525
2526         * test/glib/test-service-glib.c: Update to handle
2527         move of dbus-glib-bindings.h.
2528
2529         * tools/print-introspect.c: Moved here
2530         from bus/, and ported to GLib bindings.
2531
2532         * tools/run-with-tmp-session-bus.sh: Moved here
2533         from bus/.
2534
2535         * tools/Makefile.am: Generate dbus-glib-bindings.h
2536         and dbus-bus-introspect.xml here.
2537
2538         * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
2539         Update.
2540
2541 2005-03-17  Colin Walters  <walters@verbum.org>
2542
2543         * bus/driver.c (write_args_for_direction): Use
2544         _dbus_string_get_const_data to retrieve string;
2545         _dbus_string_get_const_data_len doesn't actually return
2546         a NULL-terminated substring.
2547
2548         * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
2549         (main): Change to use org_freedesktop_DBus_request_name
2550         instead of using g_proxy_begin_call/end_call.
2551
2552 2005-03-15  Joe Shaw  <joeshaw@novell.com>
2553
2554         * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
2555         generating the finalizer.  Fixes from Ben Maurer.
2556
2557 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2558
2559         * mono/BusDriver.cs: Update method names: ListServices
2560         becomes ListNames; GetOwner becomes GetNameOwner.
2561
2562         * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
2563         onto the eval stack when removing the delegate.
2564
2565 2005-03-12  Joe Shaw  <joeshaw@novell.com>
2566
2567         * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
2568         LT_CURRENT.  Set it to the autoconf variable.
2569                                                                                 
2570         * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
2571         classes that disconnects the signal handler delegate from the
2572         service object.  Fixes a big leak of proxy objects on the
2573         client side of things.  Patch from Ben Maurer
2574         <bmaurer@ximian.com>
2575
2576 2005-03-12  Colin Walters  <walters@verbum.org>
2577
2578         * bus/driver.c (write_args_for_direction): New function,
2579         parses a type signature into arguments and outputs to
2580         XML.
2581         (bus_driver_handle_introspect): Use it instead of
2582         hardcoding XML for certain signatures.
2583         
2584         * bus/Makefile.am (dbus-bus-introspect.xml): Add
2585         dependency on dbus-daemon.
2586
2587         * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
2588         argument, pass it to dbus_binding_tool_output_glib_client.
2589
2590         * glib/dbus-binding-tool-glib.c
2591         (generate_client_glue): Protect against multiple inclusion.
2592         (dbus_binding_tool_output_glib_client): Add
2593         G_BEGIN_DECLS/G_END_DECLS.
2594
2595         * glib/dbus-binding-tool-glib.c (compute_client_method_name):
2596         Change to just take iface prefix directly.
2597         (write_formal_parameters): Clarify error message.
2598         (check_supported_parameters): New function; checks to see type
2599         signatures of method parameters are supported.
2600         (generate_client_glue): Handle ignore_unsupported flag.
2601         (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
2602         parameter.
2603
2604         * glib/Makefile.am (dbus-glib-bindings.h): Pass
2605         --ignore-unsupported by default until glib bindings
2606         support arrays.
2607
2608 2005-03-11  Colin Walters  <walters@verbum.org>
2609
2610         * glib/Makefile.am: Generate dbus-glib-bindings.h and
2611         install it.
2612
2613         * bus/print-introspect.c: New file; prints introspection
2614         data for a given name and object path.
2615
2616         * bus/run-with-tmp-session-bus.sh: New file, refactored
2617         from test/glib/run-test.sh.  Creates a temporary session
2618         bus and runs another program.
2619
2620         * test/glib/run-test.sh: Refactor to invoke
2621         run-with-tmp-session-bus.sh.
2622
2623         * bus/driver.c (bus_driver_handle_introspect): Fix to print new
2624         introspection format.  Also change to use DBUS_TYPE_x_AS_STRING
2625         macros instead of hardcoding.
2626
2627         * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
2628
2629 2005-03-11  Joe Shaw  <joeshaw@novell.com>
2630
2631         * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
2632         this unref; it doesn't match up evenly in some codepaths.
2633         (_dbus_connection_block_pending_call): Unref at every exitpoint;
2634         this evenly matches with the ref near the top of this function.
2635
2636 2005-03-09  Joe Shaw  <joeshaw@novell.com>
2637
2638         * dbus/dbus-object-tree.c
2639         (_dbus_object_tree_unregister_and_unlock): If checks are enabled
2640         and we try to unregister a path that's not registered, still go
2641         through the process of unlocking and don't just return.
2642
2643 2005-03-09  Colin Walters  <walters@verbum.org>
2644
2645         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
2646         to this are generated for client-side wrappers.  Invokes a
2647         D-BUS method and returns reply values.  
2648
2649         * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
2650         function; writes signature string for argument direction.
2651         (write_args_for_direction): Change to pass input values directly
2652         instead of via address, and fix indentation.
2653         (generate_client_glue): Change to invoke dbus_g_proxy_invoke.  Also
2654         make generated wrappers inlineable.
2655
2656         * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
2657         note about using dbus_type_is_fixed.
2658
2659         * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
2660         dbus/dbus-signature.c as dbus_type_is_fixed.
2661
2662         All callers updated.
2663
2664         * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
2665         from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
2666
2667         * dbus/dbus-signature.h: Prototype.
2668
2669         * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
2670         error printf code.
2671
2672         * test/glib/test-dbus-glib.c (main): Be sure to clear error as
2673         appropriate instead of just freeing it.
2674         (main): Free returned strings using g_free.
2675
2676         * test/glib/Makefile.am (test-service-glib-glue.h)
2677         (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
2678
2679         * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
2680         simply maps a simple D-BUS type to GType.
2681         (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
2682         GType.
2683         (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
2684         initialize the value with it.
2685         (dbus_gvalue_binding_type_from_type): Unused, delete.
2686         (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
2687         various types instead of unmarshalling to value data directly.
2688         Remove can_convert boolean.
2689         (dbus_gvalue_marshal): Remove duplicate initialization; switch to
2690         returning directly instead of using can_convert boolean.
2691         (dbus_gvalue_store): New function; not related to D-BUS per-se.
2692         Stores a GValue in a pointer to a value of its corresponding C
2693         type.
2694
2695         * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
2696         add dbus_gvalue_store.
2697
2698 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2699
2700         Fix a bunch of lifecycle and memory management problems
2701         in the mono bindings.
2702
2703         * mono/Arguments.cs (Arguments): Implement IDisposable
2704
2705         * mono/Bus.cs (Bus): Don't allow public instantiation.  This is
2706         strictly a static class.
2707
2708         * mono/Connection.cs: Move the DBusObjectPathVTable and associated
2709         delegates into this file.
2710         (Connection): Implement IDisposable.
2711         (Dispose): Disconnect the connection and set the raw connection
2712         pointer to IntPtr.Zero.
2713         (~Connection): Call Dispose().
2714         (RegisterObjectPath): Added.  Manages the registration of object
2715         paths so we can cleanly disconnect them at dispose/finalize time.
2716         (UnregisterObjectPath): Ditto.
2717         (set_RawConnection): Unregister all of the object paths when
2718         changing the underlying DBusConnection.  Add them back onto the
2719         new connection, if any.
2720
2721         * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
2722         more unmanaged resources anymore, so it's not necessary.  Move all
2723         the DBusObjectPathVTable stuff out of here.
2724         (Handler): Save references to our delegates so that they don't get
2725         finalized.  Call Connection.RegisterObjectPath() instead of
2726         dbus_connection_register_object_path() directly.
2727         (Message_Called): Dispose the message after we're finished with
2728         it.
2729
2730         * mono/Message.cs (Message): Implement IDisposable.
2731         (Dispose): Dispose the Arguments, and set the RawMessage to
2732         IntPtr.Zero.
2733         (SendWithReplyAndBlock): We own the ref to the reply that comes
2734         back from dbus_connection_send_with_reply_and_block() so add a
2735         comment about that and unref it after we've constructed a managed
2736         MethodReturn class around it.  Fixes a big, big leak.
2737
2738         * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
2739         method.
2740         (BuildSignalHandler): After we've sent the Signal message, dispose
2741         of it.
2742         (BuildMethod): Dispose of the method call and reply messages after
2743         we've sent the message and extracted the data we want from the
2744         reply.
2745
2746         * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
2747         anymore.
2748         (Service_FilterCalled): Dispose of the message after we're
2749         finished with it.
2750
2751 2005-03-08  Joe Shaw  <joeshaw@novell.com>
2752
2753         * dbus/dbus-connection.c (dbus_connection_send_with_reply):
2754         After we attach our pending call to the connection, unref
2755         it.  Fixes a leak.
2756  
2757         * mono/Connection.cs (set_RawConnection): Disconnect our
2758         filter and match callbacks from the old connection and
2759         reconnect them to the new connection, if any.
2760
2761         * mono/DBusType/Array.cs: "Code" is a static member, so
2762         don't use "this" to refer to it.  Fix for stricter checking
2763         in Mono 1.1.4.
2764  
2765         * mono/DBusType/ObjectPath.cs (Append): Don't leak the
2766         object path that we pass into unmanaged code.
2767  
2768         * mono/DBusType/String.cs (Append): Don't leak the string
2769         that we pass into unmanged code.
2770
2771 2005-03-07  John (J5) Palmieri  <johnp@redhat.com>
2772         * NEWS: Update for 0.31
2773
2774         * configure.in: Release 0.31
2775         add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
2776
2777         * qt/Makefile.am: fixed build
2778
2779         * dbus/Makefile.am: soname bump for libdbus
2780
2781         * glib/Makefile.am: soname bump for libdbus-glib
2782
2783 2005-03-05  Havoc Pennington  <hp@redhat.com>
2784
2785         * dbus/dbus-sysdeps.c:
2786         (pseudorandom_generate_random_bytes_buffer): fix to have no return
2787         value
2788         (_dbus_generate_random_bytes_buffer): fix return value
2789
2790         * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
2791         checks actually work, from Tom Parker <fdo@tevp.net>
2792
2793 2005-03-01  Colin Walters  <walters@verbum.org>
2794
2795         * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
2796         functions copied from dbus-glib-tool.c.
2797         (main): Convert lots of error code to use them.
2798         Also add some testing for introspection bits.
2799
2800 2005-03-01  Colin Walters  <walters@verbum.org>
2801         
2802         * doc/TODO: Remove introspection signature TODO.
2803
2804 2005-02-27  Colin Walters  <walters@verbum.org>
2805
2806         * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
2807         Change return value to const char * instead of int so we can do
2808         full signatures.
2809         (struct PropertyInfo, struct ArgInfo): Store char *.
2810         (property_info_new, arg_info_new): Update parameters, strdup.
2811         (property_info_unref, arg_info_unref): Free.
2812
2813         * glib/dbus-gidl.h: Update prototypes.
2814
2815         * glib/dbus-gparser.c (basic_type_from_string): Delete.
2816         (validate_signature): New function, just validates signature and
2817         sets GError.
2818         (parse_property, parse_arg): Invoke validate_signature.  Store
2819         signature instead of just type code.
2820
2821         * glib/dbus-gvalue.c (base_type_from_signature): New utility
2822         function to return a primary type for a signature, dropping
2823         information about types in container types.
2824         (dbus_gvalue_genmarshal_name_from_type)
2825         (dbus_gvalue_binding_type_from_type)
2826         (dbus_gvalue_ctype_from_type): Update to take full signature
2827          instead of type code.
2828         (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
2829
2830         * glib/dbus-gvalue.h: Update prototypes for above.
2831
2832         * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
2833         glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
2834         (introspect_properties, introspect_signals, write_interface):
2835         Update to handle signatures, and remove usage of
2836         _dbus_gutils_type_to_string.
2837         (handle_introspect): Print out type codes instead of e.g. "string"
2838         in hardcoded introspection XML; also use x_AS_STRING constants
2839         instead of hardcoding in string.
2840
2841         * glib/dbus-glib-tool.c (pretty_print): Handle signature change
2842         to string.  Remove usage of _dbus_gutils_type_to_string.
2843
2844         * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
2845
2846         * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
2847         deletion.
2848         
2849         * glib/dbus-binding-tool-glib.c (compute_marshaller)
2850         (compute_marshaller_name, generate_glue): Handle signature change
2851         to string.
2852         (write_formal_parameters, write_args_for_direction): Ditto, and
2853         remove FIXME.
2854
2855         * tools/dbus-tree-view.c (type_to_string): Delete.
2856         (info_set_func_text): Update to print full signatures.
2857
2858         * test/glib/test-service-glib.xml: Change types to new
2859         introspection format.
2860
2861 2005-02-26  Havoc Pennington  <hp@redhat.com>
2862
2863         * doc/TODO: remove the "guid" item
2864
2865         * test/glib/test-profile.c (no_bus_thread_func): use open_private
2866         (with_bus_thread_func): use open_private
2867
2868         * dbus/dbus-connection.c (dbus_connection_open_private): new
2869         function that works like the old dbus_connection_open()
2870         (dbus_connection_open): now returns an existing connection if
2871         possible
2872
2873         * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
2874         through the GUID to the transport
2875
2876         * dbus/dbus-server.c (_dbus_server_init_base): keep around the
2877         GUID in hex-encoded form.
2878
2879         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2880         pass GUID argument in to the transport
2881
2882         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
2883         guid argument
2884
2885         * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
2886
2887         * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
2888
2889 2005-02-25  Havoc Pennington  <hp@redhat.com>
2890
2891         * doc/dbus-specification.xml: document the GUID thing
2892
2893         * dbus/dbus-server.c (_dbus_server_init_base): initialize a
2894         globally unique ID for the server, and put a "guid=hexencoded"
2895         field in the address
2896
2897         * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
2898
2899         * dbus/dbus-message.c: ditto
2900
2901         * dbus/dbus-dataslot.c: ditto
2902
2903         * dbus/dbus-list.c: ditto
2904
2905         * dbus/dbus-internals.h: wait, just include
2906         dbus-threads-internal.h here
2907         
2908         * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
2909         use in main library
2910
2911         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
2912
2913 2005-02-24  Colin Walters  <walters@verbum.org>
2914
2915         * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
2916
2917 2005-02-24  John (J5) Palmieir  <johnp@redhat.com>
2918
2919         * glib/Makefile.am: added dbus-gobject.h to sources list
2920         so distcheck doesn't fail
2921         
2922 2005-02-24  Havoc Pennington  <hp@redhat.com>
2923
2924         * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
2925         you must disconnect before unref, since locking and other things
2926         are screwed up otherwise. Fix assorted other locking stuff.
2927
2928         * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
2929         fix compilation
2930
2931         * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
2932         into a private header and don't export from the library
2933
2934         * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
2935
2936 2005-02-24  Colin Walters  <walters@verbum.org>
2937         
2938         * dbus/dbus-signature.c: New file; implements various functions
2939         related to type signatures.  Includes an interator for parsing,
2940         validation functions.
2941         (dbus_type_is_basic): Moved here from
2942         dbus-marshal-basic.c:_dbus_type_is_basic.
2943         (dbus_type_is_container): Moved here from
2944         dbus-marshal-basic.c:_dbus_type_is_container.
2945
2946         All callers of _dbus_type_is_container and _dbus_type_is_basic
2947         updated, and include dbus-signature.h.
2948
2949         * dbus/dbus-signature.h: New file; prototypes for the above.
2950
2951         * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
2952         dbus-signature.h.
2953
2954         * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
2955         function factored out of _dbus_first_type_in_signature.
2956         (_dbus_first_type_in_signature_c_str): New function; returns first
2957         type code for a type signature character.
2958
2959         * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
2960         handle function moves.
2961
2962         * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
2963
2964         * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
2965         function; skips to next complete type in type signature.
2966         Implemented using previous skip_one_complete_type.  Now
2967         skip_one_complete_type just delegates to
2968         _dbus_type_signature_next.
2969
2970         * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
2971         to dbus-signature.c
2972         (_dbus_type_is_container): Ditto.
2973
2974         * doc/dbus-specification.xml: Update introspection sample to
2975         use real type signatures.
2976
2977         * dbus/dbus-test.h: Prototype signature test.
2978
2979         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
2980         signature tests.
2981
2982         * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
2983
2984 2005-02-23  John (J5) Palmieri  <johnp@redhat.com>
2985
2986         * python/dbus_bindings.pyx.in (PendingCall::get_reply):
2987         s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
2988
2989 2005-02-21  Colin Walters  <walters@verbum.org>
2990
2991         * dbus/dbus-test-main.c (main): Take optional specific test
2992         argument.
2993
2994         * dbus/dbus-test.c (run_test): New function, runs a test function
2995         with no data directory.
2996         (run_data_test): Like above, but takes data directory.
2997         (dbus_internal_do_not_use_run_tests): Take
2998         specific test argument.  Replace lots of cut n' paste code
2999         with run_test and run_data_test.
3000
3001         * dbus/dbus-test.h: Update prototype for
3002         dbus_internal_do_not_use_run_tests.
3003
3004 2005-02-20  Havoc Pennington  <hp@redhat.com>
3005
3006         Fix bugs reported by Daniel P. Berrange
3007         
3008         * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
3009         (protected_change_watch): new function
3010         (_dbus_server_toggle_watch, _dbus_server_remove_watch)
3011         (_dbus_server_add_watch): change to work like the
3012         dbus-connection.c equivalents; like those, probably kind of
3013         busted, but should at least mostly work for now
3014         (dbus_server_disconnect): drop the lock if we were already
3015         disconnected, patch from Daniel P. Berrange
3016
3017         * dbus/dbus-server.c (_dbus_server_toggle_timeout) 
3018         (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
3019         same stuff
3020
3021         * doc/TODO: todo about unscrewing this mess
3022
3023 2005-02-19  Colin Walters  <walters@verbum.org>
3024
3025         * glib/dbus-binding-tool-glib.c
3026         (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
3027
3028         * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
3029         as errno.h and sys/stat.h.
3030         (lose): New function, prints error with
3031         newline and exits.
3032         (lose_gerror): Similar, but takes GError for message.
3033         (main): Add --output argument to specify output file to write to,
3034         instead of always printing to stdout.  In this mode, determine
3035         timestamps on source files to see whether any are newer than the
3036         target file.  If not, exit.  Also convert a number of error
3037         messages to use lose (since it's shorter), and switch to using
3038         g_io_channel_shutdown.
3039
3040 2005-02-19  Havoc Pennington  <hp@redhat.com>
3041
3042         * glib/dbus-gobject.c
3043         (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
3044
3045         * glib/dbus-glib.c: fix doxygen warnings
3046
3047         * glib/dbus-gparser.c (parse_annotation): error if an annotation
3048         is found on an <arg>
3049
3050 2005-02-17  Colin Walters  <walters@verbum.org>
3051
3052         * glib/dbus-gobject.h: Don't export
3053         _dbus_glib_marshal_dbus_message_to_gvalue_array.
3054         
3055         * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
3056         (invoke_object_method): Handle it.
3057
3058         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
3059         Handle rename.
3060         
3061 2005-02-17  Colin Walters  <walters@verbum.org>
3062
3063         * bus/.cvsignore, doc/.cvsignore
3064         * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
3065         Update.
3066
3067 2005-02-17  Colin Walters  <walters@verbum.org>
3068         
3069         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
3070         Rename to DBUS_SERVICE_DBUS.
3071         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
3072         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
3073         Change the value from "org.freedesktop.Local"
3074         to "org.freedesktop.DBus.Local".
3075         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
3076         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
3077         DBUS_INTERFACE_INTROSPECTABLE.
3078         Change the value from "org.freedesktop.Introspectable"
3079         to "org.freedesktop.DBus.Introspectable".
3080         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
3081         DBUS_INTERFACE_PROPERTIES.
3082         Change the value from "org.freedesktop.Properties"
3083         to "org.freedesktop.DBus.Properties".
3084         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
3085         DBUS_INTERFACE_PEER.
3086         Change the value from "org.freedesktop.Peer"
3087         to "org.freedesktop.DBus.Peer".
3088         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
3089         DBUS_INTERFACE_LOCAL.
3090         Change the value from "org.freedesktop.Local"
3091         to "org.freedesktop.DBus.Local".
3092
3093         All other users of those constants have been changed.
3094
3095         * bus/driver.c (bus_driver_handle_introspect): Use constants.
3096
3097         * glib/dbus-gobject.c (handle_introspect): Use constants.
3098
3099         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
3100
3101 2005-02-17  Colin Walters  <walters@verbum.org>
3102
3103         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
3104         (parse_node, parse_interface, parse_method, parse_signal)
3105         (parse_property, parse_annotation): Lose if we're currently in an
3106         annotation.
3107         (parse_annotation): New function.
3108         (parser_start_element, parser_end_element): Handle annotation.
3109         (parse_method, parse_interface): Remove support for c_name attribute,
3110         switch to annotations.
3111
3112         * glib/dbus-gidl.h (interface_info_get_binding_names)
3113         (method_info_get_binding_names)
3114         (interface_info_get_binding_name, method_info_get_binding_name)
3115         (interface_info_set_binding_name, method_info_set_binding_name):
3116         Remove.
3117         (interface_info_get_annotations, method_info_get_annotations)
3118         (interface_info_get_annotation, method_info_get_annotation)
3119         (interface_info_add_annotation, method_info_add_annotation):
3120         Prototype.
3121
3122         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
3123         for "bindings".
3124         (struct MethodInfo): Ditto.
3125         Straightfoward conversion of binding methods into annotation methods
3126         as prototyped.
3127
3128         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
3129
3130         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
3131
3132         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
3133         Use new annotation API.
3134
3135         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
3136         annotation element.
3137         
3138         * doc/dbus-specification.xml: Discuss introspection annotations,
3139         include list of well-known annotations.
3140
3141         * test/glib/test-service-glib.xml: Make validate against new DTD.
3142
3143 2005-02-17  Colin Walters  <walters@verbum.org>
3144
3145         This patch is based on initial work from
3146         Paul Kuliniewicz <kuliniew@purdue.edu>.
3147
3148         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
3149         initialization of GValue from dbus type to here.
3150         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
3151         for the "glib-genmarshal" program from a DBus type.
3152         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
3153         into the C name for it we use in the glib bindings.
3154         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
3155         glib C type (not GValue).
3156         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
3157
3158         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
3159         from dbus-gobject.c.
3160
3161         * glib/dbus-gutils.h: Prototype it.
3162
3163         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
3164         (marshal_dbus_message_to_g_marshaller): Use new shared function
3165         dbus_glib_marshal_dbus_message_to_gvalue_array.
3166
3167         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
3168         Will be changed once we have annotations.
3169
3170         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
3171         GStaticRWLock.  Callers updated.
3172         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
3173         (string_table_next): New function for iterating over zero-terminated
3174         string value array.
3175         (string_table_lookup): New function; retrieves specific entry in
3176         array.
3177         (get_method_data): New function; look up method data in object data chunk.
3178         (object_error_domain_prefix_from_object_info)
3179         (object_error_code_from_object_info): New functions, but not implemented yet.
3180         (method_interface_from_object_info): New function; retrieve interface name.
3181         (method_name_from_object_info): New function; retrieve method name.
3182         (method_arg_info_from_object_info): New function; retrieve argument data.
3183         (arg_iterate): New function; iterates over serialized argument data.
3184         (method_dir_signature_from_object_info): New function; returns a
3185         GString holding type signature for arguments for just one
3186         direction (input or output).
3187         (method_input_signature_from_object_info)
3188         (method_output_signature_from_object_info): New functions.
3189         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
3190         converts dbus message arguments into a GValue array.  Used for both
3191         signal handling and method invocation.
3192         (struct DBusGlibWriteIterfaceData): New utility structure.
3193         (write_interface): New function; generate introspection XML for
3194         an interface.
3195         (introspect_interfaces): New function; gathers all interface->methods,
3196         generates introspection XML for them.
3197         (handle_introspect): Invoke introspect_interfaces.
3198         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
3199         (lookup_object_and_method): New function; examines an incoming message
3200         and attempts to match it up (via interface, method name, and argument
3201         signature) with a known object and method.
3202         (gerror_domaincode_to_dbus_error_name): New function; converts a
3203         GError domain and code into a DBus error name.  Needs GError data
3204         added to object introspection to work well.
3205         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
3206         GError.
3207         (invoke_object_method): New function to invoke an object method
3208         looked up via lookup_object_and_method.  Parses the incoming
3209         message, turns it into a GValue array, then invokes the marshaller
3210         specified in the DBusGMethodInfo.  Creates a new message with
3211         either return values or error message as appropriate.
3212         (gobject_message_function): Invoke lookup_object_and_method and
3213         invoke_object_method.
3214
3215         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
3216         (enum DBusBindingOutputMode): New enum for binding output modes.
3217         (pretty_print): Print binding names.
3218         (dbus_binding_tool_error_quark): GError bits.
3219         (version): Fix typo.
3220         (main): Create GIOChannel for output.  Parse new --mode argument,
3221         possible values are "pretty-print", "glib-server", "glib-client".
3222         Use mode to invoke appropriate function.
3223         
3224         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
3225
3226         * glib/dbus-glib-tool.h: New header, just includes GError bits
3227         for now.
3228
3229         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
3230         maps binding style to name.
3231         (struct MethodInfo): Ditto.
3232         (get_hash_keys, get_hash_key): Utility function, returns keys for
3233         a GHashTable.
3234         (interface_info_new, method_info_new): Initialize bindings.
3235         (interface_info_unref, method_info_unref): Destroy bindings.
3236         (method_info_get_binding_names, method_info_get_binding_name)
3237         (interface_info_get_binding_names, interface_info_get_binding_name):
3238         Functions for retrieving binding names.
3239         (method_info_set_binding_name, interface_info_set_binding_name):
3240         Functions for setting binding names.
3241
3242         * glib/dbus-binding-tool-glib.h: New file, has prototypes
3243         for glib binding generation.
3244
3245         * glib/dbus-binding-tool-glib.c: New file, implements server-side
3246         and client-side glib glue generation.
3247
3248         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
3249         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
3250         dbus-glib-tool.h.
3251
3252         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
3253         of using GClosureMarshal directly.
3254         (struct DBusGObjectInfo): Add n_infos member.
3255
3256         * test/glib/test-service-glib.xml: New file; contains introspection data
3257         for MyTestObject used in test-service-glib.c.
3258
3259         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
3260         (my_object_do_nothing, my_object_increment, my_object_throw_error)
3261         (my_object_uppercase, my_object_many_args): New test methods.
3262         (main): Use dbus_g_object_class_install_info to include generated object
3263         info.
3264
3265         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
3266         as well as client-side bindings.
3267
3268         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
3269         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
3270         using both the dbus_gproxy stuff directly as well as the generated bindings.
3271
3272 2005-02-15  Havoc Pennington  <hp@redhat.com>
3273
3274         * dbus/dbus-connection.c (dbus_connection_dispatch): always
3275         complete a pending call, don't run filters first.
3276
3277         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
3278         dbus_pending_call_steal_reply
3279
3280         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
3281         _dbus_connection_block_pending_call
3282         (dbus_pending_call_get_reply): change to steal_reply and return a
3283         ref
3284
3285         * dbus/dbus-connection.c
3286         (dbus_connection_send_with_reply_and_block): port to work in terms
3287         of DBusPendingCall
3288         (_dbus_connection_block_pending_call): replace block_for_reply
3289         with this
3290
3291 2005-02-14  Havoc Pennington  <hp@redhat.com>
3292
3293         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
3294         properly handle looking up group information by name; fix 
3295         from j@bootlab.org
3296
3297 2005-02-13  Havoc Pennington  <hp@redhat.com>
3298
3299         * dbus/dbus-connection.c (dbus_connection_return_message) 
3300         (dbus_connection_borrow_message): hold dispatch lock while message
3301         is outstanding
3302         (_dbus_connection_block_for_reply): hold dispatch lock while we
3303         block for the reply, so nobody steals our reply
3304         (dbus_connection_pop_message): hold the dispatch lock while we
3305         pluck the message
3306
3307 2005-02-13  Havoc Pennington  <hp@redhat.com>
3308
3309         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
3310         (_dbus_connection_release_dispatch)
3311         (_dbus_connection_acquire_io_path)
3312         (_dbus_connection_release_io_path): make the mutex and condvar
3313         control access to the "acquired" flag. Drop the connection lock
3314         while waiting on the condvar. Hopefully these are baby steps in
3315         roughly the right direction.
3316
3317 2005-02-13  Havoc Pennington  <hp@redhat.com>
3318
3319         * dbus/dbus-connection.c: use separate mutexes for the condition
3320         variables; this is some kind of baseline for sanity, but the
3321         condition variables still aren't used correctly afaict
3322
3323 2005-02-13  Havoc Pennington  <hp@redhat.com>
3324
3325         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3326         fix a double-unlock
3327
3328         * dbus/dbus-connection.c
3329         (_dbus_connection_detach_pending_call_unlocked): add this
3330
3331         Initial semi-correct pass through to fix thread locking; there are
3332         still some issues with the condition variable paths I'm pretty
3333         sure
3334         
3335         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
3336         lock/unlock calls
3337
3338         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
3339         rename to add _unlocked
3340         (struct DBusConnection): move "dispatch_acquired" and
3341         "io_path_acquired" to use only one bit each.
3342         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
3343         (dbus_connection_set_watch_functions): hacky fix to reentrancy
3344         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
3345         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
3346         (_dbus_connection_remove_timeout) 
3347         (_dbus_connection_toggle_timeout): drop lock when calling out to
3348         user functions; done in a hacky/bad way.
3349         (_dbus_connection_send_and_unlock): add a missing unlock
3350         (_dbus_connection_block_for_reply): add a missing unlock
3351
3352         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
3353         drop lock in a hacky probably unsafe way to call out to user
3354         function
3355
3356 2005-02-12  Havoc Pennington  <hp@redhat.com>
3357
3358         * tools/dbus-tree-view.c (info_set_func_text): display more
3359         details on args
3360
3361         * bus/driver.c (bus_driver_handle_list_services): list the bus
3362         driver
3363
3364         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
3365
3366         * glib/dbus-gidl.c (signal_info_get_n_args): new function
3367         (method_info_get_n_args): new function
3368
3369 2005-02-12  Havoc Pennington  <hp@redhat.com>
3370
3371         * bus/driver.c (bus_driver_handle_introspect): add introspection
3372         for bus driver
3373
3374 2005-02-12  Havoc Pennington  <hp@redhat.com>
3375
3376         * bus/driver.c: put the signature of each bus driver method in the
3377         table of handlers and check it on incoming calls; this isn't
3378         really useful, but going to add introspect support in a minute.
3379
3380 2005-02-11  Joe Shaw  <joeshaw@novell.com>
3381
3382         * mono/Connection.cs: The unpredictability of finalizers in mono
3383         prevents us from deterministically disconnecting the filters from
3384         the Service class's finalizer, so move tracking of filters and
3385         matches here.  Add API for that.
3386
3387         * mono/Service.cs: Remove the code, add code which calls the
3388         methods now on the Connection class.
3389
3390 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
3391
3392         * python/dbus.py (class Sender): added to support dbus signals better
3393         (Bus::add_signal_receiver): added expand_args parameter which defaults
3394         to True.  When expand args is True the signal handler will pass the 
3395         message arguments as parameters to the signal handler.  If False
3396         revert to previous behavior where the signal handler must get the
3397         argument list from the message.  This is to help port applications
3398         like HAL that have a tendancy to send variable length argument lists.
3399         self._match_rule_to_receivers is now a dict of dicts.
3400         (Bus::remove_signal_receiver): pop handler off the dict intead of 
3401         removing it from a list
3402         (Bus::_signal_func): change signal handlers so that interface,
3403         signal_name, service, path and message are packed into a Sender
3404         object and that is passed to the handler.  If expand_args is True
3405         extract the args list from the message and append it to the parameter
3406         list
3407         
3408         * python/dbus_bindings.pyx.in (class Signature): added to support 
3409         signiature types
3410         (MessageIter::__init__): changed iteration limit to match D-BUS
3411         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
3412         STRUCT and VARIENT type support
3413         (MessageIter::python_value_to_dbus_sig): made recursive to support
3414         recursive types
3415         (MessageIter::append*): added Signature, dict, tuple 
3416         support
3417
3418         * python/examples/example-client.py: added examples of getting tuples
3419         and dicts
3420
3421         * python/examples/example-service.py: added examples of sending tuples
3422         and dicts
3423
3424         * python/examples/example-signal-recipient.py: Fixed to handle new
3425         signal callback format
3426
3427 2005-02-10  Havoc Pennington  <hp@redhat.com>
3428
3429         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
3430         (call dbus_g_proxy_add_signal)
3431
3432         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3433         escape the hostname
3434         (_dbus_server_new_for_domain_socket): escape the path
3435
3436         * dbus/dbus-address.c (dbus_address_escape_value): new
3437         (dbus_address_unescape_value): new
3438         (dbus_parse_address): unescape values
3439
3440         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
3441
3442         * doc/dbus-specification.xml: explain how to escape values in
3443         addresses
3444
3445 2005-02-10  Havoc Pennington  <hp@redhat.com>
3446
3447         * dbus/dbus-message-factory.c (generate_special): modify test to
3448         avoid using a non-basic dict key
3449
3450         * dbus/dbus-marshal-validate-util.c: add test for the below
3451
3452         * doc/dbus-specification.xml: require that dict keys are a basic
3453         type
3454
3455         * dbus/dbus-marshal-validate.c
3456         (_dbus_validate_signature_with_reason): require that dict key is a
3457         basic type
3458
3459 2005-02-10  Havoc Pennington  <hp@redhat.com>
3460
3461         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3462         change to be _and_unlock instead of _unlocked
3463
3464         * dbus/dbus-connection.c
3465         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
3466         have no_update so we can find this bug quickly in future
3467
3468 2005-02-10  Havoc Pennington  <hp@redhat.com>
3469
3470         * dbus/dbus-message-util.c (verify_test_message): tests for string
3471         array
3472
3473         * dbus/dbus-message.c (dbus_message_append_args_valist): add
3474         support for arrays of string/signature/path
3475
3476 2005-02-10  Joe Shaw  <joeshaw@novell.com>
3477
3478         * dbus/dbus-connection.c
3479         (_dbus_connection_queue_received_message_link,
3480         _dbus_connection_message_sent): Add the path to
3481         the verbose output.
3482         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
3483         _dbus_connection_send_preallocated_unlocked(), updated the
3484         dispatch status, and unlocks.  Fixes a bug where certain
3485         situations (like a broken pipe) could cause a Disconnect message
3486         to not be sent, tricking the bus into thinking a service was still
3487         there when the process had quit.
3488         (_dbus_connection_send_preallocated): Call
3489         _dbus_connection_send_preallocated_and_unlock().
3490         (_dbus_connection_send_and_unlock): Added.  Calls
3491         _dbus_connection_send_preallocated_and_unlock().
3492         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
3493         (dbus_connection_send_with_reply): Update the dispatch status and
3494         unlock.
3495
3496         * mono/Service.cs (~Service): Added.  Removes the filter so that
3497         we don't get unmanaged code calling back into a GCed delegate.
3498         (RemoveFilter); Added.
3499
3500 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
3501
3502         * dbus/dbus-message.c (dbus_message_iter_open_container):
3503         - Removed check for iterator type being an array because
3504         get_arg_type does not work with writer iterators
3505         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
3506
3507 2005-02-07  Havoc Pennington  <hp@redhat.com>
3508
3509         * doc/dbus-specification.xml: some more language cleanups; add
3510         stuff about how to deal with invalid protocol and extension
3511         points; add _ to allowed chars in auth commands; add EXTENSION_
3512         auth command prefix
3513
3514 2005-02-06  Havoc Pennington  <hp@redhat.com>
3515
3516         * s/expected/required/ in a couple places for clarity
3517
3518 2005-02-07  Colin Walters  <walters@verbum.org>
3519
3520         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
3521         sender or proposed_recipient.
3522
3523 2005-02-06  Havoc Pennington  <hp@redhat.com>
3524
3525         * dbus/dbus-message-factory.c (generate_special): more tests
3526
3527         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
3528         array length that exceeds the maximum
3529
3530 2005-02-05  Havoc Pennington  <hp@redhat.com>
3531
3532         * dbus/dbus-message-factory.c (generate_special): more test cases,
3533         increasing coverage
3534
3535         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
3536         reason why a signature was invalid
3537
3538         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
3539         skip the length of the string before we look at it in validation
3540
3541         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
3542         equal_substring
3543
3544         * dbus/dbus-message.c (_dbus_message_loader_new): default
3545         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
3546
3547 2005-02-05  Havoc Pennington  <hp@redhat.com>
3548
3549         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
3550         if the signature of a variant was empty
3551         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
3552         struct with no element type)
3553
3554         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
3555         mangled messages to break things
3556
3557 2005-02-04  Havoc Pennington  <hp@redhat.com>
3558
3559         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
3560         g_quark_try_string() so it actually can return 0
3561         (dbus_g_proxy_connect_signal): ditto
3562
3563 2005-02-04  Havoc Pennington  <hp@redhat.com>
3564
3565         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
3566         bogus warning
3567         (tristring_from_message): assert cleanly on null path/interface
3568         (should not be possible though I decided later)
3569         (dbus_g_proxy_dispose): move proxy manager unregistration here
3570         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
3571         g_return_if_fail() checks
3572
3573 2005-02-04  Havoc Pennington  <hp@redhat.com>
3574
3575         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
3576
3577         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
3578         (with some minor changes)
3579
3580         * doc/dbus-specification.xml: add deprecated attribute to
3581         introspection format
3582
3583 2005-01-31  Havoc Pennington  <hp@redhat.com>
3584
3585         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
3586         think it's sort of right
3587
3588 2005-01-30  Havoc Pennington  <hp@redhat.com>
3589
3590         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
3591
3592 2005-01-30  Havoc Pennington  <hp@redhat.com>
3593
3594         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
3595
3596         * autogen.sh: change to autotools 1.9
3597
3598         * glib/dbus-gproxy.c: completely change how signals work
3599         (dbus_g_proxy_add_signal): new function to specify signature of a
3600         signal
3601         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
3602         and g_warning if the incoming message has the wrong signature.
3603
3604 2005-01-30  Havoc Pennington  <hp@redhat.com>
3605
3606         * tools/dbus-names-model.c (have_names_notify): fix this
3607
3608         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
3609         up the string array handling a bit 
3610
3611 2005-01-30  Havoc Pennington  <hp@redhat.com>
3612
3613         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
3614         (dbus_g_pending_call_cancel): new function
3615
3616         * dbus/dbus-glib.h: move GType decls for connection/message here;
3617         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
3618         here, just kind of rationalizing how we handle all that
3619
3620         * tools/dbus-names-model.c: new file for a tree model listing the
3621         services on a bus
3622
3623         * tools/dbus-tree-view.c (model_new): use proper typing on the
3624         model rows
3625
3626 2005-01-30  Havoc Pennington  <hp@redhat.com>
3627
3628         * glib/dbus-gmain.c: add a custom GSource back that just checks
3629         whether the message queue has anything in it; otherwise, there are 
3630         cases where we won't see messages in the queue since there was no 
3631         IO visible to the glib main loop
3632
3633         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
3634         increase default message timeout to 25 seconds
3635
3636 2005-01-30  Havoc Pennington  <hp@redhat.com>
3637
3638         * test/glib/test-profile.c (no_bus_stop_server): remove the
3639         warning about the g_warning that I just fixed
3640
3641         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
3642         custom source, seems to be a lot easier to understand and work
3643         better.
3644
3645 2005-01-30  Havoc Pennington  <hp@redhat.com>
3646
3647         I think this main loop thing is conceptually broken, but here are 
3648         some band aids. I'll maybe rewrite it in a minute.
3649         
3650         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
3651         custom GSource, so don't pass it in; confusing
3652         (gsource_server_finalize, gsource_connection_finalize): add
3653         finalize handlers that remove all the watches.  
3654
3655 2005-01-30  Havoc Pennington  <hp@redhat.com>
3656
3657         * glib/dbus-gobject.c (introspect_properties): fix the XML
3658         generated
3659
3660         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
3661         which effectively detects the use of freed messages
3662
3663         * glib/dbus-gobject.c (handle_introspect): modify and return the
3664         reply message instead of the incoming message
3665
3666         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
3667         gee, maybe it should SEND THE XML instead of just making a string
3668         and freeing it again ;-)
3669
3670         * tools/dbus-print-message.c (print_message): improve printing of
3671         messages
3672
3673         * configure.in: add debug-glib.service to the output
3674
3675 2005-01-30  Havoc Pennington  <hp@redhat.com>
3676
3677         dbus-viewer introspected and displayed the bus driver
3678         
3679         * dbus/dbus-object-tree.c 
3680         (object_tree_test_iteration): add tests for a handler registered on "/"
3681
3682         * dbus/dbus-object-tree.c
3683         (_dbus_decompose_path): fix to handle path "/" properly
3684         (run_decompose_tests): add tests for path decomposition
3685         
3686         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
3687         properly
3688
3689         * glib/dbus-gobject.c (handle_introspect): fix quotes
3690
3691         * test/glib/run-test.sh: support launching the bus, then running
3692         dbus-viewer
3693
3694         * test/glib/test-service-glib.c (main): put in a trivial gobject
3695         subclass and register it on the connection
3696
3697         * bus/driver.c (bus_driver_handle_introspect): implement
3698         introspection of the bus driver service
3699
3700         * dbus/dbus-protocol.h: add #defines for the XML namespace,
3701         identifiers, doctype decl
3702
3703         * bus/driver.c (bus_driver_handle_get_service_owner): handle
3704         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
3705         returning the service unchanged.
3706         (bus_driver_handle_message): remove old check for reply_serial in
3707         method calls, now the message type deals with that
3708         (bus_driver_handle_message): handle NULL interface
3709
3710         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
3711
3712         * glib/dbus-gloader-expat.c (description_load_from_string): allow
3713         -1 for len
3714
3715         * tools/dbus-viewer.c: add support for introspecting a service on
3716         a bus
3717
3718         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
3719         (dbus_g_pending_call_unref): add
3720
3721 2005-01-29  Havoc Pennington  <hp@redhat.com>
3722
3723         * tools/dbus-tree-view.c: add support for displaying properties.
3724         (run dbus-viewer with an introspect xml file as arg, then resize
3725         the window so the tree elements show up, not sure what that is)
3726
3727         * glib/dbus-gobject.c (handle_introspect): return
3728         org.freedesktop.Properties and org.freedesktop.Introspectable
3729         interfaces when we are introspected.
3730
3731         * doc/dbus-specification.xml: allow empty interface name when 
3732         Get/Set a property
3733
3734 2005-01-29  Havoc Pennington  <hp@redhat.com>
3735
3736         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
3737         though it uses glib, it could be extended for any binding in
3738         principle
3739
3740         * glib/dbus-gobject.c (gobject_message_function): change to the
3741         new way properties work
3742
3743         * dbus/dbus-protocol.h: add the new interfaces
3744
3745         * doc/dbus-specification.xml: document the introspection format,
3746         Introspectable interface, and add an org.freedesktop.Properties
3747         interface.
3748
3749         * glib/dbus-gparser.c: add support for a <property> element
3750
3751         * glib/dbus-gidl.c: add PropertyInfo
3752
3753         * glib/dbus-gobject.c (handle_introspect): put the outermost
3754         <node> outside the signal and property descriptions.
3755         (introspect_properties): export properties as <property> rather
3756         than as method calls
3757
3758 2005-01-28  Havoc Pennington  <hp@redhat.com>
3759
3760         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
3761         related to authentication protocol
3762
3763 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
3764
3765         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
3766                 - BUS_ACTIVATION -> BUS_STARTER
3767                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
3768                 - class MessageIter (__init__): Added recursion checking 
3769                 so we throw a nice error instead of just disconnecting from the
3770                 bus.
3771                 (get): Added arg_type parameter for recursion.
3772                 Removed the nil type
3773                 Added signiture type placeholder (not implemented)
3774                 Added struct type placeholder (not implemented)
3775                 Added varient type placeholder (not implemented)
3776                 Commented out dict type for now     
3777                 (get_element_type): renamed from get_array_type
3778                 (get_*): changed to use the dbus_message_iter_get_basic API
3779                 (get_*_array): removed in favor of recursive get_array method
3780                 (get_array): new recursive method which calls get to marshal
3781                 the elements of the array
3782                 (value_to_dbus_sig): New method returns the corrasponding
3783                 dbus signiture to a python value
3784                 (append): Comment out dict handling for now
3785                 Handle lists with the new recursive API
3786                 Comment out None handling for now
3787                 (append_nil): removed
3788                 (append_*): changed to use dbus_message_iter_append_basic API
3789                 (append_*_array): removed in favor of recursive append_array 
3790                 method
3791                 (__str__): Make it easier to print out recursive iterators
3792                 for debugging
3793                 - class Message (__str__): moved type inspection to the
3794                 MessageIter class' __str__ method
3795                 (get_iter): Added an append parameter wich defaults to False
3796                 If True use the new API's to create an append iterator
3797
3798         * python/dbus.py: Update to use new bindings API
3799                 - TYPE_ACTIVATION -> TYPE_STARTER
3800                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
3801                 - class ActivationBus -> class StarterBus
3802                 - class RemoteObject (__call__): get an append iterator
3803                 - (_dispatch_dbus_method_call): get an append iterator
3804                 - class Object (emit_signal): get an append iterator
3805
3806         * python/examples/: Fixed up the examples to work with the new API
3807                 
3808 2005-01-28  Joe Shaw  <joeshaw@novell.com>
3809
3810         * configure.in: Bump version up to 0.30.
3811
3812         * HACKING: Add a release item to bump the version number up after 
3813         a release.
3814
3815 2005-01-28  Havoc Pennington  <hp@redhat.com>
3816
3817         * doc/dbus-specification.xml: update to describe 16-bit types and
3818         dict entries
3819
3820         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
3821         assertion
3822
3823         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
3824         type
3825
3826         * dbus/dbus-marshal-recursive.c: implement
3827
3828 2005-01-27  Havoc Pennington  <hp@redhat.com>
3829
3830         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
3831
3832         * configure.in: find the right type for 16 and 32 bit ints as well
3833         as 64
3834
3835         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
3836         the 16-bit types so people don't have to stuff them in 32-bit or
3837         byte arrays.
3838
3839 2005-01-27  Havoc Pennington  <hp@redhat.com>
3840
3841         * dbus/dbus-message.c: byteswap the message if you init an
3842         iterator to read/write from it
3843         
3844         * dbus/dbus-marshal-byteswap.c: new file implementing 
3845         _dbus_marshal_byteswap()
3846
3847         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
3848
3849 2005-01-26  Havoc Pennington  <hp@redhat.com>
3850         
3851         * dbus/dbus-marshal-validate-util.c: break this out (and fix
3852         build, apparently - nobody noticed?)
3853         
3854 2005-01-26  Havoc Pennington  <hp@redhat.com>
3855
3856         * dbus/dbus-marshal-recursive.h: remove todo comment
3857
3858 2005-01-25  Joe Shaw  <joeshaw@novell.com>
3859
3860         * Land the mono binding changes to conform to the new APIs.
3861
3862         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
3863         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
3864
3865         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
3866         type code as a string.
3867         (InitAppending): Rename dbus_message_append_iter_init() to
3868         dbus_message_iter_init_append().
3869
3870         * mono/BusDriver.cs: Rename ServiceEventHandler to
3871         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
3872         Rename ServiceOwnerChanged to NameOwnerChanged.
3873
3874         * mono/Connection.cs: Rename BaseService to UniqueName, and the
3875         underlying C call.
3876
3877         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
3878
3879         * mono/Service.cs: Rename Exists to HasOwner, internally rename
3880         dbus_bus_acquire_service() to dbus_bus_request_name().
3881
3882         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
3883         of Type.UnderlyingSystemType to get the correct element type for
3884         the array.
3885         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
3886         dbus_message_get_{element|arg}_type() instead of
3887         dbus_message_iter_init_array_iterator().
3888         (Append): Replace dbus_message_iter_append_array() with
3889         dbus_message_iter_open_container() and
3890         dbus_message_iter_close_container().
3891
3892         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
3893         types have been removed.
3894         
3895         * mono/DBusType/*.cs: Replace calls of
3896         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
3897         but specify the type in the DllImport extern declaration.  Ditto
3898         for dbus_message_iter_append_[type]() ->
3899         dbus_message_iter_append_basic().
3900
3901         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
3902         NameOwnerChangedHandler.
3903
3904 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
3905
3906         * python/dbus_bindings.pyx.in: Rename of methods and bindings
3907                 - get_base_service -> get_unique_name
3908                 - bus_get_base_service -> bus_get_unique_name
3909                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
3910                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
3911                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
3912                 - bus_activate_service -> bus_start_service_by_name
3913                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
3914                 - bus_acquire_service -> bus_request_name
3915                 - dbus_bus_acquire_service -> dbus_bus_request_name
3916                 - bus_service_exists -> bus_name_has_owner
3917                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
3918
3919         * python/dbus.py: Rename of methods
3920                 - activate_service -> start_service_by_name
3921                 - bus_acquire_service -> bus_request_name
3922                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
3923                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
3924
3925         
3926 2005-01-24  Joe Shaw  <joeshaw@novell.com>
3927
3928         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
3929         signature for the method that can't be found.
3930
3931         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
3932         the message has any arguments, we need to call
3933         _dbus_type_reader_get_current_type(), not
3934         _dbus_type_reader_has_next().
3935
3936 2005-01-24  Havoc Pennington  <hp@redhat.com>
3937
3938         * dbus/dbus-message-factory.c: more testing of message validation
3939
3940         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
3941         header
3942
3943 2005-01-23  Havoc Pennington  <hp@redhat.com>
3944
3945         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
3946         get this all working, not many tests in the framework yet though
3947
3948 2005-01-22  Havoc Pennington  <hp@redhat.com>
3949
3950         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
3951         tutorial, based on work from David Wheeler.
3952
3953 2005-01-21  Havoc Pennington  <hp@redhat.com>
3954
3955         * dbus/dbus-bus.c: add more return_if_fail checks
3956
3957         * dbus/dbus-message.c (load_message): have the "no validation"
3958         mode (have to edit the code to toggle the mode for now though)
3959
3960         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
3961         skips all validation; I want to use this at least for benchmark
3962         baseline, I'm not sure if it should be a publicly-available switch.
3963
3964 2005-01-21  Havoc Pennington  <hp@redhat.com>
3965
3966         * glib/dbus-gmain.c: don't put the GLib bindings in the same
3967         toplevel doxygen group as the low-level API stuff
3968
3969         * dbus/dbus.h: note that libdbus is the low-level API
3970
3971 2005-01-20  Havoc Pennington  <hp@redhat.com>
3972
3973         * update-dbus-docs.sh: script to update docs on the web site, only
3974         works for me though. neener.
3975
3976 2005-01-20  Havoc Pennington  <hp@redhat.com>
3977
3978         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
3979         code can reveal bugs in it
3980
3981 2005-01-20  Havoc Pennington  <hp@redhat.com>
3982
3983         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
3984         select() version, patches from Tor Lillqvist
3985
3986 2005-01-20  Havoc Pennington  <hp@redhat.com>
3987
3988         * doc/dbus-tutorial.xml: replace > with &gt;
3989
3990         * bus/services.c (bus_registry_acquire_service): validate the name
3991         and return a better error if it's no good.
3992
3993         * doc/dbus-specification.xml: note NO_AUTO_START change
3994
3995         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
3996         from AUTO_START, we're toggling the default
3997
3998         * bus/dispatch.c: adapt the tests to change of auto-start default
3999
4000 2005-01-18  Havoc Pennington  <hp@redhat.com>
4001
4002         * rename dbus-daemon-1 to dbus-daemon throughout
4003
4004 2005-01-18  Havoc Pennington  <hp@redhat.com>
4005
4006         * Throughout, grand renaming to strip out the use of "service",
4007         just say "name" instead (or "bus name" when ambiguous).  Did not
4008         change the internal code of the message bus itself, only the
4009         programmer-facing API and messages.
4010         
4011         * doc/dbus-specification.xml: further update the message bus section
4012         
4013         * bus/config-parser.c (all_are_equiv): fix bug using freed string
4014         in error case
4015
4016 2005-01-17  Havoc Pennington  <hp@redhat.com>
4017
4018         * dbus/dbus-types.h: remove 16-bit types since we don't use them
4019         ever
4020
4021         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
4022         "invalid name character" not only non-ASCII
4023
4024         * doc/dbus-specification.xml: further update spec, message bus 
4025         parts are still out-of-date but the marshaling etc. stuff is now
4026         accurate-ish
4027
4028 2005-01-17  Havoc Pennington  <hp@redhat.com>
4029
4030         * doc/dbus-specification.xml: partially update spec
4031
4032 2005-01-17  Havoc Pennington  <hp@redhat.com>
4033
4034         * Throughout, align variant bodies according to the contained
4035         type, rather than always to 8. Should save a fair bit of space in
4036         message headers.
4037         
4038         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
4039         fix handling of case where p == end
4040
4041         * doc/TODO: remove the dbus_bool_t item and variant alignment items
4042
4043 2005-01-17  Havoc Pennington  <hp@redhat.com>
4044
4045         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
4046
4047         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
4048         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
4049         are marshaling/unmarshaling a boolean.
4050
4051 2005-01-16  Havoc Pennington  <hp@redhat.com>
4052
4053         This is about it on what can be disabled/deleted from libdbus
4054         easily, back below 150K anyhow. Deeper cuts are more work than 
4055         just turning the code off as I've done here.
4056         
4057         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
4058         signed int convenience funcs
4059
4060         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
4061         verbose mode
4062
4063         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
4064         things out of libdbus
4065
4066         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
4067         
4068         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
4069         tests-enabled-only, though it should probably be deleted)
4070
4071         * dbus/dbus-message-util.c: same stuff
4072
4073         * dbus/dbus-auth-util.c: same stuff
4074
4075 2005-01-16  Havoc Pennington  <hp@redhat.com>
4076
4077         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
4078
4079         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
4080         way for stripping down dbus-userdb.c stuff included in libdbus.
4081         Rename _dbus_parse_uid for consistency.
4082
4083 2005-01-16  Havoc Pennington  <hp@redhat.com>
4084
4085         * dbus/dbus-internals.c (_dbus_real_assert): print the function
4086         name the assertion failed in
4087
4088         * dbus/dbus-internals.h (_dbus_return_if_fail) 
4089         (_dbus_return_val_if_fail): assert that the name of the function
4090         containing the check doesn't start with '_', since we only want to 
4091         use checks on public functions
4092         
4093         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
4094         checks to assertions
4095
4096         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
4097         change checks to asserts for private function
4098
4099         * dbus/dbus-message.c (_dbus_message_set_serial): checks
4100         to asserts for private function
4101
4102         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
4103         broken assertion that was breaking make check
4104         (_dbus_type_reader_array_is_empty): remove this rather than fix
4105         it, was only used in assertions
4106
4107 2005-01-16  Havoc Pennington  <hp@redhat.com>
4108
4109         * test/unused-code-gc.py: hacky script to find code that's used
4110         only by the bus (not libdbus) or used only by tests or not used at
4111         all. It has some false alarms, but looks like we can clean up a
4112         lot of size from libdbus.
4113
4114         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
4115         dbus/Makefile.am: initially move 10K of binary size out of libdbus
4116         
4117 2005-01-16  Havoc Pennington  <hp@redhat.com>
4118
4119         * Add and fix docs according to Doxygen warnings throughout
4120         source.
4121         
4122         * dbus/dbus-marshal-recursive.c
4123         (_dbus_type_reader_array_is_empty): change this to just call
4124         array_reader_get_array_len() and make it static
4125
4126         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
4127         from get_array_type
4128         (dbus_message_iter_init_append): rename from append_iter_init
4129
4130         * dbus/dbus-marshal-recursive.c
4131         (_dbus_type_reader_get_element_type): rename from
4132         _dbus_type_reader_get_array_type
4133
4134 2005-01-15  Havoc Pennington  <hp@redhat.com>
4135
4136         * test/glib/test-profile.c (with_bus_server_filter): fix crash
4137
4138         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
4139         when DBUS_DISABLE_ASSERT
4140         (_dbus_marshal_set_basic): be sure we align for the string length
4141
4142         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
4143         this look faster
4144
4145         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
4146         inline macro version
4147         (_dbus_string_set_byte): provide inline macro version
4148
4149 2005-01-15  Havoc Pennington  <hp@redhat.com>
4150
4151         * Land the new message args API and type system.
4152
4153         This patch is huge, but the public API change is not 
4154         really large. The set of D-BUS types has changed somewhat, 
4155         and the arg "getters" are more geared toward language bindings;
4156         they don't make a copy, etc.
4157
4158         There are also some known issues. See these emails for details
4159         on this huge patch:
4160         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
4161         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
4162         
4163         * dbus/dbus-marshal-*: all the new stuff
4164
4165         * dbus/dbus-message.c: basically rewritten
4166
4167         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
4168         freed blocks to be all non-nul bytes so using freed memory is less
4169         likely to work right
4170
4171         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
4172         DBUS_FAIL_MALLOC=N environment variable, so you can do
4173         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
4174         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
4175         thorough.
4176
4177         * qt/message.cpp: port to the new message args API
4178         (operator<<): use str.utf8() rather than str.unicode()
4179         (pretty sure this is right from the Qt docs?)
4180
4181         * glib/dbus-gvalue.c: port to the new message args API
4182
4183         * bus/dispatch.c, bus/driver.c: port to the new message args API
4184
4185         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
4186         "locked" flag to TRUE and align_offset to 0; I guess we never
4187         looked at these anyhow, but seems cleaner.
4188
4189         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
4190         move allocation padding macro to this header; use it to implement
4191         (_DBUS_STRING_STATIC): ability to declare a static string.
4192
4193         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
4194         change to return TRUE if the interface is not set.
4195
4196         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
4197         to dbus-marshal-validate.[hc]
4198
4199         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
4200         dbus-internals.c
4201
4202         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
4203         to dbus-marshal-*.[hc]
4204
4205         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
4206         function here from dbus-marshal.c
4207
4208 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4209
4210         * NEWS: Update for 0.23.
4211
4212         * configure.in: Release 0.23.
4213
4214 2005-01-12  Joe Shaw  <joeshaw@novell.com>
4215
4216         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
4217         dbus DLL with --debug.  Clean up after the .mdb files this leaves
4218         behind.
4219
4220         * mono/doc/Makefile.am: Need to uninstall the docs on "make
4221         uninstall"
4222
4223         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
4224         is an enum, get the enum's underlying type.  Another mono
4225         1.1.3 fix.
4226
4227 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4228
4229         Patch from Sjoerd Simons <sjoerd@luon.net>
4230
4231         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
4232         DESTDIR.  It breaks stuff.
4233
4234 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4235
4236         Patch from Tambet Ingo <tambet@ximian.com>
4237
4238         * mono/DBusType/Array.cs (Get): Get the underlying element type by
4239         calling type.GetElementType().  The code previously depended on
4240         broken Mono behavior, which was fixed in Mono 1.1.3.
4241
4242         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
4243         Activator.CreateInstance() so that the class's constructor is
4244         called with the right parameters.
4245
4246 2005-01-11  Joe Shaw  <joeshaw@novell.com>
4247
4248         Patch from Timo Teräs <ext-timo.teras@nokia.com>
4249
4250         * dbus/dbus-connection.c
4251         (_dbus_connection_queue_received_message_link): Call
4252         _dbus_connection_remove_timeout() instead of the _locked()
4253         variant, since it's always called from
4254         _dbus_connection_handle_watch(), which handles the locking.
4255         Removed the _locked() variant since it's no longer used.
4256
4257 2005-01-03  Havoc Pennington  <hp@redhat.com>
4258
4259         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
4260         return
4261         
4262 2004-12-26  Havoc Pennington  <hp@redhat.com>
4263
4264         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
4265
4266 2005-01-03  Havoc Pennington  <hp@redhat.com>
4267
4268         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
4269         floating point
4270
4271         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
4272
4273 2005-01-02  Havoc Pennington  <hp@redhat.com>
4274
4275         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
4276
4277 2005-01-01  Havoc Pennington  <hp@redhat.com>
4278
4279         * configure.in: add -Wfloat-equal
4280
4281 2005-01-01  Havoc Pennington  <hp@redhat.com>
4282
4283         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
4284         for a variety of reasons '==' doesn't do this.
4285
4286 2004-12-31  Havoc Pennington  <hp@redhat.com>
4287
4288         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
4289         I keep wishing I had
4290
4291 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4292
4293         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
4294
4295 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
4296
4297         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
4298         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
4299         dbus-protocol.h.  Because they are defines and not enums they are not
4300         autogenerated.
4301
4302 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
4303
4304         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
4305         dbus_bus_activate_service
4306
4307         * python/dbus.py (Bus.activate_service): activate a service on the
4308         bus.
4309
4310 2004-12-24  Havoc Pennington  <hp@redhat.com>
4311
4312         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
4313         file format has also changed and I haven't adapted to that yet
4314         
4315         * Makefile.am: load .gcno files from latest gcc
4316
4317 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
4318         * Patch from Rob Taylor <robtaylor@fastmail.fm>
4319
4320         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
4321         lowlevel binding
4322
4323         * python/dbus.py (get_unix_user): Added binding to 
4324         call dbus_bindings.bus_get_unix_user
4325
4326         * python/extract.py: Modified the proto_pat regex to
4327         handle unsigned long
4328
4329 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4330
4331         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
4332         better POSIX compliance.
4333
4334 2004-12-19  Havoc Pennington  <hp@redhat.com>
4335
4336         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
4337         (_dbus_string_insert_8_aligned): new functions
4338
4339         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
4340
4341 2004-12-18  Havoc Pennington  <hp@redhat.com>
4342
4343         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
4344         macro
4345
4346         * dbus/dbus-message.c: fix a comment, and add a still-unused
4347         not-implemented function
4348
4349         * dbus/dbus-marshal.h: fix comment
4350
4351         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
4352
4353 2004-12-17  Joe Shaw  <joeshaw@novell.com>
4354
4355         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
4356         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
4357         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
4358         Type.UnderlyingSystemType to get the actual system type
4359         underneath.  This code previously depended on the broken Mono
4360         behavior, which was fixed in 1.1.3.
4361
4362 2004-11-27  Havoc Pennington  <hp@redhat.com>
4363
4364         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
4365         are disabled
4366         (_dbus_string_get_const_data): inline when asserts are disabled
4367
4368         * dbus/dbus-message.c: record the _dbus_current_generation of
4369         creation so we can complain if dbus_shutdown() is used improperly.
4370         Do this only if checks are enabled.
4371
4372         * dbus/dbus-connection.c: ditto
4373         
4374 2004-11-26  Havoc Pennington  <hp@redhat.com>
4375
4376         * test/glib/test-profile.c: add with_bus mode to profile echoes
4377         that go through the bus.
4378
4379         * test/glib/run-test.sh: add ability to run test-profile
4380
4381         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
4382         config file reload.
4383
4384 2004-11-26  Havoc Pennington  <hp@redhat.com>
4385
4386         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
4387         thing was implemented
4388
4389 2004-11-26  Havoc Pennington  <hp@redhat.com>
4390
4391         * test/glib/test-profile.c: tweak a bit, add support for some
4392         made-up minimal malloc overhead with plain sockets, since in 
4393         real life some sort of buffers are unavoidable thus we could 
4394         count them in the theoretical best case
4395
4396 2004-11-26  Havoc Pennington  <hp@redhat.com>
4397
4398         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
4399         where I was trying to cache one too many messages
4400
4401 2004-11-26  Havoc Pennington  <hp@redhat.com>
4402
4403         * dbus/dbus-message.c: reimplement message cache as an array which 
4404         makes the cache about twice as fast and saves maybe 1.5% overall
4405
4406 2004-11-26  Havoc Pennington  <hp@redhat.com>
4407
4408         * dbus/dbus-threads.c (init_global_locks): forgot to put the
4409         message cache lock here
4410
4411 2004-11-26  Havoc Pennington  <hp@redhat.com>
4412
4413         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
4414         the "char byte_order" next to each other to save 4 bytes
4415         (dbus_message_new_empty_header): reduce preallocation, since the
4416         message cache should achieve a similar effect
4417         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
4418         message cache that keeps a few DBusMessage around in a pool,
4419         another 8% speedup or so.
4420
4421         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
4422
4423 2004-11-25  Havoc Pennington  <hp@redhat.com>
4424
4425         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
4426         to write, without reading or blocking, try it before the poll()
4427         and skip the poll() if nothing remains to write. This is about a
4428         3% speedup in the echo client/server
4429
4430 2004-11-25  Havoc Pennington  <hp@redhat.com>
4431
4432         The primary change here is to always write() once before adding
4433         the write watch, which gives us about a 10% performance increase.
4434         
4435         * dbus/dbus-transport-unix.c: a number of modifications to cope
4436         with removing messages_pending
4437         (check_write_watch): properly handle
4438         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
4439         messages_pending stuff
4440         (check_read_watch): properly handle WAITING_FOR_MEMORY and
4441         AUTHENTICATED cases
4442         (unix_handle_watch): after writing, see if the write watch can be
4443         removed
4444         (unix_do_iteration): assert that write_watch/read_watch are
4445         non-NULL rather than testing that they aren't, since they 
4446         aren't allowed to be NULL. check_write_watch() at the end so 
4447         we add the watch if we did not finish writing (e.g. got EAGAIN)
4448
4449         * dbus/dbus-transport-protected.h: remove messages_pending call,
4450         since it resulted in too much inefficient watch adding/removing; 
4451         instead we now require that the transport user does an iteration 
4452         after queueing outgoing messages, and after trying the first
4453         write() we add a write watch if we got EAGAIN or exceeded our 
4454         max bytes to write per iteration setting
4455
4456         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
4457         function
4458
4459         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
4460         freed and then accessed, valgrind flagged this bug, fix it
4461
4462         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
4463         as the last valid field plus 1, where really it is equal to the
4464         last valid field. Corrects some message corruption issues.
4465
4466         * dbus/dbus-mainloop.c: verbosity changes
4467
4468         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
4469         instead of aborting in one of the test codepaths
4470
4471         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
4472         caused not printing the pid ever again if a verbose was missing
4473         the newline at the end
4474         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
4475
4476         * dbus/dbus-connection.c: verbosity changes; 
4477         (dbus_connection_has_messages_to_send): new function
4478         (_dbus_connection_message_sent): no longer call transport->messages_pending
4479         (_dbus_connection_send_preallocated_unlocked): do one iteration to
4480         try to write() immediately, so we can avoid the write watch. This
4481         is the core purpose of this patchset
4482         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
4483         dump the outgoing message queue, so nobody will get confused
4484         trying to send them or thinking stuff is pending to be sent
4485
4486         * bus/test.c: verbosity changes
4487
4488         * bus/driver.c: verbosity/assertion changes
4489
4490         * bus/dispatch.c: a bunch of little tweaks to get it working again
4491         because this patchset changes when/where you need to block.
4492
4493 2004-11-23  Havoc Pennington  <hp@redhat.com>
4494
4495         * test/glib/test-profile.c: modify to accept a plain_sockets
4496         argument in which case it will bench plain sockets instead of
4497         libdbus, for comparison purposes.
4498
4499 2004-11-22  Havoc Pennington  <hp@redhat.com>
4500
4501         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
4502         threads for more time, so sysprof can get a grip on it.
4503
4504         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
4505         pointless variable
4506
4507 2004-11-13  Havoc Pennington  <hp@redhat.com>
4508
4509         * test/glib/test-profile.c: fix this thing up a bit
4510
4511         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
4512         preallocation sizes by a fair bit; not sure if this will be an
4513         overall performance win or not, but it does reduce reallocs.
4514
4515         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
4516         the test hack that forced constant realloc if asserts are
4517         disabled, so we can profile sanely. Sprinkle in some
4518         _DBUS_UNLIKELY() which are probably pointless, but before I
4519         noticed the real performance problem I put them in.
4520         (_dbus_string_validate_utf8): micro-optimize this thing a little
4521         bit, though callgrind says it didn't help; then special-case
4522         ascii, which did help a lot; then be sure we detect nul bytes as
4523         invalid, which is a bugfix.
4524         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
4525         superstition; use memset to nul the padding instead of a manual
4526         loop.
4527         (_dbus_string_get_length): inline this as a
4528         macro; it showed up in the profile because it's used for loop
4529         tests and so forth
4530
4531 2004-11-10  Colin Walters  <walters@verbum.org>
4532
4533         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
4534         for extra paranoia.
4535
4536 2004-11-09  Colin Walters  <walters@verbum.org>
4537
4538         * dbus/dbus-string.c (_dbus_string_get_length): New
4539         function, writes DBusString to C buffer.
4540
4541         * dbus/dbus-string.h: Prototype it.
4542
4543         * dbus/dbus-message.c (dbus_message_type_to_string): New
4544         function, converts message type into C string.
4545
4546         * dbus/dbus-message.h: Prototype it.
4547
4548         * bus/selinux.c (bus_selinux_check): Take source pid,
4549         target pid, and audit data.  Pass audit data to
4550         avc_has_perm.
4551         (log_audit_callback): New function, appends extra
4552         audit information.
4553         (bus_selinux_allows_acquire_service): Also take
4554         service name, add it to audit data.
4555         (bus_selinux_allows_send): Also take message
4556         type, interface, method member, error name,
4557         and destination, and add them to audit data.
4558         (log_cb): Initialize func_audit.
4559         
4560         * bus/selinux.h (bus_selinux_allows_acquire_service)
4561         (bus_selinux_allows_send): Update prototypes 
4562
4563         * bus/services.c (bus_registry_acquire_service): Pass
4564         service name to bus_selinux_allows_acquire_service.
4565
4566         * bus/bus.c (bus_context_check_security_policy): Pass
4567         additional audit data.  Move assignment of dest
4568         to its own line.
4569
4570 2004-11-07  Colin Walters  <walters@verbum.org>
4571
4572         * dbus/dbus-transport-unix.c (do_authentication): Always
4573         initialize auth_completed.
4574         
4575 2004-11-07  Colin Walters  <walters@verbum.org>
4576
4577         * bus/bus.c (load_config): Break into three
4578         separate functions: process_config_first_time_only,
4579         process_config_every_time, and process_config_postinit.
4580         (process_config_every_time): Move call of
4581         bus_registry_set_service_context_table into
4582         process_config_postinit.
4583         (process_config_postinit): New function, does
4584         any processing that needs to happen late
4585         in initialization (and also on reload).
4586         (bus_context_new): Instead of calling load_config,
4587         open config parser here and call process_config_first_time_only
4588         and process_config_every_time directly.  Later, after
4589         we have forked but before changing UID,
4590         invoke bus_selinux_full_init, and then call
4591         process_config_postinit.
4592         (bus_context_reload_config): As in bus_context_new,
4593         load parse file inside here, and call process_config_every_time
4594         and process_config_postinit.
4595
4596         * bus/services.h, bus/services.c
4597         (bus_registry_set_service_context_table): Rename
4598         from bus_registry_set_sid_table.  Take string hash from config
4599         parser, and convert them here into SIDs.
4600
4601         * bus/config-parser.c (struct BusConfigParser): Have
4602         config parser only store a mapping of service->context
4603         string.
4604         (merge_service_context_hash): New function.
4605         (merge_included): Merge context string hashes instead
4606         of using bus_selinux_id_table_union.
4607         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
4608         simply create a new string hash.
4609         (bus_config_parser_unref): Unref it.
4610         (start_selinux_child): Simply insert strings into hash,
4611         don't call bus_selinux_id_table_copy_over.
4612
4613         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
4614         (bus_selinux_id_table_copy_over): Delete.
4615
4616 2004-11-03  Colin Walters  <walters@verbum.org>
4617
4618         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
4619         variables.
4620         
4621 2004-11-03  Colin Walters  <walters@verbum.org>
4622
4623         * bus/test-main.c (test_pre_hook): Fix test logic,
4624         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
4625
4626 2004-11-02  Colin Walters  <walters@redhat.com>
4627
4628         * bus/selinux.c (bus_selinux_init): Split into two functions,
4629         bus_selinux_pre_init and bus_selinux_post_init.
4630         (bus_selinux_pre_init): Just determine whether SELinux is
4631         enabled.
4632         (bus_selinux_post_init): Do everything else.
4633
4634         * bus/main.c (main): Call bus_selinux_pre_init before parsing
4635         config file, and bus_selinux_post_init after.  This ensures that
4636         we don't lose the policyreload notification thread that
4637         bus_selinux_init created before forking previously.
4638         
4639         * bus/test-main.c (test_pre_hook): Update for split.
4640
4641 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
4642
4643         Patch from Johan Fischer <linux@fischaz.com>
4644         
4645         * mono/doc/Makefile.am (install-data-local): Added directory
4646         install for DESTDIR
4647
4648 2004-10-29  Colin Walters  <walters@redhat.com>
4649
4650         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
4651         parameter for fd to write pid to.       
4652
4653         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
4654         
4655         * bus/bus.c (bus_context_new): Pass print_pid_fd
4656         to _dbus_become_daemon (bug #1720)
4657
4658 2004-10-29  Colin Walters  <walters@redhat.com>
4659
4660         Patch from Ed Catmur <ed@catmur.co.uk>
4661
4662         * mono/doc/Makefile.am (install-data-local): Handle
4663         DESTDIR.
4664
4665 2004-10-29  Colin Walters  <walters@redhat.com>
4666
4667         * bus/.cvsignore, qt/.cvsignore: Update.
4668
4669 2004-10-29  Colin Walters  <walters@redhat.com>
4670
4671         Patch from Kristof Vansant <de_lupus@pandora.be>
4672
4673         * configure.in: Detect Slackware.
4674         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
4675         * bus/rc.messagebus.in: New file.
4676
4677 2004-10-29  Colin Walters  <walters@redhat.com>
4678
4679         * tools/dbus-monitor.c (filter_func): Return
4680         DBUS_HANDLER_RESULT_HANDLED in filter function
4681         for now.  See:
4682         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
4683
4684 2004-10-29  Colin Walters  <walters@redhat.com>
4685
4686         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
4687
4688         * bus/services.c (bus_registry_acquire_service): 
4689         Correctly retrieve service name from DBusString
4690         for printing.
4691
4692 2004-10-29  Colin Walters  <walters@redhat.com>
4693
4694         * dbus/dbus-glib.h: Update documentation to not
4695         refer to internal APIs.
4696
4697 2004-10-27  Joe Shaw  <joeshaw@novell.com>
4698
4699         * mono/Arguments.cs (GetDBusTypeConstructor):
4700         type.UnderlyingSystemType will return "System.Byte" if you do it
4701         on "byte[]", which is not what we want.  So check the type.IsArray
4702         property and use System.Array instead.
4703
4704 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
4705
4706         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
4707         the DBusUserInfo structure since this is passed into the function.
4708         This would cause a double free when the function that allocated
4709         the structure would try to free it when an error occured.
4710
4711         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
4712         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
4713         for service activation to avoid 32bit/64bit parallel install issues
4714
4715 2004-10-21  Colin Walters  <walters@verbum.org>
4716
4717         * AUTHORS: Fix my email address, the @gnu.org one
4718         has been bouncing for some time.  Also add J5.
4719         
4720 2004-10-21  Colin Walters  <walters@verbum.org>
4721
4722         * dbus/dbus-transport-unix.c (do_authentication): Return
4723         authentication status to callers.
4724         (unix_handle_watch): If we completed authentication this round,
4725         don't do another read.  Instead wait until the next iteration,
4726         after we've read any pending data in the auth buffer.
4727         (unix_do_iteration): Ditto.
4728         (unix_handle_watch): Updated for new do_authentication prototype.
4729
4730 2004-10-18  Colin Walters  <walters@verbum.org>
4731
4732         * bus/selinux.c (bus_selinux_enabled): Handle
4733         --disable-selinux case.
4734         
4735 2004-10-18  Colin Walters  <walters@verbum.org>
4736
4737         * bus/selinux.h: Add bus_selinux_enabled.
4738         
4739         * bus/selinux.c (bus_selinux_enabled): Implement it.
4740         
4741         * bus/config-parser.c (struct include): Add
4742         if_selinux_enabled member.
4743         (start_busconfig_child): Parse if_selinux_enabled
4744         attribute for include.
4745         (bus_config_parser_content): Handle it.
4746
4747         * bus/session.conf.in, bus/system.conf.in: Add
4748         inclusion of context mapping to default config files;
4749         conditional on SELinux being enabled.
4750         
4751         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
4752         
4753         * test/data/invalid-config-files/badselinux-1.conf, 
4754         test/data/invalid-config-files/badselinux-2.conf:
4755         Test files for bad syntax.
4756         
4757 2004-10-17  Colin Walters  <walters@verbum.org>
4758
4759         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
4760         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
4761         format specifier mismatches.
4762
4763 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4764
4765         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
4766         format string.
4767
4768         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
4769         pointer (bug #1540, Leonardo Boiko).
4770
4771 2004-09-28  Jon Trowbridge  <trow@ximian.com>
4772
4773         * mono/BusDriver.cs: Changed BusDriver struct to remove
4774         the ServiceCreated and ServiceDeleted events and replace them
4775         with the new ServiceOwnerChanged event.
4776
4777         * mono/example/BusListener.cs: Added a new example program,
4778         which listens for and reports any ServiceOwnerChanged events
4779         on the bus driver.
4780
4781         * mono/example/Makefile.am (DESTDIR): Build changes for the
4782         new BusListener.cs example.
4783
4784 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4785
4786         * bus/signals.c (bus_match_rule_parse): validate the components of
4787         match rules (bug #1439).
4788
4789         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
4790
4791 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4792
4793         * doc/dbus-specification.xml: document ServiceOwnerChanged
4794         signal.
4795         
4796         * bus/driver.c, bus/driver.h, bus/services.c: Use
4797         ServiceOwnerChanged signal instead of ServiceCreated and
4798         ServiceDeleted.
4799         
4800         * bus/dispatch.c: update testcase for the new signal.
4801
4802 2004-09-20  Jon Trowbridge  <trow@ximian.com>
4803
4804         Patch from Nat Friedman <nat@novell.com>
4805
4806         * mono/Makefile.am: A number of small build fixes to allow "make
4807         distcheck" to succeed.
4808
4809         * mono/example/Makefile.am: "make distcheck" fixes.
4810
4811         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
4812         key in @srcdir@.
4813
4814         * test/Makefile.am: "make distcheck" fixes.
4815
4816 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4817
4818         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
4819
4820         * doc/busconfig.dtd: update the DTD for the at_console attribute.
4821
4822         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
4823         messages after the first one (bug #1389).
4824         
4825         * bus/dispatch.c (check_double_hello_message): add a test case for
4826         the double hello message bug.
4827         (check_existent_service_activation): fix check of spawning error.
4828         
4829 2004-09-16  David Zeuthen  <david@fubar.dk>
4830
4831         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
4832
4833 2004-09-12  David Zeuthen  <david@fubar.dk>
4834
4835         Patch from Kay Sievers <kay.sievers@vrfy.org>
4836
4837         * bus/bus.c (bus_context_new):
4838         * bus/bus.h:
4839         * bus/main.c (usage)
4840         (main):
4841         Add commandline option --nofork to override configuration file
4842         setting.
4843
4844 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4845
4846         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
4847         compilers don't like it (bug #974).
4848
4849 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
4850
4851         * qt/connection.*: Applied patch by Jérôme Lodewyck
4852         <lodewyck@clipper.ens.fr> to integrate an existing
4853         connection into the Qt eventloop
4854
4855 2004-08-30  Jon Trowbridge  <trow@ximian.com>
4856
4857         * mono/BusDriver.cs: Added.  This is a class for interacting with
4858         the org.freedesktop.DBus service.
4859
4860         * mono/Message.cs: Added a mechanism to expose the message that is
4861         currently being dispatched via the static Message.Current
4862         property.  Added Message.Sender and Message.Destination
4863         properties.
4864
4865         * mono/Handler.cs: Expose the dispatched message via
4866         Message.Current when handling method calls.
4867
4868         * mono/Service.cs: Expose the dispatched message via
4869         Message.Current when handling signal emissions.
4870         
4871         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
4872         Connection.BaseService property.
4873
4874 2004-08-28  Havoc Pennington  <hp@redhat.com>
4875
4876         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
4877
4878         More fixes from Steve Grubb
4879         
4880         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
4881         (_dbus_listen_tcp_socket): fix fd leak
4882
4883         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
4884         EINTR to a bit lower in the code
4885
4886 2004-08-26  Jon Trowbridge  <trow@ximian.com>
4887
4888         * bus/driver.c (bus_driver_handle_service_exists): Respond with
4889         TRUE if we are inquiring about the existence of the built-in
4890         org.freedesktop.DBus service.
4891
4892 2004-08-25  John Palmieri  <johnp@redhat.com>
4893         * bus/config-parser.c:
4894         (struct PolicyType): Add POLICY_CONSOLE
4895         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
4896         (start_busconfig_child): Sets up console element when
4897         <policy at_console=""> is encountered in a policy file
4898         (append_rule_from_element): Convert console elements to console
4899         rules.
4900
4901         * bus/policy.c: 
4902         (bus_policy_create_client_policy): Add console rules to the client
4903         policy based on if the client is at the console
4904         (bus_policy_append_console_rule): New function for adding a
4905         console rule to a policy
4906         (bus_policy_merge): Handle console rule merging
4907
4908         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
4909         where we check for console user files
4910         
4911         * dbus/dbus-sysdeps.c:
4912         (_dbus_file_exists): New function which checks if the given
4913         file exists
4914         (_dbus_user_at_console): New function which does the system
4915         specific process of checking if the user is at the console
4916
4917         * dbus/dbus-userdb.c:
4918         (_dbus_is_console_user): New function converts a UID to user name
4919         and then calls the system specific _dbus_user_at_console to 
4920         see if the user is at the console and therefor a console user
4921
4922 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4923
4924         * bus/config-parser.c (set_limit):
4925         * bus/dbus-daemon-1.1.in:
4926         * test/data/valid-config-files/many-rules.conf: set the
4927         max_match_rules_per_connection limt from the config file. 
4928
4929         * doc/busconfig.dtd: update the DTD.
4930
4931         * bus/driver.c: remove some unused variables.
4932
4933 2004-08-24  Mikael Hallendal  <micke@imendio.com>
4934
4935         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
4936         it's been replaced by dbus_g_bus_get
4937
4938 2004-08-23  Colin Walters  <walters@redhat.com>
4939
4940         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
4941
4942         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
4943
4944         * bus/selinux.c: Create a thread for policy reload notification.
4945         (bus_selinux_get_policy_root): Implement.
4946
4947         * bus/config-parser.c (start_busconfig_child)
4948         (bus_config_parser_content): Support SELinux-root relative
4949         inclusion.
4950
4951         * configure.in <HAVE_SELINUX>: Add -lpthread.
4952         
4953         * bus/test-main.c (test_pre_hook, test_post_hook): New.
4954         (test_post_hook): Move memory checking into here.
4955         (test_pre_hook, test_post_hook): Move SELinux checks in
4956         here, but conditional on a DBUS_TEST_SELINUX environment
4957         variable.  Unfortunately we can't run the SELinux checks
4958         as a normal user, since they won't have any permissions
4959         for /selinux.  So this will have to be tested manually
4960         for now, until we have virtualization for most of
4961         libselinux.
4962         
4963 2004-08-23  Havoc Pennington  <hp@redhat.com>
4964
4965         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
4966         drop supplementary groups, suggested by Steve Grubb
4967
4968 2004-08-20  Colin Walters  <walters@redhat.com>
4969
4970         * bus/config-parser.c (start_busconfig_child): Remove some unused
4971         variables.
4972         
4973         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
4974         warning.
4975
4976 2004-08-17  Joe Shaw  <joeshaw@novell.com>
4977
4978         * configure.in: If --enable-mono is passed in, if we can't find
4979         mono error out.
4980
4981         * mono/Makefile.am: Use /gacutil to install assemblies into the
4982         GAC and not /root.
4983
4984 2004-08-12  Havoc Pennington  <hp@redhat.com>
4985
4986         * NEWS: update for 0.22
4987
4988         * configure.in: release 0.22
4989
4990 2004-08-11  Colin Walters  <walters@redhat.com>
4991
4992         * tools/dbus-send.c (main, usage): Add --reply-timeout
4993         argument.
4994
4995 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4996
4997         * bus/bus.c (process_config_first_time_only): get rid of an unused
4998         DBusError that was causing a memoy leak (bug #989).
4999
5000         * dbus/dbus-keyring.c, dbus/dbus-message.c:
5001         fix compilation on Solaris/Forte C (bug #974)
5002
5003         * bus/main.c (main): plug two minuscule memleaks.
5004
5005 2004-08-10  Havoc Pennington  <hp@redhat.com>
5006
5007         * doc/dbus-tutorial.xml: add some more info on GLib bindings
5008
5009 2004-08-09  Havoc Pennington  <hp@redhat.com>
5010
5011         * COPYING: switch to Academic Free License version 2.1 instead of
5012         2.0, to resolve complaints about patent termination clause.
5013
5014 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
5015
5016         * README: added documentation for the --enable-python 
5017         configure switch.
5018
5019 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5020
5021         * bus/config-parser.c (bus_config_parser_new): fix an invalid
5022         _unref in the SELinux support.
5023
5024         * doc/busconfig.dtd: update DTD for SELinux support.
5025
5026         * bus/config-loader-libxml.c: fix error handler and parser
5027         initialisation/cleanup. OOM test now works with libxml2 HEAD.
5028
5029         * configure.in: remove the warning about libxml2.
5030
5031         * dbus/dbus-bus.c: silence doxygen warning.
5032
5033 2004-07-31  Colin Walters  <walters@redhat.com>
5034
5035         * configure.in: Move #error in SELinux check to its own line.
5036
5037 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5038
5039         * dbus/dbus-internals.h (_DBUS_SET_OOM):
5040         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
5041         dbus_error_set.
5042
5043         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
5044         broken by the change in the _SET_OOM macros.
5045
5046 2004-07-31  Colin Walters  <walters@redhat.com>
5047
5048         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
5049         BUS_SET_OOM.
5050
5051 2004-07-31  Colin Walters  <walters@redhat.com>
5052
5053         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
5054         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
5055         AC_MSG_CHECKING.
5056
5057 2004-07-24  Havoc Pennington  <hp@redhat.com>
5058
5059         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5060
5061         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
5062         functionality
5063
5064         * configure.in: add --enable-selinux
5065         
5066         * bus/policy.c (bus_policy_merge): add FIXME to a comment
5067
5068         * bus/main.c (main): initialize and shut down selinux
5069
5070         * bus/connection.c: store SELinux ID on each connection, to avoid 
5071         repeated getting of the string context and converting it into 
5072         an ID
5073
5074         * bus/bus.c (bus_context_get_policy): new accessor, though it
5075         isn't used
5076         (bus_context_check_security_policy): check whether the security
5077         context of sender connection can send to the security context of
5078         recipient connection
5079
5080         * bus/config-parser.c: add parsing for <selinux> and <associate>
5081         
5082         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
5083         implement dbus_connection_get_unix_fd()
5084
5085         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
5086         function, used by the selinux stuff
5087         
5088 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5089
5090         * bus/config-loader-libxml.c: complete the implementation of
5091         libxml backend for config file loader. Doesn't work with full OOM
5092         test yet. 
5093         
5094         * configure.in: change error when selecting libxml into a warning.
5095         
5096         * test/data/invalid-config-files: add two non-well-formed XML
5097         files. 
5098         
5099         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
5100         
5101         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
5102         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
5103         be necessary to read all the buffer. (bug #894)
5104
5105         * bus/activation.c (bus_activation_activate_service): fix a
5106         potential assertion failure (bug #896). Small optimization in the
5107         case of auto-activation messages.
5108
5109         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
5110         add test case for byte-through-vararg bug (#901). patch by Kimmo
5111         Hämäläinen. 
5112
5113 2004-07-28  Anders Carlsson  <andersca@gnome.org>
5114
5115         * python/dbus.py:
5116         * python/dbus_bindings.pyx.in:
5117         Add dbus.init_gthreads (), allow emit_signal to pass
5118         arguments to the signal.
5119         
5120 2004-07-24  Havoc Pennington  <hp@redhat.com>
5121
5122         * AUTHORS: add some people, not really comprehensively, let me
5123         know if I missed you
5124
5125 2004-07-24  Havoc Pennington  <hp@redhat.com>
5126
5127         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
5128         Owen
5129
5130         * test/Makefile.am (DIST_SUBDIRS): here also
5131
5132 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5133
5134         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
5135         breaking build on Solaris, reported by Farhad Saberi on the ML.
5136
5137         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
5138         va_arg invocation to account for integer promotion in the case of
5139         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
5140
5141         * bus/services.c (bus_service_remove_owner): fix bug #902, use
5142         _dbus_list_get_first_link, not _dbus_list_get_first.
5143
5144         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
5145
5146         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
5147         handler functions so that the asserts in _dbus_object_subtree_unref
5148         do not fail.
5149
5150         * dbus/dbus-transport-unix.c (do_reading):
5151         _dbus_transport_queue_messages return value is of type
5152         dbus_bool_t, not DBusDispatchStatus.
5153         
5154 2004-07-19  David Zeuthen  <david@fubar.dk>
5155
5156         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
5157
5158         * bus/dispatch.c:
5159         (check_get_connection_unix_user): Debug says GetProperty; but the
5160         method is called GetConnectionUnixUser
5161         (check_get_connection_unix_process_id): New function
5162         (bus_dispatch_test): Actually call check_get_connection_unix_user();
5163         also call check_get_connection_unix_process_id()
5164         
5165         * bus/driver.c:
5166         (bus_driver_handle_get_connection_unix_process_id): New function,
5167         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
5168         interface
5169         
5170         * dbus/dbus-auth.c:
5171         (handle_server_data_external_mech): Set pid from the credentials
5172         obtained from the socket
5173         
5174         * dbus/dbus-connection.c:
5175         (dbus_connection_get_unix_process_id): New function
5176         
5177         * dbus/dbus-connection.h: 
5178         Add prototype for dbus_connection_get_unix_process_id
5179         
5180         * dbus/dbus-transport.c:
5181         (_dbus_transport_get_unix_process_id): New function
5182         
5183         * dbus/dbus-transport.h:
5184         Add prototype for _dbus_transport_get_unix_process_id
5185         
5186 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5187
5188         * dbus/dbus-message.c: Message counter fix, patch by Christian
5189         Hammond <chipx86@gnupdate.org>
5190
5191 2004-07-18  Seth Nickell  <seth@gnome.org>
5192
5193         * python/dbus.py:
5194         * python/dbus_bindings.pyx.in:
5195         * python/tests/test-client.py:
5196
5197         Add dbus.ByteArray and dbus_bindings.ByteArray
5198         types so that byte streams can be passed back.
5199
5200         Give jdahlin the heaps of credit that are so
5201         rightfully his.
5202         
5203 2004-07-12  Seth Nickell  <seth@gnome.org>
5204
5205         * python/dbus.py:
5206
5207         Add message argument to the default object_method_handler
5208         function.
5209         
5210         * python/dbus_bindings.pyx.in:
5211
5212         Automatically return NIL when passed an empty list
5213         (we can't pass back a list since lists are typed
5214         and we don't have any idea what type the the client
5215         intended the list to be... :-( )
5216         
5217 2004-07-10  Seth Nickell  <seth@gnome.org>
5218
5219         * python/examples/Makefile.am:
5220
5221         Fix distcheck breakage caused by new examples.
5222
5223 2004-07-10  Seth Nickell  <seth@gnome.org>
5224
5225         * python/dbus.py:
5226
5227         Add "message" argument to service-side dbus.Object
5228         methods. This will break existing services written
5229         using the python bindings, but will allow extraction
5230         of all the message information (e.g. who its from).
5231
5232         Add improved "object oriented" signal handling/emission.
5233         
5234         * python/examples/example-service.py:
5235
5236         Nix this example.
5237         
5238         * python/examples/example-signal-emitter.py:
5239         * python/examples/example-signal-recipient.py:
5240
5241         Two new examples that show how to emit and receive
5242         signals using the new APIs.
5243         
5244         * python/examples/example-signals.py:
5245         * python/examples/gconf-proxy-service.py:
5246         * python/examples/gconf-proxy-service2.py:
5247
5248         Add "message" argument to service methods.
5249
5250 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
5251
5252         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
5253         * dbus/bus.c (dbus_bus_get_unix_user)
5254         * doc/dbus-specification.xml: implement GetConnectionUnixUser
5255         method of org.freedesktop.DBus interface.
5256
5257         * bus/dispatch.c: test case
5258
5259 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
5260
5261         * python/Makefile.am: switched include directory from glib/ to dbus/
5262         since dbus-glib.h moved
5263  
5264 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5265
5266         * configure.in: prevent building the gcj stuff and libxml loader
5267         since they are broken.
5268
5269 2004-06-20  Havoc Pennington  <hp@redhat.com>
5270
5271         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
5272         codes from the dbus error names
5273         
5274         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
5275         as dbus/dbus-glib.h and that breakage is now visible due to 
5276         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
5277         
5278         * glib/dbus-glib.h: s/gproxy/g_proxy/
5279
5280         * dbus/dbus-shared.h: new header to hold stuff shared with
5281         binding APIs
5282         
5283         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
5284         than dbus-errors.h
5285
5286         * glib/dbus-glib.h (dbus_set_g_error): move to
5287         dbus-glib-lowlevel.h
5288
5289         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
5290         of stuff to enable this
5291
5292         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
5293
5294         * a bunch of other changes with the same basic "separate glib 
5295         bindings from dbus.h" theme
5296         
5297 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
5298
5299         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
5300
5301         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
5302
5303 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5304
5305         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
5306         the reply value of the ServiceExists message.
5307
5308 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
5309
5310         * python/dbus_bindings.pyx.in: No longer need to parse path
5311         elements and pass them as arrays of strings.  The C API now
5312         accepts plain path strings.
5313         (_build_parsed_path): removed 
5314
5315 2004-06-07  Havoc Pennington  <hp@redhat.com>
5316
5317         * doc/TODO: remove auto-activation item since it's done; sort
5318         items by importance/milestone
5319
5320 2004-06-07  Havoc Pennington  <hp@redhat.com>
5321
5322         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
5323         random signature when using REQUIRED_FIELDS (this hack won't work
5324         in the long term)
5325
5326         * dbus/dbus-message.c: change the signature to be a header field,
5327         instead of message->signature special-case string. Incremental
5328         step forward. Then we can fix up code to send the signature in the
5329         message, then fix up code to validate said signature, then fix up
5330         code to not put the typecodes inline, etc.
5331         (load_one_message): don't make up the signature after the fact
5332         (decode_header_data): require signature field for the known
5333         message types
5334
5335         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
5336
5337         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
5338
5339 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
5340
5341         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5342
5343         * mono/Handler.cs: Updated to follow new path argument for
5344         (un-)registering objects.
5345
5346         * mono/example/Makefile.am:
5347         * mono/Makefile.am:
5348         * configure.in: Bumped required version for mono and use new -pkg
5349         syntax for deps
5350
5351 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5352
5353         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
5354         registration functions take the path argument as char* instead of
5355         char**.
5356
5357         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
5358         split off the path decompostion part of
5359         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
5360         warnings. 
5361
5362         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
5363         
5364 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5365  
5366         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
5367         machine approach.  A state is implemented as a function that
5368         handles incoming events as specified for that state.
5369         
5370         * doc/dbus-specification.xml: Update auth protocol state machine
5371         specification to match implementation.  Remove some leftover
5372         base64 examples.
5373
5374 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
5375
5376         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
5377         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
5378         quiet doxygen.
5379
5380         * Doxyfile.in: remove deprecated options.
5381
5382         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
5383         glib/test-thread.h, glib/test-thread-client.c,
5384         glib/test-thread-server.c, glib/test-profile.c,
5385         glib/test-dbus-glib.c: remove these unused files.
5386
5387 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5388
5389         * dbus/dbus-object-tree.c
5390         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
5391         non-fallback handlers (bug #684).
5392         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
5393         (find_subtree_recurse): report wether the returned subtree is an
5394         exact match or a "fallback" match higher up in the tree.
5395         (object_tree_test_iteration): update test case.
5396
5397 2004-06-01  Seth Nickell  <seth@gnome.org>
5398
5399         * python/dbus_bindings.pyx.in:
5400         * python/tests/test-client.py:
5401
5402         Round off basic type support. Add dicts (yay!), and 
5403         remaining array types.
5404
5405         Make MessageIter more general so it works for dicts too.
5406
5407         Mark all loop variables as C integers.
5408         
5409 2004-05-31  Havoc Pennington  <hp@redhat.com>
5410
5411         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
5412         "in" before "out"
5413
5414         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
5415
5416         * glib/dbus-glib-tool.c (main): set up to have a --self-test
5417         option that runs the tests, and start filling in some code
5418         including for starters just dumping the interfaces to stdout
5419
5420         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
5421
5422         * test/data/valid-introspection-files/lots-of-types.xml: test of
5423         an example introspection file
5424
5425         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
5426         "node" (I think...)
5427
5428 2004-05-31  Seth Nickell  <seth@gnome.org>
5429
5430         * python/dbus_bindings.pyx.in:
5431         * python/tests/test-client.py:
5432
5433         Test Suite: 1
5434         Python Bindings: 0
5435
5436         Fix string array memory trashing bug... oops...
5437
5438 2004-05-30  Seth Nickell  <seth@gnome.org>
5439
5440         * python/dbus.py:
5441
5442         Add a nicer-but-less-flexible alternate API for handling 
5443         calls to virtual objects in dbus.ObjectTree.
5444
5445         Screw up the argument order to the dbus.Object constructor
5446         for consistency with dbus.ObjectTree (and to make dbus_methods
5447         optional for future extension)
5448         
5449         * python/examples/Makefile.am:
5450         * python/examples/gconf-proxy-service.py:
5451         * python/examples/gconf-proxy-service2.py:
5452
5453         Alternate implementation of gconf-proxy-service using the
5454         nicer dbus.ObjectTree API.
5455         
5456         * python/examples/example-service.py:
5457         * python/tests/test-server.py
5458
5459         Reverse the argument order to deal with dbus.Object constructor
5460         changes.
5461         
5462 2004-05-30  Seth Nickell  <seth@gnome.org>
5463
5464         * python/examples/example-client.py:
5465         * python/examples/example-service.py:
5466
5467         Take it back. Lists seem to work but they're broken
5468         in the test suite. Make the base examples use
5469         lists (works fine).
5470
5471 2004-05-30  Seth Nickell  <seth@gnome.org>
5472
5473         * python/dbus_bindings.pyx.in:
5474         * python/tests/test-client.py:
5475
5476         Add some more tests and fix errors that crop up.
5477         Unfortunately, currently it seems like marshalling
5478         and unmarshalling of lists is completely broken :-(
5479
5480 2004-05-30  Seth Nickell  <seth@gnome.org>
5481
5482         * python/dbus_bindings.pyx.in:
5483
5484         Add support for ObjectPath type.
5485
5486         * python/dbus.py:
5487
5488         Refactor message handling code to a common function.
5489         
5490         * python/tests/test-client.py:
5491         * python/tests/test-server.py:
5492
5493         Add tests that check to make sure values of all types
5494         can be echoed from a service w/o mangling.
5495         
5496 2004-05-29  Seth Nickell  <seth@gnome.org>
5497
5498         * python/dbus.py:
5499
5500         Add ObjectTree class which allows implementation
5501         of trees of "virtual" objects. Basically the python
5502         wrapper for "register_fallback".
5503         
5504         * python/examples/Makefile.am
5505         * python/examples/gconf-proxy-client.py:
5506         * python/examples/gconf-proxy-service.py:
5507
5508         Implement a simple GConf proxy service that supports
5509         get/set on string and int GConf keys using the ObjectTree.
5510         
5511 2004-05-29  Seth Nickell  <seth@gnome.org>
5512
5513         * python/dbus.py:
5514         * python/examples/example-client.py:
5515         * python/examples/example-service.py:
5516         * python/examples/list-system-services.py:
5517
5518         Add SessionBus, SystemBus and ActivationBus classes
5519         so you don't need to know the special little BUS_TYPE
5520         flag.
5521         
5522 2004-05-29  Havoc Pennington  <hp@redhat.com>
5523
5524         * bus/config-parser.c (process_test_valid_subdir): temporarily
5525         stop testing config parser OOM handling, since expat has issues
5526         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
5527
5528         * bus/dbus-daemon-1.1.in: change requested_reply to
5529         send_requested_reply/receive_requested_reply so we can send the
5530         replies, not just receive them.
5531
5532         * bus/config-parser.c: parse the new
5533         send_requested_reply/receive_requested_reply
5534
5535         * bus/policy.c (bus_client_policy_check_can_send): add
5536         requested_reply argument and use it
5537
5538         * bus/bus.c (bus_context_check_security_policy): pass through
5539         requested_reply status to message send check
5540
5541         * bus/system.conf.in: adapt to requested_reply change
5542         
5543 2004-05-28  Havoc Pennington  <hp@redhat.com>
5544
5545         * test/glib/test-service-glib.c (main): remove unused variable
5546
5547         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
5548
5549         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
5550         from the enum, no longer in use.
5551
5552         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
5553         works right.
5554
5555         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
5556         whether error_name passed in is a valid error name.
5557
5558 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
5559
5560         * dbus/dbus-message.c (dbus_message_get_args): Added support for
5561         OBJECT_PATH and OBJECT_PATH_ARRAY
5562
5563 2004-05-28  Seth Nickell  <seth@gnome.org>
5564
5565         * python/examples/Makefile.am:
5566
5567         Forget to add Makefile.am. Do not pass go.
5568
5569 2004-05-28  Michael Meeks  <michael@ximian.com>
5570
5571         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
5572         fix no int64 case.
5573
5574         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
5575
5576         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
5577         (_dbus_message_iter_get_basic_type_array): impl.
5578         drastically simplify ~all relevant _get methods to use these.
5579         (_dbus_message_iter_append_basic_array),
5580         (dbus_message_iter_append_basic): impl
5581         drastically simplify ~all relevant _append methods to use these.
5582
5583         * dbus/dbus-message-builder.c (parse_basic_type) 
5584         (parse_basic_array, lookup_basic_type): impl.
5585         (_dbus_message_data_load): prune scads of duplicate /
5586         cut & paste coding.
5587
5588         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
5589         (_dbus_demarshal_basic_type): implement,
5590         (demarshal_and_validate_len/arg): beef up debug.
5591         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
5592
5593 2004-05-27  Seth Nickell  <seth@gnome.org>
5594
5595         * configure.in:
5596         * python/Makefile.am:
5597
5598         Include the example python apps in the tarball.
5599         
5600         * python/examples/list-system-services.py
5601
5602         Add a python new example that fetches the list of services
5603         from the system bus.
5604         
5605 2004-05-27  Seth Nickell  <seth@gnome.org>
5606
5607         * python/dbus.py:
5608         * python/dbus_bindings.pyx.in:
5609
5610         Fix failure to notify that a signal was not handled,
5611         resulted in hung functions.
5612         
5613 2004-05-25  Colin Walters  <walters@redhat.com>
5614
5615         * tools/dbus-monitor.c (main): Monitor all types of messages.
5616
5617 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
5618
5619         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
5620         which unregisters the object path and disposes the handler.
5621
5622 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
5623  
5624         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
5625          
5626         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
5627         operands to && so we call dbus_message_iter_next () for the last
5628         argument also.
5629
5630 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5631
5632         * dbus/dbus-object-tree.c
5633         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
5634         children even if the requested path isn't registered.
5635         (object_tree_test_iteration): test object_tree_list_registered.
5636
5637         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
5638         it to 0.
5639         
5640 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
5641
5642         * doc/TODO: Remove resolved items.
5643
5644         * bus/expirelist.h (struct BusExpireList): remove unused n_items
5645         field.
5646         
5647         * bus/connection.c (bus_connections_expect_reply): Enforce the
5648         per-connection limit on pending replies.
5649         
5650         Patch from Jon Trowbridge <trow@ximian.com>:
5651  
5652         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
5653         up a watch that triggers a config reload when one end of the pipe
5654         becomes readable.
5655         (signal_handler): Instead of doing the config reload in our SIGHUP
5656         handler, just write to the reload pipe and let the associated
5657         watch handle the reload when control returns to the main loop.
5658  
5659         * bus/driver.c (bus_driver_handle_reload_config): Added.
5660         Implements a ReloadConfig method for requesting a configuration
5661         file reload via the bus driver.
5662  
5663 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
5664
5665         * HACKING: Updated release instructions concerning the wiki page.
5666
5667 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
5668
5669         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
5670         filter against auth->allowed_mechs; we only add allowed mechs in
5671         record_mechanisms().
5672  
5673         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
5674         ALLOWED_MECHS to auth-script format so we can set the list of
5675         allowed mechanisms.
5676  
5677         * data/auth/client-out-of-mechanisms.auth-script: New test to
5678         check client disconnects when it is out of mechanisms to try.
5679  
5680         * dbus/dbus-auth.c (process_command): Remove check for lines
5681         longer that 1 MB; we only buffer up maximum 16 kB.
5682  
5683         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5684         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
5685         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
5686         assume there might be unused bytes.
5687  
5688         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
5689         client-out-of-mechs, it is handled in process_reject(). Move check
5690         for max failures to send_rejected(), as it's a server-only thing.
5691
5692         * dbus/dbus-auth.c: Factor out protocol reply code into functions
5693         send_auth(), send_data(), send_rejected(), send_error(),
5694         send_ok(), send_begin() and send_cancel().
5695
5696 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
5697
5698         Remove base64 encoding, replace with hex encoding. Original patch
5699         from trow@ximian.com, added error handling.
5700
5701         * dbus/dbus-string.c (_dbus_string_base64_encode)
5702         (_dbus_string_base64_decode): Remove.
5703         (_dbus_string_hex_decode): Add end_return argument so we can
5704         distinguish between OOM and invalid hex encoding.
5705         (_dbus_string_test): Remove base64 tests and add test case for
5706         invalid hex.
5707
5708         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
5709         Replace base64 with hex.
5710
5711         * test/data/auth/invalid-hex-encoding.auth-script: New test case
5712         for invalid hex encoded data in auth protocol.
5713
5714 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5715
5716         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
5717         leak.
5718
5719 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5720
5721         * mono/dbus-sharp.dll.config.in: Added for GAC
5722         * mono/dbus-sharp.snk: Added for GAC
5723         * mono/Assembly.cs.in: Added for GAC
5724         * mono/Makefile.am: Changes for GAC installation        
5725         * configure.in: Added refs for dbus-sharp.dll.config.in and
5726         Assembly.cs.in. More fixes for mono testing
5727         * mono/example/Makefile.am: Changed var to CSC
5728         * Makefile.am: Changed flag name to DBUS_USE_CSC
5729
5730 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
5731
5732         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
5733         * mono/doc/*: Added documentation framework
5734         * configure.in: Added monodoc check
5735         * README: Added description of mono configure flags
5736
5737 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
5738
5739         * doc/dbus-specification.xml: Added a "Required" column to the 
5740         header fields table and changed the "zero or more" verbage in
5741         the above paragraph to read "The header must contain the required 
5742         named header fields and zero or more of the optional named header 
5743         fields".
5744         * test/data/invalid-messages/*.message: Added the required PATH 
5745         named header field to the tests so that they don't fail on 
5746         'Missing path field'
5747
5748 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
5749
5750         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
5751         the stack by implicitly defining variable and parameter types and
5752         removing the hack of defining C pointers as python objects and later
5753         casting them.
5754
5755 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
5756
5757         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
5758
5759 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
5760
5761         * mono/DBusType/Dict.cs: Handle empty dicts
5762         * mono/DBusType/Array.cs: Handle empty arrays
5763         * mono/Arguments.cs: Handle empty arguments
5764
5765 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
5766
5767         * dbus-sharp.pc.in: Modified to include include Libs and Requires
5768         field
5769
5770 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
5771
5772         * test/data/valid-messages/standard-*.message: Update message
5773         test scripts to new header field names.
5774
5775 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
5776
5777         * test/break-loader.c (randomly_do_n_things): tracked down buffer
5778         overflow to times_we_did_each_thing array which would chop off the
5779         first character of the failure_dir string. Increased the size of
5780         the array to 7 to reflect the number of random mutation functions
5781         we have.
5782
5783 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
5784
5785         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
5786         unix_server->watch here, it is unreffed in disconnect.
5787         (_dbus_server_new_for_tcp_socket): convert NULL host to
5788         "localhost" here so we don't append NULL to address.
5789         
5790         * dbus/dbus-server.c (_dbus_server_test): Add test case for
5791         various addresses, including tcp with no explicit host.
5792
5793 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5794
5795         * dbus/dbus-message.c (decode_header_data, decode_string_field):
5796         fix incorrect setting of .name_offset in the HeaderField (it was
5797         off by two bytes, positioned right after the name and typecode)
5798
5799         * bus/bus.c (bus_context_new, bus_context_unref): test before
5800         calling dbus_server_free_data_slot and _dbus_user_database_unref
5801         in case of an error.
5802
5803         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
5804         by libdbus-gtool.
5805
5806 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
5807
5808         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
5809         _dbus_poll() instead of select().
5810
5811 2004-04-15  Jon Trowbridge  <trow@ximian.com>
5812
5813         * bus/main.c (signal_handler): Reload the configuration files
5814         on SIGHUP.
5815         (main): Set up our SIGHUP handler.
5816
5817         * bus/bus.c (struct BusContext): Store the config file, user and
5818         fork flag in the BusContext.
5819         (process_config_first_time_only): Added.  Contains the code
5820         (previously in bus_context_new) for setting up the BusContext from
5821         the BusConfigParser that should only be run the first time the
5822         config files are read.
5823         (process_config_every_time): Added.  Contains the code (previously
5824         in bus_context_new) for setting up the BusContext from the
5825         BusConfigParser that should be run every time the config files are
5826         read.
5827         (load_config): Added.  Builds a BusConfigParser from the config
5828         files and passes the resulting structure off to
5829         process_config_first_time_only (assuming this is the first time)
5830         and process_config_every_time.
5831         (bus_context_new): All of the config-related code has been moved
5832         to process_config_first_time_only and process_config_every_time.
5833         Now this function just does the non-config-related initializations
5834         and calls load_config.
5835         (bus_context_reload_config): Added.
5836
5837 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5838
5839         * bus/driver.c (bus_driver_handle_get_service_owner):
5840         implement a GetServiceOwner method.
5841         * doc/dbus-specification.xml: document it.
5842         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
5843         
5844         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
5845         implement, using the bus GetServiceOwner method.
5846
5847         * test/glib/test-dbus-glib.c:
5848         use dbus_gproxy_new_for_service_owner so that we can receive the
5849         signal. 
5850
5851 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
5852
5853         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
5854         dbus/dbus-message.c, dbus/dbus-protocol.h
5855         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
5856
5857         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
5858         dbus/dbus-message.c, dbus/dbus-protocol.h
5859         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
5860
5861         * dbus/dbus-internals.c (_dbus_header_field_to_string):
5862         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
5863         DBUS_HEADER_FIELD_SENDER resolves to "sender"
5864
5865         * doc/dbus-specification.xml (Header Fields Table):
5866         s/SERVICE/DESTINATION
5867         s/SENDER_SERVICE/SENDER
5868
5869
5870 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
5871
5872         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
5873         a few seconds.
5874
5875 2004-04-13  Michael Meeks  <michael@ximian.com>
5876
5877         * glib/dbus-gobject.c (handle_introspect): split out
5878         (introspect_properties): this.
5879         (handle_introspect): implement this.
5880
5881         * test/glib/Makefile.am: use the absolute path so the bus
5882         daemon's chdir ("/") doesn't kill us dead.
5883
5884         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
5885
5886 2004-04-12  Jon Trowbridge  <trow@ximian.com>
5887
5888         * bus/config-parser.c (struct BusConfigParser): Added
5889         included_files field.
5890         (seen_include): Added.  Checks whether or not a file has already
5891         been included by any parent BusConfigParser.
5892         (bus_config_parser_new): Copy the parent's included_files.
5893         (include_file): Track which files have been included, and fail on
5894         circular inclusions.
5895         (process_test_valid_subdir): Changed printf to report if we are
5896         testing valid or invalid conf files.
5897         (all_are_equiv): Changed printf to be a bit clearer about
5898         what we are actually doing.
5899         (bus_config_parser_test): Test invalid configuration files.
5900
5901 2004-04-09  Jon Trowbridge  <trow@ximian.com>
5902
5903         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
5904         argument.  If non-null, the newly-constructed BusConfigParser will
5905         be initialized with the parent's BusLimits instead of the default
5906         values.
5907         (include_file): When including a config file, pass in
5908         the current parser as the parent and then copy the BusLimits
5909         from the included BusConfigParser pack to the current parser.
5910         (process_test_valid_subdir): Renamed from process_test_subdir.
5911         (process_test_equiv_subdir): Added.  Walks through a directory,
5912         descending into each subdirectory and loading the config files
5913         it finds there.  If any subdirectory contains two config files
5914         that don't produce identical BusConfigParser structs, fail.
5915         For now, the BusConfigParser's BusPolicies are not compared.
5916         (bus_config_parser_test): Call both process_test_valid_subdir and
5917         process_test_equiv_subdir.
5918
5919         * bus/config-loader-libxml.c (bus_config_load): Take a parent
5920         argument and pass it along to the call to bus_config_parser_new.
5921         Also made a few small changes to allow this code to compile.
5922
5923         * bus/config-loader-expat.c (bus_config_load): Take a parent
5924         argument and pass it along to the call to bus_config_parser_new.
5925
5926         * bus/bus.c (bus_context_new): Load the config file
5927         with a NULL parent argument.
5928
5929 2004-03-29  Michael Meeks  <michael@ximian.com>
5930
5931         * glib/dbus-gobject.c (introspect_properties): split
5932         out, fix mangled 'while' flow control.
5933         (introspect_signals): implement.
5934         (handle_introspect): update.
5935
5936 2004-03-29  Michael Meeks  <michael@ximian.com>
5937
5938         * glib/dbus-gobject.c (set_object_property): split out / 
5939         re-work, use the property type, and not the message type(!)
5940         (get_object_property): ditto.
5941
5942         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
5943         (dbus_gvalue_marshal): make this code re-usable, needed
5944         for signals too, also on both proxy and server side.
5945         Re-write for more efficiency / readability.
5946
5947 2004-03-29  Michael Meeks  <michael@ximian.com>
5948
5949         * dbus/dbus-message.c
5950         (dbus_message_new_error_printf): impl.
5951
5952         * dbus/dbus-connection.c
5953         (dbus_connection_unregister_object_path): fix warning.
5954
5955         * configure.in: fix no-mono-installed situation.
5956
5957 2004-03-27  Havoc Pennington  <hp@redhat.com>
5958
5959         Patch from Timo Teräs:
5960         
5961         * tools/dbus-send.c (main): if --print-reply, assume type is
5962         method call; support boolean type args
5963         
5964         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
5965         bunch of memleak and logic bugs
5966         
5967 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
5968
5969         * mono/Arguments.cs:
5970         * mono/Introspector.cs:
5971         * mono/Handler.cs:
5972         * mono/InterfaceProxy.cs:
5973         * mono/Message.cs
5974         * mono/ProxyBuilder.cs:
5975         * mono/Service.cs:
5976         Added InterfaceProxy class to avoid building proxies for every
5977         object.
5978
5979         * dbus-message.h:
5980         * dbus-message.c (dbus_message_append_args_valist)
5981         (dbus_message_iter_get_object_path)
5982         (dbus_message_iter_get_object_path_array)
5983         (dbus_message_iter_append_object_path)
5984         (dbus_message_iter_append_object_path_array):
5985         Added object_path iter functions to handle OBJECT_PATH arguments
5986         
5987 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
5988
5989         First checkin of mono bindings.
5990         * configure.in:
5991         * Makefile.am:
5992         Build stuff for the bindings
5993         * dbus-sharp.pc.in: Added for pkgconfig
5994         
5995 2004-03-21  Havoc Pennington  <hp@redhat.com>
5996
5997         * test/test-service.c (main): remove debug spew
5998
5999 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6000
6001         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
6002         arrays
6003
6004         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
6005         (dbus_message_iter_init_array_iterator)
6006         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
6007         indicate whether the iterator is empty
6008
6009         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
6010         warnings
6011
6012 2004-03-19  Havoc Pennington  <hp@redhat.com>
6013
6014         * NEWS: 0.21 updates
6015
6016         * configure.in: 0.21
6017
6018         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
6019         
6020         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
6021         you don't need pyrex to make dist
6022
6023         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
6024         sources; run moc
6025         
6026 2004-03-18  Richard Hult  <richard@imendio.com>
6027
6028         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
6029         (dbus_message_set_auto_activation): Add doxygen docs.
6030
6031 2004-03-16  Richard Hult  <richard@imendio.com>
6032
6033         * bus/activation.c: (bus_activation_service_created),
6034         (bus_activation_send_pending_auto_activation_messages),
6035         (bus_activation_activate_service):
6036         * bus/activation.h:
6037         * bus/dispatch.c: (bus_dispatch),
6038         (check_nonexistent_service_auto_activation),
6039         (check_service_auto_activated),
6040         (check_segfault_service_auto_activation),
6041         (check_existent_service_auto_activation), (bus_dispatch_test):
6042         * bus/driver.c: (bus_driver_handle_activate_service):
6043         * bus/services.c: (bus_registry_acquire_service):
6044         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
6045         (dbus_message_get_auto_activation):
6046         * dbus/dbus-message.h:
6047         * dbus/dbus-protocol.h: Implement auto-activation.
6048         
6049         * doc/dbus-specification.xml: Add auto-activation to the spec.
6050
6051 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
6052
6053         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
6054         fix a bug with CUSTOM types.
6055
6056         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
6057         a unit test for this bug (used to fail).
6058
6059 2004-03-12  Mikael Hallendal  <micke@imendio.com>
6060
6061         * bus/activation.c:
6062         (babysitter_watch_callback): notify all pending activations waiting for
6063           the same exec that the activation failed.
6064         (bus_activation_activate_service): shortcut the activation if we 
6065           already waiting for the same executable to start up.
6066
6067 2004-03-12  Mikael Hallendal  <micke@imendio.com>
6068
6069         * bus/activation.c: 
6070         - Added service file reloading. 
6071           Each service files directory is kept in an hash table in 
6072           BusActivation and each BusActivationEntry knows what .service-file it
6073           was read from. So when you try to activate a service the bus will 
6074           check if it's been updated, removed or if new .service-files has 
6075           been installed.
6076         - Test code at the bottom for the service file reloading.
6077         * bus/test-main.c: (main):
6078         * bus/test.h:
6079         - added service reloading test.
6080         * dbus/dbus-sysdeps.c: 
6081         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
6082
6083 2004-03-08  Michael Meeks  <michael@ximian.com>
6084
6085         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
6086         bail immediately if disconnected, to avoid busy loop.
6087
6088         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
6089         cleanup cut/paste/inefficiency.
6090
6091 2004-03-01  David Zeuthen  <david@fubar.dk>
6092
6093         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
6094         bug where args were used twice. This bug resulted in a segfault
6095         on a Debian/PPC system when starting the messagebus daemon. Include
6096         dbus-sysdeps.h for DBUS_VA_COPY
6097
6098         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
6099
6100         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
6101         appropriate va_copy implementation. From GLib
6102         
6103 2004-02-24  Joe Shaw  <joe@ximian.com>
6104
6105         * bus/services.c (bus_registry_acquire_service): We need to pass
6106         in the service name to dbus_set_error() to prevent a crash.
6107
6108 2003-12-26  Anders Carlsson  <andersca@gnome.org>
6109
6110         * AUTHORS: Reveal my True identity.
6111
6112 2003-12-17  Mikael Hallendal  <micke@imendio.com>
6113
6114         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
6115         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
6116
6117 2003-12-13  Mikael Hallendal  <micke@imendio.com>
6118
6119         * doc/TODO: Added not about better error check of configuration files.
6120
6121 2003-12-02  Richard Hult  <richard@imendio.com>
6122
6123         * Update AFL version to 2.0 throughout the source files to reflect
6124         the update that was done a while ago.
6125
6126 2003-12-02  Richard Hult  <richard@imendio.com>
6127
6128         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
6129         wrote_dict_key to FALSE on the iter that the dict is appended to,
6130         just like when appending other types. Fixes a bug where a dict
6131         couldn't be put inside a dict.
6132         (dbus_message_iter_append_dict_key): Fix typo in warning message.
6133         (message_iter_test, _dbus_message_test): Add test case for dict
6134         inside dict.
6135
6136 2003-12-01  David Zeuthen  <david@fubar.dk>
6137
6138         * python/dbus.py: Add the actual message when calling the reciever
6139         of a signal such that parameters can be inspected. Add the method
6140         remove_signal_receiver
6141         
6142 2003-11-26  Mikael Hallendal  <micke@imendio.com>
6143
6144         * bus/*.[ch]:
6145         * dbus/*.[ch]:
6146         * glib/*.[ch]: Made ref functions return the pointer
6147
6148 2003-11-25  Zack Rusin  <zack@kde.org>
6149
6150         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
6151
6152         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
6153         wrappers,
6154
6155         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
6156         the Integrator and to better fit with the server,
6157
6158 2003-11-24  Zack Rusin  <zack@kde.org>
6159
6160         * qt/connection.h, qt/connection.cpp: removing initDbus method since
6161         the integrator handles it now
6162
6163         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
6164         since QTimer wasn't really meant to be used the way DBusTimeout is
6165
6166 2003-11-24  Zack Rusin  <zack@kde.org>
6167
6168         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
6169         Integrator class which integrates D-BUS with the Qt event loop,
6170
6171         * qt/connection.h, qt/connection.cpp: Move all the code which
6172         was dealing with D-BUS integration to the Integrator class,
6173         and start using Integrator,
6174
6175 2003-11-23  Zack Rusin  <zack@kde.org>
6176
6177         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
6178         wrapper
6179
6180         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
6181         switching namespaces to DBusQt, reworking the class,
6182
6183         * Makefile.cvs: switching dependencies so that it matches KDE 
6184         schematics,
6185         
6186         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
6187         the library
6188
6189 2003-11-19  Havoc Pennington  <hp@redhat.com>
6190
6191         * NEWS: update
6192
6193         * configure.in: bump version to 0.20
6194
6195         * configure.in (have_qt): add yet another place to look for qt
6196         (someone hand trolltech a .pc file...)
6197
6198 2003-11-01  Havoc Pennington  <hp@redhat.com>
6199
6200         * doc/dbus-specification.xml: add state machine docs on the auth
6201         protocol; just a first draft, I'm sure it's wrong.      
6202
6203 2003-10-28  David Zeuthen  <david@fubar.dk>
6204
6205         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
6206         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
6207         
6208 2003-10-28  Havoc Pennington  <hp@redhat.com>
6209
6210         * dbus/dbus-message.c (get_next_field): delete unused function
6211
6212 2003-10-28  Havoc Pennington  <hp@redhat.com>
6213
6214         * bus/expirelist.c (do_expiration_with_current_time): detect
6215         failure of the expire_func due to OOM
6216
6217         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
6218
6219         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
6220         NoReply error that's now created by the bus when the service exits
6221
6222 2003-10-28  Havoc Pennington  <hp@redhat.com>
6223
6224         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
6225         tests for set_path, set_interface, set_member, etc.
6226
6227         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
6228
6229         * dbus/dbus-message.c (set_string_field): always just delete and
6230         re-append the field; accept NULL for deletion
6231         (re_align_fields_recurse): reimplement
6232         
6233 2003-10-26  Havoc Pennington  <hp@redhat.com>
6234
6235         * dbus/dbus-connection.c: fix docs to properly describe the
6236         disconnected message
6237         (_dbus_connection_notify_disconnected): remove this function; 
6238         we can't synchronously add the disconnected message, we have to 
6239         do it after we've queued any remaining real messages
6240         (_dbus_connection_get_dispatch_status_unlocked): queue the
6241         disconnect message only if the transport has finished queueing all
6242         its real messages and is disconnected.
6243         (dbus_connection_disconnect): update the dispatch status here
6244
6245 2003-10-22  Havoc Pennington  <hp@redhat.com>
6246
6247         * bus/bus.c (bus_context_check_security_policy): fix up assertion
6248
6249         * bus/connection.c (bus_transaction_send_from_driver): set the
6250         destination to the connection's base service
6251
6252 2003-10-20  Havoc Pennington  <hp@redhat.com>
6253
6254         hmm, make check is currently not passing.
6255         
6256         * doc/dbus-specification.xml: add requirement that custom type
6257         names follow the same rules as interface names.
6258
6259         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
6260         duplication and allow 'c' to be 'custom'; dict is now 'm' for
6261         'map'
6262
6263         * doc/dbus-specification.xml: update type codes to match
6264         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
6265         CUSTOM. Add type OBJECT_PATH to the spec.
6266
6267 2003-10-17  Havoc Pennington  <hp@redhat.com>
6268
6269         * bus/driver.c (create_unique_client_name): use "." as separator
6270         in base service names instead of '-'
6271
6272         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
6273         byte at the end of the string
6274
6275         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
6276         optimization macros since string validation seems to be a slow
6277         point.
6278         
6279         * doc/dbus-specification.xml: restrict valid
6280         service/interface/member/error names. Add test suite code for the
6281         name validation.
6282
6283         * dbus/dbus-string.c: limit service/interface/member/error names 
6284         to [0-9][A-Z][a-z]_
6285
6286         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
6287         format arg to verbose spew
6288
6289         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
6290         memory, return instead of g_error
6291
6292         * test/test-service.c (path_message_func): support emitting a
6293         signal on request
6294
6295         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
6296         activation bus type if DBUS_BUS_ACTIVATION was set; default to
6297         assuming the activation bus was the session bus so that services
6298         started manually will still register.
6299         (init_connections_unlocked): fix so that in OOM situation we get
6300         the same semantics when retrying the function
6301         
6302         * test/test-service.c (main): change to use path registration, to
6303         test those codepaths; register with DBUS_BUS_ACTIVATION rather
6304         than DBUS_BUS_SESSION
6305
6306 2003-10-16  Havoc Pennington  <hp@redhat.com>
6307
6308         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
6309
6310         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
6311         coverage of the tests
6312         (coverage-report.txt): don't move the .da and .bbg files around
6313
6314 2003-10-16  Havoc Pennington  <hp@redhat.com>
6315
6316         * bus/bus.c (struct BusContext): remove struct field I didn't mean
6317         to put there
6318
6319 2003-10-16  Havoc Pennington  <hp@redhat.com>
6320
6321         * bus/connection.c (bus_pending_reply_expired): either cancel or
6322         execute, not both
6323         (bus_connections_check_reply): use unlink, not remove_link, as we
6324         don't want to free the link; fixes double free mess
6325
6326         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
6327         where no reply was received
6328
6329         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
6330         fix a refcount leak
6331
6332         * bus/signals.c (match_rule_matches): add special cases for the
6333         bus driver, so you can match on sender/destination for it.
6334
6335         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
6336         DBUS_PRINT_BACKTRACE is set
6337
6338         * dbus/dbus-internals.c: add pid to assertion failure messages
6339
6340         * dbus/dbus-connection.c: add message type code to the debug spew
6341
6342         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
6343         sender=foo not service=foo
6344
6345         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
6346         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
6347         DBUS_ACTIVATION_ADDRESS instead
6348
6349         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
6350         DBUS_SYSTEM_BUS_ADDRESS if appropriate
6351
6352         * bus/bus.c (bus_context_new): handle OOM copying bus type into
6353         context struct
6354
6355         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
6356         (dbus_message_iter_get_object_path_array): new function (half
6357         finished, disabled for the moment)
6358         
6359         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
6360         DBUS_MESSAGE_TYPE_ERROR
6361
6362         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
6363         avoid redirecting stderr to /dev/null
6364         (babysit): close stdin if not doing the "exit_with_session" thing
6365
6366         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
6367         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
6368         stdout/stdin, so things don't get confused
6369         
6370         * bus/system.conf.in: fix to allow replies, I modified .conf
6371         instead of .conf.in again.
6372
6373 2003-10-14  David Zeuthen  <david@fubar.dk>
6374
6375         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
6376         argtype to arg_type when raising unknown arg type exception.
6377         Changed type list to reflect the changes in dbus-protocol.h so 
6378         the bindings actually work.
6379
6380 2003-10-14  Havoc Pennington  <hp@redhat.com>
6381
6382         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
6383         to have a bug keeping it from outputting the .da files sometimes
6384         (string_get_string): don't append garbage nul bytes to the string.
6385
6386 2003-10-15  Seth Nickell  <seth@gnome.org>
6387
6388         * python/Makefile.am:
6389
6390         Include dbus_h_wrapper.h in the dist tarball.
6391
6392 2003-10-14  Havoc Pennington  <hp@redhat.com>
6393
6394         * bus/bus.c (bus_context_check_security_policy): revamp this to
6395         work more sanely with new policy-based requested reply setup
6396
6397         * bus/connection.c (bus_transaction_send_from_driver): set bus
6398         driver messages as no reply
6399
6400         * bus/policy.c (bus_client_policy_check_can_receive): handle a
6401         requested_reply attribute on allow/deny rules
6402
6403         * bus/system.conf: add <allow requested_reply="true"/>
6404
6405         * bus/driver.c (bus_driver_handle_message): fix check for replies
6406         sent to the bus driver, which was backward. How did this ever work
6407         at all though? I think I'm missing something.
6408
6409         * dbus/dbus-message.c (decode_header_data): require error and
6410         method return messages to have a reply serial field to be valid
6411         (_dbus_message_loader_queue_messages): break up this function;
6412         validate that reply serial and plain serial are nonzero; 
6413         clean up the OOM/error handling.
6414         (get_uint_field): don't return -1 from this
6415         (dbus_message_create_header): fix signed/unsigned bug
6416
6417         * bus/connection.c (bus_connections_expect_reply): save serial of
6418         the incoming message, not reply serial
6419
6420 2003-10-14  Havoc Pennington  <hp@redhat.com>
6421
6422         * bus/connection.c: implement pending reply tracking using
6423         BusExpireList
6424
6425         * bus/bus.c (bus_context_check_security_policy): verify that a
6426         reply is pending in order to allow a reply to be sent. Deny 
6427         messages of unknown type.
6428
6429         * bus/dbus-daemon-1.1.in: update to mention new resource limits
6430
6431         * bus/bus.c (bus_context_get_max_replies_per_connection): new
6432         (bus_context_get_reply_timeout): new
6433
6434 2003-10-13  Seth Nickell  <seth@gnome.org>
6435
6436         * python/Makefile.am:
6437
6438         Pass "make distcheck": remove a couple files from DIST_FILES
6439         that weren't included in the final version.
6440
6441 2003-10-12  Havoc Pennington  <hp@pobox.com>
6442
6443         Added test code that 1) starts an actual bus daemon and 2) uses
6444         DBusGProxy; fixed bugs that were revealed by the test. Lots 
6445         more testing possible, but this is the basic framework.
6446         
6447         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
6448         empty proxy lists from the proxy list hash
6449
6450         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
6451         couple of return_if_fail checks
6452
6453         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
6454         to allocate, so everything is cleared to NULL as it should be.
6455
6456         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
6457         source as data to dbus_connection_set_timeout_functions() as the 
6458         timeout functions expected
6459
6460         * test/glib/run-test.sh: add a little script to start up a message
6461         bus and run tests using it
6462
6463         * tools/dbus-launch.1: updates
6464
6465         * tools/dbus-launch.c (main): add --config-file option
6466
6467         * tools/dbus-launch.c (main): remove confusing else if (runprog)
6468         that could never be reached.
6469
6470         * dbus/dbus-message.c (dbus_message_new_method_return) 
6471         (dbus_message_new_error, dbus_message_new_signal): set the
6472         no-reply-expected flag on all these. Redundant, but may
6473         as well be consistent.
6474
6475 2003-10-11  Havoc Pennington  <hp@pobox.com>
6476
6477         * test/decode-gcov.c (function_solve_graph): make broken block
6478         graph a nonfatal error since it seems to be broken. Need to debug
6479         this.
6480
6481         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
6482         can't just check type > INVALID < LAST anymore
6483
6484         * dbus/dbus-message.c (dbus_message_get_signature): new function
6485         (dbus_message_has_signature): new function
6486         (struct DBusMessage): add signature field (right now it isn't sent
6487         over the wire, just generated on the fly)
6488         (dbus_message_copy): copy the signature, and init strings to
6489         proper length to avoid some reallocs
6490         (dbus_message_iter_init_array_iterator): return void, since it
6491         can't fail
6492         (dbus_message_iter_init_dict_iterator): return void since it can't fail
6493         (_dbus_message_loader_queue_messages): add silly temporary hack to
6494         fill in message->signature on load
6495
6496         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
6497         characters, so they are relatively human-readable.
6498
6499 2003-10-11  Havoc Pennington  <hp@pobox.com>
6500
6501         * dbus/dbus-message.c (_dbus_message_test): add more test
6502         coverage, but #if 0 for now since they uncover a bug 
6503         not fixed yet; I think in re_align_field_recurse()
6504         (re_align_field_recurse): add FIXME about broken assertion
6505
6506         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
6507
6508         * bus/connection.c: share a couple code bits with expirelist.c
6509
6510         * bus/expirelist.h, bus/expirelist.c: implement a generic
6511         expire-items-after-N-seconds facility, was going to share between
6512         expiring connections and replies, decided not to use for expiring
6513         connections for now.
6514
6515         * COPYING: include AFL 2.0 (still need to change all the file headers)
6516
6517 2003-10-09  Havoc Pennington  <hp@redhat.com>
6518
6519         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
6520         gcc 3.3. Not that we do anything about it yet.
6521
6522         * bus/signals.c (bus_match_rule_parse): impose max length on the
6523         match rule text
6524
6525         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
6526
6527 2003-10-09  Havoc Pennington  <hp@redhat.com>
6528
6529         Make matching rules theoretically work (add parser).
6530         
6531         * bus/bus.c (bus_context_check_security_policy): fix up to handle
6532         the case where destination is explicitly specified as bus driver
6533         and someone else is eavesdropping.
6534         
6535         * bus/policy.c (bus_client_policy_check_can_receive): fix up
6536         definition of eavesdropping and assertion
6537
6538         * tools/dbus-send.c (main): use dbus_message_type_from_string
6539
6540         * bus/signals.c (bus_match_rule_parse): implement
6541
6542         * dbus/dbus-message.c (dbus_message_type_from_string): new
6543
6544         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
6545
6546 2003-10-02  Havoc Pennington  <hp@pobox.com>
6547
6548         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
6549         dbus_gproxy_oneway_call
6550
6551         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
6552         (dbus_server_setup_with_g_main): fix to allow calling them more
6553         than once on the same args
6554         (dbus_bus_get_with_g_main): new function
6555
6556 2003-10-02  Havoc Pennington  <hp@redhat.com>
6557
6558         * doc/dbus-tutorial.xml: write some stuff
6559
6560 2003-09-29  Havoc Pennington  <hp@pobox.com>
6561
6562         * configure.in: split checks for Doxygen from XML docs, check for
6563         xmlto
6564
6565         * doc/Makefile.am: XML-ify all the docs, and add a blank
6566         dbus-tutorial.xml
6567
6568 2003-09-29  Havoc Pennington  <hp@pobox.com>
6569
6570         * Merge dbus-object-names branch. To see the entire patch 
6571         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
6572         it's huuuuge though.
6573         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
6574         
6575 2003-09-28  Havoc Pennington  <hp@pobox.com>
6576
6577         * HACKING: update to reflect new server
6578
6579 2003-09-26  Seth Nickell  <seth@gnome.org>
6580
6581         * python/dbus.py:
6582         * python/examples/example-signals.py:
6583
6584         Start implementing some notions of signals. The API
6585         is really terrible, but they sort of work (with the
6586         exception of being able to filter by service, and to
6587         transmit signals *as* a particular service). Need to
6588         figure out how to make messages come from the service
6589         we registered :-(
6590         
6591         * python/dbus_bindings.pyx.in:
6592
6593         Removed duplicate message_handler callbacks.
6594         
6595 2003-09-25  Havoc Pennington  <hp@redhat.com>
6596
6597         * bus/session.conf.in: fix my mess
6598
6599 2003-09-25  Havoc Pennington  <hp@pobox.com>
6600
6601         * bus/session.conf.in: fix security policy, reported by Seth Nickell
6602
6603 2003-09-25  Seth Nickell  <seth@gnome.org>
6604
6605         * python/examples/example-service.py:
6606
6607         Johan notices complete wrong code in example-service, but
6608         completely wrong in a way that works exactly the same (!).
6609         Johan is confused, how could this possibly work? Example
6610         code fails to serve purpose of making things clear.
6611         Seth fixes.
6612
6613 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
6614
6615         * doc/dbus-specification.sgml: don't require header fields
6616         to be 4-byte aligned and specify that fields should be
6617         distinguished from padding by the fact that zero is not
6618         a valid field name.
6619         
6620         * doc/TODO: remove re-alignment item and add item to doc
6621         the OBJECT_PATH type.
6622         
6623         * dbus/dbus-message.c:
6624         (HeaderField): rename the original member to value_offset
6625         and introduce a name_offset member to keep track of where
6626         the field actually begins.
6627         (adjust_field_offsets): remove.
6628         (append_int_field), (append_uint_field),
6629         (append_string_field): don't align the start of the header
6630         field to a 4-byte boundary.
6631         (get_next_field): impl finding the next marhsalled field
6632         after a given field.
6633         (re_align_field_recurse): impl re-aligning a number of
6634         already marshalled fields.
6635         (delete_field): impl deleting a field of any type and
6636         re-aligning any following fields.
6637         (delete_int_or_uint_field), (delete_string_field): remove.
6638         (set_int_field), (set_uint_field): no need to re-check
6639         that we have the correct type for the field.
6640         (set_string_field): ditto and impl re-aligning any
6641         following fields.
6642         (decode_header_data): update to take into account that
6643         the fields aren't 4-byte aligned any more and the new
6644         way to distinguish padding from header fields. Also,
6645         don't exit when there is too much header padding.
6646         (process_test_subdir): print the directory.
6647         (_dbus_message_test): add test to make sure a following
6648         field is re-aligned correctly after field deletion.
6649         
6650         * dbus/dbus-string.[ch]:
6651         (_dbus_string_insert_bytes): rename from insert_byte and
6652         allow the insert of multiple bytes.
6653         (_dbus_string_test): test inserting multiple bytes.
6654
6655         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
6656         warning note to docs about having to re-align any
6657         marshalled values following the string.
6658         
6659         * dbus/dbus-message-builder.c:
6660         (append_string_field), (_dbus_message_data_load):
6661         don't align the header field.
6662         
6663         * dbus/dbus-auth.c: (process_test_subdir): print the
6664         directory.
6665         
6666         * test/break-loader.c: (randomly_add_one_byte): upd. for
6667         insert_byte change.
6668         
6669         * test/data/invalid-messages/bad-header-field-alignment.message:
6670         new test case.
6671         
6672         * test/data/valid-messages/unknown-header-field.message: shove
6673         a dict in the unknown field.
6674
6675 2003-09-25  Seth Nickell  <seth@gnome.org>
6676
6677         * python/dbus.py:
6678         * python/dbus_bindings.pyx.in:
6679
6680         Handle return values.
6681         
6682         * python/examples/example-client.py:
6683         * python/examples/example-service.py:
6684
6685         Pass back return values from the service to the client.
6686         
6687 2003-09-24  Seth Nickell  <seth@gnome.org>
6688
6689         * python/dbus.py:
6690
6691         Connect Object methods (when you are sharing an object) up... pass
6692         in a list of methods to be shared. Sharing all the methods just
6693         worked out too weird. You can now create nice Services over the
6694         DBus in Python. :-)
6695         
6696         * python/dbus_bindings.pyx.in:
6697
6698         Keep references to user_data tuples passed into C functions so 
6699         Python doesn't garbage collect on us.
6700
6701         Implement MethodReturn and Error subclasses of Message for creating
6702         DBusMessage's of those types.
6703         
6704         * python/examples/example-client.py:
6705         * python/examples/example-service.py:
6706
6707         Simple example code showing both how create DBus services and objects,
6708         and how to use them.
6709
6710 2003-09-23  Havoc Pennington  <hp@pobox.com>
6711
6712         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
6713
6714 2003-09-23  Havoc Pennington  <hp@redhat.com>
6715
6716         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
6717         (dbus_gproxy_disconnect_signal): implement
6718         (dbus_gproxy_manager_remove_signal_match): implement
6719         (dbus_gproxy_manager_add_signal_match): implement
6720         (dbus_gproxy_oneway_call): implement
6721
6722 2003-09-23  Havoc Pennington  <hp@pobox.com>
6723
6724         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
6725         subclass. This means dropping the transparent thread safety of the
6726         proxy; you now need a separate proxy per-thread, or your own
6727         locking on the proxy. Probably right anyway.
6728         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
6729
6730 2003-09-22  Havoc Pennington  <hp@redhat.com>
6731
6732         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
6733
6734 2003-09-21  Seth Nickell  <seth@gnome.org>
6735
6736         First checkin of the Python bindings.
6737         
6738         * python/.cvsignore:
6739         * python/Makefile.am:
6740         * python/dbus_bindings.pyx.in:
6741         * python/dbus_h_wrapper.h:
6742
6743         Pieces for Pyrex to operate on, building a dbus_bindings.so
6744         python module for low-level access to the DBus APIs.
6745         
6746         * python/dbus.py:
6747
6748         High-level Python module for accessing DBus objects.
6749
6750         * configure.in:
6751         * Makefile.am:
6752
6753         Build stuff for the python bindings.
6754
6755         * acinclude.m4:
6756
6757         Extra macro needed for finding the Python C header files.
6758
6759 2003-09-21  Havoc Pennington  <hp@pobox.com>
6760
6761         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
6762         implementing the proxy manager, didn't get very far.
6763
6764         * dbus/dbus-bus.c (dbus_bus_add_match): new
6765         (dbus_bus_remove_match): new
6766
6767         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
6768         path_name argument; adjust the other not-yet-implemented 
6769         gproxy constructors to be what I think they should be.
6770
6771 2003-09-21  Havoc Pennington  <hp@pobox.com>
6772
6773         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
6774         by default for message bus connections.
6775
6776         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
6777         exit_on_disconnect flag is set and we process the disconnected
6778         signal.
6779         (dbus_connection_set_exit_on_disconnect): new function
6780
6781 2003-09-21  Havoc Pennington  <hp@pobox.com>
6782
6783         Get matching rules mostly working in the bus; only actually
6784         parsing the rule text remains. However, the client side of
6785         "signal connections" hasn't been started, this patch is only the
6786         bus side.
6787         
6788         * dbus/dispatch.c: fix for the matching rules changes
6789         
6790         * bus/driver.c (bus_driver_handle_remove_match)
6791         (bus_driver_handle_add_match): send an ack reply from these
6792         method calls
6793
6794         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
6795         arguments, reported by Seth Nickell
6796
6797         * bus/config-parser.c (append_rule_from_element): support
6798         eavesdrop=true|false attribute on policies so match rules 
6799         can be prevented from snooping on the system bus.
6800
6801         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
6802         and "destination" in attribute names; fix some docs bugs; 
6803         add eavesdrop=true|false attribute
6804
6805         * bus/driver.c (bus_driver_handle_add_match)
6806         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
6807         messages
6808
6809         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
6810         rid of broadcast service concept, signals are just always broadcast
6811
6812         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
6813         mostly implement matching rules stuff (currently only exposed as signal
6814         connections)
6815
6816 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
6817
6818         * doc/dbus-specification.sgml: Change the header field name
6819         to be an enum and update the rest of the spec to reference
6820         the fields using the conventinal name.
6821
6822         * dbus/dbus-protocol.h: update to reflect the spec.
6823
6824         * doc/TODO: add item to remove the 4 byte alignment requirement.
6825         
6826         * dbus/dbus-message.c: Remove the code to generalise the
6827         header/body length and serial number header fields as named
6828         header fields so we can reference field names using the 
6829         protocol values.
6830         (append_int_field), (append_uint_field), (append_string_field):
6831         Append the field name as a byte rather than four chars.
6832         (delete_int_or_uint_field), (delete_string_field): reflect the
6833         fact that the field name and typecode now occupy 4 bytes instead
6834         of 8.
6835         (decode_string_field), (decode_header_data): update to reflect
6836         protocol changes and move the field specific encoding from
6837         decode_string_field() back into decode_header_data().
6838         
6839         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
6840         Add utility to aid debugging.
6841         
6842         * dbus/dbus-message-builder.c:
6843         (append_string_field), (_dbus_message_data_load): Update to
6844         reflect protocol changes; Change the FIELD_NAME directive
6845         to HEADER_FIELD and allow it to take the field's conventional
6846         name rather than the actual value.
6847         
6848         * test/data/*/*.message: Update to use HEADER_FIELD instead
6849         of FIELD_NAME; Always align the header on an 8 byte boundary
6850         *before* updating the header length.
6851
6852 2003-09-15  Havoc Pennington  <hp@pobox.com>
6853
6854         * dbus/dbus-pending-call.c: add the get/set object data
6855         boilerplate as for DBusConnection, etc. Use generic object data
6856         for the notify callback.
6857
6858         * glib/dbus-gparser.c (parse_node): parse child nodes
6859
6860         * tools/dbus-viewer.c: more hacking on the dbus-viewer
6861         
6862         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
6863         contain functions shared between the convenience lib and the
6864         installed lib
6865
6866         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
6867         -export-symbols-regex to the GLib library
6868
6869         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
6870         fix the locking in here, and add a default handler for
6871         Introspect() that just returns sub-nodes.
6872
6873 2003-09-14  Havoc Pennington  <hp@pobox.com>
6874
6875         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
6876         rather than gfoo consistent
6877
6878         * glib/dbus-gproxy.h: delete for now, move contents to
6879         dbus-glib.h, because the include files don't work right since we
6880         aren't in the dbus/ subdir.
6881         
6882         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
6883         (dbus_gproxy_end_call): finish
6884         (dbus_gproxy_begin_call): finish
6885
6886         * glib/dbus-gmain.c (dbus_set_g_error): new
6887
6888         * glib/dbus-gobject.c (handle_introspect): include information
6889         about child nodes in the introspection
6890
6891         * dbus/dbus-connection.c (dbus_connection_list_registered): new
6892         function to help in implementation of introspection
6893
6894         * dbus/dbus-object-tree.c
6895         (_dbus_object_tree_list_registered_and_unlock): new function
6896
6897 2003-09-12  Havoc Pennington  <hp@pobox.com>
6898
6899         * glib/dbus-gidl.h: add common base class for all the foo_info
6900         types
6901
6902         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
6903         similar to kdcop
6904
6905         * test/Makefile.am: try test srcdir -ef . in addition to test
6906         srcdir = ., one of them should work (yeah lame)
6907         
6908         * glib/Makefile.am: build the "idl" parser stuff as a convenience
6909         library
6910         
6911         * glib/dbus-gparser.h: make description_load routines return
6912         NodeInfo* not Parser*
6913
6914         * Makefile.am (SUBDIRS): build test dir after all library dirs
6915
6916         * configure.in: add GTK+ detection
6917
6918 2003-09-07  Havoc Pennington  <hp@pobox.com>
6919
6920         * Make Doxygen contented.
6921
6922 2003-09-07  Havoc Pennington  <hp@pobox.com>
6923
6924         * doc/dbus-specification.sgml: more updates
6925
6926 2003-09-06  Havoc Pennington  <hp@pobox.com>
6927
6928         * doc/dbus-specification.sgml: partial updates
6929
6930         * bus/dbus-daemon-1.1.in: fix the config file docs for the
6931         zillionth time; hopefully I edited the right file this time.
6932
6933         * bus/config-parser.c (append_rule_from_element): support
6934         send_type, send_path, receive_type, receive_path
6935
6936         * bus/policy.c: add message type and path to the list of things
6937         that can be "firewalled"
6938
6939 2003-09-06  Havoc Pennington  <hp@pobox.com>
6940
6941         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
6942         (dbus_connection_register_object_path): make this not handle
6943         messages to paths below the given path
6944
6945 2003-09-03  Havoc Pennington  <hp@pobox.com>
6946
6947         * test/glib/Makefile.am: add this with random glib-linked test
6948         programs
6949
6950         * glib/Makefile.am: remove the random test programs from here,
6951         leave only the unit tests
6952
6953         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
6954         uscore/javacaps conversion, and fix     
6955         (get_object_property, set_object_property): change to .NET
6956         convention for mapping props to methods, set_FooBar/get_FooBar, 
6957         since one language has such a convention we may as well copy it. 
6958         Plus real methods in either getFooBar or get_foo_bar style won't 
6959         collide with this convention.
6960
6961 2003-09-01  Havoc Pennington  <hp@pobox.com>
6962
6963         * glib/dbus-gparser.c: implement
6964
6965         * glib/dbus-gobject.c: start implementing skeletons support
6966
6967         * configure.in: when disabling checks/assert, also define
6968         G_DISABLE_ASSERT and G_DISABLE_CHECKS
6969
6970 2003-09-01  Havoc Pennington  <hp@pobox.com>
6971
6972         * glib/Makefile.am: rearrange a bunch of files and get "make
6973         check" framework set up
6974
6975 2003-08-31  Havoc Pennington  <hp@pobox.com>
6976
6977         * fix build with --disable-tests
6978
6979 2003-08-30  Havoc Pennington  <hp@pobox.com>
6980
6981         * dbus/dbus-connection.c: purge DBusMessageHandler
6982
6983         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
6984         use callbacks everywhere
6985
6986 2003-08-30  Havoc Pennington  <hp@pobox.com>
6987
6988         * test/data/valid-config-files/system.d/test.conf: change to 
6989         root for the user so warnings don't get printed
6990
6991         * dbus/dbus-message.c: add dbus_message_get_path,
6992         dbus_message_set_path
6993         
6994         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
6995         dispatching to a path
6996
6997         * dbus/dbus-string.c (_dbus_string_validate_path): add
6998
6999         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
7000         (_dbus_marshal_object_path): implement
7001
7002         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
7003         to contain the path to the target object
7004         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
7005         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
7006
7007 2003-08-30  Havoc Pennington  <hp@pobox.com>
7008
7009         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
7010
7011 2003-08-29  Havoc Pennington  <hp@pobox.com>
7012
7013         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
7014         registered
7015         (struct DBusObjectSubtree): shrink this
7016         a lot, since we may have a lot of them
7017         (_dbus_object_tree_free_all_unlocked): implement
7018         (_dbus_object_tree_dispatch_and_unlock): implement
7019
7020 2003-08-29  Havoc Pennington  <hp@pobox.com>
7021
7022         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
7023
7024 2003-08-28  Havoc Pennington  <hp@pobox.com>
7025
7026         purge DBusObjectID
7027         
7028         * dbus/dbus-connection.c: port to no ObjectID, create a
7029         DBusObjectTree, rename ObjectTree to ObjectPath in public API
7030
7031         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
7032         everything except UnregisterFunction and MessageFunction
7033         
7034         * dbus/dbus-marshal.c: port away from DBusObjectID, 
7035         add DBUS_TYPE_OBJECT_PATH
7036         
7037         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
7038         dbus/dbus-objectid.[hc]: remove these, we are moving to 
7039         path-based object IDs
7040
7041 2003-08-25  Havoc Pennington  <hp@pobox.com>
7042
7043         Just noticed that dbus_message_test is hosed, I wonder when I
7044         broke that. I thought make check was passing earlier...
7045         
7046         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
7047         container tree, will replace most of dbus-object-registry
7048
7049         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
7050         screwup
7051
7052 2003-08-19  Havoc Pennington  <hp@pobox.com>
7053
7054         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
7055         (dbus_message_is_error): fix this function
7056
7057         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
7058         match
7059
7060         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
7061         reflect clarified man page
7062         (bus_client_policy_check_can_send): ditto
7063         
7064         * bus/session.conf.in: fixup
7065
7066         * bus/system.conf.in: fixup
7067
7068 2003-08-18  Havoc Pennington  <hp@redhat.com>
7069
7070         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
7071
7072         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7073         dumb bug created earlier (wrong order of args to
7074         decode_header_data())
7075         
7076         * tools/dbus-send.c: port
7077
7078         * tools/dbus-print-message.c (print_message): port
7079
7080         * test/data/*messages: port all messages over
7081         
7082         * dbus/dbus-message-builder.c: support including 
7083         message type
7084         
7085         * bus/driver.c: port over
7086         
7087         * bus/dispatch.c: port over to new stuff
7088
7089         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7090         rename disconnect signal to "Disconnected"
7091
7092 2003-08-17  Havoc Pennington  <hp@pobox.com>
7093
7094         This doesn't compile yet, but syncing up so I can hack on it from
7095         work. What are branches for if not broken code? ;-)
7096         
7097         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
7098         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
7099         DBUS_HEADER_FIELD_ERROR_NAME
7100         
7101         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
7102         for the interface+member pairs
7103         (string_hash): change to use g_str_hash algorithm
7104         (find_direct_function, find_string_function): refactor these to
7105         share most code.
7106         
7107         * dbus/dbus-message.c: port all of this over to support 
7108         interface/member fields instead of name field
7109
7110         * dbus/dbus-object-registry.c: port over
7111         
7112         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
7113         from _dbus_string_validate_name
7114
7115         * bus/dbus-daemon-1.1: change file format for the 
7116         <deny>/<allow> stuff to match new message naming scheme
7117
7118         * bus/policy.c: port over
7119
7120         * bus/config-parser.c: parse new format
7121         
7122 2003-08-16  Havoc Pennington  <hp@pobox.com>
7123
7124         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
7125         broken assertion
7126
7127         * glib/dbus-gproxy.c: some hacking
7128
7129 2003-08-15  Havoc Pennington  <hp@redhat.com>
7130
7131         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
7132
7133         * dbus/dbus-connection.c
7134         (dbus_connection_send_with_reply_and_block): factor out internals;
7135         change to convert any error replies to DBusError instead of 
7136         returning them as a message
7137
7138 2003-08-15  Havoc Pennington  <hp@pobox.com>
7139
7140         * dbus/dbus-connection.c, 
7141         dbus/dbus-pending-call.c: Finish the pending call stuff
7142
7143 2003-08-14  Havoc Pennington  <hp@redhat.com>
7144
7145         * dbus/dbus-pending-call.c: start on new object that will replace
7146         DBusMessageHandler and ReplyHandlerData for tracking outstanding
7147         replies
7148
7149         * dbus/dbus-gproxy.c: start on proxy object used to communicate
7150         with remote interfaces
7151
7152         * dbus/dbus-gidl.c: do the boring boilerplate in here
7153         
7154 2003-08-12  Havoc Pennington  <hp@pobox.com>
7155
7156         * bus/dispatch.c (bus_dispatch): make this return proper 
7157         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
7158
7159         * dbus/dbus-errors.c (dbus_set_error): use
7160         _dbus_string_append_printf_valist
7161
7162         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
7163         (_dbus_string_append_printf): new
7164
7165         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
7166         UNKNOWN_METHOD
7167
7168         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
7169         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
7170         message is unhandled.
7171
7172 2003-08-11  Havoc Pennington  <hp@pobox.com>
7173
7174         * bus/test.c (client_disconnect_handler): change to return
7175         HANDLED (would have been REMOVE_MESSAGE)
7176
7177         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
7178         HANDLED/NOT_YET_HANDLED instead of
7179         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
7180         should be used.
7181
7182 2003-08-10  Havoc Pennington  <hp@pobox.com>
7183
7184         * tools/dbus-send.c (main): add --type argument, for now
7185         supporting only method_call and signal types.
7186
7187         * tools/dbus-print-message.c: print message type
7188
7189         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7190         init connection->objects
7191
7192         * doc/dbus-specification.sgml: fix sgml
7193
7194         * bus/*.c: port over to object-instance API changes
7195
7196         * test/test-service.c: ditto
7197         
7198         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
7199         name, we will have to fix up the rest of the code to also handle
7200         this
7201         (dbus_message_new): generic message-creation call
7202         (set_string_field): allow appending name field
7203
7204 2003-08-06  Havoc Pennington  <hp@pobox.com>
7205
7206         * dbus/dbus-object-registry.c: implement signal connection 
7207         and dispatch
7208
7209         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
7210
7211         * dbus/dbus-internals.c (_dbus_memdup): new function
7212
7213 2003-08-02  Havoc Pennington  <hp@pobox.com>
7214
7215         * dbus/dbus-message.c (dbus_message_get_no_reply)
7216         (dbus_message_set_no_reply): add these and remove
7217         set_is_error/get_is_error
7218
7219         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
7220         remove the ERROR flag, since there's now an ERROR type
7221
7222 2003-08-01  Havoc Pennington  <hp@pobox.com>
7223
7224         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
7225         implement
7226
7227         * dbus/dbus-message.c (dbus_message_get_type): new function
7228
7229         * doc/dbus-specification.sgml: add "type" byte to messages
7230
7231 2003-08-01  Havoc Pennington  <hp@pobox.com>
7232
7233         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
7234         a message type enum to distinguish kinds of message
7235         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
7236         that need not be replied to
7237
7238 2003-08-01  Havoc Pennington  <hp@pobox.com>
7239
7240         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
7241         (unpack_8_octets): fix no-64-bit-int bug
7242
7243         * dbus/dbus-object-registry.c (validate_id): validate the 
7244         connection ID bits, not just the instance ID.
7245
7246         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
7247         the connection-global 33 bits of the object ID
7248
7249         * dbus/dbus-object-registry.c (info_from_entry): fill in 
7250         object ID in the new way
7251
7252         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
7253         define server/client/instance bits.
7254
7255 2003-07-30  Havoc Pennington  <hp@pobox.com>
7256
7257         * dbus/dbus-connection.c (dbus_connection_register_object): fix
7258         build
7259
7260 2003-07-13  Havoc Pennington  <hp@pobox.com>
7261
7262         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
7263         fields to DBusObjectVTable and DBusObjectInfo
7264
7265 2003-07-12  Havoc Pennington  <hp@pobox.com>
7266
7267         * dbus/dbus-object-registry.c: implement unit test,
7268         fix bugs discovered in process
7269
7270         * dbus/dbus-connection.c: remove handler_table and
7271         register_handler(), add DBusObjectRegistry usage
7272
7273         * dbus/dbus-objectid.c (dbus_object_id_is_null)
7274         (dbus_object_id_set_null): new functions
7275
7276 2003-07-08  Havoc Pennington  <hp@pobox.com>
7277
7278         * dbus/dbus-object.c: implement some of this
7279
7280         * dbus/dbus-object-registry.c
7281         (_dbus_object_registry_add_and_unlock): fill in the object_id out
7282         param
7283         (_dbus_object_registry_new): handle OOM
7284
7285 2003-07-08  Havoc Pennington  <hp@pobox.com>
7286
7287         * dbus/dbus-object.h: sketch out an API for registering objects
7288         with a connection, that allows us to use as little as 24 bytes
7289         per object and lets application code represent an object in 
7290         any conceivable way.
7291
7292         * dbus/dbus-object-registry.c: implement the hard bits of the
7293         DBusConnection aspect of object API. Not yet wired up.
7294         
7295 2003-07-06  Havoc Pennington  <hp@pobox.com>
7296
7297         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
7298         (_dbus_marshal_object_id): new
7299         (_dbus_demarshal_object_id): new
7300         (_dbus_marshal_get_arg_end_pos): support object ID type, and
7301         consolidate identical switch cases. Don't conditionalize handling
7302         of DBUS_TYPE_UINT64, need to handle the type always.
7303         (_dbus_marshal_validate_arg): consolidate identical cases, and
7304         handle DBUS_TYPE_OBJECT_ID
7305
7306         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
7307
7308         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
7309
7310 2003-09-28  Havoc Pennington  <hp@pobox.com>
7311
7312         * real 0.13 release
7313
7314 2003-09-28  Havoc Pennington  <hp@pobox.com>
7315
7316         * doc/Makefile.am (dbus-specification.html): testing a funky hack
7317         to work with Debian db2html
7318
7319 2003-09-28  Havoc Pennington  <hp@pobox.com>
7320
7321         * configure.in: 0.13
7322
7323         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
7324         stylesheet-images for benefit of Debian
7325         
7326         Change back to using filesystem-linked sockets for the system
7327         bus, so only root can create the default system bus address.
7328         
7329         * bus/system.conf.in: change to use
7330         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7331
7332         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
7333         from here.
7334
7335         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7336         here, and AC_DEFINE DBUS_SYSTEM_PATH
7337
7338 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7339
7340         * doc/TODO:
7341         * doc/busconfig.dtd:
7342         Add busconfig DTD.
7343         
7344 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
7345
7346         * doc/dbus-specification.sgml:
7347         Add activation reply values.
7348         
7349 2003-08-05  Havoc Pennington  <hp@redhat.com>
7350
7351         * configure.in: 0.12
7352
7353 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
7354
7355         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
7356         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
7357         (add_watch), (remove_watch), (create_source):
7358         Refcount fds, fixes some reentrancy issues.
7359         
7360 2003-07-30  Havoc Pennington  <hp@redhat.com>
7361
7362         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
7363         bus address to be abstract if we have abstract sockets
7364
7365         * NEWS: update
7366
7367 2003-07-28  Havoc Pennington  <hp@redhat.com>
7368
7369         * bus/messagebus.in: fix to avoid processname/servicename 
7370         confusion, from Michael Kearey
7371         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
7372         
7373 2003-07-23  Havoc Pennington  <hp@pobox.com>
7374
7375         * dbus/dbus-message.c (dbus_message_iter_get_named): 
7376         fix from Andy Hanton to remove broken "+1"
7377
7378 2003-07-16  Havoc Pennington  <hp@pobox.com>
7379
7380         * tools/dbus-launch.c (babysit): close stdout/stderr in the
7381         babysitter process, as suggested by Thomas Leonard, so 
7382         an "eval `dbus-launch --exit-with-session`" will actually 
7383         return
7384
7385 2003-07-16  Havoc Pennington  <hp@pobox.com>
7386
7387         * configure.in: print out EXPANDED_* variables in the summary at
7388         the end; clean up the code that computes EXPANDED_ variables and
7389         get the ones using exec_prefix right. Should make things work
7390         when you build without --prefix
7391
7392 2003-06-29  Havoc Pennington  <hp@pobox.com>
7393
7394         * mono/Test.cs (class Test): fire up a main loop and run it
7395
7396         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
7397         done once, the app has to do it
7398
7399 2003-06-26  Havoc Pennington  <hp@pobox.com>
7400
7401         * mono/Connection.cs: set up connection with the glib main loop
7402
7403 2003-07-01  Havoc Pennington  <hp@redhat.com>
7404
7405         * doc/dbus-specification.sgml: clarify the format of a type code,
7406         change suggested by Jim Blandy
7407
7408 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
7409
7410         * doc/Makefile.am:
7411         * tools/Makefile.am: Don't assume srcdir == builddir.
7412
7413         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
7414         the allocated block.
7415         (_dbus_memory_test): New function.
7416         * dbus/dbus-test.h: Add _dbus_memory_test ().
7417         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
7418
7419         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
7420         of %c%c%c%c.
7421         (dbus_message_new): Remove obsolete @todo.
7422
7423         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
7424         (_dbus_marshal_set_uint64): Fix comment.
7425
7426         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
7427         hardcode FIELD_REPLY_SERIAL.
7428
7429         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
7430         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
7431
7432         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
7433         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
7434
7435 2003-06-24  Havoc Pennington  <hp@pobox.com>
7436
7437         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
7438
7439 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
7440
7441         * configure.in:
7442         * gcj/.cvsignore:
7443         * gcj/Hello.java:
7444         * gcj/Makefile.am:
7445         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
7446         * gcj/org/.cvsignore:
7447         * gcj/org/Makefile.am:
7448         * gcj/org/freedesktop/.cvsignore:
7449         * gcj/org/freedesktop/Makefile.am:
7450         * gcj/org/freedesktop/dbus/.cvsignore:
7451         * gcj/org/freedesktop/dbus/Makefile.am:
7452         * gcj/org/freedesktop/dbus/Message.java: (Message),
7453         (Message.Message):
7454         * gcj/org/freedesktop/dbus/natMessage.cc:
7455         Fix the build system.
7456
7457 2003-06-22  Havoc Pennington  <hp@pobox.com>
7458
7459         * mono/Connection.cs: add more bindings
7460
7461         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
7462         more than once.
7463
7464 2003-06-22  Havoc Pennington  <hp@pobox.com>
7465
7466         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
7467         Start wrapping more stuff.
7468
7469 2003-06-22  Havoc Pennington  <hp@pobox.com>
7470
7471         * mono/Message.cs: implement Message.Wrap() that ensures we only
7472         have a single C# wrapper per DBusMessage, assuming it works which
7473         it probably doesn't.
7474
7475         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
7476         (dbus_message_free_data_slot): new
7477         (dbus_message_set_data): new
7478         (dbus_message_get_data): new
7479
7480 2003-06-22  Havoc Pennington  <hp@pobox.com>
7481
7482         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
7483         (_dbus_data_slot_allocator_alloc): rework these to keep a
7484         reference count on each slot and automatically manage a global
7485         slot ID variable passed in by address
7486
7487         * bus/bus.c: convert to new dataslot API
7488
7489         * dbus/dbus-bus.c: convert to new dataslot API
7490
7491         * dbus/dbus-connection.c: convert to new dataslot API
7492
7493         * dbus/dbus-server.c: convert to new dataslot API
7494
7495         * glib/dbus-gmain.c: ditto
7496
7497         * bus/test.c: ditto
7498
7499         * bus/connection.c: ditto
7500
7501 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
7502
7503         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
7504         after the gcj checks so that the correct configuration tags
7505         will be added to libtool.
7506
7507         * dbus-glib-1.pc.in: No need to specify any includes since
7508         dbus-1.pc.in has those.
7509
7510 2003-06-22  Havoc Pennington  <hp@pobox.com>
7511
7512         * mono/*, gcj/*, configure.in, Makefile.am:
7513         Check in makefiles and subdirs for mono and gcj bindings.
7514         Neither binding actually exists, just trying to get through
7515         all the build and other boring bits.
7516
7517 2003-06-21  Philip Blundell  <philb@gnu.org>
7518
7519         * tools/dbus-monitor.1: Updated.
7520
7521         * tools/dbus-send.1: Likewise.
7522
7523 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
7524
7525         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
7526         for hangup and error after checking read so we won't discard
7527         pending data if both hangup and read are set.
7528
7529 2003-06-19  Philip Blundell  <philb@gnu.org>
7530
7531         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
7532
7533         * tools/dbus-send.c: Accept both --system and --session.
7534
7535         * tools/dbus-monitor.c: Same here.
7536
7537 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
7538
7539         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
7540         from C++ (Patch by Miloslav Trmac).
7541
7542 2003-06-15  Joe Shaw  <joe@assbarn.com>
7543
7544         * configure.in: Check for socklen_t.
7545
7546         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
7547
7548         * test/test-segfault.c: Add #include <sys/time.h>
7549
7550         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
7551         dbus-launch needs it.
7552
7553 2003-06-09  Havoc Pennington  <hp@redhat.com>
7554
7555         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
7556         SUN_LEN, it breaks abstract socket usage
7557
7558         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
7559         starts of lines.
7560
7561 2003-06-04  Havoc Pennington  <hp@pobox.com>
7562
7563         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
7564         using unix:abstract=/foo, and when listening in a tmpdir
7565         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
7566
7567         * dbus/dbus-transport.c (_dbus_transport_open): support
7568         unix:abstract=/foo
7569
7570         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7571         support abstract sockets
7572
7573         * dbus/dbus-transport-unix.c
7574         (_dbus_transport_new_for_domain_socket): support abstract sockets
7575
7576         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
7577         toggle as an argument, implement abstract namespace support
7578         (_dbus_listen_unix_socket): ditto
7579
7580         * configure.in: add --enable-abstract-sockets and implement
7581         a configure check for autodetection of the right value.
7582
7583 2003-06-01  Havoc Pennington  <hp@pobox.com>
7584
7585         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
7586         in /tmp (though on Linux this will end up being useless,
7587         when we add abstract namespace support)
7588
7589         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
7590         subst'ing it
7591
7592 2003-05-28  Colin Walters  <walters@verbum.org>
7593
7594         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
7595
7596 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
7597
7598         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
7599
7600 2003-05-17  Colin Walters  <walters@gnu.org>
7601
7602         * tools/dbus-send.c: Don't exit with an error code if --help was
7603         passed.  Default to using the session bus instead of the system
7604         one.
7605
7606         * tools/dbus-launch.c: Ditto.
7607
7608         * tools/dbus-monitor.c: Ditto.
7609
7610         * tools/dbus-send.1: Update with new arguments.
7611
7612         * tools/dbus-launch.c: Emit code to export variables.  New
7613         arguments -s and -c to specify shell syntax, and a bit of code to
7614         autodetect syntax.  Also, allow specifying a program to run.
7615
7616         * tools/dbus-launch.1: Update with new arguments.
7617
7618         * tools/dbus-send.1: Ditto.
7619
7620         * tools/dbus-monitor.1: Ditto.
7621
7622 2003-05-17  Havoc Pennington  <hp@pobox.com>
7623
7624         * bus/config-parser.c (merge_included): merge in policies from
7625         child configuration file.
7626
7627         * bus/policy.c (bus_policy_merge): function to merge two policies
7628         together
7629
7630 2003-05-16  Havoc Pennington  <hp@redhat.com>
7631
7632         * dbus/dbus-connection.c: disable verbose lock spew
7633
7634         * tools/dbus-send.c: add --print-reply command line option
7635
7636         * tools/dbus-print-message.h (print_message): new util function
7637         shared by dbus-send and dbus-monitor
7638
7639         * tools/dbus-monitor.c (handler_func): exit on disconnect
7640
7641         * dbus/dbus-transport-unix.c (do_reading): if the transport is
7642         disconnected, don't try to use the read_watch
7643
7644         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
7645         so we can find this bug more easily
7646
7647 2003-05-16  Havoc Pennington  <hp@redhat.com>
7648
7649         * bus/policy.c (free_rule_list_func): avoid a crash when passed
7650         NULL as DBusHashTable is annoyingly likely to do.
7651
7652 2003-05-16  Colin Walters  <walters@verbum.org>
7653
7654         * tools/dbus-monitor.c: Add --session argument and usage()
7655         function.
7656
7657         * tools/dbus-monitor.1: Update with new --session arg.
7658
7659         * bus/Makefile.am (install-data-hook): Create
7660         $(libdir)/dbus-1.0/services so that the session bus is happy.
7661
7662 2003-05-15  Havoc Pennington  <hp@redhat.com>
7663
7664         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
7665         on non-x86. ifdef's are evil.
7666
7667 2003-05-15  Havoc Pennington  <hp@redhat.com>
7668
7669         * configure.in: 0.11
7670
7671         * NEWS: update
7672
7673         * bus/Makefile.am (initddir): apparently we are supposed to put
7674         init scripts in /etc/rc.d/init.d not /etc/init.d
7675
7676         * bus/Makefile.am: remove the "you must --enable-tests to make
7677         check" as it broke distcheck
7678
7679         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
7680
7681 2003-05-13  James Willcox  <jwillcox@gnome.org>
7682
7683         * configure.in:
7684         * bus/activation.c: (bus_activation_service_created),
7685         (bus_activation_activate_service):
7686         * bus/driver.c: (bus_driver_send_service_deleted),
7687         (bus_driver_send_service_created), (bus_driver_send_service_lost),
7688         (bus_driver_send_service_acquired),
7689         (bus_driver_send_welcome_message),
7690         (bus_driver_handle_list_services):
7691         * bus/session.conf.in:
7692         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
7693         (dbus_bus_service_exists), (dbus_bus_activate_service):
7694         * dbus/dbus-bus.h:
7695
7696         Add some convenience API which lets you activate a service, and did a
7697         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
7698         and dbus_message_get_args()
7699
7700 2003-05-11  Havoc Pennington  <hp@pobox.com>
7701
7702         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
7703         calling _dbus_marshal_validate_arg() for every byte in a byte
7704         array, etc.
7705
7706         * dbus/dbus-message-handler.c: use atomic reference counting to
7707         reduce number of locks slightly; the global lock in here sucks
7708
7709         * dbus/dbus-connection.c
7710         (_dbus_connection_update_dispatch_status_and_unlock): variant of
7711         update_dispatch_status that can be called with lock held; then use
7712         in a couple places to reduce locking/unlocking
7713         (dbus_connection_send): hold the lock over the whole function
7714         instead of acquiring it twice.
7715
7716         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
7717
7718         * bus/connection.c (bus_connections_setup_connection): fix access
7719         to already-freed memory.
7720
7721         * dbus/dbus-connection.c: keep a little cache of linked list
7722         nodes, to avoid using the global linked list alloc lock in the
7723         normal send-message case. Instead we just use the connection lock
7724         that we already have to take.
7725
7726         * dbus/dbus-list.c (_dbus_list_find_last): new function
7727
7728         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
7729         change to use a struct for the atomic type; fix docs,
7730         they return value before increment, not after increment.
7731
7732         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
7733         (_dbus_string_append_8_aligned): new functions to try to
7734         microoptimize this operation.
7735         (reallocate_for_length): break this out of set_length(), to
7736         improve profile info, and also so we can consider inlining the
7737         set_length() part.
7738
7739         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
7740         strings with some preallocation, cuts down on our calls to realloc
7741         a fair bit. Though if we can get the "move entire string to empty
7742         string" optimization below to kick in here, it would be better.
7743
7744         * dbus/dbus-string.c (_dbus_string_move): just call
7745         _dbus_string_move_len
7746         (_dbus_string_move_len): add a special case for moving
7747         an entire string into an empty string; we can just
7748         swap the string data instead of doing any reallocs.
7749         (_dbus_string_init_preallocated): new function
7750
7751 2003-05-11  Havoc Pennington  <hp@pobox.com>
7752
7753         Write a "test-profile" that does echo client-server with threads;
7754         profile reveals lock contention, memcpy/realloc of buffers, and
7755         UTF-8 validation as hot spots. 20% of lock contention eliminated
7756         with dbus_atomic_inc/dec implementation on x86.  Much remaining
7757         contention is global mempool locks for GList and DBusList.
7758
7759         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
7760         x86 implementation
7761
7762         * dbus/dbus-connection.c (struct DBusConnection): use
7763         dbus_atomic_t for the reference count
7764
7765         * dbus/dbus-message.c (struct DBusMessage): declare
7766         dbus_atomic_t values as volatile
7767
7768         * configure.in: code to detect ability to use atomic integer
7769         operations in assembly, from GLib patch
7770
7771         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
7772         time, tired of it being wrong in threads and forked processes
7773
7774         * glib/test-profile.c: a little program to bounce messages back
7775         and forth between threads and eat CPU
7776
7777         * dbus/dbus-connection.c: add debug spew macros for debugging
7778         thread locks; include config.h at top; fix deadlock in
7779         dbus_connection_flush()
7780
7781 2003-05-08  Havoc Pennington  <hp@pobox.com>
7782
7783         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
7784         data from getting written, and there wasn't a good reason to
7785         use _exit really.
7786
7787         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
7788         dbus_verbose lines in test coverage
7789         (main): add list of functions sorted by # of untested blocks
7790         to the coverage report
7791
7792         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
7793
7794         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
7795
7796         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
7797         extend test coverage
7798
7799         * test/data/auth/cancel.auth-script: test canceling an
7800         authentication
7801
7802         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
7803         aren't used. in CVS history if we end up needing them.
7804
7805 2003-05-04  Havoc Pennington  <hp@pobox.com>
7806
7807         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
7808         unit test
7809
7810         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
7811         function, which assumed length was in # of strings, not bytes
7812
7813         * dbus/dbus-message.c (_dbus_message_test): add tests for some
7814         missing coverage
7815
7816         * dbus/dbus-connection.c
7817         (_dbus_connection_queue_received_message): disable function for
7818         now, we are only using it in test mode
7819
7820         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7821         remove a mistaken FIXME
7822
7823 2003-05-04  Havoc Pennington  <hp@pobox.com>
7824
7825         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
7826         unlock mutex on successful return, patch from Anders Gustafsson
7827
7828 2003-05-04  Havoc Pennington  <hp@pobox.com>
7829
7830         * dbus-glib-1.pc.in (Requires): fix dependencies, from
7831         Anders Gustafsson
7832
7833 2003-05-04  Havoc Pennington  <hp@pobox.com>
7834
7835         * tools/dbus-launch.c: implement
7836
7837         * bus/main.c (main), bus/bus.c (bus_context_new):
7838         implement --print-pid and --fork
7839
7840 2003-05-03  Havoc Pennington  <hp@redhat.com>
7841
7842         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
7843         the address had no value, and add to test suite. Fix and
7844         regression test from Miloslav Trmac
7845
7846 2003-05-03  Havoc Pennington  <hp@pobox.com>
7847
7848         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
7849         watch is invalid when handled
7850
7851         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
7852         dbus-launch utility to launch the bus from a shell script.  Didn't
7853         actually implement dbus-launch yet, it's just a placeholder still.
7854
7855 2003-05-03  Havoc Pennington  <hp@pobox.com>
7856
7857         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
7858         daemon; also documents daemon config file, so replaces
7859         doc/config-file.txt. Corrected some stuff from config-file.txt in
7860         the process of moving it.
7861
7862 2003-05-03  Havoc Pennington  <hp@pobox.com>
7863
7864         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
7865         add some man pages
7866
7867 2003-05-03  Colin Walters  <walters@verbum.org>
7868
7869         * dbus/dbus-sysdeps.c (fill_user_info): Test against
7870         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
7871
7872         * Makefile.am: Update to use new .pc versioning scheme.
7873
7874 2003-05-02  Havoc Pennington  <hp@redhat.com>
7875
7876         * bus/system.conf.in: allow send/receive to/from message bus
7877         service
7878
7879 2003-04-30  Havoc Pennington  <hp@redhat.com>
7880
7881         * configure.in: print a note when building with unit tests and
7882         without assertions
7883
7884 2003-04-30  Havoc Pennington  <hp@redhat.com>
7885
7886         * Makefile.am: add a check-local that complains if you didn't
7887         configure with --enable-tests
7888
7889 2003-04-29  Havoc Pennington  <hp@redhat.com>
7890
7891         * glib/dbus-gmain.c: docs cleanups
7892
7893         * dbus/dbus-types.h: add docs on int64 types
7894
7895         * dbus/dbus-memory.c: fix docs to avoid putting private API in
7896         public API docs section
7897
7898 2003-04-29  Havoc Pennington  <hp@redhat.com>
7899
7900         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
7901         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
7902         parallel install API version, not with the D-BUS package version.
7903
7904         * HACKING: move some of README over here
7905
7906         * README: updates, and document API/ABI policy
7907
7908         * configure.in: reindentation
7909
7910 2003-04-29  Havoc Pennington  <hp@redhat.com>
7911
7912         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
7913         to use this library" to be sure people have the right
7914         expectations.
7915
7916 2003-04-28  Havoc Pennington  <hp@redhat.com>
7917
7918         * configure.in: add --enable-docs which by default is auto yes if
7919         doxygen and db2html found, no otherwise; but can be forced on/off
7920
7921         * doc/Makefile.am: conditionalize whether to build docs on
7922         --enable-docs
7923
7924 2003-04-28  Havoc Pennington  <hp@redhat.com>
7925
7926         * configure.in: 0.10
7927
7928         * NEWS: update
7929
7930         * bus/system.conf.in: add <includedir>system.d</includedir>
7931
7932         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
7933         username was provided but not uid
7934
7935         * bus/config-parser.c (struct BusConfigParser): keep track of
7936         whether the parser is toplevel or was included; change some
7937         of the error handling if it's included.
7938
7939 2003-04-27  Havoc Pennington  <hp@pobox.com>
7940
7941         Unbreak my code...
7942
7943         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
7944         report correct status if we finish processing authentication
7945         inside this function.
7946
7947         * bus/activation.c (try_send_activation_failure): use
7948         bus_transaction_send_error_reply
7949
7950         * bus/connection.c (bus_connection_get_groups): return an error
7951         explaining the problem
7952
7953         * bus/bus.c (bus_context_check_security_policy): implement
7954         restriction here that inactive connections can only send the
7955         hello message. Also, allow bus driver to send anything to
7956         any recipient.
7957
7958         * bus/connection.c (bus_connection_complete): create the
7959         BusClientPolicy here instead of on-demand.
7960         (bus_connection_get_policy): don't return an error
7961
7962         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
7963         sender field in message being replied to
7964
7965         * bus/bus.c (bus_context_check_security_policy): fix silly typo
7966         causing it to return FALSE always
7967
7968         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
7969         we checked sender rather than destination
7970
7971 2003-04-25  Havoc Pennington  <hp@redhat.com>
7972
7973         test suite is slightly hosed at the moment, will fix soon
7974
7975         * bus/connection.c (bus_connections_expire_incomplete): fix to
7976         properly disable the timeout when required
7977         (bus_connection_set_name): check whether we can remove incomplete
7978         connections timeout after we complete each connection.
7979
7980         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
7981         probably still broken.
7982
7983         * bus/services.c (bus_registry_acquire_service): implement max
7984         number of services owned, and honor allow/deny rules on which
7985         services a connection can own.
7986
7987         * bus/connection.c (bus_connection_get_policy): report errors here
7988
7989         * bus/activation.c: implement limit on number of pending
7990         activations
7991
7992 2003-04-25  Havoc Pennington  <hp@redhat.com>
7993
7994         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
7995         where we used >= 0 instead of != DBUS_UID_UNSET.
7996
7997 2003-04-25  Havoc Pennington  <hp@redhat.com>
7998
7999         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
8000         were toggled without add/remove, fix from Anders Gustafsson
8001
8002 2003-04-24  Havoc Pennington  <hp@redhat.com>
8003
8004         * test/data/valid-config-files/basic.conf: add <limit> tags to
8005         this test
8006
8007         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
8008         <limit> tag in configuration file.
8009
8010 2003-04-24  Havoc Pennington  <hp@redhat.com>
8011
8012         * bus/dispatch.c: somehow missed some name_is
8013
8014         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
8015         (_dbus_timeout_set_interval): new
8016
8017         * bus/connection.c (bus_connections_setup_connection): record time
8018         when each connection is first set up, and expire them after the
8019         auth timeout passes.
8020
8021 2003-04-24  Havoc Pennington  <hp@redhat.com>
8022
8023         * dbus/dbus-message.c (dbus_message_name_is): rename
8024         (dbus_message_service_is): rename
8025         (dbus_message_sender_is): rename
8026         (dbus_message_get_service): rename
8027
8028 2003-04-24  Havoc Pennington  <hp@redhat.com>
8029
8030         * configure.in: add --enable-checks
8031
8032         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
8033
8034         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
8035         to use thread locks.
8036         (_dbus_connection_handler_destroyed_locked): move some private
8037         functions into proper docs group
8038
8039         * dbus/dbus-internals.h: add _dbus_return_if_fail,
8040         _dbus_return_val_if_fail
8041
8042         Throughout: use dbus_return_if_fail
8043
8044 2003-04-23  James Willcox  <jwillcox@gnome.org>
8045
8046         * glib/dbus-glib.h:
8047         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
8048         (dbus_connection_setup_with_g_main),
8049         (dbus_server_setup_with_g_main):
8050         * glib/test-dbus-glib.c: (main):
8051         * glib/test-thread-client.c: (main):
8052         * glib/test-thread-server.c: (new_connection_callback), (main):
8053         * tools/dbus-monitor.c: (main):
8054
8055         Added a GMainContext argument to dbus_connection_setup_with_g_main()
8056         and dbus_server_setup_with_g_main().
8057
8058 2003-04-20  Havoc Pennington  <hp@pobox.com>
8059
8060         * doc/dbus-specification.sgml: document the restrictions on
8061         message and service names
8062
8063 2003-04-22  Havoc Pennington  <hp@redhat.com>
8064
8065         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
8066         support, and do some code cleanups to share more code and
8067         speed up array marshal/demarshal.
8068
8069         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
8070
8071         * configure.in: generate dbus-arch-deps.h
8072
8073         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
8074         64-bit typecodes
8075
8076 2003-04-22  Havoc Pennington  <hp@redhat.com>
8077
8078         * test/data/valid-messages/opposite-endian.message: fix test
8079         to use proper type for rply field
8080
8081         * test/data/invalid-messages: add tests for below validation
8082
8083         * dbus/dbus-message.c (decode_header_data): validate field types,
8084         and validate that named fields are valid names
8085         (decode_name_field): consider messages in the
8086         org.freedesktop.Local. namespace to be invalid.
8087
8088         * dbus/dbus-string.c (_dbus_string_validate_name): new
8089
8090 2003-04-19  Havoc Pennington  <hp@pobox.com>
8091
8092         * bus/driver.c (bus_driver_handle_hello): check limits and
8093         return an error if they are exceeded.
8094
8095         * bus/connection.c: maintain separate lists of active and inactive
8096         connections, and a count of each. Maintain count of completed
8097         connections per user. Implement code to check connection limits.
8098
8099         * dbus/dbus-list.c (_dbus_list_unlink): export
8100
8101         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
8102         number of bytes in the message queue for a connection
8103
8104 2003-04-18  Havoc Pennington  <hp@pobox.com>
8105
8106         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
8107
8108         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
8109         memleaks
8110
8111         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
8112         on realloc be sure to update the pointer in the keyring
8113
8114         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
8115         offset to avoid writing to unallocated memory
8116
8117         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
8118         try the next mechanism, so we properly handle OOM
8119
8120         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
8121         on OOM.
8122         (_dbus_keyring_new): fix OOM bug
8123         (_dbus_keyring_new_homedir): always set error; impose a maximum
8124         number of keys we'll load from the file, mostly to speed up the
8125         test suite and make its OOM checks more useful, but also for
8126         general sanity.
8127
8128         * dbus/dbus-auth.c (process_error_server): reject authentication
8129         if we get an error from the client
8130         (process_cancel): on cancel, send REJECTED, per the spec
8131         (process_error_client): send CANCEL if we get an error from the
8132         server.
8133
8134 2003-04-18  Havoc Pennington  <hp@pobox.com>
8135
8136         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
8137         debug spew
8138
8139         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
8140         handling problem
8141
8142         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
8143         about DBUS_TEST_HOMEDIR once
8144
8145         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
8146         the environment
8147
8148         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
8149         config file so we test the right thing
8150
8151         Throughout: assorted docs improvements
8152
8153 2003-04-18  Havoc Pennington  <hp@pobox.com>
8154
8155         * glib/dbus-gmain.c: adapt to watch changes
8156
8157         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
8158
8159         * dbus/dbus-server.h: remove dbus_server_handle_watch
8160
8161         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
8162
8163         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
8164         like DBusTimeout, so we don't need dbus_connection_handle_watch
8165         etc.
8166
8167 2003-04-17  Havoc Pennington  <hp@redhat.com>
8168
8169         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
8170         database usage so it all goes via the DBusUserDatabase cache.
8171
8172 2003-04-17  Havoc Pennington  <hp@redhat.com>
8173
8174         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
8175         there was an OOM watch we skipped, we always return TRUE so we
8176         iterate again to have a look at it again. Fixes test suite hang.
8177         Code rearrangement also lets us lose some memset and only iterate
8178         over callbacks once.
8179
8180         * bus/driver.c (bus_driver_handle_message): sense of test for
8181         reply was backward
8182
8183 2003-04-16  Havoc Pennington  <hp@pobox.com>
8184
8185         * doc/dbus-specification.sgml: make spec say serials are unsigned
8186
8187         * dbus/dbus-message.h: change message serials to unsigned
8188
8189         * dbus/dbus-connection.c: adapt to message serials being unsigned
8190
8191 2003-04-15  Havoc Pennington  <hp@pobox.com>
8192
8193         * bus/bus.c: create and keep around a shared DBusUserDatabase
8194         object.
8195
8196         * bus/connection.c (bus_connection_get_groups): don't cache
8197         groups for user in the connection object, since user database
8198         object now does that.
8199
8200 2003-04-16  Havoc Pennington  <hp@redhat.com>
8201
8202         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
8203         list of size counters
8204         (_dbus_message_loader_putback_message_link): put back a popped link
8205
8206         * dbus/dbus-connection.c
8207         (dbus_connection_set_max_live_messages_size): rename
8208         max_received_size
8209         (dbus_connection_get_outgoing_size): get size of outgoing
8210         queue
8211         (_dbus_connection_set_connection_counter): remove this cruft
8212
8213 2003-04-14  Havoc Pennington  <hp@redhat.com>
8214
8215         * dbus/dbus-userdb.c: user database abstraction, mostly to get
8216         caching, but at some point we might want to be able to use a
8217         different database.
8218
8219         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
8220         SHA1 conf file to test the sha1 auth mechanism, since the regular
8221         test always uses EXTERNAL when available.
8222
8223         * configure.in,
8224         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
8225         add conf file that requires use of sha1 auth
8226
8227 2003-04-13  Havoc Pennington  <hp@pobox.com>
8228
8229         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
8230         from Philip Blundell to send messages and monitor them.
8231
8232 2003-04-13  Havoc Pennington  <hp@pobox.com>
8233
8234         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
8235         callbacks
8236
8237         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
8238         users
8239
8240         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8241         fix to only recover unused bytes if we're already authenticated
8242         (_dbus_transport_get_is_authenticated): fix to still mark us
8243         authenticated if there are unused bytes.
8244
8245         * bus/dispatch.c: implement security policy checking
8246
8247         * bus/connection.c (bus_transaction_send_from_driver): new
8248
8249         * bus/bus.c (bus_context_check_security_policy): new
8250
8251         * bus/dispatch.c (send_service_nonexistent_error): delete this,
8252         now we just set the DBusError and it gets converted to an error
8253         reply.
8254
8255         * bus/connection.c (allow_user_function): enable code using actual
8256         data from the config file
8257
8258         * bus/policy.c (list_allows_user): handle wildcard rules for
8259         user/group connection perms
8260
8261 2003-04-13  Havoc Pennington  <hp@pobox.com>
8262
8263         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
8264
8265         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
8266
8267         * bus/policy.c (bus_policy_append_mandatory_rule)
8268         (bus_policy_append_default_rule, bus_policy_append_user_rule)
8269         (bus_policy_append_group_rule): new functions
8270
8271 2003-04-12  Havoc Pennington  <hp@pobox.com>
8272
8273         * bus/config-parser.c (bus_config_parser_new): fix a memleak
8274
8275         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
8276         the pid/gid/uid, just for paranoia.
8277
8278         * test/break-loader.c (randomly_do_n_things): find a byte
8279         containing a type code, and randomly change it to a different
8280         type code.
8281
8282 2003-04-12  Havoc Pennington  <hp@pobox.com>
8283
8284         * bus/policy.h: change BusPolicy to be the thing from the config
8285         file, and rename old BusPolicy to BusClientPolicy
8286
8287         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
8288         match change in how policy works
8289
8290         * dbus/dbus-internals.h: mark assert_not_reached as
8291         __attribute((noreturn))__
8292
8293 2003-04-11  Havoc Pennington  <hp@redhat.com>
8294
8295         * doc/dbus-specification.sgml: fix a spot with the wrong name for
8296         the broadcast service. Use boolean return for ServiceExists.
8297
8298 2003-04-11  Havoc Pennington  <hp@redhat.com>
8299
8300         * configure.in: add another directory to look for qt in.
8301
8302 2003-04-11  Havoc Pennington  <hp@redhat.com>
8303
8304         * AUTHORS: add Colin Walters
8305
8306 2003-04-11  Havoc Pennington  <hp@redhat.com>
8307
8308         * NEWS: update
8309
8310         * configure.in: 0.9
8311
8312 2003-04-11  Havoc Pennington  <hp@redhat.com>
8313
8314         * bus/messagebus.in: remove pid file when stopping the
8315         message bus, since the bus won't have privileges to remove it
8316         itself.
8317
8318 2003-04-11  Havoc Pennington  <hp@redhat.com>
8319
8320         * bus/bus.c (bus_context_new): move credentials change after
8321         creating pidfile
8322
8323 2003-04-11  Havoc Pennington  <hp@pobox.com>
8324
8325         * test/decode-gcov.c: add "below average functions" to the
8326         coverage report, and change how some of the code works.
8327
8328         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
8329         not in the coverage stats.
8330
8331         * test/test-service.c (main): use _dbus_verbose not fprintf in a
8332         couple places so running the test suite doesn't result in megaspam.
8333
8334 2003-04-11  Havoc Pennington  <hp@pobox.com>
8335
8336         * bus/dispatch.c (check_existent_service_activation): accept a no
8337         memory error in a place we didn't before
8338
8339         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
8340         in case the first one failed," since the test suite is less
8341         broken now.
8342
8343 2003-04-10  Havoc Pennington  <hp@pobox.com>
8344
8345         * bus/dispatch.c (check_segfault_service_activation): add test
8346         for launching an executable that just crashes.
8347
8348         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
8349         don't leave a million cores. We'll see how portable this is.
8350
8351 2003-04-10  Havoc Pennington  <hp@pobox.com>
8352
8353         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
8354         the possible parent failures before we fork, so that we don't
8355         fail to create a babysitter after creating the child.
8356
8357         * bus/activation.c (bus_activation_activate_service): kill child
8358         if we don't successfully complete the activation.
8359
8360 2003-04-10  Havoc Pennington  <hp@redhat.com>
8361
8362         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
8363         the connection if it's disconnected
8364
8365         * bus/activation.c (bus_activation_service_created): use new
8366         transaction features to roll back removal of pending activation if
8367         we don't successfully create the service after all. Don't remove
8368         pending activation if the function fails.
8369
8370         * dbus/dbus-list.c (_dbus_list_insert_before_link)
8371         (_dbus_list_insert_after_link): new code to facilitate
8372         services.c fixes
8373
8374         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
8375         new functionality, so we can preallocate the ability to insert
8376         into a hash table.
8377
8378         * bus/connection.c (bus_transaction_add_cancel_hook): new function
8379         allowing us to put custom hooks in a transaction to be used for
8380         cancelling said transaction
8381
8382         * doc/dbus-specification.sgml: add some discussion of secondary
8383         service owners, and disallow zero-length service names
8384
8385         * bus/services.c (bus_registry_acquire_service): new function,
8386         splits out part of bus_driver_handle_acquire_service() and fixes
8387         a bug where we didn't remove the service doing the acquiring
8388         from the secondary queue if we failed to remove the current owner
8389         from the front of the queue.
8390
8391 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8392
8393         * doc/dbus-specification.sgml:
8394         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
8395
8396 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8397
8398         * bus/.cvsignore:
8399         * glib/.cvsignore:
8400         * test/.cvsignore:
8401         Added files to cvsignore
8402
8403         * dbus/dbus-message.h:
8404         * dbus/dbus-message.c: (dbus_message_iter_get_named):
8405         Make get_named() take two out argument and return a boolean.
8406         (dbus_message_iter_get_args_valist):
8407         Update usage of get_named().
8408         (dbus_message_iter_append_byte):
8409         Fix typo
8410         (dbus_message_iter_append_named)
8411         Fix typo
8412         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
8413         More tests.
8414
8415 2003-04-10  Alexander Larsson  <alexl@redhat.com>
8416
8417         * dbus/dbus-marshal.[ch]:
8418         Add array_type_pos argument to _dbus_marshal_validate_arg.
8419         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
8420
8421         * dbus/dbus-message.[ch]:
8422         Multi-dimensional arrays have full type specification in the
8423         outermost array. Iter code re-arranged to handle this.
8424         Added some more iter tests.
8425
8426         * doc/dbus-specification.sgml:
8427         Add me to authors.
8428         Remove old FIXME.
8429         Update new array encoding description.
8430         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
8431
8432         * test/data/invalid-messages/array-with-mixed-types.message:
8433         * test/data/valid-messages/array-of-array-of-uint32.message:
8434         Change to the new array format.
8435
8436         * test/data/invalid-messages/too-short-dict.message:
8437         Fix bug in test.
8438
8439         * test/data/valid-messages/recursive-types.message:
8440         Fix up and extend test.
8441
8442 2003-04-10  Havoc Pennington  <hp@pobox.com>
8443
8444         * bus/dispatch.c: lots of fixes
8445
8446         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
8447         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
8448         that was crack, broke the test service.
8449
8450         * dbus/dbus-transport.c (_dbus_transport_open): fix error
8451         handling to avoid piling up errors if we get a failure on the
8452         first address.
8453
8454         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
8455         pid in assertion failures.
8456
8457         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
8458         to some fixed size of file descriptor array. Don't return TRUE
8459         anytime a timeout exists, that led to lots of busy loop silliness
8460         in the tests.
8461
8462 2003-04-09  Havoc Pennington  <hp@redhat.com>
8463
8464         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
8465         I'd checked this in earlier but hadn't.
8466
8467 2003-04-09  Havoc Pennington  <hp@redhat.com>
8468
8469         * bus/dispatch.c (bus_dispatch_test): get a bit further through
8470         the activation test (man this is getting old!)
8471
8472 2003-04-09  Havoc Pennington  <hp@redhat.com>
8473
8474         * test/test-utils.c: use dispatch status function to fix this up
8475
8476         * bus/connection.c (connection_watch_callback): don't dispatch
8477         from here
8478         (connection_timeout_callback): don't dispatch from here
8479         (bus_connections_setup_connection): set the dispatch status function
8480         (bus_connection_disconnected): unset it
8481
8482         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
8483         used to add a connection to be dispatched
8484         (_dbus_loop_iterate): do the dispatching at the end of each
8485         iteration
8486
8487         * dbus/dbus-connection.c
8488         (dbus_connection_set_dispatch_status_function): new function
8489         allowing us to fix up main loop usage
8490         (_dbus_connection_last_unref): free all the various function
8491         user data
8492         (dbus_connection_dispatch): call the DispatchStatusFunction
8493         whenever this function returns
8494         (dbus_connection_handle_watch): call DispatchStatusFunction
8495         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
8496         (reply_handler_timeout): call DispatchStatusFunction
8497         (dbus_connection_flush): call DispatchStatusFunction
8498
8499 2003-04-09  Havoc Pennington  <hp@redhat.com>
8500
8501         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
8502         a memory leak
8503
8504         * bus/dispatch.c (check_service_activated): fix bug in test
8505
8506         * dbus/dbus-mainloop.c (check_timeout): fix this up
8507
8508         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
8509         verbose output so we can sort out output from different processes,
8510         e.g. in the activation case.
8511
8512 2003-04-08  Colin Walters  <walters@gnu.org>
8513
8514         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
8515         the pid file.
8516         (bus_context_new): Set it.
8517         (bus_context_unref): Use it to delete the pid file.
8518
8519 2003-04-08  Havoc Pennington  <hp@redhat.com>
8520
8521         * test/data/invalid-messages/array-with-mixed-types.message:
8522         regression test that fails for the moment
8523
8524         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
8525         tests for convenience
8526
8527         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
8528         array of nil, it broke things.
8529
8530         * test/data/invalid-messages/array-of-nil.message: regression test
8531
8532         * test/data/valid-messages/array-of-array-of-uint32.message:
8533         happened to write this so added it to suite
8534
8535 2003-04-08  Havoc Pennington  <hp@redhat.com>
8536
8537         * bus/driver.c (bus_driver_handle_acquire_service): init
8538         retval/reply before checking name
8539
8540         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
8541         recursion depth argument
8542
8543         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
8544         in the public struct for future extension
8545
8546         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
8547         typo
8548
8549         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
8550         message
8551
8552         * doc/dbus-specification.sgml: fix typo
8553
8554 2003-04-08  Alexander Larsson  <alexl@redhat.com>
8555
8556         Implemented recursive types, named types and new-style iters
8557
8558         * bus/driver.c:
8559         * glib/test-thread-client.c: (thread_func):
8560         * glib/test-thread-server.c: (handle_test_message):
8561         * test/test-service.c: (handle_echo):
8562         Update to new api
8563
8564         * dbus/Makefile.am:
8565         * dbus/dbus-dict.c:
8566         * dbus/dbus-dict.h:
8567         * dbus/dbus.h
8568         Remove DBusDict
8569
8570         * dbus/dbus-internals.c: (_dbus_type_to_string):
8571         Update for new types.
8572
8573         * dbus/dbus-marshal.[ch]:
8574         Implement recursive types and the new marshalling format.
8575         Remove hardcoded dict marshalling.
8576         Marshal named types.
8577
8578         * dbus/dbus-message-builder.c:
8579         Add BYTE_ARRAY.
8580         Remove references to old types
8581
8582         * dbus/dbus-message.[ch]:
8583         New non-refcounted iter API that supports recursive iters.
8584         Use iters for appending, including support for recursive
8585         iters.
8586         Add byte and named type support.
8587         Update everything to new marshalling formats.
8588         Add tests for new API.
8589
8590         * dbus/dbus-protocol.h:
8591         Remove old array types.
8592         Add types: BYTE, ARRAY, DICT, NAMED
8593
8594         * dbus/dbus-string.c:
8595         * dbus/dbus-sysdeps.c:
8596         Make parse_double locale safe.
8597
8598         * dbus/dbus-test-main.c:
8599         Call setlocale.
8600
8601         * dbus/dbus-test.c:
8602         Kill dict test
8603
8604         * doc/dbus-specification.sgml:
8605         Update spec
8606
8607         * test/data/incomplete-messages/missing-body.message:
8608         * test/data/invalid-messages/bad-boolean.message:
8609         * test/data/invalid-messages/bad-boolean-array.message:
8610         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
8611         * test/data/invalid-messages/boolean-has-no-value.message-raw:
8612         * test/data/invalid-messages/too-short-dict.message:
8613         * test/data/valid-messages/dict-simple.message:
8614         * test/data/valid-messages/dict.message:
8615         * test/data/valid-messages/emptiness.message:
8616         * test/data/valid-messages/lots-of-arguments.message:
8617         * test/data/valid-messages/no-padding.message:
8618         * test/data/valid-messages/recursive-types.message:
8619         Add missing NAME fields
8620         Fix up dicts & arrays
8621
8622         * test/data/invalid-messages/dict-with-nil-value.message:
8623         Removed, this is not invalid anymore.
8624
8625         * test/data/valid-messages/recursive-types.message:
8626         Add new test for deeply recursive types.
8627
8628 2003-04-07  Havoc Pennington  <hp@pobox.com>
8629
8630         * bus/driver.c (bus_driver_handle_acquire_service): return an
8631         error if you try to acquire a service that starts with ':'
8632
8633 2003-04-07  Havoc Pennington  <hp@redhat.com>
8634
8635         * doc/dbus-specification.sgml: require that base service names
8636         start with ':' and that the base service is created/deleted
8637         as first and last things a connection does on the bus
8638
8639         * bus/dispatch.c (check_existent_service_activation): lots more
8640         work on the activation test; it doesn't fully pass yet...
8641
8642         * test/test-service.c (main): fix so we don't memleak the
8643         connection to the message bus
8644         (filter_func): accept a message asking us to exit
8645
8646 2003-04-06  Havoc Pennington  <hp@pobox.com>
8647
8648         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
8649         from Colin Walters
8650
8651         * configure.in: fixes to Qt detection from Colin Walters
8652
8653         * doc/Makefile.am: Only remove generated docbook dirs if they
8654         exist, from Colin Walters
8655
8656         * dbus/dbus-bus.c: change how we set well-known connections to
8657         NULL, so that it works if a single connection is stored in
8658         two well-known array slots.
8659
8660         * test/Makefile.am: remove a lot of stuff that isn't immediately
8661         useful, it's in CVS history if we want it.
8662
8663         * test/test-service.c: use dbus-mainloop instead of that
8664         watch.[hc] crack
8665
8666 2003-04-06  Havoc Pennington  <hp@pobox.com>
8667
8668         * dbus/Makefile.am: split lists of sources into stuff that goes in
8669         the library, util functions that go in the lib and are also used
8670         elsewhere, and util functions that are used in tests/daemon but
8671         don't go in the lib.
8672
8673         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
8674         here so it can be used in test binaries also
8675
8676 2003-04-06  Havoc Pennington  <hp@pobox.com>
8677
8678         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
8679         here in the parent process, so we can return an error if it
8680         fails. Also, move some of the code into the child so the parent
8681         is less hosed if we fail midway through.
8682
8683         * bus/bus.c (bus_context_new): move pidfile detection further up
8684         in the function, before we start overwriting sockets and such.
8685
8686         * bus/messagebus.in: adjust this a bit, not sure if it will work.
8687
8688         * configure.in: add --with-system-pid-file and --with-system-socket
8689
8690 2003-04-06  Colin Walters  <walters@verbum.org>
8691
8692         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
8693
8694         * bus/system.conf.in: Declare a pidfile.
8695
8696         * bus/bus.c (bus_context_new): Test for an existing pid file, and
8697         create one (if appropriate).
8698
8699         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
8700         (struct BusConfigParser) [pidfile]: New.
8701         (element_type_to_name, merge_included, start_busconfig_child)
8702         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
8703         (bus_config_parser_unref): Free it.
8704         (bus_config_parser_get_pidfile): New function.
8705
8706         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
8707
8708         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
8709
8710         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
8711
8712         * dbus/dbus-sysdeps.h: Prototype it.
8713
8714 2003-04-06  Havoc Pennington  <hp@pobox.com>
8715
8716         * bus/bus.c (bus_context_new): print the address in here, rather
8717         than in main(), because we need to do it before forking the daemon
8718
8719         * bus/dispatch.c (send_service_nonexistent_error): set the sender
8720         on the service nonexistent error
8721
8722         * bus/driver.c (bus_driver_handle_acquire_service): set the
8723         sender on the AcquireService reply
8724
8725         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
8726         server also listen on a UNIX socket so services can connect to it.
8727
8728 2003-04-06  Havoc Pennington  <hp@pobox.com>
8729
8730         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
8731         so it detects deadlocks and also we actually init threads when
8732         debugging.
8733
8734 2003-04-06  Havoc Pennington  <hp@pobox.com>
8735
8736         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
8737         save the domain socket name, and unlink it when we disconnect the
8738         server. Means that at least when we exit normally, we won't leave
8739         a bunch of junk in /tmp
8740
8741         * dbus/dbus-transport-unix.c
8742         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
8743         memory management). (I was making a real change here but then
8744         didn't)
8745
8746 2003-04-06  Havoc Pennington  <hp@pobox.com>
8747
8748         * bus/bus.c (bus_context_new): fix wrong handling of
8749         server_data_slot_unref() in the error case.
8750
8751         * dbus/dbus-internals.h (_dbus_assert): change so it passes
8752         "(condition) != 0" to _dbus_real_assert so that
8753         "_dbus_assert (pointer)" doesn't cause a warning
8754
8755         * bus/main.c (main): accept --print-address option to print out
8756         the message bus address
8757
8758         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
8759
8760         * dbus/dbus-transport.c (_dbus_transport_open): special error for
8761         "tmpdir" option to unix: address on client side
8762
8763         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
8764         to unix: address
8765
8766         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
8767         we can use to create sockets in the test suite.
8768
8769         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
8770         cleanly. To be used for testing.
8771
8772         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
8773
8774         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
8775
8776         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
8777         handle trying to call this when there's no servers active
8778
8779 2003-04-05  Havoc Pennington  <hp@pobox.com>
8780
8781         * NEWS: update
8782
8783         * configure.in: 0.8
8784
8785 2003-04-05  Havoc Pennington  <hp@pobox.com>
8786
8787         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
8788         crash on startup. Need to get "try starting the daemon"
8789         in the test suite I guess. ;-)
8790
8791         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
8792         tracked the number of open connections; it's better done in
8793         application-specific code as you want it to span all servers etc.
8794
8795 2003-04-05  Havoc Pennington  <hp@pobox.com>
8796
8797         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
8798         patch from Colin Walters
8799
8800 2003-04-05  Havoc Pennington  <hp@pobox.com>
8801
8802         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
8803         reality; in fact multiple mechanisms are allowed.
8804
8805         * dbus/dbus-internals.c (_dbus_real_assert)
8806         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
8807         _dbus_assert_not_reached() into functions, so that they don't show
8808         up in basic block counts for test coverage, and don't use up as
8809         much disk space. Does mean slower execution speed though, so
8810         assumes --disable-asserts is the normal production case.
8811
8812 2003-04-05  Havoc Pennington  <hp@pobox.com>
8813
8814         * test/Makefile.am (dist-hook): also dist *.in files
8815
8816         * NEWS: update
8817
8818         * configure.in: 0.7
8819
8820 2003-04-05  Havoc Pennington  <hp@pobox.com>
8821
8822         * dbus/dbus-string.c: docs warning
8823
8824         * dbus/dbus-spawn.c: missing docs
8825
8826         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
8827
8828 2003-04-05  Havoc Pennington  <hp@pobox.com>
8829
8830         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
8831         magic from GLib
8832
8833         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
8834         to -1 once we've reaped the babysitter
8835         (_dbus_babysitter_handle_watch): do as much work as we can, not
8836         just one go of it
8837
8838         * bus/activation.c: add code using DBusBabysitter so that we
8839         handle it when a service fails to start up properly.
8840         (bus_activation_service_created): don't remove the activation
8841         entries as we go, just let them get removed when we free the pending
8842         activation. Unref reply messages after sending them.
8843
8844 2003-04-05  Havoc Pennington  <hp@pobox.com>
8845
8846         * test/decode-gcov.c (main): print per-directory stats in the report
8847
8848         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
8849
8850 2003-04-05  Havoc Pennington  <hp@pobox.com>
8851
8852         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
8853
8854         * test/decode-gcov.c: hack up a little program to suck data
8855         out of gcov files. Yes this is sort of silly.
8856
8857         * configure.in: define something in config.h and do an
8858         AM_CONDITIONAL when gcov is enabled
8859
8860 2003-04-04  Havoc Pennington  <hp@redhat.com>
8861
8862         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
8863         return a "babysitter" object that is used to monitor the status of
8864         the spawned process and reap it when required.
8865
8866         * test/test-segfault.c, test/test-exit.c,
8867         test/test-sleep-forever.c: binaries that do various lame things,
8868         used in the test suite.
8869
8870         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
8871
8872 2003-04-03  Havoc Pennington  <hp@pobox.com>
8873
8874         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
8875         in preparation for modifying it, dbus-sysdeps is getting
8876         a bit unmanageable.
8877
8878 2003-04-03  Havoc Pennington  <hp@redhat.com>
8879
8880         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
8881         have multiple ones
8882
8883         * bus/*.[hc]: adapt to mainloop change
8884
8885 2003-04-03  Havoc Pennington  <hp@redhat.com>
8886
8887         * bus/activation.c (load_directory): fix up memleaks
8888         (bus_activation_entry_free): free the entry
8889
8890         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
8891         we get one from the message bus; fix memleaks.
8892
8893         * dbus/dbus-message.c (dbus_set_error_from_message): new function
8894
8895 2003-04-03  Havoc Pennington  <hp@pobox.com>
8896
8897         * bus/config-parser.c (bus_config_parser_unref): free
8898         list of mechanisms, bug discovered by test suite enhancements
8899         (putting system.conf and session.conf into suite)
8900
8901         * test/Makefile.am, test/test-service.c: add placeholder for a
8902         test service that we'll activate as part of test suite. Doesn't
8903         do anything yet.
8904
8905         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
8906         setting NULL value, and use system malloc not dbus_malloc()
8907         when we have unavoidable memleakage.
8908
8909         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
8910         didn't work, and support DBUS_BUS_ACTIVATION.
8911
8912         * bus/activation.c (child_setup): pass our well-known bus type to
8913         the child
8914
8915         * bus/config-parser.c: support <type> to specify well-known type
8916
8917         * doc/dbus-specification.sgml: document the env variables to
8918         locate well-known buses and find service activator
8919
8920 2003-04-02  Havoc Pennington  <hp@redhat.com>
8921
8922         * test/Makefile.am (all-local): add a rule to copy tests to
8923         builddir, so we can have generated tests. Use this to remove the
8924         silly hack for testing system.conf and session.conf. Will use this
8925         shortly to generate .service files pointing to test binaries.
8926
8927 2003-04-02  Havoc Pennington  <hp@redhat.com>
8928
8929         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
8930         current alloc and needed new length, not max of the doubled
8931         allocation and needed new length. Also, when building tests,
8932         don't do the double-allocation stuff, just realloc every time.
8933
8934 2003-04-02  Havoc Pennington  <hp@redhat.com>
8935
8936         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
8937         in error messages
8938         (_dbus_string_get_dirname): new
8939         (_dbus_sysdeps_test): new
8940         (_dbus_directory_open): include dirnames in error messages
8941
8942         * bus/config-parser.c: interpret <include> and <includedir> and
8943         <servicedir> relative to config file location if the given
8944         filename is not absolute.
8945
8946         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
8947
8948 2003-04-02  Havoc Pennington  <hp@redhat.com>
8949
8950         * bus/connection.c (bus_transaction_send_error_reply): set sender
8951         service for the error, and unref the reply on success
8952
8953         * bus/activation.c: convert to use BusTransaction so OOM can be
8954         handled correctly
8955         (bus_activation_service_created): set sender of the message
8956
8957 2003-04-01  Havoc Pennington  <hp@redhat.com>
8958
8959         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
8960         <includedir> (at least mostly)
8961
8962         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
8963         first, then the user ID
8964
8965 2003-04-01  Havoc Pennington  <hp@pobox.com>
8966
8967         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
8968         function
8969
8970         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
8971
8972         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
8973
8974         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
8975         socket 0777, and unlink any existing socket.
8976
8977         * bus/bus.c (bus_context_new): change our UID/GID and fork if
8978         the configuration file so specifies; set up auth mechanism
8979         restrictions
8980
8981         * bus/config-parser.c (bus_config_parser_content): add support
8982         for <fork> option and fill in code for <auth>
8983
8984         * bus/system.conf.in: add <fork/> to default configuration,
8985         and limit auth mechanisms to EXTERNAL
8986
8987         * doc/config-file.txt (Elements): add <fork>
8988
8989         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
8990         (_dbus_change_identity): new function
8991
8992 2003-03-31  Havoc Pennington  <hp@redhat.com>
8993
8994         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
8995         (_dbus_listen_unix_socket): fix off-by-one error in null
8996         termination spotted by Nalin
8997
8998 2003-03-31  Havoc Pennington  <hp@redhat.com>
8999
9000         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
9001         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
9002         having a real home directory available.
9003
9004 2003-03-31  Havoc Pennington  <hp@redhat.com>
9005
9006         * bus/Makefile.am (install-data-hook): create /var/run/dbus
9007
9008         * bus/messagebus.in: add init script for Red Hat /etc/init.d
9009
9010         * configure.in: add support for specifying a style of init script
9011         to install
9012
9013 2003-03-31  Havoc Pennington  <hp@redhat.com>
9014
9015         Fix some annoying DBusString API and fix all affected code.
9016
9017         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
9018         max_length argument
9019         (_dbus_string_get_data): change to return string instead of using
9020         an out param
9021         (_dbus_string_get_const_data): ditto
9022         (_dbus_string_get_data_len): ditto
9023         (_dbus_string_get_const_data_len): ditto
9024
9025 2003-03-31  Havoc Pennington  <hp@redhat.com>
9026
9027         * bus/main.c (main): fix up the command line arguments to be nicer
9028
9029 2003-03-31  Havoc Pennington  <hp@redhat.com>
9030
9031         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
9032         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
9033         final location that lands in the config file
9034
9035         * bus/config-loader-expat.c (bus_config_load): fix type of
9036         XML_Parser variable
9037
9038         * doc/TODO: remove TODO item for dbus_bus_get()
9039
9040         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
9041
9042 2003-03-31  Havoc Pennington  <hp@pobox.com>
9043
9044         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
9045         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
9046         argument since they are always client side
9047
9048         * dbus/dbus-server.c (dbus_server_get_address): new function
9049
9050         * bus/main.c (main): take the configuration file as an argument.
9051
9052         * test/data/valid-config-files/debug-allow-all.conf: new file to
9053         use with dispatch.c tests for example
9054
9055         * bus/test-main.c (main): require test data dir
9056
9057         * bus/bus.c (bus_context_new): change this to take a
9058         configuration file name as argument
9059
9060         * doc/config-file.txt (Elements): add <servicedir>
9061
9062         * bus/system.conf, bus/session.conf: new files
9063
9064         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
9065         well-known socket if none set
9066
9067         * configure.in: create system.conf and session.conf
9068
9069 2003-03-30  Havoc Pennington  <hp@pobox.com>
9070
9071         * bus/config-parser.c: hacking
9072
9073         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
9074         to shut down, since it could cause weirdness with the DBusList
9075         lock
9076
9077         * dbus/dbus-list.c (_dbus_list_test): add tests for the
9078         link-oriented stack routines
9079         (alloc_link): free the mempool if the first alloc from it fails
9080
9081         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
9082
9083         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
9084         from GLib
9085         (_dbus_string_skip_white): new
9086
9087         * doc/config-file.txt (Elements): add <includedir>
9088
9089 2003-03-28  Havoc Pennington  <hp@pobox.com>
9090
9091         * dbus/dbus-string.c (_dbus_string_copy_data_len)
9092         (_dbus_string_copy_data): new functions
9093
9094 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
9095
9096         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
9097         * dbus/dbus-bus.h:
9098         Add dbus_bus_get.
9099
9100         * dbus/dbus-memory.c:
9101         Fix a doc comment.
9102
9103 2003-03-28  Havoc Pennington  <hp@pobox.com>
9104
9105         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
9106         I think it may have just been superstition. Not sure.
9107
9108         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
9109         failures that were not being handled.
9110
9111         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
9112
9113         * dbus/dbus-memory.c: add ability to set number of mallocs in a
9114         row that will fail on out-of-memory.
9115
9116         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
9117         function for testing out-of-memory handling.
9118
9119         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
9120         allocation functions, they do map exactly to the expat ones.
9121
9122 2003-03-27  Havoc Pennington  <hp@redhat.com>
9123
9124         * bus/config-loader-libxml.c (bus_config_load): add another error
9125         check
9126
9127 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
9128
9129         * doc/TODO:
9130         Add note about automatic service activation.
9131
9132         * doc/dbus-specification.sgml:
9133         Rename the specification and clarify a few things.
9134
9135 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
9136
9137         * Doxyfile.in:
9138         * dbus/dbus-address.c:
9139         * dbus/dbus-dict.c:
9140         * dbus/dbus-marshal.c:
9141         * dbus/dbus-server-debug-pipe.c:
9142         * dbus/dbus-transport-unix.c:
9143         Fix documentation warnings.
9144
9145 2003-03-26  Havoc Pennington  <hp@pobox.com>
9146
9147         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
9148         after every test so it's quick and easy to see which leaked, and
9149         so we test multiple dbus_shutdown() calls
9150
9151         * configure.in: change configure.in XML stuff to also support
9152         expat
9153
9154         * config-loader-libxml.c: some hacking
9155
9156         * config-loader-expat.c: some hacking
9157
9158         * config-parser.c: some hacking, plus tests
9159
9160 2003-03-25  Havoc Pennington  <hp@redhat.com>
9161
9162         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
9163
9164         * configure.in: add --with-xml option to specify XML library,
9165         right now only libxml is supported.
9166
9167         * bus/config-loader-libxml.c, config-parser.c: sync some minor
9168         nonworking code between home and work, still just stubs
9169
9170 2003-03-24  Havoc Pennington  <hp@redhat.com>
9171
9172         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
9173         file
9174
9175         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
9176         NULL argument for "message" if the error is a well-known one,
9177         fill in a generic message in this case.
9178
9179         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
9180         favor of DBusError
9181
9182         * bus/test.c (bus_test_flush_bus): add
9183
9184         * bus/policy.c (bus_policy_test): test code stub
9185
9186 2003-03-24  Havoc Pennington  <hp@pobox.com>
9187
9188         * bus/connection.c (bus_connections_setup_connection): set up
9189         the "can this user connect" function, but it always returns
9190         TRUE until we have a config file parser so we can have a config
9191         file that allows connections.
9192
9193 2003-03-23  Havoc Pennington  <hp@pobox.com>
9194
9195         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
9196         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
9197         the mutex, so we can check for proper memory management
9198         and OOM handling.
9199
9200         * dbus/dbus-dataslot.c: remove the mutex from
9201         DBusDataSlotAllocator and lock it manually when using it,
9202         to simplify fitting it into the global slots framework.
9203
9204         * dbus/dbus-threads.c (init_static_locks): rework how we're
9205         handling global locks so they are easily shut down.
9206
9207         * bus/policy.c (bus_policy_append_rule): fix
9208
9209         * bus/test-main.c (main): check for memleaks
9210
9211         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
9212         test suite check for memleaks
9213
9214         * dbus/dbus-memory.c: add support in test mode for tracking
9215         number of outstanding blocks
9216
9217 2003-03-23  Havoc Pennington  <hp@pobox.com>
9218
9219         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
9220         policies code
9221
9222         * dbus/dbus-hash.h: add ULONG hash keys
9223
9224         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
9225         (_dbus_get_group_id): new function
9226
9227 2003-03-20  Havoc Pennington  <hp@redhat.com>
9228
9229         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
9230         new function
9231         (dbus_connection_get_unix_user): new function
9232
9233 2003-03-20  Havoc Pennington  <hp@pobox.com>
9234
9235         * bus/connection.c (bus_connection_send_oom_error): assert that
9236         message has a sender
9237         (connection_execute_transaction): ditto
9238         (bus_connection_preallocate_oom_error): fix to set the sender, and
9239         set recipient to the destination service, not the bus driver
9240
9241         * bus/policy.c: hacking
9242
9243         * dbus/dbus-message.c (dbus_message_service_is): new function
9244         (dbus_message_sender_is): new
9245
9246 2003-03-19  Havoc Pennington  <hp@redhat.com>
9247
9248         * bus/policy.c: start sketching code for policy restrictions on
9249         what connections can do.
9250
9251 2003-03-18  Havoc Pennington  <hp@redhat.com>
9252
9253         * doc/TODO: some notes on high-level todo items. Little nitpick
9254         stuff is all in @todo, so no need to add it here.
9255
9256         * doc/config-file.txt: some notes on how config file might look
9257
9258 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
9259
9260         * configure.in: 0.6
9261
9262         * NEWS: Update.
9263
9264 2003-03-17  Havoc Pennington  <hp@redhat.com>
9265
9266         * dbus/dbus-internals.h: add gcc attributes so that
9267         our printf-style functions warn on bad arguments to
9268         format
9269
9270         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
9271         format bug
9272
9273         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
9274         printf format bug
9275
9276 2003-03-17  Havoc Pennington  <hp@redhat.com>
9277
9278         * bus/test-main.c (main): make it print something as it runs
9279         so make check doesn't look stuck
9280
9281         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
9282         from CVS, now obsolete
9283
9284 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9285
9286         * bus/dispatch.c: (bus_dispatch):
9287         Refetch the service name since it may have been reallocated
9288         when dbus_message_set_sender was called.
9289
9290         * dbus/dbus-sysdeps.c: (_dbus_accept):
9291         Add address and address length variables and use them to stop
9292         valgrind from complaining.
9293
9294 2003-03-17  Havoc Pennington  <hp@pobox.com>
9295
9296         All tests pass, no memleaks, no valgrind complaints.
9297
9298         * bus/test.c: refcount handler_slot
9299
9300         * bus/connection.c (bus_connections_new): refcount
9301         connection_data_slot
9302
9303         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
9304         bytes so that auth scripts pass.
9305
9306         * bus/dispatch.c: init message_handler_slot so it gets allocated
9307         properly
9308
9309         * bus/dispatch.c (message_handler_slot_ref): fix memleak
9310
9311         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
9312         dealloc server_pipe_hash when no longer used for benefit of
9313         leak checking
9314
9315         * dbus/dbus-auth.c (process_command): memleak fix
9316
9317         * bus/dispatch.c (check_hello_message): memleak fix
9318
9319 2003-03-16  Havoc Pennington  <hp@pobox.com>
9320
9321         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
9322
9323 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
9324
9325         * bus/activation.c (bus_activation_activate_service): Append
9326         the pending activation entry to the list of pending activations.
9327
9328 2003-03-16  Havoc Pennington  <hp@pobox.com>
9329
9330         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
9331         connections
9332
9333         * dbus/dbus-address.c (create_entry): fix OOM handling when
9334         failing to alloc entry->method
9335
9336 2003-03-16  Havoc Pennington  <hp@pobox.com>
9337
9338         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
9339         the watch
9340
9341         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9342         add some missing dbus_set_result
9343
9344         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
9345         alloc the DBusMessageHandler
9346
9347         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
9348         the transport here, since we call this from the finalizer; it
9349         resulted in a double-finalize.
9350
9351         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
9352         where we tried to use transport->connection that was NULL,
9353         happened when transport was disconnected early on due to OOM
9354
9355         * bus/*.c: adapt to handle OOM for watches/timeouts
9356
9357         * dbus/dbus-transport-unix.c: port to handle OOM during
9358         watch handling
9359
9360         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
9361         reference to unused bytes instead of a copy
9362
9363         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
9364         out of memory
9365
9366         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
9367         FALSE on OOM
9368
9369         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
9370         of memory
9371
9372 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9373
9374         * doc/dbus-specification.sgml:
9375         Document reply message for ActivateService.
9376
9377 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9378
9379         * bus/activation.c: (bus_pending_activation_entry_free),
9380         (bus_pending_activation_free), (bus_activation_new),
9381         (bus_activation_unref), (bus_activation_service_created),
9382         (bus_activation_activate_service):
9383         * bus/activation.h:
9384         * bus/bus.c: (bus_context_new):
9385         * bus/desktop-file.c: (new_section):
9386         * bus/driver.c: (bus_driver_send_service_deleted),
9387         (bus_driver_handle_activate_service):
9388         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
9389         * bus/services.h:
9390         * dbus/dbus-connection.c:
9391         (dbus_connection_send_with_reply_and_block):
9392         * dbus/dbus-message.c: (dbus_message_append_args_valist):
9393         * dbus/dbus-protocol.h:
9394         Make activation work better. Now pending activations will be queued
9395         and the daemon won't try to activate services that are already registered.
9396
9397 2003-03-16  Havoc Pennington  <hp@pobox.com>
9398
9399         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
9400         connection data
9401
9402         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
9403         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
9404
9405 2003-03-16  Havoc Pennington  <hp@pobox.com>
9406
9407         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
9408         this. always run the test suite before commit...
9409
9410         * bus/*: adapt to DBusConnection API changes
9411
9412         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9413         requires renaming stuff to avoid dbus_connection_dispatch name
9414         conflict.
9415
9416         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
9417         function
9418
9419         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
9420         separate from _dbus_message_loader_return_buffer()
9421
9422         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
9423         this, because it's now always broken to use; the number of
9424         messages in queue vs. the number still buffered by the message
9425         loader is undefined/meaningless. Should use
9426         dbus_connection_get_dispatch_state().
9427         (dbus_connection_dispatch): rename from
9428         dbus_connection_dispatch_message
9429
9430 2003-03-16  Havoc Pennington  <hp@pobox.com>
9431
9432         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
9433         implementation
9434
9435 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
9436
9437         * dbus/dbus-connection.c:
9438         (dbus_connection_send_with_reply_and_block):
9439         Decrease connection->n_incoming when removing an entry
9440         from the list.
9441         * dbus/dbus-dict.c: (dbus_dict_entry_free),
9442         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9443         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9444         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
9445         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
9446         (dbus_dict_get_byte_array):
9447         Handle NULL arrays and strings. Also add support for byte arrays.
9448
9449         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
9450         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
9451         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9452         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9453         (_dbus_demarshal_dict), (demarshal_and_validate_len),
9454         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
9455         * dbus/dbus-marshal.h:
9456         Add support for marshalling and demarshalling empty arrays and strings.
9457
9458         * dbus/dbus-message.c: (dbus_message_append_args_valist),
9459         (dbus_message_append_string_array),
9460         (dbus_message_iter_get_boolean),
9461         (dbus_message_iter_get_boolean_array),
9462         (dbus_message_iter_get_int32_array),
9463         (dbus_message_iter_get_uint32_array),
9464         (dbus_message_iter_get_double_array),
9465         (dbus_message_iter_get_byte_array),
9466         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
9467         (check_message_handling):
9468         Add support for getting empty arrays and dicts.
9469
9470         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
9471         Don't do any validation at all for now, that's better than just checking
9472         for ASCII.
9473
9474         * test/data/valid-messages/emptiness.message:
9475         New test message with lots of empty arrays.
9476
9477 2003-03-16  Havoc Pennington  <hp@pobox.com>
9478
9479         * dbus/dbus-connection.c
9480         (_dbus_connection_queue_received_message_link): new function that
9481         can't fail due to OOM
9482
9483         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
9484         new function pops a message together with a list link
9485         containing it.
9486
9487         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
9488         message queuing functions to avoid needing to alloc memory
9489
9490 2003-03-16  Havoc Pennington  <hp@pobox.com>
9491
9492         Oops - test code was only testing failure of around 30 of the
9493         mallocs in the test path, but it turns out there are 500+
9494         mallocs. I believe this was due to misguided linking setup such
9495         that there was one copy of dbus_malloc etc. in the daemon and one
9496         in the shared lib, and only daemon mallocs were tested. In any
9497         case, the test case now tests all 500+ mallocs, and doesn't pass
9498         yet, though there are lots of fixes in this patch.
9499
9500         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
9501         this so that it doesn't need to allocate memory, since it
9502         has no way of indicating failure due to OOM (and would be
9503         annoying if it did).
9504
9505         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
9506
9507         * bus/Makefile.am: rearrange to create two self-contained
9508         libraries, to avoid having libraries with overlapping symbols.
9509         that was resulting in weirdness, e.g. I'm pretty sure there
9510         were two copies of global static variables.
9511
9512         * dbus/dbus-internals.c: move the malloc debug stuff to
9513         dbus-memory.c
9514
9515         * dbus/dbus-list.c (free_link): free list mempool if it becomes
9516         empty.
9517
9518         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
9519
9520         * dbus/dbus-address.c (dbus_parse_address): free list nodes
9521         on failure.
9522
9523         * bus/dispatch.c (bus_dispatch_add_connection): free
9524         message_handler_slot when no longer using it, so
9525         memory leak checkers are happy for the test suite.
9526
9527         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
9528
9529         * bus/bus.c (new_connection_callback): disconnect in here if
9530         bus_connections_setup_connection fails.
9531
9532         * bus/connection.c (bus_connections_unref): fix to free the
9533         connections
9534         (bus_connections_setup_connection): if this fails, don't
9535         disconnect the connection, just be sure there are no side
9536         effects.
9537
9538         * dbus/dbus-string.c (undo_alignment): unbreak this
9539
9540         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
9541         leaking
9542         (_dbus_auth_new): fix the order in which we free strings
9543         on OOM failure
9544
9545         * bus/connection.c (bus_connection_disconnected): fix to
9546         not send ServiceDeleted multiple times in case of memory
9547         allocation failure
9548
9549         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
9550         get the base service name
9551         (dbus_bus_register_client): don't return base service name,
9552         instead store it on the DBusConnection and have an accessor
9553         function for it.
9554         (dbus_bus_register_client): rename dbus_bus_register()
9555
9556         * bus/dispatch.c (check_hello_message): verify that other
9557         connections on the bus also got the correct results, not
9558         just the one sending hello
9559
9560 2003-03-15  Havoc Pennington  <hp@pobox.com>
9561
9562         Make it pass the Hello handling test including all OOM codepaths.
9563         Now to do other messages...
9564
9565         * bus/services.c (bus_service_remove_owner): fix crash when
9566         removing owner from an empty list of owners
9567         (bus_registry_ensure): don't leave service in the list of
9568         a connection's owned services if we fail to put the service
9569         in the hash table.
9570
9571         * bus/connection.c (bus_connection_preallocate_oom_error): set
9572         error flag on the OOM error.
9573
9574         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
9575         handle _dbus_transport_set_connection failure
9576
9577         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
9578         to create watches up front and simply enable/disable them as
9579         needed.
9580         (unix_connection_set): this can now fail on OOM
9581
9582         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
9583         of enabling/disabling a watch or timeout.
9584
9585         * bus/loop.c (bus_loop_iterate): don't touch disabled
9586         watches/timeouts
9587
9588         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
9589
9590 2003-03-15  Havoc Pennington  <hp@pobox.com>
9591
9592         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
9593         write useful test code, after all that futzing around ;-)
9594
9595         Test does not yet pass because we can't handle OOM in
9596         _dbus_transport_messages_pending (basically,
9597         dbus_connection_preallocate_send() does not prealloc the write
9598         watch). To fix this, I think we need to add new stuff to
9599         set_watch_functions, namely a SetEnabled function so we can alloc
9600         the watch earlier, then enable it later.
9601
9602         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
9603         dbus-memory.c to the convenience lib
9604
9605         * bus/test.c: rename some static functions to keep them clearly
9606         distinct from stuff in connection.c. Handle client disconnection.
9607
9608 2003-03-14  Havoc Pennington  <hp@pobox.com>
9609
9610         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
9611         transport, tests more of the real codepath. Set up clients
9612         with bus_setup_debug_client.
9613
9614         * bus/test.c (bus_setup_debug_client): function to set up debug
9615         "clients" on the main loop
9616
9617         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
9618         support
9619
9620         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
9621         server type
9622
9623         * dbus/dbus-server-debug.c: support a debug server based on pipes
9624
9625         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
9626         (_dbus_close): new function
9627
9628         * configure.in: check for socketpair
9629
9630 2003-03-14  Havoc Pennington  <hp@redhat.com>
9631
9632         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
9633         cheesy hack
9634
9635         * dbus/dbus-transport-debug.c: rework this a good bit to be
9636         less complicated. hopefully still works.
9637
9638         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
9639         manually
9640
9641         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
9642         after running it
9643
9644         * dbus/dbus-message.c (dbus_message_copy): rename from
9645         dbus_message_new_from_message, fix it up to copy
9646         all the message fields, add test case
9647
9648         * bus/dispatch.c (bus_dispatch_test): add some more test code,
9649         not quite passing yet
9650
9651 2003-03-14  Havoc Pennington  <hp@pobox.com>
9652
9653         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
9654         until no work remains" in test code. (the large diff here
9655         is just code movement, no actual changes)
9656
9657         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
9658         1, no point waiting around for test code.
9659         (_dbus_server_debug_accept_transport): unref the timeout
9660         after adding it (right?)
9661
9662         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
9663
9664 2003-03-13  Havoc Pennington  <hp@redhat.com>
9665
9666         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
9667         out of memory
9668
9669         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
9670         of memory
9671
9672         * dbus/dbus-connection.h: Make AddWatchFunction and
9673         AddTimeoutFunction return a bool so they can fail on out-of-memory
9674
9675         * bus/bus.c (bus_context_new): set up timeout handlers
9676
9677         * bus/connection.c (bus_connections_setup_connection): set up
9678         timeout handlers
9679
9680         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
9681         can fail
9682
9683         * bus/bus.c (bus_context_new): adapt to changes
9684
9685         * bus/connection.c: adapt to changes
9686
9687         * test/watch.c: adapt to DBusWatch changes
9688
9689         * bus/dispatch.c (bus_dispatch_test): started adding this but
9690         didn't finish
9691
9692 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
9693
9694         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
9695
9696 2003-03-13  Havoc Pennington  <hp@pobox.com>
9697
9698         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
9699         set up a test framework as for the library
9700
9701 2003-03-12  Havoc Pennington  <hp@pobox.com>
9702
9703         Throughout: purge global variables, introduce BusActivation,
9704         BusConnections, BusRegistry, etc. objects instead.
9705
9706         * bus/bus.h, bus/bus.c: introduce BusContext as a global
9707         message bus object
9708
9709         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
9710         going to redo this a bit differently I think
9711
9712 2003-03-12  Havoc Pennington  <hp@redhat.com>
9713
9714         Mega-patch that gets the message bus daemon initially handling
9715         out-of-memory. Work still needed. Also lots of random
9716         moving stuff to DBusError instead of ResultCode.
9717
9718         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
9719
9720         * dbus/dbus-connection.c
9721         (dbus_connection_send_with_reply_and_block): use DBusError
9722
9723         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
9724         DBusResultCode
9725
9726         * dbus/dbus-connection.c (dbus_connection_send): drop the result
9727         code here, as the only failure possible is OOM.
9728
9729         * bus/connection.c (bus_connection_disconnect):
9730         rename bus_connection_disconnected as it's a notification only
9731
9732         * bus/driver.c (bus_driver_handle_acquire_service): don't free
9733         "name" on get_args failure, should be done by get_args;
9734         don't disconnect client for bad args, just return an error.
9735         (bus_driver_handle_service_exists): ditto
9736
9737         * bus/services.c (bus_services_list): NULL-terminate returned array
9738
9739         * bus/driver.c (bus_driver_send_service_lost)
9740         (bus_driver_send_service_acquired): send messages from driver to a
9741         specific client to the client's unique name, not to the broadcast
9742         service.
9743
9744         * dbus/dbus-message.c (decode_header_data): reject messages that
9745         contain no name field
9746         (_dbus_message_get_client_serial): rename to
9747         dbus_message_get_serial and make public
9748         (_dbus_message_set_serial): rename from set_client_serial
9749         (_dbus_message_set_reply_serial): make public
9750         (_dbus_message_get_reply_serial): make public
9751
9752         * bus/connection.c (bus_connection_foreach): allow stopping
9753         iteration by returning FALSE from foreach function.
9754
9755         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
9756         (dbus_connection_free_preallocated_send)
9757         (dbus_connection_preallocate_send): new API for sending a message
9758         without possibility of malloc failure.
9759         (dbus_connection_send_message): rename to just
9760         dbus_connection_send (and same for whole function family)
9761
9762         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
9763
9764         * dbus/dbus-sysdeps.c (_dbus_exit): new function
9765
9766         * bus/activation.c: handle/return errors
9767
9768         * dbus/dbus-errors.h: add more DBUS_ERROR #define
9769
9770         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
9771         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
9772         (_dbus_result_from_errno): move to this file
9773
9774 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
9775
9776         * dbus/dbus-marshal.c:
9777         (_dbus_marshal_set_string):
9778         Take a length argument so we can marshal the correct string
9779         length.
9780
9781         (_dbus_marshal_dict), (_dbus_demarshal_dict),
9782         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
9783         (_dbus_marshal_test):
9784         * dbus/dbus-marshal.h:
9785         Add support for marshalling and demarshalling dicts.
9786
9787         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9788         Add support for TYPE DICT.
9789
9790         * dbus/dbus-message.c: (set_string_field):
9791         Adjust header padding.
9792
9793         (dbus_message_append_args_valist), (dbus_message_append_dict),
9794         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
9795         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
9796         (check_message_handling), (check_have_valid_message):
9797         * dbus/dbus-message.h:
9798         Add functions for setting and getting dicts.
9799
9800         * dbus/dbus-protocol.h:
9801         Add DBUS_TYPE_DICT.
9802
9803         * dbus/dbus.h:
9804         Add dbus-dict.h
9805
9806         * doc/dbus-specification.sgml:
9807         Add information about how dicts are marshalled.
9808
9809         * test/data/invalid-messages/dict-with-nil-value.message:
9810         * test/data/invalid-messages/too-short-dict.message:
9811         * test/data/valid-messages/dict-simple.message:
9812         * test/data/valid-messages/dict.message:
9813         Add sample messages containing dicts.
9814
9815 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
9816
9817         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
9818
9819 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
9820
9821         * dbus/Makefile.am:
9822         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9823         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
9824         (dbus_dict_set_int32), (dbus_dict_set_uint32),
9825         (dbus_dict_set_double), (dbus_dict_set_string),
9826         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9827         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9828         (dbus_dict_set_string_array), (_dbus_dict_test):
9829         * dbus/dbus-dict.h:
9830         Fix according to comments from Havoc.
9831
9832 2003-03-06  Michael Meeks  <michael@server.home>
9833
9834         * configure.in: if we don't have kde-config, disable have_qt.
9835
9836 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
9837
9838         * dbus/Makefile.am:
9839         Add dbus-dict.[ch]
9840
9841         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9842         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
9843         (dbus_dict_remove), (dbus_dict_get_value_type),
9844         (dbus_dict_get_keys), (dbus_dict_put_boolean),
9845         (dbus_dict_put_int32), (dbus_dict_put_uint32),
9846         (dbus_dict_put_double), (dbus_dict_put_string),
9847         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
9848         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
9849         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
9850         (dbus_dict_get_int32), (dbus_dict_get_uint32),
9851         (dbus_dict_get_double), (dbus_dict_get_string),
9852         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
9853         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
9854         (dbus_dict_get_string_array), (_dbus_dict_test):
9855         * dbus/dbus-dict.h:
9856         Add DBusDict implementation
9857
9858         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
9859         * dbus/dbus-test.h:
9860         Add _dbus_dict_test
9861
9862 2003-03-04  Havoc Pennington  <hp@pobox.com>
9863
9864         * test/data/auth/*: adapt to changes
9865
9866         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
9867         USERID_BASE64 and change USERNAME_BASE64 to put in username not
9868         userid
9869
9870         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
9871         more stuff from being in a context name, to make the protocol
9872         simpler to deal with
9873
9874         * dbus/dbus-errors.c (dbus_error_has_name): new function
9875         (dbus_error_is_set): new function
9876
9877         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
9878         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
9879
9880         * dbus/dbus-connection.c (dbus_connection_flush): also read
9881         messages during a flush operation
9882
9883         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
9884
9885 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
9886
9887         * configure.in: Check for gethostbyname on Solaris.
9888
9889         * dbus/dbus-transport.c: (_dbus_transport_open):
9890         Remove duplicate "tcp" entry.
9891
9892         * doc/dbus-specification.sgml:
9893         Clarify some things.
9894
9895 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
9896
9897         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
9898         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
9899         (_dbus_keyring_test):
9900         * dbus/dbus-md5.c: (_dbus_md5_compute):
9901         * dbus/dbus-sha.c: (_dbus_sha_compute):
9902         Plug memory leaks.
9903
9904 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
9905
9906         * README: Add some things.
9907
9908 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
9909
9910         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
9911         after case DBUS_TYPE_BOOELAN.
9912
9913 2003-03-02  Havoc Pennington  <hp@pobox.com>
9914
9915         * test/break-loader.c (randomly_set_extreme_ints): add test that
9916         sets really huge and small integers
9917
9918         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
9919         that length of boolean array fits in the string, and that
9920         string has room for boolean value in single-bool case.
9921
9922         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
9923         optional value to "ALIGN" command which is what to fill the
9924         alignment with.
9925
9926         * test/data/valid-messages/no-padding.message: add regression
9927         test for the message padding problem
9928
9929 2003-03-02  Havoc Pennington  <hp@pobox.com>
9930
9931         * dbus/dbus-message.c (decode_header_data): fix to always init
9932         message_padding, from Benjamin Dauvergne
9933
9934 2003-03-02  Havoc Pennington  <hp@pobox.com>
9935
9936         * configure.in: 0.5
9937
9938         * NEWS: Update.
9939
9940 2003-03-01  Joe Shaw  <joe@assbarn.com>
9941
9942         * configure.in: Check for "struct cmsgcred" and try to access its
9943         members for BSD-like unices.
9944
9945         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
9946         _dbus_read_credentials_unix_socket().
9947         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
9948         read() for reading the credential byte off the unix socket.  Use
9949         struct cmsgcred on systems that support it.
9950
9951 2003-02-27  Alexander Larsson  <alexl@redhat.com>
9952
9953         * glib/Makefile.am:
9954         * configure.in:
9955         Make gthreads-2.0 dependency optional. Don't build thread test if
9956         its not found.
9957
9958 2003-02-27  Havoc Pennington  <hp@pobox.com>
9959
9960         * dbus/dbus-connection.c
9961         (dbus_connection_send_message_with_reply_and_block): fix doh!
9962         doh! doh! bug that resulted in never removing a reply from the
9963         queue, no wonder we called get_reply_serial so much ;-)
9964
9965         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
9966         and client serial instead of demarshaling them every time
9967
9968 2003-02-27  Havoc Pennington  <hp@pobox.com>
9969
9970         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
9971         more inlined, using dbus-string-private.h, speeds things up
9972         substantially
9973
9974         * dbus/dbus-string.c (_dbus_string_free): apply align offset
9975         when freeing the string
9976         (_dbus_string_steal_data): fix for align offset
9977         (undo_alignment): new function
9978
9979 2003-02-26  Havoc Pennington  <hp@redhat.com>
9980
9981         All kinds of audit fixes from Owen, plus initial attempt to
9982         handle unaligned memory returned from malloc.
9983
9984         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
9985         leave room for align_offset and nul byte
9986         (fixup_alignment): function to track an align_offset and
9987         ensure real->str is aligned
9988         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
9989         to allow a nul byte plus align offset
9990         (_dbus_string_lock): fix overflow issue
9991         (_dbus_string_init_const_len): add assertions on sanity of len,
9992         assign allocated to be ALLOCATION_PADDING larger than len
9993         (set_length): fixup the overflow handling
9994         (_dbus_string_get_data_len): fix overflow in assertion
9995         (open_gap): detect overflow in size of gap to be opened
9996         (_dbus_string_lengthen): add overflow check
9997         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
9998         (_dbus_string_append): add overflow check
9999         (_dbus_string_append_unichar): overflow
10000         (_dbus_string_delete): fix overflow in assertion
10001         (_dbus_string_copy_len): overflow in assertion
10002         (_dbus_string_replace_len): overflows in assertions
10003         (_dbus_string_find): change to implement in terms of
10004         _dbus_string_find_to
10005         (_dbus_string_find_to): assorted fixage
10006         (_dbus_string_equal_c_str): assert c_str != NULL,
10007         fix logic so the function works
10008         (_dbus_string_ends_with_c_str): fix overflow thingy
10009         (_dbus_string_base64_encode): overflow fix
10010         (_dbus_string_validate_ascii): overflow
10011         (_dbus_string_validate_nul): overflow
10012
10013 2003-02-26  Havoc Pennington  <hp@redhat.com>
10014
10015         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
10016
10017 2003-02-26  Alexander Larsson  <alexl@redhat.com>
10018
10019         * configure.in:
10020         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
10021
10022         * dbus/dbus-connection.c:
10023         * dbus/dbus-connection.h:
10024         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
10025         Add dbus_connection_set_wakeup_main_function and use it when queueing
10026         incoming and outgoing messages.
10027
10028
10029         * dbus/dbus-dataslot.c:
10030         Threadsafe usage of DBusDataSlotAllocator
10031
10032         * dbus/dbus-message.c: (dbus_message_get_args_iter):
10033         dbus_new can fail.
10034
10035         * dbus/dbus-server-unix.c:
10036         Add todo comment
10037
10038         * glib/dbus-gmain.c:
10039         Implement the new wakeup functions for glib.
10040
10041         * glib/Makefile.am:
10042         * glib/test-thread-client.c:
10043         * glib/test-thread-server.c:
10044         * glib/test-thread.h:
10045         Initial cut at some thread test code. Not really done yet.
10046
10047 2003-02-26  Havoc Pennington  <hp@pobox.com>
10048
10049         * dbus/dbus-connection.c
10050         (dbus_connection_send_message_with_reply_and_block): fix crash
10051         where we ref'd the outgoing message instead of the returned reply
10052
10053         * dbus/dbus-transport-unix.c (do_authentication): check read watch
10054         at the end of this function, so if we didn't need to read for
10055         authentication, we reinstall it for receiving messages
10056
10057         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
10058         a NULL sender for peer-to-peer case
10059
10060         * dbus/dbus-transport-unix.c (check_read_watch): handle
10061         !authenticated case correctly
10062
10063         * glib/dbus-gmain.c: add support for DBusServer
10064
10065         * dbus/dbus-server.c: add data slot support
10066
10067         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
10068         return values and handle errors
10069
10070         * dbus/dbus-dataslot.c: factor out the data slot stuff from
10071         DBusConnection
10072
10073         * Doxyfile.in (INPUT): add glib subdir
10074
10075         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
10076         setup_with_g_main instead of hookup_with_g_main; write docs
10077
10078 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
10079
10080         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
10081         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10082         * dbus/dbus-message.c: (dbus_message_append_boolean),
10083         (dbus_message_append_boolean_array),
10084         (dbus_message_get_args_valist), (_dbus_message_test):
10085         * dbus/dbus-message.h:
10086         * doc/dbus-specification.sgml:
10087         Various fixes as pointed out by Havoc.
10088
10089         * test/data/invalid-messages/bad-boolean-array.message:
10090         * test/data/invalid-messages/bad-boolean.message:
10091         Add invalid boolean value test cases.
10092
10093 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
10094
10095         * dbus/dbus-internals.c: (_dbus_type_to_string):
10096         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
10097         (_dbus_marshal_validate_arg):
10098         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10099         * dbus/dbus-message.c: (dbus_message_append_args_valist),
10100         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
10101         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
10102         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
10103         (dbus_message_iter_get_double),
10104         (dbus_message_iter_get_boolean_array), (message_iter_test):
10105         * dbus/dbus-message.h:
10106         * dbus/dbus-protocol.h:
10107         * doc/dbus-specification.sgml:
10108         * test/data/valid-messages/lots-of-arguments.message:
10109         Add support for boolean and boolean array types.
10110
10111 2003-02-23  Havoc Pennington  <hp@pobox.com>
10112
10113         * dbus/dbus-keyring.c: finish most of this implementation and
10114         simple unit test
10115
10116         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
10117         these barf if the error isn't cleared to NULL
10118
10119         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
10120         (_dbus_create_directory): new function
10121
10122         * dbus/dbus-errors.c (dbus_set_error): fix warning
10123
10124         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
10125         (_dbus_string_hex_decode): new function
10126         (test_hex_roundtrip): test code
10127
10128         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
10129
10130         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
10131
10132         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
10133         the save-to-temp/rename trick to atomically write the new file
10134         (_dbus_string_parse_uint): new function
10135
10136 2003-02-22  Havoc Pennington  <hp@pobox.com>
10137
10138         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
10139
10140 2003-02-22  Havoc Pennington  <hp@pobox.com>
10141
10142         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
10143         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
10144
10145         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
10146
10147         * dbus/test/data/sha-1: add US government test suite for SHA-1
10148
10149 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10150
10151         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
10152         Make string arrays NULL-terminated.
10153
10154         * dbus/dbus-memory.c: (dbus_free_string_array):
10155         * dbus/dbus-memory.h:
10156         New function for freeing NULL-terminated string arrays.
10157
10158         * dbus/dbus-message-builder.c: (append_quoted_string),
10159         (_dbus_message_data_load):
10160         Add support for array types.
10161
10162         * dbus/dbus-message.c: (check_message_handling):
10163         Add more types as test cases.
10164
10165         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
10166         (_dbus_string_parse_double):
10167         Add the start offset to the end offset.
10168
10169         * test/data/valid-messages/lots-of-arguments.message:
10170         New test message with lots of arguments.
10171
10172 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10173
10174         * dbus/dbus-message.c: (dbus_message_append_nil),
10175         (dbus_message_append_int32), (dbus_message_append_uint32),
10176         (dbus_message_append_double), (dbus_message_append_string),
10177         (dbus_message_append_int32_array),
10178         (dbus_message_append_uint32_array),
10179         (dbus_message_append_double_array),
10180         (dbus_message_append_byte_array),
10181         (dbus_message_append_string_array):
10182         Fix all out-of-memory handling in these functions.
10183
10184 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10185
10186         * dbus/dbus-message.c: (dbus_message_append_nil):
10187         Fix a silly.
10188
10189 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10190
10191         * dbus/dbus-message.c: (dbus_message_append_args_valist),
10192         (dbus_message_append_nil), (dbus_message_append_int32_array),
10193         (dbus_message_append_uint32_array),
10194         (dbus_message_append_double_array),
10195         (dbus_message_append_byte_array),
10196         (dbus_message_append_string_array), (dbus_message_get_args_valist),
10197         (dbus_message_iter_get_int32_array),
10198         (dbus_message_iter_get_uint32_array),
10199         (dbus_message_iter_get_double_array),
10200         (dbus_message_iter_get_byte_array),
10201         (dbus_message_iter_get_string_array):
10202
10203         * dbus/dbus-message.h:
10204         Add functions for appending and getting arrays.
10205
10206 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
10207
10208         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
10209         element size at least 8 bytes, fixes mempool tests on
10210         64-bit machines.
10211
10212 2003-02-20  Alexander Larsson  <alexl@redhat.com>
10213
10214         * dbus/dbus-transport-unix.c (unix_do_iteration):
10215         Unlock the connection mutex during a blocking select call.
10216         Add todo about how we need a way to wake up the select.
10217
10218         * dbus/dbus-connection-internal.h:
10219         * dbus/dbus-connection.c:
10220         Add _dbus_connection_lock and _dbus_connection_unlock.
10221
10222 2003-02-19  Havoc Pennington  <hp@pobox.com>
10223
10224         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
10225         Doxyfile.in, not Doxyfile
10226
10227         * dbus/dbus-keyring.c: do some hacking on this
10228
10229         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
10230
10231         * dbus/dbus-errors.c (dbus_set_error_const): do not call
10232         dbus_error_init
10233         (dbus_set_error): remove dbus_error_init, check for message ==
10234         NULL *before* we sprintf into it, and add @todo about including
10235         system headers in this file
10236
10237         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
10238
10239         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
10240
10241         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
10242         get various bits of user information based on either username
10243         or user ID
10244         (_dbus_homedir_from_username): new function
10245
10246 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
10247
10248         * configure.in:
10249         Add check for nonposix getpwnam_r
10250
10251         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
10252         Align the pool element size to a sizeof (void *) boundary.
10253
10254         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
10255         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
10256         General Solaris fixes.
10257
10258         * test/data/valid-messages/simplest-manual.message:
10259         Explicitly state that we want little-endian packing.
10260
10261 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
10262
10263         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10264
10265         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
10266         Added to create a transport connecting using a tcp/ip socket.
10267
10268         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
10269         to a tcp socket at given host and port.
10270         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
10271         hostname and port.
10272
10273         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10274
10275         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
10276         Added to create a server listening on a TCP/IP socket.
10277
10278 2003-02-19  Havoc Pennington  <hp@pobox.com>
10279
10280         Throughout: mop up all the Doxygen warnings and undocumented
10281         stuff.
10282
10283         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
10284         to search any paths.
10285
10286         * dbus/dbus-threads.c: move global mutex initializers to
10287         dbus-internals.h, multiple prototypes was confusing doxygen
10288         besides being kind of ugly
10289
10290         * Doxyfile (PREDEFINED): have Doxygen define
10291         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
10292         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
10293         (do not abuse the feature! it's for stuff like the autogenerated
10294         macros in dbus-md5.c, not just for things you don't feel like
10295         documenting...)
10296
10297 2003-02-18  Havoc Pennington  <hp@pobox.com>
10298
10299         * dbus/dbus-string.c (_dbus_string_zero): new function
10300
10301         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
10302         wrap it in some dbus-friendly API
10303
10304         * dbus/dbus-types.h: add 16-bit types
10305
10306 2003-02-18  Joe Shaw  <joe@assbarn.com>
10307
10308         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
10309         credentials from our currently running process.
10310         (get_word): Fix a buglet where we were copying the entire length
10311         instead of relative to our position.
10312
10313         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
10314         keys on the stack... it's 640k of data.
10315
10316         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
10317         read the credentials byte off the socket, even if we don't have
10318         SO_PEERCRED.
10319         (_dbus_poll): Implement poll() using select() for systems which
10320         don't have it.
10321
10322         * glib/test-dbus-glib.c (main): Print out an error if no
10323         parameters are given.
10324
10325         * test/data/auth/fallback.auth-script: Added.  Tests that a client
10326         can fallback to a secondary auth mechanism if the first fails.
10327
10328 2003-02-18  Havoc Pennington  <hp@pobox.com>
10329
10330         * AUTHORS: add Alex
10331
10332 2003-02-17  Havoc Pennington  <hp@pobox.com>
10333
10334         * doc/dbus-specification.sgml: lots of cosmetic
10335         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
10336         env variable to DBUS_BUS_ADDRESS, s/client/application/,
10337         s/server/bus/ (except in authentication section). Add a section
10338         "Message Bus Message Routing"
10339
10340 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
10341
10342         Release 0.4
10343
10344         * NEWS: Update
10345
10346 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10347
10348         * doc/dbus-specification.sgml:
10349         Specification updates.
10350
10351 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10352
10353         * bus/activation.c: (bus_activation_init), (child_setup),
10354         (bus_activation_activate_service):
10355         * bus/activation.h:
10356         * bus/main.c: (main):
10357         Set DBUS_ADDRESS environment variable.
10358
10359         * dbus/dbus-errors.c: (dbus_set_error):
10360         Don't use va_copy since that's a C99 feature.
10361
10362         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
10363         (_dbus_spawn_async):
10364         * dbus/dbus-sysdeps.h:
10365         Add child_setup_func to _dbus_spawn_async.
10366
10367         * doc/dbus-specification.sgml:
10368         Update specification.
10369
10370         * test/spawn-test.c: (setup_func), (main):
10371         Fix test.
10372
10373 2003-02-17  Alexander Larsson  <alexl@redhat.com>
10374
10375         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
10376         Added todo.
10377
10378 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10379
10380         * doc/.cvsignore:
10381         * doc/Makefile.am:
10382         * doc/dbus-test-plan.sgml:
10383         Add test plan document.
10384
10385         * test/Makefile.am:
10386         Fix distcheck.
10387
10388 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
10389
10390         * dbus/dbus-message.c: (decode_header_data),
10391         (_dbus_message_loader_return_buffer):
10392         Set the header padding amount when loading a message.
10393
10394 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10395
10396         * bus/dispatch.c: (send_one_message):
10397         Only send broadcast messages to registered connections.
10398
10399         * dbus/dbus-message.c: (dbus_message_name_is):
10400         * dbus/dbus-message.h:
10401         New convenience function.
10402
10403         * dbus/dbus-transport-debug.c: (do_reading):
10404         Only dispatch one message per run.
10405
10406         * test/Makefile.am:
10407         * test/bus-test.c: (new_connection_callback), (die),
10408         (test_hello_client1_handler), (test_hello_client2_handler),
10409         (test_hello_replies), (main):
10410
10411         * test/bus-test-loop.[ch]:
10412         Add these.
10413
10414 2003-02-16  Havoc Pennington  <hp@pobox.com>
10415
10416         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
10417         backward conditional
10418
10419 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10420
10421         * dbus/dbus-connection.c:
10422         Implement sent_message_with_reply. (with_reply_and block is still
10423         busted).
10424         Made dispatch_message not lose message if OOM.
10425
10426         * dbus/dbus-errors.h:
10427         Add NoReply error (for reply timeouts).
10428
10429 2003-02-16  Alexander Larsson  <alexl@redhat.com>
10430
10431         * dbus/dbus-hash.c (_dbus_hash_table_unref):
10432         Actually free keys and values when destroying hashtable.
10433
10434 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10435
10436         * dbus/dbus-auth.c: (client_try_next_mechanism):
10437         Plug a leak.
10438
10439         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
10440         Return TRUE if there's no thread implementation around.
10441
10442         * glib/dbus-gmain.c: (free_source),
10443         (dbus_connection_hookup_with_g_main):
10444         Make sure to remove the GSource when the connection is finalized.
10445
10446 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10447
10448         * bus/dispatch.c: (bus_dispatch_message_handler):
10449         * dbus/dbus-errors.h:
10450         Return an error if someone tries to send a message to a service
10451         that doesn't exist.
10452
10453 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
10454
10455         * bus/activation.c: (load_directory), (bus_activation_init),
10456         (bus_activation_activate_service):
10457         * bus/activation.h:
10458         * bus/driver.c:
10459         (bus_driver_handle_activate_service), (bus_driver_handle_message):
10460         More work on the activation handling.
10461
10462         * dbus/dbus-errors.h:
10463         Add some error messages
10464
10465         * dbus/dbus-message.c: (dbus_message_new_error_reply):
10466         * dbus/dbus-message.h:
10467         New function that creates an error message.
10468
10469         * dbus/dbus-protocol.h:
10470         Add ACTIVATE_SERVER message.
10471
10472         * dbus/dbus-server-unix.c: (unix_handle_watch),
10473         (_dbus_server_new_for_domain_socket):
10474         Call _dbus_fd_set_close_on_exec.
10475
10476         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
10477         (_dbus_spawn_async), (_dbus_disable_sigpipe),
10478         (_dbus_fd_set_close_on_exec):
10479         * dbus/dbus-sysdeps.h:
10480         Add _dbus_fd_set_close_on exec function. Also add function that checks
10481         that all open fds are set to close-on-exec and warns otherwise.
10482
10483         * dbus/dbus-transport-unix.c:
10484         (_dbus_transport_new_for_domain_socket):
10485         Call _dbus_fd_set_close_on_exec.
10486
10487 2003-02-16  Havoc Pennington  <hp@pobox.com>
10488
10489         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
10490         allow people to avoid setting SIGPIPE to SIG_IGN
10491         (_dbus_connection_new_for_transport): disable SIGPIPE unless
10492         we've been asked not to
10493
10494 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10495
10496         * dbus/dbus-list.c: (_dbus_list_append_link),
10497         (_dbus_list_prepend_link):
10498         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
10499         (dbus_realloc):
10500         Warning fixes.
10501
10502 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10503
10504         * bus/Makefile.am:
10505         * bus/activation.c: (bus_activation_entry_free),
10506         (add_desktop_file_entry), (load_directory), (bus_activation_init):
10507         * bus/activation.h:
10508         * bus/main.c: (main):
10509         Add simple activation support, doesn't work yet though.
10510
10511 2003-02-15   Zack Rusin  <zack@kde.org>
10512
10513         * qt/dbus-qthread.cpp:  small casting fix
10514
10515 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10516
10517         * dbus/dbus-errors.c: (dbus_set_error):
10518         * dbus/dbus-errors.h:
10519         Add a few errors and make dbus_set_error void.
10520
10521         * dbus/dbus-sysdeps.c:
10522         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
10523         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
10524         * dbus/dbus-sysdeps.h:
10525         Add _dbus_spawn_async.
10526
10527         * test/spawn-test.c: (main):
10528         Test for _dbus_spawn_async.
10529
10530 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
10531
10532         * dbus/dbus-internals.h:
10533         Fix build without tests.
10534
10535         * dbus/dbus-list.c: (alloc_link):
10536         Fix a segfault when a malloc fails.
10537
10538         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
10539         (dbus_malloc0), (dbus_realloc):
10540         Add support for malloc debugging.
10541
10542 2003-02-15  Alexander Larsson  <alexl@redhat.com>
10543
10544         * dbus/dbus-threads.c:
10545         * dbus/dbus-threads.h:
10546         Add condvars. Remove static mutext from API.
10547         Implement static mutexes by initializing them from threads_init.
10548
10549         * glib/dbus-gthread.c:
10550         * qt/dbus-qthread.cpp:
10551         Update with the thread api changes.
10552
10553
10554         * dbus/dbus-list.c:
10555         * dbus/dbus-list.h:
10556         Turn StaticMutex into normal mutex + init function.
10557         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
10558         _dbus_list_append_link, _dbus_list_prepend_link
10559
10560
10561         * dbus/dbus-sysdeps.c:
10562         * dbus/dbus-sysdeps.h:
10563         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
10564         _dbus_atomic_dec. Only slow fallback implementation at the moment.
10565
10566         * dbus/dbus-protocol.h:
10567         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
10568
10569         * dbus/dbus-message.c:
10570         Make ref/unref atomic.
10571         Fix some docs.
10572
10573         * dbus/dbus-connection-internal.h:
10574         * dbus/dbus-connection.c:
10575         * dbus/dbus-connection.h:
10576         Make threadsafe.
10577         Change _peek to _borrow,_return & _steal_borrowed.
10578         Change disconnect callback to event.
10579         Make dbus_connection_dispatch_messages reentrant.
10580
10581         * dbus/dbus-transport.c:
10582         Don't ref the connection on calls to the transport
10583         implementation.
10584
10585         * dbus/dbus-message-handler.c:
10586         Make threadsafe.
10587
10588         * glib/dbus-gmain.c:
10589         Don't use peek_message anymore
10590
10591         * test/Makefile.am:
10592         * test/debug-thread.c:
10593         * test/debug-thread.h:
10594         Simple thread implementation that asserts() on deadlocks in
10595         single-threaded code.
10596
10597         * test/bus-test.c:
10598         (main) Call debug_threads_init.
10599
10600         * test/watch.c:
10601         Use disconnect message instead of disconnect callback.
10602
10603         * bus/connection.c:
10604         * bus/connection.h:
10605         Don't call dbus_connection_set_disconnect_function. Instead export
10606         bus_connection_disconnect.
10607
10608         * bus/dispatch.c:
10609         Call bus_connection_disconnect when we get a disconnected message.
10610
10611 2003-02-15  Havoc Pennington  <hp@pobox.com>
10612
10613         * dbus/dbus-message.c (dbus_message_new): fool around with the
10614         docs
10615
10616 2003-02-14  Havoc Pennington  <hp@pobox.com>
10617
10618         * dbus/dbus-mempool.c: fail if the debug functions so indicate
10619
10620         * dbus/dbus-memory.c: fail if the debug functions indicate we
10621         should
10622
10623         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
10624         (_dbus_decrement_fail_alloc_counter): debug functions to
10625         simulate memory allocation failures
10626
10627 2003-02-14  Havoc Pennington  <hp@pobox.com>
10628
10629         * dbus/dbus-errors.h (struct DBusError): add a word of padding
10630         to DBusError
10631
10632 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10633
10634         * bus/driver.c: (bus_driver_handle_hello):
10635         * bus/driver.h:
10636         * bus/services.c: (bus_service_lookup):
10637         Reorder message sending so we get a more sane order.
10638
10639         * test/bus-test.c: (message_handler):
10640         Fix tyop.
10641
10642 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10643
10644         * bus/driver.c: (bus_driver_send_service_deleted),
10645         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10646         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10647         (bus_driver_send_welcome_message),
10648         (bus_driver_handle_list_services),
10649         (bus_driver_handle_acquire_service),
10650         (bus_driver_handle_service_exists):
10651         * dbus/dbus-bus.c: (dbus_bus_register_client),
10652         (dbus_bus_acquire_service), (dbus_bus_service_exists):
10653         * dbus/dbus-errors.c: (dbus_result_to_string):
10654         * dbus/dbus-errors.h:
10655         * dbus/dbus-message.c: (dbus_message_append_args),
10656         (dbus_message_append_args_valist), (dbus_message_get_args),
10657         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
10658         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
10659         (dbus_message_iter_get_byte_array),
10660         (dbus_message_iter_get_string_array), (message_iter_test),
10661         (check_message_handling), (_dbus_message_test):
10662         * dbus/dbus-message.h:
10663         * test/bus-test.c: (main):
10664         Change fields to arguments in messages, so that they won't be
10665         confused with header fields.
10666
10667         * glib/test-dbus-glib.c: (main):
10668         Remove append_fields from hello message.
10669
10670 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10671
10672         * dbus/dbus-errors.c:
10673         * dbus/dbus-message.c:
10674         * dbus/dbus-string.c:
10675         Documentation fixes.
10676
10677 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10678
10679         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
10680         (remove_timeout):
10681         Implement support for timeouts in dbus-glib.
10682
10683 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10684
10685         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10686         * dbus/dbus-message.c: (process_test_subdir):
10687         * test/break-loader.c: (find_breaks_based_on):
10688         Plug some memory leaks.
10689
10690 2003-02-13  Richard Hult  <rhult@codefactory.se>
10691
10692         * bus/main.c: Fix build.
10693
10694         * dbus/dbus-errors.h:
10695         * dbus/dbus-errors.c: Fix copyright for Anders.
10696
10697 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10698
10699         * bus/Makefile.am:
10700         Add utils.[ch]
10701
10702         * bus/connection.c: (bus_connection_foreach):
10703         Fix a warning.
10704
10705         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10706         (unescape_string), (new_section), (parse_section_start),
10707         (parse_key_value), (report_error), (bus_desktop_file_load),
10708         (bus_desktop_file_get_string):
10709         * bus/desktop-file.h:
10710         Use DBusError for error reporting.
10711
10712         * bus/dispatch.c: (send_one_message),
10713         (bus_dispatch_message_handler):
10714         * bus/driver.c: (bus_driver_send_service_deleted),
10715         (bus_driver_send_service_created), (bus_driver_send_service_lost),
10716         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10717         (bus_driver_send_welcome_message),
10718         (bus_driver_handle_list_services),
10719         (bus_driver_handle_acquire_service),
10720         (bus_driver_handle_service_exists):
10721         * bus/loop.c: (bus_loop_run):
10722         * bus/main.c:
10723         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
10724
10725         * bus/utils.c: (bus_wait_for_memory):
10726         * bus/utils.h:
10727         New files with general utility functions.
10728
10729         * dbus/dbus-internals.h:
10730         Remove _DBUS_HANDLE_OOM.
10731
10732 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10733
10734         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
10735         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
10736         * dbus/dbus-errors.h:
10737         Add DBusError structure.
10738
10739 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10740
10741         * test/data/valid-messages/standard-acquire-service.message:
10742         * test/data/valid-messages/standard-hello.message:
10743         * test/data/valid-messages/standard-list-services.message:
10744         * test/data/valid-messages/standard-service-exists.message:
10745         Add some standard messages.
10746
10747 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10748
10749         * bus/driver.c: (bus_driver_send_welcome_message),
10750         (bus_driver_handle_list_services),
10751         (bus_driver_handle_acquire_service),
10752         (bus_driver_handle_service_exists), (bus_driver_handle_message):
10753         Update for API changes in libdbus.
10754
10755         * dbus/dbus-message.c: (dbus_message_new_reply):
10756         * dbus/dbus-message.h:
10757         Remove the name argument. The spec states that replies shouldn't
10758         have a name.
10759
10760 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
10761
10762         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
10763         (report_error), (bus_desktop_file_load), (lookup_section),
10764         (lookup_line), (bus_desktop_file_get_raw),
10765         (bus_desktop_file_get_string):
10766         * bus/desktop-file.h:
10767         Some fixes, and new functions for getting a key value from a section.
10768
10769 2003-02-13  Havoc Pennington  <hp@pobox.com>
10770
10771         * test/data/auth/fail-after-n-attempts.auth-script: new test
10772
10773         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
10774         reject the client.
10775
10776 2003-02-13  Havoc Pennington  <hp@pobox.com>
10777
10778         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
10779         dbus_credentials_match were backward
10780
10781         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
10782         NO_CREDENTIALS and ROOT_CREDENTIALS
10783
10784         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
10785         into here. Never process more commands after we've reached an
10786         end state; store further data as unused bytes.
10787
10788         * test/data/auth/*: add more auth tests
10789
10790         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
10791         command to match exact string and EXPECT_UNUSED to match unused
10792         bytes
10793
10794         * test/Makefile.am (dist-hook): fix to dist all the test stuff
10795
10796 2003-02-12  Havoc Pennington  <hp@pobox.com>
10797
10798         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
10799         \r off of popped lines
10800
10801         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
10802         scripts
10803
10804         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
10805         SEND, append \r\n
10806
10807 2003-02-12  Havoc Pennington  <hp@pobox.com>
10808
10809         * dbus/Makefile.am: remove break-loader from the build, since it
10810         moved.
10811
10812         * configure.in: add --enable-gcov to turn on coverage profiling
10813         flags and disable optimization
10814
10815 2003-02-10  Havoc Pennington  <hp@pobox.com>
10816
10817         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
10818         initial cut at test framework for DBusAuth from laptop.
10819         Doesn't quite work yet but it compiles and I need to get
10820         it off the 266mhz laptop. ;-)
10821
10822         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
10823         fix a memleak in error case
10824
10825 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
10826
10827         * bus/Makefile.am:
10828         * bus/desktop-file.c:
10829         * bus/desktop-file.h:
10830         Add a desktop file parser.
10831
10832 2003-02-11  Zack Rusin  <zack@kde.org>
10833
10834         * qt/message.[h|cpp]: sample implementation
10835         of the KDE wrapper for DBusMessage
10836
10837 2003-02-09  Zack Rusin  <zack@kde.org>
10838
10839         * test/bus-test.c: make_it_compile
10840         * doc/dbus-specification.sgml: minimal semantic fix
10841
10842 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
10843
10844         Release 0.3
10845
10846         * NEWS: Update
10847
10848 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
10849
10850         * dbus/Makefile.am:
10851         * dbus/dbus-break-loader.c:
10852         * test/Makefile.am:
10853         * test/break-loader.c:
10854         Move dbus-break-loader to test/ and rename it to break-loader.
10855
10856 2003-02-02  Havoc Pennington  <hp@pobox.com>
10857
10858         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
10859         for code to manage cookies in your home directory
10860
10861         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
10862
10863         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
10864         to authenticate, then disconnect the client.
10865
10866 2003-02-03  Alexander Larsson  <alexl@redhat.com>
10867
10868         * dbus/dbus-message.c (dbus_message_append_fields):
10869         Correct docs.
10870
10871 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10872
10873         * doc/dbus-specification.sgml:
10874         Update address format section.
10875
10876 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10877
10878         * test/Makefile.am:
10879         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
10880         (message_handler), (new_connection_callback), (loop_quit),
10881         (loop_run), (main):
10882         Add bus test.
10883
10884 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10885
10886         * bus/driver.c: (bus_driver_handle_service_exists):
10887         Simplify the code a bit.
10888
10889         * dbus/dbus-bus.c: (dbus_bus_service_exists):
10890         Fix a silly.
10891
10892 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10893
10894         * bus/Makefile.am:
10895         Add libdbus-daemon.la and link to it.
10896
10897 2003-02-01  James Willcox  <jwillcox@gnome.org>
10898
10899         * bus/driver.c: (bus_driver_handle_own_service):
10900         Actually include the service reply code in the message.
10901
10902 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10903
10904         * bus/driver.c: (bus_driver_handle_service_exists):
10905         Don't unref the incoming message.
10906
10907 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10908
10909         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
10910
10911 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
10912
10913         * dbus/dbus-server.c: (dbus_server_listen):
10914         * dbus/dbus-transport.c: (_dbus_transport_open):
10915         ifdef out the calls to the debug transport and server.
10916
10917 2003-02-02  Alexander Larsson  <alexl@redhat.com>
10918
10919         * dbus/dbus-watch.c (dbus_watch_get_flags):
10920         Add note in the docs that ERROR or HANGUP won't be returned
10921         and are assumed always on.
10922
10923         * glib/dbus-gmain.c (add_watch):
10924         Always add IO_ERR | IO_HUP
10925
10926         * dbus/dbus-message.h:
10927         Add semicolon after dbus_message_iter_get_string_array().
10928         Makes qt code build again
10929
10930 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
10931
10932         * bus/driver.c: (create_unique_client_name),
10933         (bus_driver_handle_hello):
10934         Don't take a name, just use a numeric id to identify
10935         each client.
10936
10937         * dbus/Makefile.am:
10938         * dbus/dbus-bus.c: (dbus_bus_register_client),
10939         (dbus_bus_acquire_service), (dbus_bus_service_exists):
10940         * dbus/dbus-bus.h:
10941         Add new convenience functions for communicating with the bus.
10942
10943         * dbus/dbus-message.h:
10944
10945         * dbus/dbus-protocol.h:
10946         Fix a typo.
10947
10948 2003-02-01  Alexander Larsson  <alexl@redhat.com>
10949
10950         * dbus/dbus-message.c (dbus_message_append_fields):
10951         Add some more doc comments.
10952
10953 2003-02-01  Havoc Pennington  <hp@pobox.com>
10954
10955         * dbus/dbus-break-loader.c (randomly_modify_length): change
10956         a 4-byte value in the message as if it were a length
10957
10958         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
10959         execute bit on saved files
10960
10961 2003-02-01  Havoc Pennington  <hp@pobox.com>
10962
10963         * dbus/dbus-break-loader.c (main): new program to find messages
10964         that break the loader.
10965
10966         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
10967         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
10968
10969         * dbus/dbus-string.c (_dbus_string_set_byte): new
10970
10971 2003-01-31  Havoc Pennington  <hp@pobox.com>
10972
10973         * dbus/dbus-message.c: refactor the test code to be more general,
10974         in preparation for writing a "randomly permute test cases to
10975         try to break the loader" program.
10976
10977 2003-01-31  Havoc Pennington  <hp@pobox.com>
10978
10979         * doc/dbus-specification.sgml: work on the specification
10980
10981         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
10982         the protocol version of the message.
10983
10984         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
10985         no longer specifies that.
10986         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
10987         1/2/3/4)
10988
10989         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
10990         "break" for DBUS_TYPE_NIL, remove @todo
10991
10992 2003-01-31  Havoc Pennington  <hp@pobox.com>
10993
10994         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
10995         just set_is_error/get_is_error as this is a commonly-used
10996         function, and write docs.
10997
10998 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
10999
11000         * dbus/dbus-address.c: (dbus_address_entry_free):
11001         Free key and value lists.
11002
11003         * dbus/dbus-internals.c: (_dbus_type_to_string):
11004         Add the types we didn't have.
11005
11006         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
11007         (_dbus_marshal_validate_arg):
11008         Add NIL types.
11009
11010         * dbus/dbus-message.c: (dbus_message_set_sender):
11011         Remove todo about being able to set sender to NULL.
11012
11013         (dbus_message_set_is_error_reply),
11014         (dbus_message_get_is_error_reply):
11015         * dbus/dbus-message.h:
11016         New functions.
11017
11018         * dbus/dbus-protocol.h:
11019         Add error reply flag.
11020
11021         * test/data/valid-messages/opposite-endian.message:
11022         Add NIL type to test.
11023
11024 2003-01-31  Havoc Pennington  <hp@pobox.com>
11025
11026         * doc/dbus-specification.sgml: fully specify the header.  Add
11027         flags and major protocol version, and change header/body len to
11028         unsigned.
11029
11030         * dbus/dbus-message-builder.c (append_saved_length): append length
11031         as uint32
11032
11033         * dbus/dbus-message.c (dbus_message_create_header): change header
11034         length and body length to unsigned. Add the new fields from the
11035         spec
11036         (_dbus_message_loader_return_buffer): unsigned header/body len
11037
11038 2003-01-30  Havoc Pennington  <hp@pobox.com>
11039
11040         * dbus/dbus-auth.c: rework to use only REJECTED, no
11041         MECHANISMS
11042
11043         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
11044         use REJECTED, suggested by Mark McLoughlin
11045
11046 2003-01-30  Havoc Pennington  <hp@pobox.com>
11047
11048         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
11049         a better way to report errors here. e.g.  "unix address lacks
11050         path" or something. also "no such file" when the path doesn't
11051         exist, etc.
11052
11053         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
11054         leaking list nodes
11055         (dbus_parse_address): add @todo about documenting address format,
11056         and allowing , and ; to be escaped
11057
11058 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
11059
11060         * dbus/Makefile.am:
11061         Add dbus-address.[ch]
11062
11063         * dbus/dbus-address.c: (dbus_address_entry_free),
11064         (dbus_address_entries_free), (create_entry),
11065         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
11066         (dbus_parse_address), (_dbus_address_test):
11067         * dbus/dbus-address.h:
11068         New files for dealing with address parsing.
11069
11070         * dbus/dbus-connection.c:
11071         Document timeout functions.
11072
11073         * dbus/dbus-message.c:
11074         Document dbus_message_new_from_message.
11075
11076         * dbus/dbus-server-debug.c:
11077         Document.
11078
11079         * dbus/dbus-server.c: (dbus_server_listen):
11080         Parse address and use correct server implementation.
11081
11082         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
11083         * dbus/dbus-string.h:
11084         New function with test.
11085
11086         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
11087         * dbus/dbus-test.h:
11088         Add address tests.
11089
11090         * dbus/dbus-transport-debug.c:
11091         Document.
11092
11093         * dbus/dbus-transport.c: (_dbus_transport_open):
11094         Parse address and use correct transport implementation.
11095
11096 2003-01-30  Havoc Pennington  <hp@pobox.com>
11097
11098         * dbus/dbus-message.c: use message->byte_order instead of
11099         DBUS_COMPILER_BYTE_ORDER throughout.
11100         (dbus_message_create_header): pad header to align the
11101         start of the body of the message to 8-byte boundary
11102
11103         * dbus/dbus-marshal.h: make all the demarshalers take const
11104         DBusString arguments.
11105
11106         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
11107         validate message args here, so we don't have to do slow validation
11108         later, and so we catch bad messages as they are incoming. Also add
11109         better checks on header_len and body_len. Also fill in
11110         message->byte_order
11111
11112         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
11113         implemented properly)
11114         (_dbus_string_validate_nul): new function to check all-nul
11115
11116         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
11117         get_arg_end_pos and remove all validation
11118         (_dbus_marshal_validate_arg): actually do validation here.
11119
11120 2003-01-29  Havoc Pennington  <hp@pobox.com>
11121
11122         * dbus/dbus-message.c (check_message_handling): fix assertion
11123         failure on set_client_serial
11124
11125 2003-01-28  Havoc Pennington  <hp@pobox.com>
11126
11127         * dbus/dbus-server-debug.c: Add doc section comments
11128
11129         * dbus/dbus-transport-debug.c: add doc section comments
11130
11131 2003-01-28  Havoc Pennington  <hp@redhat.com>
11132
11133         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
11134         the reverse order from how I had it
11135         (_dbus_string_base64_encode): reverse encoding order. I was
11136         basically byteswapping everything during encoding.
11137
11138 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
11139
11140         * dbus/dbus-connection-internal.h:
11141         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
11142         (_dbus_connection_remove_timeout):
11143         Add functions for adding and removing timeouts.
11144
11145         * dbus/dbus-message.c: (dbus_message_new_from_message):
11146         Add new function that takes a message and creates an exact
11147         copy of it, but with the refcount set to 1.
11148         (check_message_handling):
11149         Fix build error.
11150
11151         * dbus/dbus-server-protected.h:
11152         * dbus/dbus-server.c: (_dbus_server_init_base),
11153         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
11154         (dbus_server_set_timeout_functions):
11155         (_dbus_server_remove_timeout):
11156         New functions so that a server can add and remove timeouts.
11157
11158         (dbus_server_listen):
11159         Add commented out call to dbus_server_debug_new.
11160
11161         * dbus/dbus-timeout.c: (_dbus_timeout_new):
11162         Actually set the handler, doh.
11163
11164         * dbus/dbus-transport.c: (_dbus_transport_open):
11165         Add commented out call to dbus_transport_debug_client_new.
11166
11167         * dbus/Makefile.am:
11168         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
11169
11170 2003-01-28  Havoc Pennington  <hp@pobox.com>
11171
11172         * dbus/dbus-message.c (check_message_handling): function to check
11173         on the loaded message, iterates over it etc.
11174
11175 2003-01-28  Havoc Pennington  <hp@pobox.com>
11176
11177         * test/Makefile.am (dist-hook): fix make distdir
11178
11179         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
11180
11181 2003-01-27  Havoc Pennington  <hp@pobox.com>
11182
11183         * dbus/dbus-mempool.c (time_for_size): replace printf with
11184         _dbus_verbose
11185
11186         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
11187         empty lines; fix the SAVE_LENGTH stuff to be
11188         START_LENGTH/END_LENGTH so it actually works; couple other
11189         bugfixes
11190
11191         * test/Makefile.am (dist-hook): add dist-hook for .message files
11192
11193         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
11194         can be constant or locked.
11195         (_dbus_string_free): allow freeing a const string as
11196         documented/intended
11197
11198         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
11199
11200         * dbus/dbus-test-main.c (main): take an argument which is the
11201         directory containing test data
11202
11203         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
11204         argument to this and load all the messages in test/data/
11205         checking that they can be loaded or not loaded as appropriate.
11206
11207 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
11208
11209         * bus/dispatch.c: (bus_dispatch_message_handler):
11210         Dispatch messages sent to services.
11211
11212         * bus/driver.c: (bus_driver_send_service_deleted),
11213         (bus_driver_send_service_created), (bus_driver_send_service_lost),
11214         (bus_driver_send_service_acquired):
11215         Add helper functions for sending service related messages.
11216
11217         (bus_driver_send_welcome_message):
11218         Send HELLO_REPLY instead of WELCOME.
11219
11220         (bus_driver_handle_list_services):
11221         Send LIST_SERVICES_REPLY instead of SERVICES.
11222
11223         (bus_driver_handle_own_service),
11224         (bus_driver_handle_service_exists):
11225         New message handlers.
11226
11227         (bus_driver_handle_message):
11228         Invoke new message handlers.
11229
11230         (bus_driver_remove_connection):
11231         Don't remove any services here since that's done automatically
11232         by bus_service_remove_owner now.
11233
11234         * bus/driver.h:
11235         New function signatures.
11236
11237         * bus/services.c: (bus_service_add_owner):
11238         Send ServiceAcquired message if we're the only primary owner.
11239
11240         (bus_service_remove_owner):
11241         Send ServiceAcquired/ServiceLost messages.
11242
11243         (bus_service_set_prohibit_replacement),
11244         (bus_service_get_prohibit_replacement):
11245         Functions for setting prohibit replacement.
11246
11247         (bus_service_has_owner):
11248         New function that checks if a connection is in the owner queue of
11249         a certain service.
11250
11251         * bus/services.h:
11252         Add new function signatures.
11253
11254         * dbus/dbus-list.c: (_dbus_list_test):
11255         Add tests for _dbus_list_remove_last and traversing the list backwards.
11256
11257         * dbus/dbus-list.h:
11258         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
11259         go any further, so return NULL then.
11260
11261         * dbus/dbus-protocol.h:
11262         Add new messages, service flags and service replies.
11263
11264 2003-01-26  Havoc Pennington  <hp@pobox.com>
11265
11266         * dbus/dbus-message-builder.c: implement, completely untested.
11267
11268         * test/data/*: add data to be used in testing.
11269         ".message" files are our simple loadable text format.
11270         ".message-raw" will be binary dumps of messages.
11271
11272         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11273
11274 2003-01-26  Havoc Pennington  <hp@pobox.com>
11275
11276         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
11277
11278         * dbus/dbus-errors.c (dbus_result_to_string): add
11279         file errors
11280
11281         * dbus/dbus-message-builder.c: new file, will contain code to load
11282         up messages from files. Not implemented yet.
11283
11284 2003-01-26  Havoc Pennington  <hp@pobox.com>
11285
11286         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
11287         the sender by setting to NULL
11288
11289 2003-01-26  Havoc Pennington  <hp@pobox.com>
11290
11291         The unit tests pass, but otherwise untested.  If it breaks, the
11292         tests should have been better. ;-)
11293
11294         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
11295         the connection.
11296
11297         * dbus/dbus-message.c: redo everything so we maintain
11298         message->header as the only copy of the various fields.
11299         This avoids the possibility of out-of-memory in some cases,
11300         for example dbus_message_lock() can't run out of memory anymore,
11301         and avoids extra copying. Figured I may as well go ahead and do
11302         this since it was busted for dbus_message_lock to not return
11303         failure on OOM, and dbus_message_write_header was totally
11304         unchecked for OOM. Also fixed some random other bugs.
11305
11306         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
11307         that strings are nul-terminated. Also, end_pos can be equal
11308         to string length just not greater than, I think.
11309         (_dbus_marshal_set_int32): new function
11310         (_dbus_marshal_set_uint32): new function
11311         (_dbus_marshal_set_string): new function
11312
11313         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
11314         a warning, init timeout_list to NULL
11315         (dbus_connection_send_message): don't use uninitialized variable
11316         "serial"
11317
11318         * dbus/dbus-string.c (_dbus_string_replace_len): new function
11319
11320 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11321
11322         * bus/driver.c: (bus_driver_handle_hello),
11323         (bus_driver_send_welcome_message):
11324         Plug leaks
11325
11326 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
11327
11328         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
11329         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11330         (dbus_connection_unref):
11331         * dbus/dbus-marshal.c: (_dbus_marshal_test):
11332         * dbus/dbus-message.c: (dbus_message_unref),
11333         Plug memory leaks.
11334
11335         (dbus_message_get_fields):
11336         Remove debugging printout.
11337
11338         (_dbus_message_loader_return_buffer):
11339         Don't store the header string.
11340
11341         (_dbus_message_test):
11342         Plug leaks.
11343
11344 2003-01-26  Richard Hult  <rhult@codefactory.se>
11345
11346         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
11347         the file descriptor list, since it can change under us.
11348
11349 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11350
11351         * glib/dbus-gmain.c: (dbus_connection_prepare),
11352         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
11353         (remove_watch), (dbus_connection_hookup_with_g_main):
11354         Rewrite the glib handling to use its own GSource instead of a
11355         GIOChannel so we can catch messages put in the queue while waiting
11356         for a reply.
11357
11358 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11359
11360         * bus/Makefile.am:
11361         * bus/connection.c: (connection_disconnect_handler),
11362         (connection_watch_callback), (bus_connection_setup):
11363         * bus/dispatch.c: (send_one_message),
11364         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
11365         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
11366         * bus/dispatch.h:
11367         * bus/driver.c: (bus_driver_send_service_deleted),
11368         (bus_driver_send_service_created), (bus_driver_handle_hello),
11369         (bus_driver_send_welcome_message),
11370         (bus_driver_handle_list_services), (bus_driver_remove_connection),
11371         (bus_driver_handle_message):
11372         * bus/driver.h:
11373         Refactor code, put the message dispatching in its own file. Use
11374         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
11375         is disconnected.
11376
11377 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11378
11379         * dbus/dbus-internals.h:
11380         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
11381
11382         * dbus/dbus-message.c: (dbus_message_get_sender):
11383         * dbus/dbus-message.h:
11384         Implement dbus_message_get_sender.
11385
11386         * dbus/dbus-protocol.h:
11387         Add message and service defines.
11388
11389 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11390
11391         * dbus/dbus-connection.c: (dbus_connection_send_message):
11392         * dbus/dbus-message-internal.h:
11393         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
11394         (dbus_message_write_header):
11395         Remove _dbus_messag_unlock and don't set the client serial on a
11396         message if one already exists.
11397
11398 2003-01-24  Havoc Pennington  <hp@pobox.com>
11399
11400         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
11401         list_pool
11402
11403         * bus/driver.c (bus_driver_handle_list_services): fix a leak
11404         on OOM
11405
11406 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11407
11408         * dbus/dbus-list.c: (alloc_link), (free_link):
11409         Use a memory pool for the links.
11410
11411 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11412
11413         * bus/connection.c: (bus_connection_foreach):
11414         * bus/connection.h:
11415         Add new bus_connection_foreach function.
11416
11417         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
11418         Add function that broadcasts a message to all clients.
11419
11420         (bus_driver_send_service_created), (bus_driver_handle_hello),
11421         (bus_driver_send_welcome_message),
11422         (bus_driver_handle_list_services), (bus_driver_message_handler):
11423         Implement functions that take care of listing services, and notifying
11424         clients when new services are created.
11425
11426         * bus/services.c: (bus_services_list):
11427         * bus/services.h:
11428         Add new function that returns an array of strings with the currently
11429         registered services.
11430
11431         * glib/dbus-glib.h:
11432         * glib/dbus-gmain.c:
11433         Update copyright year.
11434
11435 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
11436
11437         * dbus/dbus-connection.c: (dbus_connection_send_message):
11438         Unlock the message in case it was sent earlier.
11439
11440         (dbus_connection_send_message_with_reply_and_block):
11441         Remove the reply message from the list.
11442
11443         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
11444         Set array_len and new_pos correctly.
11445
11446         (_dbus_marshal_test):
11447         Remove debug output.
11448
11449         * dbus/dbus-message-internal.h:
11450         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
11451         New function that returns the reply serial.
11452
11453         (_dbus_message_unlock):
11454         New function that unlocks a message and resets its header.
11455
11456         (dbus_message_append_string_array),
11457         (dbus_message_get_fields_valist),
11458         (dbus_message_iter_get_field_type),
11459         (dbus_message_iter_get_string_array),
11460         (dbus_message_get_fields),
11461         (dbus_message_append_fields_valist):
11462         Handle string arrays.
11463
11464         (dbus_message_set_sender):
11465         Make this function public since the bus daemon needs it.
11466
11467         (decode_header_data):
11468         Set the reply serial to -1 initially.
11469
11470         * dbus/dbus-message.h:
11471         Add dbus_message_set_sender.
11472
11473 2003-01-24  Havoc Pennington  <hp@pobox.com>
11474
11475         * doc/dbus-specification.sgml: add some stuff
11476
11477 2003-01-22  Havoc Pennington  <hp@pobox.com>
11478
11479         * doc/dbus-specification.sgml: Start to document the protocol.
11480
11481 2003-01-22  Havoc Pennington  <hp@pobox.com>
11482
11483         * dbus/dbus-connection.c
11484         (dbus_connection_send_message_with_reply_and_block): add some @todo
11485
11486         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11487
11488 2003-01-21  Havoc Pennington  <hp@pobox.com>
11489
11490         (patch untested because can't compile)
11491
11492         * bus/driver.c (create_unique_client_name): make this function
11493         never recycle client names. Also, caller should initialize
11494         the DBusString.
11495
11496         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
11497
11498 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11499
11500         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11501         (_dbus_marshal_int32), (_dbus_marshal_uint32),
11502         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
11503         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
11504         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
11505         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
11506         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
11507         * dbus/dbus-marshal.h:
11508         * dbus/dbus-protocol.h:
11509         Add support for marshalling and demarshalling integer, double
11510         and string arrays.
11511
11512 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11513
11514         * bus/Makefile.am:
11515         Add driver.[ch]
11516
11517         * bus/connection.c: (connection_disconnect_handler):
11518         Remove the connection from the bus driver's list.
11519
11520         (connection_watch_callback): Dispatch messages.
11521
11522         (free_connection_data): Free connection name.
11523
11524         (bus_connection_setup): Add connection to the bus driver's list.
11525         (bus_connection_remove_owned_service):
11526         (bus_connection_set_name), (bus_connection_get_name):
11527         Add functions for setting and getting the connection's name.
11528
11529         * bus/connection.h:
11530         Add function headers.
11531
11532         * bus/driver.c: (create_unique_client_name),
11533         (bus_driver_handle_hello_message),
11534         (bus_driver_send_welcome_message), (bus_driver_message_handler),
11535         (bus_driver_add_connection), (bus_driver_remove_connection):
11536         * bus/driver.h:
11537         * bus/main.c:
11538         * bus/services.c: (bus_service_free):
11539         * bus/services.h:
11540         New file that handles communication and registreation with the bus
11541         itself.
11542
11543 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
11544
11545         * dbus/dbus-connection.c: (dbus_connection_send_message):
11546         Add a new client_serial parameter.
11547
11548         (dbus_connection_send_message_with_reply):
11549         Remove a @todo since we've implemented the blocking function.
11550
11551         (dbus_connection_send_message_with_reply_and_block):
11552         New function that sends a message and waits for a reply and
11553         then returns the reply.
11554
11555         * dbus/dbus-connection.h:
11556         Add new functions.
11557
11558         * dbus/dbus-errors.c: (dbus_result_to_string):
11559         * dbus/dbus-errors.h:
11560         Add new DBUS_RESULT.
11561
11562         * dbus/dbus-message-internal.h:
11563         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
11564         (_dbus_message_set_sender), (dbus_message_write_header),
11565         (dbus_message_new_reply), (decode_header_data),
11566         (_dbus_message_loader_return_buffer), (_dbus_message_test):
11567         * dbus/dbus-message.h:
11568         Add new functions that set the reply serial and sender.
11569         Also marshal and demarshal them correctly and add test.
11570
11571         * dbus/dbus-protocol.h:
11572         Add new DBUS_MESSAGE_TYPE_SENDER.
11573
11574         * glib/dbus-glib.h:
11575         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
11576         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
11577         (dbus_connection_hookup_with_g_main):
11578         * glib/test-dbus-glib.c: (main):
11579         Rewrite to use GIOChannel and remove the GSource crack.
11580
11581         * test/echo-client.c: (main):
11582         * test/watch.c: (check_messages):
11583         Update for changed APIs
11584
11585 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11586
11587         * dbus/Makefile.am: Add dbus-timeout.[cħ]
11588
11589         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
11590         Create a DBusTimeoutList.
11591         (dbus_connection_set_timeout_functions): Add new function to
11592         set timeout callbacks
11593
11594         * dbus/dbus-connection.h: Add public DBusTimeout API.
11595
11596         * dbus/dbus-message.c: (dbus_message_get_service):
11597         * dbus/dbus-message.h:  New function.
11598
11599         * dbus/dbus-server.c: Fix small doc typo.
11600
11601         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
11602
11603 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
11604
11605         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
11606         of the string, just as long as specified.
11607
11608 2003-01-19  Havoc Pennington  <hp@pobox.com>
11609
11610         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
11611         new function
11612
11613         * dbus/dbus-server.c (dbus_server_set_max_connections)
11614         (dbus_server_get_max_connections, dbus_server_get_n_connections):
11615         keep track of current number of connections, and add API for
11616         setting a max (but haven't implemented enforcing the max yet)
11617
11618 2003-01-18  Havoc Pennington  <hp@pobox.com>
11619
11620         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
11621         reading/writing if read_watch != NULL or write_watch != NULL.
11622
11623         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
11624         the message loader code to actually load message->header and
11625         message->body into the newly-created message.
11626
11627         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
11628         in OOM case
11629
11630         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
11631         (dbus_connection_get_max_message_size)
11632         (dbus_connection_set_max_live_messages_size)
11633         (dbus_connection_get_max_live_messages_size): implement some
11634         resource limitation functions
11635
11636         * dbus/dbus-resources.c: new file implementing some of the
11637         resource limits stuff
11638
11639         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
11640         missing docs, add @todo to handle OOM etc.
11641
11642         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
11643         docs
11644
11645 2003-01-18  Havoc Pennington  <hp@pobox.com>
11646
11647         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
11648         connection if it hasn't been already.
11649
11650         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
11651         replace with DisconnectFunction.
11652
11653 2003-01-18  Havoc Pennington  <hp@pobox.com>
11654
11655         Building --disable-verbose-mode --disable-asserts --disable-tests
11656         cuts the library from 112K to 45K or so
11657
11658         * configure.in: check for varargs macro support,
11659         add --enable-verbose-mode, --enable-asserts.
11660
11661         * dbus/dbus-internals.h (_dbus_assert): support
11662         DBUS_DISABLE_ASSERT
11663         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
11664
11665 2003-01-18  Havoc Pennington  <hp@pobox.com>
11666
11667         * dbus/dbus-test.c: include config.h so that tests actually run
11668
11669         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
11670         so the failure mode when that assumption fails will be plenty
11671         obvious.
11672
11673 2003-01-18  Havoc Pennington  <hp@pobox.com>
11674
11675         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
11676
11677         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
11678         the distribution
11679
11680         * test/Makefile.am: don't use special variable "TESTS" for echo-*
11681         since we don't want to use those in make check
11682
11683 2003-01-15  Havoc Pennington  <hp@redhat.com>
11684
11685         Release 0.2
11686
11687         * NEWS: update
11688
11689 2003-01-15  Havoc Pennington  <hp@redhat.com>
11690
11691         * test/Makefile.am: fix so that test source code ends up in the
11692         distribution on make distcheck
11693
11694 2003-01-15  Havoc Pennington  <hp@redhat.com>
11695
11696         Release 0.1.
11697
11698         * NEWS: update
11699
11700 2003-01-15  Havoc Pennington  <hp@redhat.com>
11701
11702         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
11703         fix build when --disable-tests
11704
11705         * Makefile.am (EXTRA_DIST): put HACKING in here
11706
11707         * HACKING: document procedure for making a tarball release.
11708
11709 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
11710
11711         * bus/connection.c: (connection_error_handler),
11712         (bus_connection_setup):
11713         * bus/main.c: (main):
11714         Make sure that the DBusConnectionData struct is NULLed
11715         out to prevent a segfault.
11716
11717         * dbus/dbus-errors.c: (dbus_result_to_string):
11718         * dbus/dbus-errors.h:
11719         * dbus/dbus-message.c: (dbus_message_get_fields),
11720         (dbus_message_get_fields_valist), (_dbus_message_test):
11721         * dbus/dbus-message.h:
11722         Make dbus_message_get_fields return a result code so we can
11723         track invalid fields as well as oom.
11724
11725 2003-01-11  Havoc Pennington  <hp@pobox.com>
11726
11727         * configure.in: change --enable-test/--enable-ansi action-if-given
11728         to enable_foo=$enableval instead of enable_foo=yes
11729
11730 2003-01-08  Havoc Pennington  <hp@pobox.com>
11731
11732         * dbus/dbus-string.c (_dbus_string_align_length): new function
11733
11734         * dbus/dbus-test-main.c: move main() for test app here
11735         * dbus/dbus-test.c
11736         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
11737         symbol to run tests, because dbus-test isn't in the main
11738         library
11739
11740         Code review nitpicks.
11741
11742         * dbus/dbus-message.c (dbus_message_write_header): add newlines
11743         for people with narrow emacs ;-). Assert client_serial was filled
11744         in. Assert message->name != NULL.
11745         (dbus_message_append_fields): have "first_field_type" arg separate
11746         from va list, needed for C++ binding that also uses varargs IIRC
11747         and helps with type safety
11748         (dbus_message_new): add @todo about using DBusString to store
11749         service/name internally
11750         (dbus_message_new): don't leak ->service and ->name on OOM later
11751         in the function
11752         (dbus_message_unref): free the service name
11753         (dbus_message_get_fields): same change to varargs
11754         i.e. first_field_type
11755         (_dbus_message_loader_return_buffer): assert that the message data
11756         is aligned (if not it's a bug in our code). Put in verbose griping
11757         about why we set corrupted = TRUE.
11758         (decode_header_data): add FIXME that char* is evil.  Was going to
11759         add FIXME about evil locale-specific string.h strncmp, but just
11760         switched to wacky string-as-uint32 optimization. Move check for
11761         "no room for field name" above get_const_data_len() to avoid
11762         assertion failure in get_const_data_len if we have trailing 2
11763         bytes or the like. Check for service and name fields being
11764         provided twice. Don't leak service/name on error. Require field
11765         names to be aligned to 4 bytes.
11766
11767         * dbus/dbus-marshal.c: move byte swap stuff to header
11768         (_dbus_pack_int32): uscore-prefix
11769         (_dbus_unpack_int32): uscore-prefix
11770         (_dbus_unpack_uint32): export
11771         (_dbus_demarshal_string): add @todo complaining about use of
11772         memcpy()
11773         (_dbus_marshal_get_field_end_pos): add @todo about bad error
11774         handling allowing corrupt data to go unchecked
11775
11776 2003-01-08  Havoc Pennington  <hp@redhat.com>
11777
11778         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
11779         to the select() as needed for authentication. (should be using
11780         _dbus_poll() not select, but for another day)
11781
11782         * dbus/dbus.h: include dbus/dbus-protocol.h
11783
11784 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
11785
11786         * dbus/Makefile.am (dbusinclude_HEADERS): Install
11787         dbus-connection.h
11788
11789 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
11790
11791         * dbus/dbus-internals.c: (_dbus_type_to_string):
11792         New function that returns a string describing a type.
11793
11794         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
11795         * dbus/dbus-marshal.h:
11796         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
11797         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
11798         (dbus_message_iter_get_byte_array):
11799         * dbus/dbus-message.h:
11800         Add new convenience functions for appending and getting message fields.
11801         Also add demarshalling routines for byte arrays.
11802
11803 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11804
11805         * dbus/dbus-connection-internal.h:
11806         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11807         (_dbus_connection_get_next_client_serial),
11808         (dbus_connection_send_message):
11809         * dbus/dbus-internals.h:
11810         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
11811         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
11812         (_dbus_marshal_uint32), (_dbus_demarshal_double),
11813         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
11814         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
11815         (_dbus_verbose_bytes), (_dbus_marshal_test):
11816         * dbus/dbus-marshal.h:
11817         * dbus/dbus-message-internal.h:
11818         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
11819         (dbus_message_write_header), (_dbus_message_lock),
11820         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
11821         (dbus_message_get_name), (dbus_message_append_int32),
11822         (dbus_message_append_uint32), (dbus_message_append_double),
11823         (dbus_message_append_string), (dbus_message_append_byte_array),
11824         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
11825         (dbus_message_iter_unref), (dbus_message_iter_has_next),
11826         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
11827         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
11828         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
11829         (decode_header_data), (_dbus_message_loader_return_buffer),
11830         (message_iter_test), (_dbus_message_test):
11831         * dbus/dbus-message.h:
11832         * dbus/dbus-protocol.h:
11833         * dbus/dbus-test.c: (main):
11834         * dbus/dbus-test.h:
11835         * glib/test-dbus-glib.c: (message_handler), (main):
11836         * test/echo-client.c: (main):
11837         * test/watch.c: (check_messages):
11838         Make messages sendable and receivable for real.
11839
11840 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11841
11842         * dbus/dbus-marshal.c: (_dbus_marshal_double),
11843         (_dbus_marshal_string), (_dbus_marshal_byte_array):
11844         * dbus/dbus-message.c: (dbus_message_append_int32),
11845         (dbus_message_append_uint32), (dbus_message_append_double),
11846         (dbus_message_append_string), (dbus_message_append_byte_array):
11847         Handle OOM restoration.
11848
11849 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
11850
11851         * dbus/dbus-marshal.c: (_dbus_marshal_string),
11852         (_dbus_demarshal_string), (_dbus_marshal_test):
11853         * dbus/dbus-marshal.h:
11854         * dbus/dbus-message.c: (dbus_message_get_name),
11855         Document these functions.
11856
11857         (dbus_message_append_int32), (dbus_message_append_uint32),
11858         (dbus_message_append_double), (dbus_message_append_string),
11859         (dbus_message_append_byte_array):
11860         * dbus/dbus-message.h:
11861         Add functions for adding message fields of different types.
11862
11863         * dbus/dbus-protocol.h:
11864         Add the different types.
11865
11866 2003-01-05  Havoc Pennington  <hp@pobox.com>
11867
11868         * bus/connection.c: implement routines for handling connections,
11869         first thing is keeping a list of owned services on each connection
11870         and setting up watches etc.
11871
11872         * bus/services.c: implement a mapping from service names to lists
11873         of connections
11874
11875         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
11876
11877         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
11878         to use static mutexes for global data
11879
11880         * dbus/dbus-connection.c (dbus_connection_set_data): add new
11881         collection of functions to set/get application-specific data
11882         on the DBusConnection.
11883
11884 2003-01-04  Havoc Pennington  <hp@pobox.com>
11885
11886         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
11887         (_dbus_poll): new function
11888
11889         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
11890         copied from GLib
11891
11892         * bus/loop.c: initial code for the daemon main loop
11893
11894 2003-01-04  Havoc Pennington  <hp@pobox.com>
11895
11896         * test/watch.c (error_handler): make it safe if the error handler
11897         is called multiple times (if we s/error handler/disconnect
11898         handler/ we should just guarantee it's called only once)
11899
11900         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
11901         error handler on disconnect (it's quite possible we should
11902         just change the error handler to a "disconnect handler," I'm
11903         not sure we have any other meaningful errors)
11904
11905         * configure.in: check for getpwnam_r
11906
11907         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
11908         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
11909         mechanism as in SASL spec, using socket credentials
11910
11911         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
11912         (_dbus_send_credentials_unix_socket): new function
11913
11914         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
11915         dbus_accept()
11916         (_dbus_write): only check errno if <0 returned
11917         (_dbus_write_two): ditto
11918
11919 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
11920
11921         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
11922         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
11923         (_dbus_marshal_test):
11924         * dbus/dbus-marshal.h:
11925         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
11926         to _dbus_marshal_utf8_string. Also fix some tests.
11927
11928 2002-12-28  Harri Porten  <porten@kde.org>
11929
11930         * configure.in: added check for C++ compiler and a very cheesy
11931         check for the Qt integration
11932
11933         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
11934
11935         * qt/Makefile.am: added
11936
11937         * qt/.cvsignore: added
11938
11939         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
11940         latter, added #ifdef QT_THREAD_SUPPORT guard.
11941
11942         * dbus/Makefile.am: added missing headers for make dist
11943
11944 2002-12-28  Kristian Rietveld  <kris@gtk.org>
11945
11946         * dbus/Makefile.am: fixup export-symbols-regex.
11947
11948 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
11949
11950         * acinclude.m4: Add this file and put the
11951         PKG_CHECK_MODULE macro in it.
11952
11953 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
11954
11955         * dbus/dbus-marshal.c: (_dbus_marshal_string),
11956         (_dbus_demarshal_double), (_dbus_demarshal_int32),
11957         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
11958         (_dbus_marshal_test):
11959         Make the demarshalling routines align the pos argument.
11960         Add string marshalling tests and fix the obvious bugs
11961         discovered.
11962
11963 2002-12-26  Havoc Pennington  <hp@pobox.com>
11964
11965         * dbus/dbus-auth.c: fixes fixes fixes
11966
11967         * dbus/dbus-transport-unix.c: wire up support for
11968         encoding/decoding data on the wire
11969
11970         * dbus/dbus-auth.c (_dbus_auth_encode_data)
11971         (_dbus_auth_decode_data): append to target string
11972         instead of nuking it.
11973
11974 2002-12-26  Havoc Pennington  <hp@pobox.com>
11975
11976         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
11977         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
11978         doh
11979
11980         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
11981         avoid swap_bytes() overhead (ignoring possible assembly stuff for
11982         now). Main point is because I wanted unpack_uint32 to implement
11983         _dbus_verbose_bytes
11984         (_dbus_verbose_bytes): new function
11985
11986         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
11987
11988         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
11989         mechanism to handle a corrupt message stream
11990         (_dbus_message_loader_new): fix preallocation to only prealloc,
11991         not prelengthen
11992
11993         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
11994         (_dbus_string_test): enhance tests for copy/move and fix the
11995         functions
11996
11997         * dbus/dbus-transport-unix.c: Hold references in more places to
11998         avoid reentrancy problems
11999
12000         * dbus/dbus-transport.c: ditto
12001
12002         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
12003         leak reference count in no-message case
12004
12005         * test/watch.c (do_mainloop): handle adding/removing watches
12006         during iteration over the watches. Also, ref the connection/server
12007         stored on a watch, so we don't try to mangle a destroyed one.
12008
12009         * dbus/dbus-transport-unix.c (do_authentication): perform
12010         authentication
12011
12012         * dbus/dbus-auth.c (get_state): add a state
12013         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
12014         (_dbus_auth_get_unused_bytes): append the unused bytes
12015         to the passed in string, rather than prepend
12016
12017         * dbus/dbus-transport.c (_dbus_transport_init_base): create
12018         the auth conversation DBusAuth
12019
12020         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
12021         (_dbus_transport_new_for_domain_socket): when creating a
12022         transport, pass in whether it's a client-side or server-side
12023         transport so we know which DBusAuth to create
12024
12025 2002-12-03  Havoc Pennington  <hp@pobox.com>
12026
12027         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
12028         _after_ finalizing the derived members
12029         (unix_connection_set): unref watch if we fail to add it
12030
12031         * dbus/dbus-connection.c (dbus_connection_unref): delete the
12032         transport first, so that the connection owned by the
12033         transport will be valid as the transport finalizes.
12034
12035         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
12036         if necessary, and remove watches from the connection.
12037
12038         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
12039
12040 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
12041
12042         * dbus/dbus-marshal.c: (_dbus_marshal_string),
12043         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12044         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12045         (_dbus_marshal_test):
12046         * dbus/dbus-marshal.h:
12047         Add string marshal functions and have the demarshal functions
12048         return the new position.
12049
12050 2002-12-25  Havoc Pennington  <hp@pobox.com>
12051
12052         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
12053         it is a simple protocol that just maps directly to SASL.
12054
12055         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
12056         initial implementation, not actually used yet.
12057
12058         * dbus/dbus-string.c (_dbus_string_find): new function
12059         (_dbus_string_equal): new function
12060         (_dbus_string_base64_encode): new function
12061         (_dbus_string_base64_decode): new function
12062
12063 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
12064
12065         * dbus/Makefile.am:
12066         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
12067         (_dbus_marshal_int32), (_dbus_marshal_uint32),
12068         (_dbus_demarshal_double), (_dbus_demarshal_int32),
12069         (_dbus_demarshal_uint32), (_dbus_marshal_test):
12070         * dbus/dbus-marshal.h:
12071         * dbus/dbus-protocol.h:
12072         * dbus/dbus-test.c: (main):
12073         * dbus/dbus-test.h:
12074         Add un-optimized marshalling/demarshalling routines.
12075
12076 2002-12-25  Harri Porten  <porten@kde.org>
12077
12078         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
12079
12080 2002-12-24  Zack Rusin  <zack@kde.org>
12081
12082         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
12083         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
12084         main loop stuff
12085
12086 2002-12-24  Havoc Pennington  <hp@pobox.com>
12087
12088         * glib/dbus-gthread.c: fix include
12089
12090         * glib/dbus-glib.h: rename DBusMessageHandler for now.
12091         I think glib API needs to change, though, as you don't
12092         want to use DBusMessageFunction, you want to use the
12093         DBusMessageHandler object. Probably
12094         dbus_connection_open_with_g_main_loop()
12095         and dbus_connection_setup_g_main_loop() or something like that
12096         (but think of better names...) that just create a connection
12097         that has watch/timeout functions etc. already set up.
12098
12099         * dbus/dbus-connection.c
12100         (dbus_connection_send_message_with_reply): new function just to
12101         show how the message handler helps us deal with replies.
12102
12103         * dbus/dbus-list.c (_dbus_list_remove_last): new function
12104
12105         * dbus/dbus-string.c (_dbus_string_test): free a string that
12106         wasn't
12107
12108         * dbus/dbus-hash.c: use memory pools for the hash entries
12109         (rebuild_table): be more paranoid about overflow, and
12110         shrink table when we can
12111         (_dbus_hash_test): reduce number of sprintfs and write
12112         valid C89. Add tests for case where we grow and then
12113         shrink the hash table.
12114
12115         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
12116
12117         * dbus/dbus-connection.c (dbus_connection_register_handler)
12118         (dbus_connection_unregister_handler): new functions
12119
12120         * dbus/dbus-message.c (dbus_message_get_name): new
12121
12122         * dbus/dbus-list.c: fix docs typo
12123
12124         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
12125         an object representing a handler for messages.
12126
12127 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
12128
12129         * glib/dbus-glib.h:
12130         * glib/dbus-gthread.c: (dbus_gthread_init):
12131         Don't use the gdbus prefix for public functions.
12132
12133 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
12134
12135         * Makefile.am:
12136         * configure.in:
12137         Add GLib checks and fixup .pc files
12138
12139         * glib/Makefile.am:
12140         * glib/dbus-glib.h:
12141         * glib/dbus-gmain.c: (gdbus_connection_prepare),
12142         (gdbus_connection_check), (gdbus_connection_dispatch),
12143         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
12144         (dbus_connection_gsource_new):
12145         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
12146         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
12147         * glib/test-dbus-glib.c: (message_handler), (main):
12148         Add GLib support.
12149
12150 2002-12-15  Harri Porten  <porten@kde.org>
12151
12152         * autogen.sh: check for libtoolize before attempting to use it
12153
12154         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
12155         struct.
12156
12157         * .cvsignore: ignore more stamp files
12158
12159         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
12160
12161         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
12162         without make install.
12163
12164 2002-12-15  Havoc Pennington  <hp@pobox.com>
12165
12166         * dbus/dbus-threads.c: add thread stubs that a higher library
12167         layer can fill in. e.g. the GLib wrapper might fill them in with
12168         GThread stuff. We still need to use this thread API to
12169         thread-safe-ize the library.
12170
12171 2002-12-12  Havoc Pennington  <hp@pobox.com>
12172
12173         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
12174         below new interfaces and include fewer system headers.
12175
12176         * dbus/dbus-sysdeps.c (_dbus_read): new function
12177         (_dbus_write): new function
12178         (_dbus_write_two): new function
12179         (_dbus_connect_unix_socket): new function
12180         (_dbus_listen_unix_socket): new function
12181
12182         * dbus/dbus-message-internal.h: change interfaces to use
12183         DBusString
12184
12185 2002-12-11  Havoc Pennington  <hp@pobox.com>
12186
12187         * dbus/dbus-types.h: add dbus_unichar
12188
12189         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
12190
12191         * dbus/dbus-connection.c (dbus_connection_send_message): return
12192         TRUE on success
12193
12194         * dbus/dbus-transport.c: include dbus-watch.h
12195
12196         * dbus/dbus-connection.c: include dbus-message-internal.h
12197
12198         * HACKING: add file with coding guidelines stuff.
12199
12200         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
12201         handling here, for security purposes (as in vsftpd). Not actually
12202         using this class yet.
12203
12204         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
12205         system/libc usage here, as in vsftpd, for ease of auditing (and
12206         should also simplify portability). Haven't actually moved all the
12207         system/libc usage into here yet.
12208
12209 2002-11-25  Havoc Pennington  <hp@pobox.com>
12210
12211         * dbus/dbus-internals.c (_dbus_verbose): fix to not
12212         always print the first verbose message.
12213
12214 2002-11-24  Havoc Pennington  <hp@pobox.com>
12215
12216         * test/echo-client.c, test/echo-server.c: cheesy test
12217         clients.
12218
12219         * configure.in (AC_CHECK_FUNCS): check for writev
12220
12221         * dbus/dbus-message.c (_dbus_message_get_network_data): new
12222         function
12223
12224         * dbus/dbus-list.c (_dbus_list_foreach): new function
12225
12226         * dbus/dbus-internals.c (_dbus_verbose): new function
12227
12228         * dbus/dbus-server.c, dbus/dbus-server.h: public object
12229         representing a server that listens for connections.
12230
12231         * dbus/.cvsignore: create
12232
12233         * dbus/dbus-errors.h, dbus/dbus-errors.c:
12234         public API for reporting errors
12235
12236         * dbus/dbus-connection.h, dbus/dbus-connection.c:
12237         public object representing a connection that
12238         sends/receives messages. (Same object used for
12239         both client and server.)
12240
12241         * dbus/dbus-transport.h, dbus/dbus-transport.c:
12242         Basic abstraction for different kinds of stream
12243         that we might read/write messages from.
12244
12245 2002-11-23  Havoc Pennington  <hp@pobox.com>
12246
12247         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
12248         _DBUS_INT_MAX
12249
12250         * dbus/dbus-test.c (main): add list test, and include
12251         dbus-test.h as intended
12252
12253         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
12254         (_dbus_hash_table_remove_int): return value indicates
12255         whether the entry existed to remove
12256
12257         * dbus/dbus-list.c: add linked list utility class,
12258         with docs and tests
12259
12260         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
12261         array sometimes.
12262
12263 2002-11-23  Havoc Pennington  <hp@pobox.com>
12264
12265         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
12266         DBUS_END_DECLS to nothing, that should fix this once and for all
12267
12268         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
12269
12270         * dbus/dbus-message.c, dbus/dbus-hash.c:
12271         add some missing @brief
12272
12273 2002-11-23  Havoc Pennington  <hp@pobox.com>
12274
12275         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
12276         to avoid confusing Doxygen
12277
12278         * dbus/dbus-hash.c: @} not }@
12279
12280         * dbus/dbus-message.c (struct DBusMessage): split out
12281         internals docs
12282
12283 2002-11-23  Havoc Pennington  <hp@pobox.com>
12284
12285         * configure.in: pile on more warning flags if using gcc
12286
12287         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
12288         to document static functions
12289
12290         * configure.in: add summary to end of configure so it
12291         looks nice and attractive
12292
12293         * dbus/dbus-hash.c: finish implementation and write unit
12294         tests and docs
12295
12296         * configure.in: add --enable-tests to enable unit tests
12297
12298         * dbus/dbus-test.c: test program to run unit tests
12299         for all files in dbus/*, initially runs a test for
12300         dbus-hash.c
12301
12302         * dbus/dbus-internals.h: file to hold some internal utility stuff
12303
12304 2002-11-22  Havoc Pennington  <hp@redhat.com>
12305
12306         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
12307         "ported" away from Tcl
12308
12309         * dbus/dbus-types.h: header for types such as dbus_bool_t
12310
12311 2002-11-22  Havoc Pennington  <hp@redhat.com>
12312
12313         * dbus/dbus.h: fixups for doc warnings
12314
12315         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
12316         macros
12317         (QUIET): make it quiet so we can see warnings
12318
12319         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
12320
12321 2002-11-22  Havoc Pennington  <hp@redhat.com>
12322
12323         * Makefile.am: include "Doxyfile" target in all-local
12324
12325         * configure.in: generate the Doxyfile
12326
12327         * Doxyfile.in: move Doxyfile here, so we can use
12328         configure to generate a Doxyfile with the right
12329         version number etc.
12330
12331 2002-11-22  Havoc Pennington  <hp@redhat.com>
12332
12333         * dbus/dbus-message.c: move inline docs into .c file
12334
12335         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
12336         so all docs are under doc/
12337         (MAN_EXTENSION): generate man pages. Use extension
12338         ".3dbus" which matches ".3qt" on my system,
12339         I guess this is OK, I don't know really.
12340         (FILE_PATTERNS): look for .c files not .h, makes sense
12341         for plain C I think
12342
12343 2002-11-22  Havoc Pennington  <hp@pobox.com>
12344
12345         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
12346         because any app can be a server, and any app can be a client,
12347         the bus is a special kind of server.
12348
12349 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
12350
12351         * Doxyfile : adding. Still needs Makefile rules to be generated
12352         automatically (just run "doxygen" in the toplevel dir for now to
12353         generate docs)
12354
12355         * dbus/dbus-message.h : Adding sample docs (javadoc since
12356         resembles gtk-doc a little more)
12357
12358         * dbus/dbus.h : Adding sample docs
12359
12360 2002-11-21  Havoc Pennington  <hp@redhat.com>
12361
12362         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
12363         so we can allow ourselves to include files directly,
12364         instead of having to use dbus.h
12365
12366         * dbus/dbus.h: fill in
12367
12368         * dbus/dbus-message.h: sketch out a sample header file.
12369         Include griping if you include it directly instead of
12370         via dbus.h
12371
12372         * dbus/dbus-macros.h: new file with macros for extern "C",
12373         TRUE/FALSE, NULL, etc.
12374
12375         * doc/file-boilerplate.c: put include guards in here
12376
12377 2002-11-21  Havoc Pennington  <hp@redhat.com>
12378
12379         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
12380
12381         * COPYING: include the GPL as well, and license code
12382         under both AFL and GPL.
12383
12384 2002-11-21  Havoc Pennington  <hp@redhat.com>
12385
12386         * acconfig.h: get rid of this
12387
12388         * autogen.sh (run_configure): add --no-configure option
12389
12390         * configure.in: remove AC_ARG_PROGRAM to make
12391         autoconf complain less. add AC_PREREQ.
12392         add AC_DEFINE third arg.
12393
12394 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
12395
12396         * doc/Makefile.am:
12397         Fix references so we can distcheck.
12398
12399 2002-11-21  Havoc Pennington  <hp@redhat.com>
12400
12401         * Initial module creation
12402