use crate::Session;
use glib::object::Cast;
use glib::translate::*;
use std::fmt;
glib::wrapper! {
#[doc(alias = "SoupSessionSync")]
pub struct SessionSync(Object<ffi::SoupSessionSync, ffi::SoupSessionSyncClass>) @extends Session;
match fn {
type_ => || ffi::soup_session_sync_get_type(),
}
}
impl SessionSync {
#[doc(alias = "soup_session_sync_new")]
pub fn new() -> SessionSync {
crate::assert_initialized_main_thread!();
unsafe {
Session::from_glib_full(ffi::soup_session_sync_new()).unsafe_cast()
}
}
}
impl Default for SessionSync {
fn default() -> Self {
Self::new()
}
}
pub const NONE_SESSION_SYNC: Option<&SessionSync> = None;
impl fmt::Display for SessionSync {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str("SessionSync")
}
}