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