use crate::{ffi, IfaceType};
use glib::{prelude::*, translate::*};
glib::wrapper! {
#[doc(alias = "ALSAHwdepDeviceInfo")]
pub struct DeviceInfo(Object<ffi::ALSAHwdepDeviceInfo, ffi::ALSAHwdepDeviceInfoClass>);
match fn {
type_ => || ffi::alsahwdep_device_info_get_type(),
}
}
impl DeviceInfo {
pub const NONE: Option<&'static DeviceInfo> = None;
}
pub trait DeviceInfoExt: IsA<DeviceInfo> + 'static {
#[doc(alias = "card-id")]
fn card_id(&self) -> i32 {
ObjectExt::property(self.as_ref(), "card-id")
}
#[doc(alias = "device-id")]
fn device_id(&self) -> u32 {
ObjectExt::property(self.as_ref(), "device-id")
}
fn id(&self) -> Option<glib::GString> {
ObjectExt::property(self.as_ref(), "id")
}
fn iface(&self) -> IfaceType {
ObjectExt::property(self.as_ref(), "iface")
}
fn name(&self) -> Option<glib::GString> {
ObjectExt::property(self.as_ref(), "name")
}
}
impl<O: IsA<DeviceInfo>> DeviceInfoExt for O {}