blob: 1f22d557ea2fb9b82a4c8dd677d9fead2e22798d [file] [log] [blame]
Gerd Hoffmann2e31e212020-10-19 09:52:11 +02001/*
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 Hoffmann05b53632020-10-19 09:52:15 +020021#ifdef CONFIG_SPICE
22#include <spice.h>
23#endif
24
Gerd Hoffmanndb5732c2020-10-19 09:52:18 +020025typedef struct SpiceInfo SpiceInfo;
26
Gerd Hoffmann74774772020-10-19 09:52:12 +020027struct QemuSpiceOps {
Gerd Hoffmann63be30e2020-10-19 09:52:13 +020028 void (*init)(void);
Gerd Hoffmannb192cd12020-10-19 09:52:14 +020029 void (*display_init)(void);
Gerd Hoffmann74774772020-10-19 09:52:12 +020030 int (*migrate_info)(const char *h, int p, int t, const char *s);
Gerd Hoffmann08ad2622020-10-19 09:52:16 +020031 int (*set_passwd)(const char *passwd,
32 bool fail_if_connected, bool disconnect_if_connected);
33 int (*set_pw_expire)(time_t expires);
Gerd Hoffmann864a0242020-10-19 09:52:17 +020034 int (*display_add_client)(int csock, int skipauth, int tls);
Gerd Hoffmann05b53632020-10-19 09:52:15 +020035#ifdef CONFIG_SPICE
36 int (*add_interface)(SpiceBaseInstance *sin);
Gerd Hoffmanndb5732c2020-10-19 09:52:18 +020037 SpiceInfo* (*qmp_query)(Error **errp);
Gerd Hoffmann05b53632020-10-19 09:52:15 +020038#endif
Gerd Hoffmann74774772020-10-19 09:52:12 +020039};
40
Gerd Hoffmann2e31e212020-10-19 09:52:11 +020041extern int using_spice;
Gerd Hoffmann74774772020-10-19 09:52:12 +020042extern struct QemuSpiceOps qemu_spice;
Gerd Hoffmann2e31e212020-10-19 09:52:11 +020043
44#endif