xref: /openbmc/qemu/include/chardev/spice.h (revision 99d423e5)
1 #ifndef CHARDEV_SPICE_H
2 #define CHARDEV_SPICE_H
3 
4 #include <spice.h>
5 #include "chardev/char-fe.h"
6 
7 typedef struct SpiceChardev {
8     Chardev               parent;
9 
10     SpiceCharDeviceInstance sin;
11     bool                  active;
12     bool                  blocked;
13     const uint8_t         *datapos;
14     int                   datalen;
15     QLIST_ENTRY(SpiceChardev) next;
16 } SpiceChardev;
17 
18 #define TYPE_CHARDEV_SPICE "chardev-spice"
19 #define TYPE_CHARDEV_SPICEVMC "chardev-spicevmc"
20 #define TYPE_CHARDEV_SPICEPORT "chardev-spiceport"
21 
22 #define SPICE_CHARDEV(obj) OBJECT_CHECK(SpiceChardev, (obj), TYPE_CHARDEV_SPICE)
23 
24 void qemu_chr_open_spice_port(Chardev *chr, ChardevBackend *backend,
25                               bool *be_opened, Error **errp);
26 
27 #endif
28