2003-01-07 Anders Carlsson <andersca@codefactory.se>
[platform/upstream/dbus.git] / ChangeLog
1 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
2
3         * dbus/dbus-marshal.c: (_dbus_marshal_string),
4         (_dbus_demarshal_string), (_dbus_marshal_test):
5         * dbus/dbus-marshal.h:
6         * dbus/dbus-message.c: (dbus_message_get_name),
7         Document these functions.
8         
9         (dbus_message_append_int32), (dbus_message_append_uint32),
10         (dbus_message_append_double), (dbus_message_append_string),
11         (dbus_message_append_byte_array):
12         * dbus/dbus-message.h:
13         Add functions for adding message fields of different types.
14         
15         * dbus/dbus-protocol.h:
16         Add the different types.
17
18 2003-01-05  Havoc Pennington  <hp@pobox.com>
19
20         * bus/connection.c: implement routines for handling connections,
21         first thing is keeping a list of owned services on each connection
22         and setting up watches etc.
23
24         * bus/services.c: implement a mapping from service names to lists
25         of connections
26
27         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
28
29         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
30         to use static mutexes for global data
31
32         * dbus/dbus-connection.c (dbus_connection_set_data): add new
33         collection of functions to set/get application-specific data
34         on the DBusConnection.
35
36 2003-01-04  Havoc Pennington  <hp@pobox.com>
37
38         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
39         (_dbus_poll): new function
40
41         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
42         copied from GLib
43
44         * bus/loop.c: initial code for the daemon main loop
45
46 2003-01-04  Havoc Pennington  <hp@pobox.com>
47
48         * test/watch.c (error_handler): make it safe if the error handler 
49         is called multiple times (if we s/error handler/disconnect
50         handler/ we should just guarantee it's called only once)
51
52         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
53         error handler on disconnect (it's quite possible we should
54         just change the error handler to a "disconnect handler," I'm 
55         not sure we have any other meaningful errors)
56
57         * configure.in: check for getpwnam_r
58
59         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
60         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
61         mechanism as in SASL spec, using socket credentials
62
63         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
64         (_dbus_send_credentials_unix_socket): new function
65
66         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
67         dbus_accept()
68         (_dbus_write): only check errno if <0 returned
69         (_dbus_write_two): ditto
70
71 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
72
73         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
74         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
75         (_dbus_marshal_test):
76         * dbus/dbus-marshal.h:
77         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
78         to _dbus_marshal_utf8_string. Also fix some tests.
79         
80 2002-12-28  Harri Porten  <porten@kde.org>
81
82         * configure.in: added check for C++ compiler and a very cheesy
83         check for the Qt integration
84
85         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
86
87         * qt/Makefile.am: added 
88
89         * qt/.cvsignore: added  
90
91         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
92         latter, added #ifdef QT_THREAD_SUPPORT guard.
93
94         * dbus/Makefile.am: added missing headers for make dist
95
96 2002-12-28  Kristian Rietveld  <kris@gtk.org>
97
98         * dbus/Makefile.am: fixup export-symbols-regex.
99
100 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
101
102         * acinclude.m4: Add this file and put the 
103         PKG_CHECK_MODULE macro in it.
104
105 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
106
107         * dbus/dbus-marshal.c: (_dbus_marshal_string),
108         (_dbus_demarshal_double), (_dbus_demarshal_int32),
109         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
110         (_dbus_marshal_test):
111         Make the demarshalling routines align the pos argument.
112         Add string marshalling tests and fix the obvious bugs 
113         discovered.
114         
115 2002-12-26  Havoc Pennington  <hp@pobox.com>
116
117         * dbus/dbus-auth.c: fixes fixes fixes
118
119         * dbus/dbus-transport-unix.c: wire up support for
120         encoding/decoding data on the wire
121
122         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
123         (_dbus_auth_decode_data): append to target string 
124         instead of nuking it.
125
126 2002-12-26  Havoc Pennington  <hp@pobox.com>
127
128         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
129         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
130         doh
131
132         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
133         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
134         now). Main point is because I wanted unpack_uint32 to implement
135         _dbus_verbose_bytes
136         (_dbus_verbose_bytes): new function
137
138         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
139
140         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
141         mechanism to handle a corrupt message stream
142         (_dbus_message_loader_new): fix preallocation to only prealloc, 
143         not prelengthen
144         
145         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
146         (_dbus_string_test): enhance tests for copy/move and fix the
147         functions
148
149         * dbus/dbus-transport-unix.c: Hold references in more places to 
150         avoid reentrancy problems
151
152         * dbus/dbus-transport.c: ditto
153
154         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
155         leak reference count in no-message case
156
157         * test/watch.c (do_mainloop): handle adding/removing watches
158         during iteration over the watches. Also, ref the connection/server
159         stored on a watch, so we don't try to mangle a destroyed one.
160
161         * dbus/dbus-transport-unix.c (do_authentication): perform
162         authentication
163
164         * dbus/dbus-auth.c (get_state): add a state
165         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
166         (_dbus_auth_get_unused_bytes): append the unused bytes
167         to the passed in string, rather than prepend
168
169         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
170         the auth conversation DBusAuth
171
172         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
173         (_dbus_transport_new_for_domain_socket): when creating a
174         transport, pass in whether it's a client-side or server-side
175         transport so we know which DBusAuth to create
176
177 2002-12-03  Havoc Pennington  <hp@pobox.com>
178
179         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
180         _after_ finalizing the derived members
181         (unix_connection_set): unref watch if we fail to add it
182
183         * dbus/dbus-connection.c (dbus_connection_unref): delete the
184         transport first, so that the connection owned by the 
185         transport will be valid as the transport finalizes.
186
187         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
188         if necessary, and remove watches from the connection.
189         
190         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
191         
192 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
193
194         * dbus/dbus-marshal.c: (_dbus_marshal_string),
195         (_dbus_demarshal_double), (_dbus_demarshal_int32),
196         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
197         (_dbus_marshal_test):
198         * dbus/dbus-marshal.h:
199         Add string marshal functions and have the demarshal functions
200         return the new position.
201         
202 2002-12-25  Havoc Pennington  <hp@pobox.com>
203
204         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
205         it is a simple protocol that just maps directly to SASL.
206
207         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
208         initial implementation, not actually used yet.
209         
210         * dbus/dbus-string.c (_dbus_string_find): new function
211         (_dbus_string_equal): new function
212         (_dbus_string_base64_encode): new function
213         (_dbus_string_base64_decode): new function
214
215 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
216
217         * dbus/Makefile.am:
218         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
219         (_dbus_marshal_int32), (_dbus_marshal_uint32),
220         (_dbus_demarshal_double), (_dbus_demarshal_int32),
221         (_dbus_demarshal_uint32), (_dbus_marshal_test):
222         * dbus/dbus-marshal.h:
223         * dbus/dbus-protocol.h:
224         * dbus/dbus-test.c: (main):
225         * dbus/dbus-test.h:
226         Add un-optimized marshalling/demarshalling routines.
227         
228 2002-12-25  Harri Porten  <porten@kde.org>
229
230         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
231
232 2002-12-24  Zack Rusin  <zack@kde.org>
233
234         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
235         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
236         main loop stuff
237
238 2002-12-24  Havoc Pennington  <hp@pobox.com>
239
240         * glib/dbus-gthread.c: fix include
241
242         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
243         I think glib API needs to change, though, as you don't 
244         want to use DBusMessageFunction, you want to use the 
245         DBusMessageHandler object. Probably 
246         dbus_connection_open_with_g_main_loop()
247         and dbus_connection_setup_g_main_loop() or something like that
248         (but think of better names...) that just create a connection 
249         that has watch/timeout functions etc. already set up.
250
251         * dbus/dbus-connection.c
252         (dbus_connection_send_message_with_reply): new function just to 
253         show how the message handler helps us deal with replies.
254
255         * dbus/dbus-list.c (_dbus_list_remove_last): new function
256
257         * dbus/dbus-string.c (_dbus_string_test): free a string that
258         wasn't
259
260         * dbus/dbus-hash.c: use memory pools for the hash entries
261         (rebuild_table): be more paranoid about overflow, and 
262         shrink table when we can
263         (_dbus_hash_test): reduce number of sprintfs and write
264         valid C89. Add tests for case where we grow and then 
265         shrink the hash table.
266
267         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
268
269         * dbus/dbus-connection.c (dbus_connection_register_handler) 
270         (dbus_connection_unregister_handler): new functions
271
272         * dbus/dbus-message.c (dbus_message_get_name): new
273
274         * dbus/dbus-list.c: fix docs typo
275
276         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
277         an object representing a handler for messages.
278
279 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
280
281         * glib/dbus-glib.h:
282         * glib/dbus-gthread.c: (dbus_gthread_init):
283         Don't use the gdbus prefix for public functions.
284         
285 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
286
287         * Makefile.am:
288         * configure.in:
289         Add GLib checks and fixup .pc files
290         
291         * glib/Makefile.am:
292         * glib/dbus-glib.h:
293         * glib/dbus-gmain.c: (gdbus_connection_prepare),
294         (gdbus_connection_check), (gdbus_connection_dispatch),
295         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
296         (dbus_connection_gsource_new):
297         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
298         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
299         * glib/test-dbus-glib.c: (message_handler), (main):
300         Add GLib support.
301         
302 2002-12-15  Harri Porten  <porten@kde.org>
303
304         * autogen.sh: check for libtoolize before attempting to use it 
305         
306         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
307         struct.
308         
309         * .cvsignore: ignore more stamp files
310
311         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
312
313         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
314         without make install.
315
316 2002-12-15  Havoc Pennington  <hp@pobox.com>
317
318         * dbus/dbus-threads.c: add thread stubs that a higher library
319         layer can fill in. e.g. the GLib wrapper might fill them in with
320         GThread stuff. We still need to use this thread API to
321         thread-safe-ize the library.
322
323 2002-12-12  Havoc Pennington  <hp@pobox.com>
324
325         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
326         below new interfaces and include fewer system headers.
327
328         * dbus/dbus-sysdeps.c (_dbus_read): new function
329         (_dbus_write): new function
330         (_dbus_write_two): new function
331         (_dbus_connect_unix_socket): new function
332         (_dbus_listen_unix_socket): new function
333
334         * dbus/dbus-message-internal.h: change interfaces to use
335         DBusString
336
337 2002-12-11  Havoc Pennington  <hp@pobox.com>
338
339         * dbus/dbus-types.h: add dbus_unichar
340
341         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
342
343         * dbus/dbus-connection.c (dbus_connection_send_message): return
344         TRUE on success
345
346         * dbus/dbus-transport.c: include dbus-watch.h   
347
348         * dbus/dbus-connection.c: include dbus-message-internal.h
349
350         * HACKING: add file with coding guidelines stuff.
351
352         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
353         handling here, for security purposes (as in vsftpd). Not actually
354         using this class yet.
355
356         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
357         system/libc usage here, as in vsftpd, for ease of auditing (and
358         should also simplify portability). Haven't actually moved all the
359         system/libc usage into here yet.
360         
361 2002-11-25  Havoc Pennington  <hp@pobox.com>
362
363         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
364         always print the first verbose message.
365
366 2002-11-24  Havoc Pennington  <hp@pobox.com>
367
368         * test/echo-client.c, test/echo-server.c: cheesy test 
369         clients.
370         
371         * configure.in (AC_CHECK_FUNCS): check for writev
372
373         * dbus/dbus-message.c (_dbus_message_get_network_data): new
374         function
375
376         * dbus/dbus-list.c (_dbus_list_foreach): new function
377
378         * dbus/dbus-internals.c (_dbus_verbose): new function
379
380         * dbus/dbus-server.c, dbus/dbus-server.h: public object
381         representing a server that listens for connections.
382
383         * dbus/.cvsignore: create
384
385         * dbus/dbus-errors.h, dbus/dbus-errors.c:
386         public API for reporting errors
387
388         * dbus/dbus-connection.h, dbus/dbus-connection.c:
389         public object representing a connection that 
390         sends/receives messages. (Same object used for 
391         both client and server.)
392
393         * dbus/dbus-transport.h, dbus/dbus-transport.c:
394         Basic abstraction for different kinds of stream
395         that we might read/write messages from.
396
397 2002-11-23  Havoc Pennington  <hp@pobox.com>
398
399         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
400         _DBUS_INT_MAX
401
402         * dbus/dbus-test.c (main): add list test, and include 
403         dbus-test.h as intended
404
405         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
406         (_dbus_hash_table_remove_int): return value indicates 
407         whether the entry existed to remove
408
409         * dbus/dbus-list.c: add linked list utility class, 
410         with docs and tests
411
412         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
413         array sometimes.
414
415 2002-11-23  Havoc Pennington  <hp@pobox.com>
416
417         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
418         DBUS_END_DECLS to nothing, that should fix this once and for all
419
420         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
421
422         * dbus/dbus-message.c, dbus/dbus-hash.c: 
423         add some missing @brief
424
425 2002-11-23  Havoc Pennington  <hp@pobox.com>
426
427         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
428         to avoid confusing Doxygen
429
430         * dbus/dbus-hash.c: @} not }@
431
432         * dbus/dbus-message.c (struct DBusMessage): split out 
433         internals docs
434
435 2002-11-23  Havoc Pennington  <hp@pobox.com>
436
437         * configure.in: pile on more warning flags if using gcc
438
439         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
440         to document static functions
441
442         * configure.in: add summary to end of configure so it 
443         looks nice and attractive
444
445         * dbus/dbus-hash.c: finish implementation and write unit 
446         tests and docs
447
448         * configure.in: add --enable-tests to enable unit tests
449
450         * dbus/dbus-test.c: test program to run unit tests 
451         for all files in dbus/*, initially runs a test for 
452         dbus-hash.c
453         
454         * dbus/dbus-internals.h: file to hold some internal utility stuff
455
456 2002-11-22  Havoc Pennington  <hp@redhat.com>
457
458         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
459         "ported" away from Tcl
460
461         * dbus/dbus-types.h: header for types such as dbus_bool_t
462
463 2002-11-22  Havoc Pennington  <hp@redhat.com>
464
465         * dbus/dbus.h: fixups for doc warnings
466
467         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
468         macros
469         (QUIET): make it quiet so we can see warnings
470
471         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
472
473 2002-11-22  Havoc Pennington  <hp@redhat.com>
474
475         * Makefile.am: include "Doxyfile" target in all-local
476
477         * configure.in: generate the Doxyfile
478
479         * Doxyfile.in: move Doxyfile here, so we can use 
480         configure to generate a Doxyfile with the right 
481         version number etc.
482
483 2002-11-22  Havoc Pennington  <hp@redhat.com>
484
485         * dbus/dbus-message.c: move inline docs into .c file
486
487         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
488         so all docs are under doc/
489         (MAN_EXTENSION): generate man pages. Use extension 
490         ".3dbus" which matches ".3qt" on my system, 
491         I guess this is OK, I don't know really.
492         (FILE_PATTERNS): look for .c files not .h, makes sense
493         for plain C I think
494
495 2002-11-22  Havoc Pennington  <hp@pobox.com>
496
497         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
498         because any app can be a server, and any app can be a client, 
499         the bus is a special kind of server.
500
501 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
502
503         * Doxyfile : adding. Still needs Makefile rules to be generated
504         automatically (just run "doxygen" in the toplevel dir for now to
505         generate docs)
506         
507         * dbus/dbus-message.h : Adding sample docs (javadoc since
508         resembles gtk-doc a little more)
509
510         * dbus/dbus.h : Adding sample docs
511
512 2002-11-21  Havoc Pennington  <hp@redhat.com>
513
514         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
515         so we can allow ourselves to include files directly, 
516         instead of having to use dbus.h
517
518         * dbus/dbus.h: fill in
519
520         * dbus/dbus-message.h: sketch out a sample header file.
521         Include griping if you include it directly instead of 
522         via dbus.h
523
524         * dbus/dbus-macros.h: new file with macros for extern "C", 
525         TRUE/FALSE, NULL, etc.
526
527         * doc/file-boilerplate.c: put include guards in here
528
529 2002-11-21  Havoc Pennington  <hp@redhat.com>
530
531         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
532
533         * COPYING: include the GPL as well, and license code 
534         under both AFL and GPL.
535
536 2002-11-21  Havoc Pennington  <hp@redhat.com>
537
538         * acconfig.h: get rid of this
539
540         * autogen.sh (run_configure): add --no-configure option
541
542         * configure.in: remove AC_ARG_PROGRAM to make
543         autoconf complain less. add AC_PREREQ. 
544         add AC_DEFINE third arg.
545         
546 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
547
548         * doc/Makefile.am:
549         Fix references so we can distcheck.
550
551 2002-11-21  Havoc Pennington  <hp@redhat.com>
552
553         * Initial module creation
554