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