| 1 |
mod handle_token; |
| 2 |
pub(crate) mod request; |
| 3 |
mod session; |
| 4 |
#[cfg_attr(docsrs, doc(cfg(feature = "backend")))] |
| 5 |
#[cfg(feature = "backend")] |
| 6 |
pub use self::handle_token::HandleToken; |
| 7 |
#[cfg(not(feature = "backend"))] |
| 8 |
pub(crate) use self::handle_token::HandleToken; |
| 9 |
pub use self::{ |
| 10 |
request::{Request, Response, ResponseError, ResponseType}, |
| 11 |
session::{CreateSessionOptions, Session, SessionPortal}, |
| 12 |
}; |
| 13 |
#[cfg(any(feature = "screenshot", feature = "settings"))] |
| 14 |
mod color; |
| 15 |
#[cfg_attr(docsrs, doc(cfg(any(feature = "screenshot", feature = "settings",))))] |
| 16 |
#[cfg(any(feature = "screenshot", feature = "settings",))] |
| 17 |
pub use color::Color; |
| 18 |
|
| 19 |
#[cfg(any( |
| 20 |
feature = "notification", |
| 21 |
feature = "dynamic_launcher", |
| 22 |
feature = "backend" |
| 23 |
))] |
| 24 |
mod icon; |
| 25 |
#[cfg_attr( |
| 26 |
docsrs, |
| 27 |
doc(cfg(any( |
| 28 |
feature = "notification", |
| 29 |
feature = "dynamic_launcher", |
| 30 |
feature = "backend" |
| 31 |
))) |
| 32 |
)] |
| 33 |
#[cfg(any( |
| 34 |
feature = "notification", |
| 35 |
feature = "dynamic_launcher", |
| 36 |
feature = "backend" |
| 37 |
))] |
| 38 |
pub use icon::Icon; |
| 39 |
|
| 40 |
#[cfg_attr(docsrs, doc(cfg(feature = "account")))] |
| 41 |
#[cfg(feature = "account")] |
| 42 |
pub mod account; |
| 43 |
#[cfg_attr(docsrs, doc(cfg(feature = "background")))] |
| 44 |
#[cfg(feature = "background")] |
| 45 |
pub mod background; |
| 46 |
#[cfg_attr(docsrs, doc(cfg(feature = "camera")))] |
| 47 |
#[cfg(feature = "camera")] |
| 48 |
pub mod camera; |
| 49 |
#[cfg_attr(docsrs, doc(cfg(feature = "clipboard")))] |
| 50 |
#[cfg(feature = "clipboard")] |
| 51 |
pub mod clipboard; |
| 52 |
#[cfg_attr(docsrs, doc(cfg(feature = "dynamic_launcher")))] |
| 53 |
#[cfg(feature = "dynamic_launcher")] |
| 54 |
pub mod dynamic_launcher; |
| 55 |
#[cfg_attr(docsrs, doc(cfg(feature = "email")))] |
| 56 |
#[cfg(feature = "email")] |
| 57 |
pub mod email; |
| 58 |
/// Open/save file(s) chooser. |
| 59 |
#[cfg_attr(docsrs, doc(cfg(feature = "file_chooser")))] |
| 60 |
#[cfg(feature = "file_chooser")] |
| 61 |
pub mod file_chooser; |
| 62 |
/// Enable/disable/query the status of Game Mode. |
| 63 |
#[cfg_attr(docsrs, doc(cfg(feature = "game_mode")))] |
| 64 |
#[cfg(feature = "game_mode")] |
| 65 |
pub mod game_mode; |
| 66 |
/// Register global shortcuts |
| 67 |
#[cfg_attr(docsrs, doc(cfg(feature = "global_shortcuts")))] |
| 68 |
#[cfg(feature = "global_shortcuts")] |
| 69 |
pub mod global_shortcuts; |
| 70 |
/// Inhibit the session from being restarted or the user from logging out. |
| 71 |
#[cfg_attr(docsrs, doc(cfg(feature = "inhibit")))] |
| 72 |
#[cfg(feature = "inhibit")] |
| 73 |
pub mod inhibit; |
| 74 |
/// Capture input events from physical or logical devices. |
| 75 |
#[cfg_attr(docsrs, doc(cfg(feature = "input_capture")))] |
| 76 |
#[cfg(feature = "input_capture")] |
| 77 |
pub mod input_capture; |
| 78 |
/// Query the user's GPS location. |
| 79 |
#[cfg_attr(docsrs, doc(cfg(feature = "location")))] |
| 80 |
#[cfg(feature = "location")] |
| 81 |
pub mod location; |
| 82 |
/// Monitor memory level. |
| 83 |
#[cfg_attr(docsrs, doc(cfg(feature = "memory_monitor")))] |
| 84 |
#[cfg(feature = "memory_monitor")] |
| 85 |
pub mod memory_monitor; |
| 86 |
/// Check the status of the network on a user's machine. |
| 87 |
#[cfg_attr(docsrs, doc(cfg(feature = "network_monitor")))] |
| 88 |
#[cfg(feature = "network_monitor")] |
| 89 |
pub mod network_monitor; |
| 90 |
/// Send/withdraw notifications. |
| 91 |
#[cfg_attr(docsrs, doc(cfg(feature = "notification")))] |
| 92 |
#[cfg(feature = "notification")] |
| 93 |
pub mod notification; |
| 94 |
#[cfg_attr(docsrs, doc(cfg(feature = "open_uri")))] |
| 95 |
#[cfg(feature = "open_uri")] |
| 96 |
pub mod open_uri; |
| 97 |
/// Power profile monitoring. |
| 98 |
#[cfg_attr(docsrs, doc(cfg(feature = "power_profile_monitor")))] |
| 99 |
#[cfg(feature = "power_profile_monitor")] |
| 100 |
pub mod power_profile_monitor; |
| 101 |
/// Print a document. |
| 102 |
#[cfg_attr(docsrs, doc(cfg(feature = "print")))] |
| 103 |
#[cfg(feature = "print")] |
| 104 |
pub mod print; |
| 105 |
/// Proxy information. |
| 106 |
#[cfg_attr(docsrs, doc(cfg(feature = "proxy_resolver")))] |
| 107 |
#[cfg(feature = "proxy_resolver")] |
| 108 |
pub mod proxy_resolver; |
| 109 |
#[cfg_attr(docsrs, doc(cfg(feature = "realtime")))] |
| 110 |
#[cfg(feature = "realtime")] |
| 111 |
pub mod realtime; |
| 112 |
/// Start a remote desktop session and interact with it. |
| 113 |
#[cfg_attr(docsrs, doc(cfg(feature = "remote_desktop")))] |
| 114 |
#[cfg(feature = "remote_desktop")] |
| 115 |
pub mod remote_desktop; |
| 116 |
#[cfg_attr(docsrs, doc(cfg(feature = "screencast")))] |
| 117 |
#[cfg(feature = "screencast")] |
| 118 |
pub mod screencast; |
| 119 |
#[cfg_attr(docsrs, doc(cfg(feature = "screenshot")))] |
| 120 |
#[cfg(feature = "screenshot")] |
| 121 |
pub mod screenshot; |
| 122 |
/// Retrieve a per-application secret used to encrypt confidential data inside |
| 123 |
/// the sandbox. |
| 124 |
#[cfg_attr(docsrs, doc(cfg(feature = "secret")))] |
| 125 |
#[cfg(feature = "secret")] |
| 126 |
pub mod secret; |
| 127 |
/// Read & listen to system settings changes. |
| 128 |
#[cfg_attr(docsrs, doc(cfg(feature = "settings")))] |
| 129 |
#[cfg(feature = "settings")] |
| 130 |
pub mod settings; |
| 131 |
#[cfg_attr(docsrs, doc(cfg(feature = "trash")))] |
| 132 |
#[cfg(feature = "trash")] |
| 133 |
pub mod trash; |
| 134 |
#[cfg_attr(docsrs, doc(cfg(feature = "usb")))] |
| 135 |
#[cfg(feature = "usb")] |
| 136 |
pub mod usb; |
| 137 |
#[cfg_attr(docsrs, doc(cfg(feature = "wallpaper")))] |
| 138 |
#[cfg(feature = "wallpaper")] |
| 139 |
pub mod wallpaper; |
| 140 |
|
| 141 |
#[cfg_attr(feature = "glib", derive(glib::Enum))] |
| 142 |
#[cfg_attr(feature = "glib", enum_type(name = "AshpdPersistMode"))] |
| 143 |
#[derive( |
| 144 |
Default, |
| 145 |
serde_repr::Deserialize_repr, |
| 146 |
serde_repr::Serialize_repr, |
| 147 |
PartialEq, |
| 148 |
Eq, |
| 149 |
Debug, |
| 150 |
Copy, |
| 151 |
Clone, |
| 152 |
zbus::zvariant::Type, |
| 153 |
)] |
| 154 |
#[cfg_attr( |
| 155 |
docsrs, |
| 156 |
doc(cfg(any( |
| 157 |
feature = "screencast", |
| 158 |
feature = "remote_desktop", |
| 159 |
feature = "input_capture" |
| 160 |
))) |
| 161 |
)] |
| 162 |
#[cfg(any( |
| 163 |
feature = "screencast", |
| 164 |
feature = "remote_desktop", |
| 165 |
feature = "input_capture" |
| 166 |
))] |
| 167 |
#[doc(alias = "XdpPersistMode")] |
| 168 |
#[repr(u32)] |
| 169 |
/// Persistence mode for a screencast, remote desktop, or input capture session. |
| 170 |
pub enum PersistMode { |
| 171 |
#[doc(alias = "XDP_PERSIST_MODE_NONE")] |
| 172 |
#[default] |
| 173 |
/// Do not persist. |
| 174 |
DoNot = 0, |
| 175 |
#[doc(alias = "XDP_PERSIST_MODE_TRANSIENT")] |
| 176 |
/// Persist while the application is running. |
| 177 |
Application = 1, |
| 178 |
#[doc(alias = "XDP_PERSIST_MODE_PERSISTENT")] |
| 179 |
/// Persist until explicitly revoked. |
| 180 |
ExplicitlyRevoked = 2, |
| 181 |
} |