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