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