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