zlink_core/varlink_service/
mod.rs1mod info;
7pub use info::{Info, OwnedInfo};
8mod api;
9pub use api::{Error, Method, OwnedError, OwnedReply, Reply, Result};
10
11#[cfg(all(feature = "idl-parse", feature = "std"))]
12mod proxy;
13#[cfg(all(feature = "idl-parse", feature = "std"))]
14pub use proxy::{Chain, Proxy};
15
16#[cfg(feature = "idl")]
17mod interface_description;
18#[cfg(feature = "idl")]
19pub use interface_description::InterfaceDescription;
20
21pub const INTERFACE_NAME: &str = "org.varlink.service";
23
24#[cfg(feature = "introspection")]
26pub const DESCRIPTION: &crate::idl::Interface<'static> = &{
27 use crate::{
28 idl::{Comment, Interface, Method, Parameter},
29 introspect::{ReplyError, Type},
30 };
31
32 const INTERFACE_PARAM: &Parameter<'static> = &Parameter::new("interface", <&str>::TYPE, &[]);
33 const METHODS: &[&Method<'static>] = &[
34 &Method::new(
35 "GetInfo",
36 &[],
37 Info::TYPE.as_object().unwrap().as_borrowed().unwrap(),
38 &[&Comment::new(
39 "Get basic information about the Varlink service",
40 )],
41 ),
42 &Method::new(
43 "GetInterfaceDescription",
44 &[INTERFACE_PARAM],
45 InterfaceDescription::TYPE
46 .as_object()
47 .unwrap()
48 .as_borrowed()
49 .unwrap(),
50 &[&Comment::new("Get the description of an interface")],
51 ),
52 ];
53
54 Interface::new(
55 INTERFACE_NAME,
56 METHODS,
57 &[],
58 Error::VARIANTS,
59 &[&Comment::new("Varlink service interface")],
60 )
61};