libsecret/auto/
functions.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git)
4// DO NOT EDIT
5
6use crate::ffi;
7#[cfg(feature = "v0_19")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v0_19")))]
9use crate::{Retrievable, Value};
10#[cfg(feature = "v0_18_6")]
11#[cfg_attr(docsrs, doc(cfg(feature = "v0_18_6")))]
12use crate::{Schema, SchemaType};
13use glib::{prelude::*, translate::*};
14
15//#[cfg(feature = "v0_21_2")]
16//#[cfg_attr(docsrs, doc(cfg(feature = "v0_21_2")))]
17//#[doc(alias = "secret_attributes_validate")]
18//pub fn attributes_validate(schema: &Schema, attributes: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 25 }/TypeId { ns_id: 0, id: 25 }) -> Result<(), glib::Error> {
19//    unsafe { TODO: call ffi:secret_attributes_validate() }
20//}
21
22#[cfg(feature = "v0_18_6")]
23#[cfg_attr(docsrs, doc(cfg(feature = "v0_18_6")))]
24#[doc(alias = "secret_get_schema")]
25#[doc(alias = "get_schema")]
26pub fn schema(type_: SchemaType) -> Schema {
27    unsafe { from_glib_none(ffi::secret_get_schema(type_.into_glib())) }
28}
29
30#[doc(alias = "secret_password_free")]
31pub fn password_free(password: Option<&str>) {
32    unsafe {
33        ffi::secret_password_free(password.to_glib_none().0);
34    }
35}
36
37#[doc(alias = "secret_password_wipe")]
38pub fn password_wipe(password: Option<&str>) {
39    unsafe {
40        ffi::secret_password_wipe(password.to_glib_none().0);
41    }
42}