---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 10 ++++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 3 +++
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 15 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index f2fc9d5..c9fc408 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -76,6 +76,16 @@ gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
}
+void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics,
+ const char *socket)
+{
+ g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics));
+
+ gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(graphics),
+ "socket", socket,
+ NULL);
+}
+
void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
gboolean autoport)
{
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
index e3183d7..0d3173c 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -62,6 +62,9 @@ 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_socket(GVirConfigDomainGraphicsVnc *graphics,
+ const char *socket);
+
void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
gboolean autoport);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index f83eabb..c60cc4e 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -464,6 +464,8 @@ LIBVIRT_GCONFIG_0.1.3 {
global:
gvir_config_domain_get_current_memory;
gvir_config_domain_set_current_memory;
+
+ gvir_config_domain_graphics_vnc_set_socket;
} LIBVIRT_GCONFIG_0.1.0;
# .... define new API here using predicted next version number ....
--
1.7.11.4
Show replies by date
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 16 ++++++++++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 2 ++
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 20 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
index c9fc408..41ac2a0 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c
@@ -76,6 +76,14 @@ gvir_config_domain_graphics_vnc_new_from_xml(const gchar *xml,
}
+const char *gvir_config_domain_graphics_vnc_get_socket(GVirConfigDomainGraphicsVnc
*graphics)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics), NULL);
+
+ return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(graphics),
+ NULL, "socket");
+}
+
void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics,
const char *socket)
{
@@ -96,6 +104,14 @@ void
gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *g
NULL);
}
+int gvir_config_domain_graphics_vnc_get_port(GVirConfigDomainGraphicsVnc *graphics)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_VNC(graphics), 0);
+
+ return gvir_config_object_get_attribute_uint64(GVIR_CONFIG_OBJECT(graphics),
+ NULL, "port", 0);
+}
+
void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
int port)
{
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
index 0d3173c..09a53e1 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h
@@ -62,12 +62,14 @@ GVirConfigDomainGraphicsVnc
*gvir_config_domain_graphics_vnc_new(void);
GVirConfigDomainGraphicsVnc *gvir_config_domain_graphics_vnc_new_from_xml(const gchar
*xml,
GError
**error);
+const char *gvir_config_domain_graphics_vnc_get_socket(GVirConfigDomainGraphicsVnc
*graphics);
void gvir_config_domain_graphics_vnc_set_socket(GVirConfigDomainGraphicsVnc *graphics,
const char *socket);
void gvir_config_domain_graphics_vnc_set_autoport(GVirConfigDomainGraphicsVnc *graphics,
gboolean autoport);
+int gvir_config_domain_graphics_vnc_get_port(GVirConfigDomainGraphicsVnc *graphics);
void gvir_config_domain_graphics_vnc_set_port(GVirConfigDomainGraphicsVnc *graphics,
int port);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index c60cc4e..17a8e11 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -465,6 +465,8 @@ LIBVIRT_GCONFIG_0.1.3 {
gvir_config_domain_get_current_memory;
gvir_config_domain_set_current_memory;
+ gvir_config_domain_graphics_vnc_get_port;
+ gvir_config_domain_graphics_vnc_get_socket;
gvir_config_domain_graphics_vnc_set_socket;
} LIBVIRT_GCONFIG_0.1.0;
--
1.7.11.4
On 26.09.2012 14:07, Christophe Fergeau wrote:
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 16 ++++++++++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 2 ++
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 20 insertions(+)
ACK
Michal
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 8 ++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
libvirt-gconfig/tests/test-domain-create.c | 1 +
4 files changed, 12 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
index 61d3f5b..d090a3a 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c
@@ -95,6 +95,14 @@ void
gvir_config_domain_graphics_spice_set_password(GVirConfigDomainGraphicsSpic
NULL);
}
+int gvir_config_domain_graphics_spice_get_port(GVirConfigDomainGraphicsSpice *graphics)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_GRAPHICS_SPICE(graphics), 0);
+
+ return gvir_config_object_get_attribute_uint64(GVIR_CONFIG_OBJECT(graphics),
+ NULL, "port", 0);
+}
+
void gvir_config_domain_graphics_spice_set_port(GVirConfigDomainGraphicsSpice *graphics,
int port)
{
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
index d198813..c82615b 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h
@@ -68,6 +68,7 @@ void
gvir_config_domain_graphics_spice_set_autoport(GVirConfigDomainGraphicsSpic
void gvir_config_domain_graphics_spice_set_password(GVirConfigDomainGraphicsSpice
*graphics,
const char *password);
+int gvir_config_domain_graphics_spice_get_port(GVirConfigDomainGraphicsSpice *graphics);
void gvir_config_domain_graphics_spice_set_port(GVirConfigDomainGraphicsSpice *graphics,
int port);
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 17a8e11..2ec2e80 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -465,6 +465,8 @@ LIBVIRT_GCONFIG_0.1.3 {
gvir_config_domain_get_current_memory;
gvir_config_domain_set_current_memory;
+ gvir_config_domain_graphics_spice_get_port;
+
gvir_config_domain_graphics_vnc_get_port;
gvir_config_domain_graphics_vnc_get_socket;
gvir_config_domain_graphics_vnc_set_socket;
diff --git a/libvirt-gconfig/tests/test-domain-create.c
b/libvirt-gconfig/tests/test-domain-create.c
index c3e627b..4c94b2a 100644
--- a/libvirt-gconfig/tests/test-domain-create.c
+++ b/libvirt-gconfig/tests/test-domain-create.c
@@ -287,6 +287,7 @@ int main(int argc, char **argv)
graphics = gvir_config_domain_graphics_spice_new();
gvir_config_domain_graphics_spice_set_port(graphics, 1234);
+ g_assert(gvir_config_domain_graphics_spice_get_port(graphics) == 1234);
devices = g_list_append(devices, GVIR_CONFIG_DOMAIN_DEVICE(graphics));
/* video node */
--
1.7.11.4
On 26.09.2012 14:07, Christophe Fergeau wrote:
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.c | 8 ++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-spice.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
libvirt-gconfig/tests/test-domain-create.c | 1 +
4 files changed, 12 insertions(+)
ACK
Michal
On 26.09.2012 14:07, Christophe Fergeau wrote:
---
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 10 ++++++++++
libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.h | 3 +++
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 15 insertions(+)
ACK
Michal