1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// This file was generated by gir (https://github.com/gtk-rs/gir)
// DO NOT EDIT

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()))
        }
    }
}