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