use crate::{Core,GlobalProxy,Object,PipewireObject,Properties,Proxy};
use glib::{translate::*};
glib::wrapper! {
#[doc(alias = "WpDevice")]
pub struct Device(Object<ffi::WpDevice, ffi::WpDeviceClass>) @extends GlobalProxy, Proxy, Object, @implements PipewireObject;
match fn {
type_ => || ffi::wp_device_get_type(),
}
}
impl Device {
#[doc(alias = "wp_device_new_from_factory")]
#[doc(alias = "new_from_factory")]
pub fn from_factory(core: &Core, factory_name: &str, properties: Option<Properties>) -> Option<Device> {
unsafe {
from_glib_full(ffi::wp_device_new_from_factory(core.to_glib_none().0, factory_name.to_glib_none().0, properties.into_glib_ptr()))
}
}
}