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

use crate::{Core,Endpoint,GlobalProxy,Object,PipewireObject,Proxy,SiEndpoint};
use glib::{prelude::*,translate::*};

glib::wrapper! {
    #[doc(alias = "WpImplEndpoint")]
    pub struct ImplEndpoint(Object<ffi::WpImplEndpoint, ffi::WpImplEndpointClass>) @extends Endpoint, GlobalProxy, Proxy, Object, @implements PipewireObject;

    match fn {
        type_ => || ffi::wp_impl_endpoint_get_type(),
    }
}

impl ImplEndpoint {
    #[doc(alias = "wp_impl_endpoint_new")]
    pub fn new(core: &Core, item: &impl IsA<SiEndpoint>) -> ImplEndpoint {
        unsafe {
            from_glib_full(ffi::wp_impl_endpoint_new(core.to_glib_none().0, item.as_ref().to_glib_none().0))
        }
    }

    pub fn item(&self) -> Option<SiEndpoint> {
        ObjectExt::property(self, "item")
    }
}