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