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