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