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