// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use RTSPMediaFactory; use ffi; use glib::StaticType; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::signal::SignalHandlerId; use glib::signal::connect_raw; use glib::translate::*; use glib_ffi; use gobject_ffi; use std::boxed::Box as Box_; use std::mem::transmute; glib_wrapper! { pub struct RTSPMediaFactoryURI(Object): RTSPMediaFactory; match fn { get_type => || ffi::gst_rtsp_media_factory_uri_get_type(), } } impl RTSPMediaFactoryURI { pub fn new() -> RTSPMediaFactoryURI { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gst_rtsp_media_factory_uri_new()) } } } impl Default for RTSPMediaFactoryURI { fn default() -> Self { Self::new() } } unsafe impl Send for RTSPMediaFactoryURI {} unsafe impl Sync for RTSPMediaFactoryURI {} pub trait RTSPMediaFactoryURIExt: 'static { fn get_uri(&self) -> Option; fn set_uri(&self, uri: &str); fn get_property_use_gstpay(&self) -> bool; fn set_property_use_gstpay(&self, use_gstpay: bool); fn connect_property_uri_notify(&self, f: F) -> SignalHandlerId; fn connect_property_use_gstpay_notify(&self, f: F) -> SignalHandlerId; } impl> RTSPMediaFactoryURIExt for O { fn get_uri(&self) -> Option { unsafe { from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.to_glib_none().0)) } } fn set_uri(&self, uri: &str) { unsafe { ffi::gst_rtsp_media_factory_uri_set_uri(self.to_glib_none().0, uri.to_glib_none().0); } } fn get_property_use_gstpay(&self) -> bool { unsafe { let mut value = Value::from_type(::static_type()); gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0); value.get().unwrap() } } fn set_property_use_gstpay(&self, use_gstpay: bool) { unsafe { gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0); } } fn connect_property_uri_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect_raw(self.to_glib_none().0 as *mut _, b"notify::uri\0".as_ptr() as *const _, transmute(notify_uri_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } fn connect_property_use_gstpay_notify(&self, f: F) -> SignalHandlerId { unsafe { let f: Box_> = Box_::new(Box_::new(f)); connect_raw(self.to_glib_none().0 as *mut _, b"notify::use-gstpay\0".as_ptr() as *const _, transmute(notify_use_gstpay_trampoline:: as usize), Box_::into_raw(f) as *mut _) } } } unsafe extern "C" fn notify_uri_trampoline

(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactoryURI::from_glib_borrow(this).downcast_unchecked()) } unsafe extern "C" fn notify_use_gstpay_trampoline

(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) where P: IsA { let f: &&(Fn(&P) + Send + Sync + 'static) = transmute(f); f(&RTSPMediaFactoryURI::from_glib_borrow(this).downcast_unchecked()) }