2003-02-02 Havoc Pennington <hp@pobox.com>
[platform/upstream/dbus.git] / ChangeLog
1 2003-02-02  Havoc Pennington  <hp@pobox.com>
2
3         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files 
4         for code to manage cookies in your home directory
5
6         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
7
8         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
9         to authenticate, then disconnect the client.
10
11 2003-02-03  Alexander Larsson  <alexl@redhat.com>
12
13         * dbus/dbus-message.c (dbus_message_append_fields):
14         Correct docs.
15
16 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
17
18         * doc/dbus-specification.sgml:
19         Update address format section.
20         
21 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
22
23         * test/Makefile.am:
24         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
25         (message_handler), (new_connection_callback), (loop_quit),
26         (loop_run), (main):
27         Add bus test.
28         
29 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
30
31         * bus/driver.c: (bus_driver_handle_service_exists):
32         Simplify the code a bit.
33         
34         * dbus/dbus-bus.c: (dbus_bus_service_exists):
35         Fix a silly. 
36         
37 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
38
39         * bus/Makefile.am:
40         Add libdbus-daemon.la and link to it.
41
42 2003-02-01  James Willcox  <jwillcox@gnome.org>
43
44         * bus/driver.c: (bus_driver_handle_own_service):
45         Actually include the service reply code in the message.
46
47 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
48
49         * bus/driver.c: (bus_driver_handle_service_exists):
50         Don't unref the incoming message.
51         
52 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
53
54         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
55
56 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
57
58         * dbus/dbus-server.c: (dbus_server_listen):
59         * dbus/dbus-transport.c: (_dbus_transport_open):
60         ifdef out the calls to the debug transport and server.
61         
62 2003-02-02  Alexander Larsson  <alexl@redhat.com>
63
64         * dbus/dbus-watch.c (dbus_watch_get_flags):
65         Add note in the docs that ERROR or HANGUP won't be returned
66         and are assumed always on.
67
68         * glib/dbus-gmain.c (add_watch):
69         Always add IO_ERR | IO_HUP
70
71         * dbus/dbus-message.h:
72         Add semicolon after dbus_message_iter_get_string_array().
73         Makes qt code build again
74
75 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
76
77         * bus/driver.c: (create_unique_client_name),
78         (bus_driver_handle_hello):
79         Don't take a name, just use a numeric id to identify
80         each client.
81         
82         * dbus/Makefile.am:
83         * dbus/dbus-bus.c: (dbus_bus_register_client),
84         (dbus_bus_acquire_service), (dbus_bus_service_exists):
85         * dbus/dbus-bus.h:
86         Add new convenience functions for communicating with the bus.
87         
88         * dbus/dbus-message.h:
89         
90         * dbus/dbus-protocol.h:
91         Fix a typo.
92         
93 2003-02-01  Alexander Larsson  <alexl@redhat.com>
94
95         * dbus/dbus-message.c (dbus_message_append_fields):
96         Add some more doc comments.
97
98 2003-02-01  Havoc Pennington  <hp@pobox.com>
99
100         * dbus/dbus-break-loader.c (randomly_modify_length): change 
101         a 4-byte value in the message as if it were a length
102
103         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
104         execute bit on saved files
105
106 2003-02-01  Havoc Pennington  <hp@pobox.com>
107
108         * dbus/dbus-break-loader.c (main): new program to find messages
109         that break the loader.
110
111         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
112         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
113
114         * dbus/dbus-string.c (_dbus_string_set_byte): new
115         
116 2003-01-31  Havoc Pennington  <hp@pobox.com>
117
118         * dbus/dbus-message.c: refactor the test code to be more general, 
119         in preparation for writing a "randomly permute test cases to 
120         try to break the loader" program.
121
122 2003-01-31  Havoc Pennington  <hp@pobox.com>
123         
124         * doc/dbus-specification.sgml: work on the specification
125
126         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check 
127         the protocol version of the message.
128
129         * dbus/dbus-protocol.h: drop special _REPLY names, the spec 
130         no longer specifies that.
131         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not 
132         1/2/3/4)
133
134         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
135         "break" for DBUS_TYPE_NIL, remove @todo
136
137 2003-01-31  Havoc Pennington  <hp@pobox.com>
138
139         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename 
140         just set_is_error/get_is_error as this is a commonly-used
141         function, and write docs.
142
143 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
144
145         * dbus/dbus-address.c: (dbus_address_entry_free):
146         Free key and value lists.
147         
148         * dbus/dbus-internals.c: (_dbus_type_to_string):
149         Add the types we didn't have.
150         
151         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
152         (_dbus_marshal_validate_arg):
153         Add NIL types.
154         
155         * dbus/dbus-message.c: (dbus_message_set_sender):
156         Remove todo about being able to set sender to NULL.
157         
158         (dbus_message_set_is_error_reply),
159         (dbus_message_get_is_error_reply):
160         * dbus/dbus-message.h:
161         New functions.
162         
163         * dbus/dbus-protocol.h:
164         Add error reply flag.
165         
166         * test/data/valid-messages/opposite-endian.message:
167         Add NIL type to test.
168         
169 2003-01-31  Havoc Pennington  <hp@pobox.com>
170
171         * doc/dbus-specification.sgml: fully specify the header.  Add
172         flags and major protocol version, and change header/body len to
173         unsigned.
174
175         * dbus/dbus-message-builder.c (append_saved_length): append length
176         as uint32
177
178         * dbus/dbus-message.c (dbus_message_create_header): change header
179         length and body length to unsigned. Add the new fields from the
180         spec
181         (_dbus_message_loader_return_buffer): unsigned header/body len
182
183 2003-01-30  Havoc Pennington  <hp@pobox.com>
184
185         * dbus/dbus-auth.c: rework to use only REJECTED, no 
186         MECHANISMS
187
188         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just 
189         use REJECTED, suggested by Mark McLoughlin
190
191 2003-01-30  Havoc Pennington  <hp@pobox.com>
192
193         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
194         a better way to report errors here. e.g.  "unix address lacks
195         path" or something. also "no such file" when the path doesn't
196         exist, etc.
197
198         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
199         leaking list nodes
200         (dbus_parse_address): add @todo about documenting address format, 
201         and allowing , and ; to be escaped
202
203 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
204
205         * dbus/Makefile.am:
206         Add dbus-address.[ch]
207         
208         * dbus/dbus-address.c: (dbus_address_entry_free),
209         (dbus_address_entries_free), (create_entry),
210         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
211         (dbus_parse_address), (_dbus_address_test):
212         * dbus/dbus-address.h:
213         New files for dealing with address parsing.
214         
215         * dbus/dbus-connection.c:
216         Document timeout functions.
217         
218         * dbus/dbus-message.c:
219         Document dbus_message_new_from_message.
220         
221         * dbus/dbus-server-debug.c:
222         Document.
223         
224         * dbus/dbus-server.c: (dbus_server_listen):
225         Parse address and use correct server implementation.
226         
227         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
228         * dbus/dbus-string.h:
229         New function with test.
230         
231         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
232         * dbus/dbus-test.h:
233         Add address tests.
234         
235         * dbus/dbus-transport-debug.c:
236         Document.
237         
238         * dbus/dbus-transport.c: (_dbus_transport_open):
239         Parse address and use correct transport implementation. 
240
241 2003-01-30  Havoc Pennington  <hp@pobox.com>
242
243         * dbus/dbus-message.c: use message->byte_order instead of 
244         DBUS_COMPILER_BYTE_ORDER throughout.
245         (dbus_message_create_header): pad header to align the 
246         start of the body of the message to 8-byte boundary
247
248         * dbus/dbus-marshal.h: make all the demarshalers take const 
249         DBusString arguments.
250
251         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
252         validate message args here, so we don't have to do slow validation
253         later, and so we catch bad messages as they are incoming. Also add
254         better checks on header_len and body_len. Also fill in
255         message->byte_order
256
257         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
258         implemented properly)
259         (_dbus_string_validate_nul): new function to check all-nul
260
261         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename 
262         get_arg_end_pos and remove all validation
263         (_dbus_marshal_validate_arg): actually do validation here.
264
265 2003-01-29  Havoc Pennington  <hp@pobox.com>
266
267         * dbus/dbus-message.c (check_message_handling): fix assertion
268         failure on set_client_serial
269
270 2003-01-28  Havoc Pennington  <hp@pobox.com>
271
272         * dbus/dbus-server-debug.c: Add doc section comments
273         
274         * dbus/dbus-transport-debug.c: add doc section comments
275         
276 2003-01-28  Havoc Pennington  <hp@redhat.com>
277
278         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
279         the reverse order from how I had it
280         (_dbus_string_base64_encode): reverse encoding order. I was
281         basically byteswapping everything during encoding.
282
283 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
284
285         * dbus/dbus-connection-internal.h:
286         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
287         (_dbus_connection_remove_timeout):
288         Add functions for adding and removing timeouts.
289         
290         * dbus/dbus-message.c: (dbus_message_new_from_message):
291         Add new function that takes a message and creates an exact
292         copy of it, but with the refcount set to 1.
293         (check_message_handling):
294         Fix build error.
295         
296         * dbus/dbus-server-protected.h:
297         * dbus/dbus-server.c: (_dbus_server_init_base),
298         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
299         (dbus_server_set_timeout_functions):
300         (_dbus_server_remove_timeout):
301         New functions so that a server can add and remove timeouts.
302
303         (dbus_server_listen):
304         Add commented out call to dbus_server_debug_new.
305
306         * dbus/dbus-timeout.c: (_dbus_timeout_new):
307         Actually set the handler, doh.
308         
309         * dbus/dbus-transport.c: (_dbus_transport_open):
310         Add commented out call to dbus_transport_debug_client_new.
311         
312         * dbus/Makefile.am:
313         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
314         
315 2003-01-28  Havoc Pennington  <hp@pobox.com>
316
317         * dbus/dbus-message.c (check_message_handling): function to check 
318         on the loaded message, iterates over it etc.
319
320 2003-01-28  Havoc Pennington  <hp@pobox.com>
321
322         * test/Makefile.am (dist-hook): fix make distdir
323
324         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
325
326 2003-01-27  Havoc Pennington  <hp@pobox.com>
327
328         * dbus/dbus-mempool.c (time_for_size): replace printf with 
329         _dbus_verbose
330
331         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
332         empty lines; fix the SAVE_LENGTH stuff to be
333         START_LENGTH/END_LENGTH so it actually works; couple other 
334         bugfixes
335         
336         * test/Makefile.am (dist-hook): add dist-hook for .message files
337
338         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
339         can be constant or locked.
340         (_dbus_string_free): allow freeing a const string as
341         documented/intended
342
343         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
344
345         * dbus/dbus-test-main.c (main): take an argument which is the 
346         directory containing test data
347
348         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
349         argument to this and load all the messages in test/data/
350         checking that they can be loaded or not loaded as appropriate.
351
352 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
353
354         * bus/dispatch.c: (bus_dispatch_message_handler):
355         Dispatch messages sent to services.
356         
357         * bus/driver.c: (bus_driver_send_service_deleted),
358         (bus_driver_send_service_created), (bus_driver_send_service_lost),
359         (bus_driver_send_service_acquired):
360         Add helper functions for sending service related messages.
361
362         (bus_driver_send_welcome_message):
363         Send HELLO_REPLY instead of WELCOME.
364         
365         (bus_driver_handle_list_services):
366         Send LIST_SERVICES_REPLY instead of SERVICES.
367         
368         (bus_driver_handle_own_service),
369         (bus_driver_handle_service_exists):
370         New message handlers.
371         
372         (bus_driver_handle_message):
373         Invoke new message handlers.
374         
375         (bus_driver_remove_connection):
376         Don't remove any services here since that's done automatically
377         by bus_service_remove_owner now.
378         
379         * bus/driver.h:
380         New function signatures.
381         
382         * bus/services.c: (bus_service_add_owner):
383         Send ServiceAcquired message if we're the only primary owner.
384         
385         (bus_service_remove_owner):
386         Send ServiceAcquired/ServiceLost messages.
387         
388         (bus_service_set_prohibit_replacement),
389         (bus_service_get_prohibit_replacement):
390         Functions for setting prohibit replacement.
391         
392         (bus_service_has_owner):
393         New function that checks if a connection is in the owner queue of 
394         a certain service.
395         
396         * bus/services.h:
397         Add new function signatures.
398         
399         * dbus/dbus-list.c: (_dbus_list_test):
400         Add tests for _dbus_list_remove_last and traversing the list backwards.
401         
402         * dbus/dbus-list.h:
403         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
404         go any further, so return NULL then.
405         
406         * dbus/dbus-protocol.h:
407         Add new messages, service flags and service replies.
408         
409 2003-01-26  Havoc Pennington  <hp@pobox.com>
410
411         * dbus/dbus-message-builder.c: implement, completely untested.
412
413         * test/data/*: add data to be used in testing. 
414         ".message" files are our simple loadable text format.
415         ".message-raw" will be binary dumps of messages.
416
417         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
418
419 2003-01-26  Havoc Pennington  <hp@pobox.com>
420
421         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
422
423         * dbus/dbus-errors.c (dbus_result_to_string): add
424         file errors
425
426         * dbus/dbus-message-builder.c: new file, will contain code to load
427         up messages from files. Not implemented yet.
428
429 2003-01-26  Havoc Pennington  <hp@pobox.com>
430
431         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
432         the sender by setting to NULL
433
434 2003-01-26  Havoc Pennington  <hp@pobox.com>
435
436         The unit tests pass, but otherwise untested.  If it breaks, the
437         tests should have been better. ;-)
438         
439         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
440         the connection.
441
442         * dbus/dbus-message.c: redo everything so we maintain 
443         message->header as the only copy of the various fields.
444         This avoids the possibility of out-of-memory in some cases,
445         for example dbus_message_lock() can't run out of memory anymore,
446         and avoids extra copying. Figured I may as well go ahead and do 
447         this since it was busted for dbus_message_lock to not return 
448         failure on OOM, and dbus_message_write_header was totally
449         unchecked for OOM. Also fixed some random other bugs.
450
451         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
452         that strings are nul-terminated. Also, end_pos can be equal 
453         to string length just not greater than, I think.
454         (_dbus_marshal_set_int32): new function
455         (_dbus_marshal_set_uint32): new function
456         (_dbus_marshal_set_string): new function
457
458         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
459         a warning, init timeout_list to NULL
460         (dbus_connection_send_message): don't use uninitialized variable
461         "serial"
462
463         * dbus/dbus-string.c (_dbus_string_replace_len): new function
464
465 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
466
467         * bus/driver.c: (bus_driver_handle_hello),
468         (bus_driver_send_welcome_message):
469         Plug leaks
470         
471 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
472
473         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
474         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
475         (dbus_connection_unref):
476         * dbus/dbus-marshal.c: (_dbus_marshal_test):
477         * dbus/dbus-message.c: (dbus_message_unref),
478         Plug memory leaks.
479         
480         (dbus_message_get_fields): 
481         Remove debugging printout.
482
483         (_dbus_message_loader_return_buffer):
484         Don't store the header string.
485         
486         (_dbus_message_test):
487         Plug leaks.
488
489 2003-01-26  Richard Hult  <rhult@codefactory.se>
490
491         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
492         the file descriptor list, since it can change under us.
493
494 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
495
496         * glib/dbus-gmain.c: (dbus_connection_prepare),
497         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
498         (remove_watch), (dbus_connection_hookup_with_g_main):
499         Rewrite the glib handling to use its own GSource instead of a 
500         GIOChannel so we can catch messages put in the queue while waiting
501         for a reply.
502         
503 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
504
505         * bus/Makefile.am:
506         * bus/connection.c: (connection_disconnect_handler),
507         (connection_watch_callback), (bus_connection_setup):
508         * bus/dispatch.c: (send_one_message),
509         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
510         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
511         * bus/dispatch.h:
512         * bus/driver.c: (bus_driver_send_service_deleted),
513         (bus_driver_send_service_created), (bus_driver_handle_hello),
514         (bus_driver_send_welcome_message),
515         (bus_driver_handle_list_services), (bus_driver_remove_connection),
516         (bus_driver_handle_message):
517         * bus/driver.h:
518         Refactor code, put the message dispatching in its own file. Use 
519         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
520         is disconnected.
521         
522 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
523
524         * dbus/dbus-internals.h:
525         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
526         
527         * dbus/dbus-message.c: (dbus_message_get_sender):
528         * dbus/dbus-message.h:
529         Implement dbus_message_get_sender.
530         
531         * dbus/dbus-protocol.h:
532         Add message and service defines.
533         
534 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
535
536         * dbus/dbus-connection.c: (dbus_connection_send_message):
537         * dbus/dbus-message-internal.h:
538         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
539         (dbus_message_write_header):
540         Remove _dbus_messag_unlock and don't set the client serial on a 
541         message if one already exists.
542         
543 2003-01-24  Havoc Pennington  <hp@pobox.com>
544
545         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
546         list_pool
547
548         * bus/driver.c (bus_driver_handle_list_services): fix a leak 
549         on OOM
550
551 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
552
553         * dbus/dbus-list.c: (alloc_link), (free_link):
554         Use a memory pool for the links.
555         
556 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
557
558         * bus/connection.c: (bus_connection_foreach):
559         * bus/connection.h:
560         Add new bus_connection_foreach function.
561         
562         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
563         Add function that broadcasts a message to all clients.
564         
565         (bus_driver_send_service_created), (bus_driver_handle_hello),
566         (bus_driver_send_welcome_message),
567         (bus_driver_handle_list_services), (bus_driver_message_handler):
568         Implement functions that take care of listing services, and notifying
569         clients when new services are created.
570         
571         * bus/services.c: (bus_services_list):
572         * bus/services.h:
573         Add new function that returns an array of strings with the currently
574         registered services.
575         
576         * glib/dbus-glib.h:
577         * glib/dbus-gmain.c:
578         Update copyright year.
579         
580 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
581
582         * dbus/dbus-connection.c: (dbus_connection_send_message):
583         Unlock the message in case it was sent earlier.
584         
585         (dbus_connection_send_message_with_reply_and_block):
586         Remove the reply message from the list.
587         
588         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
589         Set array_len and new_pos correctly.
590         
591         (_dbus_marshal_test):
592         Remove debug output.
593         
594         * dbus/dbus-message-internal.h:
595         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
596         New function that returns the reply serial.
597         
598         (_dbus_message_unlock):
599         New function that unlocks a message and resets its header.
600
601         (dbus_message_append_string_array), 
602         (dbus_message_get_fields_valist),
603         (dbus_message_iter_get_field_type),
604         (dbus_message_iter_get_string_array),   
605         (dbus_message_get_fields),      
606         (dbus_message_append_fields_valist):
607         Handle string arrays.
608         
609         (dbus_message_set_sender):
610         Make this function public since the bus daemon needs it.
611         
612         (decode_header_data):
613         Set the reply serial to -1 initially.
614
615         * dbus/dbus-message.h:
616         Add dbus_message_set_sender.    
617
618 2003-01-24  Havoc Pennington  <hp@pobox.com>
619
620         * doc/dbus-specification.sgml: add some stuff
621
622 2003-01-22  Havoc Pennington  <hp@pobox.com>
623
624         * doc/dbus-specification.sgml: Start to document the protocol.
625
626 2003-01-22  Havoc Pennington  <hp@pobox.com>
627
628         * dbus/dbus-connection.c
629         (dbus_connection_send_message_with_reply_and_block): add some @todo
630
631         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
632
633 2003-01-21  Havoc Pennington  <hp@pobox.com>
634
635         (patch untested because can't compile)
636         
637         * bus/driver.c (create_unique_client_name): make this function
638         never recycle client names. Also, caller should initialize 
639         the DBusString.
640
641         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
642
643 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
644
645         * dbus/dbus-marshal.c: (_dbus_marshal_double),
646         (_dbus_marshal_int32), (_dbus_marshal_uint32),
647         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
648         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
649         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
650         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
651         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
652         * dbus/dbus-marshal.h:
653         * dbus/dbus-protocol.h:
654         Add support for marshalling and demarshalling integer, double
655         and string arrays.
656         
657 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
658
659         * bus/Makefile.am:
660         Add driver.[ch]
661         
662         * bus/connection.c: (connection_disconnect_handler):
663         Remove the connection from the bus driver's list.
664         
665         (connection_watch_callback): Dispatch messages.
666
667         (free_connection_data): Free connection name.
668         
669         (bus_connection_setup): Add connection to the bus driver's list.
670         (bus_connection_remove_owned_service): 
671         (bus_connection_set_name), (bus_connection_get_name):
672         Add functions for setting and getting the connection's name.
673         
674         * bus/connection.h:
675         Add function headers.
676         
677         * bus/driver.c: (create_unique_client_name),
678         (bus_driver_handle_hello_message),
679         (bus_driver_send_welcome_message), (bus_driver_message_handler),
680         (bus_driver_add_connection), (bus_driver_remove_connection):
681         * bus/driver.h:
682         * bus/main.c:
683         * bus/services.c: (bus_service_free):
684         * bus/services.h:
685         New file that handles communication and registreation with the bus
686         itself. 
687         
688 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
689
690         * dbus/dbus-connection.c: (dbus_connection_send_message):
691         Add a new client_serial parameter.
692         
693         (dbus_connection_send_message_with_reply):
694         Remove a @todo since we've implemented the blocking function.
695         
696         (dbus_connection_send_message_with_reply_and_block):
697         New function that sends a message and waits for a reply and
698         then returns the reply.
699         
700         * dbus/dbus-connection.h:
701         Add new functions.
702         
703         * dbus/dbus-errors.c: (dbus_result_to_string):
704         * dbus/dbus-errors.h:
705         Add new DBUS_RESULT.
706         
707         * dbus/dbus-message-internal.h:
708         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
709         (_dbus_message_set_sender), (dbus_message_write_header),
710         (dbus_message_new_reply), (decode_header_data),
711         (_dbus_message_loader_return_buffer), (_dbus_message_test):
712         * dbus/dbus-message.h:
713         Add new functions that set the reply serial and sender.
714         Also marshal and demarshal them correctly and add test.
715         
716         * dbus/dbus-protocol.h:
717         Add new DBUS_MESSAGE_TYPE_SENDER.
718         
719         * glib/dbus-glib.h:
720         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
721         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
722         (dbus_connection_hookup_with_g_main):
723         * glib/test-dbus-glib.c: (main):
724         Rewrite to use GIOChannel and remove the GSource crack.
725         
726         * test/echo-client.c: (main):
727         * test/watch.c: (check_messages):
728         Update for changed APIs
729         
730 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
731
732         * dbus/Makefile.am: Add dbus-timeout.[cħ]
733         
734         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
735         Create a DBusTimeoutList.       
736         (dbus_connection_set_timeout_functions): Add new function to
737         set timeout callbacks
738         
739         * dbus/dbus-connection.h: Add public DBusTimeout API.
740         
741         * dbus/dbus-message.c: (dbus_message_get_service):
742         * dbus/dbus-message.h:  New function.
743
744         * dbus/dbus-server.c: Fix small doc typo.
745         
746         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
747
748 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
749
750         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
751         of the string, just as long as specified.
752
753 2003-01-19  Havoc Pennington  <hp@pobox.com>
754
755         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
756         new function
757
758         * dbus/dbus-server.c (dbus_server_set_max_connections)
759         (dbus_server_get_max_connections, dbus_server_get_n_connections):
760         keep track of current number of connections, and add API for
761         setting a max (but haven't implemented enforcing the max yet)
762
763 2003-01-18  Havoc Pennington  <hp@pobox.com>
764
765         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
766         reading/writing if read_watch != NULL or write_watch != NULL.
767
768         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
769         the message loader code to actually load message->header and
770         message->body into the newly-created message.
771
772         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
773         in OOM case
774
775         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
776         (dbus_connection_get_max_message_size) 
777         (dbus_connection_set_max_live_messages_size) 
778         (dbus_connection_get_max_live_messages_size): implement some
779         resource limitation functions
780
781         * dbus/dbus-resources.c: new file implementing some of the
782         resource limits stuff
783
784         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
785         missing docs, add @todo to handle OOM etc.
786
787         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
788         docs
789         
790 2003-01-18  Havoc Pennington  <hp@pobox.com>
791
792         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
793         connection if it hasn't been already.
794
795         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
796         replace with DisconnectFunction.
797
798 2003-01-18  Havoc Pennington  <hp@pobox.com>
799
800         Building --disable-verbose-mode --disable-asserts --disable-tests
801         cuts the library from 112K to 45K or so
802         
803         * configure.in: check for varargs macro support, 
804         add --enable-verbose-mode, --enable-asserts. 
805
806         * dbus/dbus-internals.h (_dbus_assert): support
807         DBUS_DISABLE_ASSERT
808         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
809
810 2003-01-18  Havoc Pennington  <hp@pobox.com>
811
812         * dbus/dbus-test.c: include config.h so that tests actually run
813
814         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
815         so the failure mode when that assumption fails will be plenty
816         obvious.
817
818 2003-01-18  Havoc Pennington  <hp@pobox.com>
819
820         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
821
822         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
823         the distribution
824
825         * test/Makefile.am: don't use special variable "TESTS" for echo-*
826         since we don't want to use those in make check
827
828 2003-01-15  Havoc Pennington  <hp@redhat.com>
829
830         Release 0.2
831         
832         * NEWS: update
833
834 2003-01-15  Havoc Pennington  <hp@redhat.com>
835
836         * test/Makefile.am: fix so that test source code ends up in the
837         distribution on make distcheck
838
839 2003-01-15  Havoc Pennington  <hp@redhat.com>
840
841         Release 0.1.
842         
843         * NEWS: update  
844
845 2003-01-15  Havoc Pennington  <hp@redhat.com>
846
847         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
848         fix build when --disable-tests
849
850         * Makefile.am (EXTRA_DIST): put HACKING in here
851
852         * HACKING: document procedure for making a tarball release.
853
854 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
855
856         * bus/connection.c: (connection_error_handler),
857         (bus_connection_setup):
858         * bus/main.c: (main):
859         Make sure that the DBusConnectionData struct is NULLed
860         out to prevent a segfault.
861         
862         * dbus/dbus-errors.c: (dbus_result_to_string):
863         * dbus/dbus-errors.h:
864         * dbus/dbus-message.c: (dbus_message_get_fields),
865         (dbus_message_get_fields_valist), (_dbus_message_test):
866         * dbus/dbus-message.h:
867         Make dbus_message_get_fields return a result code so we can
868         track invalid fields as well as oom.
869         
870 2003-01-11  Havoc Pennington  <hp@pobox.com>
871
872         * configure.in: change --enable-test/--enable-ansi action-if-given
873         to enable_foo=$enableval instead of enable_foo=yes
874
875 2003-01-08  Havoc Pennington  <hp@pobox.com>
876
877         * dbus/dbus-string.c (_dbus_string_align_length): new function
878
879         * dbus/dbus-test-main.c: move main() for test app here
880         * dbus/dbus-test.c
881         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
882         symbol to run tests, because dbus-test isn't in the main 
883         library
884
885         Code review nitpicks.
886         
887         * dbus/dbus-message.c (dbus_message_write_header): add newlines
888         for people with narrow emacs ;-). Assert client_serial was filled
889         in. Assert message->name != NULL.
890         (dbus_message_append_fields): have "first_field_type" arg separate
891         from va list, needed for C++ binding that also uses varargs IIRC
892         and helps with type safety
893         (dbus_message_new): add @todo about using DBusString to store
894         service/name internally
895         (dbus_message_new): don't leak ->service and ->name on OOM later
896         in the function
897         (dbus_message_unref): free the service name
898         (dbus_message_get_fields): same change to varargs
899         i.e. first_field_type
900         (_dbus_message_loader_return_buffer): assert that the message data
901         is aligned (if not it's a bug in our code). Put in verbose griping
902         about why we set corrupted = TRUE.
903         (decode_header_data): add FIXME that char* is evil.  Was going to
904         add FIXME about evil locale-specific string.h strncmp, but just
905         switched to wacky string-as-uint32 optimization. Move check for
906         "no room for field name" above get_const_data_len() to avoid
907         assertion failure in get_const_data_len if we have trailing 2
908         bytes or the like. Check for service and name fields being
909         provided twice. Don't leak service/name on error. Require field
910         names to be aligned to 4 bytes.
911
912         * dbus/dbus-marshal.c: move byte swap stuff to header
913         (_dbus_pack_int32): uscore-prefix
914         (_dbus_unpack_int32): uscore-prefix
915         (_dbus_unpack_uint32): export
916         (_dbus_demarshal_string): add @todo complaining about use of
917         memcpy()
918         (_dbus_marshal_get_field_end_pos): add @todo about bad error
919         handling allowing corrupt data to go unchecked
920
921 2003-01-08  Havoc Pennington  <hp@redhat.com>
922
923         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
924         to the select() as needed for authentication. (should be using
925         _dbus_poll() not select, but for another day)
926
927         * dbus/dbus.h: include dbus/dbus-protocol.h
928
929 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
930
931         * dbus/Makefile.am (dbusinclude_HEADERS): Install
932         dbus-connection.h
933
934 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
935
936         * dbus/dbus-internals.c: (_dbus_type_to_string):
937         New function that returns a string describing a type.
938         
939         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
940         * dbus/dbus-marshal.h:
941         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
942         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
943         (dbus_message_iter_get_byte_array):
944         * dbus/dbus-message.h:
945         Add new convenience functions for appending and getting message fields.
946         Also add demarshalling routines for byte arrays.
947
948 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
949
950         * dbus/dbus-connection-internal.h:
951         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
952         (_dbus_connection_get_next_client_serial),
953         (dbus_connection_send_message):
954         * dbus/dbus-internals.h:
955         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
956         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
957         (_dbus_marshal_uint32), (_dbus_demarshal_double),
958         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
959         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
960         (_dbus_verbose_bytes), (_dbus_marshal_test):
961         * dbus/dbus-marshal.h:
962         * dbus/dbus-message-internal.h:
963         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
964         (dbus_message_write_header), (_dbus_message_lock),
965         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
966         (dbus_message_get_name), (dbus_message_append_int32),
967         (dbus_message_append_uint32), (dbus_message_append_double),
968         (dbus_message_append_string), (dbus_message_append_byte_array),
969         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
970         (dbus_message_iter_unref), (dbus_message_iter_has_next),
971         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
972         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
973         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
974         (decode_header_data), (_dbus_message_loader_return_buffer),
975         (message_iter_test), (_dbus_message_test):
976         * dbus/dbus-message.h:
977         * dbus/dbus-protocol.h:
978         * dbus/dbus-test.c: (main):
979         * dbus/dbus-test.h:
980         * glib/test-dbus-glib.c: (message_handler), (main):
981         * test/echo-client.c: (main):
982         * test/watch.c: (check_messages):
983         Make messages sendable and receivable for real.
984         
985 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
986
987         * dbus/dbus-marshal.c: (_dbus_marshal_double),
988         (_dbus_marshal_string), (_dbus_marshal_byte_array):
989         * dbus/dbus-message.c: (dbus_message_append_int32),
990         (dbus_message_append_uint32), (dbus_message_append_double),
991         (dbus_message_append_string), (dbus_message_append_byte_array):
992         Handle OOM restoration.
993         
994 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
995
996         * dbus/dbus-marshal.c: (_dbus_marshal_string),
997         (_dbus_demarshal_string), (_dbus_marshal_test):
998         * dbus/dbus-marshal.h:
999         * dbus/dbus-message.c: (dbus_message_get_name),
1000         Document these functions.
1001         
1002         (dbus_message_append_int32), (dbus_message_append_uint32),
1003         (dbus_message_append_double), (dbus_message_append_string),
1004         (dbus_message_append_byte_array):
1005         * dbus/dbus-message.h:
1006         Add functions for adding message fields of different types.
1007         
1008         * dbus/dbus-protocol.h:
1009         Add the different types.
1010
1011 2003-01-05  Havoc Pennington  <hp@pobox.com>
1012
1013         * bus/connection.c: implement routines for handling connections,
1014         first thing is keeping a list of owned services on each connection
1015         and setting up watches etc.
1016
1017         * bus/services.c: implement a mapping from service names to lists
1018         of connections
1019
1020         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1021
1022         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1023         to use static mutexes for global data
1024
1025         * dbus/dbus-connection.c (dbus_connection_set_data): add new
1026         collection of functions to set/get application-specific data
1027         on the DBusConnection.
1028
1029 2003-01-04  Havoc Pennington  <hp@pobox.com>
1030
1031         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1032         (_dbus_poll): new function
1033
1034         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1035         copied from GLib
1036
1037         * bus/loop.c: initial code for the daemon main loop
1038
1039 2003-01-04  Havoc Pennington  <hp@pobox.com>
1040
1041         * test/watch.c (error_handler): make it safe if the error handler 
1042         is called multiple times (if we s/error handler/disconnect
1043         handler/ we should just guarantee it's called only once)
1044
1045         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1046         error handler on disconnect (it's quite possible we should
1047         just change the error handler to a "disconnect handler," I'm 
1048         not sure we have any other meaningful errors)
1049
1050         * configure.in: check for getpwnam_r
1051
1052         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1053         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1054         mechanism as in SASL spec, using socket credentials
1055
1056         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1057         (_dbus_send_credentials_unix_socket): new function
1058
1059         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1060         dbus_accept()
1061         (_dbus_write): only check errno if <0 returned
1062         (_dbus_write_two): ditto
1063
1064 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
1065
1066         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1067         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1068         (_dbus_marshal_test):
1069         * dbus/dbus-marshal.h:
1070         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1071         to _dbus_marshal_utf8_string. Also fix some tests.
1072         
1073 2002-12-28  Harri Porten  <porten@kde.org>
1074
1075         * configure.in: added check for C++ compiler and a very cheesy
1076         check for the Qt integration
1077
1078         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1079
1080         * qt/Makefile.am: added 
1081
1082         * qt/.cvsignore: added  
1083
1084         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1085         latter, added #ifdef QT_THREAD_SUPPORT guard.
1086
1087         * dbus/Makefile.am: added missing headers for make dist
1088
1089 2002-12-28  Kristian Rietveld  <kris@gtk.org>
1090
1091         * dbus/Makefile.am: fixup export-symbols-regex.
1092
1093 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
1094
1095         * acinclude.m4: Add this file and put the 
1096         PKG_CHECK_MODULE macro in it.
1097
1098 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
1099
1100         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1101         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1102         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1103         (_dbus_marshal_test):
1104         Make the demarshalling routines align the pos argument.
1105         Add string marshalling tests and fix the obvious bugs 
1106         discovered.
1107         
1108 2002-12-26  Havoc Pennington  <hp@pobox.com>
1109
1110         * dbus/dbus-auth.c: fixes fixes fixes
1111
1112         * dbus/dbus-transport-unix.c: wire up support for
1113         encoding/decoding data on the wire
1114
1115         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
1116         (_dbus_auth_decode_data): append to target string 
1117         instead of nuking it.
1118
1119 2002-12-26  Havoc Pennington  <hp@pobox.com>
1120
1121         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1122         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1123         doh
1124
1125         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1126         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
1127         now). Main point is because I wanted unpack_uint32 to implement
1128         _dbus_verbose_bytes
1129         (_dbus_verbose_bytes): new function
1130
1131         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1132
1133         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1134         mechanism to handle a corrupt message stream
1135         (_dbus_message_loader_new): fix preallocation to only prealloc, 
1136         not prelengthen
1137         
1138         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1139         (_dbus_string_test): enhance tests for copy/move and fix the
1140         functions
1141
1142         * dbus/dbus-transport-unix.c: Hold references in more places to 
1143         avoid reentrancy problems
1144
1145         * dbus/dbus-transport.c: ditto
1146
1147         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1148         leak reference count in no-message case
1149
1150         * test/watch.c (do_mainloop): handle adding/removing watches
1151         during iteration over the watches. Also, ref the connection/server
1152         stored on a watch, so we don't try to mangle a destroyed one.
1153
1154         * dbus/dbus-transport-unix.c (do_authentication): perform
1155         authentication
1156
1157         * dbus/dbus-auth.c (get_state): add a state
1158         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1159         (_dbus_auth_get_unused_bytes): append the unused bytes
1160         to the passed in string, rather than prepend
1161
1162         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
1163         the auth conversation DBusAuth
1164
1165         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1166         (_dbus_transport_new_for_domain_socket): when creating a
1167         transport, pass in whether it's a client-side or server-side
1168         transport so we know which DBusAuth to create
1169
1170 2002-12-03  Havoc Pennington  <hp@pobox.com>
1171
1172         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1173         _after_ finalizing the derived members
1174         (unix_connection_set): unref watch if we fail to add it
1175
1176         * dbus/dbus-connection.c (dbus_connection_unref): delete the
1177         transport first, so that the connection owned by the 
1178         transport will be valid as the transport finalizes.
1179
1180         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1181         if necessary, and remove watches from the connection.
1182         
1183         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1184         
1185 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
1186
1187         * dbus/dbus-marshal.c: (_dbus_marshal_string),
1188         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1189         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1190         (_dbus_marshal_test):
1191         * dbus/dbus-marshal.h:
1192         Add string marshal functions and have the demarshal functions
1193         return the new position.
1194         
1195 2002-12-25  Havoc Pennington  <hp@pobox.com>
1196
1197         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
1198         it is a simple protocol that just maps directly to SASL.
1199
1200         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1201         initial implementation, not actually used yet.
1202         
1203         * dbus/dbus-string.c (_dbus_string_find): new function
1204         (_dbus_string_equal): new function
1205         (_dbus_string_base64_encode): new function
1206         (_dbus_string_base64_decode): new function
1207
1208 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
1209
1210         * dbus/Makefile.am:
1211         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1212         (_dbus_marshal_int32), (_dbus_marshal_uint32),
1213         (_dbus_demarshal_double), (_dbus_demarshal_int32),
1214         (_dbus_demarshal_uint32), (_dbus_marshal_test):
1215         * dbus/dbus-marshal.h:
1216         * dbus/dbus-protocol.h:
1217         * dbus/dbus-test.c: (main):
1218         * dbus/dbus-test.h:
1219         Add un-optimized marshalling/demarshalling routines.
1220         
1221 2002-12-25  Harri Porten  <porten@kde.org>
1222
1223         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1224
1225 2002-12-24  Zack Rusin  <zack@kde.org>
1226
1227         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1228         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1229         main loop stuff
1230
1231 2002-12-24  Havoc Pennington  <hp@pobox.com>
1232
1233         * glib/dbus-gthread.c: fix include
1234
1235         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
1236         I think glib API needs to change, though, as you don't 
1237         want to use DBusMessageFunction, you want to use the 
1238         DBusMessageHandler object. Probably 
1239         dbus_connection_open_with_g_main_loop()
1240         and dbus_connection_setup_g_main_loop() or something like that
1241         (but think of better names...) that just create a connection 
1242         that has watch/timeout functions etc. already set up.
1243
1244         * dbus/dbus-connection.c
1245         (dbus_connection_send_message_with_reply): new function just to 
1246         show how the message handler helps us deal with replies.
1247
1248         * dbus/dbus-list.c (_dbus_list_remove_last): new function
1249
1250         * dbus/dbus-string.c (_dbus_string_test): free a string that
1251         wasn't
1252
1253         * dbus/dbus-hash.c: use memory pools for the hash entries
1254         (rebuild_table): be more paranoid about overflow, and 
1255         shrink table when we can
1256         (_dbus_hash_test): reduce number of sprintfs and write
1257         valid C89. Add tests for case where we grow and then 
1258         shrink the hash table.
1259
1260         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1261
1262         * dbus/dbus-connection.c (dbus_connection_register_handler) 
1263         (dbus_connection_unregister_handler): new functions
1264
1265         * dbus/dbus-message.c (dbus_message_get_name): new
1266
1267         * dbus/dbus-list.c: fix docs typo
1268
1269         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1270         an object representing a handler for messages.
1271
1272 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
1273
1274         * glib/dbus-glib.h:
1275         * glib/dbus-gthread.c: (dbus_gthread_init):
1276         Don't use the gdbus prefix for public functions.
1277         
1278 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
1279
1280         * Makefile.am:
1281         * configure.in:
1282         Add GLib checks and fixup .pc files
1283         
1284         * glib/Makefile.am:
1285         * glib/dbus-glib.h:
1286         * glib/dbus-gmain.c: (gdbus_connection_prepare),
1287         (gdbus_connection_check), (gdbus_connection_dispatch),
1288         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1289         (dbus_connection_gsource_new):
1290         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1291         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1292         * glib/test-dbus-glib.c: (message_handler), (main):
1293         Add GLib support.
1294         
1295 2002-12-15  Harri Porten  <porten@kde.org>
1296
1297         * autogen.sh: check for libtoolize before attempting to use it 
1298         
1299         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1300         struct.
1301         
1302         * .cvsignore: ignore more stamp files
1303
1304         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1305
1306         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1307         without make install.
1308
1309 2002-12-15  Havoc Pennington  <hp@pobox.com>
1310
1311         * dbus/dbus-threads.c: add thread stubs that a higher library
1312         layer can fill in. e.g. the GLib wrapper might fill them in with
1313         GThread stuff. We still need to use this thread API to
1314         thread-safe-ize the library.
1315
1316 2002-12-12  Havoc Pennington  <hp@pobox.com>
1317
1318         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1319         below new interfaces and include fewer system headers.
1320
1321         * dbus/dbus-sysdeps.c (_dbus_read): new function
1322         (_dbus_write): new function
1323         (_dbus_write_two): new function
1324         (_dbus_connect_unix_socket): new function
1325         (_dbus_listen_unix_socket): new function
1326
1327         * dbus/dbus-message-internal.h: change interfaces to use
1328         DBusString
1329
1330 2002-12-11  Havoc Pennington  <hp@pobox.com>
1331
1332         * dbus/dbus-types.h: add dbus_unichar
1333
1334         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1335
1336         * dbus/dbus-connection.c (dbus_connection_send_message): return
1337         TRUE on success
1338
1339         * dbus/dbus-transport.c: include dbus-watch.h   
1340
1341         * dbus/dbus-connection.c: include dbus-message-internal.h
1342
1343         * HACKING: add file with coding guidelines stuff.
1344
1345         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1346         handling here, for security purposes (as in vsftpd). Not actually
1347         using this class yet.
1348
1349         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1350         system/libc usage here, as in vsftpd, for ease of auditing (and
1351         should also simplify portability). Haven't actually moved all the
1352         system/libc usage into here yet.
1353         
1354 2002-11-25  Havoc Pennington  <hp@pobox.com>
1355
1356         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
1357         always print the first verbose message.
1358
1359 2002-11-24  Havoc Pennington  <hp@pobox.com>
1360
1361         * test/echo-client.c, test/echo-server.c: cheesy test 
1362         clients.
1363         
1364         * configure.in (AC_CHECK_FUNCS): check for writev
1365
1366         * dbus/dbus-message.c (_dbus_message_get_network_data): new
1367         function
1368
1369         * dbus/dbus-list.c (_dbus_list_foreach): new function
1370
1371         * dbus/dbus-internals.c (_dbus_verbose): new function
1372
1373         * dbus/dbus-server.c, dbus/dbus-server.h: public object
1374         representing a server that listens for connections.
1375
1376         * dbus/.cvsignore: create
1377
1378         * dbus/dbus-errors.h, dbus/dbus-errors.c:
1379         public API for reporting errors
1380
1381         * dbus/dbus-connection.h, dbus/dbus-connection.c:
1382         public object representing a connection that 
1383         sends/receives messages. (Same object used for 
1384         both client and server.)
1385
1386         * dbus/dbus-transport.h, dbus/dbus-transport.c:
1387         Basic abstraction for different kinds of stream
1388         that we might read/write messages from.
1389
1390 2002-11-23  Havoc Pennington  <hp@pobox.com>
1391
1392         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
1393         _DBUS_INT_MAX
1394
1395         * dbus/dbus-test.c (main): add list test, and include 
1396         dbus-test.h as intended
1397
1398         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
1399         (_dbus_hash_table_remove_int): return value indicates 
1400         whether the entry existed to remove
1401
1402         * dbus/dbus-list.c: add linked list utility class, 
1403         with docs and tests
1404
1405         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
1406         array sometimes.
1407
1408 2002-11-23  Havoc Pennington  <hp@pobox.com>
1409
1410         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1411         DBUS_END_DECLS to nothing, that should fix this once and for all
1412
1413         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1414
1415         * dbus/dbus-message.c, dbus/dbus-hash.c: 
1416         add some missing @brief
1417
1418 2002-11-23  Havoc Pennington  <hp@pobox.com>
1419
1420         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
1421         to avoid confusing Doxygen
1422
1423         * dbus/dbus-hash.c: @} not }@
1424
1425         * dbus/dbus-message.c (struct DBusMessage): split out 
1426         internals docs
1427
1428 2002-11-23  Havoc Pennington  <hp@pobox.com>
1429
1430         * configure.in: pile on more warning flags if using gcc
1431
1432         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
1433         to document static functions
1434
1435         * configure.in: add summary to end of configure so it 
1436         looks nice and attractive
1437
1438         * dbus/dbus-hash.c: finish implementation and write unit 
1439         tests and docs
1440
1441         * configure.in: add --enable-tests to enable unit tests
1442
1443         * dbus/dbus-test.c: test program to run unit tests 
1444         for all files in dbus/*, initially runs a test for 
1445         dbus-hash.c
1446         
1447         * dbus/dbus-internals.h: file to hold some internal utility stuff
1448
1449 2002-11-22  Havoc Pennington  <hp@redhat.com>
1450
1451         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
1452         "ported" away from Tcl
1453
1454         * dbus/dbus-types.h: header for types such as dbus_bool_t
1455
1456 2002-11-22  Havoc Pennington  <hp@redhat.com>
1457
1458         * dbus/dbus.h: fixups for doc warnings
1459
1460         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
1461         macros
1462         (QUIET): make it quiet so we can see warnings
1463
1464         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1465
1466 2002-11-22  Havoc Pennington  <hp@redhat.com>
1467
1468         * Makefile.am: include "Doxyfile" target in all-local
1469
1470         * configure.in: generate the Doxyfile
1471
1472         * Doxyfile.in: move Doxyfile here, so we can use 
1473         configure to generate a Doxyfile with the right 
1474         version number etc.
1475
1476 2002-11-22  Havoc Pennington  <hp@redhat.com>
1477
1478         * dbus/dbus-message.c: move inline docs into .c file
1479
1480         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1481         so all docs are under doc/
1482         (MAN_EXTENSION): generate man pages. Use extension 
1483         ".3dbus" which matches ".3qt" on my system, 
1484         I guess this is OK, I don't know really.
1485         (FILE_PATTERNS): look for .c files not .h, makes sense
1486         for plain C I think
1487
1488 2002-11-22  Havoc Pennington  <hp@pobox.com>
1489
1490         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
1491         because any app can be a server, and any app can be a client, 
1492         the bus is a special kind of server.
1493
1494 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
1495
1496         * Doxyfile : adding. Still needs Makefile rules to be generated
1497         automatically (just run "doxygen" in the toplevel dir for now to
1498         generate docs)
1499         
1500         * dbus/dbus-message.h : Adding sample docs (javadoc since
1501         resembles gtk-doc a little more)
1502
1503         * dbus/dbus.h : Adding sample docs
1504
1505 2002-11-21  Havoc Pennington  <hp@redhat.com>
1506
1507         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
1508         so we can allow ourselves to include files directly, 
1509         instead of having to use dbus.h
1510
1511         * dbus/dbus.h: fill in
1512
1513         * dbus/dbus-message.h: sketch out a sample header file.
1514         Include griping if you include it directly instead of 
1515         via dbus.h
1516
1517         * dbus/dbus-macros.h: new file with macros for extern "C", 
1518         TRUE/FALSE, NULL, etc.
1519
1520         * doc/file-boilerplate.c: put include guards in here
1521
1522 2002-11-21  Havoc Pennington  <hp@redhat.com>
1523
1524         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1525
1526         * COPYING: include the GPL as well, and license code 
1527         under both AFL and GPL.
1528
1529 2002-11-21  Havoc Pennington  <hp@redhat.com>
1530
1531         * acconfig.h: get rid of this
1532
1533         * autogen.sh (run_configure): add --no-configure option
1534
1535         * configure.in: remove AC_ARG_PROGRAM to make
1536         autoconf complain less. add AC_PREREQ. 
1537         add AC_DEFINE third arg.
1538         
1539 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
1540
1541         * doc/Makefile.am:
1542         Fix references so we can distcheck.
1543
1544 2002-11-21  Havoc Pennington  <hp@redhat.com>
1545
1546         * Initial module creation
1547