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