Struct UssdProxy
pub struct UssdProxy<'p>(Proxy<'p>);Expand description
Client for the USSD features of a modem.
Subscribe to property changes before initiate to see the session state
move. The network may wait for more input after initiate returns.
Upstream documentation: https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.html.
Tuple Fields§
§0: Proxy<'p>Implementations§
§impl<'p> UssdProxy<'p>
impl<'p> UssdProxy<'p>
pub async fn new<P>(conn: &Connection, path: P) -> Result<UssdProxy<'p>>
pub async fn new<P>(conn: &Connection, path: P) -> Result<UssdProxy<'p>>
Creates a new proxy with the given path, and the default destination.
pub fn builder(conn: &Connection) -> Builder<'p, Self>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
pub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
pub fn inner(&self) -> &Proxy<'p>
pub fn inner(&self) -> &Proxy<'p>
The reference to the underlying zbus::Proxy.
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
The mutable reference to the underlying zbus::Proxy.
pub async fn initiate(&self, command: &str) -> Result<String>
pub async fn initiate(&self, command: &str) -> Result<String>
Starts a USSD session and returns the answer of the network.
No new command can start until the session is cancelled or ends.
pub async fn respond(&self, response: &str) -> Result<String>
pub async fn respond(&self, response: &str) -> Result<String>
Answers a USSD request of the network and returns its reply.
The network can answer with a request for more input.
pub async fn state(&self) -> Result<Modem3gppUssdSessionState>
pub async fn state(&self) -> Result<Modem3gppUssdSessionState>
The state of the USSD session.
pub fn cached_state(
&self,
) -> Result<Option<<Result<Modem3gppUssdSessionState> as ResultAdapter>::Ok>, <Result<Modem3gppUssdSessionState> as ResultAdapter>::Err>
pub fn cached_state( &self, ) -> Result<Option<<Result<Modem3gppUssdSessionState> as ResultAdapter>::Ok>, <Result<Modem3gppUssdSessionState> as ResultAdapter>::Err>
The state of the USSD session.
Get the cached value of the State property, or None if the property is not cached.
pub async fn receive_state_changed(
&self,
) -> PropertyStream<'p, <Result<Modem3gppUssdSessionState> as ResultAdapter>::Ok>
pub async fn receive_state_changed( &self, ) -> PropertyStream<'p, <Result<Modem3gppUssdSessionState> as ResultAdapter>::Ok>
The state of the USSD session.
Create a stream for the State property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn network_notification(&self) -> Result<String>
pub async fn network_notification(&self) -> Result<String>
A message of the network that does not need an answer.
The value is empty if there is none.
pub fn cached_network_notification(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_network_notification( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
A message of the network that does not need an answer.
The value is empty if there is none.
Get the cached value of the NetworkNotification property, or None if the property is not cached.
pub async fn receive_network_notification_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_network_notification_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
A message of the network that does not need an answer.
The value is empty if there is none.
Create a stream for the NetworkNotification property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn network_request(&self) -> Result<String>
pub async fn network_request(&self) -> Result<String>
A request of the network that needs an answer with respond.
The value is empty if there is none.
pub fn cached_network_request(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
pub fn cached_network_request( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
A request of the network that needs an answer with respond.
The value is empty if there is none.
Get the cached value of the NetworkRequest property, or None if the property is not cached.
pub async fn receive_network_request_changed(
&self,
) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
pub async fn receive_network_request_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>
A request of the network that needs an answer with respond.
The value is empty if there is none.
Create a stream for the NetworkRequest property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].