2005-01-15 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / doc / TODO
1 Important for 1.0
2 ===
3   
4  - How we will handle DCOP needs sorting out. Among other things, we
5    need to check that service and service-ownership semantics map to DCOP 
6    reasonably well.
7
8  - Activation needs some careful additional thinking-through.
9
10  - Audit @todo and FIXME for security issues
11
12  - The convenience functions in dbus-bus.h should perhaps have
13    the signatures that they would have if they were autogenerated
14    stubs. e.g. the acquire service function. We should also evaluate 
15    which of these functions to include, in light of the fact that 
16    GLib/Qt native stubs will probably also exist.
17
18  - the "break loader" and valid/invalid message tests are all disabled;
19    they need to be fixed and re-enabled with the new message args stuff.
20    I think I want to drop the .message files thing and just have code
21    that generates messages, more like the tests for
22    dbus-marshal-recursive.c
23
24  - modify the auth protocol to also support other initial-handshake
25    type of information:
26
27    Perhaps the auth protocol should be able to negotiate a protocol 
28    version to the least-common-denominator between client and server?
29    Though in practice ever using this feature would be pretty tough, 
30    since protocol probably modifies the API. But we could have it there
31    as a safety net.
32
33  - need to define bus behavior if you send a message to 
34    yourself; is it an error, or allowed? If allowed, 
35    we need to have a test for it in the test suite.
36
37  - array lengths should probably be returned as size_t rather than int
38    (though they are kind of a pita to pass in as size_t with the 
39     varargs, so maybe not - what does glib do with g_object_get()?)
40
41  - it's probably obnoxious that reading/writing bools doesn't return
42    dbus_bool_t; solution is probably to change bool to 32 bits on the
43    wire
44
45  - maybe change and don't align variant bodies to 8-boundary, it uses
46    up lots of space in a typical header
47
48  - rename the service thing. unique service names (":1") and well-known
49    ("org.foo.bar") should have different names probably; something like 
50    "address" for the unique and "alias" for the well-known, or 
51    "application id" for the unique and "common name" or "published
52    name" for the well-known; not sure yet.
53
54  - things are broken now when mixing endianness, because DBusMessage
55    doesn't autoswap itself when you access a message of alternate
56    endian.
57
58  - add string array support back to append_args()
59
60 Important for 1.0 GLib Bindings
61 ===
62
63  - finish dbus-glib-tool support for adding introspection 
64    data to GObject and autoexporting GObject using same
65
66  - the GLib bindings varargs take DBUS_TYPE_WHATEVER and 
67    return stuff allocated with dbus_malloc(); should this 
68    be made more "G" at some expense in code duplication?
69    You also still have to use some D-BUS functions such as 
70    dbus_message_get_args() which takes a DBusError. 
71    Probably we need to either fully encapsulate and hide 
72    dbus/dbus.h, or encapsulate it slightly less e.g. no 
73    GError. Or maybe it's as simple as "never return dbus_malloc() 
74    memory" and just fully encapsulate the get_args() type of 
75    stuff.
76
77  - dbus_gproxy_connect_signal() has to take a signature for the signal 
78    so it can figure out how to invoke the callback, or we have to rely
79    on having introspection data.
80
81 Might as Well for 1.0
82 ===
83
84  - Probably no point in a version number in the daemon name
85    (s/dbus-daemon-1/dbus-daemon/)
86
87  - add dbus_message_has_path(), maybe has_member/interface
88
89  - dbus_message_iter_init_array_iterator has "iter" and "iterator" 
90    in the same function name
91
92  - connection_open/connection_disconnect lacks symmetry, open/close
93    or connect/disconnect
94
95  - protocol version in each message is pretty silly
96
97 Can Be Post 1.0
98 ===
99
100  - Property list feature on message bus (list of properties associated 
101    with a connection). May also include message matching rules 
102    that involve the properties of the source or destination
103    connection.
104
105  - Disconnecting the remote end on invalid UTF-8 is probably not a good 
106    idea. The definition of "valid" is slightly fuzzy. I think it might 
107    be better to just silently "fix" the UTF-8, or perhaps return an error.
108
109    Owen says we should only validate the UTF-8 on dbus_message_get_string()
110    (changing get_string to have an error return, and allowing a type error 
111    as a possible return)
112
113  - assorted _-prefixed symbols in libdbus aren't actually used by
114    libdbus, only by the message bus. These bloat up the library
115    size. Not sure how to fix, really.
116
117  - build and install the Doxygen manual in Makefile when --enable-docs
118
119  - if you send the same message to multiple connections, the serial number 
120    will only be right for one of them. Probably need to just write() the serial 
121    number, rather than putting it in the DBusMessage, or something.
122
123  - perhaps the bus driver should have properties that reflect attributes
124    of the session, such as hostname, architecture, operating system, 
125    etc. Could be useful for code that wants to special-case behavior 
126    for a particular host or class of hosts, for example.
127
128  - currently the security policy stuff for messages to/from 
129    the bus driver is kind of strange; basically it's hardcoded that 
130    you can always talk to the driver, but the default config file 
131    has rules for it anyway, or something. it's conceptually 
132    screwy at the moment.
133
134  - when making a method call, if the call serial were globally unique,
135    we could forward the call serial along with any method calls made
136    as a result of the first method call, and allow reentrancy that was
137    strictly part of the call stack of said method call. But I don't
138    really see how to do this without making the user pass around the
139    call serial to all method calls all the time, or disallowing 
140    async calls.
141
142    If done post 1.0 will probably be an optional/ugly-API type 
143    of thing.
144
145  - I don't want to introduce DBusObject, but refcounting and object
146    data could still be factored out into an internal "base class" 
147    perhaps.
148
149  - document the auth protocol as a set of states and transitions, and
150    then reimplement it in those terms
151
152  - recursive dispatch, see dbus_connection_dispatch()
153
154  - do we need per-display activation; if so I'd like to do this by setting a
155    "display ID" property on screen 0, with a GUID, and keying activation by 
156    said GUID. Otherwise you get all kinds of unrobust
157    string/hostname-based mess. per-screen is then done by appending screen number
158    to the display. If displays have a deterministic ID like this, you can 
159    do per-display by simply including GUID in the service name.
160
161  - optimization and profiling!