atspi_proxies/socket.rs
1//! # `DBus` interface proxy for: `org.a11y.atspi.Socket`
2//!
3//! This code was generated by `zbus-xmlgen` `2.0.1` from `DBus` introspection data.
4//! Source: `Socket.xml`.
5//!
6//! You may prefer to adapt it, instead of using it verbatim.
7//!
8//! More information can be found in the
9//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
10//! section of the zbus documentation.
11//!
12
13use crate::common::ObjectRef;
14
15#[zbus::proxy(
16 interface = "org.a11y.atspi.Socket",
17 default_path = "/org/a11y/atspi/accessible/root",
18 default_service = "org.a11y.atspi.Registry"
19)]
20pub trait Socket {
21 /// @plug: a string for the unique bus name of the application, and an object path
22 /// for the application's' root object.
23 ///
24 /// This is the entry point for an application that wants to register itself against
25 /// the accessibility registry. The application's root object, which it passes in
26 /// @plug, must support the org.a11y.atspi.Application interface.
27 ///
28 /// When an application calls this method on the registry, the following handshake happens:
29 ///
30 /// * Application calls this method on the registry to identify itself.
31 /// * The registry sets the "Id" property on the org.a11y.atspi.Application interface on the @plug object.
32 /// * The Embed method returns with the bus name and object path for the registry's root object.
33 /// Returns: the bus name and object path of the registry's root object.
34 fn embed(&self, plug: &(&str, zbus::zvariant::ObjectPath<'_>)) -> zbus::Result<ObjectRef>;
35
36 /// This method is called by a socket to inform the plug that it is being
37 /// embedded. The plug should register the embedding socket as its parent.
38 fn embedded(&self, path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
39
40 /// Unembed method
41 /// @plug: a string for the unique bus name of the application, and an object path
42 /// for the application's' root object.
43 ///
44 /// Unregisters an application from the accesibility registry. It is not necessary to
45 /// call this method; the accessibility registry detects when an application
46 /// disconnects from the bus.
47 fn unembed(&self, plug: &(&str, zbus::zvariant::ObjectPath<'_>)) -> zbus::Result<()>;
48}