astal-wp-sys 0.1.0

FFI Bindings for libatstal and its libraries
Documentation
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ../../../girs
// from ../../../gtk-girs
// DO NOT EDIT

#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
    clippy::approx_constant,
    clippy::type_complexity,
    clippy::unreadable_literal,
    clippy::upper_case_acronyms
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

use glib_sys as glib;
use gobject_sys as gobject;

#[cfg(unix)]
#[allow(unused_imports)]
use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
#[allow(unused_imports)]
use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
#[allow(unused_imports)]
use std::ffi::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
};

#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};

// Enums
pub type AstalWpAvailable = c_int;
pub const ASTAL_WP_AVAILABLE_UNKNOWN: AstalWpAvailable = 0;
pub const ASTAL_WP_AVAILABLE_NO: AstalWpAvailable = 1;
pub const ASTAL_WP_AVAILABLE_YES: AstalWpAvailable = 2;

pub type AstalWpDeviceType = c_int;
pub const ASTAL_WP_DEVICE_TYPE_UNKNOWN: AstalWpDeviceType = 0;
pub const ASTAL_WP_DEVICE_TYPE_AUDIO: AstalWpDeviceType = 1;
pub const ASTAL_WP_DEVICE_TYPE_VIDEO: AstalWpDeviceType = 2;

pub type AstalWpDirection = c_int;
pub const ASTAL_WP_DIRECTION_INPUT: AstalWpDirection = 0;
pub const ASTAL_WP_DIRECTION_OUTPUT: AstalWpDirection = 1;

pub type AstalWpMediaCategory = c_int;
pub const ASTAL_WP_MEDIA_CATEGORY_UNKNOWN: AstalWpMediaCategory = 0;
pub const ASTAL_WP_MEDIA_CATEGORY_PLAYBACK: AstalWpMediaCategory = 1;
pub const ASTAL_WP_MEDIA_CATEGORY_CAPTURE: AstalWpMediaCategory = 2;
pub const ASTAL_WP_MEDIA_CATEGORY_DUPLEX: AstalWpMediaCategory = 3;
pub const ASTAL_WP_MEDIA_CATEGORY_MONITOR: AstalWpMediaCategory = 4;
pub const ASTAL_WP_MEDIA_CATEGORY_MANAGER: AstalWpMediaCategory = 5;

pub type AstalWpMediaClass = c_int;
pub const ASTAL_WP_MEDIA_CLASS_UNKNOWN: AstalWpMediaClass = 0;
pub const ASTAL_WP_MEDIA_CLASS_AUDIO_MICROPHONE: AstalWpMediaClass = 1;
pub const ASTAL_WP_MEDIA_CLASS_AUDIO_SPEAKER: AstalWpMediaClass = 2;
pub const ASTAL_WP_MEDIA_CLASS_AUDIO_RECORDER: AstalWpMediaClass = 3;
pub const ASTAL_WP_MEDIA_CLASS_AUDIO_STREAM: AstalWpMediaClass = 4;
pub const ASTAL_WP_MEDIA_CLASS_VIDEO_SOURCE: AstalWpMediaClass = 5;
pub const ASTAL_WP_MEDIA_CLASS_VIDEO_SINK: AstalWpMediaClass = 6;
pub const ASTAL_WP_MEDIA_CLASS_VIDEO_RECORDER: AstalWpMediaClass = 7;
pub const ASTAL_WP_MEDIA_CLASS_VIDEO_STREAM: AstalWpMediaClass = 8;

pub type AstalWpMediaRole = c_int;
pub const ASTAL_WP_MEDIA_ROLE_UNKNOWN: AstalWpMediaRole = 0;
pub const ASTAL_WP_MEDIA_ROLE_MOVIE: AstalWpMediaRole = 1;
pub const ASTAL_WP_MEDIA_ROLE_MUSIC: AstalWpMediaRole = 2;
pub const ASTAL_WP_MEDIA_ROLE_CAMERA: AstalWpMediaRole = 3;
pub const ASTAL_WP_MEDIA_ROLE_SCREEN: AstalWpMediaRole = 4;
pub const ASTAL_WP_MEDIA_ROLE_COMMUNICATION: AstalWpMediaRole = 5;
pub const ASTAL_WP_MEDIA_ROLE_GAME: AstalWpMediaRole = 6;
pub const ASTAL_WP_MEDIA_ROLE_NOTIFICATION: AstalWpMediaRole = 7;
pub const ASTAL_WP_MEDIA_ROLE_DSP: AstalWpMediaRole = 8;
pub const ASTAL_WP_MEDIA_ROLE_PRODUCTION: AstalWpMediaRole = 9;
pub const ASTAL_WP_MEDIA_ROLE_ACCESSIBILITY: AstalWpMediaRole = 10;
pub const ASTAL_WP_MEDIA_ROLE_TEST: AstalWpMediaRole = 11;

pub type AstalWpNodeState = c_int;
pub const ASTAL_WP_NODE_STATE_ERROR: AstalWpNodeState = -1;
pub const ASTAL_WP_NODE_STATE_CREATING: AstalWpNodeState = 0;
pub const ASTAL_WP_NODE_STATE_SUSPENDED: AstalWpNodeState = 1;
pub const ASTAL_WP_NODE_STATE_IDLE: AstalWpNodeState = 2;
pub const ASTAL_WP_NODE_STATE_RUNNING: AstalWpNodeState = 3;

pub type AstalWpScale = c_int;
pub const ASTAL_WP_SCALE_LINEAR: AstalWpScale = 0;
pub const ASTAL_WP_SCALE_CUBIC: AstalWpScale = 1;

// Constants
pub const ASTAL_WP_MAJOR_VERSION: c_int = 0;
pub const ASTAL_WP_MICRO_VERSION: c_int = 0;
pub const ASTAL_WP_MINOR_VERSION: c_int = 1;
pub const ASTAL_WP_VERSION: &[u8] = b"0.1.0\0";

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpAudioClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpAudioClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpAudioClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpChannelClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpChannelClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpChannelClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpDeviceClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpDeviceClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpDeviceClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpEndpointClass {
    pub parent_class: AstalWpNodeClass,
}

impl ::std::fmt::Debug for AstalWpEndpointClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpEndpointClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpNodeClass {
    pub parent_class: gobject::GObjectClass,
    pub params_changed: Option<unsafe extern "C" fn(*mut AstalWpNode, *const c_char)>,
    pub metadata_changed:
        Option<unsafe extern "C" fn(*mut AstalWpNode, *const c_char, *const c_char, *const c_char)>,
}

impl ::std::fmt::Debug for AstalWpNodeClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpNodeClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .field("params_changed", &self.params_changed)
            .field("metadata_changed", &self.metadata_changed)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpProfileClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpProfileClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpProfileClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpRouteClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpRouteClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpRouteClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpStreamClass {
    pub parent_class: AstalWpNodeClass,
}

impl ::std::fmt::Debug for AstalWpStreamClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpStreamClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpVideoClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpVideoClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpVideoClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpWpClass {
    pub parent_class: gobject::GObjectClass,
}

impl ::std::fmt::Debug for AstalWpWpClass {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpWpClass @ {self:p}"))
            .field("parent_class", &self.parent_class)
            .finish()
    }
}

// Classes
#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpAudio {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpAudio {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpAudio @ {self:p}")).finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpChannel {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpChannel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpChannel @ {self:p}"))
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpDevice {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpDevice {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpDevice @ {self:p}"))
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpEndpoint {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpEndpoint {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpEndpoint @ {self:p}"))
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct AstalWpNode {
    pub parent_instance: gobject::GObject,
}

impl ::std::fmt::Debug for AstalWpNode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpNode @ {self:p}"))
            .field("parent_instance", &self.parent_instance)
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpProfile {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpProfile {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpProfile @ {self:p}"))
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpRoute {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpRoute {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpRoute @ {self:p}")).finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpStream {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpStream {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpStream @ {self:p}"))
            .finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpVideo {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpVideo {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpVideo @ {self:p}")).finish()
    }
}

#[repr(C)]
#[allow(dead_code)]
pub struct AstalWpWp {
    _data: [u8; 0],
    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}

impl ::std::fmt::Debug for AstalWpWp {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("AstalWpWp @ {self:p}")).finish()
    }
}

extern "C" {

    //=========================================================================
    // AstalWpAvailable
    //=========================================================================
    pub fn astal_wp_available_get_type() -> GType;

    //=========================================================================
    // AstalWpDeviceType
    //=========================================================================
    pub fn astal_wp_device_type_get_type() -> GType;
    pub fn astal_wp_device_type_from_string(string: *const c_char) -> AstalWpDeviceType;
    pub fn astal_wp_device_type_to_string(device_type: AstalWpDeviceType) -> *mut c_char;

    //=========================================================================
    // AstalWpDirection
    //=========================================================================
    pub fn astal_wp_direction_get_type() -> GType;

    //=========================================================================
    // AstalWpMediaCategory
    //=========================================================================
    pub fn astal_wp_media_category_get_type() -> GType;
    pub fn astal_wp_media_category_from_string(string: *const c_char) -> AstalWpMediaCategory;
    pub fn astal_wp_media_category_to_string(category: AstalWpMediaCategory) -> *mut c_char;

    //=========================================================================
    // AstalWpMediaClass
    //=========================================================================
    pub fn astal_wp_media_class_get_type() -> GType;
    pub fn astal_wp_media_class_from_string(string: *const c_char) -> AstalWpMediaClass;
    pub fn astal_wp_media_class_to_string(media_class: AstalWpMediaClass) -> *mut c_char;

    //=========================================================================
    // AstalWpMediaRole
    //=========================================================================
    pub fn astal_wp_media_role_get_type() -> GType;
    pub fn astal_wp_media_role_from_string(string: *const c_char) -> AstalWpMediaRole;
    pub fn astal_wp_media_role_to_string(role: AstalWpMediaRole) -> *mut c_char;

    //=========================================================================
    // AstalWpNodeState
    //=========================================================================
    pub fn astal_wp_node_state_get_type() -> GType;

    //=========================================================================
    // AstalWpScale
    //=========================================================================
    pub fn astal_wp_scale_get_type() -> GType;

    //=========================================================================
    // AstalWpAudio
    //=========================================================================
    pub fn astal_wp_audio_get_type() -> GType;
    pub fn astal_wp_audio_new(wp: *mut AstalWpWp) -> *mut AstalWpAudio;
    pub fn astal_wp_audio_get_default_microphone(self_: *mut AstalWpAudio) -> *mut AstalWpEndpoint;
    pub fn astal_wp_audio_get_default_speaker(self_: *mut AstalWpAudio) -> *mut AstalWpEndpoint;
    pub fn astal_wp_audio_get_device(self_: *mut AstalWpAudio, id: c_uint) -> *mut AstalWpDevice;
    pub fn astal_wp_audio_get_devices(self_: *mut AstalWpAudio) -> *mut glib::GList;
    pub fn astal_wp_audio_get_microphone(
        self_: *mut AstalWpAudio,
        id: c_uint,
    ) -> *mut AstalWpEndpoint;
    pub fn astal_wp_audio_get_microphones(self_: *mut AstalWpAudio) -> *mut glib::GList;
    pub fn astal_wp_audio_get_node(self_: *mut AstalWpAudio, id: c_uint) -> *mut AstalWpNode;
    pub fn astal_wp_audio_get_recorder(self_: *mut AstalWpAudio, id: c_uint) -> *mut AstalWpStream;
    pub fn astal_wp_audio_get_recorders(self_: *mut AstalWpAudio) -> *mut glib::GList;
    pub fn astal_wp_audio_get_speaker(self_: *mut AstalWpAudio, id: c_uint)
        -> *mut AstalWpEndpoint;
    pub fn astal_wp_audio_get_speakers(self_: *mut AstalWpAudio) -> *mut glib::GList;
    pub fn astal_wp_audio_get_stream(self_: *mut AstalWpAudio, id: c_uint) -> *mut AstalWpStream;
    pub fn astal_wp_audio_get_streams(self_: *mut AstalWpAudio) -> *mut glib::GList;

    //=========================================================================
    // AstalWpChannel
    //=========================================================================
    pub fn astal_wp_channel_get_type() -> GType;
    pub fn astal_wp_channel_get_name(self_: *mut AstalWpChannel) -> *const c_char;
    pub fn astal_wp_channel_get_volume(self_: *mut AstalWpChannel) -> c_double;
    pub fn astal_wp_channel_get_volume_icon(self_: *mut AstalWpChannel) -> *const c_char;
    pub fn astal_wp_channel_set_volume(self_: *mut AstalWpChannel, volume: c_double);

    //=========================================================================
    // AstalWpDevice
    //=========================================================================
    pub fn astal_wp_device_get_type() -> GType;
    pub fn astal_wp_device_get_active_profile_id(self_: *mut AstalWpDevice) -> c_int;
    pub fn astal_wp_device_get_description(self_: *mut AstalWpDevice) -> *const c_char;
    pub fn astal_wp_device_get_device_type(self_: *mut AstalWpDevice) -> AstalWpDeviceType;
    pub fn astal_wp_device_get_form_factor(self_: *mut AstalWpDevice) -> *const c_char;
    pub fn astal_wp_device_get_icon(self_: *mut AstalWpDevice) -> *const c_char;
    pub fn astal_wp_device_get_id(self_: *mut AstalWpDevice) -> c_uint;
    pub fn astal_wp_device_get_input_route_id(self_: *mut AstalWpDevice) -> c_int;
    pub fn astal_wp_device_get_input_routes(self_: *mut AstalWpDevice) -> *mut glib::GList;
    pub fn astal_wp_device_get_output_route_id(self_: *mut AstalWpDevice) -> c_int;
    pub fn astal_wp_device_get_output_routes(self_: *mut AstalWpDevice) -> *mut glib::GList;
    pub fn astal_wp_device_get_profile(self_: *mut AstalWpDevice, id: c_int)
        -> *mut AstalWpProfile;
    pub fn astal_wp_device_get_profiles(self_: *mut AstalWpDevice) -> *mut glib::GList;
    pub fn astal_wp_device_get_pw_property(
        self_: *mut AstalWpDevice,
        key: *const c_char,
    ) -> *mut c_char;
    pub fn astal_wp_device_get_route(self_: *mut AstalWpDevice, id: c_int) -> *mut AstalWpRoute;
    pub fn astal_wp_device_get_routes(self_: *mut AstalWpDevice) -> *mut glib::GList;
    pub fn astal_wp_device_set_active_profile_id(self_: *mut AstalWpDevice, profile_id: c_int);
    pub fn astal_wp_device_set_route(
        self_: *mut AstalWpDevice,
        route: *mut AstalWpRoute,
        card_device: c_uint,
    );

    //=========================================================================
    // AstalWpEndpoint
    //=========================================================================
    pub fn astal_wp_endpoint_get_type() -> GType;
    pub fn astal_wp_endpoint_get_device(self_: *mut AstalWpEndpoint) -> *mut AstalWpDevice;
    pub fn astal_wp_endpoint_get_device_id(self_: *mut AstalWpEndpoint) -> c_uint;
    pub fn astal_wp_endpoint_get_is_default(self_: *mut AstalWpEndpoint) -> gboolean;
    pub fn astal_wp_endpoint_get_route(self_: *mut AstalWpEndpoint) -> *mut AstalWpRoute;
    pub fn astal_wp_endpoint_get_route_id(self_: *mut AstalWpEndpoint) -> c_uint;
    pub fn astal_wp_endpoint_get_routes(self_: *mut AstalWpEndpoint) -> *mut glib::GList;
    pub fn astal_wp_endpoint_set_is_default(self_: *mut AstalWpEndpoint, is_default: gboolean);
    pub fn astal_wp_endpoint_set_route(self_: *mut AstalWpEndpoint, route: *mut AstalWpRoute);
    pub fn astal_wp_endpoint_set_route_id(self_: *mut AstalWpEndpoint, route_id: c_uint);

    //=========================================================================
    // AstalWpNode
    //=========================================================================
    pub fn astal_wp_node_get_type() -> GType;
    pub fn astal_wp_node_get_channels(self_: *mut AstalWpNode) -> *mut glib::GList;
    pub fn astal_wp_node_get_description(self_: *mut AstalWpNode) -> *const c_char;
    pub fn astal_wp_node_get_icon(self_: *mut AstalWpNode) -> *const c_char;
    pub fn astal_wp_node_get_id(self_: *mut AstalWpNode) -> c_uint;
    pub fn astal_wp_node_get_lock_channels(self_: *mut AstalWpNode) -> gboolean;
    pub fn astal_wp_node_get_media_class(self_: *mut AstalWpNode) -> AstalWpMediaClass;
    pub fn astal_wp_node_get_mute(self_: *mut AstalWpNode) -> gboolean;
    pub fn astal_wp_node_get_name(self_: *mut AstalWpNode) -> *const c_char;
    pub fn astal_wp_node_get_path(self_: *mut AstalWpNode) -> *const c_char;
    pub fn astal_wp_node_get_pw_property(
        self_: *mut AstalWpNode,
        key: *const c_char,
    ) -> *mut c_char;
    pub fn astal_wp_node_get_serial(self_: *mut AstalWpNode) -> c_int;
    pub fn astal_wp_node_get_state(self_: *mut AstalWpNode) -> AstalWpNodeState;
    pub fn astal_wp_node_get_volume(self_: *mut AstalWpNode) -> c_double;
    pub fn astal_wp_node_get_volume_icon(self_: *mut AstalWpNode) -> *const c_char;
    pub fn astal_wp_node_metadata_changed(
        self_: *mut AstalWpNode,
        key: *const c_char,
        type_: *const c_char,
        value: *const c_char,
    );
    pub fn astal_wp_node_params_changed(self_: *mut AstalWpNode, id: *const c_char);
    pub fn astal_wp_node_set_lock_channels(self_: *mut AstalWpNode, lock_channels: gboolean);
    pub fn astal_wp_node_set_mute(self_: *mut AstalWpNode, mute: gboolean);
    pub fn astal_wp_node_set_volume(self_: *mut AstalWpNode, volume: c_double);

    //=========================================================================
    // AstalWpProfile
    //=========================================================================
    pub fn astal_wp_profile_get_type() -> GType;
    pub fn astal_wp_profile_get_available(self_: *mut AstalWpProfile) -> AstalWpAvailable;
    pub fn astal_wp_profile_get_description(self_: *mut AstalWpProfile) -> *const c_char;
    pub fn astal_wp_profile_get_index(self_: *mut AstalWpProfile) -> c_int;
    pub fn astal_wp_profile_get_name(self_: *mut AstalWpProfile) -> *const c_char;
    pub fn astal_wp_profile_get_priority(self_: *mut AstalWpProfile) -> c_int;

    //=========================================================================
    // AstalWpRoute
    //=========================================================================
    pub fn astal_wp_route_get_type() -> GType;
    pub fn astal_wp_route_get_available(self_: *mut AstalWpRoute) -> AstalWpAvailable;
    pub fn astal_wp_route_get_description(self_: *mut AstalWpRoute) -> *const c_char;
    pub fn astal_wp_route_get_device(self_: *mut AstalWpRoute) -> c_int;
    pub fn astal_wp_route_get_direction(self_: *mut AstalWpRoute) -> AstalWpDirection;
    pub fn astal_wp_route_get_index(self_: *mut AstalWpRoute) -> c_int;
    pub fn astal_wp_route_get_name(self_: *mut AstalWpRoute) -> *const c_char;
    pub fn astal_wp_route_get_priority(self_: *mut AstalWpRoute) -> c_int;

    //=========================================================================
    // AstalWpStream
    //=========================================================================
    pub fn astal_wp_stream_get_type() -> GType;
    pub fn astal_wp_stream_get_media_category(self_: *mut AstalWpStream) -> AstalWpMediaCategory;
    pub fn astal_wp_stream_get_media_role(self_: *mut AstalWpStream) -> AstalWpMediaRole;
    pub fn astal_wp_stream_get_target_endpoint(self_: *mut AstalWpStream) -> *mut AstalWpEndpoint;
    pub fn astal_wp_stream_get_target_serial(self_: *mut AstalWpStream) -> c_int;
    pub fn astal_wp_stream_set_target_endpoint(
        self_: *mut AstalWpStream,
        target: *mut AstalWpEndpoint,
    );
    pub fn astal_wp_stream_set_target_serial(self_: *mut AstalWpStream, serial: c_int);

    //=========================================================================
    // AstalWpVideo
    //=========================================================================
    pub fn astal_wp_video_get_type() -> GType;
    pub fn astal_wp_video_new(wp: *mut AstalWpWp) -> *mut AstalWpVideo;
    pub fn astal_wp_video_get_device(self_: *mut AstalWpVideo, id: c_uint) -> *mut AstalWpDevice;
    pub fn astal_wp_video_get_devices(self_: *mut AstalWpVideo) -> *mut glib::GList;
    pub fn astal_wp_video_get_recorder(self_: *mut AstalWpVideo, id: c_uint) -> *mut AstalWpStream;
    pub fn astal_wp_video_get_recorders(self_: *mut AstalWpVideo) -> *mut glib::GList;
    pub fn astal_wp_video_get_sink(self_: *mut AstalWpVideo, id: c_uint) -> *mut AstalWpEndpoint;
    pub fn astal_wp_video_get_sinks(self_: *mut AstalWpVideo) -> *mut glib::GList;
    pub fn astal_wp_video_get_source(self_: *mut AstalWpVideo, id: c_uint) -> *mut AstalWpEndpoint;
    pub fn astal_wp_video_get_sources(self_: *mut AstalWpVideo) -> *mut glib::GList;
    pub fn astal_wp_video_get_stream(self_: *mut AstalWpVideo, id: c_uint) -> *mut AstalWpStream;
    pub fn astal_wp_video_get_streams(self_: *mut AstalWpVideo) -> *mut glib::GList;

    //=========================================================================
    // AstalWpWp
    //=========================================================================
    pub fn astal_wp_wp_get_type() -> GType;
    pub fn astal_wp_wp_get_default() -> *mut AstalWpWp;
    pub fn astal_wp_wp_get_audio(self_: *mut AstalWpWp) -> *mut AstalWpAudio;
    pub fn astal_wp_wp_get_default_microphone(self_: *mut AstalWpWp) -> *mut AstalWpEndpoint;
    pub fn astal_wp_wp_get_default_speaker(self_: *mut AstalWpWp) -> *mut AstalWpEndpoint;
    pub fn astal_wp_wp_get_device(self_: *mut AstalWpWp, id: c_uint) -> *mut AstalWpDevice;
    pub fn astal_wp_wp_get_devices(self_: *mut AstalWpWp) -> *mut glib::GList;
    pub fn astal_wp_wp_get_node(self_: *mut AstalWpWp, id: c_uint) -> *mut AstalWpNode;
    pub fn astal_wp_wp_get_node_by_serial(self_: *mut AstalWpWp, serial: c_int)
        -> *mut AstalWpNode;
    pub fn astal_wp_wp_get_nodes(self_: *mut AstalWpWp) -> *mut glib::GList;
    pub fn astal_wp_wp_get_scale(self_: *mut AstalWpWp) -> AstalWpScale;
    pub fn astal_wp_wp_get_video(self_: *mut AstalWpWp) -> *mut AstalWpVideo;
    pub fn astal_wp_wp_set_scale(self_: *mut AstalWpWp, scale: AstalWpScale);

    //=========================================================================
    // Other functions
    //=========================================================================
    pub fn astal_wp_get_default() -> *mut AstalWpWp;

}