Statistics
| Branch: | Revision:

root / ui / qemu-spice.h @ d4970b07

History | View | Annotate | Download (2 kB)

1 29b0040b Gerd Hoffmann
/*
2 29b0040b Gerd Hoffmann
 * Copyright (C) 2010 Red Hat, Inc.
3 29b0040b Gerd Hoffmann
 *
4 29b0040b Gerd Hoffmann
 * This program is free software; you can redistribute it and/or
5 29b0040b Gerd Hoffmann
 * modify it under the terms of the GNU General Public License as
6 29b0040b Gerd Hoffmann
 * published by the Free Software Foundation; either version 2 or
7 29b0040b Gerd Hoffmann
 * (at your option) version 3 of the License.
8 29b0040b Gerd Hoffmann
 *
9 29b0040b Gerd Hoffmann
 * This program is distributed in the hope that it will be useful,
10 29b0040b Gerd Hoffmann
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 29b0040b Gerd Hoffmann
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 29b0040b Gerd Hoffmann
 * GNU General Public License for more details.
13 29b0040b Gerd Hoffmann
 *
14 29b0040b Gerd Hoffmann
 * You should have received a copy of the GNU General Public License
15 29b0040b Gerd Hoffmann
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 29b0040b Gerd Hoffmann
 */
17 29b0040b Gerd Hoffmann
18 29b0040b Gerd Hoffmann
#ifndef QEMU_SPICE_H
19 29b0040b Gerd Hoffmann
#define QEMU_SPICE_H
20 29b0040b Gerd Hoffmann
21 29b0040b Gerd Hoffmann
#ifdef CONFIG_SPICE
22 29b0040b Gerd Hoffmann
23 29b0040b Gerd Hoffmann
#include <spice.h>
24 29b0040b Gerd Hoffmann
25 29b0040b Gerd Hoffmann
#include "qemu-option.h"
26 29b0040b Gerd Hoffmann
#include "qemu-config.h"
27 cbcc6336 Alon Levy
#include "qemu-char.h"
28 29b0040b Gerd Hoffmann
29 29b0040b Gerd Hoffmann
extern int using_spice;
30 29b0040b Gerd Hoffmann
31 29b0040b Gerd Hoffmann
void qemu_spice_init(void);
32 864401c2 Gerd Hoffmann
void qemu_spice_input_init(void);
33 3e313753 Gerd Hoffmann
void qemu_spice_audio_init(void);
34 a3e22260 Gerd Hoffmann
void qemu_spice_display_init(DisplayState *ds);
35 29b0040b Gerd Hoffmann
int qemu_spice_add_interface(SpiceBaseInstance *sin);
36 7572150c Gerd Hoffmann
int qemu_spice_set_passwd(const char *passwd,
37 7572150c Gerd Hoffmann
                          bool fail_if_connected, bool disconnect_if_connected);
38 7572150c Gerd Hoffmann
int qemu_spice_set_pw_expire(time_t expires);
39 e866e239 Gerd Hoffmann
int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
40 e866e239 Gerd Hoffmann
                            const char *subject);
41 29b0040b Gerd Hoffmann
42 cb42a870 Gerd Hoffmann
void do_info_spice_print(Monitor *mon, const QObject *data);
43 cb42a870 Gerd Hoffmann
void do_info_spice(Monitor *mon, QObject **ret_data);
44 cb42a870 Gerd Hoffmann
45 cbcc6336 Alon Levy
CharDriverState *qemu_chr_open_spice(QemuOpts *opts);
46 cbcc6336 Alon Levy
47 29b0040b Gerd Hoffmann
#else  /* CONFIG_SPICE */
48 29b0040b Gerd Hoffmann
49 29b0040b Gerd Hoffmann
#define using_spice 0
50 14da8345 Jes Sorensen
static inline int qemu_spice_set_passwd(const char *passwd,
51 14da8345 Jes Sorensen
                                        bool fail_if_connected,
52 14da8345 Jes Sorensen
                                        bool disconnect_if_connected)
53 14da8345 Jes Sorensen
{
54 14da8345 Jes Sorensen
    return -1;
55 14da8345 Jes Sorensen
}
56 14da8345 Jes Sorensen
static inline int qemu_spice_set_pw_expire(time_t expires)
57 14da8345 Jes Sorensen
{
58 14da8345 Jes Sorensen
    return -1;
59 14da8345 Jes Sorensen
}
60 e866e239 Gerd Hoffmann
static inline int qemu_spice_migrate_info(const char *h, int p, int t, const char *s)
61 e866e239 Gerd Hoffmann
{ return -1; }
62 29b0040b Gerd Hoffmann
63 29b0040b Gerd Hoffmann
#endif /* CONFIG_SPICE */
64 29b0040b Gerd Hoffmann
65 29b0040b Gerd Hoffmann
#endif /* QEMU_SPICE_H */