[PATCH libvirt-glib v2 5/8] Add objects for dealing with SDL and VNC graphics config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Add GVirConfigDomainGraphicsSdl and GVirConfigDomainGraphicsVnc
Also change SPICE to use a signed int for port number and add
ability to set autoport & tls port attributes

* libvirt-gconfig/Makefile.am,
  libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c,
  libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h,
  libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c,
  libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h,
  libvirt-gconfig/libvirt-gconfig.h,
  libvirt-gconfig/libvirt-gconfig.sym: Add new objects
* libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c,
  libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h:
  Add autoport & tls port setter, change port setter to use
  a signed int
---
 libvirt-gconfig/Makefile.am                        |    4 +
 .../libvirt-gconfig-domain-graphics-sdl.c          |  100 +++++++++++++++++++
 .../libvirt-gconfig-domain-graphics-sdl.h          |   71 ++++++++++++++
 .../libvirt-gconfig-domain-graphics-spice.c        |   24 ++++-
 .../libvirt-gconfig-domain-graphics-spice.h        |    9 ++-
 .../libvirt-gconfig-domain-graphics-vnc.c          |  101 ++++++++++++++++++++
 .../libvirt-gconfig-domain-graphics-vnc.h          |   73 ++++++++++++++
 libvirt-gconfig/libvirt-gconfig.h                  |    2 +
 libvirt-gconfig/libvirt-gconfig.sym                |   14 +++
 9 files changed, 395 insertions(+), 3 deletions(-)
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h

diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
index 2c8c2a5..7c9e8c0 100644
--- a/libvirt-gconfig/Makefile.am
+++ b/libvirt-gconfig/Makefile.am
@@ -18,7 +18,9 @@ GCONFIG_HEADER_FILES = \
 			libvirt-gconfig-domain-disk.h \
 			libvirt-gconfig-domain-filesys.h \
 			libvirt-gconfig-domain-graphics.h \
+			libvirt-gconfig-domain-graphics-sdl.h \
 			libvirt-gconfig-domain-graphics-spice.h \
+			libvirt-gconfig-domain-graphics-vnc.h \
 			libvirt-gconfig-domain-input.h \
 			libvirt-gconfig-domain-interface.h \
 			libvirt-gconfig-domain-interface-network.h \
@@ -48,7 +50,9 @@ GCONFIG_SOURCE_FILES = \
 			libvirt-gconfig-domain-disk.c \
 			libvirt-gconfig-domain-filesys.c \
 			libvirt-gconfig-domain-graphics.c \
+			libvirt-gconfig-domain-graphics-sdl.c \
 			libvirt-gconfig-domain-graphics-spice.c \
+			libvirt-gconfig-domain-graphics-vnc.c \
 			libvirt-gconfig-domain-input.c \
 			libvirt-gconfig-domain-interface.c \
 			libvirt-gconfig-domain-interface-network.c \
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
new file mode 100644
index 0000000..728c320
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.c
@@ -0,0 +1,100 @@
+/*
+ * libvirt-gobject-config-domain-graphics-sdl.c: libvirt glib integration
+ *
+ * Copyright (C) 2011 Red Hat
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
+ */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <libxml/tree.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-helpers-private.h"
+#include "libvirt-gconfig/libvirt-gconfig-object-private.h"
+
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_SDL_GET_PRIVATE(obj)                         \
+        (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL, GVirConfigDomainGraphicsSdlPrivate))
+
+struct _GVirConfigDomainGraphicsSdlPrivate
+{
+    gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigDomainGraphicsSdl, gvir_config_domain_graphics_sdl, GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS);
+
+
+static void gvir_config_domain_graphics_sdl_class_init(GVirConfigDomainGraphicsSdlClass *klass)
+{
+    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsSdlPrivate));
+}
+
+
+static void gvir_config_domain_graphics_sdl_init(GVirConfigDomainGraphicsSdl *graphics_sdl)
+{
+    g_debug("Init GVirConfigDomainGraphicsSdl=%p", graphics_sdl);
+
+    graphics_sdl->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_SDL_GET_PRIVATE(graphics_sdl);
+}
+
+
+GVirConfigDomainGraphicsSdl *gvir_config_domain_graphics_sdl_new(void)
+{
+    GVirConfigObject *object;
+
+    object = gvir_config_object_new(GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL,
+                                    "graphics", NULL);
+    gvir_config_object_set_attribute(object, "type", "sdl", NULL);
+    return GVIR_CONFIG_DOMAIN_GRAPHICS_SDL(object);
+}
+
+GVirConfigDomainGraphicsSdl *
+gvir_config_domain_graphics_sdl_new_from_xml(const gchar *xml,
+                                             GError **error)
+{
+    GVirConfigObject *object;
+
+    object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL,
+                                             "graphics", NULL, xml, error);
+    if (object == NULL)
+        return NULL;
+    gvir_config_object_set_attribute(object, "type", "sdl", NULL);
+    return GVIR_CONFIG_DOMAIN_GRAPHICS_SDL(object);
+}
+
+void gvir_config_domain_graphics_sdl_set_xauthority(GVirConfigDomainGraphicsSdl *graphics,
+                                                    const gchar *path)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SDL(graphics));
+
+    gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                     "xauth", path,
+                                     NULL);
+}
+
+void gvir_config_domain_graphics_sdl_set_display(GVirConfigDomainGraphicsSdl *graphics,
+                                                 const gchar *disp)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SDL(graphics));
+
+    gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+                                     "display", disp,
+                                     NULL);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h
new file mode 100644
index 0000000..03d1296
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h
@@ -0,0 +1,71 @@
+/*
+ * libvirt-gconfig-domain-graphics-sdl.h: libvirt gobject integration
+ *
+ * Copyright (C) 2011 Red Hat
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_SDL_H__
+#define __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_SDL_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL            (gvir_config_domain_graphics_sdl_get_type ())
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_SDL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL, GVirConfigDomainGraphicsSdl))
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_SDL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL, GVirConfigDomainGraphicsSdlClass))
+#define GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SDL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL))
+#define GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SDL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL))
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_SDL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_SDL, GVirConfigDomainGraphicsSdlClass))
+
+typedef struct _GVirConfigDomainGraphicsSdl GVirConfigDomainGraphicsSdl;
+typedef struct _GVirConfigDomainGraphicsSdlPrivate GVirConfigDomainGraphicsSdlPrivate;
+typedef struct _GVirConfigDomainGraphicsSdlClass GVirConfigDomainGraphicsSdlClass;
+
+struct _GVirConfigDomainGraphicsSdl
+{
+    GVirConfigDomainGraphics parent;
+
+    GVirConfigDomainGraphicsSdlPrivate *priv;
+
+    /* Do not add fields to this struct */
+};
+
+struct _GVirConfigDomainGraphicsSdlClass
+{
+    GVirConfigDomainGraphicsClass parent_class;
+
+    gpointer padding[20];
+};
+
+GType gvir_config_domain_graphics_sdl_get_type(void);
+
+GVirConfigDomainGraphicsSdl *gvir_config_domain_graphics_sdl_new(void);
+GVirConfigDomainGraphicsSdl *gvir_config_domain_graphics_sdl_new_from_xml(const gchar *xml,
+                                                                          GError **error);
+void gvir_config_domain_graphics_sdl_set_xauthority(GVirConfigDomainGraphicsSdl *graphics,
+                                                    const gchar *path);
+void gvir_config_domain_graphics_sdl_set_display(GVirConfigDomainGraphicsSdl *graphics,
+                                                 const gchar *disp);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_SDL_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 1bac19e..e570586 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -79,12 +79,32 @@ gvir_config_domain_graphics_spice_new_from_xml(const gchar *xml,
     return GVIR_CONFIG_DOMAIN_GRAPHICS_SPICE(object);
 }
 
+void gvir_config_domain_graphics_spice_set_autoport(GVirConfigDomainGraphicsSpice *graphics,
+                                                    gboolean autoport)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SPICE(graphics));
+
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
+                                               "autoport", G_TYPE_BOOLEAN, autoport,
+                                               NULL);
+}
+
 void gvir_config_domain_graphics_spice_set_port(GVirConfigDomainGraphicsSpice *graphics,
-                                         unsigned int port)
+                                                int port)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SPICE(graphics));
+
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
+                                               "port", G_TYPE_INT, port,
+                                               NULL);
+}
+
+void gvir_config_domain_graphics_spice_set_tls_port(GVirConfigDomainGraphicsSpice *graphics,
+                                                    int port)
 {
     g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_SPICE(graphics));
 
     gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
-                                               "port", G_TYPE_UINT, port,
+                                               "tlsPort", G_TYPE_INT, port,
                                                NULL);
 }
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index 11d32a1..ea24d9a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
@@ -61,8 +61,15 @@ GType gvir_config_domain_graphics_spice_get_type(void);
 GVirConfigDomainGraphicsSpice *gvir_config_domain_graphics_spice_new(void);
 GVirConfigDomainGraphicsSpice *gvir_config_domain_graphics_spice_new_from_xml(const gchar *xml,
                                                                               GError **error);
+
+void gvir_config_domain_graphics_spice_set_autoport(GVirConfigDomainGraphicsSpice *graphics,
+                                                    gboolean autoport);
+
 void gvir_config_domain_graphics_spice_set_port(GVirConfigDomainGraphicsSpice *graphics,
-                                                unsigned int port);
+                                                int port);
+
+void gvir_config_domain_graphics_spice_set_tls_port(GVirConfigDomainGraphicsSpice *graphics,
+                                                    int port);
 
 G_END_DECLS
 
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
new file mode 100644
index 0000000..cda5500
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -0,0 +1,101 @@
+/*
+ * libvirt-gobject-config-domain-graphics-vnc.c: libvirt glib integration
+ *
+ * Copyright (C) 2011 Red Hat
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
+ */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <libxml/tree.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-helpers-private.h"
+#include "libvirt-gconfig/libvirt-gconfig-object-private.h"
+
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_VNC_GET_PRIVATE(obj)                         \
+        (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC, GVirConfigDomainGraphicsVncPrivate))
+
+struct _GVirConfigDomainGraphicsVncPrivate
+{
+    gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigDomainGraphicsVnc, gvir_config_domain_graphics_vnc, GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS);
+
+
+static void gvir_config_domain_graphics_vnc_class_init(GVirConfigDomainGraphicsVncClass *klass)
+{
+    g_type_class_add_private(klass, sizeof(GVirConfigDomainGraphicsVncPrivate));
+}
+
+
+static void gvir_config_domain_graphics_vnc_init(GVirConfigDomainGraphicsVnc *graphics_vnc)
+{
+    g_debug("Init GVirConfigDomainGraphicsVnc=%p", graphics_vnc);
+
+    graphics_vnc->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_VNC_GET_PRIVATE(graphics_vnc);
+}
+
+
+GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new(void)
+{
+    GVirConfigObject *object;
+
+    object = gvir_config_object_new(GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC,
+                                    "graphics", NULL);
+    gvir_config_object_set_attribute(object, "type", "vnc", NULL);
+    return GVIR_CONFIG_DOMAIN_GRAPHICS_VNC(object);
+}
+
+GVirConfigDomainGraphicsVnc *
+gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
+                                             GError **error)
+{
+    GVirConfigObject *object;
+
+    object = gvir_config_object_new_from_xml(GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC,
+                                             "graphics", NULL, xml, error);
+    if (object == NULL)
+        return NULL;
+    gvir_config_object_set_attribute(object, "type", "vnc", NULL);
+    return GVIR_CONFIG_DOMAIN_GRAPHICS_VNC(object);
+}
+
+
+void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
+                                                  gboolean autoport)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_VNC(graphics));
+
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
+                                               "autoport", G_TYPE_BOOLEAN, autoport,
+                                               NULL);
+}
+
+void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
+                                              int port)
+{
+    g_return_if_fail(GVIR_IS_CONFIG_DOMAIN_GRAPHICS_VNC(graphics));
+
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(graphics),
+                                               "port", G_TYPE_INT, port,
+                                               NULL);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
new file mode 100644
index 0000000..8819d79
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -0,0 +1,73 @@
+/*
+ * libvirt-gconfig-domain-graphics-vnc.h: libvirt gobject integration
+ *
+ * Copyright (C) 2011 Red Hat
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ *
+ * Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_VNC_H__
+#define __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_VNC_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC            (gvir_config_domain_graphics_vnc_get_type ())
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_VNC(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC, GVirConfigDomainGraphicsVnc))
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_VNC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC, GVirConfigDomainGraphicsVncClass))
+#define GVIR_IS_CONFIG_DOMAIN_GRAPHICS_VNC(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC))
+#define GVIR_IS_CONFIG_DOMAIN_GRAPHICS_VNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC))
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_VNC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GVIR_TYPE_CONFIG_DOMAIN_GRAPHICS_VNC, GVirConfigDomainGraphicsVncClass))
+
+typedef struct _GVirConfigDomainGraphicsVnc GVirConfigDomainGraphicsVnc;
+typedef struct _GVirConfigDomainGraphicsVncPrivate GVirConfigDomainGraphicsVncPrivate;
+typedef struct _GVirConfigDomainGraphicsVncClass GVirConfigDomainGraphicsVncClass;
+
+struct _GVirConfigDomainGraphicsVnc
+{
+    GVirConfigDomainGraphics parent;
+
+    GVirConfigDomainGraphicsVncPrivate *priv;
+
+    /* Do not add fields to this struct */
+};
+
+struct _GVirConfigDomainGraphicsVncClass
+{
+    GVirConfigDomainGraphicsClass parent_class;
+
+    gpointer padding[20];
+};
+
+GType gvir_config_domain_graphics_vnc_get_type(void);
+
+GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new(void);
+GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
+                                                                          GError **error);
+
+void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
+                                                  gboolean autoport);
+
+void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
+                                              int port);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_DOMAIN_GRAPHICS_VNC_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.h b/libvirt-gconfig/libvirt-gconfig.h
index ed7623c..74c26ba 100644
--- a/libvirt-gconfig/libvirt-gconfig.h
+++ b/libvirt-gconfig/libvirt-gconfig.h
@@ -35,7 +35,9 @@
 #include <libvirt-gconfig/libvirt-gconfig-domain-disk.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-filesys.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-graphics.h>
+#include <libvirt-gconfig/libvirt-gconfig-domain-graphics-sdl.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h>
+#include <libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-input.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-interface.h>
 #include <libvirt-gconfig/libvirt-gconfig-domain-interface-network.h>
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 738f625..da31f68 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -65,10 +65,24 @@ LIBVIRT_GCONFIG_0.0.1 {
 
 	gvir_config_domain_graphics_get_type;
 
+	gvir_config_domain_graphics_sdl_get_type;
+	gvir_config_domain_graphics_sdl_new;
+	gvir_config_domain_graphics_sdl_new_from_xml;
+	gvir_config_domain_graphics_sdl_set_display;
+	gvir_config_domain_graphics_sdl_set_xauthority;
+
 	gvir_config_domain_graphics_spice_get_type;
 	gvir_config_domain_graphics_spice_new;
 	gvir_config_domain_graphics_spice_new_from_xml;
+	gvir_config_domain_graphics_spice_set_autoport;
 	gvir_config_domain_graphics_spice_set_port;
+	gvir_config_domain_graphics_spice_set_tls_port;
+
+	gvir_config_domain_graphics_vnc_get_type;
+	gvir_config_domain_graphics_vnc_new;
+	gvir_config_domain_graphics_vnc_new_from_xml;
+	gvir_config_domain_graphics_vnc_set_autoport;
+	gvir_config_domain_graphics_vnc_set_port;
 
 	gvir_config_domain_input_bus_get_type;
 	gvir_config_domain_input_get_type;
-- 
1.7.6.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]