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