Re: [PATCH libvirt-glib 1/2] gconfig: add spiceport chardev

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

 



Hey,

On Fri, May 09, 2014 at 10:28:27PM +0200, Marc-André Lureau wrote:

> 
> ---
>  libvirt-gconfig/Makefile.am                        |   2 +
>  libvirt-gconfig/libvirt-gconfig-domain-channel.h   |   1 +
>  ...bvirt-gconfig-domain-chardev-source-spiceport.c | 101 +++++++++++++++++++++
>  ...bvirt-gconfig-domain-chardev-source-spiceport.h |  71 +++++++++++++++
>  libvirt-gconfig/libvirt-gconfig.h                  |   1 +
>  libvirt-gconfig/libvirt-gconfig.sym                |   9 ++
>  6 files changed, 185 insertions(+)
>  create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
>  create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.h
> 
> diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
> index d328ca7..83d521f 100644
> --- a/libvirt-gconfig/Makefile.am
> +++ b/libvirt-gconfig/Makefile.am
> @@ -28,6 +28,7 @@ GCONFIG_HEADER_FILES = \
>  			libvirt-gconfig-domain-chardev.h \
>  			libvirt-gconfig-domain-chardev-source.h \
>  			libvirt-gconfig-domain-chardev-source-pty.h \
> +			libvirt-gconfig-domain-chardev-source-spiceport.h \
>  			libvirt-gconfig-domain-chardev-source-spicevmc.h \
>  			libvirt-gconfig-domain-clock.h \
>  			libvirt-gconfig-domain-console.h \
> @@ -114,6 +115,7 @@ GCONFIG_SOURCE_FILES = \
>  			libvirt-gconfig-domain-chardev.c \
>  			libvirt-gconfig-domain-chardev-source.c \
>  			libvirt-gconfig-domain-chardev-source-pty.c \
> +			libvirt-gconfig-domain-chardev-source-spiceport.c \
>  			libvirt-gconfig-domain-chardev-source-spicevmc.c \
>  			libvirt-gconfig-domain-clock.c \
>  			libvirt-gconfig-domain-console.c \
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-channel.h b/libvirt-gconfig/libvirt-gconfig-domain-channel.h
> index 889b09a..4f1130e 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-channel.h
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-channel.h
> @@ -59,6 +59,7 @@ struct _GVirConfigDomainChannelClass
>  typedef enum {
>      GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_GUESTFWD,
>      GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO,
> +    GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_SPICEPORT,
>  } GVirConfigDomainChannelTargetType;
>  
>  
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
> new file mode 100644
> index 0000000..570e7ea
> --- /dev/null
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
> @@ -0,0 +1,101 @@
> +/*
> + * libvirt-gconfig-domain-chardev-source-spiceport.c: libvirt domain chardev spiceport configuration
> + *
> + * Copyright (C) 2014 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
> + * <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <config.h>
> +
> +#include "libvirt-gconfig/libvirt-gconfig.h"
> +#include "libvirt-gconfig/libvirt-gconfig-private.h"
> +
> +#define GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_GET_PRIVATE(obj)                         \
> +        (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT, GVirConfigDomainChardevSourceSpicePortPrivate))
> +
> +struct _GVirConfigDomainChardevSourceSpicePortPrivate
> +{
> +    gboolean unused;
> +};
> +
> +G_DEFINE_TYPE(GVirConfigDomainChardevSourceSpicePort, gvir_config_domain_chardev_source_spiceport, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
> +
> +
> +static void gvir_config_domain_chardev_source_spiceport_class_init(GVirConfigDomainChardevSourceSpicePortClass *klass)
> +{
> +    g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceSpicePortPrivate));
> +}
> +
> +
> +static void gvir_config_domain_chardev_source_spiceport_init(GVirConfigDomainChardevSourceSpicePort *source)
> +{
> +    g_debug("Init GVirConfigDomainChardevSourceSpicePort=%p", source);
> +
> +    source->priv = GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_GET_PRIVATE(source);
> +}
> +
> +
> +GVirConfigDomainChardevSourceSpicePort *gvir_config_domain_chardev_source_spiceport_new(void)
> +{
> +    GVirConfigObject *object;
> +
> +    /* the name of the root node is just a placeholder, it will be
> +     * overwritten when the GVirConfigDomainChardevSourceSpicePort is attached to a
> +     * GVirConfigDomainChardevSourceSpicePort
> +     */

This comment is not correct, it's mentioning the same type twice. I
think the second occurence is supposed to be GVirConfigDomainChardev

Looks good otherwise, ACK.

--
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]