Architecture
Architecture overview of SimpleDBus library.
The following notes provide an overview of the architecture of some of the higher-level classes in the library, as to facilitate their understanding.
Interface
- In order to simplify the routing of messages, all interfaces are assumed to have properties, thus skipping the need to have a special implementation of
org.freedesktop.DBus.Properties. - All properties are stored in the holder in which they came from. This is not the most efficient way of handling properties, but it is the one that minimizes the necessary code for children of the
Interfaceclass.
Proxy
- Messages for
org.freedesktop.DBus.Propertiesare automatically handled by theProxyclass. Proxy::valid()tracks whether the proxy's object path is currently present in the D-Bus object tree. When an object path is removed, the corresponding proxy and all retained descendant proxies are marked invalid. If the path is later added again, the same retained proxy can become valid again.- A retained
Proxyobject should not be treated as proof that the remote D-Bus object still exists. Callers that keep proxy references acrossInterfacesRemovedevents should checkvalid()before issuing methods or refreshing state.
