aboutsummaryrefslogtreecommitdiff
path: root/console.h
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2011-03-16 13:33:36 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-03-22 08:39:12 -0500
commit821601ea5b02a68ada479731a4d3d07a9876632a (patch)
tree1d99ac90c4a076ebd06f3c9df1656186f0b56cf2 /console.h
parent47b053690e8582ab52e09181c2c3f19a2ade134f (diff)
Make VNC support optional
Per default VNC is enabled. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'console.h')
-rw-r--r--console.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/console.h b/console.h
index 711895e2d7..64d1f090ed 100644
--- a/console.h
+++ b/console.h
@@ -4,6 +4,8 @@
#include "qemu-char.h"
#include "qdict.h"
#include "notify.h"
+#include "qerror.h"
+#include "monitor.h"
/* keyboard/mouse support */
@@ -370,12 +372,32 @@ void cocoa_display_init(DisplayState *ds, int full_screen);
void vnc_display_init(DisplayState *ds);
void vnc_display_close(DisplayState *ds);
int vnc_display_open(DisplayState *ds, const char *display);
-int vnc_display_password(DisplayState *ds, const char *password);
int vnc_display_disable_login(DisplayState *ds);
+char *vnc_display_local_addr(DisplayState *ds);
+#ifdef CONFIG_VNC
+int vnc_display_password(DisplayState *ds, const char *password);
int vnc_display_pw_expire(DisplayState *ds, time_t expires);
void do_info_vnc_print(Monitor *mon, const QObject *data);
void do_info_vnc(Monitor *mon, QObject **ret_data);
-char *vnc_display_local_addr(DisplayState *ds);
+#else
+static inline int vnc_display_password(DisplayState *ds, const char *password)
+{
+ qerror_report(QERR_FEATURE_DISABLED, "vnc");
+ return -ENODEV;
+}
+static inline int vnc_display_pw_expire(DisplayState *ds, time_t expires)
+{
+ qerror_report(QERR_FEATURE_DISABLED, "vnc");
+ return -ENODEV;
+};
+static inline void do_info_vnc(Monitor *mon, QObject **ret_data)
+{
+};
+static inline void do_info_vnc_print(Monitor *mon, const QObject *data)
+{
+ monitor_printf(mon, "VNC support disabled\n");
+};
+#endif
/* curses.c */
void curses_display_init(DisplayState *ds, int full_screen);