spice_client_glib_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git)
4// DO NOT EDIT
5
6#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
7#![allow(
8    clippy::approx_constant,
9    clippy::type_complexity,
10    clippy::unreadable_literal,
11    clippy::upper_case_acronyms
12)]
13#![cfg_attr(docsrs, feature(doc_cfg))]
14
15use gio_sys as gio;
16use glib_sys as glib;
17use gobject_sys as gobject;
18
19#[cfg(unix)]
20#[allow(unused_imports)]
21use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
22#[allow(unused_imports)]
23use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
24#[allow(unused_imports)]
25use std::ffi::{
26    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
27};
28
29#[allow(unused_imports)]
30use glib::{gboolean, gconstpointer, gpointer, GType};
31
32// Enums
33pub type SpiceChannelEvent = c_int;
34pub const SPICE_CHANNEL_NONE: SpiceChannelEvent = 0;
35pub const SPICE_CHANNEL_OPENED: SpiceChannelEvent = 10;
36pub const SPICE_CHANNEL_SWITCHING: SpiceChannelEvent = 11;
37pub const SPICE_CHANNEL_CLOSED: SpiceChannelEvent = 12;
38pub const SPICE_CHANNEL_ERROR_CONNECT: SpiceChannelEvent = 20;
39pub const SPICE_CHANNEL_ERROR_TLS: SpiceChannelEvent = 21;
40pub const SPICE_CHANNEL_ERROR_LINK: SpiceChannelEvent = 22;
41pub const SPICE_CHANNEL_ERROR_AUTH: SpiceChannelEvent = 23;
42pub const SPICE_CHANNEL_ERROR_IO: SpiceChannelEvent = 24;
43
44pub type SpiceClientError = c_int;
45pub const SPICE_CLIENT_ERROR_FAILED: SpiceClientError = 0;
46pub const SPICE_CLIENT_ERROR_USB_DEVICE_REJECTED: SpiceClientError = 1;
47pub const SPICE_CLIENT_ERROR_USB_DEVICE_LOST: SpiceClientError = 2;
48pub const SPICE_CLIENT_ERROR_AUTH_NEEDS_PASSWORD: SpiceClientError = 3;
49pub const SPICE_CLIENT_ERROR_AUTH_NEEDS_USERNAME: SpiceClientError = 4;
50pub const SPICE_CLIENT_ERROR_AUTH_NEEDS_PASSWORD_AND_USERNAME: SpiceClientError = 5;
51pub const SPICE_CLIENT_ERROR_USB_SERVICE: SpiceClientError = 6;
52
53pub type SpiceQmpPortVmAction = c_int;
54pub const SPICE_QMP_PORT_VM_ACTION_QUIT: SpiceQmpPortVmAction = 0;
55pub const SPICE_QMP_PORT_VM_ACTION_RESET: SpiceQmpPortVmAction = 1;
56pub const SPICE_QMP_PORT_VM_ACTION_POWER_DOWN: SpiceQmpPortVmAction = 2;
57pub const SPICE_QMP_PORT_VM_ACTION_PAUSE: SpiceQmpPortVmAction = 3;
58pub const SPICE_QMP_PORT_VM_ACTION_CONTINUE: SpiceQmpPortVmAction = 4;
59pub const SPICE_QMP_PORT_VM_ACTION_LAST: SpiceQmpPortVmAction = 5;
60
61pub type SpiceSessionMigration = c_int;
62pub const SPICE_SESSION_MIGRATION_NONE: SpiceSessionMigration = 0;
63pub const SPICE_SESSION_MIGRATION_SWITCHING: SpiceSessionMigration = 1;
64pub const SPICE_SESSION_MIGRATION_MIGRATING: SpiceSessionMigration = 2;
65pub const SPICE_SESSION_MIGRATION_CONNECTING: SpiceSessionMigration = 3;
66
67// Constants
68pub const SPICE_GTK_MAJOR_VERSION: c_int = 0;
69pub const SPICE_GTK_MICRO_VERSION: c_int = 8;
70pub const SPICE_GTK_MINOR_VERSION: c_int = 39;
71pub const SPICE_WEBDAV_CLIPBOARD_FOLDER_PATH: &[u8] = b"/.spice-clipboard\0";
72
73// Flags
74pub type SpiceInputsLock = c_uint;
75pub const SPICE_INPUTS_SCROLL_LOCK: SpiceInputsLock = 1;
76pub const SPICE_INPUTS_NUM_LOCK: SpiceInputsLock = 2;
77pub const SPICE_INPUTS_CAPS_LOCK: SpiceInputsLock = 4;
78
79pub type SpiceSessionVerify = c_uint;
80pub const SPICE_SESSION_VERIFY_PUBKEY: SpiceSessionVerify = 1;
81pub const SPICE_SESSION_VERIFY_HOSTNAME: SpiceSessionVerify = 2;
82pub const SPICE_SESSION_VERIFY_SUBJECT: SpiceSessionVerify = 4;
83
84// Callbacks
85pub type spice_msg_handler = Option<unsafe extern "C" fn(*mut SpiceChannel, *mut SpiceMsgIn)>;
86
87// Records
88#[derive(Copy, Clone)]
89#[repr(C)]
90pub struct SpiceAudioClass {
91    pub parent_class: gobject::GObjectClass,
92    pub connect_channel:
93        Option<unsafe extern "C" fn(*mut SpiceAudio, *mut SpiceChannel) -> gboolean>,
94    pub get_playback_volume_info_async: Option<
95        unsafe extern "C" fn(
96            *mut SpiceAudio,
97            *mut gio::GCancellable,
98            *mut SpiceMainChannel,
99            gio::GAsyncReadyCallback,
100            gpointer,
101        ),
102    >,
103    pub get_playback_volume_info_finish: Option<
104        unsafe extern "C" fn(
105            *mut SpiceAudio,
106            *mut gio::GAsyncResult,
107            *mut gboolean,
108            *mut u8,
109            *mut *mut u16,
110            *mut *mut glib::GError,
111        ) -> gboolean,
112    >,
113    pub get_record_volume_info_async: Option<
114        unsafe extern "C" fn(
115            *mut SpiceAudio,
116            *mut gio::GCancellable,
117            *mut SpiceMainChannel,
118            gio::GAsyncReadyCallback,
119            gpointer,
120        ),
121    >,
122    pub get_record_volume_info_finish: Option<
123        unsafe extern "C" fn(
124            *mut SpiceAudio,
125            *mut gio::GAsyncResult,
126            *mut gboolean,
127            *mut u8,
128            *mut *mut u16,
129            *mut *mut glib::GError,
130        ) -> gboolean,
131    >,
132    pub _spice_reserved: [gpointer; 6],
133}
134
135impl ::std::fmt::Debug for SpiceAudioClass {
136    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
137        f.debug_struct(&format!("SpiceAudioClass @ {self:p}"))
138            .field("parent_class", &self.parent_class)
139            .field("connect_channel", &self.connect_channel)
140            .field(
141                "get_playback_volume_info_async",
142                &self.get_playback_volume_info_async,
143            )
144            .field(
145                "get_playback_volume_info_finish",
146                &self.get_playback_volume_info_finish,
147            )
148            .field(
149                "get_record_volume_info_async",
150                &self.get_record_volume_info_async,
151            )
152            .field(
153                "get_record_volume_info_finish",
154                &self.get_record_volume_info_finish,
155            )
156            .finish()
157    }
158}
159
160#[repr(C)]
161#[allow(dead_code)]
162pub struct _SpiceAudioPrivate {
163    _data: [u8; 0],
164    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
165}
166
167pub type SpiceAudioPrivate = _SpiceAudioPrivate;
168
169#[derive(Copy, Clone)]
170#[repr(C)]
171pub struct SpiceChannelClass {
172    pub parent_class: gobject::GObjectClass,
173    pub channel_event: Option<unsafe extern "C" fn(*mut SpiceChannel, SpiceChannelEvent)>,
174    pub open_fd: Option<unsafe extern "C" fn(*mut SpiceChannel, c_int)>,
175    pub handle_msg: Option<unsafe extern "C" fn(*mut SpiceChannel, *mut SpiceMsgIn)>,
176    pub channel_up: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
177    pub iterate_write: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
178    pub iterate_read: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
179    pub deprecated: gpointer,
180    pub channel_reset: Option<unsafe extern "C" fn(*mut SpiceChannel, gboolean)>,
181    pub deprecated2: gpointer,
182    pub channel_send_migration_handshake: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
183    pub priv_: *mut SpiceChannelClassPrivate,
184    pub _spice_reserved: [gpointer; 8],
185}
186
187impl ::std::fmt::Debug for SpiceChannelClass {
188    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
189        f.debug_struct(&format!("SpiceChannelClass @ {self:p}"))
190            .field("parent_class", &self.parent_class)
191            .field("channel_event", &self.channel_event)
192            .field("open_fd", &self.open_fd)
193            .field("handle_msg", &self.handle_msg)
194            .field("channel_up", &self.channel_up)
195            .field("iterate_write", &self.iterate_write)
196            .field("iterate_read", &self.iterate_read)
197            .field("channel_reset", &self.channel_reset)
198            .field(
199                "channel_send_migration_handshake",
200                &self.channel_send_migration_handshake,
201            )
202            .finish()
203    }
204}
205
206#[repr(C)]
207#[allow(dead_code)]
208pub struct _SpiceChannelClassPrivate {
209    _data: [u8; 0],
210    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
211}
212
213pub type SpiceChannelClassPrivate = _SpiceChannelClassPrivate;
214
215#[repr(C)]
216#[allow(dead_code)]
217pub struct _SpiceChannelPrivate {
218    _data: [u8; 0],
219    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
220}
221
222pub type SpiceChannelPrivate = _SpiceChannelPrivate;
223
224#[derive(Copy, Clone)]
225#[repr(C)]
226pub struct SpiceCursorChannelClass {
227    pub parent_class: SpiceChannelClass,
228    pub cursor_set:
229        Option<unsafe extern "C" fn(*mut SpiceCursorChannel, c_int, c_int, c_int, c_int, gpointer)>,
230    pub cursor_move: Option<unsafe extern "C" fn(*mut SpiceCursorChannel, c_int, c_int)>,
231    pub cursor_hide: Option<unsafe extern "C" fn(*mut SpiceCursorChannel)>,
232    pub cursor_reset: Option<unsafe extern "C" fn(*mut SpiceCursorChannel)>,
233}
234
235impl ::std::fmt::Debug for SpiceCursorChannelClass {
236    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
237        f.debug_struct(&format!("SpiceCursorChannelClass @ {self:p}"))
238            .field("parent_class", &self.parent_class)
239            .field("cursor_set", &self.cursor_set)
240            .field("cursor_move", &self.cursor_move)
241            .field("cursor_hide", &self.cursor_hide)
242            .field("cursor_reset", &self.cursor_reset)
243            .finish()
244    }
245}
246
247#[repr(C)]
248#[allow(dead_code)]
249pub struct _SpiceCursorChannelPrivate {
250    _data: [u8; 0],
251    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
252}
253
254pub type SpiceCursorChannelPrivate = _SpiceCursorChannelPrivate;
255
256#[derive(Copy, Clone)]
257#[repr(C)]
258pub struct SpiceCursorShape {
259    pub type_: c_int,
260    pub width: u16,
261    pub height: u16,
262    pub hot_spot_x: u16,
263    pub hot_spot_y: u16,
264    pub data: gpointer,
265}
266
267impl ::std::fmt::Debug for SpiceCursorShape {
268    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
269        f.debug_struct(&format!("SpiceCursorShape @ {self:p}"))
270            .field("type_", &self.type_)
271            .field("width", &self.width)
272            .field("height", &self.height)
273            .field("hot_spot_x", &self.hot_spot_x)
274            .field("hot_spot_y", &self.hot_spot_y)
275            .field("data", &self.data)
276            .finish()
277    }
278}
279
280#[derive(Copy, Clone)]
281#[repr(C)]
282pub struct SpiceDisplayChannelClass {
283    pub parent_class: SpiceChannelClass,
284    pub display_primary_create: Option<
285        unsafe extern "C" fn(*mut SpiceChannel, c_int, c_int, c_int, c_int, c_int, gpointer),
286    >,
287    pub display_primary_destroy: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
288    pub display_invalidate:
289        Option<unsafe extern "C" fn(*mut SpiceChannel, c_int, c_int, c_int, c_int)>,
290    pub display_mark: Option<unsafe extern "C" fn(*mut SpiceChannel, gboolean)>,
291}
292
293impl ::std::fmt::Debug for SpiceDisplayChannelClass {
294    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
295        f.debug_struct(&format!("SpiceDisplayChannelClass @ {self:p}"))
296            .field("parent_class", &self.parent_class)
297            .field("display_primary_create", &self.display_primary_create)
298            .field("display_primary_destroy", &self.display_primary_destroy)
299            .field("display_invalidate", &self.display_invalidate)
300            .field("display_mark", &self.display_mark)
301            .finish()
302    }
303}
304
305#[repr(C)]
306#[allow(dead_code)]
307pub struct _SpiceDisplayChannelPrivate {
308    _data: [u8; 0],
309    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
310}
311
312pub type SpiceDisplayChannelPrivate = _SpiceDisplayChannelPrivate;
313
314#[derive(Copy, Clone)]
315#[repr(C)]
316pub struct SpiceDisplayMonitorConfig {
317    pub id: c_uint,
318    pub surface_id: c_uint,
319    pub x: c_uint,
320    pub y: c_uint,
321    pub width: c_uint,
322    pub height: c_uint,
323}
324
325impl ::std::fmt::Debug for SpiceDisplayMonitorConfig {
326    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
327        f.debug_struct(&format!("SpiceDisplayMonitorConfig @ {self:p}"))
328            .field("id", &self.id)
329            .field("surface_id", &self.surface_id)
330            .field("x", &self.x)
331            .field("y", &self.y)
332            .field("width", &self.width)
333            .field("height", &self.height)
334            .finish()
335    }
336}
337
338#[derive(Copy, Clone)]
339#[repr(C)]
340pub struct SpiceDisplayPrimary {
341    pub format: c_int,
342    pub width: c_int,
343    pub height: c_int,
344    pub stride: c_int,
345    pub shmid: c_int,
346    pub data: *mut u8,
347    pub marked: gboolean,
348}
349
350impl ::std::fmt::Debug for SpiceDisplayPrimary {
351    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
352        f.debug_struct(&format!("SpiceDisplayPrimary @ {self:p}"))
353            .field("format", &self.format)
354            .field("width", &self.width)
355            .field("height", &self.height)
356            .field("stride", &self.stride)
357            .field("shmid", &self.shmid)
358            .field("data", &self.data)
359            .field("marked", &self.marked)
360            .finish()
361    }
362}
363
364#[repr(C)]
365#[allow(dead_code)]
366pub struct _SpiceFileTransferTaskClass {
367    _data: [u8; 0],
368    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
369}
370
371pub type SpiceFileTransferTaskClass = _SpiceFileTransferTaskClass;
372
373#[derive(Copy, Clone)]
374#[repr(C)]
375pub struct SpiceGlScanout {
376    pub fd: c_int,
377    pub width: u32,
378    pub height: u32,
379    pub stride: u32,
380    pub format: u32,
381    pub y0top: gboolean,
382}
383
384impl ::std::fmt::Debug for SpiceGlScanout {
385    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
386        f.debug_struct(&format!("SpiceGlScanout @ {self:p}"))
387            .field("fd", &self.fd)
388            .field("width", &self.width)
389            .field("height", &self.height)
390            .field("stride", &self.stride)
391            .field("format", &self.format)
392            .field("y0top", &self.y0top)
393            .finish()
394    }
395}
396
397#[derive(Copy, Clone)]
398#[repr(C)]
399pub struct SpiceInputsChannelClass {
400    pub parent_class: SpiceChannelClass,
401    pub inputs_modifiers: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
402}
403
404impl ::std::fmt::Debug for SpiceInputsChannelClass {
405    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
406        f.debug_struct(&format!("SpiceInputsChannelClass @ {self:p}"))
407            .field("parent_class", &self.parent_class)
408            .field("inputs_modifiers", &self.inputs_modifiers)
409            .finish()
410    }
411}
412
413#[repr(C)]
414#[allow(dead_code)]
415pub struct _SpiceInputsChannelPrivate {
416    _data: [u8; 0],
417    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
418}
419
420pub type SpiceInputsChannelPrivate = _SpiceInputsChannelPrivate;
421
422#[derive(Copy, Clone)]
423#[repr(C)]
424pub struct SpiceMainChannelClass {
425    pub parent_class: SpiceChannelClass,
426    pub mouse_update: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
427    pub agent_update: Option<unsafe extern "C" fn(*mut SpiceChannel)>,
428}
429
430impl ::std::fmt::Debug for SpiceMainChannelClass {
431    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
432        f.debug_struct(&format!("SpiceMainChannelClass @ {self:p}"))
433            .field("parent_class", &self.parent_class)
434            .field("mouse_update", &self.mouse_update)
435            .field("agent_update", &self.agent_update)
436            .finish()
437    }
438}
439
440#[repr(C)]
441#[allow(dead_code)]
442pub struct _SpiceMainChannelPrivate {
443    _data: [u8; 0],
444    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
445}
446
447pub type SpiceMainChannelPrivate = _SpiceMainChannelPrivate;
448
449#[repr(C)]
450#[allow(dead_code)]
451pub struct _SpiceMsgIn {
452    _data: [u8; 0],
453    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
454}
455
456pub type SpiceMsgIn = _SpiceMsgIn;
457
458#[repr(C)]
459#[allow(dead_code)]
460pub struct _SpiceMsgOut {
461    _data: [u8; 0],
462    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
463}
464
465pub type SpiceMsgOut = _SpiceMsgOut;
466
467#[derive(Copy, Clone)]
468#[repr(C)]
469pub struct SpicePlaybackChannelClass {
470    pub parent_class: SpiceChannelClass,
471    pub playback_start:
472        Option<unsafe extern "C" fn(*mut SpicePlaybackChannel, c_int, c_int, c_int)>,
473    pub playback_data:
474        Option<unsafe extern "C" fn(*mut SpicePlaybackChannel, *mut gpointer, c_int)>,
475    pub playback_stop: Option<unsafe extern "C" fn(*mut SpicePlaybackChannel)>,
476}
477
478impl ::std::fmt::Debug for SpicePlaybackChannelClass {
479    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
480        f.debug_struct(&format!("SpicePlaybackChannelClass @ {self:p}"))
481            .field("parent_class", &self.parent_class)
482            .field("playback_start", &self.playback_start)
483            .field("playback_data", &self.playback_data)
484            .field("playback_stop", &self.playback_stop)
485            .finish()
486    }
487}
488
489#[repr(C)]
490#[allow(dead_code)]
491pub struct _SpicePlaybackChannelPrivate {
492    _data: [u8; 0],
493    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
494}
495
496pub type SpicePlaybackChannelPrivate = _SpicePlaybackChannelPrivate;
497
498#[derive(Copy, Clone)]
499#[repr(C)]
500pub struct SpicePortChannelClass {
501    pub parent_class: SpiceChannelClass,
502}
503
504impl ::std::fmt::Debug for SpicePortChannelClass {
505    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
506        f.debug_struct(&format!("SpicePortChannelClass @ {self:p}"))
507            .field("parent_class", &self.parent_class)
508            .finish()
509    }
510}
511
512#[repr(C)]
513#[allow(dead_code)]
514pub struct _SpicePortChannelPrivate {
515    _data: [u8; 0],
516    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
517}
518
519pub type SpicePortChannelPrivate = _SpicePortChannelPrivate;
520
521#[repr(C)]
522#[allow(dead_code)]
523pub struct _SpiceQmpPortClass {
524    _data: [u8; 0],
525    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
526}
527
528pub type SpiceQmpPortClass = _SpiceQmpPortClass;
529
530#[derive(Copy, Clone)]
531#[repr(C)]
532pub struct SpiceQmpStatus {
533    pub ref_: c_int,
534    pub version: c_int,
535    pub running: gboolean,
536    pub singlestep: gboolean,
537    pub status: *mut c_char,
538}
539
540impl ::std::fmt::Debug for SpiceQmpStatus {
541    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
542        f.debug_struct(&format!("SpiceQmpStatus @ {self:p}"))
543            .field("version", &self.version)
544            .field("running", &self.running)
545            .field("singlestep", &self.singlestep)
546            .field("status", &self.status)
547            .finish()
548    }
549}
550
551#[derive(Copy, Clone)]
552#[repr(C)]
553pub struct SpiceRecordChannelClass {
554    pub parent_class: SpiceChannelClass,
555    pub record_start: Option<unsafe extern "C" fn(*mut SpiceRecordChannel, c_int, c_int, c_int)>,
556    pub record_data: Option<unsafe extern "C" fn(*mut SpiceRecordChannel, *mut gpointer, c_int)>,
557    pub record_stop: Option<unsafe extern "C" fn(*mut SpiceRecordChannel)>,
558}
559
560impl ::std::fmt::Debug for SpiceRecordChannelClass {
561    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
562        f.debug_struct(&format!("SpiceRecordChannelClass @ {self:p}"))
563            .field("parent_class", &self.parent_class)
564            .field("record_start", &self.record_start)
565            .field("record_data", &self.record_data)
566            .field("record_stop", &self.record_stop)
567            .finish()
568    }
569}
570
571#[repr(C)]
572#[allow(dead_code)]
573pub struct _SpiceRecordChannelPrivate {
574    _data: [u8; 0],
575    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
576}
577
578pub type SpiceRecordChannelPrivate = _SpiceRecordChannelPrivate;
579
580#[derive(Copy, Clone)]
581#[repr(C)]
582pub struct SpiceSessionClass {
583    pub parent_class: gobject::GObjectClass,
584    pub channel_new: Option<unsafe extern "C" fn(*mut SpiceSession, *mut SpiceChannel)>,
585    pub channel_destroy: Option<unsafe extern "C" fn(*mut SpiceSession, *mut SpiceChannel)>,
586    pub _spice_reserved: [gpointer; 10],
587}
588
589impl ::std::fmt::Debug for SpiceSessionClass {
590    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
591        f.debug_struct(&format!("SpiceSessionClass @ {self:p}"))
592            .field("parent_class", &self.parent_class)
593            .field("channel_new", &self.channel_new)
594            .field("channel_destroy", &self.channel_destroy)
595            .finish()
596    }
597}
598
599#[repr(C)]
600#[allow(dead_code)]
601pub struct _SpiceSessionPrivate {
602    _data: [u8; 0],
603    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
604}
605
606pub type SpiceSessionPrivate = _SpiceSessionPrivate;
607
608#[derive(Copy, Clone)]
609#[repr(C)]
610pub struct SpiceSmartcardChannelClass {
611    pub parent_class: SpiceChannelClass,
612}
613
614impl ::std::fmt::Debug for SpiceSmartcardChannelClass {
615    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
616        f.debug_struct(&format!("SpiceSmartcardChannelClass @ {self:p}"))
617            .field("parent_class", &self.parent_class)
618            .finish()
619    }
620}
621
622#[repr(C)]
623#[allow(dead_code)]
624pub struct _SpiceSmartcardChannelPrivate {
625    _data: [u8; 0],
626    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
627}
628
629pub type SpiceSmartcardChannelPrivate = _SpiceSmartcardChannelPrivate;
630
631#[derive(Copy, Clone)]
632#[repr(C)]
633pub struct SpiceSmartcardManagerClass {
634    pub parent_class: gobject::GObjectClass,
635    pub reader_added:
636        Option<unsafe extern "C" fn(*mut SpiceSmartcardManager, *mut SpiceSmartcardReader)>,
637    pub reader_removed:
638        Option<unsafe extern "C" fn(*mut SpiceSmartcardManager, *mut SpiceSmartcardReader)>,
639    pub card_inserted:
640        Option<unsafe extern "C" fn(*mut SpiceSmartcardManager, *mut SpiceSmartcardReader)>,
641    pub card_removed:
642        Option<unsafe extern "C" fn(*mut SpiceSmartcardManager, *mut SpiceSmartcardReader)>,
643    pub _spice_reserved: [gpointer; 10],
644}
645
646impl ::std::fmt::Debug for SpiceSmartcardManagerClass {
647    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
648        f.debug_struct(&format!("SpiceSmartcardManagerClass @ {self:p}"))
649            .field("parent_class", &self.parent_class)
650            .field("reader_added", &self.reader_added)
651            .field("reader_removed", &self.reader_removed)
652            .field("card_inserted", &self.card_inserted)
653            .field("card_removed", &self.card_removed)
654            .finish()
655    }
656}
657
658#[repr(C)]
659#[allow(dead_code)]
660pub struct _SpiceSmartcardManagerPrivate {
661    _data: [u8; 0],
662    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
663}
664
665pub type SpiceSmartcardManagerPrivate = _SpiceSmartcardManagerPrivate;
666
667#[repr(C)]
668#[allow(dead_code)]
669pub struct _SpiceSmartcardReader {
670    _data: [u8; 0],
671    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
672}
673
674pub type SpiceSmartcardReader = _SpiceSmartcardReader;
675
676#[repr(C)]
677#[allow(dead_code)]
678pub struct _SpiceURIClass {
679    _data: [u8; 0],
680    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
681}
682
683pub type SpiceURIClass = _SpiceURIClass;
684
685#[repr(C)]
686#[allow(dead_code)]
687pub struct _SpiceURIPrivate {
688    _data: [u8; 0],
689    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
690}
691
692pub type SpiceURIPrivate = _SpiceURIPrivate;
693
694#[repr(C)]
695#[allow(dead_code)]
696pub struct SpiceUsbDevice {
697    _data: [u8; 0],
698    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
699}
700
701impl ::std::fmt::Debug for SpiceUsbDevice {
702    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
703        f.debug_struct(&format!("SpiceUsbDevice @ {self:p}"))
704            .finish()
705    }
706}
707
708#[derive(Copy, Clone)]
709#[repr(C)]
710pub struct SpiceUsbDeviceManagerClass {
711    pub parent_class: gobject::GObjectClass,
712    pub device_added: Option<unsafe extern "C" fn(*mut SpiceUsbDeviceManager, *mut SpiceUsbDevice)>,
713    pub device_removed:
714        Option<unsafe extern "C" fn(*mut SpiceUsbDeviceManager, *mut SpiceUsbDevice)>,
715    pub auto_connect_failed: Option<
716        unsafe extern "C" fn(*mut SpiceUsbDeviceManager, *mut SpiceUsbDevice, *mut glib::GError),
717    >,
718    pub device_error: Option<
719        unsafe extern "C" fn(*mut SpiceUsbDeviceManager, *mut SpiceUsbDevice, *mut glib::GError),
720    >,
721    pub _spice_reserved: [gpointer; 10],
722}
723
724impl ::std::fmt::Debug for SpiceUsbDeviceManagerClass {
725    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
726        f.debug_struct(&format!("SpiceUsbDeviceManagerClass @ {self:p}"))
727            .field("parent_class", &self.parent_class)
728            .field("device_added", &self.device_added)
729            .field("device_removed", &self.device_removed)
730            .field("auto_connect_failed", &self.auto_connect_failed)
731            .field("device_error", &self.device_error)
732            .finish()
733    }
734}
735
736#[repr(C)]
737#[allow(dead_code)]
738pub struct _SpiceUsbDeviceManagerPrivate {
739    _data: [u8; 0],
740    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
741}
742
743pub type SpiceUsbDeviceManagerPrivate = _SpiceUsbDeviceManagerPrivate;
744
745#[derive(Copy, Clone)]
746#[repr(C)]
747pub struct SpiceUsbredirChannelClass {
748    pub parent_class: SpiceChannelClass,
749}
750
751impl ::std::fmt::Debug for SpiceUsbredirChannelClass {
752    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
753        f.debug_struct(&format!("SpiceUsbredirChannelClass @ {self:p}"))
754            .field("parent_class", &self.parent_class)
755            .finish()
756    }
757}
758
759#[repr(C)]
760#[allow(dead_code)]
761pub struct _SpiceUsbredirChannelPrivate {
762    _data: [u8; 0],
763    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
764}
765
766pub type SpiceUsbredirChannelPrivate = _SpiceUsbredirChannelPrivate;
767
768#[derive(Copy, Clone)]
769#[repr(C)]
770pub struct SpiceWebdavChannelClass {
771    pub parent_class: SpicePortChannelClass,
772}
773
774impl ::std::fmt::Debug for SpiceWebdavChannelClass {
775    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
776        f.debug_struct(&format!("SpiceWebdavChannelClass @ {self:p}"))
777            .field("parent_class", &self.parent_class)
778            .finish()
779    }
780}
781
782#[repr(C)]
783#[allow(dead_code)]
784pub struct _SpiceWebdavChannelPrivate {
785    _data: [u8; 0],
786    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
787}
788
789pub type SpiceWebdavChannelPrivate = _SpiceWebdavChannelPrivate;
790
791// Classes
792#[derive(Copy, Clone)]
793#[repr(C)]
794pub struct SpiceAudio {
795    pub parent: gobject::GObject,
796    pub priv_: *mut SpiceAudioPrivate,
797}
798
799impl ::std::fmt::Debug for SpiceAudio {
800    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
801        f.debug_struct(&format!("SpiceAudio @ {self:p}"))
802            .field("parent", &self.parent)
803            .field("priv_", &self.priv_)
804            .finish()
805    }
806}
807
808#[derive(Copy, Clone)]
809#[repr(C)]
810pub struct SpiceChannel {
811    pub parent: gobject::GObject,
812    pub priv_: *mut SpiceChannelPrivate,
813}
814
815impl ::std::fmt::Debug for SpiceChannel {
816    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
817        f.debug_struct(&format!("SpiceChannel @ {self:p}"))
818            .field("parent", &self.parent)
819            .field("priv_", &self.priv_)
820            .finish()
821    }
822}
823
824#[derive(Copy, Clone)]
825#[repr(C)]
826pub struct SpiceCursorChannel {
827    pub parent: SpiceChannel,
828    pub priv_: *mut SpiceCursorChannelPrivate,
829}
830
831impl ::std::fmt::Debug for SpiceCursorChannel {
832    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
833        f.debug_struct(&format!("SpiceCursorChannel @ {self:p}"))
834            .field("parent", &self.parent)
835            .finish()
836    }
837}
838
839#[derive(Copy, Clone)]
840#[repr(C)]
841pub struct SpiceDisplayChannel {
842    pub parent: SpiceChannel,
843    pub priv_: *mut SpiceDisplayChannelPrivate,
844}
845
846impl ::std::fmt::Debug for SpiceDisplayChannel {
847    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
848        f.debug_struct(&format!("SpiceDisplayChannel @ {self:p}"))
849            .field("parent", &self.parent)
850            .finish()
851    }
852}
853
854#[repr(C)]
855#[allow(dead_code)]
856pub struct SpiceFileTransferTask {
857    _data: [u8; 0],
858    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
859}
860
861impl ::std::fmt::Debug for SpiceFileTransferTask {
862    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
863        f.debug_struct(&format!("SpiceFileTransferTask @ {self:p}"))
864            .finish()
865    }
866}
867
868#[derive(Copy, Clone)]
869#[repr(C)]
870pub struct SpiceInputsChannel {
871    pub parent: SpiceChannel,
872    pub priv_: *mut SpiceInputsChannelPrivate,
873}
874
875impl ::std::fmt::Debug for SpiceInputsChannel {
876    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
877        f.debug_struct(&format!("SpiceInputsChannel @ {self:p}"))
878            .field("parent", &self.parent)
879            .finish()
880    }
881}
882
883#[derive(Copy, Clone)]
884#[repr(C)]
885pub struct SpiceMainChannel {
886    pub parent: SpiceChannel,
887    pub priv_: *mut SpiceMainChannelPrivate,
888}
889
890impl ::std::fmt::Debug for SpiceMainChannel {
891    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
892        f.debug_struct(&format!("SpiceMainChannel @ {self:p}"))
893            .field("parent", &self.parent)
894            .finish()
895    }
896}
897
898#[derive(Copy, Clone)]
899#[repr(C)]
900pub struct SpicePlaybackChannel {
901    pub parent: SpiceChannel,
902    pub priv_: *mut SpicePlaybackChannelPrivate,
903}
904
905impl ::std::fmt::Debug for SpicePlaybackChannel {
906    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
907        f.debug_struct(&format!("SpicePlaybackChannel @ {self:p}"))
908            .field("parent", &self.parent)
909            .finish()
910    }
911}
912
913#[derive(Copy, Clone)]
914#[repr(C)]
915pub struct SpicePortChannel {
916    pub parent: SpiceChannel,
917    pub priv_: *mut SpicePortChannelPrivate,
918}
919
920impl ::std::fmt::Debug for SpicePortChannel {
921    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
922        f.debug_struct(&format!("SpicePortChannel @ {self:p}"))
923            .field("parent", &self.parent)
924            .finish()
925    }
926}
927
928#[repr(C)]
929#[allow(dead_code)]
930pub struct SpiceQmpPort {
931    _data: [u8; 0],
932    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
933}
934
935impl ::std::fmt::Debug for SpiceQmpPort {
936    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
937        f.debug_struct(&format!("SpiceQmpPort @ {self:p}")).finish()
938    }
939}
940
941#[derive(Copy, Clone)]
942#[repr(C)]
943pub struct SpiceRecordChannel {
944    pub parent: SpiceChannel,
945    pub priv_: *mut SpiceRecordChannelPrivate,
946}
947
948impl ::std::fmt::Debug for SpiceRecordChannel {
949    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
950        f.debug_struct(&format!("SpiceRecordChannel @ {self:p}"))
951            .field("parent", &self.parent)
952            .finish()
953    }
954}
955
956#[derive(Copy, Clone)]
957#[repr(C)]
958pub struct SpiceSession {
959    pub parent: gobject::GObject,
960    pub priv_: *mut SpiceSessionPrivate,
961}
962
963impl ::std::fmt::Debug for SpiceSession {
964    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
965        f.debug_struct(&format!("SpiceSession @ {self:p}"))
966            .field("parent", &self.parent)
967            .field("priv_", &self.priv_)
968            .finish()
969    }
970}
971
972#[derive(Copy, Clone)]
973#[repr(C)]
974pub struct SpiceSmartcardChannel {
975    pub parent: SpiceChannel,
976    pub priv_: *mut SpiceSmartcardChannelPrivate,
977}
978
979impl ::std::fmt::Debug for SpiceSmartcardChannel {
980    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
981        f.debug_struct(&format!("SpiceSmartcardChannel @ {self:p}"))
982            .field("parent", &self.parent)
983            .finish()
984    }
985}
986
987#[derive(Copy, Clone)]
988#[repr(C)]
989pub struct SpiceSmartcardManager {
990    pub parent: gobject::GObject,
991    pub priv_: *mut SpiceSmartcardManagerPrivate,
992}
993
994impl ::std::fmt::Debug for SpiceSmartcardManager {
995    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
996        f.debug_struct(&format!("SpiceSmartcardManager @ {self:p}"))
997            .field("parent", &self.parent)
998            .finish()
999    }
1000}
1001
1002#[repr(C)]
1003#[allow(dead_code)]
1004pub struct SpiceURI {
1005    _data: [u8; 0],
1006    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
1007}
1008
1009impl ::std::fmt::Debug for SpiceURI {
1010    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1011        f.debug_struct(&format!("SpiceURI @ {self:p}")).finish()
1012    }
1013}
1014
1015#[derive(Copy, Clone)]
1016#[repr(C)]
1017pub struct SpiceUsbDeviceManager {
1018    pub parent: gobject::GObject,
1019    pub priv_: *mut SpiceUsbDeviceManagerPrivate,
1020}
1021
1022impl ::std::fmt::Debug for SpiceUsbDeviceManager {
1023    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1024        f.debug_struct(&format!("SpiceUsbDeviceManager @ {self:p}"))
1025            .field("parent", &self.parent)
1026            .finish()
1027    }
1028}
1029
1030#[derive(Copy, Clone)]
1031#[repr(C)]
1032pub struct SpiceUsbredirChannel {
1033    pub parent: SpiceChannel,
1034    pub priv_: *mut SpiceUsbredirChannelPrivate,
1035}
1036
1037impl ::std::fmt::Debug for SpiceUsbredirChannel {
1038    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1039        f.debug_struct(&format!("SpiceUsbredirChannel @ {self:p}"))
1040            .field("parent", &self.parent)
1041            .finish()
1042    }
1043}
1044
1045#[derive(Copy, Clone)]
1046#[repr(C)]
1047pub struct SpiceWebdavChannel {
1048    pub parent: SpicePortChannel,
1049    pub priv_: *mut SpiceWebdavChannelPrivate,
1050}
1051
1052impl ::std::fmt::Debug for SpiceWebdavChannel {
1053    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1054        f.debug_struct(&format!("SpiceWebdavChannel @ {self:p}"))
1055            .field("parent", &self.parent)
1056            .finish()
1057    }
1058}
1059
1060extern "C" {
1061
1062    //=========================================================================
1063    // SpiceChannelEvent
1064    //=========================================================================
1065    pub fn spice_channel_event_get_type() -> GType;
1066
1067    //=========================================================================
1068    // SpiceSessionMigration
1069    //=========================================================================
1070    pub fn spice_session_migration_get_type() -> GType;
1071
1072    //=========================================================================
1073    // SpiceInputsLock
1074    //=========================================================================
1075    pub fn spice_inputs_lock_get_type() -> GType;
1076
1077    //=========================================================================
1078    // SpiceSessionVerify
1079    //=========================================================================
1080    pub fn spice_session_verify_get_type() -> GType;
1081
1082    //=========================================================================
1083    // SpiceCursorShape
1084    //=========================================================================
1085    pub fn spice_cursor_shape_get_type() -> GType;
1086
1087    //=========================================================================
1088    // SpiceGlScanout
1089    //=========================================================================
1090    pub fn spice_gl_scanout_get_type() -> GType;
1091    pub fn spice_gl_scanout_free(scanout: *mut SpiceGlScanout);
1092
1093    //=========================================================================
1094    // SpiceQmpStatus
1095    //=========================================================================
1096    pub fn spice_qmp_status_get_type() -> GType;
1097    pub fn spice_qmp_status_ref(status: *mut SpiceQmpStatus) -> *mut SpiceQmpStatus;
1098    pub fn spice_qmp_status_unref(status: *mut SpiceQmpStatus);
1099
1100    //=========================================================================
1101    // SpiceSmartcardReader
1102    //=========================================================================
1103    pub fn spice_smartcard_reader_insert_card(reader: *mut SpiceSmartcardReader) -> gboolean;
1104    pub fn spice_smartcard_reader_is_software(reader: *mut SpiceSmartcardReader) -> gboolean;
1105    pub fn spice_smartcard_reader_remove_card(reader: *mut SpiceSmartcardReader) -> gboolean;
1106
1107    //=========================================================================
1108    // SpiceUsbDevice
1109    //=========================================================================
1110    pub fn spice_usb_device_get_type() -> GType;
1111    pub fn spice_usb_device_get_description(
1112        device: *mut SpiceUsbDevice,
1113        format: *const c_char,
1114    ) -> *mut c_char;
1115    pub fn spice_usb_device_get_libusb_device(device: *const SpiceUsbDevice) -> gconstpointer;
1116
1117    //=========================================================================
1118    // SpiceAudio
1119    //=========================================================================
1120    pub fn spice_audio_get_type() -> GType;
1121    pub fn spice_audio_new(
1122        session: *mut SpiceSession,
1123        context: *mut glib::GMainContext,
1124        name: *const c_char,
1125    ) -> *mut SpiceAudio;
1126    pub fn spice_audio_get(
1127        session: *mut SpiceSession,
1128        context: *mut glib::GMainContext,
1129    ) -> *mut SpiceAudio;
1130
1131    //=========================================================================
1132    // SpiceChannel
1133    //=========================================================================
1134    pub fn spice_channel_get_type() -> GType;
1135    pub fn spice_channel_new(s: *mut SpiceSession, type_: c_int, id: c_int) -> *mut SpiceChannel;
1136    pub fn spice_channel_string_to_type(str: *const c_char) -> c_int;
1137    pub fn spice_channel_type_to_string(type_: c_int) -> *const c_char;
1138    pub fn spice_channel_connect(channel: *mut SpiceChannel) -> gboolean;
1139    pub fn spice_channel_destroy(channel: *mut SpiceChannel);
1140    pub fn spice_channel_disconnect(channel: *mut SpiceChannel, reason: SpiceChannelEvent);
1141    pub fn spice_channel_flush_async(
1142        channel: *mut SpiceChannel,
1143        cancellable: *mut gio::GCancellable,
1144        callback: gio::GAsyncReadyCallback,
1145        user_data: gpointer,
1146    );
1147    pub fn spice_channel_flush_finish(
1148        channel: *mut SpiceChannel,
1149        result: *mut gio::GAsyncResult,
1150        error: *mut *mut glib::GError,
1151    ) -> gboolean;
1152    pub fn spice_channel_get_error(channel: *mut SpiceChannel) -> *const glib::GError;
1153    pub fn spice_channel_open_fd(channel: *mut SpiceChannel, fd: c_int) -> gboolean;
1154    pub fn spice_channel_set_capability(channel: *mut SpiceChannel, cap: u32);
1155    pub fn spice_channel_test_capability(channel: *mut SpiceChannel, cap: u32) -> gboolean;
1156    pub fn spice_channel_test_common_capability(channel: *mut SpiceChannel, cap: u32) -> gboolean;
1157
1158    //=========================================================================
1159    // SpiceCursorChannel
1160    //=========================================================================
1161    pub fn spice_cursor_channel_get_type() -> GType;
1162
1163    //=========================================================================
1164    // SpiceDisplayChannel
1165    //=========================================================================
1166    pub fn spice_display_channel_get_type() -> GType;
1167    pub fn spice_display_change_preferred_compression(
1168        channel: *mut SpiceDisplayChannel,
1169        compression: c_int,
1170    );
1171    pub fn spice_display_change_preferred_video_codec_type(
1172        channel: *mut SpiceDisplayChannel,
1173        codec_type: c_int,
1174    );
1175    pub fn spice_display_channel_change_preferred_compression(
1176        channel: *mut SpiceDisplayChannel,
1177        compression: c_int,
1178    );
1179    pub fn spice_display_channel_change_preferred_video_codec_type(
1180        channel: *mut SpiceDisplayChannel,
1181        codec_type: c_int,
1182    );
1183    pub fn spice_display_channel_change_preferred_video_codec_types(
1184        channel: *mut SpiceDisplayChannel,
1185        codecs: *const c_int,
1186        ncodecs: size_t,
1187        error: *mut *mut glib::GError,
1188    ) -> gboolean;
1189    pub fn spice_display_channel_get_primary(
1190        channel: *mut SpiceDisplayChannel,
1191        surface_id: u32,
1192        primary: *mut SpiceDisplayPrimary,
1193    ) -> gboolean;
1194    pub fn spice_display_get_primary(
1195        channel: *mut SpiceDisplayChannel,
1196        surface_id: u32,
1197        primary: *mut SpiceDisplayPrimary,
1198    ) -> gboolean;
1199    pub fn spice_display_channel_get_gl_scanout(
1200        channel: *mut SpiceDisplayChannel,
1201    ) -> *const SpiceGlScanout;
1202    pub fn spice_display_channel_gl_draw_done(channel: *mut SpiceDisplayChannel);
1203
1204    //=========================================================================
1205    // SpiceFileTransferTask
1206    //=========================================================================
1207    pub fn spice_file_transfer_task_get_type() -> GType;
1208    pub fn spice_file_transfer_task_cancel(self_: *mut SpiceFileTransferTask);
1209    pub fn spice_file_transfer_task_get_filename(self_: *mut SpiceFileTransferTask) -> *mut c_char;
1210    pub fn spice_file_transfer_task_get_progress(self_: *mut SpiceFileTransferTask) -> c_double;
1211    pub fn spice_file_transfer_task_get_total_bytes(self_: *mut SpiceFileTransferTask) -> u64;
1212    pub fn spice_file_transfer_task_get_transferred_bytes(self_: *mut SpiceFileTransferTask)
1213        -> u64;
1214
1215    //=========================================================================
1216    // SpiceInputsChannel
1217    //=========================================================================
1218    pub fn spice_inputs_channel_get_type() -> GType;
1219    pub fn spice_inputs_channel_button_press(
1220        channel: *mut SpiceInputsChannel,
1221        button: c_int,
1222        button_state: c_int,
1223    );
1224    pub fn spice_inputs_channel_button_release(
1225        channel: *mut SpiceInputsChannel,
1226        button: c_int,
1227        button_state: c_int,
1228    );
1229    pub fn spice_inputs_channel_key_press(channel: *mut SpiceInputsChannel, scancode: c_uint);
1230    pub fn spice_inputs_channel_key_press_and_release(
1231        channel: *mut SpiceInputsChannel,
1232        scancode: c_uint,
1233    );
1234    pub fn spice_inputs_channel_key_release(channel: *mut SpiceInputsChannel, scancode: c_uint);
1235    pub fn spice_inputs_channel_motion(
1236        channel: *mut SpiceInputsChannel,
1237        dx: c_int,
1238        dy: c_int,
1239        button_state: c_int,
1240    );
1241    pub fn spice_inputs_channel_position(
1242        channel: *mut SpiceInputsChannel,
1243        x: c_int,
1244        y: c_int,
1245        display: c_int,
1246        button_state: c_int,
1247    );
1248    pub fn spice_inputs_channel_set_key_locks(channel: *mut SpiceInputsChannel, locks: c_uint);
1249
1250    //=========================================================================
1251    // SpiceMainChannel
1252    //=========================================================================
1253    pub fn spice_main_channel_get_type() -> GType;
1254    pub fn spice_main_channel_agent_test_capability(
1255        channel: *mut SpiceMainChannel,
1256        cap: u32,
1257    ) -> gboolean;
1258    pub fn spice_main_channel_clipboard_selection_grab(
1259        channel: *mut SpiceMainChannel,
1260        selection: c_uint,
1261        types: *mut u32,
1262        ntypes: c_int,
1263    );
1264    pub fn spice_main_channel_clipboard_selection_notify(
1265        channel: *mut SpiceMainChannel,
1266        selection: c_uint,
1267        type_: u32,
1268        data: *const u8,
1269        size: size_t,
1270    );
1271    pub fn spice_main_channel_clipboard_selection_release(
1272        channel: *mut SpiceMainChannel,
1273        selection: c_uint,
1274    );
1275    pub fn spice_main_channel_clipboard_selection_request(
1276        channel: *mut SpiceMainChannel,
1277        selection: c_uint,
1278        type_: u32,
1279    );
1280    pub fn spice_main_channel_file_copy_async(
1281        channel: *mut SpiceMainChannel,
1282        sources: *mut *mut gio::GFile,
1283        flags: gio::GFileCopyFlags,
1284        cancellable: *mut gio::GCancellable,
1285        progress_callback: gio::GFileProgressCallback,
1286        progress_callback_data: gpointer,
1287        callback: gio::GAsyncReadyCallback,
1288        user_data: gpointer,
1289    );
1290    pub fn spice_main_channel_file_copy_finish(
1291        channel: *mut SpiceMainChannel,
1292        result: *mut gio::GAsyncResult,
1293        error: *mut *mut glib::GError,
1294    ) -> gboolean;
1295    pub fn spice_main_channel_request_mouse_mode(channel: *mut SpiceMainChannel, mode: c_int);
1296    pub fn spice_main_channel_send_monitor_config(channel: *mut SpiceMainChannel) -> gboolean;
1297    pub fn spice_main_channel_update_display(
1298        channel: *mut SpiceMainChannel,
1299        id: c_int,
1300        x: c_int,
1301        y: c_int,
1302        width: c_int,
1303        height: c_int,
1304        update: gboolean,
1305    );
1306    pub fn spice_main_channel_update_display_enabled(
1307        channel: *mut SpiceMainChannel,
1308        id: c_int,
1309        enabled: gboolean,
1310        update: gboolean,
1311    );
1312    pub fn spice_main_channel_update_display_mm(
1313        channel: *mut SpiceMainChannel,
1314        id: c_int,
1315        width_mm: c_int,
1316        height_mm: c_int,
1317        update: gboolean,
1318    );
1319
1320    //=========================================================================
1321    // SpicePlaybackChannel
1322    //=========================================================================
1323    pub fn spice_playback_channel_get_type() -> GType;
1324    pub fn spice_playback_channel_set_delay(channel: *mut SpicePlaybackChannel, delay_ms: u32);
1325
1326    //=========================================================================
1327    // SpicePortChannel
1328    //=========================================================================
1329    pub fn spice_port_channel_get_type() -> GType;
1330    pub fn spice_port_channel_event(port: *mut SpicePortChannel, event: u8);
1331    pub fn spice_port_channel_write_async(
1332        port: *mut SpicePortChannel,
1333        buffer: *mut u8,
1334        count: size_t,
1335        cancellable: *mut gio::GCancellable,
1336        callback: gio::GAsyncReadyCallback,
1337        user_data: gpointer,
1338    );
1339    pub fn spice_port_channel_write_finish(
1340        port: *mut SpicePortChannel,
1341        result: *mut gio::GAsyncResult,
1342        error: *mut *mut glib::GError,
1343    ) -> ssize_t;
1344
1345    //=========================================================================
1346    // SpiceQmpPort
1347    //=========================================================================
1348    pub fn spice_qmp_port_get_type() -> GType;
1349    pub fn spice_qmp_port_get(channel: *mut SpicePortChannel) -> *mut SpiceQmpPort;
1350    pub fn spice_qmp_port_query_status_async(
1351        self_: *mut SpiceQmpPort,
1352        cancellable: *mut gio::GCancellable,
1353        callback: gio::GAsyncReadyCallback,
1354        user_data: gpointer,
1355    );
1356    pub fn spice_qmp_port_query_status_finish(
1357        self_: *mut SpiceQmpPort,
1358        result: *mut gio::GAsyncResult,
1359        error: *mut *mut glib::GError,
1360    ) -> *mut SpiceQmpStatus;
1361    pub fn spice_qmp_port_vm_action_async(
1362        self_: *mut SpiceQmpPort,
1363        action: SpiceQmpPortVmAction,
1364        cancellable: *mut gio::GCancellable,
1365        callback: gio::GAsyncReadyCallback,
1366        user_data: gpointer,
1367    );
1368    pub fn spice_qmp_port_vm_action_finish(
1369        self_: *mut SpiceQmpPort,
1370        result: *mut gio::GAsyncResult,
1371        error: *mut *mut glib::GError,
1372    ) -> gboolean;
1373
1374    //=========================================================================
1375    // SpiceRecordChannel
1376    //=========================================================================
1377    pub fn spice_record_channel_get_type() -> GType;
1378    pub fn spice_record_channel_send_data(
1379        channel: *mut SpiceRecordChannel,
1380        data: gpointer,
1381        bytes: size_t,
1382        time: u32,
1383    );
1384
1385    //=========================================================================
1386    // SpiceSession
1387    //=========================================================================
1388    pub fn spice_session_get_type() -> GType;
1389    pub fn spice_session_new() -> *mut SpiceSession;
1390    pub fn spice_session_connect(session: *mut SpiceSession) -> gboolean;
1391    pub fn spice_session_disconnect(session: *mut SpiceSession);
1392    pub fn spice_session_get_channels(session: *mut SpiceSession) -> *mut glib::GList;
1393    pub fn spice_session_get_proxy_uri(session: *mut SpiceSession) -> *mut SpiceURI;
1394    pub fn spice_session_get_read_only(session: *mut SpiceSession) -> gboolean;
1395    pub fn spice_session_has_channel_type(session: *mut SpiceSession, type_: c_int) -> gboolean;
1396    pub fn spice_session_is_for_migration(session: *mut SpiceSession) -> gboolean;
1397    pub fn spice_session_open_fd(session: *mut SpiceSession, fd: c_int) -> gboolean;
1398
1399    //=========================================================================
1400    // SpiceSmartcardChannel
1401    //=========================================================================
1402    pub fn spice_smartcard_channel_get_type() -> GType;
1403
1404    //=========================================================================
1405    // SpiceSmartcardManager
1406    //=========================================================================
1407    pub fn spice_smartcard_manager_get_type() -> GType;
1408    pub fn spice_smartcard_manager_get() -> *mut SpiceSmartcardManager;
1409    pub fn spice_smartcard_manager_get_readers(
1410        manager: *mut SpiceSmartcardManager,
1411    ) -> *mut glib::GList;
1412    pub fn spice_smartcard_manager_insert_card(manager: *mut SpiceSmartcardManager) -> gboolean;
1413    pub fn spice_smartcard_manager_remove_card(manager: *mut SpiceSmartcardManager) -> gboolean;
1414
1415    //=========================================================================
1416    // SpiceURI
1417    //=========================================================================
1418    pub fn spice_uri_get_type() -> GType;
1419    pub fn spice_uri_get_hostname(uri: *mut SpiceURI) -> *const c_char;
1420    pub fn spice_uri_get_password(uri: *mut SpiceURI) -> *const c_char;
1421    pub fn spice_uri_get_port(uri: *mut SpiceURI) -> c_uint;
1422    pub fn spice_uri_get_scheme(uri: *mut SpiceURI) -> *const c_char;
1423    pub fn spice_uri_get_user(uri: *mut SpiceURI) -> *const c_char;
1424    pub fn spice_uri_set_hostname(uri: *mut SpiceURI, hostname: *const c_char);
1425    pub fn spice_uri_set_password(uri: *mut SpiceURI, password: *const c_char);
1426    pub fn spice_uri_set_port(uri: *mut SpiceURI, port: c_uint);
1427    pub fn spice_uri_set_scheme(uri: *mut SpiceURI, scheme: *const c_char);
1428    pub fn spice_uri_set_user(uri: *mut SpiceURI, user: *const c_char);
1429    pub fn spice_uri_to_string(uri: *mut SpiceURI) -> *mut c_char;
1430
1431    //=========================================================================
1432    // SpiceUsbDeviceManager
1433    //=========================================================================
1434    pub fn spice_usb_device_manager_get_type() -> GType;
1435    pub fn spice_usb_device_manager_get(
1436        session: *mut SpiceSession,
1437        error: *mut *mut glib::GError,
1438    ) -> *mut SpiceUsbDeviceManager;
1439    pub fn spice_usb_device_manager_can_redirect_device(
1440        manager: *mut SpiceUsbDeviceManager,
1441        device: *mut SpiceUsbDevice,
1442        error: *mut *mut glib::GError,
1443    ) -> gboolean;
1444    pub fn spice_usb_device_manager_connect_device_async(
1445        manager: *mut SpiceUsbDeviceManager,
1446        device: *mut SpiceUsbDevice,
1447        cancellable: *mut gio::GCancellable,
1448        callback: gio::GAsyncReadyCallback,
1449        user_data: gpointer,
1450    );
1451    pub fn spice_usb_device_manager_connect_device_finish(
1452        manager: *mut SpiceUsbDeviceManager,
1453        res: *mut gio::GAsyncResult,
1454        error: *mut *mut glib::GError,
1455    ) -> gboolean;
1456    pub fn spice_usb_device_manager_create_shared_cd_device(
1457        manager: *mut SpiceUsbDeviceManager,
1458        filename: *mut c_char,
1459        error: *mut *mut glib::GError,
1460    ) -> gboolean;
1461    pub fn spice_usb_device_manager_disconnect_device(
1462        manager: *mut SpiceUsbDeviceManager,
1463        device: *mut SpiceUsbDevice,
1464    );
1465    pub fn spice_usb_device_manager_disconnect_device_async(
1466        manager: *mut SpiceUsbDeviceManager,
1467        device: *mut SpiceUsbDevice,
1468        cancellable: *mut gio::GCancellable,
1469        callback: gio::GAsyncReadyCallback,
1470        user_data: gpointer,
1471    );
1472    pub fn spice_usb_device_manager_disconnect_device_finish(
1473        manager: *mut SpiceUsbDeviceManager,
1474        res: *mut gio::GAsyncResult,
1475        error: *mut *mut glib::GError,
1476    ) -> gboolean;
1477    pub fn spice_usb_device_manager_get_devices(
1478        manager: *mut SpiceUsbDeviceManager,
1479    ) -> *mut glib::GPtrArray;
1480    pub fn spice_usb_device_manager_get_devices_with_filter(
1481        manager: *mut SpiceUsbDeviceManager,
1482        filter: *const c_char,
1483    ) -> *mut glib::GPtrArray;
1484    pub fn spice_usb_device_manager_is_device_connected(
1485        manager: *mut SpiceUsbDeviceManager,
1486        device: *mut SpiceUsbDevice,
1487    ) -> gboolean;
1488    pub fn spice_usb_device_manager_is_device_shared_cd(
1489        manager: *mut SpiceUsbDeviceManager,
1490        device: *mut SpiceUsbDevice,
1491    ) -> gboolean;
1492    pub fn spice_usb_device_manager_is_redirecting(manager: *mut SpiceUsbDeviceManager)
1493        -> gboolean;
1494
1495    //=========================================================================
1496    // SpiceUsbredirChannel
1497    //=========================================================================
1498    pub fn spice_usbredir_channel_get_type() -> GType;
1499
1500    //=========================================================================
1501    // SpiceWebdavChannel
1502    //=========================================================================
1503    pub fn spice_webdav_channel_get_type() -> GType;
1504
1505    //=========================================================================
1506    // Other functions
1507    //=========================================================================
1508    pub fn spice_client_error_quark() -> glib::GQuark;
1509    pub fn spice_display_get_gl_scanout(channel: *mut SpiceDisplayChannel)
1510        -> *const SpiceGlScanout;
1511    pub fn spice_display_gl_draw_done(channel: *mut SpiceDisplayChannel);
1512    pub fn spice_g_signal_connect_object(
1513        instance: gpointer,
1514        detailed_signal: *const c_char,
1515        c_handler: gobject::GCallback,
1516        gobject: gpointer,
1517        connect_flags: gobject::GConnectFlags,
1518    ) -> c_ulong;
1519    pub fn spice_get_option_group() -> *mut glib::GOptionGroup;
1520    pub fn spice_inputs_button_press(
1521        channel: *mut SpiceInputsChannel,
1522        button: c_int,
1523        button_state: c_int,
1524    );
1525    pub fn spice_inputs_button_release(
1526        channel: *mut SpiceInputsChannel,
1527        button: c_int,
1528        button_state: c_int,
1529    );
1530    pub fn spice_inputs_key_press(channel: *mut SpiceInputsChannel, scancode: c_uint);
1531    pub fn spice_inputs_key_press_and_release(channel: *mut SpiceInputsChannel, scancode: c_uint);
1532    pub fn spice_inputs_key_release(channel: *mut SpiceInputsChannel, scancode: c_uint);
1533    pub fn spice_inputs_motion(
1534        channel: *mut SpiceInputsChannel,
1535        dx: c_int,
1536        dy: c_int,
1537        button_state: c_int,
1538    );
1539    pub fn spice_inputs_position(
1540        channel: *mut SpiceInputsChannel,
1541        x: c_int,
1542        y: c_int,
1543        display: c_int,
1544        button_state: c_int,
1545    );
1546    pub fn spice_inputs_set_key_locks(channel: *mut SpiceInputsChannel, locks: c_uint);
1547    pub fn spice_main_agent_test_capability(channel: *mut SpiceMainChannel, cap: u32) -> gboolean;
1548    pub fn spice_main_clipboard_grab(
1549        channel: *mut SpiceMainChannel,
1550        types: *mut u32,
1551        ntypes: c_int,
1552    );
1553    pub fn spice_main_clipboard_notify(
1554        channel: *mut SpiceMainChannel,
1555        type_: u32,
1556        data: *const u8,
1557        size: size_t,
1558    );
1559    pub fn spice_main_clipboard_release(channel: *mut SpiceMainChannel);
1560    pub fn spice_main_clipboard_request(channel: *mut SpiceMainChannel, type_: u32);
1561    pub fn spice_main_clipboard_selection_grab(
1562        channel: *mut SpiceMainChannel,
1563        selection: c_uint,
1564        types: *mut u32,
1565        ntypes: c_int,
1566    );
1567    pub fn spice_main_clipboard_selection_notify(
1568        channel: *mut SpiceMainChannel,
1569        selection: c_uint,
1570        type_: u32,
1571        data: *const u8,
1572        size: size_t,
1573    );
1574    pub fn spice_main_clipboard_selection_release(
1575        channel: *mut SpiceMainChannel,
1576        selection: c_uint,
1577    );
1578    pub fn spice_main_clipboard_selection_request(
1579        channel: *mut SpiceMainChannel,
1580        selection: c_uint,
1581        type_: u32,
1582    );
1583    pub fn spice_main_file_copy_async(
1584        channel: *mut SpiceMainChannel,
1585        sources: *mut *mut gio::GFile,
1586        flags: gio::GFileCopyFlags,
1587        cancellable: *mut gio::GCancellable,
1588        progress_callback: gio::GFileProgressCallback,
1589        progress_callback_data: gpointer,
1590        callback: gio::GAsyncReadyCallback,
1591        user_data: gpointer,
1592    );
1593    pub fn spice_main_file_copy_finish(
1594        channel: *mut SpiceMainChannel,
1595        result: *mut gio::GAsyncResult,
1596        error: *mut *mut glib::GError,
1597    ) -> gboolean;
1598    pub fn spice_main_request_mouse_mode(channel: *mut SpiceMainChannel, mode: c_int);
1599    pub fn spice_main_send_monitor_config(channel: *mut SpiceMainChannel) -> gboolean;
1600    pub fn spice_main_set_display(
1601        channel: *mut SpiceMainChannel,
1602        id: c_int,
1603        x: c_int,
1604        y: c_int,
1605        width: c_int,
1606        height: c_int,
1607    );
1608    pub fn spice_main_set_display_enabled(
1609        channel: *mut SpiceMainChannel,
1610        id: c_int,
1611        enabled: gboolean,
1612    );
1613    pub fn spice_main_update_display(
1614        channel: *mut SpiceMainChannel,
1615        id: c_int,
1616        x: c_int,
1617        y: c_int,
1618        width: c_int,
1619        height: c_int,
1620        update: gboolean,
1621    );
1622    pub fn spice_main_update_display_enabled(
1623        channel: *mut SpiceMainChannel,
1624        id: c_int,
1625        enabled: gboolean,
1626        update: gboolean,
1627    );
1628    pub fn spice_port_event(port: *mut SpicePortChannel, event: u8);
1629    pub fn spice_port_write_async(
1630        port: *mut SpicePortChannel,
1631        buffer: *mut u8,
1632        count: size_t,
1633        cancellable: *mut gio::GCancellable,
1634        callback: gio::GAsyncReadyCallback,
1635        user_data: gpointer,
1636    );
1637    pub fn spice_port_write_finish(
1638        port: *mut SpicePortChannel,
1639        result: *mut gio::GAsyncResult,
1640        error: *mut *mut glib::GError,
1641    ) -> ssize_t;
1642    pub fn spice_record_send_data(
1643        channel: *mut SpiceRecordChannel,
1644        data: gpointer,
1645        bytes: size_t,
1646        time: u32,
1647    );
1648    pub fn spice_set_session_option(session: *mut SpiceSession);
1649    pub fn spice_util_get_debug() -> gboolean;
1650    pub fn spice_util_get_version_string() -> *const c_char;
1651    pub fn spice_util_set_debug(enabled: gboolean);
1652    pub fn spice_uuid_to_string(uuid: *const [u8; 16]) -> *mut c_char;
1653
1654}