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