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