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