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