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