2003-01-22 Havoc Pennington <hp@pobox.com>
[platform/upstream/dbus.git] / ChangeLog
1 2003-01-22  Havoc Pennington  <hp@pobox.com>
2
3         * doc/dbus-specification.sgml: Start to document the protocol.
4
5 2003-01-22  Havoc Pennington  <hp@pobox.com>
6
7         * dbus/dbus-connection.c
8         (dbus_connection_send_message_with_reply_and_block): add some @todo
9
10         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11
12 2003-01-21  Havoc Pennington  <hp@pobox.com>
13
14         (patch untested because can't compile)
15         
16         * bus/driver.c (create_unique_client_name): make this function
17         never recycle client names. Also, caller should initialize 
18         the DBusString.
19
20         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
21
22 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
23
24         * dbus/dbus-marshal.c: (_dbus_marshal_double),
25         (_dbus_marshal_int32), (_dbus_marshal_uint32),
26         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
27         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
28         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
29         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
30         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
31         * dbus/dbus-marshal.h:
32         * dbus/dbus-protocol.h:
33         Add support for marshalling and demarshalling integer, double
34         and string arrays.
35         
36 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
37
38         * bus/Makefile.am:
39         Add driver.[ch]
40         
41         * bus/connection.c: (connection_disconnect_handler):
42         Remove the connection from the bus driver's list.
43         
44         (connection_watch_callback): Dispatch messages.
45
46         (free_connection_data): Free connection name.
47         
48         (bus_connection_setup): Add connection to the bus driver's list.
49         (bus_connection_remove_owned_service): 
50         (bus_connection_set_name), (bus_connection_get_name):
51         Add functions for setting and getting the connection's name.
52         
53         * bus/connection.h:
54         Add function headers.
55         
56         * bus/driver.c: (create_unique_client_name),
57         (bus_driver_handle_hello_message),
58         (bus_driver_send_welcome_message), (bus_driver_message_handler),
59         (bus_driver_add_connection), (bus_driver_remove_connection):
60         * bus/driver.h:
61         * bus/main.c:
62         * bus/services.c: (bus_service_free):
63         * bus/services.h:
64         New file that handles communication and registreation with the bus
65         itself. 
66         
67 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
68
69         * dbus/dbus-connection.c: (dbus_connection_send_message):
70         Add a new client_serial parameter.
71         
72         (dbus_connection_send_message_with_reply):
73         Remove a @todo since we've implemented the blocking function.
74         
75         (dbus_connection_send_message_with_reply_and_block):
76         New function that sends a message and waits for a reply and
77         then returns the reply.
78         
79         * dbus/dbus-connection.h:
80         Add new functions.
81         
82         * dbus/dbus-errors.c: (dbus_result_to_string):
83         * dbus/dbus-errors.h:
84         Add new DBUS_RESULT.
85         
86         * dbus/dbus-message-internal.h:
87         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
88         (_dbus_message_set_sender), (dbus_message_write_header),
89         (dbus_message_new_reply), (decode_header_data),
90         (_dbus_message_loader_return_buffer), (_dbus_message_test):
91         * dbus/dbus-message.h:
92         Add new functions that set the reply serial and sender.
93         Also marshal and demarshal them correctly and add test.
94         
95         * dbus/dbus-protocol.h:
96         Add new DBUS_MESSAGE_TYPE_SENDER.
97         
98         * glib/dbus-glib.h:
99         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
100         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
101         (dbus_connection_hookup_with_g_main):
102         * glib/test-dbus-glib.c: (main):
103         Rewrite to use GIOChannel and remove the GSource crack.
104         
105         * test/echo-client.c: (main):
106         * test/watch.c: (check_messages):
107         Update for changed APIs
108         
109 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
110
111         * dbus/Makefile.am: Add dbus-timeout.[cħ]
112         
113         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
114         Create a DBusTimeoutList.       
115         (dbus_connection_set_timeout_functions): Add new function to
116         set timeout callbacks
117         
118         * dbus/dbus-connection.h: Add public DBusTimeout API.
119         
120         * dbus/dbus-message.c: (dbus_message_get_service):
121         * dbus/dbus-message.h:  New function.
122
123         * dbus/dbus-server.c: Fix small doc typo.
124         
125         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
126
127 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
128
129         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
130         of the string, just as long as specified.
131
132 2003-01-19  Havoc Pennington  <hp@pobox.com>
133
134         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
135         new function
136
137         * dbus/dbus-server.c (dbus_server_set_max_connections)
138         (dbus_server_get_max_connections, dbus_server_get_n_connections):
139         keep track of current number of connections, and add API for
140         setting a max (but haven't implemented enforcing the max yet)
141
142 2003-01-18  Havoc Pennington  <hp@pobox.com>
143
144         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
145         reading/writing if read_watch != NULL or write_watch != NULL.
146
147         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
148         the message loader code to actually load message->header and
149         message->body into the newly-created message.
150
151         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
152         in OOM case
153
154         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
155         (dbus_connection_get_max_message_size) 
156         (dbus_connection_set_max_live_messages_size) 
157         (dbus_connection_get_max_live_messages_size): implement some
158         resource limitation functions
159
160         * dbus/dbus-resources.c: new file implementing some of the
161         resource limits stuff
162
163         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
164         missing docs, add @todo to handle OOM etc.
165
166         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
167         docs
168         
169 2003-01-18  Havoc Pennington  <hp@pobox.com>
170
171         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
172         connection if it hasn't been already.
173
174         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
175         replace with DisconnectFunction.
176
177 2003-01-18  Havoc Pennington  <hp@pobox.com>
178
179         Building --disable-verbose-mode --disable-asserts --disable-tests
180         cuts the library from 112K to 45K or so
181         
182         * configure.in: check for varargs macro support, 
183         add --enable-verbose-mode, --enable-asserts. 
184
185         * dbus/dbus-internals.h (_dbus_assert): support
186         DBUS_DISABLE_ASSERT
187         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
188
189 2003-01-18  Havoc Pennington  <hp@pobox.com>
190
191         * dbus/dbus-test.c: include config.h so that tests actually run
192
193         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
194         so the failure mode when that assumption fails will be plenty
195         obvious.
196
197 2003-01-18  Havoc Pennington  <hp@pobox.com>
198
199         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
200
201         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
202         the distribution
203
204         * test/Makefile.am: don't use special variable "TESTS" for echo-*
205         since we don't want to use those in make check
206
207 2003-01-15  Havoc Pennington  <hp@redhat.com>
208
209         Release 0.2
210         
211         * NEWS: update
212
213 2003-01-15  Havoc Pennington  <hp@redhat.com>
214
215         * test/Makefile.am: fix so that test source code ends up in the
216         distribution on make distcheck
217
218 2003-01-15  Havoc Pennington  <hp@redhat.com>
219
220         Release 0.1.
221         
222         * NEWS: update  
223
224 2003-01-15  Havoc Pennington  <hp@redhat.com>
225
226         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
227         fix build when --disable-tests
228
229         * Makefile.am (EXTRA_DIST): put HACKING in here
230
231         * HACKING: document procedure for making a tarball release.
232
233 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
234
235         * bus/connection.c: (connection_error_handler),
236         (bus_connection_setup):
237         * bus/main.c: (main):
238         Make sure that the DBusConnectionData struct is NULLed
239         out to prevent a segfault.
240         
241         * dbus/dbus-errors.c: (dbus_result_to_string):
242         * dbus/dbus-errors.h:
243         * dbus/dbus-message.c: (dbus_message_get_fields),
244         (dbus_message_get_fields_valist), (_dbus_message_test):
245         * dbus/dbus-message.h:
246         Make dbus_message_get_fields return a result code so we can
247         track invalid fields as well as oom.
248         
249 2003-01-11  Havoc Pennington  <hp@pobox.com>
250
251         * configure.in: change --enable-test/--enable-ansi action-if-given
252         to enable_foo=$enableval instead of enable_foo=yes
253
254 2003-01-08  Havoc Pennington  <hp@pobox.com>
255
256         * dbus/dbus-string.c (_dbus_string_align_length): new function
257
258         * dbus/dbus-test-main.c: move main() for test app here
259         * dbus/dbus-test.c
260         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
261         symbol to run tests, because dbus-test isn't in the main 
262         library
263
264         Code review nitpicks.
265         
266         * dbus/dbus-message.c (dbus_message_write_header): add newlines
267         for people with narrow emacs ;-). Assert client_serial was filled
268         in. Assert message->name != NULL.
269         (dbus_message_append_fields): have "first_field_type" arg separate
270         from va list, needed for C++ binding that also uses varargs IIRC
271         and helps with type safety
272         (dbus_message_new): add @todo about using DBusString to store
273         service/name internally
274         (dbus_message_new): don't leak ->service and ->name on OOM later
275         in the function
276         (dbus_message_unref): free the service name
277         (dbus_message_get_fields): same change to varargs
278         i.e. first_field_type
279         (_dbus_message_loader_return_buffer): assert that the message data
280         is aligned (if not it's a bug in our code). Put in verbose griping
281         about why we set corrupted = TRUE.
282         (decode_header_data): add FIXME that char* is evil.  Was going to
283         add FIXME about evil locale-specific string.h strncmp, but just
284         switched to wacky string-as-uint32 optimization. Move check for
285         "no room for field name" above get_const_data_len() to avoid
286         assertion failure in get_const_data_len if we have trailing 2
287         bytes or the like. Check for service and name fields being
288         provided twice. Don't leak service/name on error. Require field
289         names to be aligned to 4 bytes.
290
291         * dbus/dbus-marshal.c: move byte swap stuff to header
292         (_dbus_pack_int32): uscore-prefix
293         (_dbus_unpack_int32): uscore-prefix
294         (_dbus_unpack_uint32): export
295         (_dbus_demarshal_string): add @todo complaining about use of
296         memcpy()
297         (_dbus_marshal_get_field_end_pos): add @todo about bad error
298         handling allowing corrupt data to go unchecked
299
300 2003-01-08  Havoc Pennington  <hp@redhat.com>
301
302         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
303         to the select() as needed for authentication. (should be using
304         _dbus_poll() not select, but for another day)
305
306         * dbus/dbus.h: include dbus/dbus-protocol.h
307
308 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
309
310         * dbus/Makefile.am (dbusinclude_HEADERS): Install
311         dbus-connection.h
312
313 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
314
315         * dbus/dbus-internals.c: (_dbus_type_to_string):
316         New function that returns a string describing a type.
317         
318         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
319         * dbus/dbus-marshal.h:
320         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
321         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
322         (dbus_message_iter_get_byte_array):
323         * dbus/dbus-message.h:
324         Add new convenience functions for appending and getting message fields.
325         Also add demarshalling routines for byte arrays.
326
327 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
328
329         * dbus/dbus-connection-internal.h:
330         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
331         (_dbus_connection_get_next_client_serial),
332         (dbus_connection_send_message):
333         * dbus/dbus-internals.h:
334         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
335         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
336         (_dbus_marshal_uint32), (_dbus_demarshal_double),
337         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
338         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
339         (_dbus_verbose_bytes), (_dbus_marshal_test):
340         * dbus/dbus-marshal.h:
341         * dbus/dbus-message-internal.h:
342         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
343         (dbus_message_write_header), (_dbus_message_lock),
344         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
345         (dbus_message_get_name), (dbus_message_append_int32),
346         (dbus_message_append_uint32), (dbus_message_append_double),
347         (dbus_message_append_string), (dbus_message_append_byte_array),
348         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
349         (dbus_message_iter_unref), (dbus_message_iter_has_next),
350         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
351         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
352         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
353         (decode_header_data), (_dbus_message_loader_return_buffer),
354         (message_iter_test), (_dbus_message_test):
355         * dbus/dbus-message.h:
356         * dbus/dbus-protocol.h:
357         * dbus/dbus-test.c: (main):
358         * dbus/dbus-test.h:
359         * glib/test-dbus-glib.c: (message_handler), (main):
360         * test/echo-client.c: (main):
361         * test/watch.c: (check_messages):
362         Make messages sendable and receivable for real.
363         
364 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
365
366         * dbus/dbus-marshal.c: (_dbus_marshal_double),
367         (_dbus_marshal_string), (_dbus_marshal_byte_array):
368         * dbus/dbus-message.c: (dbus_message_append_int32),
369         (dbus_message_append_uint32), (dbus_message_append_double),
370         (dbus_message_append_string), (dbus_message_append_byte_array):
371         Handle OOM restoration.
372         
373 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
374
375         * dbus/dbus-marshal.c: (_dbus_marshal_string),
376         (_dbus_demarshal_string), (_dbus_marshal_test):
377         * dbus/dbus-marshal.h:
378         * dbus/dbus-message.c: (dbus_message_get_name),
379         Document these functions.
380         
381         (dbus_message_append_int32), (dbus_message_append_uint32),
382         (dbus_message_append_double), (dbus_message_append_string),
383         (dbus_message_append_byte_array):
384         * dbus/dbus-message.h:
385         Add functions for adding message fields of different types.
386         
387         * dbus/dbus-protocol.h:
388         Add the different types.
389
390 2003-01-05  Havoc Pennington  <hp@pobox.com>
391
392         * bus/connection.c: implement routines for handling connections,
393         first thing is keeping a list of owned services on each connection
394         and setting up watches etc.
395
396         * bus/services.c: implement a mapping from service names to lists
397         of connections
398
399         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
400
401         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
402         to use static mutexes for global data
403
404         * dbus/dbus-connection.c (dbus_connection_set_data): add new
405         collection of functions to set/get application-specific data
406         on the DBusConnection.
407
408 2003-01-04  Havoc Pennington  <hp@pobox.com>
409
410         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
411         (_dbus_poll): new function
412
413         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
414         copied from GLib
415
416         * bus/loop.c: initial code for the daemon main loop
417
418 2003-01-04  Havoc Pennington  <hp@pobox.com>
419
420         * test/watch.c (error_handler): make it safe if the error handler 
421         is called multiple times (if we s/error handler/disconnect
422         handler/ we should just guarantee it's called only once)
423
424         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
425         error handler on disconnect (it's quite possible we should
426         just change the error handler to a "disconnect handler," I'm 
427         not sure we have any other meaningful errors)
428
429         * configure.in: check for getpwnam_r
430
431         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
432         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
433         mechanism as in SASL spec, using socket credentials
434
435         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
436         (_dbus_send_credentials_unix_socket): new function
437
438         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
439         dbus_accept()
440         (_dbus_write): only check errno if <0 returned
441         (_dbus_write_two): ditto
442
443 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
444
445         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
446         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
447         (_dbus_marshal_test):
448         * dbus/dbus-marshal.h:
449         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
450         to _dbus_marshal_utf8_string. Also fix some tests.
451         
452 2002-12-28  Harri Porten  <porten@kde.org>
453
454         * configure.in: added check for C++ compiler and a very cheesy
455         check for the Qt integration
456
457         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
458
459         * qt/Makefile.am: added 
460
461         * qt/.cvsignore: added  
462
463         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
464         latter, added #ifdef QT_THREAD_SUPPORT guard.
465
466         * dbus/Makefile.am: added missing headers for make dist
467
468 2002-12-28  Kristian Rietveld  <kris@gtk.org>
469
470         * dbus/Makefile.am: fixup export-symbols-regex.
471
472 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
473
474         * acinclude.m4: Add this file and put the 
475         PKG_CHECK_MODULE macro in it.
476
477 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
478
479         * dbus/dbus-marshal.c: (_dbus_marshal_string),
480         (_dbus_demarshal_double), (_dbus_demarshal_int32),
481         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
482         (_dbus_marshal_test):
483         Make the demarshalling routines align the pos argument.
484         Add string marshalling tests and fix the obvious bugs 
485         discovered.
486         
487 2002-12-26  Havoc Pennington  <hp@pobox.com>
488
489         * dbus/dbus-auth.c: fixes fixes fixes
490
491         * dbus/dbus-transport-unix.c: wire up support for
492         encoding/decoding data on the wire
493
494         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
495         (_dbus_auth_decode_data): append to target string 
496         instead of nuking it.
497
498 2002-12-26  Havoc Pennington  <hp@pobox.com>
499
500         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
501         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
502         doh
503
504         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
505         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
506         now). Main point is because I wanted unpack_uint32 to implement
507         _dbus_verbose_bytes
508         (_dbus_verbose_bytes): new function
509
510         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
511
512         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
513         mechanism to handle a corrupt message stream
514         (_dbus_message_loader_new): fix preallocation to only prealloc, 
515         not prelengthen
516         
517         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
518         (_dbus_string_test): enhance tests for copy/move and fix the
519         functions
520
521         * dbus/dbus-transport-unix.c: Hold references in more places to 
522         avoid reentrancy problems
523
524         * dbus/dbus-transport.c: ditto
525
526         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
527         leak reference count in no-message case
528
529         * test/watch.c (do_mainloop): handle adding/removing watches
530         during iteration over the watches. Also, ref the connection/server
531         stored on a watch, so we don't try to mangle a destroyed one.
532
533         * dbus/dbus-transport-unix.c (do_authentication): perform
534         authentication
535
536         * dbus/dbus-auth.c (get_state): add a state
537         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
538         (_dbus_auth_get_unused_bytes): append the unused bytes
539         to the passed in string, rather than prepend
540
541         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
542         the auth conversation DBusAuth
543
544         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
545         (_dbus_transport_new_for_domain_socket): when creating a
546         transport, pass in whether it's a client-side or server-side
547         transport so we know which DBusAuth to create
548
549 2002-12-03  Havoc Pennington  <hp@pobox.com>
550
551         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
552         _after_ finalizing the derived members
553         (unix_connection_set): unref watch if we fail to add it
554
555         * dbus/dbus-connection.c (dbus_connection_unref): delete the
556         transport first, so that the connection owned by the 
557         transport will be valid as the transport finalizes.
558
559         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
560         if necessary, and remove watches from the connection.
561         
562         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
563         
564 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
565
566         * dbus/dbus-marshal.c: (_dbus_marshal_string),
567         (_dbus_demarshal_double), (_dbus_demarshal_int32),
568         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
569         (_dbus_marshal_test):
570         * dbus/dbus-marshal.h:
571         Add string marshal functions and have the demarshal functions
572         return the new position.
573         
574 2002-12-25  Havoc Pennington  <hp@pobox.com>
575
576         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
577         it is a simple protocol that just maps directly to SASL.
578
579         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
580         initial implementation, not actually used yet.
581         
582         * dbus/dbus-string.c (_dbus_string_find): new function
583         (_dbus_string_equal): new function
584         (_dbus_string_base64_encode): new function
585         (_dbus_string_base64_decode): new function
586
587 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
588
589         * dbus/Makefile.am:
590         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
591         (_dbus_marshal_int32), (_dbus_marshal_uint32),
592         (_dbus_demarshal_double), (_dbus_demarshal_int32),
593         (_dbus_demarshal_uint32), (_dbus_marshal_test):
594         * dbus/dbus-marshal.h:
595         * dbus/dbus-protocol.h:
596         * dbus/dbus-test.c: (main):
597         * dbus/dbus-test.h:
598         Add un-optimized marshalling/demarshalling routines.
599         
600 2002-12-25  Harri Porten  <porten@kde.org>
601
602         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
603
604 2002-12-24  Zack Rusin  <zack@kde.org>
605
606         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
607         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
608         main loop stuff
609
610 2002-12-24  Havoc Pennington  <hp@pobox.com>
611
612         * glib/dbus-gthread.c: fix include
613
614         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
615         I think glib API needs to change, though, as you don't 
616         want to use DBusMessageFunction, you want to use the 
617         DBusMessageHandler object. Probably 
618         dbus_connection_open_with_g_main_loop()
619         and dbus_connection_setup_g_main_loop() or something like that
620         (but think of better names...) that just create a connection 
621         that has watch/timeout functions etc. already set up.
622
623         * dbus/dbus-connection.c
624         (dbus_connection_send_message_with_reply): new function just to 
625         show how the message handler helps us deal with replies.
626
627         * dbus/dbus-list.c (_dbus_list_remove_last): new function
628
629         * dbus/dbus-string.c (_dbus_string_test): free a string that
630         wasn't
631
632         * dbus/dbus-hash.c: use memory pools for the hash entries
633         (rebuild_table): be more paranoid about overflow, and 
634         shrink table when we can
635         (_dbus_hash_test): reduce number of sprintfs and write
636         valid C89. Add tests for case where we grow and then 
637         shrink the hash table.
638
639         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
640
641         * dbus/dbus-connection.c (dbus_connection_register_handler) 
642         (dbus_connection_unregister_handler): new functions
643
644         * dbus/dbus-message.c (dbus_message_get_name): new
645
646         * dbus/dbus-list.c: fix docs typo
647
648         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
649         an object representing a handler for messages.
650
651 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
652
653         * glib/dbus-glib.h:
654         * glib/dbus-gthread.c: (dbus_gthread_init):
655         Don't use the gdbus prefix for public functions.
656         
657 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
658
659         * Makefile.am:
660         * configure.in:
661         Add GLib checks and fixup .pc files
662         
663         * glib/Makefile.am:
664         * glib/dbus-glib.h:
665         * glib/dbus-gmain.c: (gdbus_connection_prepare),
666         (gdbus_connection_check), (gdbus_connection_dispatch),
667         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
668         (dbus_connection_gsource_new):
669         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
670         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
671         * glib/test-dbus-glib.c: (message_handler), (main):
672         Add GLib support.
673         
674 2002-12-15  Harri Porten  <porten@kde.org>
675
676         * autogen.sh: check for libtoolize before attempting to use it 
677         
678         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
679         struct.
680         
681         * .cvsignore: ignore more stamp files
682
683         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
684
685         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
686         without make install.
687
688 2002-12-15  Havoc Pennington  <hp@pobox.com>
689
690         * dbus/dbus-threads.c: add thread stubs that a higher library
691         layer can fill in. e.g. the GLib wrapper might fill them in with
692         GThread stuff. We still need to use this thread API to
693         thread-safe-ize the library.
694
695 2002-12-12  Havoc Pennington  <hp@pobox.com>
696
697         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
698         below new interfaces and include fewer system headers.
699
700         * dbus/dbus-sysdeps.c (_dbus_read): new function
701         (_dbus_write): new function
702         (_dbus_write_two): new function
703         (_dbus_connect_unix_socket): new function
704         (_dbus_listen_unix_socket): new function
705
706         * dbus/dbus-message-internal.h: change interfaces to use
707         DBusString
708
709 2002-12-11  Havoc Pennington  <hp@pobox.com>
710
711         * dbus/dbus-types.h: add dbus_unichar
712
713         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
714
715         * dbus/dbus-connection.c (dbus_connection_send_message): return
716         TRUE on success
717
718         * dbus/dbus-transport.c: include dbus-watch.h   
719
720         * dbus/dbus-connection.c: include dbus-message-internal.h
721
722         * HACKING: add file with coding guidelines stuff.
723
724         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
725         handling here, for security purposes (as in vsftpd). Not actually
726         using this class yet.
727
728         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
729         system/libc usage here, as in vsftpd, for ease of auditing (and
730         should also simplify portability). Haven't actually moved all the
731         system/libc usage into here yet.
732         
733 2002-11-25  Havoc Pennington  <hp@pobox.com>
734
735         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
736         always print the first verbose message.
737
738 2002-11-24  Havoc Pennington  <hp@pobox.com>
739
740         * test/echo-client.c, test/echo-server.c: cheesy test 
741         clients.
742         
743         * configure.in (AC_CHECK_FUNCS): check for writev
744
745         * dbus/dbus-message.c (_dbus_message_get_network_data): new
746         function
747
748         * dbus/dbus-list.c (_dbus_list_foreach): new function
749
750         * dbus/dbus-internals.c (_dbus_verbose): new function
751
752         * dbus/dbus-server.c, dbus/dbus-server.h: public object
753         representing a server that listens for connections.
754
755         * dbus/.cvsignore: create
756
757         * dbus/dbus-errors.h, dbus/dbus-errors.c:
758         public API for reporting errors
759
760         * dbus/dbus-connection.h, dbus/dbus-connection.c:
761         public object representing a connection that 
762         sends/receives messages. (Same object used for 
763         both client and server.)
764
765         * dbus/dbus-transport.h, dbus/dbus-transport.c:
766         Basic abstraction for different kinds of stream
767         that we might read/write messages from.
768
769 2002-11-23  Havoc Pennington  <hp@pobox.com>
770
771         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
772         _DBUS_INT_MAX
773
774         * dbus/dbus-test.c (main): add list test, and include 
775         dbus-test.h as intended
776
777         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
778         (_dbus_hash_table_remove_int): return value indicates 
779         whether the entry existed to remove
780
781         * dbus/dbus-list.c: add linked list utility class, 
782         with docs and tests
783
784         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
785         array sometimes.
786
787 2002-11-23  Havoc Pennington  <hp@pobox.com>
788
789         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
790         DBUS_END_DECLS to nothing, that should fix this once and for all
791
792         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
793
794         * dbus/dbus-message.c, dbus/dbus-hash.c: 
795         add some missing @brief
796
797 2002-11-23  Havoc Pennington  <hp@pobox.com>
798
799         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
800         to avoid confusing Doxygen
801
802         * dbus/dbus-hash.c: @} not }@
803
804         * dbus/dbus-message.c (struct DBusMessage): split out 
805         internals docs
806
807 2002-11-23  Havoc Pennington  <hp@pobox.com>
808
809         * configure.in: pile on more warning flags if using gcc
810
811         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
812         to document static functions
813
814         * configure.in: add summary to end of configure so it 
815         looks nice and attractive
816
817         * dbus/dbus-hash.c: finish implementation and write unit 
818         tests and docs
819
820         * configure.in: add --enable-tests to enable unit tests
821
822         * dbus/dbus-test.c: test program to run unit tests 
823         for all files in dbus/*, initially runs a test for 
824         dbus-hash.c
825         
826         * dbus/dbus-internals.h: file to hold some internal utility stuff
827
828 2002-11-22  Havoc Pennington  <hp@redhat.com>
829
830         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
831         "ported" away from Tcl
832
833         * dbus/dbus-types.h: header for types such as dbus_bool_t
834
835 2002-11-22  Havoc Pennington  <hp@redhat.com>
836
837         * dbus/dbus.h: fixups for doc warnings
838
839         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
840         macros
841         (QUIET): make it quiet so we can see warnings
842
843         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
844
845 2002-11-22  Havoc Pennington  <hp@redhat.com>
846
847         * Makefile.am: include "Doxyfile" target in all-local
848
849         * configure.in: generate the Doxyfile
850
851         * Doxyfile.in: move Doxyfile here, so we can use 
852         configure to generate a Doxyfile with the right 
853         version number etc.
854
855 2002-11-22  Havoc Pennington  <hp@redhat.com>
856
857         * dbus/dbus-message.c: move inline docs into .c file
858
859         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
860         so all docs are under doc/
861         (MAN_EXTENSION): generate man pages. Use extension 
862         ".3dbus" which matches ".3qt" on my system, 
863         I guess this is OK, I don't know really.
864         (FILE_PATTERNS): look for .c files not .h, makes sense
865         for plain C I think
866
867 2002-11-22  Havoc Pennington  <hp@pobox.com>
868
869         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
870         because any app can be a server, and any app can be a client, 
871         the bus is a special kind of server.
872
873 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
874
875         * Doxyfile : adding. Still needs Makefile rules to be generated
876         automatically (just run "doxygen" in the toplevel dir for now to
877         generate docs)
878         
879         * dbus/dbus-message.h : Adding sample docs (javadoc since
880         resembles gtk-doc a little more)
881
882         * dbus/dbus.h : Adding sample docs
883
884 2002-11-21  Havoc Pennington  <hp@redhat.com>
885
886         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
887         so we can allow ourselves to include files directly, 
888         instead of having to use dbus.h
889
890         * dbus/dbus.h: fill in
891
892         * dbus/dbus-message.h: sketch out a sample header file.
893         Include griping if you include it directly instead of 
894         via dbus.h
895
896         * dbus/dbus-macros.h: new file with macros for extern "C", 
897         TRUE/FALSE, NULL, etc.
898
899         * doc/file-boilerplate.c: put include guards in here
900
901 2002-11-21  Havoc Pennington  <hp@redhat.com>
902
903         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
904
905         * COPYING: include the GPL as well, and license code 
906         under both AFL and GPL.
907
908 2002-11-21  Havoc Pennington  <hp@redhat.com>
909
910         * acconfig.h: get rid of this
911
912         * autogen.sh (run_configure): add --no-configure option
913
914         * configure.in: remove AC_ARG_PROGRAM to make
915         autoconf complain less. add AC_PREREQ. 
916         add AC_DEFINE third arg.
917         
918 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
919
920         * doc/Makefile.am:
921         Fix references so we can distcheck.
922
923 2002-11-21  Havoc Pennington  <hp@redhat.com>
924
925         * Initial module creation
926