2004-11-26 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 invalid messages in the test suite are all useless because 
19    they are invalid for the wrong reasons due to protocol changes.
20    (Consider extending test suite to validate that they are 
21    invalid for right reason, e.g. an "INVALID_ERROR Foo" line 
22    in the message files)
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  - re_align_field_recurse() in dbus-message.c is broken because it 
34    crashes on some types of header field values. security problem.
35
36  - modify the wire protocol to keep the args signature separate 
37    from the args themselves. Make the name of TYPE_CUSTOM part 
38    of the type signature, rather than part of the value.
39    Then you have the full typecheck in a single string.
40    See http://freedesktop.org/pipermail/dbus/2004-June/001169.html
41
42    Subnote: STRING_OR_NIL is wrong, doesn't work in C++ etc. ; should
43    not have done that. Use empty string or special string values or separate functions/signals 
44    or whatever instead.
45
46    Subnote: For recursive types, one approach is that "structs" are done as parens, 
47    so e.g. s(ii) is a string and struct { int; int; } etc. Type codes
48    then all have to be done as strings not single ints.
49    We could also put the type signature for the message body in a
50    header field.
51    An "any" type has the type string included in the value.
52
53  - need to define bus behavior if you send a message to 
54    yourself; is it an error, or allowed? If allowed, 
55    we need to have a test for it in the test suite.
56
57  - array lengths should probably be returned as size_t rather than int
58    (though they are kind of a pita to pass in as size_t with the 
59     varargs, so maybe not - what does glib do with g_object_get()?)
60
61  - rename the service thing. unique service names (":1") and well-known
62    ("org.foo.bar") should have different names probably; something like 
63    "address" for the unique and "alias" for the well-known, or 
64    "application id" for the unique and "common name" or "published
65    name" for the well-known; not sure yet.
66
67 Important for 1.0 GLib Bindings
68 ===
69
70  - finish dbus-glib-tool support for adding introspection 
71    data to GObject and autoexporting GObject using same
72
73  - the GLib bindings varargs take DBUS_TYPE_WHATEVER and 
74    return stuff allocated with dbus_malloc(); should this 
75    be made more "G" at some expense in code duplication?
76    You also still have to use some D-BUS functions such as 
77    dbus_message_get_args() which takes a DBusError. 
78    Probably we need to either fully encapsulate and hide 
79    dbus/dbus.h, or encapsulate it slightly less e.g. no 
80    GError. Or maybe it's as simple as "never return dbus_malloc() 
81    memory" and just fully encapsulate the get_args() type of 
82    stuff.
83
84  - dbus_gproxy_connect_signal() has to take a signature for the signal 
85    so it can figure out how to invoke the callback, or we have to rely
86    on having introspection data.
87
88 Might as Well for 1.0
89 ===
90
91  - Probably no point in a version number in the daemon name
92    (s/dbus-daemon-1/dbus-daemon/)
93
94  - add dbus_message_has_path(), maybe has_member/interface
95
96  - dbus_message_iter_init_array_iterator has "iter" and "iterator" 
97    in the same function name
98
99  - connection_open/connection_disconnect lacks symmetry, open/close
100    or connect/disconnect
101
102 Can Be Post 1.0
103 ===
104
105  - Property list feature on message bus (list of properties associated 
106    with a connection). May also include message matching rules 
107    that involve the properties of the source or destination
108    connection.
109
110  - Disconnecting the remote end on invalid UTF-8 is probably not a good 
111    idea. The definition of "valid" is slightly fuzzy. I think it might 
112    be better to just silently "fix" the UTF-8, or perhaps return an error.
113
114    Owen says we should only validate the UTF-8 on dbus_message_get_string()
115    (changing get_string to have an error return, and allowing a type error 
116    as a possible return)
117
118  - assorted _-prefixed symbols in libdbus aren't actually used by
119    libdbus, only by the message bus. These bloat up the library
120    size. Not sure how to fix, really.
121
122  - build and install the Doxygen manual in Makefile when --enable-docs
123
124  - if you send the same message to multiple connections, the serial number 
125    will only be right for one of them. Probably need to just write() the serial 
126    number, rather than putting it in the DBusMessage, or something.
127
128  - perhaps the bus driver should have properties that reflect attributes
129    of the session, such as hostname, architecture, operating system, 
130    etc. Could be useful for code that wants to special-case behavior 
131    for a particular host or class of hosts, for example.
132
133  - currently the security policy stuff for messages to/from 
134    the bus driver is kind of strange; basically it's hardcoded that 
135    you can always talk to the driver, but the default config file 
136    has rules for it anyway, or something. it's conceptually 
137    screwy at the moment.
138
139  - when making a method call, if the call serial were globally unique,
140    we could forward the call serial along with any method calls made
141    as a result of the first method call, and allow reentrancy that was
142    strictly part of the call stack of said method call. But I don't
143    really see how to do this without making the user pass around the
144    call serial to all method calls all the time, or disallowing 
145    async calls.
146
147    If done post 1.0 will probably be an optional/ugly-API type 
148    of thing.
149
150  - I don't want to introduce DBusObject, but refcounting and object
151    data could still be factored out into an internal "base class" 
152    perhaps.
153
154  - document the auth protocol as a set of states and transitions, and
155    then reimplement it in those terms
156
157  - recursive dispatch, see dbus_connection_dispatch()
158
159  - do we need per-display activation; if so I'd like to do this by setting a
160    "display ID" property on screen 0, with a GUID, and keying activation by 
161    said GUID. Otherwise you get all kinds of unrobust
162    string/hostname-based mess. per-screen is then done by appending screen number
163    to the display. If displays have a deterministic ID like this, you can 
164    do per-display by simply including GUID in the service name.
165
166  - optimization and profiling!