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