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