use Error;
#[cfg(feature = "futures")]
use futures::future;
use gio;
use gio_sys;
use glib::GString;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_sys;
use goa_sys;
use gobject_sys;
use std::boxed::Box as Box_;
use std::fmt;
use std::mem;
use std::mem::transmute;
use std::ptr;
glib_wrapper! {
pub struct Account(Interface<goa_sys::GoaAccount>);
match fn {
get_type => || goa_sys::goa_account_get_type(),
}
}
impl Account {
}
pub const NONE_ACCOUNT: Option<&Account> = None;
pub trait AccountExt: 'static {
fn call_ensure_credentials<P: IsA<gio::Cancellable>, Q: FnOnce(Result<i32, Error>) + Send + 'static>(&self, cancellable: Option<&P>, callback: Q);
#[cfg(feature = "futures")]
fn call_ensure_credentials_future(&self) -> Box_<dyn future::Future<Output = Result<i32, Error>> + std::marker::Unpin>;
fn call_ensure_credentials_sync<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<i32, Error>;
fn call_remove<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>(&self, cancellable: Option<&P>, callback: Q);
#[cfg(feature = "futures")]
fn call_remove_future(&self) -> Box_<dyn future::Future<Output = Result<(), Error>> + std::marker::Unpin>;
fn call_remove_sync<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<(), Error>;
fn dup_id(&self) -> Option<GString>;
fn dup_identity(&self) -> Option<GString>;
fn dup_presentation_identity(&self) -> Option<GString>;
fn dup_provider_icon(&self) -> Option<GString>;
fn dup_provider_name(&self) -> Option<GString>;
fn dup_provider_type(&self) -> Option<GString>;
fn get_attention_needed(&self) -> bool;
fn get_calendar_disabled(&self) -> bool;
fn get_chat_disabled(&self) -> bool;
fn get_contacts_disabled(&self) -> bool;
fn get_documents_disabled(&self) -> bool;
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn get_files_disabled(&self) -> bool;
fn get_id(&self) -> Option<GString>;
fn get_identity(&self) -> Option<GString>;
#[cfg(any(feature = "v3_16", feature = "dox"))]
fn get_is_locked(&self) -> bool;
fn get_is_temporary(&self) -> bool;
fn get_mail_disabled(&self) -> bool;
#[cfg(any(feature = "v3_14", feature = "dox"))]
fn get_maps_disabled(&self) -> bool;
#[cfg(any(feature = "v3_18", feature = "dox"))]
fn get_music_disabled(&self) -> bool;
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn get_photos_disabled(&self) -> bool;
fn get_presentation_identity(&self) -> Option<GString>;
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn get_printers_disabled(&self) -> bool;
fn get_provider_icon(&self) -> Option<GString>;
fn get_provider_name(&self) -> Option<GString>;
fn get_provider_type(&self) -> Option<GString>;
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn get_read_later_disabled(&self) -> bool;
#[cfg(any(feature = "v3_6", feature = "dox"))]
fn get_ticketing_disabled(&self) -> bool;
#[cfg(any(feature = "v3_26", feature = "dox"))]
fn get_todo_disabled(&self) -> bool;
fn set_attention_needed(&self, value: bool);
fn set_calendar_disabled(&self, value: bool);
fn set_chat_disabled(&self, value: bool);
fn set_contacts_disabled(&self, value: bool);
fn set_documents_disabled(&self, value: bool);
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn set_files_disabled(&self, value: bool);
fn set_id(&self, value: &str);
fn set_identity(&self, value: &str);
#[cfg(any(feature = "v3_16", feature = "dox"))]
fn set_is_locked(&self, value: bool);
fn set_is_temporary(&self, value: bool);
fn set_mail_disabled(&self, value: bool);
#[cfg(any(feature = "v3_14", feature = "dox"))]
fn set_maps_disabled(&self, value: bool);
#[cfg(any(feature = "v3_18", feature = "dox"))]
fn set_music_disabled(&self, value: bool);
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn set_photos_disabled(&self, value: bool);
fn set_presentation_identity(&self, value: &str);
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn set_printers_disabled(&self, value: bool);
fn set_provider_icon(&self, value: &str);
fn set_provider_name(&self, value: &str);
fn set_provider_type(&self, value: &str);
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn set_read_later_disabled(&self, value: bool);
#[cfg(any(feature = "v3_6", feature = "dox"))]
fn set_ticketing_disabled(&self, value: bool);
#[cfg(any(feature = "v3_26", feature = "dox"))]
fn set_todo_disabled(&self, value: bool);
fn connect_property_attention_needed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_calendar_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_chat_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_contacts_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_documents_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn connect_property_files_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_identity_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_16", feature = "dox"))]
fn connect_property_is_locked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_is_temporary_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_mail_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_14", feature = "dox"))]
fn connect_property_maps_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_18", feature = "dox"))]
fn connect_property_music_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn connect_property_photos_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_presentation_identity_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn connect_property_printers_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_provider_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_provider_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_provider_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn connect_property_read_later_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_6", feature = "dox"))]
fn connect_property_ticketing_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v3_26", feature = "dox"))]
fn connect_property_todo_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
impl<O: IsA<Account>> AccountExt for O {
fn call_ensure_credentials<P: IsA<gio::Cancellable>, Q: FnOnce(Result<i32, Error>) + Send + 'static>(&self, cancellable: Option<&P>, callback: Q) {
let user_data: Box<Q> = Box::new(callback);
unsafe extern "C" fn call_ensure_credentials_trampoline<Q: FnOnce(Result<i32, Error>) + Send + 'static>(_source_object: *mut gobject_sys::GObject, res: *mut gio_sys::GAsyncResult, user_data: glib_sys::gpointer) {
let mut error = ptr::null_mut();
let mut out_expires_in = mem::MaybeUninit::uninit();
let _ = goa_sys::goa_account_call_ensure_credentials_finish(_source_object as *mut _, out_expires_in.as_mut_ptr(), res, &mut error);
let out_expires_in = out_expires_in.assume_init();
let result = if error.is_null() { Ok(out_expires_in) } else { Err(from_glib_full(error)) };
let callback: Box<Q> = Box::from_raw(user_data as *mut _);
callback(result);
}
let callback = call_ensure_credentials_trampoline::<Q>;
unsafe {
goa_sys::goa_account_call_ensure_credentials(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box::into_raw(user_data) as *mut _);
}
}
#[cfg(feature = "futures")]
fn call_ensure_credentials_future(&self) -> Box_<dyn future::Future<Output = Result<i32, Error>> + std::marker::Unpin> {
use gio::GioFuture;
use fragile::Fragile;
GioFuture::new(self, move |obj, send| {
let cancellable = gio::Cancellable::new();
let send = Fragile::new(send);
obj.call_ensure_credentials(
Some(&cancellable),
move |res| {
let _ = send.into_inner().send(res);
},
);
cancellable
})
}
fn call_ensure_credentials_sync<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<i32, Error> {
unsafe {
let mut out_expires_in = mem::MaybeUninit::uninit();
let mut error = ptr::null_mut();
let _ = goa_sys::goa_account_call_ensure_credentials_sync(self.as_ref().to_glib_none().0, out_expires_in.as_mut_ptr(), cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
let out_expires_in = out_expires_in.assume_init();
if error.is_null() { Ok(out_expires_in) } else { Err(from_glib_full(error)) }
}
}
fn call_remove<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>(&self, cancellable: Option<&P>, callback: Q) {
let user_data: Box<Q> = Box::new(callback);
unsafe extern "C" fn call_remove_trampoline<Q: FnOnce(Result<(), Error>) + Send + 'static>(_source_object: *mut gobject_sys::GObject, res: *mut gio_sys::GAsyncResult, user_data: glib_sys::gpointer) {
let mut error = ptr::null_mut();
let _ = goa_sys::goa_account_call_remove_finish(_source_object as *mut _, res, &mut error);
let result = if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) };
let callback: Box<Q> = Box::from_raw(user_data as *mut _);
callback(result);
}
let callback = call_remove_trampoline::<Q>;
unsafe {
goa_sys::goa_account_call_remove(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box::into_raw(user_data) as *mut _);
}
}
#[cfg(feature = "futures")]
fn call_remove_future(&self) -> Box_<dyn future::Future<Output = Result<(), Error>> + std::marker::Unpin> {
use gio::GioFuture;
use fragile::Fragile;
GioFuture::new(self, move |obj, send| {
let cancellable = gio::Cancellable::new();
let send = Fragile::new(send);
obj.call_remove(
Some(&cancellable),
move |res| {
let _ = send.into_inner().send(res);
},
);
cancellable
})
}
fn call_remove_sync<P: IsA<gio::Cancellable>>(&self, cancellable: Option<&P>) -> Result<(), Error> {
unsafe {
let mut error = ptr::null_mut();
let _ = goa_sys::goa_account_call_remove_sync(self.as_ref().to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
}
}
fn dup_id(&self) -> Option<GString> {
unsafe {
from_glib_full(goa_sys::goa_account_dup_id(self.as_ref().to_glib_none().0))
}
}
fn dup_identity(&self) -> Option<GString> {
unsafe {
from_glib_full(goa_sys::goa_account_dup_identity(self.as_ref().to_glib_none().0))
}
}
fn dup_presentation_identity(&self) -> Option<GString> {
unsafe {
from_glib_full(goa_sys::goa_account_dup_presentation_identity(self.as_ref().to_glib_none().0))
}
}
fn dup_provider_icon(&self) -> Option<GString> {
unsafe {
from_glib_full(goa_sys::goa_account_dup_provider_icon(self.as_ref().to_glib_none().0))
}
}
fn dup_provider_name(&self) -> Option<GString> {
unsafe {
from_glib_full(goa_sys::goa_account_dup_provider_name(self.as_ref().to_glib_none().0))
}
}
fn dup_provider_type(&self) -> Option<GString> {
unsafe {
from_glib_full(goa_sys::goa_account_dup_provider_type(self.as_ref().to_glib_none().0))
}
}
fn get_attention_needed(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_attention_needed(self.as_ref().to_glib_none().0))
}
}
fn get_calendar_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_calendar_disabled(self.as_ref().to_glib_none().0))
}
}
fn get_chat_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_chat_disabled(self.as_ref().to_glib_none().0))
}
}
fn get_contacts_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_contacts_disabled(self.as_ref().to_glib_none().0))
}
}
fn get_documents_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_documents_disabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn get_files_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_files_disabled(self.as_ref().to_glib_none().0))
}
}
fn get_id(&self) -> Option<GString> {
unsafe {
from_glib_none(goa_sys::goa_account_get_id(self.as_ref().to_glib_none().0))
}
}
fn get_identity(&self) -> Option<GString> {
unsafe {
from_glib_none(goa_sys::goa_account_get_identity(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_16", feature = "dox"))]
fn get_is_locked(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_is_locked(self.as_ref().to_glib_none().0))
}
}
fn get_is_temporary(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_is_temporary(self.as_ref().to_glib_none().0))
}
}
fn get_mail_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_mail_disabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_14", feature = "dox"))]
fn get_maps_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_maps_disabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_18", feature = "dox"))]
fn get_music_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_music_disabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn get_photos_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_photos_disabled(self.as_ref().to_glib_none().0))
}
}
fn get_presentation_identity(&self) -> Option<GString> {
unsafe {
from_glib_none(goa_sys::goa_account_get_presentation_identity(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn get_printers_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_printers_disabled(self.as_ref().to_glib_none().0))
}
}
fn get_provider_icon(&self) -> Option<GString> {
unsafe {
from_glib_none(goa_sys::goa_account_get_provider_icon(self.as_ref().to_glib_none().0))
}
}
fn get_provider_name(&self) -> Option<GString> {
unsafe {
from_glib_none(goa_sys::goa_account_get_provider_name(self.as_ref().to_glib_none().0))
}
}
fn get_provider_type(&self) -> Option<GString> {
unsafe {
from_glib_none(goa_sys::goa_account_get_provider_type(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn get_read_later_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_read_later_disabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_6", feature = "dox"))]
fn get_ticketing_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_ticketing_disabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v3_26", feature = "dox"))]
fn get_todo_disabled(&self) -> bool {
unsafe {
from_glib(goa_sys::goa_account_get_todo_disabled(self.as_ref().to_glib_none().0))
}
}
fn set_attention_needed(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_attention_needed(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_calendar_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_calendar_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_chat_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_chat_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_contacts_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_contacts_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_documents_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_documents_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn set_files_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_files_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_id(&self, value: &str) {
unsafe {
goa_sys::goa_account_set_id(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_identity(&self, value: &str) {
unsafe {
goa_sys::goa_account_set_identity(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
#[cfg(any(feature = "v3_16", feature = "dox"))]
fn set_is_locked(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_is_locked(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_is_temporary(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_is_temporary(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_mail_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_mail_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
#[cfg(any(feature = "v3_14", feature = "dox"))]
fn set_maps_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_maps_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
#[cfg(any(feature = "v3_18", feature = "dox"))]
fn set_music_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_music_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn set_photos_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_photos_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_presentation_identity(&self, value: &str) {
unsafe {
goa_sys::goa_account_set_presentation_identity(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn set_printers_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_printers_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn set_provider_icon(&self, value: &str) {
unsafe {
goa_sys::goa_account_set_provider_icon(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_provider_name(&self, value: &str) {
unsafe {
goa_sys::goa_account_set_provider_name(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
fn set_provider_type(&self, value: &str) {
unsafe {
goa_sys::goa_account_set_provider_type(self.as_ref().to_glib_none().0, value.to_glib_none().0);
}
}
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn set_read_later_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_read_later_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
#[cfg(any(feature = "v3_6", feature = "dox"))]
fn set_ticketing_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_ticketing_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
#[cfg(any(feature = "v3_26", feature = "dox"))]
fn set_todo_disabled(&self, value: bool) {
unsafe {
goa_sys::goa_account_set_todo_disabled(self.as_ref().to_glib_none().0, value.to_glib());
}
}
fn connect_property_attention_needed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_attention_needed_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::attention-needed\0".as_ptr() as *const _,
Some(transmute(notify_attention_needed_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_calendar_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_calendar_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::calendar-disabled\0".as_ptr() as *const _,
Some(transmute(notify_calendar_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_chat_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_chat_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::chat-disabled\0".as_ptr() as *const _,
Some(transmute(notify_chat_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_contacts_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_contacts_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::contacts-disabled\0".as_ptr() as *const _,
Some(transmute(notify_contacts_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_documents_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_documents_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::documents-disabled\0".as_ptr() as *const _,
Some(transmute(notify_documents_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn connect_property_files_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_files_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::files-disabled\0".as_ptr() as *const _,
Some(transmute(notify_files_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_id_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::id\0".as_ptr() as *const _,
Some(transmute(notify_id_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_identity_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_identity_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::identity\0".as_ptr() as *const _,
Some(transmute(notify_identity_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_16", feature = "dox"))]
fn connect_property_is_locked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_is_locked_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::is-locked\0".as_ptr() as *const _,
Some(transmute(notify_is_locked_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_is_temporary_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_is_temporary_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::is-temporary\0".as_ptr() as *const _,
Some(transmute(notify_is_temporary_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_mail_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_mail_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::mail-disabled\0".as_ptr() as *const _,
Some(transmute(notify_mail_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_14", feature = "dox"))]
fn connect_property_maps_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_maps_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::maps-disabled\0".as_ptr() as *const _,
Some(transmute(notify_maps_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_18", feature = "dox"))]
fn connect_property_music_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_music_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::music-disabled\0".as_ptr() as *const _,
Some(transmute(notify_music_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_8", feature = "dox"))]
fn connect_property_photos_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_photos_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::photos-disabled\0".as_ptr() as *const _,
Some(transmute(notify_photos_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_presentation_identity_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_presentation_identity_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::presentation-identity\0".as_ptr() as *const _,
Some(transmute(notify_presentation_identity_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn connect_property_printers_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_printers_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::printers-disabled\0".as_ptr() as *const _,
Some(transmute(notify_printers_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_provider_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_provider_icon_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::provider-icon\0".as_ptr() as *const _,
Some(transmute(notify_provider_icon_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_provider_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_provider_name_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::provider-name\0".as_ptr() as *const _,
Some(transmute(notify_provider_name_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_provider_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_provider_type_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::provider-type\0".as_ptr() as *const _,
Some(transmute(notify_provider_type_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_12", feature = "dox"))]
fn connect_property_read_later_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_read_later_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::read-later-disabled\0".as_ptr() as *const _,
Some(transmute(notify_read_later_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_6", feature = "dox"))]
fn connect_property_ticketing_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ticketing_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::ticketing-disabled\0".as_ptr() as *const _,
Some(transmute(notify_ticketing_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v3_26", feature = "dox"))]
fn connect_property_todo_disabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_todo_disabled_trampoline<P, F: Fn(&P) + 'static>(this: *mut goa_sys::GoaAccount, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<Account>
{
let f: &F = &*(f as *const F);
f(&Account::from_glib_borrow(this).unsafe_cast())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::todo-disabled\0".as_ptr() as *const _,
Some(transmute(notify_todo_disabled_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
impl fmt::Display for Account {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Account")
}
}