VpnServicePluginExt

Trait VpnServicePluginExt 

Source
pub trait VpnServicePluginExt: IsA<VpnServicePlugin> + 'static {
Show 14 methods // Provided methods fn disconnect(&self) -> Result<(), Error> { ... } fn failure(&self, reason: VpnPluginFailure) { ... } fn secrets_required(&self, message: &str, hints: &str) { ... } fn set_login_banner(&self, banner: &str) { ... } fn shutdown(&self) { ... } fn service_name(&self) -> Option<GString> { ... } fn state(&self) -> VpnServiceState { ... } fn set_state(&self, state: VpnServiceState) { ... } fn is_watch_peer(&self) -> bool { ... } fn connect_failure<F: Fn(&Self, u32) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_login_banner<F: Fn(&Self, &str) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_quit<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... } fn connect_state_changed<F: Fn(&Self, u32) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Available on crate feature v1_2 only.
Expand description

Trait containing all VpnServicePlugin methods.

§Implementors

VpnServicePlugin

Provided Methods§

Source

fn disconnect(&self) -> Result<(), Error>

Source

fn failure(&self, reason: VpnPluginFailure)

Source

fn secrets_required(&self, message: &str, hints: &str)

Called by VPN plugin implementations to signal to NetworkManager that secrets are required during the connection process. This signal may be used to request new secrets when the secrets originally provided by NetworkManager are insufficient, or the VPN process indicates that it needs additional information to complete the request.

§message

an information message about why secrets are required, if any

§hints

VPN specific secret names for required new secrets

Source

fn set_login_banner(&self, banner: &str)

Source

fn shutdown(&self)

Available on crate feature v1_12 only.

Shutdown the @self and disconnect from D-Bus. After this, the plugin instance is dead and should no longer be used. It ensures to get no more requests from D-Bus. In principle, you don’t need to shutdown the plugin, disposing the instance has the same effect. However, this gives a way to deactivate the plugin before giving up the last reference.

Source

fn service_name(&self) -> Option<GString>

The D-Bus service name of this plugin.

Source

fn state(&self) -> VpnServiceState

The state of the plugin.

Source

fn set_state(&self, state: VpnServiceState)

The state of the plugin.

Source

fn is_watch_peer(&self) -> bool

Whether to watch for D-Bus peer’s changes.

Source

fn connect_failure<F: Fn(&Self, u32) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_login_banner<F: Fn(&Self, &str) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_quit<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_state_changed<F: Fn(&Self, u32) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§