Re: [libvirt-glib/libvirt-gconfig 14/17] gconfig: Add GVirCofigDomainGraphicsLocal class

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

 



On Tue, Mar 22, 2016 at 11:04:50AM +0100, Fabiano Fidêncio wrote:
> Adding this class more fore completness to the
> GVirConfigDomainGraphicsRemote than for any other reason.
> 
> This patch introduces a new hierarchy in the project, where, instead of
> having GVirConfigDomainGraphics{Desktop,Sdl} inheriting from
> GVirConfigDomainGraphics, these classes will inherit from
> GVirConfigDomainGraphicsLocal (see the next patches), which inherits
> from GVirConfigDomainGraphics (it will cause ABI breakages, though).
> 
> Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
> ---
>  libvirt-gconfig/Makefile.am                        |  2 +
>  .../libvirt-gconfig-domain-graphics-local.c        | 97 ++++++++++++++++++++++
>  .../libvirt-gconfig-domain-graphics-local.h        | 68 +++++++++++++++
>  libvirt-gconfig/libvirt-gconfig.h                  |  1 +
>  libvirt-gconfig/libvirt-gconfig.sym                |  3 +
>  po/POTFILES.in                                     |  1 +
>  6 files changed, 172 insertions(+)
>  create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-local.c
>  create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-graphics-local.h
> 
> diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
> index 45fc559..5361fa7 100644
> --- a/libvirt-gconfig/Makefile.am
> +++ b/libvirt-gconfig/Makefile.am
> @@ -46,6 +46,7 @@ GCONFIG_HEADER_FILES = \
>  			libvirt-gconfig-domain-filesys.h \
>  			libvirt-gconfig-domain-graphics.h \
>  			libvirt-gconfig-domain-graphics-desktop.h \
> +			libvirt-gconfig-domain-graphics-local.h \
>  			libvirt-gconfig-domain-graphics-rdp.h \
>  			libvirt-gconfig-domain-graphics-remote.h \
>  			libvirt-gconfig-domain-graphics-sdl.h \
> @@ -138,6 +139,7 @@ GCONFIG_SOURCE_FILES = \
>  			libvirt-gconfig-domain-filesys.c \
>  			libvirt-gconfig-domain-graphics.c \
>  			libvirt-gconfig-domain-graphics-desktop.c \
> +			libvirt-gconfig-domain-graphics-local.c \
>  			libvirt-gconfig-domain-graphics-rdp.c \
>  			libvirt-gconfig-domain-graphics-remote.c \
>  			libvirt-gconfig-domain-graphics-sdl.c \
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-graphics-local.c b/libvirt-gconfig/libvirt-gconfig-domain-graphics-local.c
> new file mode 100644
> index 0000000..3a0fe51
> --- /dev/null
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-graphics-local.c
> @@ -0,0 +1,97 @@
> +/*
> + * libvirt-gconfig-domain-graphics-local.c: libvirt domain graphics local configuration
> + *
> + * 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
> + * <http://www.gnu.org/licenses/>.
> + *
> + * Author: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
> + */
> +
> +#include <config.h>
> +
> +#include <glib/gi18n-lib.h>
> +
> +#include "libvirt-gconfig/libvirt-gconfig.h"
> +#include "libvirt-gconfig/libvirt-gconfig-private.h"
> +
> +#define GVIR_CONFIG_DOMAIN_GRAPHICS_LOCAL_GET_PRIVATE(obj)                         \
> +        (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_CONFIG_TYPE_DOMAIN_GRAPHICS_LOCAL, GVirConfigDomainGraphicsLocalPrivate))
> +
> +struct _GVirConfigDomainGraphicsLocalPrivate
> +{
> +    gboolean unused;
> +};
> +
> +typedef GVirConfigObject *(*GVirConfigDomainGraphicsLocalNewFromXml)(const gchar *xml, GError **error);

Could be local to gvir_config_domain_graphics_local_new_from_xml, and
same comments as for gvir_config_domain_graphics_remote_new_from_xml

Looks good otherwise,

Christophe

Attachment: signature.asc
Description: PGP signature

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