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::{Direction,GlobalProxy,Object,PipewireObject,Proxy};
use glib::{translate::*};

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

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

impl Port {
    #[doc(alias = "wp_port_get_direction")]
    #[doc(alias = "get_direction")]
    pub fn direction(&self) -> Direction {
        unsafe {
            from_glib(ffi::wp_port_get_direction(self.to_glib_none().0))
        }
    }
}