astal_auth_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from ../../../girs
3// from ../../../gtk-girs
4// DO NOT EDIT
5
6#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
7#![allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal, clippy::upper_case_acronyms)]
8#![cfg_attr(docsrs, feature(doc_cfg))]
9
10use glib_sys as glib;
11use gobject_sys as gobject;
12use gio_sys as gio;
13
14#[allow(unused_imports)]
15use std::ffi::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
16    c_short, c_ushort, c_long, c_ulong, c_void};
17#[allow(unused_imports)]
18use libc::{size_t, ssize_t, time_t, off_t, intptr_t, uintptr_t, FILE};
19#[cfg(unix)]
20#[allow(unused_imports)]
21use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
22
23#[allow(unused_imports)]
24use glib::{gboolean, gconstpointer, gpointer, GType};
25
26// Constants
27pub const ASTAL_AUTH_MAJOR_VERSION: c_int = 0;
28pub const ASTAL_AUTH_MICRO_VERSION: c_int = 0;
29pub const ASTAL_AUTH_MINOR_VERSION: c_int = 1;
30pub const ASTAL_AUTH_VERSION: &[u8] = b"0.1.0\0";
31
32// Records
33#[derive(Copy, Clone)]
34#[repr(C)]
35pub struct AstalAuthPamClass {
36    pub parent_class: gobject::GObjectClass,
37}
38
39impl ::std::fmt::Debug for AstalAuthPamClass {
40    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
41        f.debug_struct(&format!("AstalAuthPamClass @ {self:p}"))
42         .field("parent_class", &self.parent_class)
43         .finish()
44    }
45}
46
47// Classes
48#[repr(C)]
49#[allow(dead_code)]
50pub struct AstalAuthPam {
51    _data: [u8; 0],
52    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
53}
54
55impl ::std::fmt::Debug for AstalAuthPam {
56    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
57        f.debug_struct(&format!("AstalAuthPam @ {self:p}"))
58         .finish()
59    }
60}
61
62extern "C" {
63
64    //=========================================================================
65    // AstalAuthPam
66    //=========================================================================
67    pub fn astal_auth_pam_get_type() -> GType;
68    pub fn astal_auth_pam_authenticate(password: *const c_char, result_callback: gio::GAsyncReadyCallback, user_data: gpointer) -> gboolean;
69    pub fn astal_auth_pam_authenticate_finish(res: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> ssize_t;
70    pub fn astal_auth_pam_get_service(self_: *mut AstalAuthPam) -> *const c_char;
71    pub fn astal_auth_pam_get_username(self_: *mut AstalAuthPam) -> *const c_char;
72    pub fn astal_auth_pam_set_service(self_: *mut AstalAuthPam, service: *const c_char);
73    pub fn astal_auth_pam_set_username(self_: *mut AstalAuthPam, username: *const c_char);
74    pub fn astal_auth_pam_start_authenticate(self_: *mut AstalAuthPam) -> gboolean;
75    pub fn astal_auth_pam_supply_secret(self_: *mut AstalAuthPam, secret: *const c_char);
76
77}