2005-06-29 Colin Walters <walters@verbum.org>
[platform/upstream/dbus.git] / ChangeLog
1 2005-06-29  Colin Walters  <walters@verbum.org>
2
3         * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
4         name_call for keeping track of any outgoing GetNameOwner call.
5         Also add for_owner and associated.
6         (struct _DBusGProxyManager): Add owner_names, which is hash table
7         that maps a base name to a list of names it owns (that we're
8         interested in).  Add pending_nameowner_calls which is a list of
9         all outstanding GetNameOwner; avoids us having to iterate over
10         every proxy.  Add unassociated_proxies which keeps track of name
11         proxies with no associated name owner.
12         (dbus_g_proxy_manager_unref): Destroy owner_names.
13         (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
14         name refcounts.
15         (find_name_in_info, name_owner_foreach)
16         (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
17         (dbus_g_proxy_manager_monitor_name_owner)
18         (dbus_g_proxy_manager_unmonitor_name_owner)
19         (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
20         New functions; they manipulate the owner_names mapping.
21         (got_name_owner_cb): New function.
22         (get_name_owner): New function, extracted from
23         dbus_g_proxy_new_for_name_owner.
24         (dbus_g_proxy_manager_register): For now we need to keep track of
25         all NameOwnerChanged.  Also if the proxy is for a name, if we
26         don't already know the name owner, queue a new GetNameOwner
27         request and add it to our list of unassociated proxies.  Otherwise
28         inc the refcount.
29         (dbus_g_proxy_manager_unregister): If this proxy is for a name,
30         cancel any pending GetNameOwner call, etc.
31         (dbus_g_proxy_manager_filter): Handle NameOwnerChanged.  Also use
32         the owner_names mapping to look up the current names for the
33         signal source, and dispatch to any proxies for that name.
34         (dbus_g_proxy_new): Initialize new members.
35         (dbus_g_proxy_new_for_name): Delete unused proxy variable.
36         (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
37         (dbus_g_pending_call_end_valist): New function, extracted from
38         dbus_g_proxy_end_call_internal.  Useful when we don't have a proxy
39         but want to use the GLib infrastructure.  Also note how many
40         arguments in reply were over.
41         (dbus_g_pending_call_end): New function, just call
42         dbus_g_pending_call_end_valist.
43         (dbus_g_proxy_end_call_internal): Just call
44         dbus_g_pending_call_end_valist.
45
46         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
47         of builtin marshaller for STRING_STRING_STRING.
48
49         * test/glib/test-dbus-glib.c: 
50         * test/glib/test-service-glib.c:
51         * test/glib/test-service-glib.xml:
52         Extend tests to cover name proxies, destruction of owner proxies,
53         etc.
54         
55         * glib/examples/example-signal-recipient.c
56         (dbus_g_proxy_new_for_name_owner): Create a name proxy.
57         
58         * tools/dbus-send.c (main): Print D-BUS error name in addition
59         to message.
60
61 2005-06-28  John (J5) Palmieri  <johnp@redhat.com>
62
63         * python/dbus_bindings.pyx.in (cunregister_function_handler,
64         cmessage_function_handler): Patch from 
65         Anthony Baxter <anthony@interlink.com.au> fixes threading problems
66         by using the Py_GILState_Ensure/Release to synchronize with the
67         python runtime.
68         
69 2005-06-28  Ray Strode  <rstrode@redhat.com>
70
71         *  dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
72         babysitter helper process on last unref, bug #2813.
73
74 2005-06-27  Colin Walters  <walters@verbum.org>
75
76         * test/glib/test-dbus-glib.c: 
77         * test/glib/test-service-glib.c:
78         * test/glib/test-service-glib.xml:
79         Test hash table signal emitting.
80
81         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
82         types to their fundamental basis types, since this is what
83         marshallers operate on.  Also add an entry for VOID__BOXED.
84         (dbus_g_object_register_marshaller_array): Convert to fundamental.
85
86 2005-06-26  Havoc Pennington  <hp@redhat.com>
87
88         * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
89         from Don Park
90
91 2005-06-26  Colin Walters  <walters@verbum.org>
92
93         * glib/dbus-glib.c (dbus_set_g_error): Delete.
94         (dbus_g_error_set): New public function from its ashes; used by
95         both service-side method implementation and GLib bindings
96         internals.
97         (dbus_g_error_has_name, dbus_g_error_get_name): New function.
98         (_dbus_glib_test): Add some tests.
99
100         * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
101
102         * test/glib/test-service-glib.c (my_object_throw_error): Use
103         dbus_g_error_set.
104
105         * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
106         errors thrown by dbus_g_error_set.
107
108         * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
109
110         * glib/dbus-gparser.c (validate_signature): Ditto.
111
112         * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner) 
113         (dbus_g_proxy_end_call_internal): Ditto.
114
115         * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
116         converts DBUS_ERROR_x to DBUS_GERROR_x.
117         (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
118
119         * doc/TODO: Remove error TODO.
120
121         * doc/dbus-tutorial.xml: Update with documentation about error
122         handling.
123
124         * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
125         sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
126         GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.
127
128 2005-06-22  Colin Walters  <walters@verbum.org>
129         
130         Patch from Ross Burton <ross@openedhand.com>
131
132         * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
133
134 2005-06-20  Colin Walters  <walters@verbum.org>
135
136         * configure.in: Add glib/examples.
137
138         * glib/Makefile.am: Add examples/
139
140         * glib/examples/.cvsignore
141         * glib/examples/Makefile.am
142         * glib/examples/example-client.c
143         * glib/examples/example-service.c
144         * glib/examples/example-service.xml
145         * glib/examples/example-signal-emitter.c
146         * glib/examples/example-signal-emitter.xml
147         * glib/examples/example-signal-recipient.c:
148         New files; GLib binding examples, ported from
149         python/examples.
150
151 2005-06-20  Colin Walters  <walters@verbum.org>
152
153         * dbus/dbus-glib.h: 
154         * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
155         dbus_g_proxy_call.
156
157         * glib/dbus-binding-tool-glib.c: 
158         * doc/dbus-tutorial.xml: 
159         * test/glib/test-dbus-glib.c: Update for rename.
160         
161 2005-06-20  Colin Walters  <walters@verbum.org>
162
163         Patch suggested by Ross Burton <ross@openedhand.com>
164
165         * glib/dbus-gobject.c (export_signals): Free signal name.
166         (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
167         memory leak.  Add a bit of documentation.
168         (dbus_g_method_return_error): Free context, and note we do
169         so.
170
171 2005-06-18  Murray Cumming  <murrayc@murrayc.com>
172
173         * dbus/dbus-glib.h:
174         * glib/dbus-gobject.c:
175         * glib/dbus-gproxy.c:
176         * glib/dbus-gvalue.c: Predeclare structs as 
177         typedef struct _Something Something instead of 
178         typedef struct Something Something, so we can 
179         redeclare the prototypes. Other GNOME libraries 
180         do this already.
181
182 2005-06-17  Colin Walters  <walters@verbum.org>
183
184         * tools/dbus-names-model.c (have_names_notify): Fix call
185         to dbus_g_proxy_end_call.
186         
187 2005-06-17  Colin Walters  <walters@verbum.org>
188
189         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
190         spew warnings if we get malformed remote signals.
191
192         * glib/dbus-gobject.c (propsig_iterate): New function.
193         (lookup_object_info): New function, extracted from
194         lookup_object_and_method.
195         (introspect_properties, introspect_signals): Delete; these
196         are merged into write_interface.
197         (write_interface): Write out signals and properties here;
198         dump the org.gtk.object stuff and use the interface given
199         in the introspection data blob.  Also fix up property XML.
200         (lookup_values): New function.
201         (introspect_interfaces): Gather a mapping from interface to a
202         list of its methods, signals, and properties, then write out
203         each interface.
204         (lookup_object_and_method): Use lookup_object_info.
205         (struct DBusGSignalClosure): Add interface.
206         (dbus_g_signal_closure_new): Add interface. Don't dup signame;
207         we can just use the constant data.
208         (dbus_g_signal_closure_finalize): Don't free signal name.
209         (signal_emitter_marshaller): Use interface from signal closure.
210         (export_signals): Only export signals mentioned in introspection
211         blob.
212         (dbus_g_connection_register_g_object): Warn if we have no
213         introspection data for an object.
214         (funcsig_equal): Remove unused variable.
215         (dbus_g_object_register_marshaller): Take varargs instead of
216         list.
217         (dbus_g_object_register_marshaller_array): New function,
218         extracted from old dbus_g_object_register_marshaller.
219
220         * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
221         signals and property data.
222         (write_quoted_string): New function, extracted from generate_glue.
223         (generate_glue): Write signals and properties to introspection
224         blob.
225
226         * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
227         exported_signals and exported_properties.
228         (dbus_g_object_register_marshaller): Update prototype.
229         (dbus_g_object_register_marshaller_array): Prototype.
230         
231         * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
232
233         * test/glib/test-service-glib.c: Add new test signals and method
234         to emit them.
235
236         * test/glib/test-service-glib.xml: Add some test signals.
237
238         * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
239         and my-object-marshal.h
240         (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
241         my-object-marshal.c.
242         (my-object-marshal.c, my-object-marshal.h): Implement.
243
244         * test/glib/.cvsignore: Update.
245
246         * doc/TODO: Remove two GLib TODO items fixed by this
247         patch.
248
249 2005-06-16  Colin Walters  <walters@verbum.org>
250
251         * doc/TODO: Update for GLib bindings.
252         
253 2005-06-16  Colin Walters  <walters@verbum.org>
254
255         * glib/dbus-binding-tool-glib.c:
256         * glib/dbus-gobject.c:
257         * glib/dbus-gproxy.c:  Add Nokia copyright; Patch
258         from Ross Burton, for his GLib bindings work.
259
260 2005-06-16  Colin Walters  <walters@verbum.org>
261
262         * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
263         to iterate instead of walking to G_TYPE_INVALID.
264
265         Patch based on a patch from Ryan Gammon.
266
267 2005-06-16  Colin Walters  <walters@verbum.org>
268
269         * bus/bus.c (bus_context_new): Set parser to NULL
270         after we unref it (Patch from Chris Boscolo, #2174).
271         
272 2005-06-16  Colin Walters  <walters@verbum.org>
273
274         * python/dbus_bindings.pyx.in: Import size_t,
275         __int64_t, __uint64_t, and __signed.
276
277         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
278         Define cmsg struct, output it.
279         (_dbus_read_credentials_unix_socket):
280         Use cmsg struct.
281         
282         Patch from Joe Markus Clarke for FreeBSD support.
283         
284 2005-06-16  Colin Walters  <walters@verbum.org>
285
286         * tools/dbus-send.c (append_array): Use strtok.
287         (append_dict): New function.
288         (type_from_name): New function, extracted from main.
289         (main): Handle sending dicts.
290
291         * tools/dbus-print-message.c (print_iter): Print dict
292         entries.
293         
294 2005-06-16  Colin Walters  <walters@verbum.org>
295
296         * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
297         values as the empty string (#2948).
298         
299 2005-06-16  Colin Walters  <walters@verbum.org>
300
301         * dbus/Makefile.am:
302         * mono/doc/Makefile.am:
303         * test/glib/Makefile.am:
304
305         Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
306
307 2005-06-16  Colin Walters  <walters@verbum.org>
308
309         * dbus/dbus-marshal-header.c (_dbus_header_load): Set
310         header byte order from expected byte order (Patch from Chris Wilson, #3475).
311
312         * dbus/dbus-marshal-byteswap.c (byteswap_body_helper): 
313         Increment pointer after swapping fixed array.  Add assertion
314         for array length.
315                 
316 2005-06-15  Colin Walters  <walters@verbum.org>
317
318         * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
319         Fix call to dbus_set_error.  (Patch from Michael Banck, #3461)
320         
321 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
322
323         * NEWS: Update to 0.34
324
325 2005-06-15  David Zeuthen  <davidz@redhat.com>
326
327         * configure.in (LT_CURRENT): Revert back to 1 as the library
328         hasn't changed and we've certainly not committed to protocol
329         stability yet.  All this does is to break ABI. See commit note
330         from hp@redhat.com 2005-05-05 for details.
331         
332 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
333
334         * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method 
335         (_dbus_connection_run_builtin_filters): New method
336         (dbus_connection_dispatch): Run the builtin filters which in turn
337         runs the peer filter which handles Ping messages.
338
339         * doc/TODO: 
340          - Ping isn't handled: This patch fixes it
341          
342          - Add a test case for the Ping message: added TODO item
343
344 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
345
346         * dbus/dbus-message.c:
347         (dbus_message_has_path): New method
348         (dbus_message_has_interface): New method
349         (dbus_message_has_member): New method
350
351         * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
352         New method
353
354         * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that 
355         the keyring directory is private to the user
356
357         * doc/TODO:
358          - The convenience functions in dbus-bus.h should perhaps have
359          the signatures that they would have if they were autogenerated
360          stubs. e.g. the acquire service function. We should also evaluate
361          which of these functions to include, in light of the fact that
362          GLib/Qt native stubs will probably also exist.: Punted
363
364          - add dbus_message_has_path(), maybe has_member/interface:
365          fixed in this patch
366
367          - in dbus-keyring.c, enforce that the keyring dir is not
368          world readable/writable: Fixed in this patch
369
370 2005-06-15  John (J5) Palmieri  <johnp@redhat.com>
371
372         * dbus/dbus-marshal-validate.h: Added a new validation
373         error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for 
374         out of memory errors when validating signitures
375
376         * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
377         in places where we previously used DBUS_VALID and a FALSE return 
378         value to indicate OOM
379         
380         * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
381         Use a stack to track the number of elements inside containers.  The 
382         stack values are then used to validate that dict entries have only two
383         elements within them.
384         (validate_body_helper): check the reason for failure when validating
385         varients
386         
387         * dbus/dbus-message.c (load_message): use 
388         DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used 
389         DBUS_VALID and a FALSE return value to indicate OOM
390
391         * doc/TODO: remove "- validate dict entry number of fields" as this
392         patch fixes it
393
394 2005-06-14  David Zeuthen  <davidz@redhat.com>
395
396         * bus/bus.c (process_config_every_time): Drop existing conf-dir
397         watches (if applicable) and add new watches
398
399         * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
400         (main): Setup SIGIO signal handler if using D_NOTIFY
401
402         * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
403
404         * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
405         (merge_included): Also merge conf_dirs list
406         (bus_config_parser_unref): Clear conf_dirs list
407         (include_dir): Add directory to conf_dirs list
408         (bus_config_parser_get_conf_dirs): New function
409
410         * bus/dir-watch.[ch]: New files
411
412         * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
413
414         * configure.in: Add checks for D_NOTIFY on Linux
415
416 2005-06-14  Colin Walters  <walters@verbum.org>
417
418         * glib/dbus-binding-tool-glib.c:
419         * glib/dbus-gobject.c:
420         * glib/dbus-gvalue.c: Fix indentation and brace style.
421         
422 2005-06-14  Ross Burton <ross@openedhand.com>.
423
424         * glib/dbus-glib.h: Make DBusGMethodInvocation
425         a private structure.  Rearrange prototypes a bit.
426         
427         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
428         documentation for first_arg_type.
429         
430         * glib/dbus-gobject.c: Move DBusGMethodInvocation
431         here, add documentation.  Move dbus_g_method_return
432         and dbus_g_method_return_error into public API
433         section.
434
435 2005-06-14  Colin Walters  <walters@verbum.org>
436
437         * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
438         Add missing return statements, noticed by Ross Burton.
439         
440 2005-06-13  Ross Burton <ross@openedhand.com>.
441
442         * glib/dbus-gobject.c: Handle errors on message
443         demarshalling by sending error message back.
444         * glib/dbus-gvalue.c: Initialize return variables.
445
446 2005-06-13  Colin Walters  <walters@verbum.org>
447
448         * glib/Makefile.am: Fix thinko in last patch.
449
450 2005-06-13  Colin Walters  <walters@verbum.org>
451
452         * glib/Makefile.am: Move dbus-gtype-specialized.c
453         and dbus-gtype-specialized.h into a _HEADERS variable,
454         install them.
455
456 2005-06-12  Colin Walters  <walters@verbum.org>
457
458         Async signals and various bugfixes and testing by
459         Ross Burton <ross@openedhand.com>.
460
461         * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
462         (dbus_gvalue_genmarshal_name_from_type)
463         (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
464         (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
465         (dbus_g_value_types_init, dbus_gtype_from_signature)
466         (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
467         (dbus_gtypes_from_arg_signature): New function prototypes.
468         (dbus_gvalue_demarshal): Take context and error arguments.
469         (dbus_gvalue_demarshal_variant): New function.
470         (dbus_gvalue_demarshal_message): New function.
471         (dbus_gvalue_store): Delete.
472
473         * glib/dbus-gvalue.c:
474
475         File has been almost entirely rewritten; now we special-case
476         more types such as DBUS_TYPE_SIGNATURE, handle arrays and
477         hash tables correctly, etc.  Full support for recursive values
478         is not yet complete.
479
480         * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
481         argument of signal to G_TYPE_POINTER since we now pass a
482         structure.
483         (lookup_g_marshaller): Delete in favor of
484         _dbus_gobject_lookup_marshaller.
485         (marshal_dbus_message_to_g_marshaller): Use
486         _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
487         to handle remote signal callbacks.
488         (dbus_g_proxy_new_from_proxy): New function; creates a new
489         DBusGProxy by copying an existing one.
490         (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
491         (dbus_g_proxy_get_path): New functions.
492         (dbus_g_proxy_marshal_args_to_message): New function;
493         factored out of existing code.
494         (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
495         from a varargs array.
496         (dbus_g_proxy_begin_call_internal): New function.
497         (dbus_g_proxy_end_call_internal): New function.
498         (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
499         as arguments; simply invoke dbus_g_proxy_begin_call_internal
500         after collecting args into value array.
501         (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
502         invoke dbus_g_proxy_end_call_internal.
503         (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
504         end_call_internal.
505         (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
506         types.
507         (array_free_all): New function.
508         (dbus_g_proxy_add_signal): Take GTypes.
509
510         * glib/dbus-gobject.h:
511         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
512         (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
513         Prototype.
514
515         * glib/dbus-gobject.c: Add a global marshal_table hash which
516         stores mappings from type signatures to marshallers.  Change lots
517         of invocations of dbus_gtype_to_dbus_type to
518         dbus_gtype_to_signature.
519         (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
520         (introspect_signals): Fix test for query.return_type.
521         (set_object_property): Update invocation of dbus_gvalue_demarshal.
522         (invoke_object_method): Many changes.  Handle asynchronous
523         invocations.  Convert arguments with
524         dbus_gvalue_demarshal_message.  Handle errors.  Use
525         DBusSignatureIter instead of strlen on args. Handle all arguments
526         generically.  Special-case variants.
527         (dbus_g_method_return, dbus_g_method_return_error): New function.
528         (DBusGSignalClosure): New structure, closes over signal
529         information.
530         (dbus_g_signal_closure_new): New function.
531         (dbus_g_signal_closure_finalize): New function.
532         (signal_emitter_marshaller): New function; is special marshaller
533         which emits signals on bus.
534         (export_signals): New function; introspects object signals and
535         connects to them.
536         (dbus_g_object_type_install_info): Take GType instead of
537         GObjectClass.
538         (dbus_g_connection_register_g_object): Invoke export_signals.
539         (dbus_g_connection_lookup_g_object): New function.
540         (DBusGFuncSignature) New structure; used for mapping type
541         signatures to marshallers.
542         (funcsig_hash): New function; hashes DBusGFuncSignature.
543         (funcsig_equal): New function; compares DBusGFuncSignature.
544         (_dbus_gobject_lookup_marshaller): New function.
545         (dbus_g_object_register_marshaller): New function; used to
546         register a marshaller at runtime for a particular signature.
547
548         * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
549
550         * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
551         which notes a server method implementation should be
552         asynchronous.
553
554         * glib/dbus-binding-tool-glib.c
555         (dbus_binding_tool_output_glib_server): Call
556         dbus_g_value_types_init.
557         (write_formal_parameters): Use dbus_gtype_from_signature.  Handle
558         variants specially.
559         (dbus_g_type_get_lookup_function): Turn GType into an invocation
560         of a lookup function.
561         (write_args_for_direction): Use dbus_g_type_get_lookup_function.
562         (write_untyped_out_args): New method; write output arguments.
563         (write_formal_declarations_for_direction): Function for
564         writing prototypes.
565         (write_formal_parameters_for_direction): Function for
566         writing implementations.
567         (write_typed_args_for_direction): Function for writing
568         arguments prefixed with GTypes.
569         (write_async_method_client): Write out async version
570         of method.
571
572         * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
573         (dbus_g_type_get_marshal_name): Move mapping from GType
574         to marshal name into here.
575         (dbus_g_type_get_c_name): Move into here.
576         (compute_marshaller): Convert signature to type with
577         dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
578         (compute_marshaller_name): Ditto.
579         (compute_marshaller): Handle async signal annotations.
580         (gather_marshallers): Return if we don't have a known
581         prefix.
582         (generate_glue): Collect introspection blob here, and
583         write all of the blob at the end.  This allows an object
584         with multiple interfaces to work.
585         Mark async methods in introspection blob.
586
587         * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
588         dbus-gtype-specialized.c, dbus-gtype-specialized.h,
589         dbus-gvalue-utils.h, dbus-gvalue-utils.c.
590
591         * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
592         avoids people accidentally using DBUS_TYPE_* which should
593         not be necessary anymore.
594         Do include dbus-gtype-specialized.h, which are utilities
595         for GLib container types.
596         Add various #defines for types such as
597         DBUS_TYPE_G_BOOLEAN_ARRAY.
598         (DBusGValueIterator, DBusGValue): Define, not fully used
599         yet.
600         (dbus_g_value_get_g_type): Type for recursive value.
601         (dbus_g_value_open, dbus_g_value_iterator_get_value)
602         (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
603         (dbus_g_value_free): Prototypes.
604         (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
605         (dbus_g_proxy_set_interface): Prototype.
606         (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
607         (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
608         types.
609         (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
610         Accessors.
611         (DBusGAsyncData, DBusGMethodInvocation): Structures for
612         doing async invocations.
613         (dbus_g_method_return, dbus_g_method_return_error):
614         Prototypes.
615         * doc/dbus-tutorial.xml: Update GLib section.
616         
617         * tools/dbus-viewer.c (load_child_nodes): Update
618         for new invocation type of dbus_g_proxy_end_call.
619         (load_from_service_thread_func): Ditto.
620
621         * tools/print-introspect.c (main): Ditto.
622
623         * tools/dbus-names-model.c (have_names_notify)
624         (names_model_reload, names_model_set_connection)
625         Use GTypes.
626
627         * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
628         needed since Python bindings use GLib bindings.
629
630         * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
631         Add --prefix argument.
632
633         * tools/Makefile.am: Define DBUS_COMPILATION.  Remove
634         unneeded --ignore-unsupported arg.
635         
636         * test/glib/test-service-glib.c: 
637         * test/glib/test-service-glib.xml:
638         * test/glib/test-dbus-glib.c: Add many more tests.
639
640 2005-06-06  David Zeuthen  <davidz@redhat.com>
641
642         * doc/TODO: Add item about need to remove deprecated functions.
643
644         * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
645
646         * dbus/dbus-connection.c (dbus_connection_disconnect): New function
647         to repair the ABI which was broken with the last commit.
648
649 2005-06-02  John (J5) Palmieri <johnp@redhat.com>
650
651         *  dbus/dbus-connection.c, dbus/dbus-connection.h 
652         (dbus_connection_disconnect): renamed to dbus_connection_close 
653         for API symmetry with dbus_connection_open
654         (_dbus_connection_open_internal): 
655         s/dbus_connection_disconnect/dbus_connection_close
656
657         * dbus/dbus-bus.c (dbus_bus_get):
658         s/dbus_connection_disconnect/dbus_connection_close
659
660         * bus/connection.c (bus_connections_unref, 
661         bus_connections_setup_connection, bus_connections_expire_incomplete):
662         s/dbus_connection_disconnect/dbus_connection_close
663
664         * bus/dispatch.c (bus_dispatch, kill_client_connection, 
665         kill_client_connection_unchecked, check_hello_connection):
666         s/dbus_connection_disconnect/dbus_connection_close
667
668         * bus/bus.c (new_connection_callback):
669         s/dbus_connection_disconnect/dbus_connection_close
670
671         * tools/dbus-send.c (main):
672         s/dbus_connection_disconnect/dbus_connection_close
673
674         * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
675         s/dbus_connection_disconnect/dbus_connection_close
676         
677         * test/test-service.c (path_message_func, filter_func):
678         s/dbus_connection_disconnect/dbus_connection_close
679         
680         * doc/TODO: remove connection_open/connection_disconnect lacks symmetry         item that was just fixed
681         
682 2005-05-25  Colin Walters  <walters@verbum.org>
683
684         * dbus/dbus-protocol.h: Move various bus service #defines such
685           as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
686           dbus/dbus-shared.h.
687         * dbus/dbus-shared.h: Various defines moved here.
688         * dbus/dbus-marshal-header.c: Include dbus-shared.h.
689
690 2005-05-25  John (J5) Palmieri  <johnp@redhat.com>
691
692         * python/__init__.py: Python bindings deserve a minor version
693         update.  Upped to (0, 40, 2)
694
695 2005-05-24  John (J5) Palmieri  <johnp@redhat.com>
696
697         * python/decorators.py: add explicitly_pass_message decorator
698         for passing in the dbus message as keyword for edge case signal
699         handling
700
701         * python/matchrules.py (SignalMatchRule.__repr__): fix output
702         to conform with what dbus expects for match rules
703         (SignalMatchRule.execute): add the dbus message as a keyword
704         if the signal handler has requested it
705
706         * python/examples/example/signal-recipient.py: added some more
707         examples on how to hook up to signals
708
709 2005-05-23  John (J5) Palmieri  <johnp@redhat.com>
710
711         * python/decorators.py: import dbus_bindings
712
713         * python/matchrules.py (SignalMatchRule, SignalMatchTree, 
714         SignalMatchNode): new classes that implement wildcard signal
715         callback matching using a tree lookup. Heavily modified from a
716         patch sent by Celso Pinto (fd.o bug #3241)
717
718         * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
719         use new match classes to handle signals.
720
721 2005-05-19  John (J5) Palmieri  <johnp@redhat.com>
722         
723         * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
724
725 2005-05-18  Havoc Pennington  <hp@redhat.com>
726
727         * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
728         gettext. Not really worth requiring yet perhaps, but any
729         production quality 1.0 would require it so we should go ahead and
730         get things set up. We do have a couple token calls to
731         bindtextdomain in the code already.
732
733 2005-05-16  John (J5) Palmieri  <johnp@redhat.com>
734
735         * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
736         when using recursive g_main_loops
737
738         * python/_dbus.py (class Bus): add the ProxyObjectClass
739         alias for ProxyObject to make it easier for the Twisted 
740         networking framework to integrate dbus.
741
742         * python/proxies.py (class ProxyObject): add the ProxyMethodClass
743         alias for ProxyMethod to make it easier for the Twisted 
744         networking framework to integrate dbus. 
745
746 2005-05-11  Ross Burton  <ross@openedhand.com>
747
748         * glib/dbus-glib-tool.c: Add --prefix argument.
749         * glib/dbus-binding-tool-glib.h: Add prefix argument.
750         * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
751         Add prefix argument.
752         (generate_glue): Pass prefix argument down.
753         (dbus_binding_tool_output_glib_server): Pass prefix to
754         glib-genmarshal.
755         
756 2005-05-11  Colin Walters  <walters@verbum.org>
757
758         * tools/dbus-send.c (append_array): New function.
759         (append_arg): Broken out from main.
760         (main): Add cheesy hack to send arrays and variants.
761         (usage): Update.
762         * tools/dbus-print-message.c (print_iter): Broken out
763         from main.
764
765 2005-05-11  Colin Walters  <walters@verbum.org>
766
767         * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
768         New function, returns signature string for signature iter.
769         * dbus/dbus-signature.h: Prototype it.
770         * dbus/dbus-message.c (dbus_message_iter_get_signature):
771         New function, returns signature string for message iter.
772         (dbus_message_iter_get_array_len): New function, returns
773         length of array.
774         (dbus_message_iter_get_fixed_array): Fix assertion; this
775         function should be used when the iter is pointing to the
776         contents of an array
777         * dbus/dbus-message.h: Prototypes.
778         * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
779         New function; returns length of an array.
780         * dbus/dbus-marshal-recursive.h: Prototype it.
781         
782 2005-05-11  Colin Walters  <walters@verbum.org>
783
784         * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
785         compilation error.
786         
787 2005-05-08  Havoc Pennington  <hp@redhat.com>
788
789         * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
790         daemon's pid, not the parent's pid, to the file descriptor.
791         Reported by Taj Morton.
792
793 2005-05-05  Havoc Pennington  <hp@redhat.com>
794
795         * configure.in (LT_*): add notes on how the libtool versioning
796         works to save thinking. Increment soname to indicate protocol
797         breakage (though really the library interface hasn't changed I
798         guess)
799
800         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
801         verify the GUID received from server matches what we were
802         expecting, if we had an expectation
803
804         * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
805         (_dbus_auth_get_guid_from_server): new function
806         (send_begin): parse the OK args
807
808         * doc/dbus-specification.xml: add GUID to the auth protocol
809
810 2005-05-05  John (J5) Palmieri  <johnp@redhat.com>
811
812         * Fix my name in previous changelog ;)
813
814         * python/proxies.py (ProxyObject.__getattr__): add further patch
815         from Anthony Baxter to throw an AttributeError when python 
816         __special__ functions are called instead of marshling them over 
817         the bus (Bug#1685 comment 3).
818
819 2005-05-04  John (J5) Palmieri  <johnp@redhat.com>
820
821         * python/Makefile.am: changed to use pyexecdir for the binding
822         shared libraries (Bug#2494)
823
824         * python/exceptions.py: bring exceptions over from the bindings
825         so they can be used in applications (Bug#2036)
826         Make all exceptions derive from DBusException
827
828         * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
829         of classes so that print obj doesn't throw an exception (Bug #1685)
830
831 2005-05-03  Ross Burton  <ross@openedhand.com>
832
833         * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
834         Return if we get an error during registration.  Set up a
835         weak reference on object to unregister if object is destroyed.
836         (unregister_gobject): New function.
837         
838 2005-05-01  John (J5) Palmieri  <johnp@redhat.com>
839
840         * python/dbus_bindings.pyx.in: 
841         - added new type classes for hinting to the marashaler what type 
842         to send over the wire
843         - added int16 and uint16 marshalers
844         - Fixed a bug in the type constants that caused int32 to go out
845         as uint16 over the wire
846         * python/dbus.py: split up into different files and renamed _dbus.py
847         * python/__init__.py, python/_util.py, python/decorators.py, 
848         python/exceptions.py, python/proxies.py, python/services.py,
849         python/types.py: new files split off from dbus.py
850         * python/Makefile.am: Add new files, remove dbus.py and 
851         install all python files to <python module dir>/dbus
852         * python/examples/*: Added #!/usr/bin/env python to the top of
853         every example.  Patch provided by Tatavarty Kalyan
854
855 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
856
857         * NEWS: Update to 0.33
858
859 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
860
861         * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
862         method for doing async calls
863         (_pending_call_notification): New C function for handling pendning call
864         callbacks
865         (set_notify): New method for setting pending call notification
866         
867         * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
868         Async capabilities added to remote method calls
869         (Sender): class removed
870         (RemoteService): class removed
871         (ObjectTree): class removed for now
872         (RemoteObject): Renamed to ProxyObject
873         (RemoteMethod): Renamed to ProxyMethod
874         (method): Decorator added for decorating python methods as dbus methods
875         (signal): Decorator added for decorating python methods as signal emitters
876         (ObjectType): Metaclass added for generating introspection data and the
877         method callback vtable
878         (Interface): Wrapper class added to wrap objects in a dbus interface
879         (Object): Uses ObjectType as its metaclass and exports Introspect
880         of the org.freedesktop.DBus.Introspectable interface
881         (ValidationException, UnknownMethodException): new exceptions
882
883         * python/examples/*: Modified to fit with the new bindings
884
885 2005-04-23  Havoc Pennington  <hp@redhat.com>
886
887         * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
888         reported by Tony Houghton
889
890         * test/test-service.c (main): test
891         dbus_connection_get_object_path_data()
892
893         * dbus/dbus-object-tree.c (find_handler): be sure we always init
894         the exact_match
895         (_dbus_object_tree_get_user_data_unlocked): new function used by
896         dbus_connection_get_object_path_data()
897         (do_register): add assertion test for get_user_data_unlocked
898         (object_tree_test_iteration): more tests
899
900         * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
901         new function from Dan Reed to let you get the user data from 
902         dbus_connection_register_object_path()
903
904 2005-04-23  John (J5) Palmieri  <johnp@redhat.com>
905
906         * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
907         in numerous places that did not account for the NULL terminator
908         (signature_from_seed): changed the manual string copy loop to 
909         just use strcpy instead
910         make check should now pass
911
912 2005-04-19  John (J5) Palmieri  <johnp@redhat.com>
913
914         * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
915         so that it allows messages that are not signals to pass in 
916         NULL as the interface.
917
918 2005-04-18  David Zeuthen  <davidz@redhat.com>
919
920         * glib/dbus-gmain.c (io_handler_destroy_source): 
921         (timeout_handler_destroy_source, connection_setup_free): 
922         Also unref the source to avoid memory leaks.
923
924 2005-04-13  David Zeuthen  <davidz@redhat.com>
925
926         * bus/config-parser.c (bus_config_parser_new): Bump this to a
927         more reasonable, yet still totally arbitrary, value :-). 
928
929 2005-04-13  David Zeuthen  <davidz@redhat.com>
930
931         * doc/TODO: Added an "important for 1.0" item about selinux
932         allow/deny messages
933
934 2005-04-13  David Zeuthen  <davidz@redhat.com>
935
936         * bus/selinux.c: Add c-file-style to top of file
937         (log_audit_callback): Don't free the data here anymore
938         (bus_selinux_check): Don't take spid and tpid since appending
939         that to auxdata may OOM.
940         (bus_selinux_allows_acquire_service): Handle OOM and signal back
941         to the caller if we are OOM by taking an error object.
942         (bus_selinux_allows_send): -do-
943
944         * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
945         and bus_selinux_allows_send
946
947         * bus/bus.c (bus_context_check_security_policy): Pass error and
948         pass on OOM thrown by bus_selinux_allows_send()
949
950         * bus/services.c (bus_registry_acquire_service): Pass error and
951         pass on OOM thrown by bus_selinux_allows_acquire_service()
952
953 2005-04-13  Havoc Pennington  <hp@redhat.com>
954
955         * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
956         message at a time to avoid monopolizing the main loop, bug 
957         #2953 from Benjamin Otte
958
959 2005-04-09  Havoc Pennington  <hp@redhat.com>
960
961         * dbus/dbus-string.c (copy): change a memcpy to memmove due to
962         possible overlap, fix from Daniel Reed
963         (fixup_alignment): fix signedness warnings
964         (_dbus_string_append_unichar): ditto
965
966 2005-04-09  Havoc Pennington  <hp@redhat.com>
967
968         * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
969
970         * glib/dbus-glib-tool.c (main): fix warning
971
972         * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
973
974         * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
975         add a new function that can be used in simple applications that
976         don't have a main loop and are willing to block
977
978 2005-04-05  David Zeuthen  <davidz@redhat.com>
979
980         Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
981
982         * glib/dbus-gmain.c:
983         (io_handler_destroy_source): Remove from list of IO handlers
984         of the ConnectionSetup object
985         (timeout_handler_destroy_source): -do- for timeout handlers
986         (io_handler_source_finalized): Don't remove from list since
987         we now do that in io_handler_destroy_source(). Renamed from
988         io_handler_source_destroyed
989         (timeout_handler_source_destroyed): -do- for timeout handlers
990         (connection_setup_free): It is now safe to iterate over all
991         IO and timeout handlers as the _destroy_source removes them
992         from the list synchronously
993
994 2005-03-30  Havoc Pennington  <hp@redhat.com>
995
996         * configure.in: change check to gtk 2.4
997
998         * tools/dbus-viewer.c (name_combo_changed_callback): remove
999         gtk_combo_box_get_active_text() usage to decrement GTK requirement
1000         to 2.4
1001
1002 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
1003
1004         * News: Update 0.32
1005
1006         * HACKING: Fixed realease instructions.  configure.in should be updated to
1007           the next release by the person who made the last release.
1008
1009 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
1010
1011         * python/lvalue_cast_post_process.py - removed.  Patch has been
1012           submitted to Pyrex maintainers that fixes gcc4.0 errors
1013
1014         * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
1015
1016 2005-03-24  Daniel Reed  <n@ml.org>
1017
1018         * tools/Makefile.am: Make print-introspect and
1019         dbus-bus-introspect.xml building conditional on HAVE_GLIB.
1020
1021 2005-03-22  John (J5) Palmieri  <johnp@redhat.com>
1022
1023         * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
1024
1025         * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have 
1026           had in Red Hat packages for a while but for some reason never 
1027           got merged upstream
1028           (_dbus_is_a_number): New checks if a string
1029           can be converted to a number and does the conversion if it can
1030           (_dbus_user_database_lookup): Add check to see if the given username
1031           is a udi.  This allows udi's to be used instead of usernames in the
1032           config file.
1033           (_dbus_user_database_lookup_group): Add check to see if the given groupname
1034           is a gdi.  This allows gdi's to be used instead of groupnames in the
1035           config file.
1036
1037 2005-03-21  John (J5) Palmieri  <johnp@redhat.com>
1038
1039         * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
1040           code so that it compiles with gcc4.0
1041
1042         * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
1043           run dbus_bindings.c through lvalue_cast_post_process.py and copy the
1044           results back to dbus_binding.c
1045
1046 2005-03-20  Colin Walters  <walters@verbum.org>
1047
1048         Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
1049
1050         * configure.in: Require GTK+ 2.6.
1051         
1052 2005-03-20  Colin Walters  <walters@verbum.org>
1053
1054         * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
1055
1056 2005-03-17  Tom Parker  <palfrey@tevp.net>
1057
1058         * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
1059         print DBUS_UID_UNSET; instead print passed username.  Also
1060         be sure to actually use gid looked up in cache.
1061         
1062         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
1063         for DBUS_GID_UNSET and groupname.
1064
1065 2005-03-17  Colin Walters  <walters@verbum.org>
1066
1067         * bus/print-introspect.c: Move to tools/.
1068         * bus/run-with-tmp-session-bus.sh: Ditto.
1069         
1070         * glib/Makefile.am (dbus-glib-bindings.h): Move
1071         generation to tools/Makefile.am.
1072
1073         * test/glib/run-test.sh: Update to handle move
1074         of run-with-tmp-session-bus.sh.
1075
1076         * test/glib/test-service-glib.c: Update to handle
1077         move of dbus-glib-bindings.h.
1078
1079         * tools/print-introspect.c: Moved here
1080         from bus/, and ported to GLib bindings.
1081
1082         * tools/run-with-tmp-session-bus.sh: Moved here
1083         from bus/.
1084
1085         * tools/Makefile.am: Generate dbus-glib-bindings.h
1086         and dbus-bus-introspect.xml here.
1087
1088         * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
1089         Update.
1090
1091 2005-03-17  Colin Walters  <walters@verbum.org>
1092
1093         * bus/driver.c (write_args_for_direction): Use
1094         _dbus_string_get_const_data to retrieve string;
1095         _dbus_string_get_const_data_len doesn't actually return
1096         a NULL-terminated substring.
1097
1098         * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
1099         (main): Change to use org_freedesktop_DBus_request_name
1100         instead of using g_proxy_begin_call/end_call.
1101
1102 2005-03-15  Joe Shaw  <joeshaw@novell.com>
1103
1104         * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
1105         generating the finalizer.  Fixes from Ben Maurer.
1106
1107 2005-03-12  Joe Shaw  <joeshaw@novell.com>
1108
1109         * mono/BusDriver.cs: Update method names: ListServices
1110         becomes ListNames; GetOwner becomes GetNameOwner.
1111
1112         * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
1113         onto the eval stack when removing the delegate.
1114
1115 2005-03-12  Joe Shaw  <joeshaw@novell.com>
1116
1117         * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
1118         LT_CURRENT.  Set it to the autoconf variable.
1119                                                                                 
1120         * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
1121         classes that disconnects the signal handler delegate from the
1122         service object.  Fixes a big leak of proxy objects on the
1123         client side of things.  Patch from Ben Maurer
1124         <bmaurer@ximian.com>
1125
1126 2005-03-12  Colin Walters  <walters@verbum.org>
1127
1128         * bus/driver.c (write_args_for_direction): New function,
1129         parses a type signature into arguments and outputs to
1130         XML.
1131         (bus_driver_handle_introspect): Use it instead of
1132         hardcoding XML for certain signatures.
1133         
1134         * bus/Makefile.am (dbus-bus-introspect.xml): Add
1135         dependency on dbus-daemon.
1136
1137         * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
1138         argument, pass it to dbus_binding_tool_output_glib_client.
1139
1140         * glib/dbus-binding-tool-glib.c
1141         (generate_client_glue): Protect against multiple inclusion.
1142         (dbus_binding_tool_output_glib_client): Add
1143         G_BEGIN_DECLS/G_END_DECLS.
1144
1145         * glib/dbus-binding-tool-glib.c (compute_client_method_name):
1146         Change to just take iface prefix directly.
1147         (write_formal_parameters): Clarify error message.
1148         (check_supported_parameters): New function; checks to see type
1149         signatures of method parameters are supported.
1150         (generate_client_glue): Handle ignore_unsupported flag.
1151         (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
1152         parameter.
1153
1154         * glib/Makefile.am (dbus-glib-bindings.h): Pass
1155         --ignore-unsupported by default until glib bindings
1156         support arrays.
1157
1158 2005-03-11  Colin Walters  <walters@verbum.org>
1159
1160         * glib/Makefile.am: Generate dbus-glib-bindings.h and
1161         install it.
1162
1163         * bus/print-introspect.c: New file; prints introspection
1164         data for a given name and object path.
1165
1166         * bus/run-with-tmp-session-bus.sh: New file, refactored
1167         from test/glib/run-test.sh.  Creates a temporary session
1168         bus and runs another program.
1169
1170         * test/glib/run-test.sh: Refactor to invoke
1171         run-with-tmp-session-bus.sh.
1172
1173         * bus/driver.c (bus_driver_handle_introspect): Fix to print new
1174         introspection format.  Also change to use DBUS_TYPE_x_AS_STRING
1175         macros instead of hardcoding.
1176
1177         * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
1178
1179 2005-03-11  Joe Shaw  <joeshaw@novell.com>
1180
1181         * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
1182         this unref; it doesn't match up evenly in some codepaths.
1183         (_dbus_connection_block_pending_call): Unref at every exitpoint;
1184         this evenly matches with the ref near the top of this function.
1185
1186 2005-03-09  Joe Shaw  <joeshaw@novell.com>
1187
1188         * dbus/dbus-object-tree.c
1189         (_dbus_object_tree_unregister_and_unlock): If checks are enabled
1190         and we try to unregister a path that's not registered, still go
1191         through the process of unlocking and don't just return.
1192
1193 2005-03-09  Colin Walters  <walters@verbum.org>
1194
1195         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
1196         to this are generated for client-side wrappers.  Invokes a
1197         D-BUS method and returns reply values.  
1198
1199         * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
1200         function; writes signature string for argument direction.
1201         (write_args_for_direction): Change to pass input values directly
1202         instead of via address, and fix indentation.
1203         (generate_client_glue): Change to invoke dbus_g_proxy_invoke.  Also
1204         make generated wrappers inlineable.
1205
1206         * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
1207         note about using dbus_type_is_fixed.
1208
1209         * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
1210         dbus/dbus-signature.c as dbus_type_is_fixed.
1211
1212         All callers updated.
1213
1214         * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
1215         from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
1216
1217         * dbus/dbus-signature.h: Prototype.
1218
1219         * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
1220         error printf code.
1221
1222         * test/glib/test-dbus-glib.c (main): Be sure to clear error as
1223         appropriate instead of just freeing it.
1224         (main): Free returned strings using g_free.
1225
1226         * test/glib/Makefile.am (test-service-glib-glue.h)
1227         (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
1228
1229         * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
1230         simply maps a simple D-BUS type to GType.
1231         (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
1232         GType.
1233         (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
1234         initialize the value with it.
1235         (dbus_gvalue_binding_type_from_type): Unused, delete.
1236         (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
1237         various types instead of unmarshalling to value data directly.
1238         Remove can_convert boolean.
1239         (dbus_gvalue_marshal): Remove duplicate initialization; switch to
1240         returning directly instead of using can_convert boolean.
1241         (dbus_gvalue_store): New function; not related to D-BUS per-se.
1242         Stores a GValue in a pointer to a value of its corresponding C
1243         type.
1244
1245         * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
1246         add dbus_gvalue_store.
1247
1248 2005-03-08  Joe Shaw  <joeshaw@novell.com>
1249
1250         Fix a bunch of lifecycle and memory management problems
1251         in the mono bindings.
1252
1253         * mono/Arguments.cs (Arguments): Implement IDisposable
1254
1255         * mono/Bus.cs (Bus): Don't allow public instantiation.  This is
1256         strictly a static class.
1257
1258         * mono/Connection.cs: Move the DBusObjectPathVTable and associated
1259         delegates into this file.
1260         (Connection): Implement IDisposable.
1261         (Dispose): Disconnect the connection and set the raw connection
1262         pointer to IntPtr.Zero.
1263         (~Connection): Call Dispose().
1264         (RegisterObjectPath): Added.  Manages the registration of object
1265         paths so we can cleanly disconnect them at dispose/finalize time.
1266         (UnregisterObjectPath): Ditto.
1267         (set_RawConnection): Unregister all of the object paths when
1268         changing the underlying DBusConnection.  Add them back onto the
1269         new connection, if any.
1270
1271         * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
1272         more unmanaged resources anymore, so it's not necessary.  Move all
1273         the DBusObjectPathVTable stuff out of here.
1274         (Handler): Save references to our delegates so that they don't get
1275         finalized.  Call Connection.RegisterObjectPath() instead of
1276         dbus_connection_register_object_path() directly.
1277         (Message_Called): Dispose the message after we're finished with
1278         it.
1279
1280         * mono/Message.cs (Message): Implement IDisposable.
1281         (Dispose): Dispose the Arguments, and set the RawMessage to
1282         IntPtr.Zero.
1283         (SendWithReplyAndBlock): We own the ref to the reply that comes
1284         back from dbus_connection_send_with_reply_and_block() so add a
1285         comment about that and unref it after we've constructed a managed
1286         MethodReturn class around it.  Fixes a big, big leak.
1287
1288         * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
1289         method.
1290         (BuildSignalHandler): After we've sent the Signal message, dispose
1291         of it.
1292         (BuildMethod): Dispose of the method call and reply messages after
1293         we've sent the message and extracted the data we want from the
1294         reply.
1295
1296         * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
1297         anymore.
1298         (Service_FilterCalled): Dispose of the message after we're
1299         finished with it.
1300
1301 2005-03-08  Joe Shaw  <joeshaw@novell.com>
1302
1303         * dbus/dbus-connection.c (dbus_connection_send_with_reply):
1304         After we attach our pending call to the connection, unref
1305         it.  Fixes a leak.
1306  
1307         * mono/Connection.cs (set_RawConnection): Disconnect our
1308         filter and match callbacks from the old connection and
1309         reconnect them to the new connection, if any.
1310
1311         * mono/DBusType/Array.cs: "Code" is a static member, so
1312         don't use "this" to refer to it.  Fix for stricter checking
1313         in Mono 1.1.4.
1314  
1315         * mono/DBusType/ObjectPath.cs (Append): Don't leak the
1316         object path that we pass into unmanaged code.
1317  
1318         * mono/DBusType/String.cs (Append): Don't leak the string
1319         that we pass into unmanged code.
1320
1321 2005-03-07  John (J5) Palmieri  <johnp@redhat.com>
1322         * NEWS: Update for 0.31
1323
1324         * configure.in: Release 0.31
1325         add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
1326
1327         * qt/Makefile.am: fixed build
1328
1329         * dbus/Makefile.am: soname bump for libdbus
1330
1331         * glib/Makefile.am: soname bump for libdbus-glib
1332
1333 2005-03-05  Havoc Pennington  <hp@redhat.com>
1334
1335         * dbus/dbus-sysdeps.c:
1336         (pseudorandom_generate_random_bytes_buffer): fix to have no return
1337         value
1338         (_dbus_generate_random_bytes_buffer): fix return value
1339
1340         * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
1341         checks actually work, from Tom Parker <fdo@tevp.net>
1342
1343 2005-03-01  Colin Walters  <walters@verbum.org>
1344
1345         * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
1346         functions copied from dbus-glib-tool.c.
1347         (main): Convert lots of error code to use them.
1348         Also add some testing for introspection bits.
1349
1350 2005-03-01  Colin Walters  <walters@verbum.org>
1351         
1352         * doc/TODO: Remove introspection signature TODO.
1353
1354 2005-02-27  Colin Walters  <walters@verbum.org>
1355
1356         * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
1357         Change return value to const char * instead of int so we can do
1358         full signatures.
1359         (struct PropertyInfo, struct ArgInfo): Store char *.
1360         (property_info_new, arg_info_new): Update parameters, strdup.
1361         (property_info_unref, arg_info_unref): Free.
1362
1363         * glib/dbus-gidl.h: Update prototypes.
1364
1365         * glib/dbus-gparser.c (basic_type_from_string): Delete.
1366         (validate_signature): New function, just validates signature and
1367         sets GError.
1368         (parse_property, parse_arg): Invoke validate_signature.  Store
1369         signature instead of just type code.
1370
1371         * glib/dbus-gvalue.c (base_type_from_signature): New utility
1372         function to return a primary type for a signature, dropping
1373         information about types in container types.
1374         (dbus_gvalue_genmarshal_name_from_type)
1375         (dbus_gvalue_binding_type_from_type)
1376         (dbus_gvalue_ctype_from_type): Update to take full signature
1377          instead of type code.
1378         (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
1379
1380         * glib/dbus-gvalue.h: Update prototypes for above.
1381
1382         * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
1383         glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
1384         (introspect_properties, introspect_signals, write_interface):
1385         Update to handle signatures, and remove usage of
1386         _dbus_gutils_type_to_string.
1387         (handle_introspect): Print out type codes instead of e.g. "string"
1388         in hardcoded introspection XML; also use x_AS_STRING constants
1389         instead of hardcoding in string.
1390
1391         * glib/dbus-glib-tool.c (pretty_print): Handle signature change
1392         to string.  Remove usage of _dbus_gutils_type_to_string.
1393
1394         * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
1395
1396         * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
1397         deletion.
1398         
1399         * glib/dbus-binding-tool-glib.c (compute_marshaller)
1400         (compute_marshaller_name, generate_glue): Handle signature change
1401         to string.
1402         (write_formal_parameters, write_args_for_direction): Ditto, and
1403         remove FIXME.
1404
1405         * tools/dbus-tree-view.c (type_to_string): Delete.
1406         (info_set_func_text): Update to print full signatures.
1407
1408         * test/glib/test-service-glib.xml: Change types to new
1409         introspection format.
1410
1411 2005-02-26  Havoc Pennington  <hp@redhat.com>
1412
1413         * doc/TODO: remove the "guid" item
1414
1415         * test/glib/test-profile.c (no_bus_thread_func): use open_private
1416         (with_bus_thread_func): use open_private
1417
1418         * dbus/dbus-connection.c (dbus_connection_open_private): new
1419         function that works like the old dbus_connection_open()
1420         (dbus_connection_open): now returns an existing connection if
1421         possible
1422
1423         * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
1424         through the GUID to the transport
1425
1426         * dbus/dbus-server.c (_dbus_server_init_base): keep around the
1427         GUID in hex-encoded form.
1428
1429         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1430         pass GUID argument in to the transport
1431
1432         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
1433         guid argument
1434
1435         * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
1436
1437         * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
1438
1439 2005-02-25  Havoc Pennington  <hp@redhat.com>
1440
1441         * doc/dbus-specification.xml: document the GUID thing
1442
1443         * dbus/dbus-server.c (_dbus_server_init_base): initialize a
1444         globally unique ID for the server, and put a "guid=hexencoded"
1445         field in the address
1446
1447         * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
1448
1449         * dbus/dbus-message.c: ditto
1450
1451         * dbus/dbus-dataslot.c: ditto
1452
1453         * dbus/dbus-list.c: ditto
1454
1455         * dbus/dbus-internals.h: wait, just include
1456         dbus-threads-internal.h here
1457         
1458         * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
1459         use in main library
1460
1461         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
1462
1463 2005-02-24  Colin Walters  <walters@verbum.org>
1464
1465         * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
1466
1467 2005-02-24  John (J5) Palmieir  <johnp@redhat.com>
1468
1469         * glib/Makefile.am: added dbus-gobject.h to sources list
1470         so distcheck doesn't fail
1471         
1472 2005-02-24  Havoc Pennington  <hp@redhat.com>
1473
1474         * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
1475         you must disconnect before unref, since locking and other things
1476         are screwed up otherwise. Fix assorted other locking stuff.
1477
1478         * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
1479         fix compilation
1480
1481         * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
1482         into a private header and don't export from the library
1483
1484         * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
1485
1486 2005-02-24  Colin Walters  <walters@verbum.org>
1487         
1488         * dbus/dbus-signature.c: New file; implements various functions
1489         related to type signatures.  Includes an interator for parsing,
1490         validation functions.
1491         (dbus_type_is_basic): Moved here from
1492         dbus-marshal-basic.c:_dbus_type_is_basic.
1493         (dbus_type_is_container): Moved here from
1494         dbus-marshal-basic.c:_dbus_type_is_container.
1495
1496         All callers of _dbus_type_is_container and _dbus_type_is_basic
1497         updated, and include dbus-signature.h.
1498
1499         * dbus/dbus-signature.h: New file; prototypes for the above.
1500
1501         * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
1502         dbus-signature.h.
1503
1504         * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
1505         function factored out of _dbus_first_type_in_signature.
1506         (_dbus_first_type_in_signature_c_str): New function; returns first
1507         type code for a type signature character.
1508
1509         * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
1510         handle function moves.
1511
1512         * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
1513
1514         * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
1515         function; skips to next complete type in type signature.
1516         Implemented using previous skip_one_complete_type.  Now
1517         skip_one_complete_type just delegates to
1518         _dbus_type_signature_next.
1519
1520         * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
1521         to dbus-signature.c
1522         (_dbus_type_is_container): Ditto.
1523
1524         * doc/dbus-specification.xml: Update introspection sample to
1525         use real type signatures.
1526
1527         * dbus/dbus-test.h: Prototype signature test.
1528
1529         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
1530         signature tests.
1531
1532         * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
1533
1534 2005-02-23  John (J5) Palmieri  <johnp@redhat.com>
1535
1536         * python/dbus_bindings.pyx.in (PendingCall::get_reply):
1537         s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
1538
1539 2005-02-21  Colin Walters  <walters@verbum.org>
1540
1541         * dbus/dbus-test-main.c (main): Take optional specific test
1542         argument.
1543
1544         * dbus/dbus-test.c (run_test): New function, runs a test function
1545         with no data directory.
1546         (run_data_test): Like above, but takes data directory.
1547         (dbus_internal_do_not_use_run_tests): Take
1548         specific test argument.  Replace lots of cut n' paste code
1549         with run_test and run_data_test.
1550
1551         * dbus/dbus-test.h: Update prototype for
1552         dbus_internal_do_not_use_run_tests.
1553
1554 2005-02-20  Havoc Pennington  <hp@redhat.com>
1555
1556         Fix bugs reported by Daniel P. Berrange
1557         
1558         * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
1559         (protected_change_watch): new function
1560         (_dbus_server_toggle_watch, _dbus_server_remove_watch)
1561         (_dbus_server_add_watch): change to work like the
1562         dbus-connection.c equivalents; like those, probably kind of
1563         busted, but should at least mostly work for now
1564         (dbus_server_disconnect): drop the lock if we were already
1565         disconnected, patch from Daniel P. Berrange
1566
1567         * dbus/dbus-server.c (_dbus_server_toggle_timeout) 
1568         (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
1569         same stuff
1570
1571         * doc/TODO: todo about unscrewing this mess
1572
1573 2005-02-19  Colin Walters  <walters@verbum.org>
1574
1575         * glib/dbus-binding-tool-glib.c
1576         (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
1577
1578         * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
1579         as errno.h and sys/stat.h.
1580         (lose): New function, prints error with
1581         newline and exits.
1582         (lose_gerror): Similar, but takes GError for message.
1583         (main): Add --output argument to specify output file to write to,
1584         instead of always printing to stdout.  In this mode, determine
1585         timestamps on source files to see whether any are newer than the
1586         target file.  If not, exit.  Also convert a number of error
1587         messages to use lose (since it's shorter), and switch to using
1588         g_io_channel_shutdown.
1589
1590 2005-02-19  Havoc Pennington  <hp@redhat.com>
1591
1592         * glib/dbus-gobject.c
1593         (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
1594
1595         * glib/dbus-glib.c: fix doxygen warnings
1596
1597         * glib/dbus-gparser.c (parse_annotation): error if an annotation
1598         is found on an <arg>
1599
1600 2005-02-17  Colin Walters  <walters@verbum.org>
1601
1602         * glib/dbus-gobject.h: Don't export
1603         _dbus_glib_marshal_dbus_message_to_gvalue_array.
1604         
1605         * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
1606         (invoke_object_method): Handle it.
1607
1608         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1609         Handle rename.
1610         
1611 2005-02-17  Colin Walters  <walters@verbum.org>
1612
1613         * bus/.cvsignore, doc/.cvsignore
1614         * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
1615         Update.
1616
1617 2005-02-17  Colin Walters  <walters@verbum.org>
1618         
1619         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
1620         Rename to DBUS_SERVICE_DBUS.
1621         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
1622         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
1623         Change the value from "org.freedesktop.Local"
1624         to "org.freedesktop.DBus.Local".
1625         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
1626         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
1627         DBUS_INTERFACE_INTROSPECTABLE.
1628         Change the value from "org.freedesktop.Introspectable"
1629         to "org.freedesktop.DBus.Introspectable".
1630         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
1631         DBUS_INTERFACE_PROPERTIES.
1632         Change the value from "org.freedesktop.Properties"
1633         to "org.freedesktop.DBus.Properties".
1634         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
1635         DBUS_INTERFACE_PEER.
1636         Change the value from "org.freedesktop.Peer"
1637         to "org.freedesktop.DBus.Peer".
1638         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
1639         DBUS_INTERFACE_LOCAL.
1640         Change the value from "org.freedesktop.Local"
1641         to "org.freedesktop.DBus.Local".
1642
1643         All other users of those constants have been changed.
1644
1645         * bus/driver.c (bus_driver_handle_introspect): Use constants.
1646
1647         * glib/dbus-gobject.c (handle_introspect): Use constants.
1648
1649         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
1650
1651 2005-02-17  Colin Walters  <walters@verbum.org>
1652
1653         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
1654         (parse_node, parse_interface, parse_method, parse_signal)
1655         (parse_property, parse_annotation): Lose if we're currently in an
1656         annotation.
1657         (parse_annotation): New function.
1658         (parser_start_element, parser_end_element): Handle annotation.
1659         (parse_method, parse_interface): Remove support for c_name attribute,
1660         switch to annotations.
1661
1662         * glib/dbus-gidl.h (interface_info_get_binding_names)
1663         (method_info_get_binding_names)
1664         (interface_info_get_binding_name, method_info_get_binding_name)
1665         (interface_info_set_binding_name, method_info_set_binding_name):
1666         Remove.
1667         (interface_info_get_annotations, method_info_get_annotations)
1668         (interface_info_get_annotation, method_info_get_annotation)
1669         (interface_info_add_annotation, method_info_add_annotation):
1670         Prototype.
1671
1672         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
1673         for "bindings".
1674         (struct MethodInfo): Ditto.
1675         Straightfoward conversion of binding methods into annotation methods
1676         as prototyped.
1677
1678         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
1679
1680         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
1681
1682         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
1683         Use new annotation API.
1684
1685         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
1686         annotation element.
1687         
1688         * doc/dbus-specification.xml: Discuss introspection annotations,
1689         include list of well-known annotations.
1690
1691         * test/glib/test-service-glib.xml: Make validate against new DTD.
1692
1693 2005-02-17  Colin Walters  <walters@verbum.org>
1694
1695         This patch is based on initial work from
1696         Paul Kuliniewicz <kuliniew@purdue.edu>.
1697
1698         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
1699         initialization of GValue from dbus type to here.
1700         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
1701         for the "glib-genmarshal" program from a DBus type.
1702         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
1703         into the C name for it we use in the glib bindings.
1704         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
1705         glib C type (not GValue).
1706         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
1707
1708         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
1709         from dbus-gobject.c.
1710
1711         * glib/dbus-gutils.h: Prototype it.
1712
1713         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
1714         (marshal_dbus_message_to_g_marshaller): Use new shared function
1715         dbus_glib_marshal_dbus_message_to_gvalue_array.
1716
1717         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
1718         Will be changed once we have annotations.
1719
1720         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
1721         GStaticRWLock.  Callers updated.
1722         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
1723         (string_table_next): New function for iterating over zero-terminated
1724         string value array.
1725         (string_table_lookup): New function; retrieves specific entry in
1726         array.
1727         (get_method_data): New function; look up method data in object data chunk.
1728         (object_error_domain_prefix_from_object_info)
1729         (object_error_code_from_object_info): New functions, but not implemented yet.
1730         (method_interface_from_object_info): New function; retrieve interface name.
1731         (method_name_from_object_info): New function; retrieve method name.
1732         (method_arg_info_from_object_info): New function; retrieve argument data.
1733         (arg_iterate): New function; iterates over serialized argument data.
1734         (method_dir_signature_from_object_info): New function; returns a
1735         GString holding type signature for arguments for just one
1736         direction (input or output).
1737         (method_input_signature_from_object_info)
1738         (method_output_signature_from_object_info): New functions.
1739         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
1740         converts dbus message arguments into a GValue array.  Used for both
1741         signal handling and method invocation.
1742         (struct DBusGlibWriteIterfaceData): New utility structure.
1743         (write_interface): New function; generate introspection XML for
1744         an interface.
1745         (introspect_interfaces): New function; gathers all interface->methods,
1746         generates introspection XML for them.
1747         (handle_introspect): Invoke introspect_interfaces.
1748         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
1749         (lookup_object_and_method): New function; examines an incoming message
1750         and attempts to match it up (via interface, method name, and argument
1751         signature) with a known object and method.
1752         (gerror_domaincode_to_dbus_error_name): New function; converts a
1753         GError domain and code into a DBus error name.  Needs GError data
1754         added to object introspection to work well.
1755         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
1756         GError.
1757         (invoke_object_method): New function to invoke an object method
1758         looked up via lookup_object_and_method.  Parses the incoming
1759         message, turns it into a GValue array, then invokes the marshaller
1760         specified in the DBusGMethodInfo.  Creates a new message with
1761         either return values or error message as appropriate.
1762         (gobject_message_function): Invoke lookup_object_and_method and
1763         invoke_object_method.
1764
1765         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
1766         (enum DBusBindingOutputMode): New enum for binding output modes.
1767         (pretty_print): Print binding names.
1768         (dbus_binding_tool_error_quark): GError bits.
1769         (version): Fix typo.
1770         (main): Create GIOChannel for output.  Parse new --mode argument,
1771         possible values are "pretty-print", "glib-server", "glib-client".
1772         Use mode to invoke appropriate function.
1773         
1774         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
1775
1776         * glib/dbus-glib-tool.h: New header, just includes GError bits
1777         for now.
1778
1779         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
1780         maps binding style to name.
1781         (struct MethodInfo): Ditto.
1782         (get_hash_keys, get_hash_key): Utility function, returns keys for
1783         a GHashTable.
1784         (interface_info_new, method_info_new): Initialize bindings.
1785         (interface_info_unref, method_info_unref): Destroy bindings.
1786         (method_info_get_binding_names, method_info_get_binding_name)
1787         (interface_info_get_binding_names, interface_info_get_binding_name):
1788         Functions for retrieving binding names.
1789         (method_info_set_binding_name, interface_info_set_binding_name):
1790         Functions for setting binding names.
1791
1792         * glib/dbus-binding-tool-glib.h: New file, has prototypes
1793         for glib binding generation.
1794
1795         * glib/dbus-binding-tool-glib.c: New file, implements server-side
1796         and client-side glib glue generation.
1797
1798         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
1799         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
1800         dbus-glib-tool.h.
1801
1802         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
1803         of using GClosureMarshal directly.
1804         (struct DBusGObjectInfo): Add n_infos member.
1805
1806         * test/glib/test-service-glib.xml: New file; contains introspection data
1807         for MyTestObject used in test-service-glib.c.
1808
1809         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
1810         (my_object_do_nothing, my_object_increment, my_object_throw_error)
1811         (my_object_uppercase, my_object_many_args): New test methods.
1812         (main): Use dbus_g_object_class_install_info to include generated object
1813         info.
1814
1815         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
1816         as well as client-side bindings.
1817
1818         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
1819         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
1820         using both the dbus_gproxy stuff directly as well as the generated bindings.
1821
1822 2005-02-15  Havoc Pennington  <hp@redhat.com>
1823
1824         * dbus/dbus-connection.c (dbus_connection_dispatch): always
1825         complete a pending call, don't run filters first.
1826
1827         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
1828         dbus_pending_call_steal_reply
1829
1830         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
1831         _dbus_connection_block_pending_call
1832         (dbus_pending_call_get_reply): change to steal_reply and return a
1833         ref
1834
1835         * dbus/dbus-connection.c
1836         (dbus_connection_send_with_reply_and_block): port to work in terms
1837         of DBusPendingCall
1838         (_dbus_connection_block_pending_call): replace block_for_reply
1839         with this
1840
1841 2005-02-14  Havoc Pennington  <hp@redhat.com>
1842
1843         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
1844         properly handle looking up group information by name; fix 
1845         from j@bootlab.org
1846
1847 2005-02-13  Havoc Pennington  <hp@redhat.com>
1848
1849         * dbus/dbus-connection.c (dbus_connection_return_message) 
1850         (dbus_connection_borrow_message): hold dispatch lock while message
1851         is outstanding
1852         (_dbus_connection_block_for_reply): hold dispatch lock while we
1853         block for the reply, so nobody steals our reply
1854         (dbus_connection_pop_message): hold the dispatch lock while we
1855         pluck the message
1856
1857 2005-02-13  Havoc Pennington  <hp@redhat.com>
1858
1859         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
1860         (_dbus_connection_release_dispatch)
1861         (_dbus_connection_acquire_io_path)
1862         (_dbus_connection_release_io_path): make the mutex and condvar
1863         control access to the "acquired" flag. Drop the connection lock
1864         while waiting on the condvar. Hopefully these are baby steps in
1865         roughly the right direction.
1866
1867 2005-02-13  Havoc Pennington  <hp@redhat.com>
1868
1869         * dbus/dbus-connection.c: use separate mutexes for the condition
1870         variables; this is some kind of baseline for sanity, but the
1871         condition variables still aren't used correctly afaict
1872
1873 2005-02-13  Havoc Pennington  <hp@redhat.com>
1874
1875         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1876         fix a double-unlock
1877
1878         * dbus/dbus-connection.c
1879         (_dbus_connection_detach_pending_call_unlocked): add this
1880
1881         Initial semi-correct pass through to fix thread locking; there are
1882         still some issues with the condition variable paths I'm pretty
1883         sure
1884         
1885         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
1886         lock/unlock calls
1887
1888         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
1889         rename to add _unlocked
1890         (struct DBusConnection): move "dispatch_acquired" and
1891         "io_path_acquired" to use only one bit each.
1892         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
1893         (dbus_connection_set_watch_functions): hacky fix to reentrancy
1894         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
1895         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
1896         (_dbus_connection_remove_timeout) 
1897         (_dbus_connection_toggle_timeout): drop lock when calling out to
1898         user functions; done in a hacky/bad way.
1899         (_dbus_connection_send_and_unlock): add a missing unlock
1900         (_dbus_connection_block_for_reply): add a missing unlock
1901
1902         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
1903         drop lock in a hacky probably unsafe way to call out to user
1904         function
1905
1906 2005-02-12  Havoc Pennington  <hp@redhat.com>
1907
1908         * tools/dbus-tree-view.c (info_set_func_text): display more
1909         details on args
1910
1911         * bus/driver.c (bus_driver_handle_list_services): list the bus
1912         driver
1913
1914         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
1915
1916         * glib/dbus-gidl.c (signal_info_get_n_args): new function
1917         (method_info_get_n_args): new function
1918
1919 2005-02-12  Havoc Pennington  <hp@redhat.com>
1920
1921         * bus/driver.c (bus_driver_handle_introspect): add introspection
1922         for bus driver
1923
1924 2005-02-12  Havoc Pennington  <hp@redhat.com>
1925
1926         * bus/driver.c: put the signature of each bus driver method in the
1927         table of handlers and check it on incoming calls; this isn't
1928         really useful, but going to add introspect support in a minute.
1929
1930 2005-02-11  Joe Shaw  <joeshaw@novell.com>
1931
1932         * mono/Connection.cs: The unpredictability of finalizers in mono
1933         prevents us from deterministically disconnecting the filters from
1934         the Service class's finalizer, so move tracking of filters and
1935         matches here.  Add API for that.
1936
1937         * mono/Service.cs: Remove the code, add code which calls the
1938         methods now on the Connection class.
1939
1940 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
1941
1942         * python/dbus.py (class Sender): added to support dbus signals better
1943         (Bus::add_signal_receiver): added expand_args parameter which defaults
1944         to True.  When expand args is True the signal handler will pass the 
1945         message arguments as parameters to the signal handler.  If False
1946         revert to previous behavior where the signal handler must get the
1947         argument list from the message.  This is to help port applications
1948         like HAL that have a tendancy to send variable length argument lists.
1949         self._match_rule_to_receivers is now a dict of dicts.
1950         (Bus::remove_signal_receiver): pop handler off the dict intead of 
1951         removing it from a list
1952         (Bus::_signal_func): change signal handlers so that interface,
1953         signal_name, service, path and message are packed into a Sender
1954         object and that is passed to the handler.  If expand_args is True
1955         extract the args list from the message and append it to the parameter
1956         list
1957         
1958         * python/dbus_bindings.pyx.in (class Signature): added to support 
1959         signiature types
1960         (MessageIter::__init__): changed iteration limit to match D-BUS
1961         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
1962         STRUCT and VARIENT type support
1963         (MessageIter::python_value_to_dbus_sig): made recursive to support
1964         recursive types
1965         (MessageIter::append*): added Signature, dict, tuple 
1966         support
1967
1968         * python/examples/example-client.py: added examples of getting tuples
1969         and dicts
1970
1971         * python/examples/example-service.py: added examples of sending tuples
1972         and dicts
1973
1974         * python/examples/example-signal-recipient.py: Fixed to handle new
1975         signal callback format
1976
1977 2005-02-10  Havoc Pennington  <hp@redhat.com>
1978
1979         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
1980         (call dbus_g_proxy_add_signal)
1981
1982         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1983         escape the hostname
1984         (_dbus_server_new_for_domain_socket): escape the path
1985
1986         * dbus/dbus-address.c (dbus_address_escape_value): new
1987         (dbus_address_unescape_value): new
1988         (dbus_parse_address): unescape values
1989
1990         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
1991
1992         * doc/dbus-specification.xml: explain how to escape values in
1993         addresses
1994
1995 2005-02-10  Havoc Pennington  <hp@redhat.com>
1996
1997         * dbus/dbus-message-factory.c (generate_special): modify test to
1998         avoid using a non-basic dict key
1999
2000         * dbus/dbus-marshal-validate-util.c: add test for the below
2001
2002         * doc/dbus-specification.xml: require that dict keys are a basic
2003         type
2004
2005         * dbus/dbus-marshal-validate.c
2006         (_dbus_validate_signature_with_reason): require that dict key is a
2007         basic type
2008
2009 2005-02-10  Havoc Pennington  <hp@redhat.com>
2010
2011         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
2012         change to be _and_unlock instead of _unlocked
2013
2014         * dbus/dbus-connection.c
2015         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
2016         have no_update so we can find this bug quickly in future
2017
2018 2005-02-10  Havoc Pennington  <hp@redhat.com>
2019
2020         * dbus/dbus-message-util.c (verify_test_message): tests for string
2021         array
2022
2023         * dbus/dbus-message.c (dbus_message_append_args_valist): add
2024         support for arrays of string/signature/path
2025
2026 2005-02-10  Joe Shaw  <joeshaw@novell.com>
2027
2028         * dbus/dbus-connection.c
2029         (_dbus_connection_queue_received_message_link,
2030         _dbus_connection_message_sent): Add the path to
2031         the verbose output.
2032         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
2033         _dbus_connection_send_preallocated_unlocked(), updated the
2034         dispatch status, and unlocks.  Fixes a bug where certain
2035         situations (like a broken pipe) could cause a Disconnect message
2036         to not be sent, tricking the bus into thinking a service was still
2037         there when the process had quit.
2038         (_dbus_connection_send_preallocated): Call
2039         _dbus_connection_send_preallocated_and_unlock().
2040         (_dbus_connection_send_and_unlock): Added.  Calls
2041         _dbus_connection_send_preallocated_and_unlock().
2042         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
2043         (dbus_connection_send_with_reply): Update the dispatch status and
2044         unlock.
2045
2046         * mono/Service.cs (~Service): Added.  Removes the filter so that
2047         we don't get unmanaged code calling back into a GCed delegate.
2048         (RemoveFilter); Added.
2049
2050 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
2051
2052         * dbus/dbus-message.c (dbus_message_iter_open_container):
2053         - Removed check for iterator type being an array because
2054         get_arg_type does not work with writer iterators
2055         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
2056
2057 2005-02-07  Havoc Pennington  <hp@redhat.com>
2058
2059         * doc/dbus-specification.xml: some more language cleanups; add
2060         stuff about how to deal with invalid protocol and extension
2061         points; add _ to allowed chars in auth commands; add EXTENSION_
2062         auth command prefix
2063
2064 2005-02-06  Havoc Pennington  <hp@redhat.com>
2065
2066         * s/expected/required/ in a couple places for clarity
2067
2068 2005-02-07  Colin Walters  <walters@verbum.org>
2069
2070         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
2071         sender or proposed_recipient.
2072
2073 2005-02-06  Havoc Pennington  <hp@redhat.com>
2074
2075         * dbus/dbus-message-factory.c (generate_special): more tests
2076
2077         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
2078         array length that exceeds the maximum
2079
2080 2005-02-05  Havoc Pennington  <hp@redhat.com>
2081
2082         * dbus/dbus-message-factory.c (generate_special): more test cases,
2083         increasing coverage
2084
2085         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
2086         reason why a signature was invalid
2087
2088         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
2089         skip the length of the string before we look at it in validation
2090
2091         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
2092         equal_substring
2093
2094         * dbus/dbus-message.c (_dbus_message_loader_new): default
2095         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
2096
2097 2005-02-05  Havoc Pennington  <hp@redhat.com>
2098
2099         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
2100         if the signature of a variant was empty
2101         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
2102         struct with no element type)
2103
2104         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
2105         mangled messages to break things
2106
2107 2005-02-04  Havoc Pennington  <hp@redhat.com>
2108
2109         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
2110         g_quark_try_string() so it actually can return 0
2111         (dbus_g_proxy_connect_signal): ditto
2112
2113 2005-02-04  Havoc Pennington  <hp@redhat.com>
2114
2115         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
2116         bogus warning
2117         (tristring_from_message): assert cleanly on null path/interface
2118         (should not be possible though I decided later)
2119         (dbus_g_proxy_dispose): move proxy manager unregistration here
2120         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
2121         g_return_if_fail() checks
2122
2123 2005-02-04  Havoc Pennington  <hp@redhat.com>
2124
2125         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
2126
2127         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
2128         (with some minor changes)
2129
2130         * doc/dbus-specification.xml: add deprecated attribute to
2131         introspection format
2132
2133 2005-01-31  Havoc Pennington  <hp@redhat.com>
2134
2135         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
2136         think it's sort of right
2137
2138 2005-01-30  Havoc Pennington  <hp@redhat.com>
2139
2140         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
2141
2142 2005-01-30  Havoc Pennington  <hp@redhat.com>
2143
2144         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
2145
2146         * autogen.sh: change to autotools 1.9
2147
2148         * glib/dbus-gproxy.c: completely change how signals work
2149         (dbus_g_proxy_add_signal): new function to specify signature of a
2150         signal
2151         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
2152         and g_warning if the incoming message has the wrong signature.
2153
2154 2005-01-30  Havoc Pennington  <hp@redhat.com>
2155
2156         * tools/dbus-names-model.c (have_names_notify): fix this
2157
2158         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
2159         up the string array handling a bit 
2160
2161 2005-01-30  Havoc Pennington  <hp@redhat.com>
2162
2163         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
2164         (dbus_g_pending_call_cancel): new function
2165
2166         * dbus/dbus-glib.h: move GType decls for connection/message here;
2167         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
2168         here, just kind of rationalizing how we handle all that
2169
2170         * tools/dbus-names-model.c: new file for a tree model listing the
2171         services on a bus
2172
2173         * tools/dbus-tree-view.c (model_new): use proper typing on the
2174         model rows
2175
2176 2005-01-30  Havoc Pennington  <hp@redhat.com>
2177
2178         * glib/dbus-gmain.c: add a custom GSource back that just checks
2179         whether the message queue has anything in it; otherwise, there are 
2180         cases where we won't see messages in the queue since there was no 
2181         IO visible to the glib main loop
2182
2183         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
2184         increase default message timeout to 25 seconds
2185
2186 2005-01-30  Havoc Pennington  <hp@redhat.com>
2187
2188         * test/glib/test-profile.c (no_bus_stop_server): remove the
2189         warning about the g_warning that I just fixed
2190
2191         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
2192         custom source, seems to be a lot easier to understand and work
2193         better.
2194
2195 2005-01-30  Havoc Pennington  <hp@redhat.com>
2196
2197         I think this main loop thing is conceptually broken, but here are 
2198         some band aids. I'll maybe rewrite it in a minute.
2199         
2200         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
2201         custom GSource, so don't pass it in; confusing
2202         (gsource_server_finalize, gsource_connection_finalize): add
2203         finalize handlers that remove all the watches.  
2204
2205 2005-01-30  Havoc Pennington  <hp@redhat.com>
2206
2207         * glib/dbus-gobject.c (introspect_properties): fix the XML
2208         generated
2209
2210         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
2211         which effectively detects the use of freed messages
2212
2213         * glib/dbus-gobject.c (handle_introspect): modify and return the
2214         reply message instead of the incoming message
2215
2216         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
2217         gee, maybe it should SEND THE XML instead of just making a string
2218         and freeing it again ;-)
2219
2220         * tools/dbus-print-message.c (print_message): improve printing of
2221         messages
2222
2223         * configure.in: add debug-glib.service to the output
2224
2225 2005-01-30  Havoc Pennington  <hp@redhat.com>
2226
2227         dbus-viewer introspected and displayed the bus driver
2228         
2229         * dbus/dbus-object-tree.c 
2230         (object_tree_test_iteration): add tests for a handler registered on "/"
2231
2232         * dbus/dbus-object-tree.c
2233         (_dbus_decompose_path): fix to handle path "/" properly
2234         (run_decompose_tests): add tests for path decomposition
2235         
2236         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
2237         properly
2238
2239         * glib/dbus-gobject.c (handle_introspect): fix quotes
2240
2241         * test/glib/run-test.sh: support launching the bus, then running
2242         dbus-viewer
2243
2244         * test/glib/test-service-glib.c (main): put in a trivial gobject
2245         subclass and register it on the connection
2246
2247         * bus/driver.c (bus_driver_handle_introspect): implement
2248         introspection of the bus driver service
2249
2250         * dbus/dbus-protocol.h: add #defines for the XML namespace,
2251         identifiers, doctype decl
2252
2253         * bus/driver.c (bus_driver_handle_get_service_owner): handle
2254         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
2255         returning the service unchanged.
2256         (bus_driver_handle_message): remove old check for reply_serial in
2257         method calls, now the message type deals with that
2258         (bus_driver_handle_message): handle NULL interface
2259
2260         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
2261
2262         * glib/dbus-gloader-expat.c (description_load_from_string): allow
2263         -1 for len
2264
2265         * tools/dbus-viewer.c: add support for introspecting a service on
2266         a bus
2267
2268         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
2269         (dbus_g_pending_call_unref): add
2270
2271 2005-01-29  Havoc Pennington  <hp@redhat.com>
2272
2273         * tools/dbus-tree-view.c: add support for displaying properties.
2274         (run dbus-viewer with an introspect xml file as arg, then resize
2275         the window so the tree elements show up, not sure what that is)
2276
2277         * glib/dbus-gobject.c (handle_introspect): return
2278         org.freedesktop.Properties and org.freedesktop.Introspectable
2279         interfaces when we are introspected.
2280
2281         * doc/dbus-specification.xml: allow empty interface name when 
2282         Get/Set a property
2283
2284 2005-01-29  Havoc Pennington  <hp@redhat.com>
2285
2286         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
2287         though it uses glib, it could be extended for any binding in
2288         principle
2289
2290         * glib/dbus-gobject.c (gobject_message_function): change to the
2291         new way properties work
2292
2293         * dbus/dbus-protocol.h: add the new interfaces
2294
2295         * doc/dbus-specification.xml: document the introspection format,
2296         Introspectable interface, and add an org.freedesktop.Properties
2297         interface.
2298
2299         * glib/dbus-gparser.c: add support for a <property> element
2300
2301         * glib/dbus-gidl.c: add PropertyInfo
2302
2303         * glib/dbus-gobject.c (handle_introspect): put the outermost
2304         <node> outside the signal and property descriptions.
2305         (introspect_properties): export properties as <property> rather
2306         than as method calls
2307
2308 2005-01-28  Havoc Pennington  <hp@redhat.com>
2309
2310         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
2311         related to authentication protocol
2312
2313 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
2314
2315         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
2316                 - BUS_ACTIVATION -> BUS_STARTER
2317                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
2318                 - class MessageIter (__init__): Added recursion checking 
2319                 so we throw a nice error instead of just disconnecting from the
2320                 bus.
2321                 (get): Added arg_type parameter for recursion.
2322                 Removed the nil type
2323                 Added signiture type placeholder (not implemented)
2324                 Added struct type placeholder (not implemented)
2325                 Added varient type placeholder (not implemented)
2326                 Commented out dict type for now     
2327                 (get_element_type): renamed from get_array_type
2328                 (get_*): changed to use the dbus_message_iter_get_basic API
2329                 (get_*_array): removed in favor of recursive get_array method
2330                 (get_array): new recursive method which calls get to marshal
2331                 the elements of the array
2332                 (value_to_dbus_sig): New method returns the corrasponding
2333                 dbus signiture to a python value
2334                 (append): Comment out dict handling for now
2335                 Handle lists with the new recursive API
2336                 Comment out None handling for now
2337                 (append_nil): removed
2338                 (append_*): changed to use dbus_message_iter_append_basic API
2339                 (append_*_array): removed in favor of recursive append_array 
2340                 method
2341                 (__str__): Make it easier to print out recursive iterators
2342                 for debugging
2343                 - class Message (__str__): moved type inspection to the
2344                 MessageIter class' __str__ method
2345                 (get_iter): Added an append parameter wich defaults to False
2346                 If True use the new API's to create an append iterator
2347
2348         * python/dbus.py: Update to use new bindings API
2349                 - TYPE_ACTIVATION -> TYPE_STARTER
2350                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
2351                 - class ActivationBus -> class StarterBus
2352                 - class RemoteObject (__call__): get an append iterator
2353                 - (_dispatch_dbus_method_call): get an append iterator
2354                 - class Object (emit_signal): get an append iterator
2355
2356         * python/examples/: Fixed up the examples to work with the new API
2357                 
2358 2005-01-28  Joe Shaw  <joeshaw@novell.com>
2359
2360         * configure.in: Bump version up to 0.30.
2361
2362         * HACKING: Add a release item to bump the version number up after 
2363         a release.
2364
2365 2005-01-28  Havoc Pennington  <hp@redhat.com>
2366
2367         * doc/dbus-specification.xml: update to describe 16-bit types and
2368         dict entries
2369
2370         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
2371         assertion
2372
2373         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
2374         type
2375
2376         * dbus/dbus-marshal-recursive.c: implement
2377
2378 2005-01-27  Havoc Pennington  <hp@redhat.com>
2379
2380         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
2381
2382         * configure.in: find the right type for 16 and 32 bit ints as well
2383         as 64
2384
2385         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
2386         the 16-bit types so people don't have to stuff them in 32-bit or
2387         byte arrays.
2388
2389 2005-01-27  Havoc Pennington  <hp@redhat.com>
2390
2391         * dbus/dbus-message.c: byteswap the message if you init an
2392         iterator to read/write from it
2393         
2394         * dbus/dbus-marshal-byteswap.c: new file implementing 
2395         _dbus_marshal_byteswap()
2396
2397         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
2398
2399 2005-01-26  Havoc Pennington  <hp@redhat.com>
2400         
2401         * dbus/dbus-marshal-validate-util.c: break this out (and fix
2402         build, apparently - nobody noticed?)
2403         
2404 2005-01-26  Havoc Pennington  <hp@redhat.com>
2405
2406         * dbus/dbus-marshal-recursive.h: remove todo comment
2407
2408 2005-01-25  Joe Shaw  <joeshaw@novell.com>
2409
2410         * Land the mono binding changes to conform to the new APIs.
2411
2412         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
2413         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
2414
2415         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
2416         type code as a string.
2417         (InitAppending): Rename dbus_message_append_iter_init() to
2418         dbus_message_iter_init_append().
2419
2420         * mono/BusDriver.cs: Rename ServiceEventHandler to
2421         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
2422         Rename ServiceOwnerChanged to NameOwnerChanged.
2423
2424         * mono/Connection.cs: Rename BaseService to UniqueName, and the
2425         underlying C call.
2426
2427         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
2428
2429         * mono/Service.cs: Rename Exists to HasOwner, internally rename
2430         dbus_bus_acquire_service() to dbus_bus_request_name().
2431
2432         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
2433         of Type.UnderlyingSystemType to get the correct element type for
2434         the array.
2435         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
2436         dbus_message_get_{element|arg}_type() instead of
2437         dbus_message_iter_init_array_iterator().
2438         (Append): Replace dbus_message_iter_append_array() with
2439         dbus_message_iter_open_container() and
2440         dbus_message_iter_close_container().
2441
2442         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
2443         types have been removed.
2444         
2445         * mono/DBusType/*.cs: Replace calls of
2446         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
2447         but specify the type in the DllImport extern declaration.  Ditto
2448         for dbus_message_iter_append_[type]() ->
2449         dbus_message_iter_append_basic().
2450
2451         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
2452         NameOwnerChangedHandler.
2453
2454 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
2455
2456         * python/dbus_bindings.pyx.in: Rename of methods and bindings
2457                 - get_base_service -> get_unique_name
2458                 - bus_get_base_service -> bus_get_unique_name
2459                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
2460                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
2461                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
2462                 - bus_activate_service -> bus_start_service_by_name
2463                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
2464                 - bus_acquire_service -> bus_request_name
2465                 - dbus_bus_acquire_service -> dbus_bus_request_name
2466                 - bus_service_exists -> bus_name_has_owner
2467                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
2468
2469         * python/dbus.py: Rename of methods
2470                 - activate_service -> start_service_by_name
2471                 - bus_acquire_service -> bus_request_name
2472                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
2473                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
2474
2475         
2476 2005-01-24  Joe Shaw  <joeshaw@novell.com>
2477
2478         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
2479         signature for the method that can't be found.
2480
2481         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
2482         the message has any arguments, we need to call
2483         _dbus_type_reader_get_current_type(), not
2484         _dbus_type_reader_has_next().
2485
2486 2005-01-24  Havoc Pennington  <hp@redhat.com>
2487
2488         * dbus/dbus-message-factory.c: more testing of message validation
2489
2490         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
2491         header
2492
2493 2005-01-23  Havoc Pennington  <hp@redhat.com>
2494
2495         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
2496         get this all working, not many tests in the framework yet though
2497
2498 2005-01-22  Havoc Pennington  <hp@redhat.com>
2499
2500         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
2501         tutorial, based on work from David Wheeler.
2502
2503 2005-01-21  Havoc Pennington  <hp@redhat.com>
2504
2505         * dbus/dbus-bus.c: add more return_if_fail checks
2506
2507         * dbus/dbus-message.c (load_message): have the "no validation"
2508         mode (have to edit the code to toggle the mode for now though)
2509
2510         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
2511         skips all validation; I want to use this at least for benchmark
2512         baseline, I'm not sure if it should be a publicly-available switch.
2513
2514 2005-01-21  Havoc Pennington  <hp@redhat.com>
2515
2516         * glib/dbus-gmain.c: don't put the GLib bindings in the same
2517         toplevel doxygen group as the low-level API stuff
2518
2519         * dbus/dbus.h: note that libdbus is the low-level API
2520
2521 2005-01-20  Havoc Pennington  <hp@redhat.com>
2522
2523         * update-dbus-docs.sh: script to update docs on the web site, only
2524         works for me though. neener.
2525
2526 2005-01-20  Havoc Pennington  <hp@redhat.com>
2527
2528         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
2529         code can reveal bugs in it
2530
2531 2005-01-20  Havoc Pennington  <hp@redhat.com>
2532
2533         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
2534         select() version, patches from Tor Lillqvist
2535
2536 2005-01-20  Havoc Pennington  <hp@redhat.com>
2537
2538         * doc/dbus-tutorial.xml: replace > with &gt;
2539
2540         * bus/services.c (bus_registry_acquire_service): validate the name
2541         and return a better error if it's no good.
2542
2543         * doc/dbus-specification.xml: note NO_AUTO_START change
2544
2545         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
2546         from AUTO_START, we're toggling the default
2547
2548         * bus/dispatch.c: adapt the tests to change of auto-start default
2549
2550 2005-01-18  Havoc Pennington  <hp@redhat.com>
2551
2552         * rename dbus-daemon-1 to dbus-daemon throughout
2553
2554 2005-01-18  Havoc Pennington  <hp@redhat.com>
2555
2556         * Throughout, grand renaming to strip out the use of "service",
2557         just say "name" instead (or "bus name" when ambiguous).  Did not
2558         change the internal code of the message bus itself, only the
2559         programmer-facing API and messages.
2560         
2561         * doc/dbus-specification.xml: further update the message bus section
2562         
2563         * bus/config-parser.c (all_are_equiv): fix bug using freed string
2564         in error case
2565
2566 2005-01-17  Havoc Pennington  <hp@redhat.com>
2567
2568         * dbus/dbus-types.h: remove 16-bit types since we don't use them
2569         ever
2570
2571         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
2572         "invalid name character" not only non-ASCII
2573
2574         * doc/dbus-specification.xml: further update spec, message bus 
2575         parts are still out-of-date but the marshaling etc. stuff is now
2576         accurate-ish
2577
2578 2005-01-17  Havoc Pennington  <hp@redhat.com>
2579
2580         * doc/dbus-specification.xml: partially update spec
2581
2582 2005-01-17  Havoc Pennington  <hp@redhat.com>
2583
2584         * Throughout, align variant bodies according to the contained
2585         type, rather than always to 8. Should save a fair bit of space in
2586         message headers.
2587         
2588         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
2589         fix handling of case where p == end
2590
2591         * doc/TODO: remove the dbus_bool_t item and variant alignment items
2592
2593 2005-01-17  Havoc Pennington  <hp@redhat.com>
2594
2595         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
2596
2597         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
2598         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
2599         are marshaling/unmarshaling a boolean.
2600
2601 2005-01-16  Havoc Pennington  <hp@redhat.com>
2602
2603         This is about it on what can be disabled/deleted from libdbus
2604         easily, back below 150K anyhow. Deeper cuts are more work than 
2605         just turning the code off as I've done here.
2606         
2607         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
2608         signed int convenience funcs
2609
2610         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
2611         verbose mode
2612
2613         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
2614         things out of libdbus
2615
2616         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
2617         
2618         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
2619         tests-enabled-only, though it should probably be deleted)
2620
2621         * dbus/dbus-message-util.c: same stuff
2622
2623         * dbus/dbus-auth-util.c: same stuff
2624
2625 2005-01-16  Havoc Pennington  <hp@redhat.com>
2626
2627         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
2628
2629         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
2630         way for stripping down dbus-userdb.c stuff included in libdbus.
2631         Rename _dbus_parse_uid for consistency.
2632
2633 2005-01-16  Havoc Pennington  <hp@redhat.com>
2634
2635         * dbus/dbus-internals.c (_dbus_real_assert): print the function
2636         name the assertion failed in
2637
2638         * dbus/dbus-internals.h (_dbus_return_if_fail) 
2639         (_dbus_return_val_if_fail): assert that the name of the function
2640         containing the check doesn't start with '_', since we only want to 
2641         use checks on public functions
2642         
2643         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
2644         checks to assertions
2645
2646         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
2647         change checks to asserts for private function
2648
2649         * dbus/dbus-message.c (_dbus_message_set_serial): checks
2650         to asserts for private function
2651
2652         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
2653         broken assertion that was breaking make check
2654         (_dbus_type_reader_array_is_empty): remove this rather than fix
2655         it, was only used in assertions
2656
2657 2005-01-16  Havoc Pennington  <hp@redhat.com>
2658
2659         * test/unused-code-gc.py: hacky script to find code that's used
2660         only by the bus (not libdbus) or used only by tests or not used at
2661         all. It has some false alarms, but looks like we can clean up a
2662         lot of size from libdbus.
2663
2664         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
2665         dbus/Makefile.am: initially move 10K of binary size out of libdbus
2666         
2667 2005-01-16  Havoc Pennington  <hp@redhat.com>
2668
2669         * Add and fix docs according to Doxygen warnings throughout
2670         source.
2671         
2672         * dbus/dbus-marshal-recursive.c
2673         (_dbus_type_reader_array_is_empty): change this to just call
2674         array_reader_get_array_len() and make it static
2675
2676         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
2677         from get_array_type
2678         (dbus_message_iter_init_append): rename from append_iter_init
2679
2680         * dbus/dbus-marshal-recursive.c
2681         (_dbus_type_reader_get_element_type): rename from
2682         _dbus_type_reader_get_array_type
2683
2684 2005-01-15  Havoc Pennington  <hp@redhat.com>
2685
2686         * test/glib/test-profile.c (with_bus_server_filter): fix crash
2687
2688         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
2689         when DBUS_DISABLE_ASSERT
2690         (_dbus_marshal_set_basic): be sure we align for the string length
2691
2692         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
2693         this look faster
2694
2695         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
2696         inline macro version
2697         (_dbus_string_set_byte): provide inline macro version
2698
2699 2005-01-15  Havoc Pennington  <hp@redhat.com>
2700
2701         * Land the new message args API and type system.
2702
2703         This patch is huge, but the public API change is not 
2704         really large. The set of D-BUS types has changed somewhat, 
2705         and the arg "getters" are more geared toward language bindings;
2706         they don't make a copy, etc.
2707
2708         There are also some known issues. See these emails for details
2709         on this huge patch:
2710         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
2711         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
2712         
2713         * dbus/dbus-marshal-*: all the new stuff
2714
2715         * dbus/dbus-message.c: basically rewritten
2716
2717         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
2718         freed blocks to be all non-nul bytes so using freed memory is less
2719         likely to work right
2720
2721         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
2722         DBUS_FAIL_MALLOC=N environment variable, so you can do
2723         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
2724         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
2725         thorough.
2726
2727         * qt/message.cpp: port to the new message args API
2728         (operator<<): use str.utf8() rather than str.unicode()
2729         (pretty sure this is right from the Qt docs?)
2730
2731         * glib/dbus-gvalue.c: port to the new message args API
2732
2733         * bus/dispatch.c, bus/driver.c: port to the new message args API
2734
2735         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
2736         "locked" flag to TRUE and align_offset to 0; I guess we never
2737         looked at these anyhow, but seems cleaner.
2738
2739         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
2740         move allocation padding macro to this header; use it to implement
2741         (_DBUS_STRING_STATIC): ability to declare a static string.
2742
2743         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
2744         change to return TRUE if the interface is not set.
2745
2746         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
2747         to dbus-marshal-validate.[hc]
2748
2749         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
2750         dbus-internals.c
2751
2752         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
2753         to dbus-marshal-*.[hc]
2754
2755         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
2756         function here from dbus-marshal.c
2757
2758 2005-01-12  Joe Shaw  <joeshaw@novell.com>
2759
2760         * NEWS: Update for 0.23.
2761
2762         * configure.in: Release 0.23.
2763
2764 2005-01-12  Joe Shaw  <joeshaw@novell.com>
2765
2766         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
2767         dbus DLL with --debug.  Clean up after the .mdb files this leaves
2768         behind.
2769
2770         * mono/doc/Makefile.am: Need to uninstall the docs on "make
2771         uninstall"
2772
2773         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
2774         is an enum, get the enum's underlying type.  Another mono
2775         1.1.3 fix.
2776
2777 2005-01-11  Joe Shaw  <joeshaw@novell.com>
2778
2779         Patch from Sjoerd Simons <sjoerd@luon.net>
2780
2781         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
2782         DESTDIR.  It breaks stuff.
2783
2784 2005-01-11  Joe Shaw  <joeshaw@novell.com>
2785
2786         Patch from Tambet Ingo <tambet@ximian.com>
2787
2788         * mono/DBusType/Array.cs (Get): Get the underlying element type by
2789         calling type.GetElementType().  The code previously depended on
2790         broken Mono behavior, which was fixed in Mono 1.1.3.
2791
2792         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
2793         Activator.CreateInstance() so that the class's constructor is
2794         called with the right parameters.
2795
2796 2005-01-11  Joe Shaw  <joeshaw@novell.com>
2797
2798         Patch from Timo Teräs <ext-timo.teras@nokia.com>
2799
2800         * dbus/dbus-connection.c
2801         (_dbus_connection_queue_received_message_link): Call
2802         _dbus_connection_remove_timeout() instead of the _locked()
2803         variant, since it's always called from
2804         _dbus_connection_handle_watch(), which handles the locking.
2805         Removed the _locked() variant since it's no longer used.
2806
2807 2005-01-03  Havoc Pennington  <hp@redhat.com>
2808
2809         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
2810         return
2811         
2812 2004-12-26  Havoc Pennington  <hp@redhat.com>
2813
2814         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
2815
2816 2005-01-03  Havoc Pennington  <hp@redhat.com>
2817
2818         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
2819         floating point
2820
2821         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
2822
2823 2005-01-02  Havoc Pennington  <hp@redhat.com>
2824
2825         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
2826
2827 2005-01-01  Havoc Pennington  <hp@redhat.com>
2828
2829         * configure.in: add -Wfloat-equal
2830
2831 2005-01-01  Havoc Pennington  <hp@redhat.com>
2832
2833         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
2834         for a variety of reasons '==' doesn't do this.
2835
2836 2004-12-31  Havoc Pennington  <hp@redhat.com>
2837
2838         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
2839         I keep wishing I had
2840
2841 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
2842
2843         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
2844
2845 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
2846
2847         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
2848         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
2849         dbus-protocol.h.  Because they are defines and not enums they are not
2850         autogenerated.
2851
2852 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
2853
2854         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
2855         dbus_bus_activate_service
2856
2857         * python/dbus.py (Bus.activate_service): activate a service on the
2858         bus.
2859
2860 2004-12-24  Havoc Pennington  <hp@redhat.com>
2861
2862         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
2863         file format has also changed and I haven't adapted to that yet
2864         
2865         * Makefile.am: load .gcno files from latest gcc
2866
2867 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
2868         * Patch from Rob Taylor <robtaylor@fastmail.fm>
2869
2870         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
2871         lowlevel binding
2872
2873         * python/dbus.py (get_unix_user): Added binding to 
2874         call dbus_bindings.bus_get_unix_user
2875
2876         * python/extract.py: Modified the proto_pat regex to
2877         handle unsigned long
2878
2879 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2880
2881         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
2882         better POSIX compliance.
2883
2884 2004-12-19  Havoc Pennington  <hp@redhat.com>
2885
2886         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
2887         (_dbus_string_insert_8_aligned): new functions
2888
2889         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
2890
2891 2004-12-18  Havoc Pennington  <hp@redhat.com>
2892
2893         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
2894         macro
2895
2896         * dbus/dbus-message.c: fix a comment, and add a still-unused
2897         not-implemented function
2898
2899         * dbus/dbus-marshal.h: fix comment
2900
2901         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
2902
2903 2004-12-17  Joe Shaw  <joeshaw@novell.com>
2904
2905         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
2906         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
2907         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
2908         Type.UnderlyingSystemType to get the actual system type
2909         underneath.  This code previously depended on the broken Mono
2910         behavior, which was fixed in 1.1.3.
2911
2912 2004-11-27  Havoc Pennington  <hp@redhat.com>
2913
2914         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
2915         are disabled
2916         (_dbus_string_get_const_data): inline when asserts are disabled
2917
2918         * dbus/dbus-message.c: record the _dbus_current_generation of
2919         creation so we can complain if dbus_shutdown() is used improperly.
2920         Do this only if checks are enabled.
2921
2922         * dbus/dbus-connection.c: ditto
2923         
2924 2004-11-26  Havoc Pennington  <hp@redhat.com>
2925
2926         * test/glib/test-profile.c: add with_bus mode to profile echoes
2927         that go through the bus.
2928
2929         * test/glib/run-test.sh: add ability to run test-profile
2930
2931         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
2932         config file reload.
2933
2934 2004-11-26  Havoc Pennington  <hp@redhat.com>
2935
2936         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
2937         thing was implemented
2938
2939 2004-11-26  Havoc Pennington  <hp@redhat.com>
2940
2941         * test/glib/test-profile.c: tweak a bit, add support for some
2942         made-up minimal malloc overhead with plain sockets, since in 
2943         real life some sort of buffers are unavoidable thus we could 
2944         count them in the theoretical best case
2945
2946 2004-11-26  Havoc Pennington  <hp@redhat.com>
2947
2948         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
2949         where I was trying to cache one too many messages
2950
2951 2004-11-26  Havoc Pennington  <hp@redhat.com>
2952
2953         * dbus/dbus-message.c: reimplement message cache as an array which 
2954         makes the cache about twice as fast and saves maybe 1.5% overall
2955
2956 2004-11-26  Havoc Pennington  <hp@redhat.com>
2957
2958         * dbus/dbus-threads.c (init_global_locks): forgot to put the
2959         message cache lock here
2960
2961 2004-11-26  Havoc Pennington  <hp@redhat.com>
2962
2963         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
2964         the "char byte_order" next to each other to save 4 bytes
2965         (dbus_message_new_empty_header): reduce preallocation, since the
2966         message cache should achieve a similar effect
2967         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
2968         message cache that keeps a few DBusMessage around in a pool,
2969         another 8% speedup or so.
2970
2971         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
2972
2973 2004-11-25  Havoc Pennington  <hp@redhat.com>
2974
2975         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
2976         to write, without reading or blocking, try it before the poll()
2977         and skip the poll() if nothing remains to write. This is about a
2978         3% speedup in the echo client/server
2979
2980 2004-11-25  Havoc Pennington  <hp@redhat.com>
2981
2982         The primary change here is to always write() once before adding
2983         the write watch, which gives us about a 10% performance increase.
2984         
2985         * dbus/dbus-transport-unix.c: a number of modifications to cope
2986         with removing messages_pending
2987         (check_write_watch): properly handle
2988         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
2989         messages_pending stuff
2990         (check_read_watch): properly handle WAITING_FOR_MEMORY and
2991         AUTHENTICATED cases
2992         (unix_handle_watch): after writing, see if the write watch can be
2993         removed
2994         (unix_do_iteration): assert that write_watch/read_watch are
2995         non-NULL rather than testing that they aren't, since they 
2996         aren't allowed to be NULL. check_write_watch() at the end so 
2997         we add the watch if we did not finish writing (e.g. got EAGAIN)
2998
2999         * dbus/dbus-transport-protected.h: remove messages_pending call,
3000         since it resulted in too much inefficient watch adding/removing; 
3001         instead we now require that the transport user does an iteration 
3002         after queueing outgoing messages, and after trying the first
3003         write() we add a write watch if we got EAGAIN or exceeded our 
3004         max bytes to write per iteration setting
3005
3006         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
3007         function
3008
3009         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
3010         freed and then accessed, valgrind flagged this bug, fix it
3011
3012         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
3013         as the last valid field plus 1, where really it is equal to the
3014         last valid field. Corrects some message corruption issues.
3015
3016         * dbus/dbus-mainloop.c: verbosity changes
3017
3018         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
3019         instead of aborting in one of the test codepaths
3020
3021         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
3022         caused not printing the pid ever again if a verbose was missing
3023         the newline at the end
3024         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
3025
3026         * dbus/dbus-connection.c: verbosity changes; 
3027         (dbus_connection_has_messages_to_send): new function
3028         (_dbus_connection_message_sent): no longer call transport->messages_pending
3029         (_dbus_connection_send_preallocated_unlocked): do one iteration to
3030         try to write() immediately, so we can avoid the write watch. This
3031         is the core purpose of this patchset
3032         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
3033         dump the outgoing message queue, so nobody will get confused
3034         trying to send them or thinking stuff is pending to be sent
3035
3036         * bus/test.c: verbosity changes
3037
3038         * bus/driver.c: verbosity/assertion changes
3039
3040         * bus/dispatch.c: a bunch of little tweaks to get it working again
3041         because this patchset changes when/where you need to block.
3042
3043 2004-11-23  Havoc Pennington  <hp@redhat.com>
3044
3045         * test/glib/test-profile.c: modify to accept a plain_sockets
3046         argument in which case it will bench plain sockets instead of
3047         libdbus, for comparison purposes.
3048
3049 2004-11-22  Havoc Pennington  <hp@redhat.com>
3050
3051         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
3052         threads for more time, so sysprof can get a grip on it.
3053
3054         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
3055         pointless variable
3056
3057 2004-11-13  Havoc Pennington  <hp@redhat.com>
3058
3059         * test/glib/test-profile.c: fix this thing up a bit
3060
3061         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
3062         preallocation sizes by a fair bit; not sure if this will be an
3063         overall performance win or not, but it does reduce reallocs.
3064
3065         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
3066         the test hack that forced constant realloc if asserts are
3067         disabled, so we can profile sanely. Sprinkle in some
3068         _DBUS_UNLIKELY() which are probably pointless, but before I
3069         noticed the real performance problem I put them in.
3070         (_dbus_string_validate_utf8): micro-optimize this thing a little
3071         bit, though callgrind says it didn't help; then special-case
3072         ascii, which did help a lot; then be sure we detect nul bytes as
3073         invalid, which is a bugfix.
3074         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
3075         superstition; use memset to nul the padding instead of a manual
3076         loop.
3077         (_dbus_string_get_length): inline this as a
3078         macro; it showed up in the profile because it's used for loop
3079         tests and so forth
3080
3081 2004-11-10  Colin Walters  <walters@verbum.org>
3082
3083         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
3084         for extra paranoia.
3085
3086 2004-11-09  Colin Walters  <walters@verbum.org>
3087
3088         * dbus/dbus-string.c (_dbus_string_get_length): New
3089         function, writes DBusString to C buffer.
3090
3091         * dbus/dbus-string.h: Prototype it.
3092
3093         * dbus/dbus-message.c (dbus_message_type_to_string): New
3094         function, converts message type into C string.
3095
3096         * dbus/dbus-message.h: Prototype it.
3097
3098         * bus/selinux.c (bus_selinux_check): Take source pid,
3099         target pid, and audit data.  Pass audit data to
3100         avc_has_perm.
3101         (log_audit_callback): New function, appends extra
3102         audit information.
3103         (bus_selinux_allows_acquire_service): Also take
3104         service name, add it to audit data.
3105         (bus_selinux_allows_send): Also take message
3106         type, interface, method member, error name,
3107         and destination, and add them to audit data.
3108         (log_cb): Initialize func_audit.
3109         
3110         * bus/selinux.h (bus_selinux_allows_acquire_service)
3111         (bus_selinux_allows_send): Update prototypes 
3112
3113         * bus/services.c (bus_registry_acquire_service): Pass
3114         service name to bus_selinux_allows_acquire_service.
3115
3116         * bus/bus.c (bus_context_check_security_policy): Pass
3117         additional audit data.  Move assignment of dest
3118         to its own line.
3119
3120 2004-11-07  Colin Walters  <walters@verbum.org>
3121
3122         * dbus/dbus-transport-unix.c (do_authentication): Always
3123         initialize auth_completed.
3124         
3125 2004-11-07  Colin Walters  <walters@verbum.org>
3126
3127         * bus/bus.c (load_config): Break into three
3128         separate functions: process_config_first_time_only,
3129         process_config_every_time, and process_config_postinit.
3130         (process_config_every_time): Move call of
3131         bus_registry_set_service_context_table into
3132         process_config_postinit.
3133         (process_config_postinit): New function, does
3134         any processing that needs to happen late
3135         in initialization (and also on reload).
3136         (bus_context_new): Instead of calling load_config,
3137         open config parser here and call process_config_first_time_only
3138         and process_config_every_time directly.  Later, after
3139         we have forked but before changing UID,
3140         invoke bus_selinux_full_init, and then call
3141         process_config_postinit.
3142         (bus_context_reload_config): As in bus_context_new,
3143         load parse file inside here, and call process_config_every_time
3144         and process_config_postinit.
3145
3146         * bus/services.h, bus/services.c
3147         (bus_registry_set_service_context_table): Rename
3148         from bus_registry_set_sid_table.  Take string hash from config
3149         parser, and convert them here into SIDs.
3150
3151         * bus/config-parser.c (struct BusConfigParser): Have
3152         config parser only store a mapping of service->context
3153         string.
3154         (merge_service_context_hash): New function.
3155         (merge_included): Merge context string hashes instead
3156         of using bus_selinux_id_table_union.
3157         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
3158         simply create a new string hash.
3159         (bus_config_parser_unref): Unref it.
3160         (start_selinux_child): Simply insert strings into hash,
3161         don't call bus_selinux_id_table_copy_over.
3162
3163         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
3164         (bus_selinux_id_table_copy_over): Delete.
3165
3166 2004-11-03  Colin Walters  <walters@verbum.org>
3167
3168         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
3169         variables.
3170         
3171 2004-11-03  Colin Walters  <walters@verbum.org>
3172
3173         * bus/test-main.c (test_pre_hook): Fix test logic,
3174         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
3175
3176 2004-11-02  Colin Walters  <walters@redhat.com>
3177
3178         * bus/selinux.c (bus_selinux_init): Split into two functions,
3179         bus_selinux_pre_init and bus_selinux_post_init.
3180         (bus_selinux_pre_init): Just determine whether SELinux is
3181         enabled.
3182         (bus_selinux_post_init): Do everything else.
3183
3184         * bus/main.c (main): Call bus_selinux_pre_init before parsing
3185         config file, and bus_selinux_post_init after.  This ensures that
3186         we don't lose the policyreload notification thread that
3187         bus_selinux_init created before forking previously.
3188         
3189         * bus/test-main.c (test_pre_hook): Update for split.
3190
3191 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
3192
3193         Patch from Johan Fischer <linux@fischaz.com>
3194         
3195         * mono/doc/Makefile.am (install-data-local): Added directory
3196         install for DESTDIR
3197
3198 2004-10-29  Colin Walters  <walters@redhat.com>
3199
3200         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
3201         parameter for fd to write pid to.       
3202
3203         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
3204         
3205         * bus/bus.c (bus_context_new): Pass print_pid_fd
3206         to _dbus_become_daemon (bug #1720)
3207
3208 2004-10-29  Colin Walters  <walters@redhat.com>
3209
3210         Patch from Ed Catmur <ed@catmur.co.uk>
3211
3212         * mono/doc/Makefile.am (install-data-local): Handle
3213         DESTDIR.
3214
3215 2004-10-29  Colin Walters  <walters@redhat.com>
3216
3217         * bus/.cvsignore, qt/.cvsignore: Update.
3218
3219 2004-10-29  Colin Walters  <walters@redhat.com>
3220
3221         Patch from Kristof Vansant <de_lupus@pandora.be>
3222
3223         * configure.in: Detect Slackware.
3224         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
3225         * bus/rc.messagebus.in: New file.
3226
3227 2004-10-29  Colin Walters  <walters@redhat.com>
3228
3229         * tools/dbus-monitor.c (filter_func): Return
3230         DBUS_HANDLER_RESULT_HANDLED in filter function
3231         for now.  See:
3232         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
3233
3234 2004-10-29  Colin Walters  <walters@redhat.com>
3235
3236         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
3237
3238         * bus/services.c (bus_registry_acquire_service): 
3239         Correctly retrieve service name from DBusString
3240         for printing.
3241
3242 2004-10-29  Colin Walters  <walters@redhat.com>
3243
3244         * dbus/dbus-glib.h: Update documentation to not
3245         refer to internal APIs.
3246
3247 2004-10-27  Joe Shaw  <joeshaw@novell.com>
3248
3249         * mono/Arguments.cs (GetDBusTypeConstructor):
3250         type.UnderlyingSystemType will return "System.Byte" if you do it
3251         on "byte[]", which is not what we want.  So check the type.IsArray
3252         property and use System.Array instead.
3253
3254 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
3255
3256         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
3257         the DBusUserInfo structure since this is passed into the function.
3258         This would cause a double free when the function that allocated
3259         the structure would try to free it when an error occured.
3260
3261         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
3262         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
3263         for service activation to avoid 32bit/64bit parallel install issues
3264
3265 2004-10-21  Colin Walters  <walters@verbum.org>
3266
3267         * AUTHORS: Fix my email address, the @gnu.org one
3268         has been bouncing for some time.  Also add J5.
3269         
3270 2004-10-21  Colin Walters  <walters@verbum.org>
3271
3272         * dbus/dbus-transport-unix.c (do_authentication): Return
3273         authentication status to callers.
3274         (unix_handle_watch): If we completed authentication this round,
3275         don't do another read.  Instead wait until the next iteration,
3276         after we've read any pending data in the auth buffer.
3277         (unix_do_iteration): Ditto.
3278         (unix_handle_watch): Updated for new do_authentication prototype.
3279
3280 2004-10-18  Colin Walters  <walters@verbum.org>
3281
3282         * bus/selinux.c (bus_selinux_enabled): Handle
3283         --disable-selinux case.
3284         
3285 2004-10-18  Colin Walters  <walters@verbum.org>
3286
3287         * bus/selinux.h: Add bus_selinux_enabled.
3288         
3289         * bus/selinux.c (bus_selinux_enabled): Implement it.
3290         
3291         * bus/config-parser.c (struct include): Add
3292         if_selinux_enabled member.
3293         (start_busconfig_child): Parse if_selinux_enabled
3294         attribute for include.
3295         (bus_config_parser_content): Handle it.
3296
3297         * bus/session.conf.in, bus/system.conf.in: Add
3298         inclusion of context mapping to default config files;
3299         conditional on SELinux being enabled.
3300         
3301         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
3302         
3303         * test/data/invalid-config-files/badselinux-1.conf, 
3304         test/data/invalid-config-files/badselinux-2.conf:
3305         Test files for bad syntax.
3306         
3307 2004-10-17  Colin Walters  <walters@verbum.org>
3308
3309         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
3310         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
3311         format specifier mismatches.
3312
3313 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3314
3315         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
3316         format string.
3317
3318         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
3319         pointer (bug #1540, Leonardo Boiko).
3320
3321 2004-09-28  Jon Trowbridge  <trow@ximian.com>
3322
3323         * mono/BusDriver.cs: Changed BusDriver struct to remove
3324         the ServiceCreated and ServiceDeleted events and replace them
3325         with the new ServiceOwnerChanged event.
3326
3327         * mono/example/BusListener.cs: Added a new example program,
3328         which listens for and reports any ServiceOwnerChanged events
3329         on the bus driver.
3330
3331         * mono/example/Makefile.am (DESTDIR): Build changes for the
3332         new BusListener.cs example.
3333
3334 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3335
3336         * bus/signals.c (bus_match_rule_parse): validate the components of
3337         match rules (bug #1439).
3338
3339         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
3340
3341 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3342
3343         * doc/dbus-specification.xml: document ServiceOwnerChanged
3344         signal.
3345         
3346         * bus/driver.c, bus/driver.h, bus/services.c: Use
3347         ServiceOwnerChanged signal instead of ServiceCreated and
3348         ServiceDeleted.
3349         
3350         * bus/dispatch.c: update testcase for the new signal.
3351
3352 2004-09-20  Jon Trowbridge  <trow@ximian.com>
3353
3354         Patch from Nat Friedman <nat@novell.com>
3355
3356         * mono/Makefile.am: A number of small build fixes to allow "make
3357         distcheck" to succeed.
3358
3359         * mono/example/Makefile.am: "make distcheck" fixes.
3360
3361         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
3362         key in @srcdir@.
3363
3364         * test/Makefile.am: "make distcheck" fixes.
3365
3366 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3367
3368         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
3369
3370         * doc/busconfig.dtd: update the DTD for the at_console attribute.
3371
3372         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
3373         messages after the first one (bug #1389).
3374         
3375         * bus/dispatch.c (check_double_hello_message): add a test case for
3376         the double hello message bug.
3377         (check_existent_service_activation): fix check of spawning error.
3378         
3379 2004-09-16  David Zeuthen  <david@fubar.dk>
3380
3381         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
3382
3383 2004-09-12  David Zeuthen  <david@fubar.dk>
3384
3385         Patch from Kay Sievers <kay.sievers@vrfy.org>
3386
3387         * bus/bus.c (bus_context_new):
3388         * bus/bus.h:
3389         * bus/main.c (usage)
3390         (main):
3391         Add commandline option --nofork to override configuration file
3392         setting.
3393
3394 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3395
3396         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
3397         compilers don't like it (bug #974).
3398
3399 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
3400
3401         * qt/connection.*: Applied patch by Jérôme Lodewyck
3402         <lodewyck@clipper.ens.fr> to integrate an existing
3403         connection into the Qt eventloop
3404
3405 2004-08-30  Jon Trowbridge  <trow@ximian.com>
3406
3407         * mono/BusDriver.cs: Added.  This is a class for interacting with
3408         the org.freedesktop.DBus service.
3409
3410         * mono/Message.cs: Added a mechanism to expose the message that is
3411         currently being dispatched via the static Message.Current
3412         property.  Added Message.Sender and Message.Destination
3413         properties.
3414
3415         * mono/Handler.cs: Expose the dispatched message via
3416         Message.Current when handling method calls.
3417
3418         * mono/Service.cs: Expose the dispatched message via
3419         Message.Current when handling signal emissions.
3420         
3421         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
3422         Connection.BaseService property.
3423
3424 2004-08-28  Havoc Pennington  <hp@redhat.com>
3425
3426         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
3427
3428         More fixes from Steve Grubb
3429         
3430         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
3431         (_dbus_listen_tcp_socket): fix fd leak
3432
3433         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
3434         EINTR to a bit lower in the code
3435
3436 2004-08-26  Jon Trowbridge  <trow@ximian.com>
3437
3438         * bus/driver.c (bus_driver_handle_service_exists): Respond with
3439         TRUE if we are inquiring about the existence of the built-in
3440         org.freedesktop.DBus service.
3441
3442 2004-08-25  John Palmieri  <johnp@redhat.com>
3443         * bus/config-parser.c:
3444         (struct PolicyType): Add POLICY_CONSOLE
3445         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
3446         (start_busconfig_child): Sets up console element when
3447         <policy at_console=""> is encountered in a policy file
3448         (append_rule_from_element): Convert console elements to console
3449         rules.
3450
3451         * bus/policy.c: 
3452         (bus_policy_create_client_policy): Add console rules to the client
3453         policy based on if the client is at the console
3454         (bus_policy_append_console_rule): New function for adding a
3455         console rule to a policy
3456         (bus_policy_merge): Handle console rule merging
3457
3458         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
3459         where we check for console user files
3460         
3461         * dbus/dbus-sysdeps.c:
3462         (_dbus_file_exists): New function which checks if the given
3463         file exists
3464         (_dbus_user_at_console): New function which does the system
3465         specific process of checking if the user is at the console
3466
3467         * dbus/dbus-userdb.c:
3468         (_dbus_is_console_user): New function converts a UID to user name
3469         and then calls the system specific _dbus_user_at_console to 
3470         see if the user is at the console and therefor a console user
3471
3472 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3473
3474         * bus/config-parser.c (set_limit):
3475         * bus/dbus-daemon-1.1.in:
3476         * test/data/valid-config-files/many-rules.conf: set the
3477         max_match_rules_per_connection limt from the config file. 
3478
3479         * doc/busconfig.dtd: update the DTD.
3480
3481         * bus/driver.c: remove some unused variables.
3482
3483 2004-08-24  Mikael Hallendal  <micke@imendio.com>
3484
3485         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
3486         it's been replaced by dbus_g_bus_get
3487
3488 2004-08-23  Colin Walters  <walters@redhat.com>
3489
3490         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
3491
3492         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
3493
3494         * bus/selinux.c: Create a thread for policy reload notification.
3495         (bus_selinux_get_policy_root): Implement.
3496
3497         * bus/config-parser.c (start_busconfig_child)
3498         (bus_config_parser_content): Support SELinux-root relative
3499         inclusion.
3500
3501         * configure.in <HAVE_SELINUX>: Add -lpthread.
3502         
3503         * bus/test-main.c (test_pre_hook, test_post_hook): New.
3504         (test_post_hook): Move memory checking into here.
3505         (test_pre_hook, test_post_hook): Move SELinux checks in
3506         here, but conditional on a DBUS_TEST_SELINUX environment
3507         variable.  Unfortunately we can't run the SELinux checks
3508         as a normal user, since they won't have any permissions
3509         for /selinux.  So this will have to be tested manually
3510         for now, until we have virtualization for most of
3511         libselinux.
3512         
3513 2004-08-23  Havoc Pennington  <hp@redhat.com>
3514
3515         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
3516         drop supplementary groups, suggested by Steve Grubb
3517
3518 2004-08-20  Colin Walters  <walters@redhat.com>
3519
3520         * bus/config-parser.c (start_busconfig_child): Remove some unused
3521         variables.
3522         
3523         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
3524         warning.
3525
3526 2004-08-17  Joe Shaw  <joeshaw@novell.com>
3527
3528         * configure.in: If --enable-mono is passed in, if we can't find
3529         mono error out.
3530
3531         * mono/Makefile.am: Use /gacutil to install assemblies into the
3532         GAC and not /root.
3533
3534 2004-08-12  Havoc Pennington  <hp@redhat.com>
3535
3536         * NEWS: update for 0.22
3537
3538         * configure.in: release 0.22
3539
3540 2004-08-11  Colin Walters  <walters@redhat.com>
3541
3542         * tools/dbus-send.c (main, usage): Add --reply-timeout
3543         argument.
3544
3545 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3546
3547         * bus/bus.c (process_config_first_time_only): get rid of an unused
3548         DBusError that was causing a memoy leak (bug #989).
3549
3550         * dbus/dbus-keyring.c, dbus/dbus-message.c:
3551         fix compilation on Solaris/Forte C (bug #974)
3552
3553         * bus/main.c (main): plug two minuscule memleaks.
3554
3555 2004-08-10  Havoc Pennington  <hp@redhat.com>
3556
3557         * doc/dbus-tutorial.xml: add some more info on GLib bindings
3558
3559 2004-08-09  Havoc Pennington  <hp@redhat.com>
3560
3561         * COPYING: switch to Academic Free License version 2.1 instead of
3562         2.0, to resolve complaints about patent termination clause.
3563
3564 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
3565
3566         * README: added documentation for the --enable-python 
3567         configure switch.
3568
3569 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3570
3571         * bus/config-parser.c (bus_config_parser_new): fix an invalid
3572         _unref in the SELinux support.
3573
3574         * doc/busconfig.dtd: update DTD for SELinux support.
3575
3576         * bus/config-loader-libxml.c: fix error handler and parser
3577         initialisation/cleanup. OOM test now works with libxml2 HEAD.
3578
3579         * configure.in: remove the warning about libxml2.
3580
3581         * dbus/dbus-bus.c: silence doxygen warning.
3582
3583 2004-07-31  Colin Walters  <walters@redhat.com>
3584
3585         * configure.in: Move #error in SELinux check to its own line.
3586
3587 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3588
3589         * dbus/dbus-internals.h (_DBUS_SET_OOM):
3590         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
3591         dbus_error_set.
3592
3593         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
3594         broken by the change in the _SET_OOM macros.
3595
3596 2004-07-31  Colin Walters  <walters@redhat.com>
3597
3598         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
3599         BUS_SET_OOM.
3600
3601 2004-07-31  Colin Walters  <walters@redhat.com>
3602
3603         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
3604         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
3605         AC_MSG_CHECKING.
3606
3607 2004-07-24  Havoc Pennington  <hp@redhat.com>
3608
3609         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
3610
3611         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
3612         functionality
3613
3614         * configure.in: add --enable-selinux
3615         
3616         * bus/policy.c (bus_policy_merge): add FIXME to a comment
3617
3618         * bus/main.c (main): initialize and shut down selinux
3619
3620         * bus/connection.c: store SELinux ID on each connection, to avoid 
3621         repeated getting of the string context and converting it into 
3622         an ID
3623
3624         * bus/bus.c (bus_context_get_policy): new accessor, though it
3625         isn't used
3626         (bus_context_check_security_policy): check whether the security
3627         context of sender connection can send to the security context of
3628         recipient connection
3629
3630         * bus/config-parser.c: add parsing for <selinux> and <associate>
3631         
3632         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
3633         implement dbus_connection_get_unix_fd()
3634
3635         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
3636         function, used by the selinux stuff
3637         
3638 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3639
3640         * bus/config-loader-libxml.c: complete the implementation of
3641         libxml backend for config file loader. Doesn't work with full OOM
3642         test yet. 
3643         
3644         * configure.in: change error when selecting libxml into a warning.
3645         
3646         * test/data/invalid-config-files: add two non-well-formed XML
3647         files. 
3648         
3649         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
3650         
3651         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
3652         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
3653         be necessary to read all the buffer. (bug #894)
3654
3655         * bus/activation.c (bus_activation_activate_service): fix a
3656         potential assertion failure (bug #896). Small optimization in the
3657         case of auto-activation messages.
3658
3659         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
3660         add test case for byte-through-vararg bug (#901). patch by Kimmo
3661         Hämäläinen. 
3662
3663 2004-07-28  Anders Carlsson  <andersca@gnome.org>
3664
3665         * python/dbus.py:
3666         * python/dbus_bindings.pyx.in:
3667         Add dbus.init_gthreads (), allow emit_signal to pass
3668         arguments to the signal.
3669         
3670 2004-07-24  Havoc Pennington  <hp@redhat.com>
3671
3672         * AUTHORS: add some people, not really comprehensively, let me
3673         know if I missed you
3674
3675 2004-07-24  Havoc Pennington  <hp@redhat.com>
3676
3677         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
3678         Owen
3679
3680         * test/Makefile.am (DIST_SUBDIRS): here also
3681
3682 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3683
3684         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
3685         breaking build on Solaris, reported by Farhad Saberi on the ML.
3686
3687         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
3688         va_arg invocation to account for integer promotion in the case of
3689         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
3690
3691         * bus/services.c (bus_service_remove_owner): fix bug #902, use
3692         _dbus_list_get_first_link, not _dbus_list_get_first.
3693
3694         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
3695
3696         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
3697         handler functions so that the asserts in _dbus_object_subtree_unref
3698         do not fail.
3699
3700         * dbus/dbus-transport-unix.c (do_reading):
3701         _dbus_transport_queue_messages return value is of type
3702         dbus_bool_t, not DBusDispatchStatus.
3703         
3704 2004-07-19  David Zeuthen  <david@fubar.dk>
3705
3706         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
3707
3708         * bus/dispatch.c:
3709         (check_get_connection_unix_user): Debug says GetProperty; but the
3710         method is called GetConnectionUnixUser
3711         (check_get_connection_unix_process_id): New function
3712         (bus_dispatch_test): Actually call check_get_connection_unix_user();
3713         also call check_get_connection_unix_process_id()
3714         
3715         * bus/driver.c:
3716         (bus_driver_handle_get_connection_unix_process_id): New function,
3717         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
3718         interface
3719         
3720         * dbus/dbus-auth.c:
3721         (handle_server_data_external_mech): Set pid from the credentials
3722         obtained from the socket
3723         
3724         * dbus/dbus-connection.c:
3725         (dbus_connection_get_unix_process_id): New function
3726         
3727         * dbus/dbus-connection.h: 
3728         Add prototype for dbus_connection_get_unix_process_id
3729         
3730         * dbus/dbus-transport.c:
3731         (_dbus_transport_get_unix_process_id): New function
3732         
3733         * dbus/dbus-transport.h:
3734         Add prototype for _dbus_transport_get_unix_process_id
3735         
3736 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3737
3738         * dbus/dbus-message.c: Message counter fix, patch by Christian
3739         Hammond <chipx86@gnupdate.org>
3740
3741 2004-07-18  Seth Nickell  <seth@gnome.org>
3742
3743         * python/dbus.py:
3744         * python/dbus_bindings.pyx.in:
3745         * python/tests/test-client.py:
3746
3747         Add dbus.ByteArray and dbus_bindings.ByteArray
3748         types so that byte streams can be passed back.
3749
3750         Give jdahlin the heaps of credit that are so
3751         rightfully his.
3752         
3753 2004-07-12  Seth Nickell  <seth@gnome.org>
3754
3755         * python/dbus.py:
3756
3757         Add message argument to the default object_method_handler
3758         function.
3759         
3760         * python/dbus_bindings.pyx.in:
3761
3762         Automatically return NIL when passed an empty list
3763         (we can't pass back a list since lists are typed
3764         and we don't have any idea what type the the client
3765         intended the list to be... :-( )
3766         
3767 2004-07-10  Seth Nickell  <seth@gnome.org>
3768
3769         * python/examples/Makefile.am:
3770
3771         Fix distcheck breakage caused by new examples.
3772
3773 2004-07-10  Seth Nickell  <seth@gnome.org>
3774
3775         * python/dbus.py:
3776
3777         Add "message" argument to service-side dbus.Object
3778         methods. This will break existing services written
3779         using the python bindings, but will allow extraction
3780         of all the message information (e.g. who its from).
3781
3782         Add improved "object oriented" signal handling/emission.
3783         
3784         * python/examples/example-service.py:
3785
3786         Nix this example.
3787         
3788         * python/examples/example-signal-emitter.py:
3789         * python/examples/example-signal-recipient.py:
3790
3791         Two new examples that show how to emit and receive
3792         signals using the new APIs.
3793         
3794         * python/examples/example-signals.py:
3795         * python/examples/gconf-proxy-service.py:
3796         * python/examples/gconf-proxy-service2.py:
3797
3798         Add "message" argument to service methods.
3799
3800 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
3801
3802         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
3803         * dbus/bus.c (dbus_bus_get_unix_user)
3804         * doc/dbus-specification.xml: implement GetConnectionUnixUser
3805         method of org.freedesktop.DBus interface.
3806
3807         * bus/dispatch.c: test case
3808
3809 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
3810
3811         * python/Makefile.am: switched include directory from glib/ to dbus/
3812         since dbus-glib.h moved
3813  
3814 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3815
3816         * configure.in: prevent building the gcj stuff and libxml loader
3817         since they are broken.
3818
3819 2004-06-20  Havoc Pennington  <hp@redhat.com>
3820
3821         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
3822         codes from the dbus error names
3823         
3824         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
3825         as dbus/dbus-glib.h and that breakage is now visible due to 
3826         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
3827         
3828         * glib/dbus-glib.h: s/gproxy/g_proxy/
3829
3830         * dbus/dbus-shared.h: new header to hold stuff shared with
3831         binding APIs
3832         
3833         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
3834         than dbus-errors.h
3835
3836         * glib/dbus-glib.h (dbus_set_g_error): move to
3837         dbus-glib-lowlevel.h
3838
3839         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
3840         of stuff to enable this
3841
3842         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
3843
3844         * a bunch of other changes with the same basic "separate glib 
3845         bindings from dbus.h" theme
3846         
3847 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
3848
3849         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
3850
3851         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
3852
3853 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3854
3855         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
3856         the reply value of the ServiceExists message.
3857
3858 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
3859
3860         * python/dbus_bindings.pyx.in: No longer need to parse path
3861         elements and pass them as arrays of strings.  The C API now
3862         accepts plain path strings.
3863         (_build_parsed_path): removed 
3864
3865 2004-06-07  Havoc Pennington  <hp@redhat.com>
3866
3867         * doc/TODO: remove auto-activation item since it's done; sort
3868         items by importance/milestone
3869
3870 2004-06-07  Havoc Pennington  <hp@redhat.com>
3871
3872         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
3873         random signature when using REQUIRED_FIELDS (this hack won't work
3874         in the long term)
3875
3876         * dbus/dbus-message.c: change the signature to be a header field,
3877         instead of message->signature special-case string. Incremental
3878         step forward. Then we can fix up code to send the signature in the
3879         message, then fix up code to validate said signature, then fix up
3880         code to not put the typecodes inline, etc.
3881         (load_one_message): don't make up the signature after the fact
3882         (decode_header_data): require signature field for the known
3883         message types
3884
3885         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
3886
3887         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
3888
3889 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
3890
3891         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
3892
3893         * mono/Handler.cs: Updated to follow new path argument for
3894         (un-)registering objects.
3895
3896         * mono/example/Makefile.am:
3897         * mono/Makefile.am:
3898         * configure.in: Bumped required version for mono and use new -pkg
3899         syntax for deps
3900
3901 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3902
3903         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
3904         registration functions take the path argument as char* instead of
3905         char**.
3906
3907         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
3908         split off the path decompostion part of
3909         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
3910         warnings. 
3911
3912         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
3913         
3914 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
3915  
3916         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
3917         machine approach.  A state is implemented as a function that
3918         handles incoming events as specified for that state.
3919         
3920         * doc/dbus-specification.xml: Update auth protocol state machine
3921         specification to match implementation.  Remove some leftover
3922         base64 examples.
3923
3924 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
3925
3926         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
3927         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
3928         quiet doxygen.
3929
3930         * Doxyfile.in: remove deprecated options.
3931
3932         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
3933         glib/test-thread.h, glib/test-thread-client.c,
3934         glib/test-thread-server.c, glib/test-profile.c,
3935         glib/test-dbus-glib.c: remove these unused files.
3936
3937 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3938
3939         * dbus/dbus-object-tree.c
3940         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
3941         non-fallback handlers (bug #684).
3942         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
3943         (find_subtree_recurse): report wether the returned subtree is an
3944         exact match or a "fallback" match higher up in the tree.
3945         (object_tree_test_iteration): update test case.
3946
3947 2004-06-01  Seth Nickell  <seth@gnome.org>
3948
3949         * python/dbus_bindings.pyx.in:
3950         * python/tests/test-client.py:
3951
3952         Round off basic type support. Add dicts (yay!), and 
3953         remaining array types.
3954
3955         Make MessageIter more general so it works for dicts too.
3956
3957         Mark all loop variables as C integers.
3958         
3959 2004-05-31  Havoc Pennington  <hp@redhat.com>
3960
3961         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
3962         "in" before "out"
3963
3964         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
3965
3966         * glib/dbus-glib-tool.c (main): set up to have a --self-test
3967         option that runs the tests, and start filling in some code
3968         including for starters just dumping the interfaces to stdout
3969
3970         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
3971
3972         * test/data/valid-introspection-files/lots-of-types.xml: test of
3973         an example introspection file
3974
3975         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
3976         "node" (I think...)
3977
3978 2004-05-31  Seth Nickell  <seth@gnome.org>
3979
3980         * python/dbus_bindings.pyx.in:
3981         * python/tests/test-client.py:
3982
3983         Test Suite: 1
3984         Python Bindings: 0
3985
3986         Fix string array memory trashing bug... oops...
3987
3988 2004-05-30  Seth Nickell  <seth@gnome.org>
3989
3990         * python/dbus.py:
3991
3992         Add a nicer-but-less-flexible alternate API for handling 
3993         calls to virtual objects in dbus.ObjectTree.
3994
3995         Screw up the argument order to the dbus.Object constructor
3996         for consistency with dbus.ObjectTree (and to make dbus_methods
3997         optional for future extension)
3998         
3999         * python/examples/Makefile.am:
4000         * python/examples/gconf-proxy-service.py:
4001         * python/examples/gconf-proxy-service2.py:
4002
4003         Alternate implementation of gconf-proxy-service using the
4004         nicer dbus.ObjectTree API.
4005         
4006         * python/examples/example-service.py:
4007         * python/tests/test-server.py
4008
4009         Reverse the argument order to deal with dbus.Object constructor
4010         changes.
4011         
4012 2004-05-30  Seth Nickell  <seth@gnome.org>
4013
4014         * python/examples/example-client.py:
4015         * python/examples/example-service.py:
4016
4017         Take it back. Lists seem to work but they're broken
4018         in the test suite. Make the base examples use
4019         lists (works fine).
4020
4021 2004-05-30  Seth Nickell  <seth@gnome.org>
4022
4023         * python/dbus_bindings.pyx.in:
4024         * python/tests/test-client.py:
4025
4026         Add some more tests and fix errors that crop up.
4027         Unfortunately, currently it seems like marshalling
4028         and unmarshalling of lists is completely broken :-(
4029
4030 2004-05-30  Seth Nickell  <seth@gnome.org>
4031
4032         * python/dbus_bindings.pyx.in:
4033
4034         Add support for ObjectPath type.
4035
4036         * python/dbus.py:
4037
4038         Refactor message handling code to a common function.
4039         
4040         * python/tests/test-client.py:
4041         * python/tests/test-server.py:
4042
4043         Add tests that check to make sure values of all types
4044         can be echoed from a service w/o mangling.
4045         
4046 2004-05-29  Seth Nickell  <seth@gnome.org>
4047
4048         * python/dbus.py:
4049
4050         Add ObjectTree class which allows implementation
4051         of trees of "virtual" objects. Basically the python
4052         wrapper for "register_fallback".
4053         
4054         * python/examples/Makefile.am
4055         * python/examples/gconf-proxy-client.py:
4056         * python/examples/gconf-proxy-service.py:
4057
4058         Implement a simple GConf proxy service that supports
4059         get/set on string and int GConf keys using the ObjectTree.
4060         
4061 2004-05-29  Seth Nickell  <seth@gnome.org>
4062
4063         * python/dbus.py:
4064         * python/examples/example-client.py:
4065         * python/examples/example-service.py:
4066         * python/examples/list-system-services.py:
4067
4068         Add SessionBus, SystemBus and ActivationBus classes
4069         so you don't need to know the special little BUS_TYPE
4070         flag.
4071         
4072 2004-05-29  Havoc Pennington  <hp@redhat.com>
4073
4074         * bus/config-parser.c (process_test_valid_subdir): temporarily
4075         stop testing config parser OOM handling, since expat has issues
4076         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
4077
4078         * bus/dbus-daemon-1.1.in: change requested_reply to
4079         send_requested_reply/receive_requested_reply so we can send the
4080         replies, not just receive them.
4081
4082         * bus/config-parser.c: parse the new
4083         send_requested_reply/receive_requested_reply
4084
4085         * bus/policy.c (bus_client_policy_check_can_send): add
4086         requested_reply argument and use it
4087
4088         * bus/bus.c (bus_context_check_security_policy): pass through
4089         requested_reply status to message send check
4090
4091         * bus/system.conf.in: adapt to requested_reply change
4092         
4093 2004-05-28  Havoc Pennington  <hp@redhat.com>
4094
4095         * test/glib/test-service-glib.c (main): remove unused variable
4096
4097         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
4098
4099         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
4100         from the enum, no longer in use.
4101
4102         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
4103         works right.
4104
4105         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
4106         whether error_name passed in is a valid error name.
4107
4108 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
4109
4110         * dbus/dbus-message.c (dbus_message_get_args): Added support for
4111         OBJECT_PATH and OBJECT_PATH_ARRAY
4112
4113 2004-05-28  Seth Nickell  <seth@gnome.org>
4114
4115         * python/examples/Makefile.am:
4116
4117         Forget to add Makefile.am. Do not pass go.
4118
4119 2004-05-28  Michael Meeks  <michael@ximian.com>
4120
4121         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
4122         fix no int64 case.
4123
4124         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
4125
4126         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
4127         (_dbus_message_iter_get_basic_type_array): impl.
4128         drastically simplify ~all relevant _get methods to use these.
4129         (_dbus_message_iter_append_basic_array),
4130         (dbus_message_iter_append_basic): impl
4131         drastically simplify ~all relevant _append methods to use these.
4132
4133         * dbus/dbus-message-builder.c (parse_basic_type) 
4134         (parse_basic_array, lookup_basic_type): impl.
4135         (_dbus_message_data_load): prune scads of duplicate /
4136         cut & paste coding.
4137
4138         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
4139         (_dbus_demarshal_basic_type): implement,
4140         (demarshal_and_validate_len/arg): beef up debug.
4141         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
4142
4143 2004-05-27  Seth Nickell  <seth@gnome.org>
4144
4145         * configure.in:
4146         * python/Makefile.am:
4147
4148         Include the example python apps in the tarball.
4149         
4150         * python/examples/list-system-services.py
4151
4152         Add a python new example that fetches the list of services
4153         from the system bus.
4154         
4155 2004-05-27  Seth Nickell  <seth@gnome.org>
4156
4157         * python/dbus.py:
4158         * python/dbus_bindings.pyx.in:
4159
4160         Fix failure to notify that a signal was not handled,
4161         resulted in hung functions.
4162         
4163 2004-05-25  Colin Walters  <walters@redhat.com>
4164
4165         * tools/dbus-monitor.c (main): Monitor all types of messages.
4166
4167 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
4168
4169         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
4170         which unregisters the object path and disposes the handler.
4171
4172 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
4173  
4174         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
4175          
4176         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
4177         operands to && so we call dbus_message_iter_next () for the last
4178         argument also.
4179
4180 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4181
4182         * dbus/dbus-object-tree.c
4183         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
4184         children even if the requested path isn't registered.
4185         (object_tree_test_iteration): test object_tree_list_registered.
4186
4187         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
4188         it to 0.
4189         
4190 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
4191
4192         * doc/TODO: Remove resolved items.
4193
4194         * bus/expirelist.h (struct BusExpireList): remove unused n_items
4195         field.
4196         
4197         * bus/connection.c (bus_connections_expect_reply): Enforce the
4198         per-connection limit on pending replies.
4199         
4200         Patch from Jon Trowbridge <trow@ximian.com>:
4201  
4202         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
4203         up a watch that triggers a config reload when one end of the pipe
4204         becomes readable.
4205         (signal_handler): Instead of doing the config reload in our SIGHUP
4206         handler, just write to the reload pipe and let the associated
4207         watch handle the reload when control returns to the main loop.
4208  
4209         * bus/driver.c (bus_driver_handle_reload_config): Added.
4210         Implements a ReloadConfig method for requesting a configuration
4211         file reload via the bus driver.
4212  
4213 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
4214
4215         * HACKING: Updated release instructions concerning the wiki page.
4216
4217 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
4218
4219         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
4220         filter against auth->allowed_mechs; we only add allowed mechs in
4221         record_mechanisms().
4222  
4223         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
4224         ALLOWED_MECHS to auth-script format so we can set the list of
4225         allowed mechanisms.
4226  
4227         * data/auth/client-out-of-mechanisms.auth-script: New test to
4228         check client disconnects when it is out of mechanisms to try.
4229  
4230         * dbus/dbus-auth.c (process_command): Remove check for lines
4231         longer that 1 MB; we only buffer up maximum 16 kB.
4232  
4233         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4234         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
4235         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
4236         assume there might be unused bytes.
4237  
4238         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
4239         client-out-of-mechs, it is handled in process_reject(). Move check
4240         for max failures to send_rejected(), as it's a server-only thing.
4241
4242         * dbus/dbus-auth.c: Factor out protocol reply code into functions
4243         send_auth(), send_data(), send_rejected(), send_error(),
4244         send_ok(), send_begin() and send_cancel().
4245
4246 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
4247
4248         Remove base64 encoding, replace with hex encoding. Original patch
4249         from trow@ximian.com, added error handling.
4250
4251         * dbus/dbus-string.c (_dbus_string_base64_encode)
4252         (_dbus_string_base64_decode): Remove.
4253         (_dbus_string_hex_decode): Add end_return argument so we can
4254         distinguish between OOM and invalid hex encoding.
4255         (_dbus_string_test): Remove base64 tests and add test case for
4256         invalid hex.
4257
4258         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
4259         Replace base64 with hex.
4260
4261         * test/data/auth/invalid-hex-encoding.auth-script: New test case
4262         for invalid hex encoded data in auth protocol.
4263
4264 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4265
4266         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
4267         leak.
4268
4269 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
4270
4271         * mono/dbus-sharp.dll.config.in: Added for GAC
4272         * mono/dbus-sharp.snk: Added for GAC
4273         * mono/Assembly.cs.in: Added for GAC
4274         * mono/Makefile.am: Changes for GAC installation        
4275         * configure.in: Added refs for dbus-sharp.dll.config.in and
4276         Assembly.cs.in. More fixes for mono testing
4277         * mono/example/Makefile.am: Changed var to CSC
4278         * Makefile.am: Changed flag name to DBUS_USE_CSC
4279
4280 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
4281
4282         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
4283         * mono/doc/*: Added documentation framework
4284         * configure.in: Added monodoc check
4285         * README: Added description of mono configure flags
4286
4287 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
4288
4289         * doc/dbus-specification.xml: Added a "Required" column to the 
4290         header fields table and changed the "zero or more" verbage in
4291         the above paragraph to read "The header must contain the required 
4292         named header fields and zero or more of the optional named header 
4293         fields".
4294         * test/data/invalid-messages/*.message: Added the required PATH 
4295         named header field to the tests so that they don't fail on 
4296         'Missing path field'
4297
4298 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
4299
4300         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
4301         the stack by implicitly defining variable and parameter types and
4302         removing the hack of defining C pointers as python objects and later
4303         casting them.
4304
4305 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
4306
4307         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
4308
4309 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
4310
4311         * mono/DBusType/Dict.cs: Handle empty dicts
4312         * mono/DBusType/Array.cs: Handle empty arrays
4313         * mono/Arguments.cs: Handle empty arguments
4314
4315 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
4316
4317         * dbus-sharp.pc.in: Modified to include include Libs and Requires
4318         field
4319
4320 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
4321
4322         * test/data/valid-messages/standard-*.message: Update message
4323         test scripts to new header field names.
4324
4325 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
4326
4327         * test/break-loader.c (randomly_do_n_things): tracked down buffer
4328         overflow to times_we_did_each_thing array which would chop off the
4329         first character of the failure_dir string. Increased the size of
4330         the array to 7 to reflect the number of random mutation functions
4331         we have.
4332
4333 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
4334
4335         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
4336         unix_server->watch here, it is unreffed in disconnect.
4337         (_dbus_server_new_for_tcp_socket): convert NULL host to
4338         "localhost" here so we don't append NULL to address.
4339         
4340         * dbus/dbus-server.c (_dbus_server_test): Add test case for
4341         various addresses, including tcp with no explicit host.
4342
4343 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4344
4345         * dbus/dbus-message.c (decode_header_data, decode_string_field):
4346         fix incorrect setting of .name_offset in the HeaderField (it was
4347         off by two bytes, positioned right after the name and typecode)
4348
4349         * bus/bus.c (bus_context_new, bus_context_unref): test before
4350         calling dbus_server_free_data_slot and _dbus_user_database_unref
4351         in case of an error.
4352
4353         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
4354         by libdbus-gtool.
4355
4356 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
4357
4358         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
4359         _dbus_poll() instead of select().
4360
4361 2004-04-15  Jon Trowbridge  <trow@ximian.com>
4362
4363         * bus/main.c (signal_handler): Reload the configuration files
4364         on SIGHUP.
4365         (main): Set up our SIGHUP handler.
4366
4367         * bus/bus.c (struct BusContext): Store the config file, user and
4368         fork flag in the BusContext.
4369         (process_config_first_time_only): Added.  Contains the code
4370         (previously in bus_context_new) for setting up the BusContext from
4371         the BusConfigParser that should only be run the first time the
4372         config files are read.
4373         (process_config_every_time): Added.  Contains the code (previously
4374         in bus_context_new) for setting up the BusContext from the
4375         BusConfigParser that should be run every time the config files are
4376         read.
4377         (load_config): Added.  Builds a BusConfigParser from the config
4378         files and passes the resulting structure off to
4379         process_config_first_time_only (assuming this is the first time)
4380         and process_config_every_time.
4381         (bus_context_new): All of the config-related code has been moved
4382         to process_config_first_time_only and process_config_every_time.
4383         Now this function just does the non-config-related initializations
4384         and calls load_config.
4385         (bus_context_reload_config): Added.
4386
4387 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4388
4389         * bus/driver.c (bus_driver_handle_get_service_owner):
4390         implement a GetServiceOwner method.
4391         * doc/dbus-specification.xml: document it.
4392         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
4393         
4394         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
4395         implement, using the bus GetServiceOwner method.
4396
4397         * test/glib/test-dbus-glib.c:
4398         use dbus_gproxy_new_for_service_owner so that we can receive the
4399         signal. 
4400
4401 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
4402
4403         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
4404         dbus/dbus-message.c, dbus/dbus-protocol.h
4405         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
4406
4407         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
4408         dbus/dbus-message.c, dbus/dbus-protocol.h
4409         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
4410
4411         * dbus/dbus-internals.c (_dbus_header_field_to_string):
4412         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
4413         DBUS_HEADER_FIELD_SENDER resolves to "sender"
4414
4415         * doc/dbus-specification.xml (Header Fields Table):
4416         s/SERVICE/DESTINATION
4417         s/SENDER_SERVICE/SENDER
4418
4419
4420 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4421
4422         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
4423         a few seconds.
4424
4425 2004-04-13  Michael Meeks  <michael@ximian.com>
4426
4427         * glib/dbus-gobject.c (handle_introspect): split out
4428         (introspect_properties): this.
4429         (handle_introspect): implement this.
4430
4431         * test/glib/Makefile.am: use the absolute path so the bus
4432         daemon's chdir ("/") doesn't kill us dead.
4433
4434         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
4435
4436 2004-04-12  Jon Trowbridge  <trow@ximian.com>
4437
4438         * bus/config-parser.c (struct BusConfigParser): Added
4439         included_files field.
4440         (seen_include): Added.  Checks whether or not a file has already
4441         been included by any parent BusConfigParser.
4442         (bus_config_parser_new): Copy the parent's included_files.
4443         (include_file): Track which files have been included, and fail on
4444         circular inclusions.
4445         (process_test_valid_subdir): Changed printf to report if we are
4446         testing valid or invalid conf files.
4447         (all_are_equiv): Changed printf to be a bit clearer about
4448         what we are actually doing.
4449         (bus_config_parser_test): Test invalid configuration files.
4450
4451 2004-04-09  Jon Trowbridge  <trow@ximian.com>
4452
4453         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
4454         argument.  If non-null, the newly-constructed BusConfigParser will
4455         be initialized with the parent's BusLimits instead of the default
4456         values.
4457         (include_file): When including a config file, pass in
4458         the current parser as the parent and then copy the BusLimits
4459         from the included BusConfigParser pack to the current parser.
4460         (process_test_valid_subdir): Renamed from process_test_subdir.
4461         (process_test_equiv_subdir): Added.  Walks through a directory,
4462         descending into each subdirectory and loading the config files
4463         it finds there.  If any subdirectory contains two config files
4464         that don't produce identical BusConfigParser structs, fail.
4465         For now, the BusConfigParser's BusPolicies are not compared.
4466         (bus_config_parser_test): Call both process_test_valid_subdir and
4467         process_test_equiv_subdir.
4468
4469         * bus/config-loader-libxml.c (bus_config_load): Take a parent
4470         argument and pass it along to the call to bus_config_parser_new.
4471         Also made a few small changes to allow this code to compile.
4472
4473         * bus/config-loader-expat.c (bus_config_load): Take a parent
4474         argument and pass it along to the call to bus_config_parser_new.
4475
4476         * bus/bus.c (bus_context_new): Load the config file
4477         with a NULL parent argument.
4478
4479 2004-03-29  Michael Meeks  <michael@ximian.com>
4480
4481         * glib/dbus-gobject.c (introspect_properties): split
4482         out, fix mangled 'while' flow control.
4483         (introspect_signals): implement.
4484         (handle_introspect): update.
4485
4486 2004-03-29  Michael Meeks  <michael@ximian.com>
4487
4488         * glib/dbus-gobject.c (set_object_property): split out / 
4489         re-work, use the property type, and not the message type(!)
4490         (get_object_property): ditto.
4491
4492         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
4493         (dbus_gvalue_marshal): make this code re-usable, needed
4494         for signals too, also on both proxy and server side.
4495         Re-write for more efficiency / readability.
4496
4497 2004-03-29  Michael Meeks  <michael@ximian.com>
4498
4499         * dbus/dbus-message.c
4500         (dbus_message_new_error_printf): impl.
4501
4502         * dbus/dbus-connection.c
4503         (dbus_connection_unregister_object_path): fix warning.
4504
4505         * configure.in: fix no-mono-installed situation.
4506
4507 2004-03-27  Havoc Pennington  <hp@redhat.com>
4508
4509         Patch from Timo Teräs:
4510         
4511         * tools/dbus-send.c (main): if --print-reply, assume type is
4512         method call; support boolean type args
4513         
4514         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
4515         bunch of memleak and logic bugs
4516         
4517 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
4518
4519         * mono/Arguments.cs:
4520         * mono/Introspector.cs:
4521         * mono/Handler.cs:
4522         * mono/InterfaceProxy.cs:
4523         * mono/Message.cs
4524         * mono/ProxyBuilder.cs:
4525         * mono/Service.cs:
4526         Added InterfaceProxy class to avoid building proxies for every
4527         object.
4528
4529         * dbus-message.h:
4530         * dbus-message.c (dbus_message_append_args_valist)
4531         (dbus_message_iter_get_object_path)
4532         (dbus_message_iter_get_object_path_array)
4533         (dbus_message_iter_append_object_path)
4534         (dbus_message_iter_append_object_path_array):
4535         Added object_path iter functions to handle OBJECT_PATH arguments
4536         
4537 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
4538
4539         First checkin of mono bindings.
4540         * configure.in:
4541         * Makefile.am:
4542         Build stuff for the bindings
4543         * dbus-sharp.pc.in: Added for pkgconfig
4544         
4545 2004-03-21  Havoc Pennington  <hp@redhat.com>
4546
4547         * test/test-service.c (main): remove debug spew
4548
4549 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4550
4551         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
4552         arrays
4553
4554         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
4555         (dbus_message_iter_init_array_iterator)
4556         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
4557         indicate whether the iterator is empty
4558
4559         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
4560         warnings
4561
4562 2004-03-19  Havoc Pennington  <hp@redhat.com>
4563
4564         * NEWS: 0.21 updates
4565
4566         * configure.in: 0.21
4567
4568         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
4569         
4570         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
4571         you don't need pyrex to make dist
4572
4573         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
4574         sources; run moc
4575         
4576 2004-03-18  Richard Hult  <richard@imendio.com>
4577
4578         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
4579         (dbus_message_set_auto_activation): Add doxygen docs.
4580
4581 2004-03-16  Richard Hult  <richard@imendio.com>
4582
4583         * bus/activation.c: (bus_activation_service_created),
4584         (bus_activation_send_pending_auto_activation_messages),
4585         (bus_activation_activate_service):
4586         * bus/activation.h:
4587         * bus/dispatch.c: (bus_dispatch),
4588         (check_nonexistent_service_auto_activation),
4589         (check_service_auto_activated),
4590         (check_segfault_service_auto_activation),
4591         (check_existent_service_auto_activation), (bus_dispatch_test):
4592         * bus/driver.c: (bus_driver_handle_activate_service):
4593         * bus/services.c: (bus_registry_acquire_service):
4594         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
4595         (dbus_message_get_auto_activation):
4596         * dbus/dbus-message.h:
4597         * dbus/dbus-protocol.h: Implement auto-activation.
4598         
4599         * doc/dbus-specification.xml: Add auto-activation to the spec.
4600
4601 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
4602
4603         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
4604         fix a bug with CUSTOM types.
4605
4606         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
4607         a unit test for this bug (used to fail).
4608
4609 2004-03-12  Mikael Hallendal  <micke@imendio.com>
4610
4611         * bus/activation.c:
4612         (babysitter_watch_callback): notify all pending activations waiting for
4613           the same exec that the activation failed.
4614         (bus_activation_activate_service): shortcut the activation if we 
4615           already waiting for the same executable to start up.
4616
4617 2004-03-12  Mikael Hallendal  <micke@imendio.com>
4618
4619         * bus/activation.c: 
4620         - Added service file reloading. 
4621           Each service files directory is kept in an hash table in 
4622           BusActivation and each BusActivationEntry knows what .service-file it
4623           was read from. So when you try to activate a service the bus will 
4624           check if it's been updated, removed or if new .service-files has 
4625           been installed.
4626         - Test code at the bottom for the service file reloading.
4627         * bus/test-main.c: (main):
4628         * bus/test.h:
4629         - added service reloading test.
4630         * dbus/dbus-sysdeps.c: 
4631         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
4632
4633 2004-03-08  Michael Meeks  <michael@ximian.com>
4634
4635         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
4636         bail immediately if disconnected, to avoid busy loop.
4637
4638         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
4639         cleanup cut/paste/inefficiency.
4640
4641 2004-03-01  David Zeuthen  <david@fubar.dk>
4642
4643         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
4644         bug where args were used twice. This bug resulted in a segfault
4645         on a Debian/PPC system when starting the messagebus daemon. Include
4646         dbus-sysdeps.h for DBUS_VA_COPY
4647
4648         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
4649
4650         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
4651         appropriate va_copy implementation. From GLib
4652         
4653 2004-02-24  Joe Shaw  <joe@ximian.com>
4654
4655         * bus/services.c (bus_registry_acquire_service): We need to pass
4656         in the service name to dbus_set_error() to prevent a crash.
4657
4658 2003-12-26  Anders Carlsson  <andersca@gnome.org>
4659
4660         * AUTHORS: Reveal my True identity.
4661
4662 2003-12-17  Mikael Hallendal  <micke@imendio.com>
4663
4664         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
4665         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
4666
4667 2003-12-13  Mikael Hallendal  <micke@imendio.com>
4668
4669         * doc/TODO: Added not about better error check of configuration files.
4670
4671 2003-12-02  Richard Hult  <richard@imendio.com>
4672
4673         * Update AFL version to 2.0 throughout the source files to reflect
4674         the update that was done a while ago.
4675
4676 2003-12-02  Richard Hult  <richard@imendio.com>
4677
4678         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
4679         wrote_dict_key to FALSE on the iter that the dict is appended to,
4680         just like when appending other types. Fixes a bug where a dict
4681         couldn't be put inside a dict.
4682         (dbus_message_iter_append_dict_key): Fix typo in warning message.
4683         (message_iter_test, _dbus_message_test): Add test case for dict
4684         inside dict.
4685
4686 2003-12-01  David Zeuthen  <david@fubar.dk>
4687
4688         * python/dbus.py: Add the actual message when calling the reciever
4689         of a signal such that parameters can be inspected. Add the method
4690         remove_signal_receiver
4691         
4692 2003-11-26  Mikael Hallendal  <micke@imendio.com>
4693
4694         * bus/*.[ch]:
4695         * dbus/*.[ch]:
4696         * glib/*.[ch]: Made ref functions return the pointer
4697
4698 2003-11-25  Zack Rusin  <zack@kde.org>
4699
4700         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
4701
4702         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
4703         wrappers,
4704
4705         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
4706         the Integrator and to better fit with the server,
4707
4708 2003-11-24  Zack Rusin  <zack@kde.org>
4709
4710         * qt/connection.h, qt/connection.cpp: removing initDbus method since
4711         the integrator handles it now
4712
4713         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
4714         since QTimer wasn't really meant to be used the way DBusTimeout is
4715
4716 2003-11-24  Zack Rusin  <zack@kde.org>
4717
4718         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
4719         Integrator class which integrates D-BUS with the Qt event loop,
4720
4721         * qt/connection.h, qt/connection.cpp: Move all the code which
4722         was dealing with D-BUS integration to the Integrator class,
4723         and start using Integrator,
4724
4725 2003-11-23  Zack Rusin  <zack@kde.org>
4726
4727         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
4728         wrapper
4729
4730         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
4731         switching namespaces to DBusQt, reworking the class,
4732
4733         * Makefile.cvs: switching dependencies so that it matches KDE 
4734         schematics,
4735         
4736         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
4737         the library
4738
4739 2003-11-19  Havoc Pennington  <hp@redhat.com>
4740
4741         * NEWS: update
4742
4743         * configure.in: bump version to 0.20
4744
4745         * configure.in (have_qt): add yet another place to look for qt
4746         (someone hand trolltech a .pc file...)
4747
4748 2003-11-01  Havoc Pennington  <hp@redhat.com>
4749
4750         * doc/dbus-specification.xml: add state machine docs on the auth
4751         protocol; just a first draft, I'm sure it's wrong.      
4752
4753 2003-10-28  David Zeuthen  <david@fubar.dk>
4754
4755         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
4756         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
4757         
4758 2003-10-28  Havoc Pennington  <hp@redhat.com>
4759
4760         * dbus/dbus-message.c (get_next_field): delete unused function
4761
4762 2003-10-28  Havoc Pennington  <hp@redhat.com>
4763
4764         * bus/expirelist.c (do_expiration_with_current_time): detect
4765         failure of the expire_func due to OOM
4766
4767         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
4768
4769         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
4770         NoReply error that's now created by the bus when the service exits
4771
4772 2003-10-28  Havoc Pennington  <hp@redhat.com>
4773
4774         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
4775         tests for set_path, set_interface, set_member, etc.
4776
4777         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
4778
4779         * dbus/dbus-message.c (set_string_field): always just delete and
4780         re-append the field; accept NULL for deletion
4781         (re_align_fields_recurse): reimplement
4782         
4783 2003-10-26  Havoc Pennington  <hp@redhat.com>
4784
4785         * dbus/dbus-connection.c: fix docs to properly describe the
4786         disconnected message
4787         (_dbus_connection_notify_disconnected): remove this function; 
4788         we can't synchronously add the disconnected message, we have to 
4789         do it after we've queued any remaining real messages
4790         (_dbus_connection_get_dispatch_status_unlocked): queue the
4791         disconnect message only if the transport has finished queueing all
4792         its real messages and is disconnected.
4793         (dbus_connection_disconnect): update the dispatch status here
4794
4795 2003-10-22  Havoc Pennington  <hp@redhat.com>
4796
4797         * bus/bus.c (bus_context_check_security_policy): fix up assertion
4798
4799         * bus/connection.c (bus_transaction_send_from_driver): set the
4800         destination to the connection's base service
4801
4802 2003-10-20  Havoc Pennington  <hp@redhat.com>
4803
4804         hmm, make check is currently not passing.
4805         
4806         * doc/dbus-specification.xml: add requirement that custom type
4807         names follow the same rules as interface names.
4808
4809         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
4810         duplication and allow 'c' to be 'custom'; dict is now 'm' for
4811         'map'
4812
4813         * doc/dbus-specification.xml: update type codes to match
4814         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
4815         CUSTOM. Add type OBJECT_PATH to the spec.
4816
4817 2003-10-17  Havoc Pennington  <hp@redhat.com>
4818
4819         * bus/driver.c (create_unique_client_name): use "." as separator
4820         in base service names instead of '-'
4821
4822         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
4823         byte at the end of the string
4824
4825         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
4826         optimization macros since string validation seems to be a slow
4827         point.
4828         
4829         * doc/dbus-specification.xml: restrict valid
4830         service/interface/member/error names. Add test suite code for the
4831         name validation.
4832
4833         * dbus/dbus-string.c: limit service/interface/member/error names 
4834         to [0-9][A-Z][a-z]_
4835
4836         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
4837         format arg to verbose spew
4838
4839         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
4840         memory, return instead of g_error
4841
4842         * test/test-service.c (path_message_func): support emitting a
4843         signal on request
4844
4845         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
4846         activation bus type if DBUS_BUS_ACTIVATION was set; default to
4847         assuming the activation bus was the session bus so that services
4848         started manually will still register.
4849         (init_connections_unlocked): fix so that in OOM situation we get
4850         the same semantics when retrying the function
4851         
4852         * test/test-service.c (main): change to use path registration, to
4853         test those codepaths; register with DBUS_BUS_ACTIVATION rather
4854         than DBUS_BUS_SESSION
4855
4856 2003-10-16  Havoc Pennington  <hp@redhat.com>
4857
4858         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
4859
4860         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
4861         coverage of the tests
4862         (coverage-report.txt): don't move the .da and .bbg files around
4863
4864 2003-10-16  Havoc Pennington  <hp@redhat.com>
4865
4866         * bus/bus.c (struct BusContext): remove struct field I didn't mean
4867         to put there
4868
4869 2003-10-16  Havoc Pennington  <hp@redhat.com>
4870
4871         * bus/connection.c (bus_pending_reply_expired): either cancel or
4872         execute, not both
4873         (bus_connections_check_reply): use unlink, not remove_link, as we
4874         don't want to free the link; fixes double free mess
4875
4876         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
4877         where no reply was received
4878
4879         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
4880         fix a refcount leak
4881
4882         * bus/signals.c (match_rule_matches): add special cases for the
4883         bus driver, so you can match on sender/destination for it.
4884
4885         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
4886         DBUS_PRINT_BACKTRACE is set
4887
4888         * dbus/dbus-internals.c: add pid to assertion failure messages
4889
4890         * dbus/dbus-connection.c: add message type code to the debug spew
4891
4892         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
4893         sender=foo not service=foo
4894
4895         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
4896         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
4897         DBUS_ACTIVATION_ADDRESS instead
4898
4899         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
4900         DBUS_SYSTEM_BUS_ADDRESS if appropriate
4901
4902         * bus/bus.c (bus_context_new): handle OOM copying bus type into
4903         context struct
4904
4905         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
4906         (dbus_message_iter_get_object_path_array): new function (half
4907         finished, disabled for the moment)
4908         
4909         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
4910         DBUS_MESSAGE_TYPE_ERROR
4911
4912         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
4913         avoid redirecting stderr to /dev/null
4914         (babysit): close stdin if not doing the "exit_with_session" thing
4915
4916         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
4917         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
4918         stdout/stdin, so things don't get confused
4919         
4920         * bus/system.conf.in: fix to allow replies, I modified .conf
4921         instead of .conf.in again.
4922
4923 2003-10-14  David Zeuthen  <david@fubar.dk>
4924
4925         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
4926         argtype to arg_type when raising unknown arg type exception.
4927         Changed type list to reflect the changes in dbus-protocol.h so 
4928         the bindings actually work.
4929
4930 2003-10-14  Havoc Pennington  <hp@redhat.com>
4931
4932         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
4933         to have a bug keeping it from outputting the .da files sometimes
4934         (string_get_string): don't append garbage nul bytes to the string.
4935
4936 2003-10-15  Seth Nickell  <seth@gnome.org>
4937
4938         * python/Makefile.am:
4939
4940         Include dbus_h_wrapper.h in the dist tarball.
4941
4942 2003-10-14  Havoc Pennington  <hp@redhat.com>
4943
4944         * bus/bus.c (bus_context_check_security_policy): revamp this to
4945         work more sanely with new policy-based requested reply setup
4946
4947         * bus/connection.c (bus_transaction_send_from_driver): set bus
4948         driver messages as no reply
4949
4950         * bus/policy.c (bus_client_policy_check_can_receive): handle a
4951         requested_reply attribute on allow/deny rules
4952
4953         * bus/system.conf: add <allow requested_reply="true"/>
4954
4955         * bus/driver.c (bus_driver_handle_message): fix check for replies
4956         sent to the bus driver, which was backward. How did this ever work
4957         at all though? I think I'm missing something.
4958
4959         * dbus/dbus-message.c (decode_header_data): require error and
4960         method return messages to have a reply serial field to be valid
4961         (_dbus_message_loader_queue_messages): break up this function;
4962         validate that reply serial and plain serial are nonzero; 
4963         clean up the OOM/error handling.
4964         (get_uint_field): don't return -1 from this
4965         (dbus_message_create_header): fix signed/unsigned bug
4966
4967         * bus/connection.c (bus_connections_expect_reply): save serial of
4968         the incoming message, not reply serial
4969
4970 2003-10-14  Havoc Pennington  <hp@redhat.com>
4971
4972         * bus/connection.c: implement pending reply tracking using
4973         BusExpireList
4974
4975         * bus/bus.c (bus_context_check_security_policy): verify that a
4976         reply is pending in order to allow a reply to be sent. Deny 
4977         messages of unknown type.
4978
4979         * bus/dbus-daemon-1.1.in: update to mention new resource limits
4980
4981         * bus/bus.c (bus_context_get_max_replies_per_connection): new
4982         (bus_context_get_reply_timeout): new
4983
4984 2003-10-13  Seth Nickell  <seth@gnome.org>
4985
4986         * python/Makefile.am:
4987
4988         Pass "make distcheck": remove a couple files from DIST_FILES
4989         that weren't included in the final version.
4990
4991 2003-10-12  Havoc Pennington  <hp@pobox.com>
4992
4993         Added test code that 1) starts an actual bus daemon and 2) uses
4994         DBusGProxy; fixed bugs that were revealed by the test. Lots 
4995         more testing possible, but this is the basic framework.
4996         
4997         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
4998         empty proxy lists from the proxy list hash
4999
5000         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
5001         couple of return_if_fail checks
5002
5003         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
5004         to allocate, so everything is cleared to NULL as it should be.
5005
5006         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
5007         source as data to dbus_connection_set_timeout_functions() as the 
5008         timeout functions expected
5009
5010         * test/glib/run-test.sh: add a little script to start up a message
5011         bus and run tests using it
5012
5013         * tools/dbus-launch.1: updates
5014
5015         * tools/dbus-launch.c (main): add --config-file option
5016
5017         * tools/dbus-launch.c (main): remove confusing else if (runprog)
5018         that could never be reached.
5019
5020         * dbus/dbus-message.c (dbus_message_new_method_return) 
5021         (dbus_message_new_error, dbus_message_new_signal): set the
5022         no-reply-expected flag on all these. Redundant, but may
5023         as well be consistent.
5024
5025 2003-10-11  Havoc Pennington  <hp@pobox.com>
5026
5027         * test/decode-gcov.c (function_solve_graph): make broken block
5028         graph a nonfatal error since it seems to be broken. Need to debug
5029         this.
5030
5031         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
5032         can't just check type > INVALID < LAST anymore
5033
5034         * dbus/dbus-message.c (dbus_message_get_signature): new function
5035         (dbus_message_has_signature): new function
5036         (struct DBusMessage): add signature field (right now it isn't sent
5037         over the wire, just generated on the fly)
5038         (dbus_message_copy): copy the signature, and init strings to
5039         proper length to avoid some reallocs
5040         (dbus_message_iter_init_array_iterator): return void, since it
5041         can't fail
5042         (dbus_message_iter_init_dict_iterator): return void since it can't fail
5043         (_dbus_message_loader_queue_messages): add silly temporary hack to
5044         fill in message->signature on load
5045
5046         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
5047         characters, so they are relatively human-readable.
5048
5049 2003-10-11  Havoc Pennington  <hp@pobox.com>
5050
5051         * dbus/dbus-message.c (_dbus_message_test): add more test
5052         coverage, but #if 0 for now since they uncover a bug 
5053         not fixed yet; I think in re_align_field_recurse()
5054         (re_align_field_recurse): add FIXME about broken assertion
5055
5056         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
5057
5058         * bus/connection.c: share a couple code bits with expirelist.c
5059
5060         * bus/expirelist.h, bus/expirelist.c: implement a generic
5061         expire-items-after-N-seconds facility, was going to share between
5062         expiring connections and replies, decided not to use for expiring
5063         connections for now.
5064
5065         * COPYING: include AFL 2.0 (still need to change all the file headers)
5066
5067 2003-10-09  Havoc Pennington  <hp@redhat.com>
5068
5069         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
5070         gcc 3.3. Not that we do anything about it yet.
5071
5072         * bus/signals.c (bus_match_rule_parse): impose max length on the
5073         match rule text
5074
5075         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
5076
5077 2003-10-09  Havoc Pennington  <hp@redhat.com>
5078
5079         Make matching rules theoretically work (add parser).
5080         
5081         * bus/bus.c (bus_context_check_security_policy): fix up to handle
5082         the case where destination is explicitly specified as bus driver
5083         and someone else is eavesdropping.
5084         
5085         * bus/policy.c (bus_client_policy_check_can_receive): fix up
5086         definition of eavesdropping and assertion
5087
5088         * tools/dbus-send.c (main): use dbus_message_type_from_string
5089
5090         * bus/signals.c (bus_match_rule_parse): implement
5091
5092         * dbus/dbus-message.c (dbus_message_type_from_string): new
5093
5094         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
5095
5096 2003-10-02  Havoc Pennington  <hp@pobox.com>
5097
5098         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
5099         dbus_gproxy_oneway_call
5100
5101         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
5102         (dbus_server_setup_with_g_main): fix to allow calling them more
5103         than once on the same args
5104         (dbus_bus_get_with_g_main): new function
5105
5106 2003-10-02  Havoc Pennington  <hp@redhat.com>
5107
5108         * doc/dbus-tutorial.xml: write some stuff
5109
5110 2003-09-29  Havoc Pennington  <hp@pobox.com>
5111
5112         * configure.in: split checks for Doxygen from XML docs, check for
5113         xmlto
5114
5115         * doc/Makefile.am: XML-ify all the docs, and add a blank
5116         dbus-tutorial.xml
5117
5118 2003-09-29  Havoc Pennington  <hp@pobox.com>
5119
5120         * Merge dbus-object-names branch. To see the entire patch 
5121         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
5122         it's huuuuge though.
5123         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
5124         
5125 2003-09-28  Havoc Pennington  <hp@pobox.com>
5126
5127         * HACKING: update to reflect new server
5128
5129 2003-09-26  Seth Nickell  <seth@gnome.org>
5130
5131         * python/dbus.py:
5132         * python/examples/example-signals.py:
5133
5134         Start implementing some notions of signals. The API
5135         is really terrible, but they sort of work (with the
5136         exception of being able to filter by service, and to
5137         transmit signals *as* a particular service). Need to
5138         figure out how to make messages come from the service
5139         we registered :-(
5140         
5141         * python/dbus_bindings.pyx.in:
5142
5143         Removed duplicate message_handler callbacks.
5144         
5145 2003-09-25  Havoc Pennington  <hp@redhat.com>
5146
5147         * bus/session.conf.in: fix my mess
5148
5149 2003-09-25  Havoc Pennington  <hp@pobox.com>
5150
5151         * bus/session.conf.in: fix security policy, reported by Seth Nickell
5152
5153 2003-09-25  Seth Nickell  <seth@gnome.org>
5154
5155         * python/examples/example-service.py:
5156
5157         Johan notices complete wrong code in example-service, but
5158         completely wrong in a way that works exactly the same (!).
5159         Johan is confused, how could this possibly work? Example
5160         code fails to serve purpose of making things clear.
5161         Seth fixes.
5162
5163 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
5164
5165         * doc/dbus-specification.sgml: don't require header fields
5166         to be 4-byte aligned and specify that fields should be
5167         distinguished from padding by the fact that zero is not
5168         a valid field name.
5169         
5170         * doc/TODO: remove re-alignment item and add item to doc
5171         the OBJECT_PATH type.
5172         
5173         * dbus/dbus-message.c:
5174         (HeaderField): rename the original member to value_offset
5175         and introduce a name_offset member to keep track of where
5176         the field actually begins.
5177         (adjust_field_offsets): remove.
5178         (append_int_field), (append_uint_field),
5179         (append_string_field): don't align the start of the header
5180         field to a 4-byte boundary.
5181         (get_next_field): impl finding the next marhsalled field
5182         after a given field.
5183         (re_align_field_recurse): impl re-aligning a number of
5184         already marshalled fields.
5185         (delete_field): impl deleting a field of any type and
5186         re-aligning any following fields.
5187         (delete_int_or_uint_field), (delete_string_field): remove.
5188         (set_int_field), (set_uint_field): no need to re-check
5189         that we have the correct type for the field.
5190         (set_string_field): ditto and impl re-aligning any
5191         following fields.
5192         (decode_header_data): update to take into account that
5193         the fields aren't 4-byte aligned any more and the new
5194         way to distinguish padding from header fields. Also,
5195         don't exit when there is too much header padding.
5196         (process_test_subdir): print the directory.
5197         (_dbus_message_test): add test to make sure a following
5198         field is re-aligned correctly after field deletion.
5199         
5200         * dbus/dbus-string.[ch]:
5201         (_dbus_string_insert_bytes): rename from insert_byte and
5202         allow the insert of multiple bytes.
5203         (_dbus_string_test): test inserting multiple bytes.
5204
5205         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
5206         warning note to docs about having to re-align any
5207         marshalled values following the string.
5208         
5209         * dbus/dbus-message-builder.c:
5210         (append_string_field), (_dbus_message_data_load):
5211         don't align the header field.
5212         
5213         * dbus/dbus-auth.c: (process_test_subdir): print the
5214         directory.
5215         
5216         * test/break-loader.c: (randomly_add_one_byte): upd. for
5217         insert_byte change.
5218         
5219         * test/data/invalid-messages/bad-header-field-alignment.message:
5220         new test case.
5221         
5222         * test/data/valid-messages/unknown-header-field.message: shove
5223         a dict in the unknown field.
5224
5225 2003-09-25  Seth Nickell  <seth@gnome.org>
5226
5227         * python/dbus.py:
5228         * python/dbus_bindings.pyx.in:
5229
5230         Handle return values.
5231         
5232         * python/examples/example-client.py:
5233         * python/examples/example-service.py:
5234
5235         Pass back return values from the service to the client.
5236         
5237 2003-09-24  Seth Nickell  <seth@gnome.org>
5238
5239         * python/dbus.py:
5240
5241         Connect Object methods (when you are sharing an object) up... pass
5242         in a list of methods to be shared. Sharing all the methods just
5243         worked out too weird. You can now create nice Services over the
5244         DBus in Python. :-)
5245         
5246         * python/dbus_bindings.pyx.in:
5247
5248         Keep references to user_data tuples passed into C functions so 
5249         Python doesn't garbage collect on us.
5250
5251         Implement MethodReturn and Error subclasses of Message for creating
5252         DBusMessage's of those types.
5253         
5254         * python/examples/example-client.py:
5255         * python/examples/example-service.py:
5256
5257         Simple example code showing both how create DBus services and objects,
5258         and how to use them.
5259
5260 2003-09-23  Havoc Pennington  <hp@pobox.com>
5261
5262         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
5263
5264 2003-09-23  Havoc Pennington  <hp@redhat.com>
5265
5266         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
5267         (dbus_gproxy_disconnect_signal): implement
5268         (dbus_gproxy_manager_remove_signal_match): implement
5269         (dbus_gproxy_manager_add_signal_match): implement
5270         (dbus_gproxy_oneway_call): implement
5271
5272 2003-09-23  Havoc Pennington  <hp@pobox.com>
5273
5274         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
5275         subclass. This means dropping the transparent thread safety of the
5276         proxy; you now need a separate proxy per-thread, or your own
5277         locking on the proxy. Probably right anyway.
5278         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
5279
5280 2003-09-22  Havoc Pennington  <hp@redhat.com>
5281
5282         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
5283
5284 2003-09-21  Seth Nickell  <seth@gnome.org>
5285
5286         First checkin of the Python bindings.
5287         
5288         * python/.cvsignore:
5289         * python/Makefile.am:
5290         * python/dbus_bindings.pyx.in:
5291         * python/dbus_h_wrapper.h:
5292
5293         Pieces for Pyrex to operate on, building a dbus_bindings.so
5294         python module for low-level access to the DBus APIs.
5295         
5296         * python/dbus.py:
5297
5298         High-level Python module for accessing DBus objects.
5299
5300         * configure.in:
5301         * Makefile.am:
5302
5303         Build stuff for the python bindings.
5304
5305         * acinclude.m4:
5306
5307         Extra macro needed for finding the Python C header files.
5308
5309 2003-09-21  Havoc Pennington  <hp@pobox.com>
5310
5311         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
5312         implementing the proxy manager, didn't get very far.
5313
5314         * dbus/dbus-bus.c (dbus_bus_add_match): new
5315         (dbus_bus_remove_match): new
5316
5317         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
5318         path_name argument; adjust the other not-yet-implemented 
5319         gproxy constructors to be what I think they should be.
5320
5321 2003-09-21  Havoc Pennington  <hp@pobox.com>
5322
5323         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
5324         by default for message bus connections.
5325
5326         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
5327         exit_on_disconnect flag is set and we process the disconnected
5328         signal.
5329         (dbus_connection_set_exit_on_disconnect): new function
5330
5331 2003-09-21  Havoc Pennington  <hp@pobox.com>
5332
5333         Get matching rules mostly working in the bus; only actually
5334         parsing the rule text remains. However, the client side of
5335         "signal connections" hasn't been started, this patch is only the
5336         bus side.
5337         
5338         * dbus/dispatch.c: fix for the matching rules changes
5339         
5340         * bus/driver.c (bus_driver_handle_remove_match)
5341         (bus_driver_handle_add_match): send an ack reply from these
5342         method calls
5343
5344         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
5345         arguments, reported by Seth Nickell
5346
5347         * bus/config-parser.c (append_rule_from_element): support
5348         eavesdrop=true|false attribute on policies so match rules 
5349         can be prevented from snooping on the system bus.
5350
5351         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
5352         and "destination" in attribute names; fix some docs bugs; 
5353         add eavesdrop=true|false attribute
5354
5355         * bus/driver.c (bus_driver_handle_add_match)
5356         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
5357         messages
5358
5359         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
5360         rid of broadcast service concept, signals are just always broadcast
5361
5362         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
5363         mostly implement matching rules stuff (currently only exposed as signal
5364         connections)
5365
5366 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
5367
5368         * doc/dbus-specification.sgml: Change the header field name
5369         to be an enum and update the rest of the spec to reference
5370         the fields using the conventinal name.
5371
5372         * dbus/dbus-protocol.h: update to reflect the spec.
5373
5374         * doc/TODO: add item to remove the 4 byte alignment requirement.
5375         
5376         * dbus/dbus-message.c: Remove the code to generalise the
5377         header/body length and serial number header fields as named
5378         header fields so we can reference field names using the 
5379         protocol values.
5380         (append_int_field), (append_uint_field), (append_string_field):
5381         Append the field name as a byte rather than four chars.
5382         (delete_int_or_uint_field), (delete_string_field): reflect the
5383         fact that the field name and typecode now occupy 4 bytes instead
5384         of 8.
5385         (decode_string_field), (decode_header_data): update to reflect
5386         protocol changes and move the field specific encoding from
5387         decode_string_field() back into decode_header_data().
5388         
5389         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
5390         Add utility to aid debugging.
5391         
5392         * dbus/dbus-message-builder.c:
5393         (append_string_field), (_dbus_message_data_load): Update to
5394         reflect protocol changes; Change the FIELD_NAME directive
5395         to HEADER_FIELD and allow it to take the field's conventional
5396         name rather than the actual value.
5397         
5398         * test/data/*/*.message: Update to use HEADER_FIELD instead
5399         of FIELD_NAME; Always align the header on an 8 byte boundary
5400         *before* updating the header length.
5401
5402 2003-09-15  Havoc Pennington  <hp@pobox.com>
5403
5404         * dbus/dbus-pending-call.c: add the get/set object data
5405         boilerplate as for DBusConnection, etc. Use generic object data
5406         for the notify callback.
5407
5408         * glib/dbus-gparser.c (parse_node): parse child nodes
5409
5410         * tools/dbus-viewer.c: more hacking on the dbus-viewer
5411         
5412         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
5413         contain functions shared between the convenience lib and the
5414         installed lib
5415
5416         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
5417         -export-symbols-regex to the GLib library
5418
5419         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
5420         fix the locking in here, and add a default handler for
5421         Introspect() that just returns sub-nodes.
5422
5423 2003-09-14  Havoc Pennington  <hp@pobox.com>
5424
5425         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
5426         rather than gfoo consistent
5427
5428         * glib/dbus-gproxy.h: delete for now, move contents to
5429         dbus-glib.h, because the include files don't work right since we
5430         aren't in the dbus/ subdir.
5431         
5432         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
5433         (dbus_gproxy_end_call): finish
5434         (dbus_gproxy_begin_call): finish
5435
5436         * glib/dbus-gmain.c (dbus_set_g_error): new
5437
5438         * glib/dbus-gobject.c (handle_introspect): include information
5439         about child nodes in the introspection
5440
5441         * dbus/dbus-connection.c (dbus_connection_list_registered): new
5442         function to help in implementation of introspection
5443
5444         * dbus/dbus-object-tree.c
5445         (_dbus_object_tree_list_registered_and_unlock): new function
5446
5447 2003-09-12  Havoc Pennington  <hp@pobox.com>
5448
5449         * glib/dbus-gidl.h: add common base class for all the foo_info
5450         types
5451
5452         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
5453         similar to kdcop
5454
5455         * test/Makefile.am: try test srcdir -ef . in addition to test
5456         srcdir = ., one of them should work (yeah lame)
5457         
5458         * glib/Makefile.am: build the "idl" parser stuff as a convenience
5459         library
5460         
5461         * glib/dbus-gparser.h: make description_load routines return
5462         NodeInfo* not Parser*
5463
5464         * Makefile.am (SUBDIRS): build test dir after all library dirs
5465
5466         * configure.in: add GTK+ detection
5467
5468 2003-09-07  Havoc Pennington  <hp@pobox.com>
5469
5470         * Make Doxygen contented.
5471
5472 2003-09-07  Havoc Pennington  <hp@pobox.com>
5473
5474         * doc/dbus-specification.sgml: more updates
5475
5476 2003-09-06  Havoc Pennington  <hp@pobox.com>
5477
5478         * doc/dbus-specification.sgml: partial updates
5479
5480         * bus/dbus-daemon-1.1.in: fix the config file docs for the
5481         zillionth time; hopefully I edited the right file this time.
5482
5483         * bus/config-parser.c (append_rule_from_element): support
5484         send_type, send_path, receive_type, receive_path
5485
5486         * bus/policy.c: add message type and path to the list of things
5487         that can be "firewalled"
5488
5489 2003-09-06  Havoc Pennington  <hp@pobox.com>
5490
5491         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
5492         (dbus_connection_register_object_path): make this not handle
5493         messages to paths below the given path
5494
5495 2003-09-03  Havoc Pennington  <hp@pobox.com>
5496
5497         * test/glib/Makefile.am: add this with random glib-linked test
5498         programs
5499
5500         * glib/Makefile.am: remove the random test programs from here,
5501         leave only the unit tests
5502
5503         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
5504         uscore/javacaps conversion, and fix     
5505         (get_object_property, set_object_property): change to .NET
5506         convention for mapping props to methods, set_FooBar/get_FooBar, 
5507         since one language has such a convention we may as well copy it. 
5508         Plus real methods in either getFooBar or get_foo_bar style won't 
5509         collide with this convention.
5510
5511 2003-09-01  Havoc Pennington  <hp@pobox.com>
5512
5513         * glib/dbus-gparser.c: implement
5514
5515         * glib/dbus-gobject.c: start implementing skeletons support
5516
5517         * configure.in: when disabling checks/assert, also define
5518         G_DISABLE_ASSERT and G_DISABLE_CHECKS
5519
5520 2003-09-01  Havoc Pennington  <hp@pobox.com>
5521
5522         * glib/Makefile.am: rearrange a bunch of files and get "make
5523         check" framework set up
5524
5525 2003-08-31  Havoc Pennington  <hp@pobox.com>
5526
5527         * fix build with --disable-tests
5528
5529 2003-08-30  Havoc Pennington  <hp@pobox.com>
5530
5531         * dbus/dbus-connection.c: purge DBusMessageHandler
5532
5533         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
5534         use callbacks everywhere
5535
5536 2003-08-30  Havoc Pennington  <hp@pobox.com>
5537
5538         * test/data/valid-config-files/system.d/test.conf: change to 
5539         root for the user so warnings don't get printed
5540
5541         * dbus/dbus-message.c: add dbus_message_get_path,
5542         dbus_message_set_path
5543         
5544         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
5545         dispatching to a path
5546
5547         * dbus/dbus-string.c (_dbus_string_validate_path): add
5548
5549         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
5550         (_dbus_marshal_object_path): implement
5551
5552         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
5553         to contain the path to the target object
5554         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
5555         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
5556
5557 2003-08-30  Havoc Pennington  <hp@pobox.com>
5558
5559         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
5560
5561 2003-08-29  Havoc Pennington  <hp@pobox.com>
5562
5563         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
5564         registered
5565         (struct DBusObjectSubtree): shrink this
5566         a lot, since we may have a lot of them
5567         (_dbus_object_tree_free_all_unlocked): implement
5568         (_dbus_object_tree_dispatch_and_unlock): implement
5569
5570 2003-08-29  Havoc Pennington  <hp@pobox.com>
5571
5572         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
5573
5574 2003-08-28  Havoc Pennington  <hp@pobox.com>
5575
5576         purge DBusObjectID
5577         
5578         * dbus/dbus-connection.c: port to no ObjectID, create a
5579         DBusObjectTree, rename ObjectTree to ObjectPath in public API
5580
5581         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
5582         everything except UnregisterFunction and MessageFunction
5583         
5584         * dbus/dbus-marshal.c: port away from DBusObjectID, 
5585         add DBUS_TYPE_OBJECT_PATH
5586         
5587         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
5588         dbus/dbus-objectid.[hc]: remove these, we are moving to 
5589         path-based object IDs
5590
5591 2003-08-25  Havoc Pennington  <hp@pobox.com>
5592
5593         Just noticed that dbus_message_test is hosed, I wonder when I
5594         broke that. I thought make check was passing earlier...
5595         
5596         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
5597         container tree, will replace most of dbus-object-registry
5598
5599         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
5600         screwup
5601
5602 2003-08-19  Havoc Pennington  <hp@pobox.com>
5603
5604         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
5605         (dbus_message_is_error): fix this function
5606
5607         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
5608         match
5609
5610         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
5611         reflect clarified man page
5612         (bus_client_policy_check_can_send): ditto
5613         
5614         * bus/session.conf.in: fixup
5615
5616         * bus/system.conf.in: fixup
5617
5618 2003-08-18  Havoc Pennington  <hp@redhat.com>
5619
5620         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
5621
5622         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
5623         dumb bug created earlier (wrong order of args to
5624         decode_header_data())
5625         
5626         * tools/dbus-send.c: port
5627
5628         * tools/dbus-print-message.c (print_message): port
5629
5630         * test/data/*messages: port all messages over
5631         
5632         * dbus/dbus-message-builder.c: support including 
5633         message type
5634         
5635         * bus/driver.c: port over
5636         
5637         * bus/dispatch.c: port over to new stuff
5638
5639         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5640         rename disconnect signal to "Disconnected"
5641
5642 2003-08-17  Havoc Pennington  <hp@pobox.com>
5643
5644         This doesn't compile yet, but syncing up so I can hack on it from
5645         work. What are branches for if not broken code? ;-)
5646         
5647         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
5648         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
5649         DBUS_HEADER_FIELD_ERROR_NAME
5650         
5651         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
5652         for the interface+member pairs
5653         (string_hash): change to use g_str_hash algorithm
5654         (find_direct_function, find_string_function): refactor these to
5655         share most code.
5656         
5657         * dbus/dbus-message.c: port all of this over to support 
5658         interface/member fields instead of name field
5659
5660         * dbus/dbus-object-registry.c: port over
5661         
5662         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
5663         from _dbus_string_validate_name
5664
5665         * bus/dbus-daemon-1.1: change file format for the 
5666         <deny>/<allow> stuff to match new message naming scheme
5667
5668         * bus/policy.c: port over
5669
5670         * bus/config-parser.c: parse new format
5671         
5672 2003-08-16  Havoc Pennington  <hp@pobox.com>
5673
5674         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
5675         broken assertion
5676
5677         * glib/dbus-gproxy.c: some hacking
5678
5679 2003-08-15  Havoc Pennington  <hp@redhat.com>
5680
5681         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
5682
5683         * dbus/dbus-connection.c
5684         (dbus_connection_send_with_reply_and_block): factor out internals;
5685         change to convert any error replies to DBusError instead of 
5686         returning them as a message
5687
5688 2003-08-15  Havoc Pennington  <hp@pobox.com>
5689
5690         * dbus/dbus-connection.c, 
5691         dbus/dbus-pending-call.c: Finish the pending call stuff
5692
5693 2003-08-14  Havoc Pennington  <hp@redhat.com>
5694
5695         * dbus/dbus-pending-call.c: start on new object that will replace
5696         DBusMessageHandler and ReplyHandlerData for tracking outstanding
5697         replies
5698
5699         * dbus/dbus-gproxy.c: start on proxy object used to communicate
5700         with remote interfaces
5701
5702         * dbus/dbus-gidl.c: do the boring boilerplate in here
5703         
5704 2003-08-12  Havoc Pennington  <hp@pobox.com>
5705
5706         * bus/dispatch.c (bus_dispatch): make this return proper 
5707         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
5708
5709         * dbus/dbus-errors.c (dbus_set_error): use
5710         _dbus_string_append_printf_valist
5711
5712         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
5713         (_dbus_string_append_printf): new
5714
5715         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
5716         UNKNOWN_METHOD
5717
5718         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
5719         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
5720         message is unhandled.
5721
5722 2003-08-11  Havoc Pennington  <hp@pobox.com>
5723
5724         * bus/test.c (client_disconnect_handler): change to return
5725         HANDLED (would have been REMOVE_MESSAGE)
5726
5727         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
5728         HANDLED/NOT_YET_HANDLED instead of
5729         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
5730         should be used.
5731
5732 2003-08-10  Havoc Pennington  <hp@pobox.com>
5733
5734         * tools/dbus-send.c (main): add --type argument, for now
5735         supporting only method_call and signal types.
5736
5737         * tools/dbus-print-message.c: print message type
5738
5739         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5740         init connection->objects
5741
5742         * doc/dbus-specification.sgml: fix sgml
5743
5744         * bus/*.c: port over to object-instance API changes
5745
5746         * test/test-service.c: ditto
5747         
5748         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
5749         name, we will have to fix up the rest of the code to also handle
5750         this
5751         (dbus_message_new): generic message-creation call
5752         (set_string_field): allow appending name field
5753
5754 2003-08-06  Havoc Pennington  <hp@pobox.com>
5755
5756         * dbus/dbus-object-registry.c: implement signal connection 
5757         and dispatch
5758
5759         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
5760
5761         * dbus/dbus-internals.c (_dbus_memdup): new function
5762
5763 2003-08-02  Havoc Pennington  <hp@pobox.com>
5764
5765         * dbus/dbus-message.c (dbus_message_get_no_reply)
5766         (dbus_message_set_no_reply): add these and remove
5767         set_is_error/get_is_error
5768
5769         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
5770         remove the ERROR flag, since there's now an ERROR type
5771
5772 2003-08-01  Havoc Pennington  <hp@pobox.com>
5773
5774         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
5775         implement
5776
5777         * dbus/dbus-message.c (dbus_message_get_type): new function
5778
5779         * doc/dbus-specification.sgml: add "type" byte to messages
5780
5781 2003-08-01  Havoc Pennington  <hp@pobox.com>
5782
5783         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
5784         a message type enum to distinguish kinds of message
5785         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
5786         that need not be replied to
5787
5788 2003-08-01  Havoc Pennington  <hp@pobox.com>
5789
5790         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
5791         (unpack_8_octets): fix no-64-bit-int bug
5792
5793         * dbus/dbus-object-registry.c (validate_id): validate the 
5794         connection ID bits, not just the instance ID.
5795
5796         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
5797         the connection-global 33 bits of the object ID
5798
5799         * dbus/dbus-object-registry.c (info_from_entry): fill in 
5800         object ID in the new way
5801
5802         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
5803         define server/client/instance bits.
5804
5805 2003-07-30  Havoc Pennington  <hp@pobox.com>
5806
5807         * dbus/dbus-connection.c (dbus_connection_register_object): fix
5808         build
5809
5810 2003-07-13  Havoc Pennington  <hp@pobox.com>
5811
5812         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
5813         fields to DBusObjectVTable and DBusObjectInfo
5814
5815 2003-07-12  Havoc Pennington  <hp@pobox.com>
5816
5817         * dbus/dbus-object-registry.c: implement unit test,
5818         fix bugs discovered in process
5819
5820         * dbus/dbus-connection.c: remove handler_table and
5821         register_handler(), add DBusObjectRegistry usage
5822
5823         * dbus/dbus-objectid.c (dbus_object_id_is_null)
5824         (dbus_object_id_set_null): new functions
5825
5826 2003-07-08  Havoc Pennington  <hp@pobox.com>
5827
5828         * dbus/dbus-object.c: implement some of this
5829
5830         * dbus/dbus-object-registry.c
5831         (_dbus_object_registry_add_and_unlock): fill in the object_id out
5832         param
5833         (_dbus_object_registry_new): handle OOM
5834
5835 2003-07-08  Havoc Pennington  <hp@pobox.com>
5836
5837         * dbus/dbus-object.h: sketch out an API for registering objects
5838         with a connection, that allows us to use as little as 24 bytes
5839         per object and lets application code represent an object in 
5840         any conceivable way.
5841
5842         * dbus/dbus-object-registry.c: implement the hard bits of the
5843         DBusConnection aspect of object API. Not yet wired up.
5844         
5845 2003-07-06  Havoc Pennington  <hp@pobox.com>
5846
5847         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
5848         (_dbus_marshal_object_id): new
5849         (_dbus_demarshal_object_id): new
5850         (_dbus_marshal_get_arg_end_pos): support object ID type, and
5851         consolidate identical switch cases. Don't conditionalize handling
5852         of DBUS_TYPE_UINT64, need to handle the type always.
5853         (_dbus_marshal_validate_arg): consolidate identical cases, and
5854         handle DBUS_TYPE_OBJECT_ID
5855
5856         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
5857
5858         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
5859
5860 2003-09-28  Havoc Pennington  <hp@pobox.com>
5861
5862         * real 0.13 release
5863
5864 2003-09-28  Havoc Pennington  <hp@pobox.com>
5865
5866         * doc/Makefile.am (dbus-specification.html): testing a funky hack
5867         to work with Debian db2html
5868
5869 2003-09-28  Havoc Pennington  <hp@pobox.com>
5870
5871         * configure.in: 0.13
5872
5873         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
5874         stylesheet-images for benefit of Debian
5875         
5876         Change back to using filesystem-linked sockets for the system
5877         bus, so only root can create the default system bus address.
5878         
5879         * bus/system.conf.in: change to use
5880         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5881
5882         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
5883         from here.
5884
5885         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5886         here, and AC_DEFINE DBUS_SYSTEM_PATH
5887
5888 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
5889
5890         * doc/TODO:
5891         * doc/busconfig.dtd:
5892         Add busconfig DTD.
5893         
5894 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
5895
5896         * doc/dbus-specification.sgml:
5897         Add activation reply values.
5898         
5899 2003-08-05  Havoc Pennington  <hp@redhat.com>
5900
5901         * configure.in: 0.12
5902
5903 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
5904
5905         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
5906         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
5907         (add_watch), (remove_watch), (create_source):
5908         Refcount fds, fixes some reentrancy issues.
5909         
5910 2003-07-30  Havoc Pennington  <hp@redhat.com>
5911
5912         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
5913         bus address to be abstract if we have abstract sockets
5914
5915         * NEWS: update
5916
5917 2003-07-28  Havoc Pennington  <hp@redhat.com>
5918
5919         * bus/messagebus.in: fix to avoid processname/servicename 
5920         confusion, from Michael Kearey
5921         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
5922         
5923 2003-07-23  Havoc Pennington  <hp@pobox.com>
5924
5925         * dbus/dbus-message.c (dbus_message_iter_get_named): 
5926         fix from Andy Hanton to remove broken "+1"
5927
5928 2003-07-16  Havoc Pennington  <hp@pobox.com>
5929
5930         * tools/dbus-launch.c (babysit): close stdout/stderr in the
5931         babysitter process, as suggested by Thomas Leonard, so 
5932         an "eval `dbus-launch --exit-with-session`" will actually 
5933         return
5934
5935 2003-07-16  Havoc Pennington  <hp@pobox.com>
5936
5937         * configure.in: print out EXPANDED_* variables in the summary at
5938         the end; clean up the code that computes EXPANDED_ variables and
5939         get the ones using exec_prefix right. Should make things work
5940         when you build without --prefix
5941
5942 2003-06-29  Havoc Pennington  <hp@pobox.com>
5943
5944         * mono/Test.cs (class Test): fire up a main loop and run it
5945
5946         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
5947         done once, the app has to do it
5948
5949 2003-06-26  Havoc Pennington  <hp@pobox.com>
5950
5951         * mono/Connection.cs: set up connection with the glib main loop
5952
5953 2003-07-01  Havoc Pennington  <hp@redhat.com>
5954
5955         * doc/dbus-specification.sgml: clarify the format of a type code,
5956         change suggested by Jim Blandy
5957
5958 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
5959
5960         * doc/Makefile.am:
5961         * tools/Makefile.am: Don't assume srcdir == builddir.
5962
5963         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
5964         the allocated block.
5965         (_dbus_memory_test): New function.
5966         * dbus/dbus-test.h: Add _dbus_memory_test ().
5967         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
5968
5969         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
5970         of %c%c%c%c.
5971         (dbus_message_new): Remove obsolete @todo.
5972
5973         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
5974         (_dbus_marshal_set_uint64): Fix comment.
5975
5976         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
5977         hardcode FIELD_REPLY_SERIAL.
5978
5979         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
5980         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
5981
5982         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
5983         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
5984
5985 2003-06-24  Havoc Pennington  <hp@pobox.com>
5986
5987         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
5988
5989 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
5990
5991         * configure.in:
5992         * gcj/.cvsignore:
5993         * gcj/Hello.java:
5994         * gcj/Makefile.am:
5995         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
5996         * gcj/org/.cvsignore:
5997         * gcj/org/Makefile.am:
5998         * gcj/org/freedesktop/.cvsignore:
5999         * gcj/org/freedesktop/Makefile.am:
6000         * gcj/org/freedesktop/dbus/.cvsignore:
6001         * gcj/org/freedesktop/dbus/Makefile.am:
6002         * gcj/org/freedesktop/dbus/Message.java: (Message),
6003         (Message.Message):
6004         * gcj/org/freedesktop/dbus/natMessage.cc:
6005         Fix the build system.
6006
6007 2003-06-22  Havoc Pennington  <hp@pobox.com>
6008
6009         * mono/Connection.cs: add more bindings
6010
6011         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
6012         more than once.
6013
6014 2003-06-22  Havoc Pennington  <hp@pobox.com>
6015
6016         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
6017         Start wrapping more stuff.
6018
6019 2003-06-22  Havoc Pennington  <hp@pobox.com>
6020
6021         * mono/Message.cs: implement Message.Wrap() that ensures we only
6022         have a single C# wrapper per DBusMessage, assuming it works which
6023         it probably doesn't.
6024
6025         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
6026         (dbus_message_free_data_slot): new
6027         (dbus_message_set_data): new
6028         (dbus_message_get_data): new
6029
6030 2003-06-22  Havoc Pennington  <hp@pobox.com>
6031
6032         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
6033         (_dbus_data_slot_allocator_alloc): rework these to keep a
6034         reference count on each slot and automatically manage a global
6035         slot ID variable passed in by address
6036
6037         * bus/bus.c: convert to new dataslot API
6038
6039         * dbus/dbus-bus.c: convert to new dataslot API
6040
6041         * dbus/dbus-connection.c: convert to new dataslot API
6042
6043         * dbus/dbus-server.c: convert to new dataslot API
6044
6045         * glib/dbus-gmain.c: ditto
6046
6047         * bus/test.c: ditto
6048
6049         * bus/connection.c: ditto
6050
6051 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
6052
6053         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
6054         after the gcj checks so that the correct configuration tags
6055         will be added to libtool.
6056
6057         * dbus-glib-1.pc.in: No need to specify any includes since
6058         dbus-1.pc.in has those.
6059
6060 2003-06-22  Havoc Pennington  <hp@pobox.com>
6061
6062         * mono/*, gcj/*, configure.in, Makefile.am:
6063         Check in makefiles and subdirs for mono and gcj bindings.
6064         Neither binding actually exists, just trying to get through
6065         all the build and other boring bits.
6066
6067 2003-06-21  Philip Blundell  <philb@gnu.org>
6068
6069         * tools/dbus-monitor.1: Updated.
6070
6071         * tools/dbus-send.1: Likewise.
6072
6073 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
6074
6075         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
6076         for hangup and error after checking read so we won't discard
6077         pending data if both hangup and read are set.
6078
6079 2003-06-19  Philip Blundell  <philb@gnu.org>
6080
6081         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
6082
6083         * tools/dbus-send.c: Accept both --system and --session.
6084
6085         * tools/dbus-monitor.c: Same here.
6086
6087 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
6088
6089         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
6090         from C++ (Patch by Miloslav Trmac).
6091
6092 2003-06-15  Joe Shaw  <joe@assbarn.com>
6093
6094         * configure.in: Check for socklen_t.
6095
6096         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
6097
6098         * test/test-segfault.c: Add #include <sys/time.h>
6099
6100         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
6101         dbus-launch needs it.
6102
6103 2003-06-09  Havoc Pennington  <hp@redhat.com>
6104
6105         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
6106         SUN_LEN, it breaks abstract socket usage
6107
6108         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
6109         starts of lines.
6110
6111 2003-06-04  Havoc Pennington  <hp@pobox.com>
6112
6113         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
6114         using unix:abstract=/foo, and when listening in a tmpdir
6115         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
6116
6117         * dbus/dbus-transport.c (_dbus_transport_open): support
6118         unix:abstract=/foo
6119
6120         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
6121         support abstract sockets
6122
6123         * dbus/dbus-transport-unix.c
6124         (_dbus_transport_new_for_domain_socket): support abstract sockets
6125
6126         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
6127         toggle as an argument, implement abstract namespace support
6128         (_dbus_listen_unix_socket): ditto
6129
6130         * configure.in: add --enable-abstract-sockets and implement
6131         a configure check for autodetection of the right value.
6132
6133 2003-06-01  Havoc Pennington  <hp@pobox.com>
6134
6135         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
6136         in /tmp (though on Linux this will end up being useless,
6137         when we add abstract namespace support)
6138
6139         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
6140         subst'ing it
6141
6142 2003-05-28  Colin Walters  <walters@verbum.org>
6143
6144         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
6145
6146 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
6147
6148         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
6149
6150 2003-05-17  Colin Walters  <walters@gnu.org>
6151
6152         * tools/dbus-send.c: Don't exit with an error code if --help was
6153         passed.  Default to using the session bus instead of the system
6154         one.
6155
6156         * tools/dbus-launch.c: Ditto.
6157
6158         * tools/dbus-monitor.c: Ditto.
6159
6160         * tools/dbus-send.1: Update with new arguments.
6161
6162         * tools/dbus-launch.c: Emit code to export variables.  New
6163         arguments -s and -c to specify shell syntax, and a bit of code to
6164         autodetect syntax.  Also, allow specifying a program to run.
6165
6166         * tools/dbus-launch.1: Update with new arguments.
6167
6168         * tools/dbus-send.1: Ditto.
6169
6170         * tools/dbus-monitor.1: Ditto.
6171
6172 2003-05-17  Havoc Pennington  <hp@pobox.com>
6173
6174         * bus/config-parser.c (merge_included): merge in policies from
6175         child configuration file.
6176
6177         * bus/policy.c (bus_policy_merge): function to merge two policies
6178         together
6179
6180 2003-05-16  Havoc Pennington  <hp@redhat.com>
6181
6182         * dbus/dbus-connection.c: disable verbose lock spew
6183
6184         * tools/dbus-send.c: add --print-reply command line option
6185
6186         * tools/dbus-print-message.h (print_message): new util function
6187         shared by dbus-send and dbus-monitor
6188
6189         * tools/dbus-monitor.c (handler_func): exit on disconnect
6190
6191         * dbus/dbus-transport-unix.c (do_reading): if the transport is
6192         disconnected, don't try to use the read_watch
6193
6194         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
6195         so we can find this bug more easily
6196
6197 2003-05-16  Havoc Pennington  <hp@redhat.com>
6198
6199         * bus/policy.c (free_rule_list_func): avoid a crash when passed
6200         NULL as DBusHashTable is annoyingly likely to do.
6201
6202 2003-05-16  Colin Walters  <walters@verbum.org>
6203
6204         * tools/dbus-monitor.c: Add --session argument and usage()
6205         function.
6206
6207         * tools/dbus-monitor.1: Update with new --session arg.
6208
6209         * bus/Makefile.am (install-data-hook): Create
6210         $(libdir)/dbus-1.0/services so that the session bus is happy.
6211
6212 2003-05-15  Havoc Pennington  <hp@redhat.com>
6213
6214         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
6215         on non-x86. ifdef's are evil.
6216
6217 2003-05-15  Havoc Pennington  <hp@redhat.com>
6218
6219         * configure.in: 0.11
6220
6221         * NEWS: update
6222
6223         * bus/Makefile.am (initddir): apparently we are supposed to put
6224         init scripts in /etc/rc.d/init.d not /etc/init.d
6225
6226         * bus/Makefile.am: remove the "you must --enable-tests to make
6227         check" as it broke distcheck
6228
6229         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
6230
6231 2003-05-13  James Willcox  <jwillcox@gnome.org>
6232
6233         * configure.in:
6234         * bus/activation.c: (bus_activation_service_created),
6235         (bus_activation_activate_service):
6236         * bus/driver.c: (bus_driver_send_service_deleted),
6237         (bus_driver_send_service_created), (bus_driver_send_service_lost),
6238         (bus_driver_send_service_acquired),
6239         (bus_driver_send_welcome_message),
6240         (bus_driver_handle_list_services):
6241         * bus/session.conf.in:
6242         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
6243         (dbus_bus_service_exists), (dbus_bus_activate_service):
6244         * dbus/dbus-bus.h:
6245
6246         Add some convenience API which lets you activate a service, and did a
6247         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
6248         and dbus_message_get_args()
6249
6250 2003-05-11  Havoc Pennington  <hp@pobox.com>
6251
6252         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
6253         calling _dbus_marshal_validate_arg() for every byte in a byte
6254         array, etc.
6255
6256         * dbus/dbus-message-handler.c: use atomic reference counting to
6257         reduce number of locks slightly; the global lock in here sucks
6258
6259         * dbus/dbus-connection.c
6260         (_dbus_connection_update_dispatch_status_and_unlock): variant of
6261         update_dispatch_status that can be called with lock held; then use
6262         in a couple places to reduce locking/unlocking
6263         (dbus_connection_send): hold the lock over the whole function
6264         instead of acquiring it twice.
6265
6266         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
6267
6268         * bus/connection.c (bus_connections_setup_connection): fix access
6269         to already-freed memory.
6270
6271         * dbus/dbus-connection.c: keep a little cache of linked list
6272         nodes, to avoid using the global linked list alloc lock in the
6273         normal send-message case. Instead we just use the connection lock
6274         that we already have to take.
6275
6276         * dbus/dbus-list.c (_dbus_list_find_last): new function
6277
6278         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
6279         change to use a struct for the atomic type; fix docs,
6280         they return value before increment, not after increment.
6281
6282         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
6283         (_dbus_string_append_8_aligned): new functions to try to
6284         microoptimize this operation.
6285         (reallocate_for_length): break this out of set_length(), to
6286         improve profile info, and also so we can consider inlining the
6287         set_length() part.
6288
6289         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
6290         strings with some preallocation, cuts down on our calls to realloc
6291         a fair bit. Though if we can get the "move entire string to empty
6292         string" optimization below to kick in here, it would be better.
6293
6294         * dbus/dbus-string.c (_dbus_string_move): just call
6295         _dbus_string_move_len
6296         (_dbus_string_move_len): add a special case for moving
6297         an entire string into an empty string; we can just
6298         swap the string data instead of doing any reallocs.
6299         (_dbus_string_init_preallocated): new function
6300
6301 2003-05-11  Havoc Pennington  <hp@pobox.com>
6302
6303         Write a "test-profile" that does echo client-server with threads;
6304         profile reveals lock contention, memcpy/realloc of buffers, and
6305         UTF-8 validation as hot spots. 20% of lock contention eliminated
6306         with dbus_atomic_inc/dec implementation on x86.  Much remaining
6307         contention is global mempool locks for GList and DBusList.
6308
6309         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
6310         x86 implementation
6311
6312         * dbus/dbus-connection.c (struct DBusConnection): use
6313         dbus_atomic_t for the reference count
6314
6315         * dbus/dbus-message.c (struct DBusMessage): declare
6316         dbus_atomic_t values as volatile
6317
6318         * configure.in: code to detect ability to use atomic integer
6319         operations in assembly, from GLib patch
6320
6321         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
6322         time, tired of it being wrong in threads and forked processes
6323
6324         * glib/test-profile.c: a little program to bounce messages back
6325         and forth between threads and eat CPU
6326
6327         * dbus/dbus-connection.c: add debug spew macros for debugging
6328         thread locks; include config.h at top; fix deadlock in
6329         dbus_connection_flush()
6330
6331 2003-05-08  Havoc Pennington  <hp@pobox.com>
6332
6333         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
6334         data from getting written, and there wasn't a good reason to
6335         use _exit really.
6336
6337         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
6338         dbus_verbose lines in test coverage
6339         (main): add list of functions sorted by # of untested blocks
6340         to the coverage report
6341
6342         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
6343
6344         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
6345
6346         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
6347         extend test coverage
6348
6349         * test/data/auth/cancel.auth-script: test canceling an
6350         authentication
6351
6352         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
6353         aren't used. in CVS history if we end up needing them.
6354
6355 2003-05-04  Havoc Pennington  <hp@pobox.com>
6356
6357         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
6358         unit test
6359
6360         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
6361         function, which assumed length was in # of strings, not bytes
6362
6363         * dbus/dbus-message.c (_dbus_message_test): add tests for some
6364         missing coverage
6365
6366         * dbus/dbus-connection.c
6367         (_dbus_connection_queue_received_message): disable function for
6368         now, we are only using it in test mode
6369
6370         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6371         remove a mistaken FIXME
6372
6373 2003-05-04  Havoc Pennington  <hp@pobox.com>
6374
6375         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
6376         unlock mutex on successful return, patch from Anders Gustafsson
6377
6378 2003-05-04  Havoc Pennington  <hp@pobox.com>
6379
6380         * dbus-glib-1.pc.in (Requires): fix dependencies, from
6381         Anders Gustafsson
6382
6383 2003-05-04  Havoc Pennington  <hp@pobox.com>
6384
6385         * tools/dbus-launch.c: implement
6386
6387         * bus/main.c (main), bus/bus.c (bus_context_new):
6388         implement --print-pid and --fork
6389
6390 2003-05-03  Havoc Pennington  <hp@redhat.com>
6391
6392         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
6393         the address had no value, and add to test suite. Fix and
6394         regression test from Miloslav Trmac
6395
6396 2003-05-03  Havoc Pennington  <hp@pobox.com>
6397
6398         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
6399         watch is invalid when handled
6400
6401         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
6402         dbus-launch utility to launch the bus from a shell script.  Didn't
6403         actually implement dbus-launch yet, it's just a placeholder still.
6404
6405 2003-05-03  Havoc Pennington  <hp@pobox.com>
6406
6407         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
6408         daemon; also documents daemon config file, so replaces
6409         doc/config-file.txt. Corrected some stuff from config-file.txt in
6410         the process of moving it.
6411
6412 2003-05-03  Havoc Pennington  <hp@pobox.com>
6413
6414         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
6415         add some man pages
6416
6417 2003-05-03  Colin Walters  <walters@verbum.org>
6418
6419         * dbus/dbus-sysdeps.c (fill_user_info): Test against
6420         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
6421
6422         * Makefile.am: Update to use new .pc versioning scheme.
6423
6424 2003-05-02  Havoc Pennington  <hp@redhat.com>
6425
6426         * bus/system.conf.in: allow send/receive to/from message bus
6427         service
6428
6429 2003-04-30  Havoc Pennington  <hp@redhat.com>
6430
6431         * configure.in: print a note when building with unit tests and
6432         without assertions
6433
6434 2003-04-30  Havoc Pennington  <hp@redhat.com>
6435
6436         * Makefile.am: add a check-local that complains if you didn't
6437         configure with --enable-tests
6438
6439 2003-04-29  Havoc Pennington  <hp@redhat.com>
6440
6441         * glib/dbus-gmain.c: docs cleanups
6442
6443         * dbus/dbus-types.h: add docs on int64 types
6444
6445         * dbus/dbus-memory.c: fix docs to avoid putting private API in
6446         public API docs section
6447
6448 2003-04-29  Havoc Pennington  <hp@redhat.com>
6449
6450         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
6451         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
6452         parallel install API version, not with the D-BUS package version.
6453
6454         * HACKING: move some of README over here
6455
6456         * README: updates, and document API/ABI policy
6457
6458         * configure.in: reindentation
6459
6460 2003-04-29  Havoc Pennington  <hp@redhat.com>
6461
6462         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
6463         to use this library" to be sure people have the right
6464         expectations.
6465
6466 2003-04-28  Havoc Pennington  <hp@redhat.com>
6467
6468         * configure.in: add --enable-docs which by default is auto yes if
6469         doxygen and db2html found, no otherwise; but can be forced on/off
6470
6471         * doc/Makefile.am: conditionalize whether to build docs on
6472         --enable-docs
6473
6474 2003-04-28  Havoc Pennington  <hp@redhat.com>
6475
6476         * configure.in: 0.10
6477
6478         * NEWS: update
6479
6480         * bus/system.conf.in: add <includedir>system.d</includedir>
6481
6482         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
6483         username was provided but not uid
6484
6485         * bus/config-parser.c (struct BusConfigParser): keep track of
6486         whether the parser is toplevel or was included; change some
6487         of the error handling if it's included.
6488
6489 2003-04-27  Havoc Pennington  <hp@pobox.com>
6490
6491         Unbreak my code...
6492
6493         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
6494         report correct status if we finish processing authentication
6495         inside this function.
6496
6497         * bus/activation.c (try_send_activation_failure): use
6498         bus_transaction_send_error_reply
6499
6500         * bus/connection.c (bus_connection_get_groups): return an error
6501         explaining the problem
6502
6503         * bus/bus.c (bus_context_check_security_policy): implement
6504         restriction here that inactive connections can only send the
6505         hello message. Also, allow bus driver to send anything to
6506         any recipient.
6507
6508         * bus/connection.c (bus_connection_complete): create the
6509         BusClientPolicy here instead of on-demand.
6510         (bus_connection_get_policy): don't return an error
6511
6512         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
6513         sender field in message being replied to
6514
6515         * bus/bus.c (bus_context_check_security_policy): fix silly typo
6516         causing it to return FALSE always
6517
6518         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
6519         we checked sender rather than destination
6520
6521 2003-04-25  Havoc Pennington  <hp@redhat.com>
6522
6523         test suite is slightly hosed at the moment, will fix soon
6524
6525         * bus/connection.c (bus_connections_expire_incomplete): fix to
6526         properly disable the timeout when required
6527         (bus_connection_set_name): check whether we can remove incomplete
6528         connections timeout after we complete each connection.
6529
6530         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
6531         probably still broken.
6532
6533         * bus/services.c (bus_registry_acquire_service): implement max
6534         number of services owned, and honor allow/deny rules on which
6535         services a connection can own.
6536
6537         * bus/connection.c (bus_connection_get_policy): report errors here
6538
6539         * bus/activation.c: implement limit on number of pending
6540         activations
6541
6542 2003-04-25  Havoc Pennington  <hp@redhat.com>
6543
6544         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
6545         where we used >= 0 instead of != DBUS_UID_UNSET.
6546
6547 2003-04-25  Havoc Pennington  <hp@redhat.com>
6548
6549         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
6550         were toggled without add/remove, fix from Anders Gustafsson
6551
6552 2003-04-24  Havoc Pennington  <hp@redhat.com>
6553
6554         * test/data/valid-config-files/basic.conf: add <limit> tags to
6555         this test
6556
6557         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
6558         <limit> tag in configuration file.
6559
6560 2003-04-24  Havoc Pennington  <hp@redhat.com>
6561
6562         * bus/dispatch.c: somehow missed some name_is
6563
6564         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
6565         (_dbus_timeout_set_interval): new
6566
6567         * bus/connection.c (bus_connections_setup_connection): record time
6568         when each connection is first set up, and expire them after the
6569         auth timeout passes.
6570
6571 2003-04-24  Havoc Pennington  <hp@redhat.com>
6572
6573         * dbus/dbus-message.c (dbus_message_name_is): rename
6574         (dbus_message_service_is): rename
6575         (dbus_message_sender_is): rename
6576         (dbus_message_get_service): rename
6577
6578 2003-04-24  Havoc Pennington  <hp@redhat.com>
6579
6580         * configure.in: add --enable-checks
6581
6582         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
6583
6584         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
6585         to use thread locks.
6586         (_dbus_connection_handler_destroyed_locked): move some private
6587         functions into proper docs group
6588
6589         * dbus/dbus-internals.h: add _dbus_return_if_fail,
6590         _dbus_return_val_if_fail
6591
6592         Throughout: use dbus_return_if_fail
6593
6594 2003-04-23  James Willcox  <jwillcox@gnome.org>
6595
6596         * glib/dbus-glib.h:
6597         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
6598         (dbus_connection_setup_with_g_main),
6599         (dbus_server_setup_with_g_main):
6600         * glib/test-dbus-glib.c: (main):
6601         * glib/test-thread-client.c: (main):
6602         * glib/test-thread-server.c: (new_connection_callback), (main):
6603         * tools/dbus-monitor.c: (main):
6604
6605         Added a GMainContext argument to dbus_connection_setup_with_g_main()
6606         and dbus_server_setup_with_g_main().
6607
6608 2003-04-20  Havoc Pennington  <hp@pobox.com>
6609
6610         * doc/dbus-specification.sgml: document the restrictions on
6611         message and service names
6612
6613 2003-04-22  Havoc Pennington  <hp@redhat.com>
6614
6615         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
6616         support, and do some code cleanups to share more code and
6617         speed up array marshal/demarshal.
6618
6619         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
6620
6621         * configure.in: generate dbus-arch-deps.h
6622
6623         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
6624         64-bit typecodes
6625
6626 2003-04-22  Havoc Pennington  <hp@redhat.com>
6627
6628         * test/data/valid-messages/opposite-endian.message: fix test
6629         to use proper type for rply field
6630
6631         * test/data/invalid-messages: add tests for below validation
6632
6633         * dbus/dbus-message.c (decode_header_data): validate field types,
6634         and validate that named fields are valid names
6635         (decode_name_field): consider messages in the
6636         org.freedesktop.Local. namespace to be invalid.
6637
6638         * dbus/dbus-string.c (_dbus_string_validate_name): new
6639
6640 2003-04-19  Havoc Pennington  <hp@pobox.com>
6641
6642         * bus/driver.c (bus_driver_handle_hello): check limits and
6643         return an error if they are exceeded.
6644
6645         * bus/connection.c: maintain separate lists of active and inactive
6646         connections, and a count of each. Maintain count of completed
6647         connections per user. Implement code to check connection limits.
6648
6649         * dbus/dbus-list.c (_dbus_list_unlink): export
6650
6651         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
6652         number of bytes in the message queue for a connection
6653
6654 2003-04-18  Havoc Pennington  <hp@pobox.com>
6655
6656         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
6657
6658         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
6659         memleaks
6660
6661         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
6662         on realloc be sure to update the pointer in the keyring
6663
6664         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
6665         offset to avoid writing to unallocated memory
6666
6667         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
6668         try the next mechanism, so we properly handle OOM
6669
6670         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
6671         on OOM.
6672         (_dbus_keyring_new): fix OOM bug
6673         (_dbus_keyring_new_homedir): always set error; impose a maximum
6674         number of keys we'll load from the file, mostly to speed up the
6675         test suite and make its OOM checks more useful, but also for
6676         general sanity.
6677
6678         * dbus/dbus-auth.c (process_error_server): reject authentication
6679         if we get an error from the client
6680         (process_cancel): on cancel, send REJECTED, per the spec
6681         (process_error_client): send CANCEL if we get an error from the
6682         server.
6683
6684 2003-04-18  Havoc Pennington  <hp@pobox.com>
6685
6686         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
6687         debug spew
6688
6689         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
6690         handling problem
6691
6692         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
6693         about DBUS_TEST_HOMEDIR once
6694
6695         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
6696         the environment
6697
6698         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
6699         config file so we test the right thing
6700
6701         Throughout: assorted docs improvements
6702
6703 2003-04-18  Havoc Pennington  <hp@pobox.com>
6704
6705         * glib/dbus-gmain.c: adapt to watch changes
6706
6707         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
6708
6709         * dbus/dbus-server.h: remove dbus_server_handle_watch
6710
6711         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
6712
6713         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
6714         like DBusTimeout, so we don't need dbus_connection_handle_watch
6715         etc.
6716
6717 2003-04-17  Havoc Pennington  <hp@redhat.com>
6718
6719         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
6720         database usage so it all goes via the DBusUserDatabase cache.
6721
6722 2003-04-17  Havoc Pennington  <hp@redhat.com>
6723
6724         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
6725         there was an OOM watch we skipped, we always return TRUE so we
6726         iterate again to have a look at it again. Fixes test suite hang.
6727         Code rearrangement also lets us lose some memset and only iterate
6728         over callbacks once.
6729
6730         * bus/driver.c (bus_driver_handle_message): sense of test for
6731         reply was backward
6732
6733 2003-04-16  Havoc Pennington  <hp@pobox.com>
6734
6735         * doc/dbus-specification.sgml: make spec say serials are unsigned
6736
6737         * dbus/dbus-message.h: change message serials to unsigned
6738
6739         * dbus/dbus-connection.c: adapt to message serials being unsigned
6740
6741 2003-04-15  Havoc Pennington  <hp@pobox.com>
6742
6743         * bus/bus.c: create and keep around a shared DBusUserDatabase
6744         object.
6745
6746         * bus/connection.c (bus_connection_get_groups): don't cache
6747         groups for user in the connection object, since user database
6748         object now does that.
6749
6750 2003-04-16  Havoc Pennington  <hp@redhat.com>
6751
6752         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
6753         list of size counters
6754         (_dbus_message_loader_putback_message_link): put back a popped link
6755
6756         * dbus/dbus-connection.c
6757         (dbus_connection_set_max_live_messages_size): rename
6758         max_received_size
6759         (dbus_connection_get_outgoing_size): get size of outgoing
6760         queue
6761         (_dbus_connection_set_connection_counter): remove this cruft
6762
6763 2003-04-14  Havoc Pennington  <hp@redhat.com>
6764
6765         * dbus/dbus-userdb.c: user database abstraction, mostly to get
6766         caching, but at some point we might want to be able to use a
6767         different database.
6768
6769         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
6770         SHA1 conf file to test the sha1 auth mechanism, since the regular
6771         test always uses EXTERNAL when available.
6772
6773         * configure.in,
6774         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
6775         add conf file that requires use of sha1 auth
6776
6777 2003-04-13  Havoc Pennington  <hp@pobox.com>
6778
6779         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
6780         from Philip Blundell to send messages and monitor them.
6781
6782 2003-04-13  Havoc Pennington  <hp@pobox.com>
6783
6784         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
6785         callbacks
6786
6787         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
6788         users
6789
6790         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
6791         fix to only recover unused bytes if we're already authenticated
6792         (_dbus_transport_get_is_authenticated): fix to still mark us
6793         authenticated if there are unused bytes.
6794
6795         * bus/dispatch.c: implement security policy checking
6796
6797         * bus/connection.c (bus_transaction_send_from_driver): new
6798
6799         * bus/bus.c (bus_context_check_security_policy): new
6800
6801         * bus/dispatch.c (send_service_nonexistent_error): delete this,
6802         now we just set the DBusError and it gets converted to an error
6803         reply.
6804
6805         * bus/connection.c (allow_user_function): enable code using actual
6806         data from the config file
6807
6808         * bus/policy.c (list_allows_user): handle wildcard rules for
6809         user/group connection perms
6810
6811 2003-04-13  Havoc Pennington  <hp@pobox.com>
6812
6813         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
6814
6815         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
6816
6817         * bus/policy.c (bus_policy_append_mandatory_rule)
6818         (bus_policy_append_default_rule, bus_policy_append_user_rule)
6819         (bus_policy_append_group_rule): new functions
6820
6821 2003-04-12  Havoc Pennington  <hp@pobox.com>
6822
6823         * bus/config-parser.c (bus_config_parser_new): fix a memleak
6824
6825         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
6826         the pid/gid/uid, just for paranoia.
6827
6828         * test/break-loader.c (randomly_do_n_things): find a byte
6829         containing a type code, and randomly change it to a different
6830         type code.
6831
6832 2003-04-12  Havoc Pennington  <hp@pobox.com>
6833
6834         * bus/policy.h: change BusPolicy to be the thing from the config
6835         file, and rename old BusPolicy to BusClientPolicy
6836
6837         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
6838         match change in how policy works
6839
6840         * dbus/dbus-internals.h: mark assert_not_reached as
6841         __attribute((noreturn))__
6842
6843 2003-04-11  Havoc Pennington  <hp@redhat.com>
6844
6845         * doc/dbus-specification.sgml: fix a spot with the wrong name for
6846         the broadcast service. Use boolean return for ServiceExists.
6847
6848 2003-04-11  Havoc Pennington  <hp@redhat.com>
6849
6850         * configure.in: add another directory to look for qt in.
6851
6852 2003-04-11  Havoc Pennington  <hp@redhat.com>
6853
6854         * AUTHORS: add Colin Walters
6855
6856 2003-04-11  Havoc Pennington  <hp@redhat.com>
6857
6858         * NEWS: update
6859
6860         * configure.in: 0.9
6861
6862 2003-04-11  Havoc Pennington  <hp@redhat.com>
6863
6864         * bus/messagebus.in: remove pid file when stopping the
6865         message bus, since the bus won't have privileges to remove it
6866         itself.
6867
6868 2003-04-11  Havoc Pennington  <hp@redhat.com>
6869
6870         * bus/bus.c (bus_context_new): move credentials change after
6871         creating pidfile
6872
6873 2003-04-11  Havoc Pennington  <hp@pobox.com>
6874
6875         * test/decode-gcov.c: add "below average functions" to the
6876         coverage report, and change how some of the code works.
6877
6878         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
6879         not in the coverage stats.
6880
6881         * test/test-service.c (main): use _dbus_verbose not fprintf in a
6882         couple places so running the test suite doesn't result in megaspam.
6883
6884 2003-04-11  Havoc Pennington  <hp@pobox.com>
6885
6886         * bus/dispatch.c (check_existent_service_activation): accept a no
6887         memory error in a place we didn't before
6888
6889         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
6890         in case the first one failed," since the test suite is less
6891         broken now.
6892
6893 2003-04-10  Havoc Pennington  <hp@pobox.com>
6894
6895         * bus/dispatch.c (check_segfault_service_activation): add test
6896         for launching an executable that just crashes.
6897
6898         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
6899         don't leave a million cores. We'll see how portable this is.
6900
6901 2003-04-10  Havoc Pennington  <hp@pobox.com>
6902
6903         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
6904         the possible parent failures before we fork, so that we don't
6905         fail to create a babysitter after creating the child.
6906
6907         * bus/activation.c (bus_activation_activate_service): kill child
6908         if we don't successfully complete the activation.
6909
6910 2003-04-10  Havoc Pennington  <hp@redhat.com>
6911
6912         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
6913         the connection if it's disconnected
6914
6915         * bus/activation.c (bus_activation_service_created): use new
6916         transaction features to roll back removal of pending activation if
6917         we don't successfully create the service after all. Don't remove
6918         pending activation if the function fails.
6919
6920         * dbus/dbus-list.c (_dbus_list_insert_before_link)
6921         (_dbus_list_insert_after_link): new code to facilitate
6922         services.c fixes
6923
6924         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
6925         new functionality, so we can preallocate the ability to insert
6926         into a hash table.
6927
6928         * bus/connection.c (bus_transaction_add_cancel_hook): new function
6929         allowing us to put custom hooks in a transaction to be used for
6930         cancelling said transaction
6931
6932         * doc/dbus-specification.sgml: add some discussion of secondary
6933         service owners, and disallow zero-length service names
6934
6935         * bus/services.c (bus_registry_acquire_service): new function,
6936         splits out part of bus_driver_handle_acquire_service() and fixes
6937         a bug where we didn't remove the service doing the acquiring
6938         from the secondary queue if we failed to remove the current owner
6939         from the front of the queue.
6940
6941 2003-04-10  Alexander Larsson  <alexl@redhat.com>
6942
6943         * doc/dbus-specification.sgml:
6944         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
6945
6946 2003-04-10  Alexander Larsson  <alexl@redhat.com>
6947
6948         * bus/.cvsignore:
6949         * glib/.cvsignore:
6950         * test/.cvsignore:
6951         Added files to cvsignore
6952
6953         * dbus/dbus-message.h:
6954         * dbus/dbus-message.c: (dbus_message_iter_get_named):
6955         Make get_named() take two out argument and return a boolean.
6956         (dbus_message_iter_get_args_valist):
6957         Update usage of get_named().
6958         (dbus_message_iter_append_byte):
6959         Fix typo
6960         (dbus_message_iter_append_named)
6961         Fix typo
6962         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
6963         More tests.
6964
6965 2003-04-10  Alexander Larsson  <alexl@redhat.com>
6966
6967         * dbus/dbus-marshal.[ch]:
6968         Add array_type_pos argument to _dbus_marshal_validate_arg.
6969         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
6970
6971         * dbus/dbus-message.[ch]:
6972         Multi-dimensional arrays have full type specification in the
6973         outermost array. Iter code re-arranged to handle this.
6974         Added some more iter tests.
6975
6976         * doc/dbus-specification.sgml:
6977         Add me to authors.
6978         Remove old FIXME.
6979         Update new array encoding description.
6980         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
6981
6982         * test/data/invalid-messages/array-with-mixed-types.message:
6983         * test/data/valid-messages/array-of-array-of-uint32.message:
6984         Change to the new array format.
6985
6986         * test/data/invalid-messages/too-short-dict.message:
6987         Fix bug in test.
6988
6989         * test/data/valid-messages/recursive-types.message:
6990         Fix up and extend test.
6991
6992 2003-04-10  Havoc Pennington  <hp@pobox.com>
6993
6994         * bus/dispatch.c: lots of fixes
6995
6996         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
6997         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
6998         that was crack, broke the test service.
6999
7000         * dbus/dbus-transport.c (_dbus_transport_open): fix error
7001         handling to avoid piling up errors if we get a failure on the
7002         first address.
7003
7004         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
7005         pid in assertion failures.
7006
7007         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
7008         to some fixed size of file descriptor array. Don't return TRUE
7009         anytime a timeout exists, that led to lots of busy loop silliness
7010         in the tests.
7011
7012 2003-04-09  Havoc Pennington  <hp@redhat.com>
7013
7014         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
7015         I'd checked this in earlier but hadn't.
7016
7017 2003-04-09  Havoc Pennington  <hp@redhat.com>
7018
7019         * bus/dispatch.c (bus_dispatch_test): get a bit further through
7020         the activation test (man this is getting old!)
7021
7022 2003-04-09  Havoc Pennington  <hp@redhat.com>
7023
7024         * test/test-utils.c: use dispatch status function to fix this up
7025
7026         * bus/connection.c (connection_watch_callback): don't dispatch
7027         from here
7028         (connection_timeout_callback): don't dispatch from here
7029         (bus_connections_setup_connection): set the dispatch status function
7030         (bus_connection_disconnected): unset it
7031
7032         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
7033         used to add a connection to be dispatched
7034         (_dbus_loop_iterate): do the dispatching at the end of each
7035         iteration
7036
7037         * dbus/dbus-connection.c
7038         (dbus_connection_set_dispatch_status_function): new function
7039         allowing us to fix up main loop usage
7040         (_dbus_connection_last_unref): free all the various function
7041         user data
7042         (dbus_connection_dispatch): call the DispatchStatusFunction
7043         whenever this function returns
7044         (dbus_connection_handle_watch): call DispatchStatusFunction
7045         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
7046         (reply_handler_timeout): call DispatchStatusFunction
7047         (dbus_connection_flush): call DispatchStatusFunction
7048
7049 2003-04-09  Havoc Pennington  <hp@redhat.com>
7050
7051         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
7052         a memory leak
7053
7054         * bus/dispatch.c (check_service_activated): fix bug in test
7055
7056         * dbus/dbus-mainloop.c (check_timeout): fix this up
7057
7058         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
7059         verbose output so we can sort out output from different processes,
7060         e.g. in the activation case.
7061
7062 2003-04-08  Colin Walters  <walters@gnu.org>
7063
7064         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
7065         the pid file.
7066         (bus_context_new): Set it.
7067         (bus_context_unref): Use it to delete the pid file.
7068
7069 2003-04-08  Havoc Pennington  <hp@redhat.com>
7070
7071         * test/data/invalid-messages/array-with-mixed-types.message:
7072         regression test that fails for the moment
7073
7074         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
7075         tests for convenience
7076
7077         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
7078         array of nil, it broke things.
7079
7080         * test/data/invalid-messages/array-of-nil.message: regression test
7081
7082         * test/data/valid-messages/array-of-array-of-uint32.message:
7083         happened to write this so added it to suite
7084
7085 2003-04-08  Havoc Pennington  <hp@redhat.com>
7086
7087         * bus/driver.c (bus_driver_handle_acquire_service): init
7088         retval/reply before checking name
7089
7090         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
7091         recursion depth argument
7092
7093         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
7094         in the public struct for future extension
7095
7096         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
7097         typo
7098
7099         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
7100         message
7101
7102         * doc/dbus-specification.sgml: fix typo
7103
7104 2003-04-08  Alexander Larsson  <alexl@redhat.com>
7105
7106         Implemented recursive types, named types and new-style iters
7107
7108         * bus/driver.c:
7109         * glib/test-thread-client.c: (thread_func):
7110         * glib/test-thread-server.c: (handle_test_message):
7111         * test/test-service.c: (handle_echo):
7112         Update to new api
7113
7114         * dbus/Makefile.am:
7115         * dbus/dbus-dict.c:
7116         * dbus/dbus-dict.h:
7117         * dbus/dbus.h
7118         Remove DBusDict
7119
7120         * dbus/dbus-internals.c: (_dbus_type_to_string):
7121         Update for new types.
7122
7123         * dbus/dbus-marshal.[ch]:
7124         Implement recursive types and the new marshalling format.
7125         Remove hardcoded dict marshalling.
7126         Marshal named types.
7127
7128         * dbus/dbus-message-builder.c:
7129         Add BYTE_ARRAY.
7130         Remove references to old types
7131
7132         * dbus/dbus-message.[ch]:
7133         New non-refcounted iter API that supports recursive iters.
7134         Use iters for appending, including support for recursive
7135         iters.
7136         Add byte and named type support.
7137         Update everything to new marshalling formats.
7138         Add tests for new API.
7139
7140         * dbus/dbus-protocol.h:
7141         Remove old array types.
7142         Add types: BYTE, ARRAY, DICT, NAMED
7143
7144         * dbus/dbus-string.c:
7145         * dbus/dbus-sysdeps.c:
7146         Make parse_double locale safe.
7147
7148         * dbus/dbus-test-main.c:
7149         Call setlocale.
7150
7151         * dbus/dbus-test.c:
7152         Kill dict test
7153
7154         * doc/dbus-specification.sgml:
7155         Update spec
7156
7157         * test/data/incomplete-messages/missing-body.message:
7158         * test/data/invalid-messages/bad-boolean.message:
7159         * test/data/invalid-messages/bad-boolean-array.message:
7160         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
7161         * test/data/invalid-messages/boolean-has-no-value.message-raw:
7162         * test/data/invalid-messages/too-short-dict.message:
7163         * test/data/valid-messages/dict-simple.message:
7164         * test/data/valid-messages/dict.message:
7165         * test/data/valid-messages/emptiness.message:
7166         * test/data/valid-messages/lots-of-arguments.message:
7167         * test/data/valid-messages/no-padding.message:
7168         * test/data/valid-messages/recursive-types.message:
7169         Add missing NAME fields
7170         Fix up dicts & arrays
7171
7172         * test/data/invalid-messages/dict-with-nil-value.message:
7173         Removed, this is not invalid anymore.
7174
7175         * test/data/valid-messages/recursive-types.message:
7176         Add new test for deeply recursive types.
7177
7178 2003-04-07  Havoc Pennington  <hp@pobox.com>
7179
7180         * bus/driver.c (bus_driver_handle_acquire_service): return an
7181         error if you try to acquire a service that starts with ':'
7182
7183 2003-04-07  Havoc Pennington  <hp@redhat.com>
7184
7185         * doc/dbus-specification.sgml: require that base service names
7186         start with ':' and that the base service is created/deleted
7187         as first and last things a connection does on the bus
7188
7189         * bus/dispatch.c (check_existent_service_activation): lots more
7190         work on the activation test; it doesn't fully pass yet...
7191
7192         * test/test-service.c (main): fix so we don't memleak the
7193         connection to the message bus
7194         (filter_func): accept a message asking us to exit
7195
7196 2003-04-06  Havoc Pennington  <hp@pobox.com>
7197
7198         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
7199         from Colin Walters
7200
7201         * configure.in: fixes to Qt detection from Colin Walters
7202
7203         * doc/Makefile.am: Only remove generated docbook dirs if they
7204         exist, from Colin Walters
7205
7206         * dbus/dbus-bus.c: change how we set well-known connections to
7207         NULL, so that it works if a single connection is stored in
7208         two well-known array slots.
7209
7210         * test/Makefile.am: remove a lot of stuff that isn't immediately
7211         useful, it's in CVS history if we want it.
7212
7213         * test/test-service.c: use dbus-mainloop instead of that
7214         watch.[hc] crack
7215
7216 2003-04-06  Havoc Pennington  <hp@pobox.com>
7217
7218         * dbus/Makefile.am: split lists of sources into stuff that goes in
7219         the library, util functions that go in the lib and are also used
7220         elsewhere, and util functions that are used in tests/daemon but
7221         don't go in the lib.
7222
7223         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
7224         here so it can be used in test binaries also
7225
7226 2003-04-06  Havoc Pennington  <hp@pobox.com>
7227
7228         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
7229         here in the parent process, so we can return an error if it
7230         fails. Also, move some of the code into the child so the parent
7231         is less hosed if we fail midway through.
7232
7233         * bus/bus.c (bus_context_new): move pidfile detection further up
7234         in the function, before we start overwriting sockets and such.
7235
7236         * bus/messagebus.in: adjust this a bit, not sure if it will work.
7237
7238         * configure.in: add --with-system-pid-file and --with-system-socket
7239
7240 2003-04-06  Colin Walters  <walters@verbum.org>
7241
7242         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
7243
7244         * bus/system.conf.in: Declare a pidfile.
7245
7246         * bus/bus.c (bus_context_new): Test for an existing pid file, and
7247         create one (if appropriate).
7248
7249         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
7250         (struct BusConfigParser) [pidfile]: New.
7251         (element_type_to_name, merge_included, start_busconfig_child)
7252         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
7253         (bus_config_parser_unref): Free it.
7254         (bus_config_parser_get_pidfile): New function.
7255
7256         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
7257
7258         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
7259
7260         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
7261
7262         * dbus/dbus-sysdeps.h: Prototype it.
7263
7264 2003-04-06  Havoc Pennington  <hp@pobox.com>
7265
7266         * bus/bus.c (bus_context_new): print the address in here, rather
7267         than in main(), because we need to do it before forking the daemon
7268
7269         * bus/dispatch.c (send_service_nonexistent_error): set the sender
7270         on the service nonexistent error
7271
7272         * bus/driver.c (bus_driver_handle_acquire_service): set the
7273         sender on the AcquireService reply
7274
7275         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
7276         server also listen on a UNIX socket so services can connect to it.
7277
7278 2003-04-06  Havoc Pennington  <hp@pobox.com>
7279
7280         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
7281         so it detects deadlocks and also we actually init threads when
7282         debugging.
7283
7284 2003-04-06  Havoc Pennington  <hp@pobox.com>
7285
7286         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7287         save the domain socket name, and unlink it when we disconnect the
7288         server. Means that at least when we exit normally, we won't leave
7289         a bunch of junk in /tmp
7290
7291         * dbus/dbus-transport-unix.c
7292         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
7293         memory management). (I was making a real change here but then
7294         didn't)
7295
7296 2003-04-06  Havoc Pennington  <hp@pobox.com>
7297
7298         * bus/bus.c (bus_context_new): fix wrong handling of
7299         server_data_slot_unref() in the error case.
7300
7301         * dbus/dbus-internals.h (_dbus_assert): change so it passes
7302         "(condition) != 0" to _dbus_real_assert so that
7303         "_dbus_assert (pointer)" doesn't cause a warning
7304
7305         * bus/main.c (main): accept --print-address option to print out
7306         the message bus address
7307
7308         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
7309
7310         * dbus/dbus-transport.c (_dbus_transport_open): special error for
7311         "tmpdir" option to unix: address on client side
7312
7313         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
7314         to unix: address
7315
7316         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
7317         we can use to create sockets in the test suite.
7318
7319         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
7320         cleanly. To be used for testing.
7321
7322         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
7323
7324         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
7325
7326         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
7327         handle trying to call this when there's no servers active
7328
7329 2003-04-05  Havoc Pennington  <hp@pobox.com>
7330
7331         * NEWS: update
7332
7333         * configure.in: 0.8
7334
7335 2003-04-05  Havoc Pennington  <hp@pobox.com>
7336
7337         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
7338         crash on startup. Need to get "try starting the daemon"
7339         in the test suite I guess. ;-)
7340
7341         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
7342         tracked the number of open connections; it's better done in
7343         application-specific code as you want it to span all servers etc.
7344
7345 2003-04-05  Havoc Pennington  <hp@pobox.com>
7346
7347         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
7348         patch from Colin Walters
7349
7350 2003-04-05  Havoc Pennington  <hp@pobox.com>
7351
7352         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
7353         reality; in fact multiple mechanisms are allowed.
7354
7355         * dbus/dbus-internals.c (_dbus_real_assert)
7356         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
7357         _dbus_assert_not_reached() into functions, so that they don't show
7358         up in basic block counts for test coverage, and don't use up as
7359         much disk space. Does mean slower execution speed though, so
7360         assumes --disable-asserts is the normal production case.
7361
7362 2003-04-05  Havoc Pennington  <hp@pobox.com>
7363
7364         * test/Makefile.am (dist-hook): also dist *.in files
7365
7366         * NEWS: update
7367
7368         * configure.in: 0.7
7369
7370 2003-04-05  Havoc Pennington  <hp@pobox.com>
7371
7372         * dbus/dbus-string.c: docs warning
7373
7374         * dbus/dbus-spawn.c: missing docs
7375
7376         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
7377
7378 2003-04-05  Havoc Pennington  <hp@pobox.com>
7379
7380         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
7381         magic from GLib
7382
7383         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
7384         to -1 once we've reaped the babysitter
7385         (_dbus_babysitter_handle_watch): do as much work as we can, not
7386         just one go of it
7387
7388         * bus/activation.c: add code using DBusBabysitter so that we
7389         handle it when a service fails to start up properly.
7390         (bus_activation_service_created): don't remove the activation
7391         entries as we go, just let them get removed when we free the pending
7392         activation. Unref reply messages after sending them.
7393
7394 2003-04-05  Havoc Pennington  <hp@pobox.com>
7395
7396         * test/decode-gcov.c (main): print per-directory stats in the report
7397
7398         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
7399
7400 2003-04-05  Havoc Pennington  <hp@pobox.com>
7401
7402         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
7403
7404         * test/decode-gcov.c: hack up a little program to suck data
7405         out of gcov files. Yes this is sort of silly.
7406
7407         * configure.in: define something in config.h and do an
7408         AM_CONDITIONAL when gcov is enabled
7409
7410 2003-04-04  Havoc Pennington  <hp@redhat.com>
7411
7412         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
7413         return a "babysitter" object that is used to monitor the status of
7414         the spawned process and reap it when required.
7415
7416         * test/test-segfault.c, test/test-exit.c,
7417         test/test-sleep-forever.c: binaries that do various lame things,
7418         used in the test suite.
7419
7420         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
7421
7422 2003-04-03  Havoc Pennington  <hp@pobox.com>
7423
7424         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
7425         in preparation for modifying it, dbus-sysdeps is getting
7426         a bit unmanageable.
7427
7428 2003-04-03  Havoc Pennington  <hp@redhat.com>
7429
7430         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
7431         have multiple ones
7432
7433         * bus/*.[hc]: adapt to mainloop change
7434
7435 2003-04-03  Havoc Pennington  <hp@redhat.com>
7436
7437         * bus/activation.c (load_directory): fix up memleaks
7438         (bus_activation_entry_free): free the entry
7439
7440         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
7441         we get one from the message bus; fix memleaks.
7442
7443         * dbus/dbus-message.c (dbus_set_error_from_message): new function
7444
7445 2003-04-03  Havoc Pennington  <hp@pobox.com>
7446
7447         * bus/config-parser.c (bus_config_parser_unref): free
7448         list of mechanisms, bug discovered by test suite enhancements
7449         (putting system.conf and session.conf into suite)
7450
7451         * test/Makefile.am, test/test-service.c: add placeholder for a
7452         test service that we'll activate as part of test suite. Doesn't
7453         do anything yet.
7454
7455         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
7456         setting NULL value, and use system malloc not dbus_malloc()
7457         when we have unavoidable memleakage.
7458
7459         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
7460         didn't work, and support DBUS_BUS_ACTIVATION.
7461
7462         * bus/activation.c (child_setup): pass our well-known bus type to
7463         the child
7464
7465         * bus/config-parser.c: support <type> to specify well-known type
7466
7467         * doc/dbus-specification.sgml: document the env variables to
7468         locate well-known buses and find service activator
7469
7470 2003-04-02  Havoc Pennington  <hp@redhat.com>
7471
7472         * test/Makefile.am (all-local): add a rule to copy tests to
7473         builddir, so we can have generated tests. Use this to remove the
7474         silly hack for testing system.conf and session.conf. Will use this
7475         shortly to generate .service files pointing to test binaries.
7476
7477 2003-04-02  Havoc Pennington  <hp@redhat.com>
7478
7479         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
7480         current alloc and needed new length, not max of the doubled
7481         allocation and needed new length. Also, when building tests,
7482         don't do the double-allocation stuff, just realloc every time.
7483
7484 2003-04-02  Havoc Pennington  <hp@redhat.com>
7485
7486         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
7487         in error messages
7488         (_dbus_string_get_dirname): new
7489         (_dbus_sysdeps_test): new
7490         (_dbus_directory_open): include dirnames in error messages
7491
7492         * bus/config-parser.c: interpret <include> and <includedir> and
7493         <servicedir> relative to config file location if the given
7494         filename is not absolute.
7495
7496         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
7497
7498 2003-04-02  Havoc Pennington  <hp@redhat.com>
7499
7500         * bus/connection.c (bus_transaction_send_error_reply): set sender
7501         service for the error, and unref the reply on success
7502
7503         * bus/activation.c: convert to use BusTransaction so OOM can be
7504         handled correctly
7505         (bus_activation_service_created): set sender of the message
7506
7507 2003-04-01  Havoc Pennington  <hp@redhat.com>
7508
7509         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
7510         <includedir> (at least mostly)
7511
7512         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
7513         first, then the user ID
7514
7515 2003-04-01  Havoc Pennington  <hp@pobox.com>
7516
7517         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
7518         function
7519
7520         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
7521
7522         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
7523
7524         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
7525         socket 0777, and unlink any existing socket.
7526
7527         * bus/bus.c (bus_context_new): change our UID/GID and fork if
7528         the configuration file so specifies; set up auth mechanism
7529         restrictions
7530
7531         * bus/config-parser.c (bus_config_parser_content): add support
7532         for <fork> option and fill in code for <auth>
7533
7534         * bus/system.conf.in: add <fork/> to default configuration,
7535         and limit auth mechanisms to EXTERNAL
7536
7537         * doc/config-file.txt (Elements): add <fork>
7538
7539         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
7540         (_dbus_change_identity): new function
7541
7542 2003-03-31  Havoc Pennington  <hp@redhat.com>
7543
7544         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
7545         (_dbus_listen_unix_socket): fix off-by-one error in null
7546         termination spotted by Nalin
7547
7548 2003-03-31  Havoc Pennington  <hp@redhat.com>
7549
7550         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
7551         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
7552         having a real home directory available.
7553
7554 2003-03-31  Havoc Pennington  <hp@redhat.com>
7555
7556         * bus/Makefile.am (install-data-hook): create /var/run/dbus
7557
7558         * bus/messagebus.in: add init script for Red Hat /etc/init.d
7559
7560         * configure.in: add support for specifying a style of init script
7561         to install
7562
7563 2003-03-31  Havoc Pennington  <hp@redhat.com>
7564
7565         Fix some annoying DBusString API and fix all affected code.
7566
7567         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
7568         max_length argument
7569         (_dbus_string_get_data): change to return string instead of using
7570         an out param
7571         (_dbus_string_get_const_data): ditto
7572         (_dbus_string_get_data_len): ditto
7573         (_dbus_string_get_const_data_len): ditto
7574
7575 2003-03-31  Havoc Pennington  <hp@redhat.com>
7576
7577         * bus/main.c (main): fix up the command line arguments to be nicer
7578
7579 2003-03-31  Havoc Pennington  <hp@redhat.com>
7580
7581         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
7582         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
7583         final location that lands in the config file
7584
7585         * bus/config-loader-expat.c (bus_config_load): fix type of
7586         XML_Parser variable
7587
7588         * doc/TODO: remove TODO item for dbus_bus_get()
7589
7590         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
7591
7592 2003-03-31  Havoc Pennington  <hp@pobox.com>
7593
7594         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
7595         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
7596         argument since they are always client side
7597
7598         * dbus/dbus-server.c (dbus_server_get_address): new function
7599
7600         * bus/main.c (main): take the configuration file as an argument.
7601
7602         * test/data/valid-config-files/debug-allow-all.conf: new file to
7603         use with dispatch.c tests for example
7604
7605         * bus/test-main.c (main): require test data dir
7606
7607         * bus/bus.c (bus_context_new): change this to take a
7608         configuration file name as argument
7609
7610         * doc/config-file.txt (Elements): add <servicedir>
7611
7612         * bus/system.conf, bus/session.conf: new files
7613
7614         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
7615         well-known socket if none set
7616
7617         * configure.in: create system.conf and session.conf
7618
7619 2003-03-30  Havoc Pennington  <hp@pobox.com>
7620
7621         * bus/config-parser.c: hacking
7622
7623         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
7624         to shut down, since it could cause weirdness with the DBusList
7625         lock
7626
7627         * dbus/dbus-list.c (_dbus_list_test): add tests for the
7628         link-oriented stack routines
7629         (alloc_link): free the mempool if the first alloc from it fails
7630
7631         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
7632
7633         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
7634         from GLib
7635         (_dbus_string_skip_white): new
7636
7637         * doc/config-file.txt (Elements): add <includedir>
7638
7639 2003-03-28  Havoc Pennington  <hp@pobox.com>
7640
7641         * dbus/dbus-string.c (_dbus_string_copy_data_len)
7642         (_dbus_string_copy_data): new functions
7643
7644 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
7645
7646         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
7647         * dbus/dbus-bus.h:
7648         Add dbus_bus_get.
7649
7650         * dbus/dbus-memory.c:
7651         Fix a doc comment.
7652
7653 2003-03-28  Havoc Pennington  <hp@pobox.com>
7654
7655         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
7656         I think it may have just been superstition. Not sure.
7657
7658         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
7659         failures that were not being handled.
7660
7661         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
7662
7663         * dbus/dbus-memory.c: add ability to set number of mallocs in a
7664         row that will fail on out-of-memory.
7665
7666         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
7667         function for testing out-of-memory handling.
7668
7669         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
7670         allocation functions, they do map exactly to the expat ones.
7671
7672 2003-03-27  Havoc Pennington  <hp@redhat.com>
7673
7674         * bus/config-loader-libxml.c (bus_config_load): add another error
7675         check
7676
7677 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
7678
7679         * doc/TODO:
7680         Add note about automatic service activation.
7681
7682         * doc/dbus-specification.sgml:
7683         Rename the specification and clarify a few things.
7684
7685 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
7686
7687         * Doxyfile.in:
7688         * dbus/dbus-address.c:
7689         * dbus/dbus-dict.c:
7690         * dbus/dbus-marshal.c:
7691         * dbus/dbus-server-debug-pipe.c:
7692         * dbus/dbus-transport-unix.c:
7693         Fix documentation warnings.
7694
7695 2003-03-26  Havoc Pennington  <hp@pobox.com>
7696
7697         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
7698         after every test so it's quick and easy to see which leaked, and
7699         so we test multiple dbus_shutdown() calls
7700
7701         * configure.in: change configure.in XML stuff to also support
7702         expat
7703
7704         * config-loader-libxml.c: some hacking
7705
7706         * config-loader-expat.c: some hacking
7707
7708         * config-parser.c: some hacking, plus tests
7709
7710 2003-03-25  Havoc Pennington  <hp@redhat.com>
7711
7712         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
7713
7714         * configure.in: add --with-xml option to specify XML library,
7715         right now only libxml is supported.
7716
7717         * bus/config-loader-libxml.c, config-parser.c: sync some minor
7718         nonworking code between home and work, still just stubs
7719
7720 2003-03-24  Havoc Pennington  <hp@redhat.com>
7721
7722         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
7723         file
7724
7725         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
7726         NULL argument for "message" if the error is a well-known one,
7727         fill in a generic message in this case.
7728
7729         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
7730         favor of DBusError
7731
7732         * bus/test.c (bus_test_flush_bus): add
7733
7734         * bus/policy.c (bus_policy_test): test code stub
7735
7736 2003-03-24  Havoc Pennington  <hp@pobox.com>
7737
7738         * bus/connection.c (bus_connections_setup_connection): set up
7739         the "can this user connect" function, but it always returns
7740         TRUE until we have a config file parser so we can have a config
7741         file that allows connections.
7742
7743 2003-03-23  Havoc Pennington  <hp@pobox.com>
7744
7745         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
7746         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
7747         the mutex, so we can check for proper memory management
7748         and OOM handling.
7749
7750         * dbus/dbus-dataslot.c: remove the mutex from
7751         DBusDataSlotAllocator and lock it manually when using it,
7752         to simplify fitting it into the global slots framework.
7753
7754         * dbus/dbus-threads.c (init_static_locks): rework how we're
7755         handling global locks so they are easily shut down.
7756
7757         * bus/policy.c (bus_policy_append_rule): fix
7758
7759         * bus/test-main.c (main): check for memleaks
7760
7761         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
7762         test suite check for memleaks
7763
7764         * dbus/dbus-memory.c: add support in test mode for tracking
7765         number of outstanding blocks
7766
7767 2003-03-23  Havoc Pennington  <hp@pobox.com>
7768
7769         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
7770         policies code
7771
7772         * dbus/dbus-hash.h: add ULONG hash keys
7773
7774         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
7775         (_dbus_get_group_id): new function
7776
7777 2003-03-20  Havoc Pennington  <hp@redhat.com>
7778
7779         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
7780         new function
7781         (dbus_connection_get_unix_user): new function
7782
7783 2003-03-20  Havoc Pennington  <hp@pobox.com>
7784
7785         * bus/connection.c (bus_connection_send_oom_error): assert that
7786         message has a sender
7787         (connection_execute_transaction): ditto
7788         (bus_connection_preallocate_oom_error): fix to set the sender, and
7789         set recipient to the destination service, not the bus driver
7790
7791         * bus/policy.c: hacking
7792
7793         * dbus/dbus-message.c (dbus_message_service_is): new function
7794         (dbus_message_sender_is): new
7795
7796 2003-03-19  Havoc Pennington  <hp@redhat.com>
7797
7798         * bus/policy.c: start sketching code for policy restrictions on
7799         what connections can do.
7800
7801 2003-03-18  Havoc Pennington  <hp@redhat.com>
7802
7803         * doc/TODO: some notes on high-level todo items. Little nitpick
7804         stuff is all in @todo, so no need to add it here.
7805
7806         * doc/config-file.txt: some notes on how config file might look
7807
7808 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
7809
7810         * configure.in: 0.6
7811
7812         * NEWS: Update.
7813
7814 2003-03-17  Havoc Pennington  <hp@redhat.com>
7815
7816         * dbus/dbus-internals.h: add gcc attributes so that
7817         our printf-style functions warn on bad arguments to
7818         format
7819
7820         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
7821         format bug
7822
7823         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7824         printf format bug
7825
7826 2003-03-17  Havoc Pennington  <hp@redhat.com>
7827
7828         * bus/test-main.c (main): make it print something as it runs
7829         so make check doesn't look stuck
7830
7831         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
7832         from CVS, now obsolete
7833
7834 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
7835
7836         * bus/dispatch.c: (bus_dispatch):
7837         Refetch the service name since it may have been reallocated
7838         when dbus_message_set_sender was called.
7839
7840         * dbus/dbus-sysdeps.c: (_dbus_accept):
7841         Add address and address length variables and use them to stop
7842         valgrind from complaining.
7843
7844 2003-03-17  Havoc Pennington  <hp@pobox.com>
7845
7846         All tests pass, no memleaks, no valgrind complaints.
7847
7848         * bus/test.c: refcount handler_slot
7849
7850         * bus/connection.c (bus_connections_new): refcount
7851         connection_data_slot
7852
7853         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
7854         bytes so that auth scripts pass.
7855
7856         * bus/dispatch.c: init message_handler_slot so it gets allocated
7857         properly
7858
7859         * bus/dispatch.c (message_handler_slot_ref): fix memleak
7860
7861         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
7862         dealloc server_pipe_hash when no longer used for benefit of
7863         leak checking
7864
7865         * dbus/dbus-auth.c (process_command): memleak fix
7866
7867         * bus/dispatch.c (check_hello_message): memleak fix
7868
7869 2003-03-16  Havoc Pennington  <hp@pobox.com>
7870
7871         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
7872
7873 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
7874
7875         * bus/activation.c (bus_activation_activate_service): Append
7876         the pending activation entry to the list of pending activations.
7877
7878 2003-03-16  Havoc Pennington  <hp@pobox.com>
7879
7880         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
7881         connections
7882
7883         * dbus/dbus-address.c (create_entry): fix OOM handling when
7884         failing to alloc entry->method
7885
7886 2003-03-16  Havoc Pennington  <hp@pobox.com>
7887
7888         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
7889         the watch
7890
7891         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
7892         add some missing dbus_set_result
7893
7894         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
7895         alloc the DBusMessageHandler
7896
7897         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
7898         the transport here, since we call this from the finalizer; it
7899         resulted in a double-finalize.
7900
7901         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
7902         where we tried to use transport->connection that was NULL,
7903         happened when transport was disconnected early on due to OOM
7904
7905         * bus/*.c: adapt to handle OOM for watches/timeouts
7906
7907         * dbus/dbus-transport-unix.c: port to handle OOM during
7908         watch handling
7909
7910         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
7911         reference to unused bytes instead of a copy
7912
7913         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
7914         out of memory
7915
7916         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
7917         FALSE on OOM
7918
7919         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
7920         of memory
7921
7922 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
7923
7924         * doc/dbus-specification.sgml:
7925         Document reply message for ActivateService.
7926
7927 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
7928
7929         * bus/activation.c: (bus_pending_activation_entry_free),
7930         (bus_pending_activation_free), (bus_activation_new),
7931         (bus_activation_unref), (bus_activation_service_created),
7932         (bus_activation_activate_service):
7933         * bus/activation.h:
7934         * bus/bus.c: (bus_context_new):
7935         * bus/desktop-file.c: (new_section):
7936         * bus/driver.c: (bus_driver_send_service_deleted),
7937         (bus_driver_handle_activate_service):
7938         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
7939         * bus/services.h:
7940         * dbus/dbus-connection.c:
7941         (dbus_connection_send_with_reply_and_block):
7942         * dbus/dbus-message.c: (dbus_message_append_args_valist):
7943         * dbus/dbus-protocol.h:
7944         Make activation work better. Now pending activations will be queued
7945         and the daemon won't try to activate services that are already registered.
7946
7947 2003-03-16  Havoc Pennington  <hp@pobox.com>
7948
7949         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
7950         connection data
7951
7952         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
7953         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
7954
7955 2003-03-16  Havoc Pennington  <hp@pobox.com>
7956
7957         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
7958         this. always run the test suite before commit...
7959
7960         * bus/*: adapt to DBusConnection API changes
7961
7962         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
7963         requires renaming stuff to avoid dbus_connection_dispatch name
7964         conflict.
7965
7966         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
7967         function
7968
7969         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7970         separate from _dbus_message_loader_return_buffer()
7971
7972         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
7973         this, because it's now always broken to use; the number of
7974         messages in queue vs. the number still buffered by the message
7975         loader is undefined/meaningless. Should use
7976         dbus_connection_get_dispatch_state().
7977         (dbus_connection_dispatch): rename from
7978         dbus_connection_dispatch_message
7979
7980 2003-03-16  Havoc Pennington  <hp@pobox.com>
7981
7982         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
7983         implementation
7984
7985 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
7986
7987         * dbus/dbus-connection.c:
7988         (dbus_connection_send_with_reply_and_block):
7989         Decrease connection->n_incoming when removing an entry
7990         from the list.
7991         * dbus/dbus-dict.c: (dbus_dict_entry_free),
7992         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7993         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7994         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
7995         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
7996         (dbus_dict_get_byte_array):
7997         Handle NULL arrays and strings. Also add support for byte arrays.
7998
7999         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
8000         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
8001         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8002         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8003         (_dbus_demarshal_dict), (demarshal_and_validate_len),
8004         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
8005         * dbus/dbus-marshal.h:
8006         Add support for marshalling and demarshalling empty arrays and strings.
8007
8008         * dbus/dbus-message.c: (dbus_message_append_args_valist),
8009         (dbus_message_append_string_array),
8010         (dbus_message_iter_get_boolean),
8011         (dbus_message_iter_get_boolean_array),
8012         (dbus_message_iter_get_int32_array),
8013         (dbus_message_iter_get_uint32_array),
8014         (dbus_message_iter_get_double_array),
8015         (dbus_message_iter_get_byte_array),
8016         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
8017         (check_message_handling):
8018         Add support for getting empty arrays and dicts.
8019
8020         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
8021         Don't do any validation at all for now, that's better than just checking
8022         for ASCII.
8023
8024         * test/data/valid-messages/emptiness.message:
8025         New test message with lots of empty arrays.
8026
8027 2003-03-16  Havoc Pennington  <hp@pobox.com>
8028
8029         * dbus/dbus-connection.c
8030         (_dbus_connection_queue_received_message_link): new function that
8031         can't fail due to OOM
8032
8033         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
8034         new function pops a message together with a list link
8035         containing it.
8036
8037         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
8038         message queuing functions to avoid needing to alloc memory
8039
8040 2003-03-16  Havoc Pennington  <hp@pobox.com>
8041
8042         Oops - test code was only testing failure of around 30 of the
8043         mallocs in the test path, but it turns out there are 500+
8044         mallocs. I believe this was due to misguided linking setup such
8045         that there was one copy of dbus_malloc etc. in the daemon and one
8046         in the shared lib, and only daemon mallocs were tested. In any
8047         case, the test case now tests all 500+ mallocs, and doesn't pass
8048         yet, though there are lots of fixes in this patch.
8049
8050         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
8051         this so that it doesn't need to allocate memory, since it
8052         has no way of indicating failure due to OOM (and would be
8053         annoying if it did).
8054
8055         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
8056
8057         * bus/Makefile.am: rearrange to create two self-contained
8058         libraries, to avoid having libraries with overlapping symbols.
8059         that was resulting in weirdness, e.g. I'm pretty sure there
8060         were two copies of global static variables.
8061
8062         * dbus/dbus-internals.c: move the malloc debug stuff to
8063         dbus-memory.c
8064
8065         * dbus/dbus-list.c (free_link): free list mempool if it becomes
8066         empty.
8067
8068         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
8069
8070         * dbus/dbus-address.c (dbus_parse_address): free list nodes
8071         on failure.
8072
8073         * bus/dispatch.c (bus_dispatch_add_connection): free
8074         message_handler_slot when no longer using it, so
8075         memory leak checkers are happy for the test suite.
8076
8077         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
8078
8079         * bus/bus.c (new_connection_callback): disconnect in here if
8080         bus_connections_setup_connection fails.
8081
8082         * bus/connection.c (bus_connections_unref): fix to free the
8083         connections
8084         (bus_connections_setup_connection): if this fails, don't
8085         disconnect the connection, just be sure there are no side
8086         effects.
8087
8088         * dbus/dbus-string.c (undo_alignment): unbreak this
8089
8090         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
8091         leaking
8092         (_dbus_auth_new): fix the order in which we free strings
8093         on OOM failure
8094
8095         * bus/connection.c (bus_connection_disconnected): fix to
8096         not send ServiceDeleted multiple times in case of memory
8097         allocation failure
8098
8099         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
8100         get the base service name
8101         (dbus_bus_register_client): don't return base service name,
8102         instead store it on the DBusConnection and have an accessor
8103         function for it.
8104         (dbus_bus_register_client): rename dbus_bus_register()
8105
8106         * bus/dispatch.c (check_hello_message): verify that other
8107         connections on the bus also got the correct results, not
8108         just the one sending hello
8109
8110 2003-03-15  Havoc Pennington  <hp@pobox.com>
8111
8112         Make it pass the Hello handling test including all OOM codepaths.
8113         Now to do other messages...
8114
8115         * bus/services.c (bus_service_remove_owner): fix crash when
8116         removing owner from an empty list of owners
8117         (bus_registry_ensure): don't leave service in the list of
8118         a connection's owned services if we fail to put the service
8119         in the hash table.
8120
8121         * bus/connection.c (bus_connection_preallocate_oom_error): set
8122         error flag on the OOM error.
8123
8124         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
8125         handle _dbus_transport_set_connection failure
8126
8127         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
8128         to create watches up front and simply enable/disable them as
8129         needed.
8130         (unix_connection_set): this can now fail on OOM
8131
8132         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
8133         of enabling/disabling a watch or timeout.
8134
8135         * bus/loop.c (bus_loop_iterate): don't touch disabled
8136         watches/timeouts
8137
8138         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
8139
8140 2003-03-15  Havoc Pennington  <hp@pobox.com>
8141
8142         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
8143         write useful test code, after all that futzing around ;-)
8144
8145         Test does not yet pass because we can't handle OOM in
8146         _dbus_transport_messages_pending (basically,
8147         dbus_connection_preallocate_send() does not prealloc the write
8148         watch). To fix this, I think we need to add new stuff to
8149         set_watch_functions, namely a SetEnabled function so we can alloc
8150         the watch earlier, then enable it later.
8151
8152         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
8153         dbus-memory.c to the convenience lib
8154
8155         * bus/test.c: rename some static functions to keep them clearly
8156         distinct from stuff in connection.c. Handle client disconnection.
8157
8158 2003-03-14  Havoc Pennington  <hp@pobox.com>
8159
8160         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
8161         transport, tests more of the real codepath. Set up clients
8162         with bus_setup_debug_client.
8163
8164         * bus/test.c (bus_setup_debug_client): function to set up debug
8165         "clients" on the main loop
8166
8167         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
8168         support
8169
8170         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
8171         server type
8172
8173         * dbus/dbus-server-debug.c: support a debug server based on pipes
8174
8175         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
8176         (_dbus_close): new function
8177
8178         * configure.in: check for socketpair
8179
8180 2003-03-14  Havoc Pennington  <hp@redhat.com>
8181
8182         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
8183         cheesy hack
8184
8185         * dbus/dbus-transport-debug.c: rework this a good bit to be
8186         less complicated. hopefully still works.
8187
8188         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
8189         manually
8190
8191         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
8192         after running it
8193
8194         * dbus/dbus-message.c (dbus_message_copy): rename from
8195         dbus_message_new_from_message, fix it up to copy
8196         all the message fields, add test case
8197
8198         * bus/dispatch.c (bus_dispatch_test): add some more test code,
8199         not quite passing yet
8200
8201 2003-03-14  Havoc Pennington  <hp@pobox.com>
8202
8203         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
8204         until no work remains" in test code. (the large diff here
8205         is just code movement, no actual changes)
8206
8207         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
8208         1, no point waiting around for test code.
8209         (_dbus_server_debug_accept_transport): unref the timeout
8210         after adding it (right?)
8211
8212         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
8213
8214 2003-03-13  Havoc Pennington  <hp@redhat.com>
8215
8216         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
8217         out of memory
8218
8219         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
8220         of memory
8221
8222         * dbus/dbus-connection.h: Make AddWatchFunction and
8223         AddTimeoutFunction return a bool so they can fail on out-of-memory
8224
8225         * bus/bus.c (bus_context_new): set up timeout handlers
8226
8227         * bus/connection.c (bus_connections_setup_connection): set up
8228         timeout handlers
8229
8230         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
8231         can fail
8232
8233         * bus/bus.c (bus_context_new): adapt to changes
8234
8235         * bus/connection.c: adapt to changes
8236
8237         * test/watch.c: adapt to DBusWatch changes
8238
8239         * bus/dispatch.c (bus_dispatch_test): started adding this but
8240         didn't finish
8241
8242 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
8243
8244         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
8245
8246 2003-03-13  Havoc Pennington  <hp@pobox.com>
8247
8248         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
8249         set up a test framework as for the library
8250
8251 2003-03-12  Havoc Pennington  <hp@pobox.com>
8252
8253         Throughout: purge global variables, introduce BusActivation,
8254         BusConnections, BusRegistry, etc. objects instead.
8255
8256         * bus/bus.h, bus/bus.c: introduce BusContext as a global
8257         message bus object
8258
8259         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
8260         going to redo this a bit differently I think
8261
8262 2003-03-12  Havoc Pennington  <hp@redhat.com>
8263
8264         Mega-patch that gets the message bus daemon initially handling
8265         out-of-memory. Work still needed. Also lots of random
8266         moving stuff to DBusError instead of ResultCode.
8267
8268         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
8269
8270         * dbus/dbus-connection.c
8271         (dbus_connection_send_with_reply_and_block): use DBusError
8272
8273         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
8274         DBusResultCode
8275
8276         * dbus/dbus-connection.c (dbus_connection_send): drop the result
8277         code here, as the only failure possible is OOM.
8278
8279         * bus/connection.c (bus_connection_disconnect):
8280         rename bus_connection_disconnected as it's a notification only
8281
8282         * bus/driver.c (bus_driver_handle_acquire_service): don't free
8283         "name" on get_args failure, should be done by get_args;
8284         don't disconnect client for bad args, just return an error.
8285         (bus_driver_handle_service_exists): ditto
8286
8287         * bus/services.c (bus_services_list): NULL-terminate returned array
8288
8289         * bus/driver.c (bus_driver_send_service_lost)
8290         (bus_driver_send_service_acquired): send messages from driver to a
8291         specific client to the client's unique name, not to the broadcast
8292         service.
8293
8294         * dbus/dbus-message.c (decode_header_data): reject messages that
8295         contain no name field
8296         (_dbus_message_get_client_serial): rename to
8297         dbus_message_get_serial and make public
8298         (_dbus_message_set_serial): rename from set_client_serial
8299         (_dbus_message_set_reply_serial): make public
8300         (_dbus_message_get_reply_serial): make public
8301
8302         * bus/connection.c (bus_connection_foreach): allow stopping
8303         iteration by returning FALSE from foreach function.
8304
8305         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
8306         (dbus_connection_free_preallocated_send)
8307         (dbus_connection_preallocate_send): new API for sending a message
8308         without possibility of malloc failure.
8309         (dbus_connection_send_message): rename to just
8310         dbus_connection_send (and same for whole function family)
8311
8312         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
8313
8314         * dbus/dbus-sysdeps.c (_dbus_exit): new function
8315
8316         * bus/activation.c: handle/return errors
8317
8318         * dbus/dbus-errors.h: add more DBUS_ERROR #define
8319
8320         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
8321         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
8322         (_dbus_result_from_errno): move to this file
8323
8324 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
8325
8326         * dbus/dbus-marshal.c:
8327         (_dbus_marshal_set_string):
8328         Take a length argument so we can marshal the correct string
8329         length.
8330
8331         (_dbus_marshal_dict), (_dbus_demarshal_dict),
8332         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
8333         (_dbus_marshal_test):
8334         * dbus/dbus-marshal.h:
8335         Add support for marshalling and demarshalling dicts.
8336
8337         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8338         Add support for TYPE DICT.
8339
8340         * dbus/dbus-message.c: (set_string_field):
8341         Adjust header padding.
8342
8343         (dbus_message_append_args_valist), (dbus_message_append_dict),
8344         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
8345         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
8346         (check_message_handling), (check_have_valid_message):
8347         * dbus/dbus-message.h:
8348         Add functions for setting and getting dicts.
8349
8350         * dbus/dbus-protocol.h:
8351         Add DBUS_TYPE_DICT.
8352
8353         * dbus/dbus.h:
8354         Add dbus-dict.h
8355
8356         * doc/dbus-specification.sgml:
8357         Add information about how dicts are marshalled.
8358
8359         * test/data/invalid-messages/dict-with-nil-value.message:
8360         * test/data/invalid-messages/too-short-dict.message:
8361         * test/data/valid-messages/dict-simple.message:
8362         * test/data/valid-messages/dict.message:
8363         Add sample messages containing dicts.
8364
8365 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
8366
8367         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
8368
8369 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
8370
8371         * dbus/Makefile.am:
8372         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
8373         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
8374         (dbus_dict_set_int32), (dbus_dict_set_uint32),
8375         (dbus_dict_set_double), (dbus_dict_set_string),
8376         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
8377         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
8378         (dbus_dict_set_string_array), (_dbus_dict_test):
8379         * dbus/dbus-dict.h:
8380         Fix according to comments from Havoc.
8381
8382 2003-03-06  Michael Meeks  <michael@server.home>
8383
8384         * configure.in: if we don't have kde-config, disable have_qt.
8385
8386 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
8387
8388         * dbus/Makefile.am:
8389         Add dbus-dict.[ch]
8390
8391         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
8392         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
8393         (dbus_dict_remove), (dbus_dict_get_value_type),
8394         (dbus_dict_get_keys), (dbus_dict_put_boolean),
8395         (dbus_dict_put_int32), (dbus_dict_put_uint32),
8396         (dbus_dict_put_double), (dbus_dict_put_string),
8397         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
8398         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
8399         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
8400         (dbus_dict_get_int32), (dbus_dict_get_uint32),
8401         (dbus_dict_get_double), (dbus_dict_get_string),
8402         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
8403         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
8404         (dbus_dict_get_string_array), (_dbus_dict_test):
8405         * dbus/dbus-dict.h:
8406         Add DBusDict implementation
8407
8408         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
8409         * dbus/dbus-test.h:
8410         Add _dbus_dict_test
8411
8412 2003-03-04  Havoc Pennington  <hp@pobox.com>
8413
8414         * test/data/auth/*: adapt to changes
8415
8416         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
8417         USERID_BASE64 and change USERNAME_BASE64 to put in username not
8418         userid
8419
8420         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
8421         more stuff from being in a context name, to make the protocol
8422         simpler to deal with
8423
8424         * dbus/dbus-errors.c (dbus_error_has_name): new function
8425         (dbus_error_is_set): new function
8426
8427         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
8428         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
8429
8430         * dbus/dbus-connection.c (dbus_connection_flush): also read
8431         messages during a flush operation
8432
8433         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
8434
8435 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
8436
8437         * configure.in: Check for gethostbyname on Solaris.
8438
8439         * dbus/dbus-transport.c: (_dbus_transport_open):
8440         Remove duplicate "tcp" entry.
8441
8442         * doc/dbus-specification.sgml:
8443         Clarify some things.
8444
8445 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
8446
8447         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
8448         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
8449         (_dbus_keyring_test):
8450         * dbus/dbus-md5.c: (_dbus_md5_compute):
8451         * dbus/dbus-sha.c: (_dbus_sha_compute):
8452         Plug memory leaks.
8453
8454 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
8455
8456         * README: Add some things.
8457
8458 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
8459
8460         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
8461         after case DBUS_TYPE_BOOELAN.
8462
8463 2003-03-02  Havoc Pennington  <hp@pobox.com>
8464
8465         * test/break-loader.c (randomly_set_extreme_ints): add test that
8466         sets really huge and small integers
8467
8468         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
8469         that length of boolean array fits in the string, and that
8470         string has room for boolean value in single-bool case.
8471
8472         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
8473         optional value to "ALIGN" command which is what to fill the
8474         alignment with.
8475
8476         * test/data/valid-messages/no-padding.message: add regression
8477         test for the message padding problem
8478
8479 2003-03-02  Havoc Pennington  <hp@pobox.com>
8480
8481         * dbus/dbus-message.c (decode_header_data): fix to always init
8482         message_padding, from Benjamin Dauvergne
8483
8484 2003-03-02  Havoc Pennington  <hp@pobox.com>
8485
8486         * configure.in: 0.5
8487
8488         * NEWS: Update.
8489
8490 2003-03-01  Joe Shaw  <joe@assbarn.com>
8491
8492         * configure.in: Check for "struct cmsgcred" and try to access its
8493         members for BSD-like unices.
8494
8495         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
8496         _dbus_read_credentials_unix_socket().
8497         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
8498         read() for reading the credential byte off the unix socket.  Use
8499         struct cmsgcred on systems that support it.
8500
8501 2003-02-27  Alexander Larsson  <alexl@redhat.com>
8502
8503         * glib/Makefile.am:
8504         * configure.in:
8505         Make gthreads-2.0 dependency optional. Don't build thread test if
8506         its not found.
8507
8508 2003-02-27  Havoc Pennington  <hp@pobox.com>
8509
8510         * dbus/dbus-connection.c
8511         (dbus_connection_send_message_with_reply_and_block): fix doh!
8512         doh! doh! bug that resulted in never removing a reply from the
8513         queue, no wonder we called get_reply_serial so much ;-)
8514
8515         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
8516         and client serial instead of demarshaling them every time
8517
8518 2003-02-27  Havoc Pennington  <hp@pobox.com>
8519
8520         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
8521         more inlined, using dbus-string-private.h, speeds things up
8522         substantially
8523
8524         * dbus/dbus-string.c (_dbus_string_free): apply align offset
8525         when freeing the string
8526         (_dbus_string_steal_data): fix for align offset
8527         (undo_alignment): new function
8528
8529 2003-02-26  Havoc Pennington  <hp@redhat.com>
8530
8531         All kinds of audit fixes from Owen, plus initial attempt to
8532         handle unaligned memory returned from malloc.
8533
8534         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
8535         leave room for align_offset and nul byte
8536         (fixup_alignment): function to track an align_offset and
8537         ensure real->str is aligned
8538         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
8539         to allow a nul byte plus align offset
8540         (_dbus_string_lock): fix overflow issue
8541         (_dbus_string_init_const_len): add assertions on sanity of len,
8542         assign allocated to be ALLOCATION_PADDING larger than len
8543         (set_length): fixup the overflow handling
8544         (_dbus_string_get_data_len): fix overflow in assertion
8545         (open_gap): detect overflow in size of gap to be opened
8546         (_dbus_string_lengthen): add overflow check
8547         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
8548         (_dbus_string_append): add overflow check
8549         (_dbus_string_append_unichar): overflow
8550         (_dbus_string_delete): fix overflow in assertion
8551         (_dbus_string_copy_len): overflow in assertion
8552         (_dbus_string_replace_len): overflows in assertions
8553         (_dbus_string_find): change to implement in terms of
8554         _dbus_string_find_to
8555         (_dbus_string_find_to): assorted fixage
8556         (_dbus_string_equal_c_str): assert c_str != NULL,
8557         fix logic so the function works
8558         (_dbus_string_ends_with_c_str): fix overflow thingy
8559         (_dbus_string_base64_encode): overflow fix
8560         (_dbus_string_validate_ascii): overflow
8561         (_dbus_string_validate_nul): overflow
8562
8563 2003-02-26  Havoc Pennington  <hp@redhat.com>
8564
8565         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
8566
8567 2003-02-26  Alexander Larsson  <alexl@redhat.com>
8568
8569         * configure.in:
8570         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
8571
8572         * dbus/dbus-connection.c:
8573         * dbus/dbus-connection.h:
8574         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
8575         Add dbus_connection_set_wakeup_main_function and use it when queueing
8576         incoming and outgoing messages.
8577
8578
8579         * dbus/dbus-dataslot.c:
8580         Threadsafe usage of DBusDataSlotAllocator
8581
8582         * dbus/dbus-message.c: (dbus_message_get_args_iter):
8583         dbus_new can fail.
8584
8585         * dbus/dbus-server-unix.c:
8586         Add todo comment
8587
8588         * glib/dbus-gmain.c:
8589         Implement the new wakeup functions for glib.
8590
8591         * glib/Makefile.am:
8592         * glib/test-thread-client.c:
8593         * glib/test-thread-server.c:
8594         * glib/test-thread.h:
8595         Initial cut at some thread test code. Not really done yet.
8596
8597 2003-02-26  Havoc Pennington  <hp@pobox.com>
8598
8599         * dbus/dbus-connection.c
8600         (dbus_connection_send_message_with_reply_and_block): fix crash
8601         where we ref'd the outgoing message instead of the returned reply
8602
8603         * dbus/dbus-transport-unix.c (do_authentication): check read watch
8604         at the end of this function, so if we didn't need to read for
8605         authentication, we reinstall it for receiving messages
8606
8607         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
8608         a NULL sender for peer-to-peer case
8609
8610         * dbus/dbus-transport-unix.c (check_read_watch): handle
8611         !authenticated case correctly
8612
8613         * glib/dbus-gmain.c: add support for DBusServer
8614
8615         * dbus/dbus-server.c: add data slot support
8616
8617         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
8618         return values and handle errors
8619
8620         * dbus/dbus-dataslot.c: factor out the data slot stuff from
8621         DBusConnection
8622
8623         * Doxyfile.in (INPUT): add glib subdir
8624
8625         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
8626         setup_with_g_main instead of hookup_with_g_main; write docs
8627
8628 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
8629
8630         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
8631         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8632         * dbus/dbus-message.c: (dbus_message_append_boolean),
8633         (dbus_message_append_boolean_array),
8634         (dbus_message_get_args_valist), (_dbus_message_test):
8635         * dbus/dbus-message.h:
8636         * doc/dbus-specification.sgml:
8637         Various fixes as pointed out by Havoc.
8638
8639         * test/data/invalid-messages/bad-boolean-array.message:
8640         * test/data/invalid-messages/bad-boolean.message:
8641         Add invalid boolean value test cases.
8642
8643 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
8644
8645         * dbus/dbus-internals.c: (_dbus_type_to_string):
8646         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8647         (_dbus_marshal_validate_arg):
8648         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8649         * dbus/dbus-message.c: (dbus_message_append_args_valist),
8650         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
8651         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
8652         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
8653         (dbus_message_iter_get_double),
8654         (dbus_message_iter_get_boolean_array), (message_iter_test):
8655         * dbus/dbus-message.h:
8656         * dbus/dbus-protocol.h:
8657         * doc/dbus-specification.sgml:
8658         * test/data/valid-messages/lots-of-arguments.message:
8659         Add support for boolean and boolean array types.
8660
8661 2003-02-23  Havoc Pennington  <hp@pobox.com>
8662
8663         * dbus/dbus-keyring.c: finish most of this implementation and
8664         simple unit test
8665
8666         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
8667         these barf if the error isn't cleared to NULL
8668
8669         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
8670         (_dbus_create_directory): new function
8671
8672         * dbus/dbus-errors.c (dbus_set_error): fix warning
8673
8674         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
8675         (_dbus_string_hex_decode): new function
8676         (test_hex_roundtrip): test code
8677
8678         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
8679
8680         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
8681
8682         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
8683         the save-to-temp/rename trick to atomically write the new file
8684         (_dbus_string_parse_uint): new function
8685
8686 2003-02-22  Havoc Pennington  <hp@pobox.com>
8687
8688         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
8689
8690 2003-02-22  Havoc Pennington  <hp@pobox.com>
8691
8692         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
8693         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
8694
8695         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
8696
8697         * dbus/test/data/sha-1: add US government test suite for SHA-1
8698
8699 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8700
8701         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8702         Make string arrays NULL-terminated.
8703
8704         * dbus/dbus-memory.c: (dbus_free_string_array):
8705         * dbus/dbus-memory.h:
8706         New function for freeing NULL-terminated string arrays.
8707
8708         * dbus/dbus-message-builder.c: (append_quoted_string),
8709         (_dbus_message_data_load):
8710         Add support for array types.
8711
8712         * dbus/dbus-message.c: (check_message_handling):
8713         Add more types as test cases.
8714
8715         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
8716         (_dbus_string_parse_double):
8717         Add the start offset to the end offset.
8718
8719         * test/data/valid-messages/lots-of-arguments.message:
8720         New test message with lots of arguments.
8721
8722 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8723
8724         * dbus/dbus-message.c: (dbus_message_append_nil),
8725         (dbus_message_append_int32), (dbus_message_append_uint32),
8726         (dbus_message_append_double), (dbus_message_append_string),
8727         (dbus_message_append_int32_array),
8728         (dbus_message_append_uint32_array),
8729         (dbus_message_append_double_array),
8730         (dbus_message_append_byte_array),
8731         (dbus_message_append_string_array):
8732         Fix all out-of-memory handling in these functions.
8733
8734 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8735
8736         * dbus/dbus-message.c: (dbus_message_append_nil):
8737         Fix a silly.
8738
8739 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8740
8741         * dbus/dbus-message.c: (dbus_message_append_args_valist),
8742         (dbus_message_append_nil), (dbus_message_append_int32_array),
8743         (dbus_message_append_uint32_array),
8744         (dbus_message_append_double_array),
8745         (dbus_message_append_byte_array),
8746         (dbus_message_append_string_array), (dbus_message_get_args_valist),
8747         (dbus_message_iter_get_int32_array),
8748         (dbus_message_iter_get_uint32_array),
8749         (dbus_message_iter_get_double_array),
8750         (dbus_message_iter_get_byte_array),
8751         (dbus_message_iter_get_string_array):
8752
8753         * dbus/dbus-message.h:
8754         Add functions for appending and getting arrays.
8755
8756 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8757
8758         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
8759         element size at least 8 bytes, fixes mempool tests on
8760         64-bit machines.
8761
8762 2003-02-20  Alexander Larsson  <alexl@redhat.com>
8763
8764         * dbus/dbus-transport-unix.c (unix_do_iteration):
8765         Unlock the connection mutex during a blocking select call.
8766         Add todo about how we need a way to wake up the select.
8767
8768         * dbus/dbus-connection-internal.h:
8769         * dbus/dbus-connection.c:
8770         Add _dbus_connection_lock and _dbus_connection_unlock.
8771
8772 2003-02-19  Havoc Pennington  <hp@pobox.com>
8773
8774         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
8775         Doxyfile.in, not Doxyfile
8776
8777         * dbus/dbus-keyring.c: do some hacking on this
8778
8779         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
8780
8781         * dbus/dbus-errors.c (dbus_set_error_const): do not call
8782         dbus_error_init
8783         (dbus_set_error): remove dbus_error_init, check for message ==
8784         NULL *before* we sprintf into it, and add @todo about including
8785         system headers in this file
8786
8787         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
8788
8789         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
8790
8791         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
8792         get various bits of user information based on either username
8793         or user ID
8794         (_dbus_homedir_from_username): new function
8795
8796 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
8797
8798         * configure.in:
8799         Add check for nonposix getpwnam_r
8800
8801         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
8802         Align the pool element size to a sizeof (void *) boundary.
8803
8804         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
8805         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
8806         General Solaris fixes.
8807
8808         * test/data/valid-messages/simplest-manual.message:
8809         Explicitly state that we want little-endian packing.
8810
8811 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
8812
8813         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8814
8815         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
8816         Added to create a transport connecting using a tcp/ip socket.
8817
8818         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
8819         to a tcp socket at given host and port.
8820         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
8821         hostname and port.
8822
8823         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8824
8825         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
8826         Added to create a server listening on a TCP/IP socket.
8827
8828 2003-02-19  Havoc Pennington  <hp@pobox.com>
8829
8830         Throughout: mop up all the Doxygen warnings and undocumented
8831         stuff.
8832
8833         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
8834         to search any paths.
8835
8836         * dbus/dbus-threads.c: move global mutex initializers to
8837         dbus-internals.h, multiple prototypes was confusing doxygen
8838         besides being kind of ugly
8839
8840         * Doxyfile (PREDEFINED): have Doxygen define
8841         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
8842         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
8843         (do not abuse the feature! it's for stuff like the autogenerated
8844         macros in dbus-md5.c, not just for things you don't feel like
8845         documenting...)
8846
8847 2003-02-18  Havoc Pennington  <hp@pobox.com>
8848
8849         * dbus/dbus-string.c (_dbus_string_zero): new function
8850
8851         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
8852         wrap it in some dbus-friendly API
8853
8854         * dbus/dbus-types.h: add 16-bit types
8855
8856 2003-02-18  Joe Shaw  <joe@assbarn.com>
8857
8858         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
8859         credentials from our currently running process.
8860         (get_word): Fix a buglet where we were copying the entire length
8861         instead of relative to our position.
8862
8863         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
8864         keys on the stack... it's 640k of data.
8865
8866         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
8867         read the credentials byte off the socket, even if we don't have
8868         SO_PEERCRED.
8869         (_dbus_poll): Implement poll() using select() for systems which
8870         don't have it.
8871
8872         * glib/test-dbus-glib.c (main): Print out an error if no
8873         parameters are given.
8874
8875         * test/data/auth/fallback.auth-script: Added.  Tests that a client
8876         can fallback to a secondary auth mechanism if the first fails.
8877
8878 2003-02-18  Havoc Pennington  <hp@pobox.com>
8879
8880         * AUTHORS: add Alex
8881
8882 2003-02-17  Havoc Pennington  <hp@pobox.com>
8883
8884         * doc/dbus-specification.sgml: lots of cosmetic
8885         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
8886         env variable to DBUS_BUS_ADDRESS, s/client/application/,
8887         s/server/bus/ (except in authentication section). Add a section
8888         "Message Bus Message Routing"
8889
8890 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
8891
8892         Release 0.4
8893
8894         * NEWS: Update
8895
8896 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8897
8898         * doc/dbus-specification.sgml:
8899         Specification updates.
8900
8901 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8902
8903         * bus/activation.c: (bus_activation_init), (child_setup),
8904         (bus_activation_activate_service):
8905         * bus/activation.h:
8906         * bus/main.c: (main):
8907         Set DBUS_ADDRESS environment variable.
8908
8909         * dbus/dbus-errors.c: (dbus_set_error):
8910         Don't use va_copy since that's a C99 feature.
8911
8912         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
8913         (_dbus_spawn_async):
8914         * dbus/dbus-sysdeps.h:
8915         Add child_setup_func to _dbus_spawn_async.
8916
8917         * doc/dbus-specification.sgml:
8918         Update specification.
8919
8920         * test/spawn-test.c: (setup_func), (main):
8921         Fix test.
8922
8923 2003-02-17  Alexander Larsson  <alexl@redhat.com>
8924
8925         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
8926         Added todo.
8927
8928 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8929
8930         * doc/.cvsignore:
8931         * doc/Makefile.am:
8932         * doc/dbus-test-plan.sgml:
8933         Add test plan document.
8934
8935         * test/Makefile.am:
8936         Fix distcheck.
8937
8938 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8939
8940         * dbus/dbus-message.c: (decode_header_data),
8941         (_dbus_message_loader_return_buffer):
8942         Set the header padding amount when loading a message.
8943
8944 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8945
8946         * bus/dispatch.c: (send_one_message):
8947         Only send broadcast messages to registered connections.
8948
8949         * dbus/dbus-message.c: (dbus_message_name_is):
8950         * dbus/dbus-message.h:
8951         New convenience function.
8952
8953         * dbus/dbus-transport-debug.c: (do_reading):
8954         Only dispatch one message per run.
8955
8956         * test/Makefile.am:
8957         * test/bus-test.c: (new_connection_callback), (die),
8958         (test_hello_client1_handler), (test_hello_client2_handler),
8959         (test_hello_replies), (main):
8960
8961         * test/bus-test-loop.[ch]:
8962         Add these.
8963
8964 2003-02-16  Havoc Pennington  <hp@pobox.com>
8965
8966         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
8967         backward conditional
8968
8969 2003-02-16  Alexander Larsson  <alexl@redhat.com>
8970
8971         * dbus/dbus-connection.c:
8972         Implement sent_message_with_reply. (with_reply_and block is still
8973         busted).
8974         Made dispatch_message not lose message if OOM.
8975
8976         * dbus/dbus-errors.h:
8977         Add NoReply error (for reply timeouts).
8978
8979 2003-02-16  Alexander Larsson  <alexl@redhat.com>
8980
8981         * dbus/dbus-hash.c (_dbus_hash_table_unref):
8982         Actually free keys and values when destroying hashtable.
8983
8984 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8985
8986         * dbus/dbus-auth.c: (client_try_next_mechanism):
8987         Plug a leak.
8988
8989         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
8990         Return TRUE if there's no thread implementation around.
8991
8992         * glib/dbus-gmain.c: (free_source),
8993         (dbus_connection_hookup_with_g_main):
8994         Make sure to remove the GSource when the connection is finalized.
8995
8996 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8997
8998         * bus/dispatch.c: (bus_dispatch_message_handler):
8999         * dbus/dbus-errors.h:
9000         Return an error if someone tries to send a message to a service
9001         that doesn't exist.
9002
9003 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
9004
9005         * bus/activation.c: (load_directory), (bus_activation_init),
9006         (bus_activation_activate_service):
9007         * bus/activation.h:
9008         * bus/driver.c:
9009         (bus_driver_handle_activate_service), (bus_driver_handle_message):
9010         More work on the activation handling.
9011
9012         * dbus/dbus-errors.h:
9013         Add some error messages
9014
9015         * dbus/dbus-message.c: (dbus_message_new_error_reply):
9016         * dbus/dbus-message.h:
9017         New function that creates an error message.
9018
9019         * dbus/dbus-protocol.h:
9020         Add ACTIVATE_SERVER message.
9021
9022         * dbus/dbus-server-unix.c: (unix_handle_watch),
9023         (_dbus_server_new_for_domain_socket):
9024         Call _dbus_fd_set_close_on_exec.
9025
9026         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
9027         (_dbus_spawn_async), (_dbus_disable_sigpipe),
9028         (_dbus_fd_set_close_on_exec):
9029         * dbus/dbus-sysdeps.h:
9030         Add _dbus_fd_set_close_on exec function. Also add function that checks
9031         that all open fds are set to close-on-exec and warns otherwise.
9032
9033         * dbus/dbus-transport-unix.c:
9034         (_dbus_transport_new_for_domain_socket):
9035         Call _dbus_fd_set_close_on_exec.
9036
9037 2003-02-16  Havoc Pennington  <hp@pobox.com>
9038
9039         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
9040         allow people to avoid setting SIGPIPE to SIG_IGN
9041         (_dbus_connection_new_for_transport): disable SIGPIPE unless
9042         we've been asked not to
9043
9044 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
9045
9046         * dbus/dbus-list.c: (_dbus_list_append_link),
9047         (_dbus_list_prepend_link):
9048         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
9049         (dbus_realloc):
9050         Warning fixes.
9051
9052 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
9053
9054         * bus/Makefile.am:
9055         * bus/activation.c: (bus_activation_entry_free),
9056         (add_desktop_file_entry), (load_directory), (bus_activation_init):
9057         * bus/activation.h:
9058         * bus/main.c: (main):
9059         Add simple activation support, doesn't work yet though.
9060
9061 2003-02-15   Zack Rusin  <zack@kde.org>
9062
9063         * qt/dbus-qthread.cpp:  small casting fix
9064
9065 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
9066
9067         * dbus/dbus-errors.c: (dbus_set_error):
9068         * dbus/dbus-errors.h:
9069         Add a few errors and make dbus_set_error void.
9070
9071         * dbus/dbus-sysdeps.c:
9072         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
9073         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
9074         * dbus/dbus-sysdeps.h:
9075         Add _dbus_spawn_async.
9076
9077         * test/spawn-test.c: (main):
9078         Test for _dbus_spawn_async.
9079
9080 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
9081
9082         * dbus/dbus-internals.h:
9083         Fix build without tests.
9084
9085         * dbus/dbus-list.c: (alloc_link):
9086         Fix a segfault when a malloc fails.
9087
9088         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
9089         (dbus_malloc0), (dbus_realloc):
9090         Add support for malloc debugging.
9091
9092 2003-02-15  Alexander Larsson  <alexl@redhat.com>
9093
9094         * dbus/dbus-threads.c:
9095         * dbus/dbus-threads.h:
9096         Add condvars. Remove static mutext from API.
9097         Implement static mutexes by initializing them from threads_init.
9098
9099         * glib/dbus-gthread.c:
9100         * qt/dbus-qthread.cpp:
9101         Update with the thread api changes.
9102
9103
9104         * dbus/dbus-list.c:
9105         * dbus/dbus-list.h:
9106         Turn StaticMutex into normal mutex + init function.
9107         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
9108         _dbus_list_append_link, _dbus_list_prepend_link
9109
9110
9111         * dbus/dbus-sysdeps.c:
9112         * dbus/dbus-sysdeps.h:
9113         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
9114         _dbus_atomic_dec. Only slow fallback implementation at the moment.
9115
9116         * dbus/dbus-protocol.h:
9117         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
9118
9119         * dbus/dbus-message.c:
9120         Make ref/unref atomic.
9121         Fix some docs.
9122
9123         * dbus/dbus-connection-internal.h:
9124         * dbus/dbus-connection.c:
9125         * dbus/dbus-connection.h:
9126         Make threadsafe.
9127         Change _peek to _borrow,_return & _steal_borrowed.
9128         Change disconnect callback to event.
9129         Make dbus_connection_dispatch_messages reentrant.
9130
9131         * dbus/dbus-transport.c:
9132         Don't ref the connection on calls to the transport
9133         implementation.
9134
9135         * dbus/dbus-message-handler.c:
9136         Make threadsafe.
9137
9138         * glib/dbus-gmain.c:
9139         Don't use peek_message anymore
9140
9141         * test/Makefile.am:
9142         * test/debug-thread.c:
9143         * test/debug-thread.h:
9144         Simple thread implementation that asserts() on deadlocks in
9145         single-threaded code.
9146
9147         * test/bus-test.c:
9148         (main) Call debug_threads_init.
9149
9150         * test/watch.c:
9151         Use disconnect message instead of disconnect callback.
9152
9153         * bus/connection.c:
9154         * bus/connection.h:
9155         Don't call dbus_connection_set_disconnect_function. Instead export
9156         bus_connection_disconnect.
9157
9158         * bus/dispatch.c:
9159         Call bus_connection_disconnect when we get a disconnected message.
9160
9161 2003-02-15  Havoc Pennington  <hp@pobox.com>
9162
9163         * dbus/dbus-message.c (dbus_message_new): fool around with the
9164         docs
9165
9166 2003-02-14  Havoc Pennington  <hp@pobox.com>
9167
9168         * dbus/dbus-mempool.c: fail if the debug functions so indicate
9169
9170         * dbus/dbus-memory.c: fail if the debug functions indicate we
9171         should
9172
9173         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
9174         (_dbus_decrement_fail_alloc_counter): debug functions to
9175         simulate memory allocation failures
9176
9177 2003-02-14  Havoc Pennington  <hp@pobox.com>
9178
9179         * dbus/dbus-errors.h (struct DBusError): add a word of padding
9180         to DBusError
9181
9182 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9183
9184         * bus/driver.c: (bus_driver_handle_hello):
9185         * bus/driver.h:
9186         * bus/services.c: (bus_service_lookup):
9187         Reorder message sending so we get a more sane order.
9188
9189         * test/bus-test.c: (message_handler):
9190         Fix tyop.
9191
9192 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9193
9194         * bus/driver.c: (bus_driver_send_service_deleted),
9195         (bus_driver_send_service_created), (bus_driver_send_service_lost),
9196         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
9197         (bus_driver_send_welcome_message),
9198         (bus_driver_handle_list_services),
9199         (bus_driver_handle_acquire_service),
9200         (bus_driver_handle_service_exists):
9201         * dbus/dbus-bus.c: (dbus_bus_register_client),
9202         (dbus_bus_acquire_service), (dbus_bus_service_exists):
9203         * dbus/dbus-errors.c: (dbus_result_to_string):
9204         * dbus/dbus-errors.h:
9205         * dbus/dbus-message.c: (dbus_message_append_args),
9206         (dbus_message_append_args_valist), (dbus_message_get_args),
9207         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
9208         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
9209         (dbus_message_iter_get_byte_array),
9210         (dbus_message_iter_get_string_array), (message_iter_test),
9211         (check_message_handling), (_dbus_message_test):
9212         * dbus/dbus-message.h:
9213         * test/bus-test.c: (main):
9214         Change fields to arguments in messages, so that they won't be
9215         confused with header fields.
9216
9217         * glib/test-dbus-glib.c: (main):
9218         Remove append_fields from hello message.
9219
9220 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9221
9222         * dbus/dbus-errors.c:
9223         * dbus/dbus-message.c:
9224         * dbus/dbus-string.c:
9225         Documentation fixes.
9226
9227 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9228
9229         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
9230         (remove_timeout):
9231         Implement support for timeouts in dbus-glib.
9232
9233 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9234
9235         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9236         * dbus/dbus-message.c: (process_test_subdir):
9237         * test/break-loader.c: (find_breaks_based_on):
9238         Plug some memory leaks.
9239
9240 2003-02-13  Richard Hult  <rhult@codefactory.se>
9241
9242         * bus/main.c: Fix build.
9243
9244         * dbus/dbus-errors.h:
9245         * dbus/dbus-errors.c: Fix copyright for Anders.
9246
9247 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9248
9249         * bus/Makefile.am:
9250         Add utils.[ch]
9251
9252         * bus/connection.c: (bus_connection_foreach):
9253         Fix a warning.
9254
9255         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
9256         (unescape_string), (new_section), (parse_section_start),
9257         (parse_key_value), (report_error), (bus_desktop_file_load),
9258         (bus_desktop_file_get_string):
9259         * bus/desktop-file.h:
9260         Use DBusError for error reporting.
9261
9262         * bus/dispatch.c: (send_one_message),
9263         (bus_dispatch_message_handler):
9264         * bus/driver.c: (bus_driver_send_service_deleted),
9265         (bus_driver_send_service_created), (bus_driver_send_service_lost),
9266         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
9267         (bus_driver_send_welcome_message),
9268         (bus_driver_handle_list_services),
9269         (bus_driver_handle_acquire_service),
9270         (bus_driver_handle_service_exists):
9271         * bus/loop.c: (bus_loop_run):
9272         * bus/main.c:
9273         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
9274
9275         * bus/utils.c: (bus_wait_for_memory):
9276         * bus/utils.h:
9277         New files with general utility functions.
9278
9279         * dbus/dbus-internals.h:
9280         Remove _DBUS_HANDLE_OOM.
9281
9282 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9283
9284         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
9285         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
9286         * dbus/dbus-errors.h:
9287         Add DBusError structure.
9288
9289 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9290
9291         * test/data/valid-messages/standard-acquire-service.message:
9292         * test/data/valid-messages/standard-hello.message:
9293         * test/data/valid-messages/standard-list-services.message:
9294         * test/data/valid-messages/standard-service-exists.message:
9295         Add some standard messages.
9296
9297 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9298
9299         * bus/driver.c: (bus_driver_send_welcome_message),
9300         (bus_driver_handle_list_services),
9301         (bus_driver_handle_acquire_service),
9302         (bus_driver_handle_service_exists), (bus_driver_handle_message):
9303         Update for API changes in libdbus.
9304
9305         * dbus/dbus-message.c: (dbus_message_new_reply):
9306         * dbus/dbus-message.h:
9307         Remove the name argument. The spec states that replies shouldn't
9308         have a name.
9309
9310 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
9311
9312         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
9313         (report_error), (bus_desktop_file_load), (lookup_section),
9314         (lookup_line), (bus_desktop_file_get_raw),
9315         (bus_desktop_file_get_string):
9316         * bus/desktop-file.h:
9317         Some fixes, and new functions for getting a key value from a section.
9318
9319 2003-02-13  Havoc Pennington  <hp@pobox.com>
9320
9321         * test/data/auth/fail-after-n-attempts.auth-script: new test
9322
9323         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
9324         reject the client.
9325
9326 2003-02-13  Havoc Pennington  <hp@pobox.com>
9327
9328         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
9329         dbus_credentials_match were backward
9330
9331         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
9332         NO_CREDENTIALS and ROOT_CREDENTIALS
9333
9334         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
9335         into here. Never process more commands after we've reached an
9336         end state; store further data as unused bytes.
9337
9338         * test/data/auth/*: add more auth tests
9339
9340         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
9341         command to match exact string and EXPECT_UNUSED to match unused
9342         bytes
9343
9344         * test/Makefile.am (dist-hook): fix to dist all the test stuff
9345
9346 2003-02-12  Havoc Pennington  <hp@pobox.com>
9347
9348         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
9349         \r off of popped lines
9350
9351         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
9352         scripts
9353
9354         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
9355         SEND, append \r\n
9356
9357 2003-02-12  Havoc Pennington  <hp@pobox.com>
9358
9359         * dbus/Makefile.am: remove break-loader from the build, since it
9360         moved.
9361
9362         * configure.in: add --enable-gcov to turn on coverage profiling
9363         flags and disable optimization
9364
9365 2003-02-10  Havoc Pennington  <hp@pobox.com>
9366
9367         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
9368         initial cut at test framework for DBusAuth from laptop.
9369         Doesn't quite work yet but it compiles and I need to get
9370         it off the 266mhz laptop. ;-)
9371
9372         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
9373         fix a memleak in error case
9374
9375 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
9376
9377         * bus/Makefile.am:
9378         * bus/desktop-file.c:
9379         * bus/desktop-file.h:
9380         Add a desktop file parser.
9381
9382 2003-02-11  Zack Rusin  <zack@kde.org>
9383
9384         * qt/message.[h|cpp]: sample implementation
9385         of the KDE wrapper for DBusMessage
9386
9387 2003-02-09  Zack Rusin  <zack@kde.org>
9388
9389         * test/bus-test.c: make_it_compile
9390         * doc/dbus-specification.sgml: minimal semantic fix
9391
9392 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
9393
9394         Release 0.3
9395
9396         * NEWS: Update
9397
9398 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
9399
9400         * dbus/Makefile.am:
9401         * dbus/dbus-break-loader.c:
9402         * test/Makefile.am:
9403         * test/break-loader.c:
9404         Move dbus-break-loader to test/ and rename it to break-loader.
9405
9406 2003-02-02  Havoc Pennington  <hp@pobox.com>
9407
9408         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
9409         for code to manage cookies in your home directory
9410
9411         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
9412
9413         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
9414         to authenticate, then disconnect the client.
9415
9416 2003-02-03  Alexander Larsson  <alexl@redhat.com>
9417
9418         * dbus/dbus-message.c (dbus_message_append_fields):
9419         Correct docs.
9420
9421 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9422
9423         * doc/dbus-specification.sgml:
9424         Update address format section.
9425
9426 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9427
9428         * test/Makefile.am:
9429         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
9430         (message_handler), (new_connection_callback), (loop_quit),
9431         (loop_run), (main):
9432         Add bus test.
9433
9434 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9435
9436         * bus/driver.c: (bus_driver_handle_service_exists):
9437         Simplify the code a bit.
9438
9439         * dbus/dbus-bus.c: (dbus_bus_service_exists):
9440         Fix a silly.
9441
9442 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9443
9444         * bus/Makefile.am:
9445         Add libdbus-daemon.la and link to it.
9446
9447 2003-02-01  James Willcox  <jwillcox@gnome.org>
9448
9449         * bus/driver.c: (bus_driver_handle_own_service):
9450         Actually include the service reply code in the message.
9451
9452 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9453
9454         * bus/driver.c: (bus_driver_handle_service_exists):
9455         Don't unref the incoming message.
9456
9457 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9458
9459         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
9460
9461 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
9462
9463         * dbus/dbus-server.c: (dbus_server_listen):
9464         * dbus/dbus-transport.c: (_dbus_transport_open):
9465         ifdef out the calls to the debug transport and server.
9466
9467 2003-02-02  Alexander Larsson  <alexl@redhat.com>
9468
9469         * dbus/dbus-watch.c (dbus_watch_get_flags):
9470         Add note in the docs that ERROR or HANGUP won't be returned
9471         and are assumed always on.
9472
9473         * glib/dbus-gmain.c (add_watch):
9474         Always add IO_ERR | IO_HUP
9475
9476         * dbus/dbus-message.h:
9477         Add semicolon after dbus_message_iter_get_string_array().
9478         Makes qt code build again
9479
9480 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
9481
9482         * bus/driver.c: (create_unique_client_name),
9483         (bus_driver_handle_hello):
9484         Don't take a name, just use a numeric id to identify
9485         each client.
9486
9487         * dbus/Makefile.am:
9488         * dbus/dbus-bus.c: (dbus_bus_register_client),
9489         (dbus_bus_acquire_service), (dbus_bus_service_exists):
9490         * dbus/dbus-bus.h:
9491         Add new convenience functions for communicating with the bus.
9492
9493         * dbus/dbus-message.h:
9494
9495         * dbus/dbus-protocol.h:
9496         Fix a typo.
9497
9498 2003-02-01  Alexander Larsson  <alexl@redhat.com>
9499
9500         * dbus/dbus-message.c (dbus_message_append_fields):
9501         Add some more doc comments.
9502
9503 2003-02-01  Havoc Pennington  <hp@pobox.com>
9504
9505         * dbus/dbus-break-loader.c (randomly_modify_length): change
9506         a 4-byte value in the message as if it were a length
9507
9508         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
9509         execute bit on saved files
9510
9511 2003-02-01  Havoc Pennington  <hp@pobox.com>
9512
9513         * dbus/dbus-break-loader.c (main): new program to find messages
9514         that break the loader.
9515
9516         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
9517         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
9518
9519         * dbus/dbus-string.c (_dbus_string_set_byte): new
9520
9521 2003-01-31  Havoc Pennington  <hp@pobox.com>
9522
9523         * dbus/dbus-message.c: refactor the test code to be more general,
9524         in preparation for writing a "randomly permute test cases to
9525         try to break the loader" program.
9526
9527 2003-01-31  Havoc Pennington  <hp@pobox.com>
9528
9529         * doc/dbus-specification.sgml: work on the specification
9530
9531         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
9532         the protocol version of the message.
9533
9534         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
9535         no longer specifies that.
9536         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
9537         1/2/3/4)
9538
9539         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
9540         "break" for DBUS_TYPE_NIL, remove @todo
9541
9542 2003-01-31  Havoc Pennington  <hp@pobox.com>
9543
9544         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
9545         just set_is_error/get_is_error as this is a commonly-used
9546         function, and write docs.
9547
9548 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
9549
9550         * dbus/dbus-address.c: (dbus_address_entry_free):
9551         Free key and value lists.
9552
9553         * dbus/dbus-internals.c: (_dbus_type_to_string):
9554         Add the types we didn't have.
9555
9556         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
9557         (_dbus_marshal_validate_arg):
9558         Add NIL types.
9559
9560         * dbus/dbus-message.c: (dbus_message_set_sender):
9561         Remove todo about being able to set sender to NULL.
9562
9563         (dbus_message_set_is_error_reply),
9564         (dbus_message_get_is_error_reply):
9565         * dbus/dbus-message.h:
9566         New functions.
9567
9568         * dbus/dbus-protocol.h:
9569         Add error reply flag.
9570
9571         * test/data/valid-messages/opposite-endian.message:
9572         Add NIL type to test.
9573
9574 2003-01-31  Havoc Pennington  <hp@pobox.com>
9575
9576         * doc/dbus-specification.sgml: fully specify the header.  Add
9577         flags and major protocol version, and change header/body len to
9578         unsigned.
9579
9580         * dbus/dbus-message-builder.c (append_saved_length): append length
9581         as uint32
9582
9583         * dbus/dbus-message.c (dbus_message_create_header): change header
9584         length and body length to unsigned. Add the new fields from the
9585         spec
9586         (_dbus_message_loader_return_buffer): unsigned header/body len
9587
9588 2003-01-30  Havoc Pennington  <hp@pobox.com>
9589
9590         * dbus/dbus-auth.c: rework to use only REJECTED, no
9591         MECHANISMS
9592
9593         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
9594         use REJECTED, suggested by Mark McLoughlin
9595
9596 2003-01-30  Havoc Pennington  <hp@pobox.com>
9597
9598         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
9599         a better way to report errors here. e.g.  "unix address lacks
9600         path" or something. also "no such file" when the path doesn't
9601         exist, etc.
9602
9603         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
9604         leaking list nodes
9605         (dbus_parse_address): add @todo about documenting address format,
9606         and allowing , and ; to be escaped
9607
9608 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
9609
9610         * dbus/Makefile.am:
9611         Add dbus-address.[ch]
9612
9613         * dbus/dbus-address.c: (dbus_address_entry_free),
9614         (dbus_address_entries_free), (create_entry),
9615         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
9616         (dbus_parse_address), (_dbus_address_test):
9617         * dbus/dbus-address.h:
9618         New files for dealing with address parsing.
9619
9620         * dbus/dbus-connection.c:
9621         Document timeout functions.
9622
9623         * dbus/dbus-message.c:
9624         Document dbus_message_new_from_message.
9625
9626         * dbus/dbus-server-debug.c:
9627         Document.
9628
9629         * dbus/dbus-server.c: (dbus_server_listen):
9630         Parse address and use correct server implementation.
9631
9632         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
9633         * dbus/dbus-string.h:
9634         New function with test.
9635
9636         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
9637         * dbus/dbus-test.h:
9638         Add address tests.
9639
9640         * dbus/dbus-transport-debug.c:
9641         Document.
9642
9643         * dbus/dbus-transport.c: (_dbus_transport_open):
9644         Parse address and use correct transport implementation.
9645
9646 2003-01-30  Havoc Pennington  <hp@pobox.com>
9647
9648         * dbus/dbus-message.c: use message->byte_order instead of
9649         DBUS_COMPILER_BYTE_ORDER throughout.
9650         (dbus_message_create_header): pad header to align the
9651         start of the body of the message to 8-byte boundary
9652
9653         * dbus/dbus-marshal.h: make all the demarshalers take const
9654         DBusString arguments.
9655
9656         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
9657         validate message args here, so we don't have to do slow validation
9658         later, and so we catch bad messages as they are incoming. Also add
9659         better checks on header_len and body_len. Also fill in
9660         message->byte_order
9661
9662         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
9663         implemented properly)
9664         (_dbus_string_validate_nul): new function to check all-nul
9665
9666         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
9667         get_arg_end_pos and remove all validation
9668         (_dbus_marshal_validate_arg): actually do validation here.
9669
9670 2003-01-29  Havoc Pennington  <hp@pobox.com>
9671
9672         * dbus/dbus-message.c (check_message_handling): fix assertion
9673         failure on set_client_serial
9674
9675 2003-01-28  Havoc Pennington  <hp@pobox.com>
9676
9677         * dbus/dbus-server-debug.c: Add doc section comments
9678
9679         * dbus/dbus-transport-debug.c: add doc section comments
9680
9681 2003-01-28  Havoc Pennington  <hp@redhat.com>
9682
9683         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
9684         the reverse order from how I had it
9685         (_dbus_string_base64_encode): reverse encoding order. I was
9686         basically byteswapping everything during encoding.
9687
9688 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
9689
9690         * dbus/dbus-connection-internal.h:
9691         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
9692         (_dbus_connection_remove_timeout):
9693         Add functions for adding and removing timeouts.
9694
9695         * dbus/dbus-message.c: (dbus_message_new_from_message):
9696         Add new function that takes a message and creates an exact
9697         copy of it, but with the refcount set to 1.
9698         (check_message_handling):
9699         Fix build error.
9700
9701         * dbus/dbus-server-protected.h:
9702         * dbus/dbus-server.c: (_dbus_server_init_base),
9703         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
9704         (dbus_server_set_timeout_functions):
9705         (_dbus_server_remove_timeout):
9706         New functions so that a server can add and remove timeouts.
9707
9708         (dbus_server_listen):
9709         Add commented out call to dbus_server_debug_new.
9710
9711         * dbus/dbus-timeout.c: (_dbus_timeout_new):
9712         Actually set the handler, doh.
9713
9714         * dbus/dbus-transport.c: (_dbus_transport_open):
9715         Add commented out call to dbus_transport_debug_client_new.
9716
9717         * dbus/Makefile.am:
9718         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
9719
9720 2003-01-28  Havoc Pennington  <hp@pobox.com>
9721
9722         * dbus/dbus-message.c (check_message_handling): function to check
9723         on the loaded message, iterates over it etc.
9724
9725 2003-01-28  Havoc Pennington  <hp@pobox.com>
9726
9727         * test/Makefile.am (dist-hook): fix make distdir
9728
9729         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
9730
9731 2003-01-27  Havoc Pennington  <hp@pobox.com>
9732
9733         * dbus/dbus-mempool.c (time_for_size): replace printf with
9734         _dbus_verbose
9735
9736         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
9737         empty lines; fix the SAVE_LENGTH stuff to be
9738         START_LENGTH/END_LENGTH so it actually works; couple other
9739         bugfixes
9740
9741         * test/Makefile.am (dist-hook): add dist-hook for .message files
9742
9743         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
9744         can be constant or locked.
9745         (_dbus_string_free): allow freeing a const string as
9746         documented/intended
9747
9748         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
9749
9750         * dbus/dbus-test-main.c (main): take an argument which is the
9751         directory containing test data
9752
9753         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
9754         argument to this and load all the messages in test/data/
9755         checking that they can be loaded or not loaded as appropriate.
9756
9757 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
9758
9759         * bus/dispatch.c: (bus_dispatch_message_handler):
9760         Dispatch messages sent to services.
9761
9762         * bus/driver.c: (bus_driver_send_service_deleted),
9763         (bus_driver_send_service_created), (bus_driver_send_service_lost),
9764         (bus_driver_send_service_acquired):
9765         Add helper functions for sending service related messages.
9766
9767         (bus_driver_send_welcome_message):
9768         Send HELLO_REPLY instead of WELCOME.
9769
9770         (bus_driver_handle_list_services):
9771         Send LIST_SERVICES_REPLY instead of SERVICES.
9772
9773         (bus_driver_handle_own_service),
9774         (bus_driver_handle_service_exists):
9775         New message handlers.
9776
9777         (bus_driver_handle_message):
9778         Invoke new message handlers.
9779
9780         (bus_driver_remove_connection):
9781         Don't remove any services here since that's done automatically
9782         by bus_service_remove_owner now.
9783
9784         * bus/driver.h:
9785         New function signatures.
9786
9787         * bus/services.c: (bus_service_add_owner):
9788         Send ServiceAcquired message if we're the only primary owner.
9789
9790         (bus_service_remove_owner):
9791         Send ServiceAcquired/ServiceLost messages.
9792
9793         (bus_service_set_prohibit_replacement),
9794         (bus_service_get_prohibit_replacement):
9795         Functions for setting prohibit replacement.
9796
9797         (bus_service_has_owner):
9798         New function that checks if a connection is in the owner queue of
9799         a certain service.
9800
9801         * bus/services.h:
9802         Add new function signatures.
9803
9804         * dbus/dbus-list.c: (_dbus_list_test):
9805         Add tests for _dbus_list_remove_last and traversing the list backwards.
9806
9807         * dbus/dbus-list.h:
9808         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
9809         go any further, so return NULL then.
9810
9811         * dbus/dbus-protocol.h:
9812         Add new messages, service flags and service replies.
9813
9814 2003-01-26  Havoc Pennington  <hp@pobox.com>
9815
9816         * dbus/dbus-message-builder.c: implement, completely untested.
9817
9818         * test/data/*: add data to be used in testing.
9819         ".message" files are our simple loadable text format.
9820         ".message-raw" will be binary dumps of messages.
9821
9822         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
9823
9824 2003-01-26  Havoc Pennington  <hp@pobox.com>
9825
9826         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
9827
9828         * dbus/dbus-errors.c (dbus_result_to_string): add
9829         file errors
9830
9831         * dbus/dbus-message-builder.c: new file, will contain code to load
9832         up messages from files. Not implemented yet.
9833
9834 2003-01-26  Havoc Pennington  <hp@pobox.com>
9835
9836         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
9837         the sender by setting to NULL
9838
9839 2003-01-26  Havoc Pennington  <hp@pobox.com>
9840
9841         The unit tests pass, but otherwise untested.  If it breaks, the
9842         tests should have been better. ;-)
9843
9844         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
9845         the connection.
9846
9847         * dbus/dbus-message.c: redo everything so we maintain
9848         message->header as the only copy of the various fields.
9849         This avoids the possibility of out-of-memory in some cases,
9850         for example dbus_message_lock() can't run out of memory anymore,
9851         and avoids extra copying. Figured I may as well go ahead and do
9852         this since it was busted for dbus_message_lock to not return
9853         failure on OOM, and dbus_message_write_header was totally
9854         unchecked for OOM. Also fixed some random other bugs.
9855
9856         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
9857         that strings are nul-terminated. Also, end_pos can be equal
9858         to string length just not greater than, I think.
9859         (_dbus_marshal_set_int32): new function
9860         (_dbus_marshal_set_uint32): new function
9861         (_dbus_marshal_set_string): new function
9862
9863         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
9864         a warning, init timeout_list to NULL
9865         (dbus_connection_send_message): don't use uninitialized variable
9866         "serial"
9867
9868         * dbus/dbus-string.c (_dbus_string_replace_len): new function
9869
9870 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
9871
9872         * bus/driver.c: (bus_driver_handle_hello),
9873         (bus_driver_send_welcome_message):
9874         Plug leaks
9875
9876 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
9877
9878         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
9879         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9880         (dbus_connection_unref):
9881         * dbus/dbus-marshal.c: (_dbus_marshal_test):
9882         * dbus/dbus-message.c: (dbus_message_unref),
9883         Plug memory leaks.
9884
9885         (dbus_message_get_fields):
9886         Remove debugging printout.
9887
9888         (_dbus_message_loader_return_buffer):
9889         Don't store the header string.
9890
9891         (_dbus_message_test):
9892         Plug leaks.
9893
9894 2003-01-26  Richard Hult  <rhult@codefactory.se>
9895
9896         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
9897         the file descriptor list, since it can change under us.
9898
9899 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9900
9901         * glib/dbus-gmain.c: (dbus_connection_prepare),
9902         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
9903         (remove_watch), (dbus_connection_hookup_with_g_main):
9904         Rewrite the glib handling to use its own GSource instead of a
9905         GIOChannel so we can catch messages put in the queue while waiting
9906         for a reply.
9907
9908 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9909
9910         * bus/Makefile.am:
9911         * bus/connection.c: (connection_disconnect_handler),
9912         (connection_watch_callback), (bus_connection_setup):
9913         * bus/dispatch.c: (send_one_message),
9914         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
9915         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
9916         * bus/dispatch.h:
9917         * bus/driver.c: (bus_driver_send_service_deleted),
9918         (bus_driver_send_service_created), (bus_driver_handle_hello),
9919         (bus_driver_send_welcome_message),
9920         (bus_driver_handle_list_services), (bus_driver_remove_connection),
9921         (bus_driver_handle_message):
9922         * bus/driver.h:
9923         Refactor code, put the message dispatching in its own file. Use
9924         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
9925         is disconnected.
9926
9927 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9928
9929         * dbus/dbus-internals.h:
9930         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
9931
9932         * dbus/dbus-message.c: (dbus_message_get_sender):
9933         * dbus/dbus-message.h:
9934         Implement dbus_message_get_sender.
9935
9936         * dbus/dbus-protocol.h:
9937         Add message and service defines.
9938
9939 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9940
9941         * dbus/dbus-connection.c: (dbus_connection_send_message):
9942         * dbus/dbus-message-internal.h:
9943         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
9944         (dbus_message_write_header):
9945         Remove _dbus_messag_unlock and don't set the client serial on a
9946         message if one already exists.
9947
9948 2003-01-24  Havoc Pennington  <hp@pobox.com>
9949
9950         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
9951         list_pool
9952
9953         * bus/driver.c (bus_driver_handle_list_services): fix a leak
9954         on OOM
9955
9956 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9957
9958         * dbus/dbus-list.c: (alloc_link), (free_link):
9959         Use a memory pool for the links.
9960
9961 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9962
9963         * bus/connection.c: (bus_connection_foreach):
9964         * bus/connection.h:
9965         Add new bus_connection_foreach function.
9966
9967         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
9968         Add function that broadcasts a message to all clients.
9969
9970         (bus_driver_send_service_created), (bus_driver_handle_hello),
9971         (bus_driver_send_welcome_message),
9972         (bus_driver_handle_list_services), (bus_driver_message_handler):
9973         Implement functions that take care of listing services, and notifying
9974         clients when new services are created.
9975
9976         * bus/services.c: (bus_services_list):
9977         * bus/services.h:
9978         Add new function that returns an array of strings with the currently
9979         registered services.
9980
9981         * glib/dbus-glib.h:
9982         * glib/dbus-gmain.c:
9983         Update copyright year.
9984
9985 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9986
9987         * dbus/dbus-connection.c: (dbus_connection_send_message):
9988         Unlock the message in case it was sent earlier.
9989
9990         (dbus_connection_send_message_with_reply_and_block):
9991         Remove the reply message from the list.
9992
9993         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
9994         Set array_len and new_pos correctly.
9995
9996         (_dbus_marshal_test):
9997         Remove debug output.
9998
9999         * dbus/dbus-message-internal.h:
10000         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
10001         New function that returns the reply serial.
10002
10003         (_dbus_message_unlock):
10004         New function that unlocks a message and resets its header.
10005
10006         (dbus_message_append_string_array),
10007         (dbus_message_get_fields_valist),
10008         (dbus_message_iter_get_field_type),
10009         (dbus_message_iter_get_string_array),
10010         (dbus_message_get_fields),
10011         (dbus_message_append_fields_valist):
10012         Handle string arrays.
10013
10014         (dbus_message_set_sender):
10015         Make this function public since the bus daemon needs it.
10016
10017         (decode_header_data):
10018         Set the reply serial to -1 initially.
10019
10020         * dbus/dbus-message.h:
10021         Add dbus_message_set_sender.
10022
10023 2003-01-24  Havoc Pennington  <hp@pobox.com>
10024
10025         * doc/dbus-specification.sgml: add some stuff
10026
10027 2003-01-22  Havoc Pennington  <hp@pobox.com>
10028
10029         * doc/dbus-specification.sgml: Start to document the protocol.
10030
10031 2003-01-22  Havoc Pennington  <hp@pobox.com>
10032
10033         * dbus/dbus-connection.c
10034         (dbus_connection_send_message_with_reply_and_block): add some @todo
10035
10036         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
10037
10038 2003-01-21  Havoc Pennington  <hp@pobox.com>
10039
10040         (patch untested because can't compile)
10041
10042         * bus/driver.c (create_unique_client_name): make this function
10043         never recycle client names. Also, caller should initialize
10044         the DBusString.
10045
10046         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
10047
10048 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
10049
10050         * dbus/dbus-marshal.c: (_dbus_marshal_double),
10051         (_dbus_marshal_int32), (_dbus_marshal_uint32),
10052         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
10053         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
10054         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
10055         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
10056         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
10057         * dbus/dbus-marshal.h:
10058         * dbus/dbus-protocol.h:
10059         Add support for marshalling and demarshalling integer, double
10060         and string arrays.
10061
10062 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
10063
10064         * bus/Makefile.am:
10065         Add driver.[ch]
10066
10067         * bus/connection.c: (connection_disconnect_handler):
10068         Remove the connection from the bus driver's list.
10069
10070         (connection_watch_callback): Dispatch messages.
10071
10072         (free_connection_data): Free connection name.
10073
10074         (bus_connection_setup): Add connection to the bus driver's list.
10075         (bus_connection_remove_owned_service):
10076         (bus_connection_set_name), (bus_connection_get_name):
10077         Add functions for setting and getting the connection's name.
10078
10079         * bus/connection.h:
10080         Add function headers.
10081
10082         * bus/driver.c: (create_unique_client_name),
10083         (bus_driver_handle_hello_message),
10084         (bus_driver_send_welcome_message), (bus_driver_message_handler),
10085         (bus_driver_add_connection), (bus_driver_remove_connection):
10086         * bus/driver.h:
10087         * bus/main.c:
10088         * bus/services.c: (bus_service_free):
10089         * bus/services.h:
10090         New file that handles communication and registreation with the bus
10091         itself.
10092
10093 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
10094
10095         * dbus/dbus-connection.c: (dbus_connection_send_message):
10096         Add a new client_serial parameter.
10097
10098         (dbus_connection_send_message_with_reply):
10099         Remove a @todo since we've implemented the blocking function.
10100
10101         (dbus_connection_send_message_with_reply_and_block):
10102         New function that sends a message and waits for a reply and
10103         then returns the reply.
10104
10105         * dbus/dbus-connection.h:
10106         Add new functions.
10107
10108         * dbus/dbus-errors.c: (dbus_result_to_string):
10109         * dbus/dbus-errors.h:
10110         Add new DBUS_RESULT.
10111
10112         * dbus/dbus-message-internal.h:
10113         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
10114         (_dbus_message_set_sender), (dbus_message_write_header),
10115         (dbus_message_new_reply), (decode_header_data),
10116         (_dbus_message_loader_return_buffer), (_dbus_message_test):
10117         * dbus/dbus-message.h:
10118         Add new functions that set the reply serial and sender.
10119         Also marshal and demarshal them correctly and add test.
10120
10121         * dbus/dbus-protocol.h:
10122         Add new DBUS_MESSAGE_TYPE_SENDER.
10123
10124         * glib/dbus-glib.h:
10125         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
10126         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
10127         (dbus_connection_hookup_with_g_main):
10128         * glib/test-dbus-glib.c: (main):
10129         Rewrite to use GIOChannel and remove the GSource crack.
10130
10131         * test/echo-client.c: (main):
10132         * test/watch.c: (check_messages):
10133         Update for changed APIs
10134
10135 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
10136
10137         * dbus/Makefile.am: Add dbus-timeout.[cħ]
10138
10139         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
10140         Create a DBusTimeoutList.
10141         (dbus_connection_set_timeout_functions): Add new function to
10142         set timeout callbacks
10143
10144         * dbus/dbus-connection.h: Add public DBusTimeout API.
10145
10146         * dbus/dbus-message.c: (dbus_message_get_service):
10147         * dbus/dbus-message.h:  New function.
10148
10149         * dbus/dbus-server.c: Fix small doc typo.
10150
10151         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
10152
10153 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
10154
10155         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
10156         of the string, just as long as specified.
10157
10158 2003-01-19  Havoc Pennington  <hp@pobox.com>
10159
10160         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
10161         new function
10162
10163         * dbus/dbus-server.c (dbus_server_set_max_connections)
10164         (dbus_server_get_max_connections, dbus_server_get_n_connections):
10165         keep track of current number of connections, and add API for
10166         setting a max (but haven't implemented enforcing the max yet)
10167
10168 2003-01-18  Havoc Pennington  <hp@pobox.com>
10169
10170         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
10171         reading/writing if read_watch != NULL or write_watch != NULL.
10172
10173         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
10174         the message loader code to actually load message->header and
10175         message->body into the newly-created message.
10176
10177         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
10178         in OOM case
10179
10180         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
10181         (dbus_connection_get_max_message_size)
10182         (dbus_connection_set_max_live_messages_size)
10183         (dbus_connection_get_max_live_messages_size): implement some
10184         resource limitation functions
10185
10186         * dbus/dbus-resources.c: new file implementing some of the
10187         resource limits stuff
10188
10189         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
10190         missing docs, add @todo to handle OOM etc.
10191
10192         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
10193         docs
10194
10195 2003-01-18  Havoc Pennington  <hp@pobox.com>
10196
10197         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
10198         connection if it hasn't been already.
10199
10200         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
10201         replace with DisconnectFunction.
10202
10203 2003-01-18  Havoc Pennington  <hp@pobox.com>
10204
10205         Building --disable-verbose-mode --disable-asserts --disable-tests
10206         cuts the library from 112K to 45K or so
10207
10208         * configure.in: check for varargs macro support,
10209         add --enable-verbose-mode, --enable-asserts.
10210
10211         * dbus/dbus-internals.h (_dbus_assert): support
10212         DBUS_DISABLE_ASSERT
10213         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
10214
10215 2003-01-18  Havoc Pennington  <hp@pobox.com>
10216
10217         * dbus/dbus-test.c: include config.h so that tests actually run
10218
10219         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
10220         so the failure mode when that assumption fails will be plenty
10221         obvious.
10222
10223 2003-01-18  Havoc Pennington  <hp@pobox.com>
10224
10225         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
10226
10227         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
10228         the distribution
10229
10230         * test/Makefile.am: don't use special variable "TESTS" for echo-*
10231         since we don't want to use those in make check
10232
10233 2003-01-15  Havoc Pennington  <hp@redhat.com>
10234
10235         Release 0.2
10236
10237         * NEWS: update
10238
10239 2003-01-15  Havoc Pennington  <hp@redhat.com>
10240
10241         * test/Makefile.am: fix so that test source code ends up in the
10242         distribution on make distcheck
10243
10244 2003-01-15  Havoc Pennington  <hp@redhat.com>
10245
10246         Release 0.1.
10247
10248         * NEWS: update
10249
10250 2003-01-15  Havoc Pennington  <hp@redhat.com>
10251
10252         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
10253         fix build when --disable-tests
10254
10255         * Makefile.am (EXTRA_DIST): put HACKING in here
10256
10257         * HACKING: document procedure for making a tarball release.
10258
10259 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
10260
10261         * bus/connection.c: (connection_error_handler),
10262         (bus_connection_setup):
10263         * bus/main.c: (main):
10264         Make sure that the DBusConnectionData struct is NULLed
10265         out to prevent a segfault.
10266
10267         * dbus/dbus-errors.c: (dbus_result_to_string):
10268         * dbus/dbus-errors.h:
10269         * dbus/dbus-message.c: (dbus_message_get_fields),
10270         (dbus_message_get_fields_valist), (_dbus_message_test):
10271         * dbus/dbus-message.h:
10272         Make dbus_message_get_fields return a result code so we can
10273         track invalid fields as well as oom.
10274
10275 2003-01-11  Havoc Pennington  <hp@pobox.com>
10276
10277         * configure.in: change --enable-test/--enable-ansi action-if-given
10278         to enable_foo=$enableval instead of enable_foo=yes
10279
10280 2003-01-08  Havoc Pennington  <hp@pobox.com>
10281
10282         * dbus/dbus-string.c (_dbus_string_align_length): new function
10283
10284         * dbus/dbus-test-main.c: move main() for test app here
10285         * dbus/dbus-test.c
10286         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
10287         symbol to run tests, because dbus-test isn't in the main
10288         library
10289
10290         Code review nitpicks.
10291
10292         * dbus/dbus-message.c (dbus_message_write_header): add newlines
10293         for people with narrow emacs ;-). Assert client_serial was filled
10294         in. Assert message->name != NULL.
10295         (dbus_message_append_fields): have "first_field_type" arg separate
10296         from va list, needed for C++ binding that also uses varargs IIRC
10297         and helps with type safety
10298         (dbus_message_new): add @todo about using DBusString to store
10299         service/name internally
10300         (dbus_message_new): don't leak ->service and ->name on OOM later
10301         in the function
10302         (dbus_message_unref): free the service name
10303         (dbus_message_get_fields): same change to varargs
10304         i.e. first_field_type
10305         (_dbus_message_loader_return_buffer): assert that the message data
10306         is aligned (if not it's a bug in our code). Put in verbose griping
10307         about why we set corrupted = TRUE.
10308         (decode_header_data): add FIXME that char* is evil.  Was going to
10309         add FIXME about evil locale-specific string.h strncmp, but just
10310         switched to wacky string-as-uint32 optimization. Move check for
10311         "no room for field name" above get_const_data_len() to avoid
10312         assertion failure in get_const_data_len if we have trailing 2
10313         bytes or the like. Check for service and name fields being
10314         provided twice. Don't leak service/name on error. Require field
10315         names to be aligned to 4 bytes.
10316
10317         * dbus/dbus-marshal.c: move byte swap stuff to header
10318         (_dbus_pack_int32): uscore-prefix
10319         (_dbus_unpack_int32): uscore-prefix
10320         (_dbus_unpack_uint32): export
10321         (_dbus_demarshal_string): add @todo complaining about use of
10322         memcpy()
10323         (_dbus_marshal_get_field_end_pos): add @todo about bad error
10324         handling allowing corrupt data to go unchecked
10325
10326 2003-01-08  Havoc Pennington  <hp@redhat.com>
10327
10328         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
10329         to the select() as needed for authentication. (should be using
10330         _dbus_poll() not select, but for another day)
10331
10332         * dbus/dbus.h: include dbus/dbus-protocol.h
10333
10334 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
10335
10336         * dbus/Makefile.am (dbusinclude_HEADERS): Install
10337         dbus-connection.h
10338
10339 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
10340
10341         * dbus/dbus-internals.c: (_dbus_type_to_string):
10342         New function that returns a string describing a type.
10343
10344         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
10345         * dbus/dbus-marshal.h:
10346         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
10347         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
10348         (dbus_message_iter_get_byte_array):
10349         * dbus/dbus-message.h:
10350         Add new convenience functions for appending and getting message fields.
10351         Also add demarshalling routines for byte arrays.
10352
10353 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
10354
10355         * dbus/dbus-connection-internal.h:
10356         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
10357         (_dbus_connection_get_next_client_serial),
10358         (dbus_connection_send_message):
10359         * dbus/dbus-internals.h:
10360         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
10361         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
10362         (_dbus_marshal_uint32), (_dbus_demarshal_double),
10363         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
10364         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
10365         (_dbus_verbose_bytes), (_dbus_marshal_test):
10366         * dbus/dbus-marshal.h:
10367         * dbus/dbus-message-internal.h:
10368         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
10369         (dbus_message_write_header), (_dbus_message_lock),
10370         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
10371         (dbus_message_get_name), (dbus_message_append_int32),
10372         (dbus_message_append_uint32), (dbus_message_append_double),
10373         (dbus_message_append_string), (dbus_message_append_byte_array),
10374         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
10375         (dbus_message_iter_unref), (dbus_message_iter_has_next),
10376         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
10377         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
10378         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
10379         (decode_header_data), (_dbus_message_loader_return_buffer),
10380         (message_iter_test), (_dbus_message_test):
10381         * dbus/dbus-message.h:
10382         * dbus/dbus-protocol.h:
10383         * dbus/dbus-test.c: (main):
10384         * dbus/dbus-test.h:
10385         * glib/test-dbus-glib.c: (message_handler), (main):
10386         * test/echo-client.c: (main):
10387         * test/watch.c: (check_messages):
10388         Make messages sendable and receivable for real.
10389
10390 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
10391
10392         * dbus/dbus-marshal.c: (_dbus_marshal_double),
10393         (_dbus_marshal_string), (_dbus_marshal_byte_array):
10394         * dbus/dbus-message.c: (dbus_message_append_int32),
10395         (dbus_message_append_uint32), (dbus_message_append_double),
10396         (dbus_message_append_string), (dbus_message_append_byte_array):
10397         Handle OOM restoration.
10398
10399 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
10400
10401         * dbus/dbus-marshal.c: (_dbus_marshal_string),
10402         (_dbus_demarshal_string), (_dbus_marshal_test):
10403         * dbus/dbus-marshal.h:
10404         * dbus/dbus-message.c: (dbus_message_get_name),
10405         Document these functions.
10406
10407         (dbus_message_append_int32), (dbus_message_append_uint32),
10408         (dbus_message_append_double), (dbus_message_append_string),
10409         (dbus_message_append_byte_array):
10410         * dbus/dbus-message.h:
10411         Add functions for adding message fields of different types.
10412
10413         * dbus/dbus-protocol.h:
10414         Add the different types.
10415
10416 2003-01-05  Havoc Pennington  <hp@pobox.com>
10417
10418         * bus/connection.c: implement routines for handling connections,
10419         first thing is keeping a list of owned services on each connection
10420         and setting up watches etc.
10421
10422         * bus/services.c: implement a mapping from service names to lists
10423         of connections
10424
10425         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
10426
10427         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
10428         to use static mutexes for global data
10429
10430         * dbus/dbus-connection.c (dbus_connection_set_data): add new
10431         collection of functions to set/get application-specific data
10432         on the DBusConnection.
10433
10434 2003-01-04  Havoc Pennington  <hp@pobox.com>
10435
10436         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
10437         (_dbus_poll): new function
10438
10439         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
10440         copied from GLib
10441
10442         * bus/loop.c: initial code for the daemon main loop
10443
10444 2003-01-04  Havoc Pennington  <hp@pobox.com>
10445
10446         * test/watch.c (error_handler): make it safe if the error handler
10447         is called multiple times (if we s/error handler/disconnect
10448         handler/ we should just guarantee it's called only once)
10449
10450         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
10451         error handler on disconnect (it's quite possible we should
10452         just change the error handler to a "disconnect handler," I'm
10453         not sure we have any other meaningful errors)
10454
10455         * configure.in: check for getpwnam_r
10456
10457         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
10458         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
10459         mechanism as in SASL spec, using socket credentials
10460
10461         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
10462         (_dbus_send_credentials_unix_socket): new function
10463
10464         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
10465         dbus_accept()
10466         (_dbus_write): only check errno if <0 returned
10467         (_dbus_write_two): ditto
10468
10469 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
10470
10471         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
10472         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
10473         (_dbus_marshal_test):
10474         * dbus/dbus-marshal.h:
10475         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
10476         to _dbus_marshal_utf8_string. Also fix some tests.
10477
10478 2002-12-28  Harri Porten  <porten@kde.org>
10479
10480         * configure.in: added check for C++ compiler and a very cheesy
10481         check for the Qt integration
10482
10483         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
10484
10485         * qt/Makefile.am: added
10486
10487         * qt/.cvsignore: added
10488
10489         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
10490         latter, added #ifdef QT_THREAD_SUPPORT guard.
10491
10492         * dbus/Makefile.am: added missing headers for make dist
10493
10494 2002-12-28  Kristian Rietveld  <kris@gtk.org>
10495
10496         * dbus/Makefile.am: fixup export-symbols-regex.
10497
10498 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
10499
10500         * acinclude.m4: Add this file and put the
10501         PKG_CHECK_MODULE macro in it.
10502
10503 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
10504
10505         * dbus/dbus-marshal.c: (_dbus_marshal_string),
10506         (_dbus_demarshal_double), (_dbus_demarshal_int32),
10507         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
10508         (_dbus_marshal_test):
10509         Make the demarshalling routines align the pos argument.
10510         Add string marshalling tests and fix the obvious bugs
10511         discovered.
10512
10513 2002-12-26  Havoc Pennington  <hp@pobox.com>
10514
10515         * dbus/dbus-auth.c: fixes fixes fixes
10516
10517         * dbus/dbus-transport-unix.c: wire up support for
10518         encoding/decoding data on the wire
10519
10520         * dbus/dbus-auth.c (_dbus_auth_encode_data)
10521         (_dbus_auth_decode_data): append to target string
10522         instead of nuking it.
10523
10524 2002-12-26  Havoc Pennington  <hp@pobox.com>
10525
10526         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
10527         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
10528         doh
10529
10530         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
10531         avoid swap_bytes() overhead (ignoring possible assembly stuff for
10532         now). Main point is because I wanted unpack_uint32 to implement
10533         _dbus_verbose_bytes
10534         (_dbus_verbose_bytes): new function
10535
10536         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
10537
10538         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
10539         mechanism to handle a corrupt message stream
10540         (_dbus_message_loader_new): fix preallocation to only prealloc,
10541         not prelengthen
10542
10543         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
10544         (_dbus_string_test): enhance tests for copy/move and fix the
10545         functions
10546
10547         * dbus/dbus-transport-unix.c: Hold references in more places to
10548         avoid reentrancy problems
10549
10550         * dbus/dbus-transport.c: ditto
10551
10552         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
10553         leak reference count in no-message case
10554
10555         * test/watch.c (do_mainloop): handle adding/removing watches
10556         during iteration over the watches. Also, ref the connection/server
10557         stored on a watch, so we don't try to mangle a destroyed one.
10558
10559         * dbus/dbus-transport-unix.c (do_authentication): perform
10560         authentication
10561
10562         * dbus/dbus-auth.c (get_state): add a state
10563         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
10564         (_dbus_auth_get_unused_bytes): append the unused bytes
10565         to the passed in string, rather than prepend
10566
10567         * dbus/dbus-transport.c (_dbus_transport_init_base): create
10568         the auth conversation DBusAuth
10569
10570         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
10571         (_dbus_transport_new_for_domain_socket): when creating a
10572         transport, pass in whether it's a client-side or server-side
10573         transport so we know which DBusAuth to create
10574
10575 2002-12-03  Havoc Pennington  <hp@pobox.com>
10576
10577         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
10578         _after_ finalizing the derived members
10579         (unix_connection_set): unref watch if we fail to add it
10580
10581         * dbus/dbus-connection.c (dbus_connection_unref): delete the
10582         transport first, so that the connection owned by the
10583         transport will be valid as the transport finalizes.
10584
10585         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
10586         if necessary, and remove watches from the connection.
10587
10588         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
10589
10590 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
10591
10592         * dbus/dbus-marshal.c: (_dbus_marshal_string),
10593         (_dbus_demarshal_double), (_dbus_demarshal_int32),
10594         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
10595         (_dbus_marshal_test):
10596         * dbus/dbus-marshal.h:
10597         Add string marshal functions and have the demarshal functions
10598         return the new position.
10599
10600 2002-12-25  Havoc Pennington  <hp@pobox.com>
10601
10602         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
10603         it is a simple protocol that just maps directly to SASL.
10604
10605         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
10606         initial implementation, not actually used yet.
10607
10608         * dbus/dbus-string.c (_dbus_string_find): new function
10609         (_dbus_string_equal): new function
10610         (_dbus_string_base64_encode): new function
10611         (_dbus_string_base64_decode): new function
10612
10613 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
10614
10615         * dbus/Makefile.am:
10616         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
10617         (_dbus_marshal_int32), (_dbus_marshal_uint32),
10618         (_dbus_demarshal_double), (_dbus_demarshal_int32),
10619         (_dbus_demarshal_uint32), (_dbus_marshal_test):
10620         * dbus/dbus-marshal.h:
10621         * dbus/dbus-protocol.h:
10622         * dbus/dbus-test.c: (main):
10623         * dbus/dbus-test.h:
10624         Add un-optimized marshalling/demarshalling routines.
10625
10626 2002-12-25  Harri Porten  <porten@kde.org>
10627
10628         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
10629
10630 2002-12-24  Zack Rusin  <zack@kde.org>
10631
10632         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
10633         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
10634         main loop stuff
10635
10636 2002-12-24  Havoc Pennington  <hp@pobox.com>
10637
10638         * glib/dbus-gthread.c: fix include
10639
10640         * glib/dbus-glib.h: rename DBusMessageHandler for now.
10641         I think glib API needs to change, though, as you don't
10642         want to use DBusMessageFunction, you want to use the
10643         DBusMessageHandler object. Probably
10644         dbus_connection_open_with_g_main_loop()
10645         and dbus_connection_setup_g_main_loop() or something like that
10646         (but think of better names...) that just create a connection
10647         that has watch/timeout functions etc. already set up.
10648
10649         * dbus/dbus-connection.c
10650         (dbus_connection_send_message_with_reply): new function just to
10651         show how the message handler helps us deal with replies.
10652
10653         * dbus/dbus-list.c (_dbus_list_remove_last): new function
10654
10655         * dbus/dbus-string.c (_dbus_string_test): free a string that
10656         wasn't
10657
10658         * dbus/dbus-hash.c: use memory pools for the hash entries
10659         (rebuild_table): be more paranoid about overflow, and
10660         shrink table when we can
10661         (_dbus_hash_test): reduce number of sprintfs and write
10662         valid C89. Add tests for case where we grow and then
10663         shrink the hash table.
10664
10665         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
10666
10667         * dbus/dbus-connection.c (dbus_connection_register_handler)
10668         (dbus_connection_unregister_handler): new functions
10669
10670         * dbus/dbus-message.c (dbus_message_get_name): new
10671
10672         * dbus/dbus-list.c: fix docs typo
10673
10674         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
10675         an object representing a handler for messages.
10676
10677 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
10678
10679         * glib/dbus-glib.h:
10680         * glib/dbus-gthread.c: (dbus_gthread_init):
10681         Don't use the gdbus prefix for public functions.
10682
10683 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
10684
10685         * Makefile.am:
10686         * configure.in:
10687         Add GLib checks and fixup .pc files
10688
10689         * glib/Makefile.am:
10690         * glib/dbus-glib.h:
10691         * glib/dbus-gmain.c: (gdbus_connection_prepare),
10692         (gdbus_connection_check), (gdbus_connection_dispatch),
10693         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
10694         (dbus_connection_gsource_new):
10695         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
10696         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
10697         * glib/test-dbus-glib.c: (message_handler), (main):
10698         Add GLib support.
10699
10700 2002-12-15  Harri Porten  <porten@kde.org>
10701
10702         * autogen.sh: check for libtoolize before attempting to use it
10703
10704         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
10705         struct.
10706
10707         * .cvsignore: ignore more stamp files
10708
10709         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
10710
10711         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
10712         without make install.
10713
10714 2002-12-15  Havoc Pennington  <hp@pobox.com>
10715
10716         * dbus/dbus-threads.c: add thread stubs that a higher library
10717         layer can fill in. e.g. the GLib wrapper might fill them in with
10718         GThread stuff. We still need to use this thread API to
10719         thread-safe-ize the library.
10720
10721 2002-12-12  Havoc Pennington  <hp@pobox.com>
10722
10723         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
10724         below new interfaces and include fewer system headers.
10725
10726         * dbus/dbus-sysdeps.c (_dbus_read): new function
10727         (_dbus_write): new function
10728         (_dbus_write_two): new function
10729         (_dbus_connect_unix_socket): new function
10730         (_dbus_listen_unix_socket): new function
10731
10732         * dbus/dbus-message-internal.h: change interfaces to use
10733         DBusString
10734
10735 2002-12-11  Havoc Pennington  <hp@pobox.com>
10736
10737         * dbus/dbus-types.h: add dbus_unichar
10738
10739         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
10740
10741         * dbus/dbus-connection.c (dbus_connection_send_message): return
10742         TRUE on success
10743
10744         * dbus/dbus-transport.c: include dbus-watch.h
10745
10746         * dbus/dbus-connection.c: include dbus-message-internal.h
10747
10748         * HACKING: add file with coding guidelines stuff.
10749
10750         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
10751         handling here, for security purposes (as in vsftpd). Not actually
10752         using this class yet.
10753
10754         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
10755         system/libc usage here, as in vsftpd, for ease of auditing (and
10756         should also simplify portability). Haven't actually moved all the
10757         system/libc usage into here yet.
10758
10759 2002-11-25  Havoc Pennington  <hp@pobox.com>
10760
10761         * dbus/dbus-internals.c (_dbus_verbose): fix to not
10762         always print the first verbose message.
10763
10764 2002-11-24  Havoc Pennington  <hp@pobox.com>
10765
10766         * test/echo-client.c, test/echo-server.c: cheesy test
10767         clients.
10768
10769         * configure.in (AC_CHECK_FUNCS): check for writev
10770
10771         * dbus/dbus-message.c (_dbus_message_get_network_data): new
10772         function
10773
10774         * dbus/dbus-list.c (_dbus_list_foreach): new function
10775
10776         * dbus/dbus-internals.c (_dbus_verbose): new function
10777
10778         * dbus/dbus-server.c, dbus/dbus-server.h: public object
10779         representing a server that listens for connections.
10780
10781         * dbus/.cvsignore: create
10782
10783         * dbus/dbus-errors.h, dbus/dbus-errors.c:
10784         public API for reporting errors
10785
10786         * dbus/dbus-connection.h, dbus/dbus-connection.c:
10787         public object representing a connection that
10788         sends/receives messages. (Same object used for
10789         both client and server.)
10790
10791         * dbus/dbus-transport.h, dbus/dbus-transport.c:
10792         Basic abstraction for different kinds of stream
10793         that we might read/write messages from.
10794
10795 2002-11-23  Havoc Pennington  <hp@pobox.com>
10796
10797         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
10798         _DBUS_INT_MAX
10799
10800         * dbus/dbus-test.c (main): add list test, and include
10801         dbus-test.h as intended
10802
10803         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
10804         (_dbus_hash_table_remove_int): return value indicates
10805         whether the entry existed to remove
10806
10807         * dbus/dbus-list.c: add linked list utility class,
10808         with docs and tests
10809
10810         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
10811         array sometimes.
10812
10813 2002-11-23  Havoc Pennington  <hp@pobox.com>
10814
10815         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
10816         DBUS_END_DECLS to nothing, that should fix this once and for all
10817
10818         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
10819
10820         * dbus/dbus-message.c, dbus/dbus-hash.c:
10821         add some missing @brief
10822
10823 2002-11-23  Havoc Pennington  <hp@pobox.com>
10824
10825         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
10826         to avoid confusing Doxygen
10827
10828         * dbus/dbus-hash.c: @} not }@
10829
10830         * dbus/dbus-message.c (struct DBusMessage): split out
10831         internals docs
10832
10833 2002-11-23  Havoc Pennington  <hp@pobox.com>
10834
10835         * configure.in: pile on more warning flags if using gcc
10836
10837         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
10838         to document static functions
10839
10840         * configure.in: add summary to end of configure so it
10841         looks nice and attractive
10842
10843         * dbus/dbus-hash.c: finish implementation and write unit
10844         tests and docs
10845
10846         * configure.in: add --enable-tests to enable unit tests
10847
10848         * dbus/dbus-test.c: test program to run unit tests
10849         for all files in dbus/*, initially runs a test for
10850         dbus-hash.c
10851
10852         * dbus/dbus-internals.h: file to hold some internal utility stuff
10853
10854 2002-11-22  Havoc Pennington  <hp@redhat.com>
10855
10856         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
10857         "ported" away from Tcl
10858
10859         * dbus/dbus-types.h: header for types such as dbus_bool_t
10860
10861 2002-11-22  Havoc Pennington  <hp@redhat.com>
10862
10863         * dbus/dbus.h: fixups for doc warnings
10864
10865         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
10866         macros
10867         (QUIET): make it quiet so we can see warnings
10868
10869         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
10870
10871 2002-11-22  Havoc Pennington  <hp@redhat.com>
10872
10873         * Makefile.am: include "Doxyfile" target in all-local
10874
10875         * configure.in: generate the Doxyfile
10876
10877         * Doxyfile.in: move Doxyfile here, so we can use
10878         configure to generate a Doxyfile with the right
10879         version number etc.
10880
10881 2002-11-22  Havoc Pennington  <hp@redhat.com>
10882
10883         * dbus/dbus-message.c: move inline docs into .c file
10884
10885         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
10886         so all docs are under doc/
10887         (MAN_EXTENSION): generate man pages. Use extension
10888         ".3dbus" which matches ".3qt" on my system,
10889         I guess this is OK, I don't know really.
10890         (FILE_PATTERNS): look for .c files not .h, makes sense
10891         for plain C I think
10892
10893 2002-11-22  Havoc Pennington  <hp@pobox.com>
10894
10895         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
10896         because any app can be a server, and any app can be a client,
10897         the bus is a special kind of server.
10898
10899 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
10900
10901         * Doxyfile : adding. Still needs Makefile rules to be generated
10902         automatically (just run "doxygen" in the toplevel dir for now to
10903         generate docs)
10904
10905         * dbus/dbus-message.h : Adding sample docs (javadoc since
10906         resembles gtk-doc a little more)
10907
10908         * dbus/dbus.h : Adding sample docs
10909
10910 2002-11-21  Havoc Pennington  <hp@redhat.com>
10911
10912         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
10913         so we can allow ourselves to include files directly,
10914         instead of having to use dbus.h
10915
10916         * dbus/dbus.h: fill in
10917
10918         * dbus/dbus-message.h: sketch out a sample header file.
10919         Include griping if you include it directly instead of
10920         via dbus.h
10921
10922         * dbus/dbus-macros.h: new file with macros for extern "C",
10923         TRUE/FALSE, NULL, etc.
10924
10925         * doc/file-boilerplate.c: put include guards in here
10926
10927 2002-11-21  Havoc Pennington  <hp@redhat.com>
10928
10929         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
10930
10931         * COPYING: include the GPL as well, and license code
10932         under both AFL and GPL.
10933
10934 2002-11-21  Havoc Pennington  <hp@redhat.com>
10935
10936         * acconfig.h: get rid of this
10937
10938         * autogen.sh (run_configure): add --no-configure option
10939
10940         * configure.in: remove AC_ARG_PROGRAM to make
10941         autoconf complain less. add AC_PREREQ.
10942         add AC_DEFINE third arg.
10943
10944 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
10945
10946         * doc/Makefile.am:
10947         Fix references so we can distcheck.
10948
10949 2002-11-21  Havoc Pennington  <hp@redhat.com>
10950
10951         * Initial module creation
10952