Re: [libvirt] [gconfig v2 1/4] Introduce libvirt-domain-graphics-listen

2016-08-03 Thread Christophe Fergeau
Hey,

On Mon, Aug 01, 2016 at 11:52:37PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru 
> 
> Abstract class which represents a listen child node
> of the graphics device.
> ---
>  libvirt-gconfig/Makefile.am|  2 +
>  .../libvirt-gconfig-domain-graphics-listen.c   | 48 
>  .../libvirt-gconfig-domain-graphics-listen.h   | 64 
> ++
>  libvirt-gconfig/libvirt-gconfig.h  |  1 +
>  libvirt-gconfig/libvirt-gconfig.sym|  1 +
>  5 files changed, 116 insertions(+)
>  create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c
>  create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h
> 
> diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
> index 0400343..27c6df1 100644
> --- a/libvirt-gconfig/Makefile.am
> +++ b/libvirt-gconfig/Makefile.am
> @@ -45,6 +45,7 @@ GCONFIG_HEADER_FILES = \
>   libvirt-gconfig-domain-disk-driver.h \
>   libvirt-gconfig-domain-filesys.h \
>   libvirt-gconfig-domain-graphics.h \
> + libvirt-gconfig-domain-graphics-listen.h\
>   libvirt-gconfig-domain-graphics-desktop.h \
>   libvirt-gconfig-domain-graphics-rdp.h \
>   libvirt-gconfig-domain-graphics-sdl.h \
> @@ -138,6 +139,7 @@ GCONFIG_SOURCE_FILES = \
>   libvirt-gconfig-domain-disk-driver.c \
>   libvirt-gconfig-domain-filesys.c \
>   libvirt-gconfig-domain-graphics.c \
> + libvirt-gconfig-domain-graphics-listen.c\
>   libvirt-gconfig-domain-graphics-desktop.c \
>   libvirt-gconfig-domain-graphics-rdp.c \
>   libvirt-gconfig-domain-graphics-sdl.c \
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c 
> b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c
> new file mode 100644
> index 000..c89f126
> --- /dev/null
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c
> @@ -0,0 +1,48 @@
> +/*
> + * libvirt-gconfig-domain-graphics-listen.c: libvirt domain graphics listen 
> base class
> + *


Since you write this code and not Red Hat, this should read:

> + * Copyright (C) 2016 Visarion Alexandru 

If you copied the code from another file and want to keep the copyright
history, just keep the previous (C) line, and add another one with your
name on it.


> + *
> + * 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, see
> + * .
> + *
> + * Author: Visarion Alexandru 
> + */
> +
> +#include 
> +
> +#include "libvirt-gconfig/libvirt-gconfig.h"
> +#include "libvirt-gconfig/libvirt-gconfig-private.h"
> +
> +#define GVIR_CONFIG_DOMAIN_GRAPHICS_LISTEN_GET_PRIVATE(obj)  
>\
> +(G_TYPE_INSTANCE_GET_PRIVATE((obj), 
> GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_LISTEN, 
> GVirConfigDomainGraphicsListenPrivate))
> +
> +struct _GVirConfigDomainGraphicsListenPrivate
> +{
> +gboolean unused;
> +};
> +
> +G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainGraphicsListen, 
> gvir_config_domain_graphics_listen, GVIR_CONFIG_TYPE_OBJECT);
> +
> +
> +static void 
> gvir_config_domain_graphics_listen_class_init(GVirConfigDomainGraphicsListenClass
>  *klass)
> +{
> +g_type_class_add_private(klass, 
> sizeof(GVirConfigDomainGraphicsListenPrivate));
> +}
> +
> +
> +static void 
> gvir_config_domain_graphics_listen_init(GVirConfigDomainGraphicsListen 
> *listen)
> +{
> +listen->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_LISTEN_GET_PRIVATE(listen);
> +}
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h 
> b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h
> new file mode 100644
> index 000..dba3811
> --- /dev/null
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h
> @@ -0,0 +1,64 @@
> +/*
> + * libvirt-gconfig-domain-graphics-listen.h: libvirt domain graphics listen 
> base class
> + *
> + * Copyright (C) 2016 Red Hat, Inc.
> + *
> + * 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 

[libvirt] [gconfig v2 1/4] Introduce libvirt-domain-graphics-listen

2016-08-01 Thread Visarion Alexandru
From: Visarion Alexandru 

Abstract class which represents a listen child node
of the graphics device.
---
 libvirt-gconfig/Makefile.am|  2 +
 .../libvirt-gconfig-domain-graphics-listen.c   | 48 
 .../libvirt-gconfig-domain-graphics-listen.h   | 64 ++
 libvirt-gconfig/libvirt-gconfig.h  |  1 +
 libvirt-gconfig/libvirt-gconfig.sym|  1 +
 5 files changed, 116 insertions(+)
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c
 create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h

diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
index 0400343..27c6df1 100644
--- a/libvirt-gconfig/Makefile.am
+++ b/libvirt-gconfig/Makefile.am
@@ -45,6 +45,7 @@ GCONFIG_HEADER_FILES = \
libvirt-gconfig-domain-disk-driver.h \
libvirt-gconfig-domain-filesys.h \
libvirt-gconfig-domain-graphics.h \
+   libvirt-gconfig-domain-graphics-listen.h\
libvirt-gconfig-domain-graphics-desktop.h \
libvirt-gconfig-domain-graphics-rdp.h \
libvirt-gconfig-domain-graphics-sdl.h \
@@ -138,6 +139,7 @@ GCONFIG_SOURCE_FILES = \
libvirt-gconfig-domain-disk-driver.c \
libvirt-gconfig-domain-filesys.c \
libvirt-gconfig-domain-graphics.c \
+   libvirt-gconfig-domain-graphics-listen.c\
libvirt-gconfig-domain-graphics-desktop.c \
libvirt-gconfig-domain-graphics-rdp.c \
libvirt-gconfig-domain-graphics-sdl.c \
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c 
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c
new file mode 100644
index 000..c89f126
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.c
@@ -0,0 +1,48 @@
+/*
+ * libvirt-gconfig-domain-graphics-listen.c: libvirt domain graphics listen 
base class
+ *
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * 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, see
+ * .
+ *
+ * Author: Visarion Alexandru 
+ */
+
+#include 
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-private.h"
+
+#define GVIR_CONFIG_DOMAIN_GRAPHICS_LISTEN_GET_PRIVATE(obj)
 \
+(G_TYPE_INSTANCE_GET_PRIVATE((obj), 
GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_LISTEN, GVirConfigDomainGraphicsListenPrivate))
+
+struct _GVirConfigDomainGraphicsListenPrivate
+{
+gboolean unused;
+};
+
+G_DEFINE_ABSTRACT_TYPE(GVirConfigDomainGraphicsListen, 
gvir_config_domain_graphics_listen, GVIR_CONFIG_TYPE_OBJECT);
+
+
+static void 
gvir_config_domain_graphics_listen_class_init(GVirConfigDomainGraphicsListenClass
 *klass)
+{
+g_type_class_add_private(klass, 
sizeof(GVirConfigDomainGraphicsListenPrivate));
+}
+
+
+static void 
gvir_config_domain_graphics_listen_init(GVirConfigDomainGraphicsListen *listen)
+{
+listen->priv = GVIR_CONFIG_DOMAIN_GRAPHICS_LISTEN_GET_PRIVATE(listen);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h 
b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h
new file mode 100644
index 000..dba3811
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-listen.h
@@ -0,0 +1,64 @@
+/*
+ * libvirt-gconfig-domain-graphics-listen.h: libvirt domain graphics listen 
base class
+ *
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * 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, see
+ * .
+ *
+ * Author: Visarion Alexandru