Gerd Hoffmann | 2e31e21 | 2020-10-19 09:52:11 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 Red Hat, Inc. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation; either version 2 or |
| 7 | * (at your option) version 3 of the License. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #ifndef QEMU_SPICE_MODULE_H |
| 19 | #define QEMU_SPICE_MODULE_H |
| 20 | |
Gerd Hoffmann | 05b5363 | 2020-10-19 09:52:15 +0200 | [diff] [blame] | 21 | #ifdef CONFIG_SPICE |
| 22 | #include <spice.h> |
| 23 | #endif |
| 24 | |
Gerd Hoffmann | db5732c | 2020-10-19 09:52:18 +0200 | [diff] [blame] | 25 | typedef struct SpiceInfo SpiceInfo; |
| 26 | |
Gerd Hoffmann | 7477477 | 2020-10-19 09:52:12 +0200 | [diff] [blame] | 27 | struct QemuSpiceOps { |
Gerd Hoffmann | 63be30e | 2020-10-19 09:52:13 +0200 | [diff] [blame] | 28 | void (*init)(void); |
Gerd Hoffmann | b192cd1 | 2020-10-19 09:52:14 +0200 | [diff] [blame] | 29 | void (*display_init)(void); |
Gerd Hoffmann | 7477477 | 2020-10-19 09:52:12 +0200 | [diff] [blame] | 30 | int (*migrate_info)(const char *h, int p, int t, const char *s); |
Gerd Hoffmann | 08ad262 | 2020-10-19 09:52:16 +0200 | [diff] [blame] | 31 | int (*set_passwd)(const char *passwd, |
| 32 | bool fail_if_connected, bool disconnect_if_connected); |
| 33 | int (*set_pw_expire)(time_t expires); |
Gerd Hoffmann | 864a024 | 2020-10-19 09:52:17 +0200 | [diff] [blame] | 34 | int (*display_add_client)(int csock, int skipauth, int tls); |
Gerd Hoffmann | 05b5363 | 2020-10-19 09:52:15 +0200 | [diff] [blame] | 35 | #ifdef CONFIG_SPICE |
| 36 | int (*add_interface)(SpiceBaseInstance *sin); |
Gerd Hoffmann | db5732c | 2020-10-19 09:52:18 +0200 | [diff] [blame] | 37 | SpiceInfo* (*qmp_query)(Error **errp); |
Gerd Hoffmann | 05b5363 | 2020-10-19 09:52:15 +0200 | [diff] [blame] | 38 | #endif |
Gerd Hoffmann | 7477477 | 2020-10-19 09:52:12 +0200 | [diff] [blame] | 39 | }; |
| 40 | |
Gerd Hoffmann | 2e31e21 | 2020-10-19 09:52:11 +0200 | [diff] [blame] | 41 | extern int using_spice; |
Gerd Hoffmann | 7477477 | 2020-10-19 09:52:12 +0200 | [diff] [blame] | 42 | extern struct QemuSpiceOps qemu_spice; |
Gerd Hoffmann | 2e31e21 | 2020-10-19 09:52:11 +0200 | [diff] [blame] | 43 | |
| 44 | #endif |