From nobody Tue Feb 10 04:12:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557515587; cv=none; d=zoho.com; s=zohoarc; b=Q3nB86QdpBSZu/TkhKHZBRmYK82kFsCD45BrhVpHy7nrmkDKX+h10dsM95ASHMySV/bfwNuCCZsVVPstzWzTs8oDFzClLih4yQHwM25FzDtcenfYya+dQqW7+MO+a9LqsTvIPZR8LvT2xrNqRaomoMhU72SCuANZE0ID8vOf5nQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557515587; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=It3TLH5/2GO2h4NSmmE/Bg1E6CZ4xcEIUZxOLTTqsKI=; b=TfNxPJhp+eOA03g3NKd5kcITuPYntGGPwfI4IALg2YoKDvjX8kPxWPQuAXepCcRqH01rWYjtLucpvT+kb/aXQD3saGaHoZx5VL4hiTgv/u9rp613I1AIX1rilsomjubqiDkuHxxKUOxNS5FDxgJzP0RLtD9ABdk28ypwZVjcNa4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155751558752336.639015287729876; Fri, 10 May 2019 12:13:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDECC307EAA3; Fri, 10 May 2019 19:13:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3EFE5D704; Fri, 10 May 2019 19:13:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6CA7141F3D; Fri, 10 May 2019 19:13:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4AJD1tj003680 for ; Fri, 10 May 2019 15:13:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 226C96013B; Fri, 10 May 2019 19:13:01 +0000 (UTC) Received: from laerte.brq.redhat.com (unknown [10.43.2.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 758A460126; Fri, 10 May 2019 19:13:00 +0000 (UTC) From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= To: libvir-list@redhat.com Date: Fri, 10 May 2019 21:12:41 +0200 Message-Id: <20190510191245.32567-5-fidencio@redhat.com> In-Reply-To: <20190510191245.32567-1-fidencio@redhat.com> References: <20190510191245.32567-1-fidencio@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Subject: [libvirt] [glib PATCH 4/8] gconfig: Add GVirConfigDomainCapabilitiesOs X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 10 May 2019 19:13:06 +0000 (UTC) GVirConfigDomainCapabilitiesOs object has been introduced in order to represent the element under . For now it's not used anywhere, but it's addition allows us to start building the needed machinery for: - Returning a representation os element; - Having the most basic machinery to start adding functions to return any child element we may need to query from element; Signed-off-by: Fabiano Fid=C3=AAncio --- libvirt-gconfig/Makefile.am | 2 + .../libvirt-gconfig-domain-capabilities-os.c | 43 +++++++++++++ .../libvirt-gconfig-domain-capabilities-os.h | 61 +++++++++++++++++++ libvirt-gconfig/libvirt-gconfig.h | 1 + libvirt-gconfig/libvirt-gconfig.sym | 1 + 5 files changed, 108 insertions(+) create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.h diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index db2fa79..089b42a 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -27,6 +27,7 @@ GCONFIG_HEADER_FILES =3D \ libvirt-gconfig-domain-address-pci.h \ libvirt-gconfig-domain-address-usb.h \ libvirt-gconfig-domain-capabilities.h \ + libvirt-gconfig-domain-capabilities-os.h \ libvirt-gconfig-domain-channel.h \ libvirt-gconfig-domain-chardev.h \ libvirt-gconfig-domain-chardev-source.h \ @@ -121,6 +122,7 @@ GCONFIG_SOURCE_FILES =3D \ libvirt-gconfig-domain-address-pci.c \ libvirt-gconfig-domain-address-usb.c \ libvirt-gconfig-domain-capabilities.c \ + libvirt-gconfig-domain-capabilities-os.c \ libvirt-gconfig-domain-channel.c \ libvirt-gconfig-domain-chardev.c \ libvirt-gconfig-domain-chardev-source.c \ diff --git a/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c b/lib= virt-gconfig/libvirt-gconfig-domain-capabilities-os.c new file mode 100644 index 0000000..d3b6e3c --- /dev/null +++ b/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.c @@ -0,0 +1,43 @@ +/* + * libvirt-gconfig-domain-capabilities-os.c: libvirt OS domain capabilities + * + * Copyright (C) 2019 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 + * . + */ + +#include + +#include "libvirt-gconfig/libvirt-gconfig.h" +#include "libvirt-gconfig/libvirt-gconfig-private.h" + +#define GVIR_CONFIG_DOMAIN_CAPABILITIES_OS_GET_PRIVATE(obj) = \ + (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_CONFIG_TYPE_DOMAIN_CAPABI= LITIES_OS, GVirConfigDomainCapabilitiesOsPrivate)) + +struct _GVirConfigDomainCapabilitiesOsPrivate +{ + gboolean unused; +}; + +G_DEFINE_TYPE_WITH_PRIVATE(GVirConfigDomainCapabilitiesOs, gvir_config_dom= ain_capabilities_os, GVIR_CONFIG_TYPE_OBJECT); + +static void gvir_config_domain_capabilities_os_class_init(GVirConfigDomain= CapabilitiesOsClass *klass G_GNUC_UNUSED) +{ +} + +static void gvir_config_domain_capabilities_os_init(GVirConfigDomainCapabi= litiesOs *os) +{ + os->priv =3D GVIR_CONFIG_DOMAIN_CAPABILITIES_OS_GET_PRIVATE(os); +} diff --git a/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.h b/lib= virt-gconfig/libvirt-gconfig-domain-capabilities-os.h new file mode 100644 index 0000000..dba8572 --- /dev/null +++ b/libvirt-gconfig/libvirt-gconfig-domain-capabilities-os.h @@ -0,0 +1,61 @@ +/* + * libvirt-gconfig-domain-capabilities-os.h: libvirt domain capabilities OS + * + * Copyright (C) 2019 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 + * . + */ + +#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD) +#error "Only can be included directly." +#endif + +#ifndef __LIBVIRT_GCONFIG_DOMAIN_CAPABILITIES_OS_H__ +#define __LIBVIRT_GCONFIG_DOMAIN_CAPABILITIES_OS_H__ + +G_BEGIN_DECLS + +#define GVIR_CONFIG_TYPE_DOMAIN_CAPABILITIES_OS (gvir_config_do= main_capabilities_os_get_type ()) +#define GVIR_CONFIG_DOMAIN_CAPABILITIES_OS(obj) (G_TYPE_CHECK_I= NSTANCE_CAST ((obj), GVIR_CONFIG_TYPE_DOMAIN_CAPABILITIES_OS, GVirConfigDom= ainCapabilitiesOs)) +#define GVIR_CONFIG_DOMAIN_CAPABILITIES_OS_CLASS(klass) (G_TYPE_CHECK_C= LASS_CAST ((klass), GVIR_CONFIG_TYPE_DOMAIN_CAPABILITIES_OS, GVirConfigDoma= inCapabilitiesOsClass)) +#define GVIR_CONFIG_IS_DOMAIN_CAPABILITIES_OS(obj) (G_TYPE_CHECK_I= NSTANCE_TYPE ((obj), GVIR_CONFIG_TYPE_DOMAIN_CAPABILITIES_OS)) +#define GVIR_CONFIG_IS_DOMAIN_CAPABILITIES_OS_CLASS(klass) (G_TYPE_CHECK_C= LASS_TYPE ((klass), GVIR_CONFIG_TYPE_DOMAIN_CAPABILITIES_OS)) +#define GVIR_CONFIG_DOMAIN_CAPABILITIES_OS_GET_CLASS(obj) (G_TYPE_INSTANC= E_GET_CLASS ((obj), GVIR_CONFIG_TYPE_DOMAIN_CAPABILITIES_OS, GVirConfigDoma= inCapabilitiesOsClass)) + +typedef struct _GVirConfigDomainCapabilitiesOs GVirConfigDomainCapabilitie= sOs; +typedef struct _GVirConfigDomainCapabilitiesOsPrivate GVirConfigDomainCapa= bilitiesOsPrivate; +typedef struct _GVirConfigDomainCapabilitiesOsClass GVirConfigDomainCapabi= litiesOsClass; + +struct _GVirConfigDomainCapabilitiesOs +{ + GVirConfigObject parent; + + GVirConfigDomainCapabilitiesOsPrivate *priv; + + /* Do not add fields to this struct */ +}; + +struct _GVirConfigDomainCapabilitiesOsClass +{ + GVirConfigObjectClass parent_class; + + gpointer padding[20]; +}; + +GType gvir_config_domain_capabilities_os_get_type(void); + +G_END_DECLS + +#endif /* __LIBVIRT_GCONFIG_DOMAIN_CAPABILITIES_OS_H__ */ diff --git a/libvirt-gconfig/libvirt-gconfig.h b/libvirt-gconfig/libvirt-gc= onfig.h index 9fde05a..896b4f1 100644 --- a/libvirt-gconfig/libvirt-gconfig.h +++ b/libvirt-gconfig/libvirt-gconfig.h @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-= gconfig.sym index 4a13635..0e5c06b 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -777,6 +777,7 @@ global: gvir_config_domain_capabilities_get_type; gvir_config_domain_capabilities_new; gvir_config_domain_capabilities_new_from_xml; + gvir_config_domain_capabilities_os_get_type; gvir_config_domain_os_firmware_get_type; gvir_config_domain_os_set_firmware; gvir_config_storage_vol_target_features_get_type; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list