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