mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
chore: add getters declarations
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||||
|
|
||||||
|
/* Initting
|
||||||
|
*
|
||||||
|
*(what a cool section comment)
|
||||||
|
*/
|
||||||
|
|
||||||
/// Initialized libnotify. This must be called before any other functions.
|
/// Initialized libnotify. This must be called before any other functions.
|
||||||
///
|
///
|
||||||
/// Starting from 0.8, if the provided app_name is NULL, libnotify will try to figure it out from the running application. Before it was not allowed, and was causing libnotify not to be initialized.
|
/// Starting from 0.8, if the provided app_name is NULL, libnotify will try to figure it out from the running application. Before it was not allowed, and was causing libnotify not to be initialized.
|
||||||
@@ -40,6 +45,39 @@ pub fn is_initted() -> bool {
|
|||||||
unsafe { notify_is_initted() != 0 }
|
unsafe { notify_is_initted() != 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Getting
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Gets the application icon registered.
|
||||||
|
// Available since: 0.8.4
|
||||||
|
pub fn get_app_icon() -> String {
|
||||||
|
todo!();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Queries the server capabilities.
|
||||||
|
/// Synchronously queries the server for its capabilities and returns them in a list.
|
||||||
|
pub fn get_server_caps() -> Vec<String> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct ServerInfo {
|
||||||
|
/// A location to store the server name, or `None`
|
||||||
|
name: Option<String>,
|
||||||
|
/// A location to store the server vendor, or `None`
|
||||||
|
vendor: Option<String>,
|
||||||
|
/// A location to store the server version, or `None`
|
||||||
|
version: Option<String>,
|
||||||
|
/// A location to store the version the service is compliant with, or `None`
|
||||||
|
spec_version: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Queries the server for information.
|
||||||
|
/// Synchronously queries the server for its information, specifically, the name, vendor, server version, and the version of the notifications specification that it is compliant with.
|
||||||
|
pub fn get_server_info() -> Option<ServerInfo> {
|
||||||
|
todo!();
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user