Statistics
| Branch: | Revision:

root / ui / qemu-spice.h @ e7d81004

History | View | Annotate | Download (2.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 edc5cb1a Yonit Halperin
#include "monitor.h"
29 29b0040b Gerd Hoffmann
30 29b0040b Gerd Hoffmann
extern int using_spice;
31 29b0040b Gerd Hoffmann
32 29b0040b Gerd Hoffmann
void qemu_spice_init(void);
33 864401c2 Gerd Hoffmann
void qemu_spice_input_init(void);
34 3e313753 Gerd Hoffmann
void qemu_spice_audio_init(void);
35 a3e22260 Gerd Hoffmann
void qemu_spice_display_init(DisplayState *ds);
36 29b0040b Gerd Hoffmann
int qemu_spice_add_interface(SpiceBaseInstance *sin);
37 7572150c Gerd Hoffmann
int qemu_spice_set_passwd(const char *passwd,
38 7572150c Gerd Hoffmann
                          bool fail_if_connected, bool disconnect_if_connected);
39 7572150c Gerd Hoffmann
int qemu_spice_set_pw_expire(time_t expires);
40 e866e239 Gerd Hoffmann
int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
41 edc5cb1a Yonit Halperin
                            const char *subject,
42 edc5cb1a Yonit Halperin
                            MonitorCompletion cb, void *opaque);
43 29b0040b Gerd Hoffmann
44 cb42a870 Gerd Hoffmann
void do_info_spice_print(Monitor *mon, const QObject *data);
45 cb42a870 Gerd Hoffmann
void do_info_spice(Monitor *mon, QObject **ret_data);
46 cb42a870 Gerd Hoffmann
47 6e1db57b Kevin Wolf
int qemu_chr_open_spice(QemuOpts *opts, CharDriverState **_chr);
48 cbcc6336 Alon Levy
49 29b0040b Gerd Hoffmann
#else  /* CONFIG_SPICE */
50 edc5cb1a Yonit Halperin
#include "monitor.h"
51 29b0040b Gerd Hoffmann
52 29b0040b Gerd Hoffmann
#define using_spice 0
53 14da8345 Jes Sorensen
static inline int qemu_spice_set_passwd(const char *passwd,
54 14da8345 Jes Sorensen
                                        bool fail_if_connected,
55 14da8345 Jes Sorensen
                                        bool disconnect_if_connected)
56 14da8345 Jes Sorensen
{
57 14da8345 Jes Sorensen
    return -1;
58 14da8345 Jes Sorensen
}
59 14da8345 Jes Sorensen
static inline int qemu_spice_set_pw_expire(time_t expires)
60 14da8345 Jes Sorensen
{
61 14da8345 Jes Sorensen
    return -1;
62 14da8345 Jes Sorensen
}
63 edc5cb1a Yonit Halperin
static inline int qemu_spice_migrate_info(const char *h, int p, int t,
64 edc5cb1a Yonit Halperin
                                          const char *s,
65 edc5cb1a Yonit Halperin
                                          MonitorCompletion cb, void *opaque)
66 edc5cb1a Yonit Halperin
{
67 edc5cb1a Yonit Halperin
    cb(opaque, NULL);
68 edc5cb1a Yonit Halperin
    return -1;
69 edc5cb1a Yonit Halperin
}
70 29b0040b Gerd Hoffmann
71 29b0040b Gerd Hoffmann
#endif /* CONFIG_SPICE */
72 29b0040b Gerd Hoffmann
73 29b0040b Gerd Hoffmann
#endif /* QEMU_SPICE_H */