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