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