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
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

#![doc = include_str!("../README.md")]
#![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(feature = "dox", feature(doc_cfg))]

#[allow(unused_imports)]
use libc::{
    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
    intptr_t, size_t, ssize_t, uintptr_t, FILE,
};

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

// Enums
pub type HitakiAlsaFirewireError = c_int;
pub const HITAKI_ALSA_FIREWIRE_ERROR_FAILED: HitakiAlsaFirewireError = 0;
pub const HITAKI_ALSA_FIREWIRE_ERROR_IS_OPENED: HitakiAlsaFirewireError = 1;
pub const HITAKI_ALSA_FIREWIRE_ERROR_IS_NOT_OPENED: HitakiAlsaFirewireError = 2;
pub const HITAKI_ALSA_FIREWIRE_ERROR_IS_USED: HitakiAlsaFirewireError = 3;
pub const HITAKI_ALSA_FIREWIRE_ERROR_IS_LOCKED: HitakiAlsaFirewireError = 4;
pub const HITAKI_ALSA_FIREWIRE_ERROR_IS_UNLOCKED: HitakiAlsaFirewireError = 5;
pub const HITAKI_ALSA_FIREWIRE_ERROR_IS_DISCONNECTED: HitakiAlsaFirewireError = 6;
pub const HITAKI_ALSA_FIREWIRE_ERROR_WRONG_CLASS: HitakiAlsaFirewireError = 7;

pub type HitakiAlsaFirewireType = c_int;
pub const HITAKI_ALSA_FIREWIRE_TYPE_DICE: HitakiAlsaFirewireType = 1;
pub const HITAKI_ALSA_FIREWIRE_TYPE_FIREWORKS: HitakiAlsaFirewireType = 2;
pub const HITAKI_ALSA_FIREWIRE_TYPE_BEBOB: HitakiAlsaFirewireType = 3;
pub const HITAKI_ALSA_FIREWIRE_TYPE_OXFW: HitakiAlsaFirewireType = 4;
pub const HITAKI_ALSA_FIREWIRE_TYPE_DIGI00X: HitakiAlsaFirewireType = 5;
pub const HITAKI_ALSA_FIREWIRE_TYPE_TASCAM: HitakiAlsaFirewireType = 6;
pub const HITAKI_ALSA_FIREWIRE_TYPE_MOTU: HitakiAlsaFirewireType = 7;
pub const HITAKI_ALSA_FIREWIRE_TYPE_FIREFACE: HitakiAlsaFirewireType = 8;

pub type HitakiEfwProtocolError = c_int;
pub const HITAKI_EFW_PROTOCOL_ERROR_OK: HitakiEfwProtocolError = 0;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD: HitakiEfwProtocolError = 1;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_COMMAND: HitakiEfwProtocolError = 2;
pub const HITAKI_EFW_PROTOCOL_ERROR_COMM_ERR: HitakiEfwProtocolError = 3;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_QUAD_COUNT: HitakiEfwProtocolError = 4;
pub const HITAKI_EFW_PROTOCOL_ERROR_UNSUPPORTED: HitakiEfwProtocolError = 5;
pub const HITAKI_EFW_PROTOCOL_ERROR_TIMEOUT: HitakiEfwProtocolError = 6;
pub const HITAKI_EFW_PROTOCOL_ERROR_DSP_TIMEOUT: HitakiEfwProtocolError = 7;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_RATE: HitakiEfwProtocolError = 8;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_CLOCK: HitakiEfwProtocolError = 9;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_CHANNEL: HitakiEfwProtocolError = 10;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_PAN: HitakiEfwProtocolError = 11;
pub const HITAKI_EFW_PROTOCOL_ERROR_FLASH_BUSY: HitakiEfwProtocolError = 12;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_MIRROR: HitakiEfwProtocolError = 13;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_LED: HitakiEfwProtocolError = 14;
pub const HITAKI_EFW_PROTOCOL_ERROR_BAD_PARAMETER: HitakiEfwProtocolError = 15;
pub const HITAKI_EFW_PROTOCOL_ERROR_INCOMPLETE: HitakiEfwProtocolError = -2147483648;
pub const HITAKI_EFW_PROTOCOL_ERROR_INVALID: HitakiEfwProtocolError = -1;

// Records
#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiAlsaFirewireInterface {
    pub iface: gobject::GTypeInterface,
    pub open: Option<
        unsafe extern "C" fn(
            *mut HitakiAlsaFirewire,
            *const c_char,
            c_int,
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
    pub lock:
        Option<unsafe extern "C" fn(*mut HitakiAlsaFirewire, *mut *mut glib::GError) -> gboolean>,
    pub unlock:
        Option<unsafe extern "C" fn(*mut HitakiAlsaFirewire, *mut *mut glib::GError) -> gboolean>,
    pub create_source: Option<
        unsafe extern "C" fn(
            *mut HitakiAlsaFirewire,
            *mut *mut glib::GSource,
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
}

impl ::std::fmt::Debug for HitakiAlsaFirewireInterface {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        f.debug_struct(&format!("HitakiAlsaFirewireInterface @ {:p}", self))
            .field("iface", &self.iface)
            .field("open", &self.open)
            .field("lock", &self.lock)
            .field("unlock", &self.unlock)
            .field("create_source", &self.create_source)
            .finish()
    }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiEfwProtocolInterface {
    pub iface: gobject::GTypeInterface,
    pub transmit_request: Option<
        unsafe extern "C" fn(
            *mut HitakiEfwProtocol,
            *const u8,
            size_t,
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
    pub get_seqnum: Option<unsafe extern "C" fn(*mut HitakiEfwProtocol, *mut u32)>,
    pub responded: Option<
        unsafe extern "C" fn(
            *mut HitakiEfwProtocol,
            c_uint,
            c_uint,
            c_uint,
            c_uint,
            HitakiEfwProtocolError,
            *const u32,
            c_uint,
        ),
    >,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiMotuCommandDspInterface {
    pub iface: gobject::GTypeInterface,
    pub read_float_meter: Option<
        unsafe extern "C" fn(
            *mut HitakiMotuCommandDsp,
            *const *mut [c_float; 400],
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiMotuRegisterDspInterface {
    pub iface: gobject::GTypeInterface,
    pub read_parameter: Option<
        unsafe extern "C" fn(
            *mut HitakiMotuRegisterDsp,
            *const *mut HitakiSndMotuRegisterDspParameter,
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
    pub read_byte_meter: Option<
        unsafe extern "C" fn(
            *mut HitakiMotuRegisterDsp,
            *const *mut [u8; 48],
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
    pub changed: Option<unsafe extern "C" fn(*mut HitakiMotuRegisterDsp, *const u32, c_uint)>,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiQuadletNotificationInterface {
    pub iface: gobject::GTypeInterface,
    pub notified: Option<unsafe extern "C" fn(*mut HitakiQuadletNotification, u32)>,
}

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

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

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

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

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

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

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiSndMotuRegisterDspParameter {
    pub reserved: [u8; 512],
}

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

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

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

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

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiTascamProtocolInterface {
    pub iface: gobject::GTypeInterface,
    pub read_state: Option<
        unsafe extern "C" fn(
            *mut HitakiTascamProtocol,
            *const *mut u32,
            *mut size_t,
            *mut *mut glib::GError,
        ) -> gboolean,
    >,
    pub changed: Option<unsafe extern "C" fn(*mut HitakiTascamProtocol, c_uint, c_uint, c_uint)>,
}

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

#[derive(Copy, Clone)]
#[repr(C)]
pub struct HitakiTimestampedQuadletNotificationInterface {
    pub iface: gobject::GTypeInterface,
    pub notified_at:
        Option<unsafe extern "C" fn(*mut HitakiTimestampedQuadletNotification, c_uint, c_uint)>,
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl ::std::fmt::Debug for HitakiAlsaFirewire {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiAlsaFirewire @ {:p}", self)
    }
}

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

impl ::std::fmt::Debug for HitakiEfwProtocol {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiEfwProtocol @ {:p}", self)
    }
}

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

impl ::std::fmt::Debug for HitakiMotuCommandDsp {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiMotuCommandDsp @ {:p}", self)
    }
}

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

impl ::std::fmt::Debug for HitakiMotuRegisterDsp {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiMotuRegisterDsp @ {:p}", self)
    }
}

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

impl ::std::fmt::Debug for HitakiQuadletNotification {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiQuadletNotification @ {:p}", self)
    }
}

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

impl ::std::fmt::Debug for HitakiTascamProtocol {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiTascamProtocol @ {:p}", self)
    }
}

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

impl ::std::fmt::Debug for HitakiTimestampedQuadletNotification {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        write!(f, "HitakiTimestampedQuadletNotification @ {:p}", self)
    }
}

#[link(name = "hitaki")]
extern "C" {

    //=========================================================================
    // HitakiAlsaFirewireError
    //=========================================================================
    pub fn hitaki_alsa_firewire_error_get_type() -> GType;
    pub fn hitaki_alsa_firewire_error_quark() -> glib::GQuark;
    pub fn hitaki_alsa_firewire_error_to_label(
        code: HitakiAlsaFirewireError,
        label: *mut *const c_char,
    );

    //=========================================================================
    // HitakiAlsaFirewireType
    //=========================================================================
    pub fn hitaki_alsa_firewire_type_get_type() -> GType;

    //=========================================================================
    // HitakiEfwProtocolError
    //=========================================================================
    pub fn hitaki_efw_protocol_error_get_type() -> GType;
    pub fn hitaki_efw_protocol_error_quark() -> glib::GQuark;
    pub fn hitaki_efw_protocol_error_to_label(
        code: HitakiEfwProtocolError,
        label: *mut *const c_char,
    );

    //=========================================================================
    // HitakiSndMotuRegisterDspParameter
    //=========================================================================
    pub fn hitaki_snd_motu_register_dsp_parameter_get_type() -> GType;
    pub fn hitaki_snd_motu_register_dsp_parameter_new() -> *mut HitakiSndMotuRegisterDspParameter;
    pub fn hitaki_snd_motu_register_dsp_parameter_get_headphone_output_paired_assignment(
        self_: *const HitakiSndMotuRegisterDspParameter,
        assignment: *mut u8,
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_headphone_output_paired_volume(
        self_: *const HitakiSndMotuRegisterDspParameter,
        volume: *mut u8,
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_input_flag(
        self_: *const HitakiSndMotuRegisterDspParameter,
        flag: *mut *const [u8; 10],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_input_gain_and_invert(
        self_: *const HitakiSndMotuRegisterDspParameter,
        gain_and_invert: *mut *const [u8; 10],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_line_input_boost_flag(
        self_: *const HitakiSndMotuRegisterDspParameter,
        boost_flag: *mut u8,
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_line_input_nominal_level_flag(
        self_: *const HitakiSndMotuRegisterDspParameter,
        nominal_level_flag: *mut u8,
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_main_output_paired_volume(
        self_: *const HitakiSndMotuRegisterDspParameter,
        volume: *mut u8,
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_output_paired_flag(
        self_: *const HitakiSndMotuRegisterDspParameter,
        flag: *mut *const [u8; 4],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_output_paired_volume(
        self_: *const HitakiSndMotuRegisterDspParameter,
        volume: *mut *const [u8; 4],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_source_flag(
        self_: *const HitakiSndMotuRegisterDspParameter,
        mixer: size_t,
        flag: *mut *const [u8; 20],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_source_gain(
        self_: *const HitakiSndMotuRegisterDspParameter,
        mixer: size_t,
        gain: *mut *const [u8; 20],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_source_paired_balance(
        self_: *const HitakiSndMotuRegisterDspParameter,
        mixer: size_t,
        balance: *mut *const [u8; 20],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_source_paired_width(
        self_: *const HitakiSndMotuRegisterDspParameter,
        mixer: size_t,
        width: *mut *const [u8; 20],
    );
    pub fn hitaki_snd_motu_register_dsp_parameter_get_mixer_source_pan(
        self_: *const HitakiSndMotuRegisterDspParameter,
        mixer: size_t,
        pan: *mut *const [u8; 20],
    );

    //=========================================================================
    // HitakiSndDice
    //=========================================================================
    pub fn hitaki_snd_dice_get_type() -> GType;
    pub fn hitaki_snd_dice_new() -> *mut HitakiSndDice;

    //=========================================================================
    // HitakiSndDigi00x
    //=========================================================================
    pub fn hitaki_snd_digi00x_get_type() -> GType;
    pub fn hitaki_snd_digi00x_new() -> *mut HitakiSndDigi00x;

    //=========================================================================
    // HitakiSndEfw
    //=========================================================================
    pub fn hitaki_snd_efw_get_type() -> GType;
    pub fn hitaki_snd_efw_new() -> *mut HitakiSndEfw;

    //=========================================================================
    // HitakiSndFireface
    //=========================================================================
    pub fn hitaki_snd_fireface_get_type() -> GType;
    pub fn hitaki_snd_fireface_new() -> *mut HitakiSndFireface;

    //=========================================================================
    // HitakiSndMotu
    //=========================================================================
    pub fn hitaki_snd_motu_get_type() -> GType;
    pub fn hitaki_snd_motu_new() -> *mut HitakiSndMotu;

    //=========================================================================
    // HitakiSndTascam
    //=========================================================================
    pub fn hitaki_snd_tascam_get_type() -> GType;
    pub fn hitaki_snd_tascam_new() -> *mut HitakiSndTascam;

    //=========================================================================
    // HitakiSndUnit
    //=========================================================================
    pub fn hitaki_snd_unit_get_type() -> GType;
    pub fn hitaki_snd_unit_new() -> *mut HitakiSndUnit;

    //=========================================================================
    // HitakiAlsaFirewire
    //=========================================================================
    pub fn hitaki_alsa_firewire_get_type() -> GType;
    pub fn hitaki_alsa_firewire_create_source(
        self_: *mut HitakiAlsaFirewire,
        source: *mut *mut glib::GSource,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn hitaki_alsa_firewire_lock(
        self_: *mut HitakiAlsaFirewire,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn hitaki_alsa_firewire_open(
        self_: *mut HitakiAlsaFirewire,
        path: *const c_char,
        open_flag: c_int,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn hitaki_alsa_firewire_unlock(
        self_: *mut HitakiAlsaFirewire,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // HitakiEfwProtocol
    //=========================================================================
    pub fn hitaki_efw_protocol_get_type() -> GType;
    pub fn hitaki_efw_protocol_receive_response(
        self_: *mut HitakiEfwProtocol,
        buffer: *const u8,
        length: size_t,
    );
    pub fn hitaki_efw_protocol_transaction(
        self_: *mut HitakiEfwProtocol,
        category: c_uint,
        command: c_uint,
        args: *const u32,
        arg_count: size_t,
        params: *const *mut u32,
        param_count: *mut size_t,
        timeout_ms: c_uint,
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn hitaki_efw_protocol_transmit_request(
        self_: *mut HitakiEfwProtocol,
        category: c_uint,
        command: c_uint,
        args: *const u32,
        arg_count: size_t,
        resp_seqnum: *mut u32,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // HitakiMotuCommandDsp
    //=========================================================================
    pub fn hitaki_motu_command_dsp_get_type() -> GType;
    pub fn hitaki_motu_command_dsp_read_float_meter(
        self_: *mut HitakiMotuCommandDsp,
        meter: *const *mut [c_float; 400],
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // HitakiMotuRegisterDsp
    //=========================================================================
    pub fn hitaki_motu_register_dsp_get_type() -> GType;
    pub fn hitaki_motu_register_dsp_read_byte_meter(
        self_: *mut HitakiMotuRegisterDsp,
        meter: *const *mut [u8; 48],
        error: *mut *mut glib::GError,
    ) -> gboolean;
    pub fn hitaki_motu_register_dsp_read_parameter(
        self_: *mut HitakiMotuRegisterDsp,
        param: *const *mut HitakiSndMotuRegisterDspParameter,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // HitakiQuadletNotification
    //=========================================================================
    pub fn hitaki_quadlet_notification_get_type() -> GType;

    //=========================================================================
    // HitakiTascamProtocol
    //=========================================================================
    pub fn hitaki_tascam_protocol_get_type() -> GType;
    pub fn hitaki_tascam_protocol_read_state(
        self_: *mut HitakiTascamProtocol,
        state: *const *mut u32,
        count: *mut size_t,
        error: *mut *mut glib::GError,
    ) -> gboolean;

    //=========================================================================
    // HitakiTimestampedQuadletNotification
    //=========================================================================
    pub fn hitaki_timestamped_quadlet_notification_get_type() -> GType;

}