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