From eeadc5499519405a1abc8b17ff08e7f144f4e82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 25 Nov 2021 09:57:47 +0000 Subject: osinfo: switch to '#pragma once' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current include files use the pattern #ifndef __OOSINFO_BLAH_H__ # define __OOSINFO_BLAH_H__ #endif /* __OOSINFO_BLAH_H__ */ Since we already mandated GCC + CLang, we can replace this with a simpler incantation #pragma once Signed-off-by: Daniel P. Berrangé --- osinfo/ignore-value.h | 13 ++--- osinfo/osinfo.h | 93 ++++++++++++++++---------------- osinfo/osinfo_avatar_format.h | 19 +++---- osinfo/osinfo_datamap.h | 13 ++--- osinfo/osinfo_datamaplist.h | 11 ++-- osinfo/osinfo_db.h | 12 ++--- osinfo/osinfo_deployment.h | 11 ++-- osinfo/osinfo_deploymentlist.h | 11 ++-- osinfo/osinfo_device.h | 27 +++++----- osinfo/osinfo_device_driver.h | 27 +++++----- osinfo/osinfo_device_driver_private.h | 7 +-- osinfo/osinfo_device_driverlist.h | 11 ++-- osinfo/osinfo_devicelink.h | 15 +++--- osinfo/osinfo_devicelinkfilter.h | 9 ++-- osinfo/osinfo_devicelinklist.h | 11 ++-- osinfo/osinfo_devicelist.h | 11 ++-- osinfo/osinfo_entity.h | 13 ++--- osinfo/osinfo_filter.h | 9 ++-- osinfo/osinfo_firmware.h | 17 +++--- osinfo/osinfo_firmwarelist.h | 11 ++-- osinfo/osinfo_image.h | 21 ++++---- osinfo/osinfo_imagelist.h | 11 ++-- osinfo/osinfo_install_config.h | 59 ++++++++++---------- osinfo/osinfo_install_config_param.h | 18 +++---- osinfo/osinfo_install_config_paramlist.h | 11 ++-- osinfo/osinfo_install_script.h | 43 +++++++-------- osinfo/osinfo_install_script_private.h | 7 +-- osinfo/osinfo_install_scriptlist.h | 11 ++-- osinfo/osinfo_list.h | 11 ++-- osinfo/osinfo_loader.h | 14 ++--- osinfo/osinfo_macros.h | 13 ++--- osinfo/osinfo_media.h | 51 +++++++++--------- osinfo/osinfo_media_private.h | 7 +-- osinfo/osinfo_medialist.h | 9 ++-- osinfo/osinfo_os.h | 21 ++++---- osinfo/osinfo_os_variant.h | 13 ++--- osinfo/osinfo_os_variantlist.h | 11 ++-- osinfo/osinfo_oslist.h | 11 ++-- osinfo/osinfo_platform.h | 9 ++-- osinfo/osinfo_platformlist.h | 9 ++-- osinfo/osinfo_product.h | 27 +++++----- osinfo/osinfo_product_private.h | 7 +-- osinfo/osinfo_productfilter.h | 9 ++-- osinfo/osinfo_productlist.h | 11 ++-- osinfo/osinfo_resources.h | 31 +++++------ osinfo/osinfo_resources_private.h | 7 +-- osinfo/osinfo_resourceslist.h | 11 ++-- osinfo/osinfo_tree.h | 35 ++++++------ osinfo/osinfo_treelist.h | 11 ++-- osinfo/osinfo_util_private.h | 15 +++--- 50 files changed, 361 insertions(+), 514 deletions(-) diff --git a/osinfo/ignore-value.h b/osinfo/ignore-value.h index 6bab971..7843907 100644 --- a/osinfo/ignore-value.h +++ b/osinfo/ignore-value.h @@ -32,16 +32,13 @@ "copy.c:233: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result". */ -#ifndef _GL_IGNORE_VALUE_H -# define _GL_IGNORE_VALUE_H +#pragma once /* The __attribute__((__warn_unused_result__)) feature is available in gcc versions 3.4 and newer, while the typeof feature has been available since 2.7 at least. */ -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) -# define ignore_value(x) ((void) (x)) -# else -# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) -# endif - +#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) +# define ignore_value(x) ((void) (x)) +#else +# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) #endif diff --git a/osinfo/osinfo.h b/osinfo/osinfo.h index 959efde..6acf481 100644 --- a/osinfo/osinfo.h +++ b/osinfo/osinfo.h @@ -18,53 +18,50 @@ * . */ -#ifndef __OSINFO_H__ -# define __OSINFO_H__ +#pragma once -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/osinfo/osinfo_avatar_format.h b/osinfo/osinfo_avatar_format.h index 992393a..7b14760 100644 --- a/osinfo/osinfo_avatar_format.h +++ b/osinfo/osinfo_avatar_format.h @@ -18,24 +18,23 @@ * */ -#include +#pragma once -#ifndef __OSINFO_AVATAR_FORMAT_H__ -# define __OSINFO_AVATAR_FORMAT_H__ +#include -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_AVATAR_FORMAT (osinfo_avatar_format_get_type ()) +#define OSINFO_TYPE_AVATAR_FORMAT (osinfo_avatar_format_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoAvatarFormat, osinfo_avatar_format, OSINFO, AVATAR_FORMAT, OsinfoEntity) -# define OSINFO_AVATAR_FORMAT_PROP_MIME_TYPE "mime-type" -# define OSINFO_AVATAR_FORMAT_PROP_WIDTH "width" -# define OSINFO_AVATAR_FORMAT_PROP_HEIGHT "height" -# define OSINFO_AVATAR_FORMAT_PROP_ALPHA "alpha" +#define OSINFO_AVATAR_FORMAT_PROP_MIME_TYPE "mime-type" +#define OSINFO_AVATAR_FORMAT_PROP_WIDTH "width" +#define OSINFO_AVATAR_FORMAT_PROP_HEIGHT "height" +#define OSINFO_AVATAR_FORMAT_PROP_ALPHA "alpha" OsinfoAvatarFormat *osinfo_avatar_format_new(void); @@ -43,5 +42,3 @@ GList *osinfo_avatar_format_get_mime_types(OsinfoAvatarFormat *avatar); gint osinfo_avatar_format_get_width(OsinfoAvatarFormat *avatar); gint osinfo_avatar_format_get_height(OsinfoAvatarFormat *avatar); gboolean osinfo_avatar_format_get_alpha(OsinfoAvatarFormat *avatar); - -#endif /* __OSINFO_AVATAR_FORMAT_H__ */ diff --git a/osinfo/osinfo_datamap.h b/osinfo/osinfo_datamap.h index 7ca3eb2..6ce2f81 100644 --- a/osinfo/osinfo_datamap.h +++ b/osinfo/osinfo_datamap.h @@ -18,15 +18,14 @@ * . */ -#include +#pragma once -#ifndef __OSINFO_DATAMAP_H__ -# define __OSINFO_DATAMAP_H__ +#include -# include -# include "osinfo/osinfo_macros.h" +#include +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DATAMAP (osinfo_datamap_get_type ()) +#define OSINFO_TYPE_DATAMAP (osinfo_datamap_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDatamap, osinfo_datamap, OSINFO, @@ -43,5 +42,3 @@ const gchar *osinfo_datamap_lookup(OsinfoDatamap *map, const gchar *inval); const gchar *osinfo_datamap_reverse_lookup(OsinfoDatamap *map, const gchar *outval); - -#endif /* __OSINFO_DATAMAP_H__ */ diff --git a/osinfo/osinfo_datamaplist.h b/osinfo/osinfo_datamaplist.h index 94f73a5..4c31484 100644 --- a/osinfo/osinfo_datamaplist.h +++ b/osinfo/osinfo_datamaplist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_DATAMAPLIST_H__ -# define __OSINFO_DATAMAPLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DATAMAPLIST (osinfo_datamaplist_get_type ()) +#define OSINFO_TYPE_DATAMAPLIST (osinfo_datamaplist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDatamapList, osinfo_datamaplist, OSINFO, @@ -34,5 +33,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDatamapList, OsinfoList) OsinfoDatamapList *osinfo_datamaplist_new(void); - -#endif /* __OSINFO_DATAMAPLIST_H__ */ diff --git a/osinfo/osinfo_db.h b/osinfo/osinfo_db.h index 4b7f080..addd586 100644 --- a/osinfo/osinfo_db.h +++ b/osinfo/osinfo_db.h @@ -18,6 +18,8 @@ * . */ +#pragma once + #include #include #include @@ -27,12 +29,9 @@ #include #include -#ifndef __OSINFO_DB_H__ -# define __OSINFO_DB_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DB (osinfo_db_get_type ()) +#define OSINFO_TYPE_DB (osinfo_db_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDb, osinfo_db, OSINFO, @@ -97,6 +96,3 @@ OsinfoOsList *osinfo_db_unique_values_for_os_relationship(OsinfoDb *db, OsinfoPr // Get me all Platforms that 'upgrade' another Platform (or whatever relationship is specified) OsinfoPlatformList *osinfo_db_unique_values_for_platform_relationship(OsinfoDb *db, OsinfoProductRelationship relshp); - - -#endif /* __OSINFO_DB_H__ */ diff --git a/osinfo/osinfo_deployment.h b/osinfo/osinfo_deployment.h index 9205339..bc6d0a5 100644 --- a/osinfo/osinfo_deployment.h +++ b/osinfo/osinfo_deployment.h @@ -18,16 +18,15 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_DEPLOYMENT_H__ -# define __OSINFO_DEPLOYMENT_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEPLOYMENT (osinfo_deployment_get_type ()) +#define OSINFO_TYPE_DEPLOYMENT (osinfo_deployment_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeployment, osinfo_deployment, OSINFO, @@ -47,5 +46,3 @@ OsinfoDeviceLink *osinfo_deployment_get_preferred_device_link(OsinfoDeployment * OsinfoDeviceList *osinfo_deployment_get_devices(OsinfoDeployment *deployment, OsinfoFilter *filter); OsinfoDeviceLinkList *osinfo_deployment_get_device_links(OsinfoDeployment *deployment, OsinfoFilter *filter); OsinfoDeviceLink *osinfo_deployment_add_device(OsinfoDeployment *deployment, OsinfoDevice *dev); - -#endif /* __OSINFO_DEPLOYMENT_H__ */ diff --git a/osinfo/osinfo_deploymentlist.h b/osinfo/osinfo_deploymentlist.h index 1e9dde4..bf1cbde 100644 --- a/osinfo/osinfo_deploymentlist.h +++ b/osinfo/osinfo_deploymentlist.h @@ -18,16 +18,15 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_DEPLOYMENTLIST_H__ -# define __OSINFO_DEPLOYMENTLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEPLOYMENTLIST (osinfo_deploymentlist_get_type ()) +#define OSINFO_TYPE_DEPLOYMENTLIST (osinfo_deploymentlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeploymentList, osinfo_deploymentlist, OSINFO, @@ -43,5 +42,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoDeploymentList *osinfo_deploymentlist_new_intersection(OsinfoDeploymentList *sourceOne, OsinfoDeploymentList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoDeploymentList *osinfo_deploymentlist_new_union(OsinfoDeploymentList *sourceOne, OsinfoDeploymentList *sourceTwo); - -#endif /* __OSINFO_DEPLOYMENTLIST_H__ */ diff --git a/osinfo/osinfo_device.h b/osinfo/osinfo_device.h index 2b41299..0f6af69 100644 --- a/osinfo/osinfo_device.h +++ b/osinfo/osinfo_device.h @@ -18,29 +18,28 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_DEVICE_H__ -# define __OSINFO_DEVICE_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICE (osinfo_device_get_type ()) +#define OSINFO_TYPE_DEVICE (osinfo_device_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDevice, osinfo_device, OSINFO, DEVICE, OsinfoEntity); -# define OSINFO_DEVICE_PROP_VENDOR "vendor" -# define OSINFO_DEVICE_PROP_VENDOR_ID "vendor-id" -# define OSINFO_DEVICE_PROP_PRODUCT "product" -# define OSINFO_DEVICE_PROP_PRODUCT_ID "product-id" -# define OSINFO_DEVICE_PROP_NAME "name" -# define OSINFO_DEVICE_PROP_CLASS "class" -# define OSINFO_DEVICE_PROP_BUS_TYPE "bus-type" -# define OSINFO_DEVICE_PROP_SUBSYSTEM "subsystem" +#define OSINFO_DEVICE_PROP_VENDOR "vendor" +#define OSINFO_DEVICE_PROP_VENDOR_ID "vendor-id" +#define OSINFO_DEVICE_PROP_PRODUCT "product" +#define OSINFO_DEVICE_PROP_PRODUCT_ID "product-id" +#define OSINFO_DEVICE_PROP_NAME "name" +#define OSINFO_DEVICE_PROP_CLASS "class" +#define OSINFO_DEVICE_PROP_BUS_TYPE "bus-type" +#define OSINFO_DEVICE_PROP_SUBSYSTEM "subsystem" OsinfoDevice *osinfo_device_new(const gchar *id); @@ -52,5 +51,3 @@ const gchar *osinfo_device_get_bus_type(OsinfoDevice *dev); const gchar *osinfo_device_get_class(OsinfoDevice *dev); const gchar *osinfo_device_get_name(OsinfoDevice *dev); const gchar *osinfo_device_get_subsystem(OsinfoDevice *dev); - -#endif /* __OSINFO_DEVICE_H__ */ diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h index fd93647..68a297c 100644 --- a/osinfo/osinfo_device_driver.h +++ b/osinfo/osinfo_device_driver.h @@ -18,31 +18,30 @@ * . */ +#pragma once + #include #include #include #include -#ifndef __OSINFO_DEVICE_DRIVER_H__ -# define __OSINFO_DEVICE_DRIVER_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICE_DRIVER (osinfo_device_driver_get_type ()) +#define OSINFO_TYPE_DEVICE_DRIVER (osinfo_device_driver_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceDriver, osinfo_device_driver, OSINFO, DEVICE_DRIVER, OsinfoEntity) -# define OSINFO_DEVICE_DRIVER_PROP_ARCHITECTURE "arch" -# define OSINFO_DEVICE_DRIVER_PROP_LOCATION "location" -# define OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE "pre-installable" -# define OSINFO_DEVICE_DRIVER_PROP_FILE "file" -# define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device" -# define OSINFO_DEVICE_DRIVER_PROP_SIGNED "signed" -# define OSINFO_DEVICE_DRIVER_PROP_PRIORITY "priority" -# define OSINFO_DEVICE_DRIVER_DEFAULT_PRIORITY 50 +#define OSINFO_DEVICE_DRIVER_PROP_ARCHITECTURE "arch" +#define OSINFO_DEVICE_DRIVER_PROP_LOCATION "location" +#define OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE "pre-installable" +#define OSINFO_DEVICE_DRIVER_PROP_FILE "file" +#define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device" +#define OSINFO_DEVICE_DRIVER_PROP_SIGNED "signed" +#define OSINFO_DEVICE_DRIVER_PROP_PRIORITY "priority" +#define OSINFO_DEVICE_DRIVER_DEFAULT_PRIORITY 50 const gchar *osinfo_device_driver_get_architecture(OsinfoDeviceDriver *driver); const gchar *osinfo_device_driver_get_location(OsinfoDeviceDriver *driver); @@ -51,5 +50,3 @@ GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver); OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver); gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver); gint64 osinfo_device_driver_get_priority(OsinfoDeviceDriver *driver); - -#endif /* __OSINFO_DEVICE_DRIVER_H__ */ diff --git a/osinfo/osinfo_device_driver_private.h b/osinfo/osinfo_device_driver_private.h index db2ff61..0b39acb 100644 --- a/osinfo/osinfo_device_driver_private.h +++ b/osinfo/osinfo_device_driver_private.h @@ -18,13 +18,10 @@ * . */ -#include "osinfo_device_driver.h" +#pragma once -#ifndef __OSINFO_DEVICE_DRIVER_PRIVATE_H__ -# define __OSINFO_DEVICE_DRIVER_PRIVATE_H__ +#include "osinfo_device_driver.h" OsinfoDeviceDriver *osinfo_device_driver_new(const gchar *id); void osinfo_device_driver_add_device(OsinfoDeviceDriver *driver, OsinfoDevice *device); - -#endif /* __OSINFO_DEVICE_DRIVER_PRIVATE_H__ */ diff --git a/osinfo/osinfo_device_driverlist.h b/osinfo/osinfo_device_driverlist.h index b0db83e..c715f24 100644 --- a/osinfo/osinfo_device_driverlist.h +++ b/osinfo/osinfo_device_driverlist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_DEVICE_DRIVERLIST_H__ -# define __OSINFO_DEVICE_DRIVERLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICE_DRIVERLIST (osinfo_device_driverlist_get_type ()) +#define OSINFO_TYPE_DEVICE_DRIVERLIST (osinfo_device_driverlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceDriverList, osinfo_device_driverlist, OSINFO, @@ -34,5 +33,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceDriverList, OsinfoList) OsinfoDeviceDriverList *osinfo_device_driverlist_new(void); - -#endif /* __OSINFO_DEVICE_DRIVERLIST_H__ */ diff --git a/osinfo/osinfo_devicelink.h b/osinfo/osinfo_devicelink.h index 7178f41..42d35aa 100644 --- a/osinfo/osinfo_devicelink.h +++ b/osinfo/osinfo_devicelink.h @@ -18,28 +18,25 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_DEVICELINK_H__ -# define __OSINFO_DEVICELINK_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICELINK (osinfo_devicelink_get_type ()) +#define OSINFO_TYPE_DEVICELINK (osinfo_devicelink_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceLink, osinfo_devicelink, OSINFO, DEVICELINK, OsinfoEntity) -# define OSINFO_DEVICELINK_PROP_DRIVER "driver" -# define OSINFO_DEVICELINK_PROP_SUPPORTED "supported" +#define OSINFO_DEVICELINK_PROP_DRIVER "driver" +#define OSINFO_DEVICELINK_PROP_SUPPORTED "supported" OsinfoDeviceLink *osinfo_devicelink_new(OsinfoDevice *target); OsinfoDevice *osinfo_devicelink_get_target(OsinfoDeviceLink *link); const gchar *osinfo_devicelink_get_driver(OsinfoDeviceLink *link); - -#endif /* __OSINFO_DEVICELINK_H__ */ diff --git a/osinfo/osinfo_devicelinkfilter.h b/osinfo/osinfo_devicelinkfilter.h index d433f12..0c0ad65 100644 --- a/osinfo/osinfo_devicelinkfilter.h +++ b/osinfo/osinfo_devicelinkfilter.h @@ -18,12 +18,11 @@ * . */ -#ifndef __OSINFO_DEVICELINKFILTER_H__ -# define __OSINFO_DEVICELINKFILTER_H__ +#pragma once -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICELINKFILTER (osinfo_devicelinkfilter_get_type ()) +#define OSINFO_TYPE_DEVICELINKFILTER (osinfo_devicelinkfilter_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceLinkFilter, osinfo_devicelinkfilter, OSINFO, @@ -33,5 +32,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceLinkFilter, OsinfoDeviceLinkFilter *osinfo_devicelinkfilter_new(OsinfoFilter *filter); OsinfoFilter *osinfo_devicelinkfilter_get_target_filter(OsinfoDeviceLinkFilter *filter); - -#endif /* __OSINFO_DEVICELINKFILTER_H__ */ diff --git a/osinfo/osinfo_devicelinklist.h b/osinfo/osinfo_devicelinklist.h index c8ac57e..906a588 100644 --- a/osinfo/osinfo_devicelinklist.h +++ b/osinfo/osinfo_devicelinklist.h @@ -18,16 +18,15 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_DEVICELINKLIST_H__ -# define __OSINFO_DEVICELINKLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICELINKLIST (osinfo_devicelinklist_get_type ()) +#define OSINFO_TYPE_DEVICELINKLIST (osinfo_devicelinklist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceLinkList, osinfo_devicelinklist, OSINFO, @@ -45,5 +44,3 @@ G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoDeviceLinkList *osinfo_devicelinklist_new_union(OsinfoDeviceLinkList *sourceOne, OsinfoDeviceLinkList *sourceTwo); OsinfoDeviceList *osinfo_devicelinklist_get_devices(OsinfoDeviceLinkList *list, OsinfoFilter *filter); - -#endif /* __OSINFO_DEVICELINKLIST_H__ */ diff --git a/osinfo/osinfo_devicelist.h b/osinfo/osinfo_devicelist.h index 8a3f314..b7cabca 100644 --- a/osinfo/osinfo_devicelist.h +++ b/osinfo/osinfo_devicelist.h @@ -18,16 +18,15 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_DEVICELIST_H__ -# define __OSINFO_DEVICELIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_DEVICELIST (osinfo_devicelist_get_type ()) +#define OSINFO_TYPE_DEVICELIST (osinfo_devicelist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoDeviceList, osinfo_devicelist, OSINFO, @@ -43,5 +42,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoDeviceList *osinfo_devicelist_new_intersection(OsinfoDeviceList *sourceOne, OsinfoDeviceList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoDeviceList *osinfo_devicelist_new_union(OsinfoDeviceList *sourceOne, OsinfoDeviceList *sourceTwo); - -#endif /* __OSINFO_DEVICELIST_H__ */ diff --git a/osinfo/osinfo_entity.h b/osinfo/osinfo_entity.h index 210a43b..30d0750 100644 --- a/osinfo/osinfo_entity.h +++ b/osinfo/osinfo_entity.h @@ -18,21 +18,20 @@ * . */ -#include +#pragma once -#ifndef __OSINFO_ENTITY_H__ -# define __OSINFO_ENTITY_H__ +#include -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_ENTITY (osinfo_entity_get_type ()) +#define OSINFO_TYPE_ENTITY (osinfo_entity_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoEntity, osinfo_entity, OSINFO, ENTITY, GObject) -# define OSINFO_ENTITY_PROP_ID "id" +#define OSINFO_ENTITY_PROP_ID "id" const gchar *osinfo_entity_get_id(OsinfoEntity *entity); @@ -57,5 +56,3 @@ void osinfo_entity_set_param_int64(OsinfoEntity *entity, const gchar *key, gint6 void osinfo_entity_set_param_enum(OsinfoEntity *entity, const gchar *key, gint value, GType enum_type); void osinfo_entity_add_param(OsinfoEntity *entity, const gchar *key, const gchar *value); void osinfo_entity_clear_param(OsinfoEntity *entity, const gchar *key); - -#endif /* __OSINFO_ENTITY_H__ */ diff --git a/osinfo/osinfo_filter.h b/osinfo/osinfo_filter.h index 04d381a..fb1cacb 100644 --- a/osinfo/osinfo_filter.h +++ b/osinfo/osinfo_filter.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_FILTER_H__ -# define __OSINFO_FILTER_H__ - -# define OSINFO_TYPE_FILTER (osinfo_filter_get_type ()) +#define OSINFO_TYPE_FILTER (osinfo_filter_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE(OsinfoFilter, osinfo_filter, OSINFO, @@ -54,5 +53,3 @@ GList *osinfo_filter_get_constraint_values(OsinfoFilter *filter, gboolean osinfo_filter_matches(OsinfoFilter *filter, OsinfoEntity *entity); - -#endif /* __OSINFO_FILTER_H__ */ diff --git a/osinfo/osinfo_firmware.h b/osinfo/osinfo_firmware.h index 0a391f1..1cbce94 100644 --- a/osinfo/osinfo_firmware.h +++ b/osinfo/osinfo_firmware.h @@ -18,29 +18,26 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_FIRMWARE_H__ -# define __OSINFO_FIRMWARE_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_FIRMWARE (osinfo_firmware_get_type ()) +#define OSINFO_TYPE_FIRMWARE (osinfo_firmware_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoFirmware, osinfo_firmware, OSINFO, FIRMWARE, OsinfoEntity) -# define OSINFO_FIRMWARE_PROP_ARCHITECTURE "architecture" -# define OSINFO_FIRMWARE_PROP_TYPE "type" -# define OSINFO_FIRMWARE_PROP_SUPPORTED "supported" +#define OSINFO_FIRMWARE_PROP_ARCHITECTURE "architecture" +#define OSINFO_FIRMWARE_PROP_TYPE "type" +#define OSINFO_FIRMWARE_PROP_SUPPORTED "supported" OsinfoFirmware *osinfo_firmware_new(const gchar *id, const gchar *architecture, const gchar *type); const gchar *osinfo_firmware_get_architecture(OsinfoFirmware *firmware); const gchar *osinfo_firmware_get_firmware_type(OsinfoFirmware *firmware); gboolean osinfo_firmware_is_supported(OsinfoFirmware *firmware); - -#endif /* __OSINFO_FIRMWARE_H__ */ diff --git a/osinfo/osinfo_firmwarelist.h b/osinfo/osinfo_firmwarelist.h index b85e461..be24fe1 100644 --- a/osinfo/osinfo_firmwarelist.h +++ b/osinfo/osinfo_firmwarelist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_FIRMWARELIST_H__ -# define __OSINFO_FIRMWARELIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_FIRMWARELIST (osinfo_firmwarelist_get_type ()) +#define OSINFO_TYPE_FIRMWARELIST (osinfo_firmwarelist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoFirmwareList, osinfo_firmwarelist, OSINFO, @@ -34,5 +33,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoFirmwareList, OsinfoList) OsinfoFirmwareList *osinfo_firmwarelist_new(void); - -#endif /* __OSINFO_FIRMWARELIST_H__ */ diff --git a/osinfo/osinfo_image.h b/osinfo/osinfo_image.h index 68989f4..c6c75a0 100644 --- a/osinfo/osinfo_image.h +++ b/osinfo/osinfo_image.h @@ -18,26 +18,25 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_IMAGE_H__ -# define __OSINFO_IMAGE_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_IMAGE (osinfo_image_get_type ()) +#define OSINFO_TYPE_IMAGE (osinfo_image_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoImage, osinfo_image, OSINFO, IMAGE, OsinfoEntity) -# define OSINFO_IMAGE_PROP_ARCHITECTURE "architecture" -# define OSINFO_IMAGE_PROP_FORMAT "format" -# define OSINFO_IMAGE_PROP_URL "url" -# define OSINFO_IMAGE_PROP_CLOUD_INIT "cloud-init" -# define OSINFO_IMAGE_PROP_VARIANT "variant" +#define OSINFO_IMAGE_PROP_ARCHITECTURE "architecture" +#define OSINFO_IMAGE_PROP_FORMAT "format" +#define OSINFO_IMAGE_PROP_URL "url" +#define OSINFO_IMAGE_PROP_CLOUD_INIT "cloud-init" +#define OSINFO_IMAGE_PROP_VARIANT "variant" OsinfoImage *osinfo_image_new(const gchar *id, const gchar *architecture, const gchar *format); const gchar *osinfo_image_get_architecture(OsinfoImage *image); @@ -47,5 +46,3 @@ gboolean osinfo_image_get_cloud_init(OsinfoImage *image); OsinfoOs *osinfo_image_get_os(OsinfoImage *image); void osinfo_image_set_os(OsinfoImage *image, OsinfoOs *os); OsinfoOsVariantList *osinfo_image_get_os_variants(OsinfoImage *image); - -#endif /* __OSINFO_IMAGE_H__ */ diff --git a/osinfo/osinfo_imagelist.h b/osinfo/osinfo_imagelist.h index 626079e..24b998f 100644 --- a/osinfo/osinfo_imagelist.h +++ b/osinfo/osinfo_imagelist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_IMAGELIST_H__ -# define __OSINFO_IMAGELIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_IMAGELIST (osinfo_imagelist_get_type ()) +#define OSINFO_TYPE_IMAGELIST (osinfo_imagelist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoImageList, osinfo_imagelist, OSINFO, @@ -34,5 +33,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoImageList, OsinfoList) OsinfoImageList *osinfo_imagelist_new(void); - -#endif /* __OSINFO_IMAGELIST_H__ */ diff --git a/osinfo/osinfo_install_config.h b/osinfo/osinfo_install_config.h index c2bcb0e..b3e4036 100644 --- a/osinfo/osinfo_install_config.h +++ b/osinfo/osinfo_install_config.h @@ -18,54 +18,53 @@ * . */ -#include +#pragma once -#ifndef __OSINFO_INSTALL_CONFIG_H__ -# define __OSINFO_INSTALL_CONFIG_H__ +#include -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_INSTALL_CONFIG (osinfo_install_config_get_type ()) +#define OSINFO_TYPE_INSTALL_CONFIG (osinfo_install_config_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoInstallConfig, osinfo_install_config, OSINFO, INSTALL_CONFIG, OsinfoEntity) -# define OSINFO_INSTALL_CONFIG_PROP_HARDWARE_ARCH "hardware-arch" +#define OSINFO_INSTALL_CONFIG_PROP_HARDWARE_ARCH "hardware-arch" -# define OSINFO_INSTALL_CONFIG_PROP_L10N_TIMEZONE "l10n-timezone" -# define OSINFO_INSTALL_CONFIG_PROP_L10N_LANGUAGE "l10n-language" -# define OSINFO_INSTALL_CONFIG_PROP_L10N_KEYBOARD "l10n-keyboard" +#define OSINFO_INSTALL_CONFIG_PROP_L10N_TIMEZONE "l10n-timezone" +#define OSINFO_INSTALL_CONFIG_PROP_L10N_LANGUAGE "l10n-language" +#define OSINFO_INSTALL_CONFIG_PROP_L10N_KEYBOARD "l10n-keyboard" -# define OSINFO_INSTALL_CONFIG_PROP_ADMIN_PASSWORD "admin-password" +#define OSINFO_INSTALL_CONFIG_PROP_ADMIN_PASSWORD "admin-password" -# define OSINFO_INSTALL_CONFIG_PROP_USER_PASSWORD "user-password" -# define OSINFO_INSTALL_CONFIG_PROP_USER_LOGIN "user-login" -# define OSINFO_INSTALL_CONFIG_PROP_USER_REALNAME "user-realname" -# define OSINFO_INSTALL_CONFIG_PROP_USER_AUTOLOGIN "user-autologin" -# define OSINFO_INSTALL_CONFIG_PROP_USER_ADMIN "user-admin" +#define OSINFO_INSTALL_CONFIG_PROP_USER_PASSWORD "user-password" +#define OSINFO_INSTALL_CONFIG_PROP_USER_LOGIN "user-login" +#define OSINFO_INSTALL_CONFIG_PROP_USER_REALNAME "user-realname" +#define OSINFO_INSTALL_CONFIG_PROP_USER_AUTOLOGIN "user-autologin" +#define OSINFO_INSTALL_CONFIG_PROP_USER_ADMIN "user-admin" -# define OSINFO_INSTALL_CONFIG_PROP_REG_LOGIN "reg-login" -# define OSINFO_INSTALL_CONFIG_PROP_REG_PASSWORD "reg-password" -# define OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY "reg-product-key" +#define OSINFO_INSTALL_CONFIG_PROP_REG_LOGIN "reg-login" +#define OSINFO_INSTALL_CONFIG_PROP_REG_PASSWORD "reg-password" +#define OSINFO_INSTALL_CONFIG_PROP_REG_PRODUCTKEY "reg-product-key" -# define OSINFO_INSTALL_CONFIG_PROP_HOSTNAME "hostname" -# define OSINFO_INSTALL_CONFIG_PROP_TARGET_DISK "target-disk" -# define OSINFO_INSTALL_CONFIG_PROP_SCRIPT_DISK "script-disk" +#define OSINFO_INSTALL_CONFIG_PROP_HOSTNAME "hostname" +#define OSINFO_INSTALL_CONFIG_PROP_TARGET_DISK "target-disk" +#define OSINFO_INSTALL_CONFIG_PROP_SCRIPT_DISK "script-disk" -# define OSINFO_INSTALL_CONFIG_PROP_AVATAR_LOCATION "avatar-location" -# define OSINFO_INSTALL_CONFIG_PROP_AVATAR_DISK "avatar-disk" +#define OSINFO_INSTALL_CONFIG_PROP_AVATAR_LOCATION "avatar-location" +#define OSINFO_INSTALL_CONFIG_PROP_AVATAR_DISK "avatar-disk" -# define OSINFO_INSTALL_CONFIG_PROP_PRE_INSTALL_DRIVERS_DISK "pre-install-drivers-disk" -# define OSINFO_INSTALL_CONFIG_PROP_PRE_INSTALL_DRIVERS_LOCATION "pre-install-drivers-location" +#define OSINFO_INSTALL_CONFIG_PROP_PRE_INSTALL_DRIVERS_DISK "pre-install-drivers-disk" +#define OSINFO_INSTALL_CONFIG_PROP_PRE_INSTALL_DRIVERS_LOCATION "pre-install-drivers-location" -# define OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_DISK "post-install-drivers-disk" -# define OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION "post-install-drivers-location" +#define OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_DISK "post-install-drivers-disk" +#define OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION "post-install-drivers-location" -# define OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING "driver-signing" +#define OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING "driver-signing" -# define OSINFO_INSTALL_CONFIG_PROP_INSTALLATION_URL "installation-url" +#define OSINFO_INSTALL_CONFIG_PROP_INSTALLATION_URL "installation-url" OsinfoInstallConfig *osinfo_install_config_new(const gchar *id); @@ -174,5 +173,3 @@ gboolean osinfo_install_config_get_driver_signing(OsinfoInstallConfig *config); void osinfo_install_config_set_installation_url(OsinfoInstallConfig *config, const gchar *url); const gchar *osinfo_install_config_get_installation_url(OsinfoInstallConfig *config); - -#endif /* __OSINFO_INSTALL_CONFIG_H__ */ diff --git a/osinfo/osinfo_install_config_param.h b/osinfo/osinfo_install_config_param.h index 682b003..c265969 100644 --- a/osinfo/osinfo_install_config_param.h +++ b/osinfo/osinfo_install_config_param.h @@ -18,23 +18,22 @@ * . */ -#include +#pragma once -#ifndef __OSINFO_INSTALL_CONFIG_PARAM_H__ -# define __OSINFO_INSTALL_CONFIG_PARAM_H__ +#include -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_INSTALL_CONFIG_PARAM (osinfo_install_config_param_get_type ()) +#define OSINFO_TYPE_INSTALL_CONFIG_PARAM (osinfo_install_config_param_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoInstallConfigParam, osinfo_install_config_param, OSINFO, INSTALL_CONFIG_PARAM, OsinfoEntity) -# define OSINFO_INSTALL_CONFIG_PARAM_PROP_DATAMAP "value-map" -# define OSINFO_INSTALL_CONFIG_PARAM_PROP_NAME "name" -# define OSINFO_INSTALL_CONFIG_PARAM_PROP_POLICY "policy" +#define OSINFO_INSTALL_CONFIG_PARAM_PROP_DATAMAP "value-map" +#define OSINFO_INSTALL_CONFIG_PARAM_PROP_NAME "name" +#define OSINFO_INSTALL_CONFIG_PARAM_PROP_POLICY "policy" /** * OsinfoInstallConfigParamPolicy: @@ -64,6 +63,3 @@ gboolean osinfo_install_config_param_is_optional(OsinfoInstallConfigParam *confi void osinfo_install_config_param_set_value_map(OsinfoInstallConfigParam *config_param, OsinfoDatamap *datamap); OsinfoDatamap *osinfo_install_config_param_get_value_map(OsinfoInstallConfigParam *config_param); - - -#endif /* __OSINFO_INSTALL_CONFIG_PARAM_H__ */ diff --git a/osinfo/osinfo_install_config_paramlist.h b/osinfo/osinfo_install_config_paramlist.h index 1c9d0de..de68416 100644 --- a/osinfo/osinfo_install_config_paramlist.h +++ b/osinfo/osinfo_install_config_paramlist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_INSTALL_CONFIG_PARAMLIST_H__ -# define __OSINFO_INSTALL_CONFIG_PARAMLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_INSTALL_CONFIG_PARAMLIST (osinfo_install_config_paramlist_get_type ()) +#define OSINFO_TYPE_INSTALL_CONFIG_PARAMLIST (osinfo_install_config_paramlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoInstallConfigParamList, osinfo_install_config_paramlist, OSINFO, @@ -34,5 +33,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoInstallConfigParamList, OsinfoList) OsinfoInstallConfigParamList *osinfo_install_config_paramlist_new(void); - -#endif /* __OSINFO_INSTALL_CONFIG_PARAMLIST_H__ */ diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index 9af6528..3201fd5 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include #include #include -#ifndef __OSINFO_INSTALL_SCRIPT_H__ -# define __OSINFO_INSTALL_SCRIPT_H__ - -# define OSINFO_TYPE_INSTALL_SCRIPT (osinfo_install_script_get_type ()) +#define OSINFO_TYPE_INSTALL_SCRIPT (osinfo_install_script_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoInstallScript, osinfo_install_script, OSINFO, @@ -37,23 +36,23 @@ typedef struct _OsinfoOs OsinfoOs; typedef struct _OsinfoMedia OsinfoMedia; typedef struct _OsinfoTree OsinfoTree; -# define OSINFO_INSTALL_SCRIPT_PROFILE_JEOS "jeos" -# define OSINFO_INSTALL_SCRIPT_PROFILE_DESKTOP "desktop" - -# define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_URI "template-uri" -# define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_DATA "template-data" -# define OSINFO_INSTALL_SCRIPT_PROP_PROFILE "profile" -# define OSINFO_INSTALL_SCRIPT_PROP_PRODUCT_KEY_FORMAT "product-key-format" -# define OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME "expected-filename" -# define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT "path-format" -# define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers" -# define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers" -# define OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET "needs-internet" -# define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req" -# define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req" -# define OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD "injection-method" -# define OSINFO_INSTALL_SCRIPT_PROP_PREFERRED_INJECTION_METHOD "preferred-injection-method" -# define OSINFO_INSTALL_SCRIPT_PROP_INSTALLATION_SOURCE "installation-source" +#define OSINFO_INSTALL_SCRIPT_PROFILE_JEOS "jeos" +#define OSINFO_INSTALL_SCRIPT_PROFILE_DESKTOP "desktop" + +#define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_URI "template-uri" +#define OSINFO_INSTALL_SCRIPT_PROP_TEMPLATE_DATA "template-data" +#define OSINFO_INSTALL_SCRIPT_PROP_PROFILE "profile" +#define OSINFO_INSTALL_SCRIPT_PROP_PRODUCT_KEY_FORMAT "product-key-format" +#define OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME "expected-filename" +#define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT "path-format" +#define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers" +#define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers" +#define OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET "needs-internet" +#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req" +#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req" +#define OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD "injection-method" +#define OSINFO_INSTALL_SCRIPT_PROP_PREFERRED_INJECTION_METHOD "preferred-injection-method" +#define OSINFO_INSTALL_SCRIPT_PROP_INSTALLATION_SOURCE "installation-source" /** * OsinfoPathFormat: @@ -287,5 +286,3 @@ GFile *osinfo_install_script_generate_output_for_tree(OsinfoInstallScript *scrip GFile *output_dir, GCancellable *cancellable, GError **error); - -#endif /* __OSINFO_INSTALL_SCRIPT_H__ */ diff --git a/osinfo/osinfo_install_script_private.h b/osinfo/osinfo_install_script_private.h index 639d373..0391d81 100644 --- a/osinfo/osinfo_install_script_private.h +++ b/osinfo/osinfo_install_script_private.h @@ -18,15 +18,12 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_INSTALL_SCRIPT_PRIVATE_H__ -# define __OSINFO_INSTALL_SCRIPT_PRIVATE_H__ - void osinfo_install_script_add_config_param(OsinfoInstallScript *script, OsinfoInstallConfigParam *param); void osinfo_install_script_set_avatar_format(OsinfoInstallScript *script, OsinfoAvatarFormat *avatar); - -#endif /* __OSINFO_INSTALL_SCRIPT_PRIVATE_H__ */ diff --git a/osinfo/osinfo_install_scriptlist.h b/osinfo/osinfo_install_scriptlist.h index e522233..23dd138 100644 --- a/osinfo/osinfo_install_scriptlist.h +++ b/osinfo/osinfo_install_scriptlist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_INSTALL_SCRIPTLIST_H__ -# define __OSINFO_INSTALL_SCRIPTLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_INSTALL_SCRIPTLIST (osinfo_install_scriptlist_get_type ()) +#define OSINFO_TYPE_INSTALL_SCRIPTLIST (osinfo_install_scriptlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoInstallScriptList, osinfo_install_scriptlist, OSINFO, @@ -42,5 +41,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoInstallScriptList *osinfo_install_scriptlist_new_intersection(OsinfoInstallScriptList *sourceOne, OsinfoInstallScriptList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoInstallScriptList *osinfo_install_scriptlist_new_union(OsinfoInstallScriptList *sourceOne, OsinfoInstallScriptList *sourceTwo); - -#endif /* __OSINFO_INSTALL_SCRIPTLIST_H__ */ diff --git a/osinfo/osinfo_list.h b/osinfo/osinfo_list.h index 35c3b6e..4e99c5a 100644 --- a/osinfo/osinfo_list.h +++ b/osinfo/osinfo_list.h @@ -18,13 +18,12 @@ * . */ -#ifndef __OSINFO_LIST_H__ -# define __OSINFO_LIST_H__ +#pragma once -# include -# include "osinfo/osinfo_macros.h" +#include +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_LIST (osinfo_list_get_type ()) +#define OSINFO_TYPE_LIST (osinfo_list_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoList, osinfo_list, OSINFO, @@ -48,5 +47,3 @@ OsinfoList *osinfo_list_new_copy(OsinfoList *source); OsinfoList *osinfo_list_new_filtered(OsinfoList *source, OsinfoFilter *filter); OsinfoList *osinfo_list_new_intersection(OsinfoList *sourceOne, OsinfoList *sourceTwo); OsinfoList *osinfo_list_new_union(OsinfoList *sourceOne, OsinfoList *sourceTwo); - -#endif /* __OSINFO_LIST_H__ */ diff --git a/osinfo/osinfo_loader.h b/osinfo/osinfo_loader.h index e2f2171..91cedb4 100644 --- a/osinfo/osinfo_loader.h +++ b/osinfo/osinfo_loader.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_LOADER_H__ -# define __OSINFO_LOADER_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_LOADER (osinfo_loader_get_type ()) +#define OSINFO_TYPE_LOADER (osinfo_loader_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoLoader, osinfo_loader, OSINFO, @@ -49,7 +48,7 @@ typedef enum { * * Error domain for generic libosinfo errors */ -# define OSINFO_ERROR osinfo_error_quark() +#define OSINFO_ERROR osinfo_error_quark() GQuark osinfo_error_quark(void); OsinfoLoader *osinfo_loader_new(void); @@ -62,6 +61,3 @@ void osinfo_loader_process_default_path(OsinfoLoader *loader, GError **err); void osinfo_loader_process_system_path(OsinfoLoader *loader, GError **err); void osinfo_loader_process_local_path(OsinfoLoader *loader, GError **err); void osinfo_loader_process_user_path(OsinfoLoader *loader, GError **err); - - -#endif /* __OSINFO_LOADER_H__ */ diff --git a/osinfo/osinfo_macros.h b/osinfo/osinfo_macros.h index 45a8433..d81cc50 100644 --- a/osinfo/osinfo_macros.h +++ b/osinfo/osinfo_macros.h @@ -18,15 +18,14 @@ * . */ -#ifndef __OSINFO_MACROS_H__ -# define __OSINFO_MACROS_H__ +#pragma once -# include +#include -# define OSINFO_DECLARE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ +#define OSINFO_DECLARE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ G_DECLARE_DERIVABLE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) -# define OSINFO_DECLARE_TYPE_WITH_PRIVATE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ +#define OSINFO_DECLARE_TYPE_WITH_PRIVATE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ GType module_obj_name##_get_type (void); \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ typedef struct _##ModuleObjName ModuleObjName; \ @@ -48,7 +47,7 @@ return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \ G_GNUC_END_IGNORE_DEPRECATIONS -# define OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ +#define OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \ GType module_obj_name##_get_type (void); \ G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ typedef struct _##ModuleObjName ModuleObjName; \ @@ -71,5 +70,3 @@ G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \ return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \ G_GNUC_END_IGNORE_DEPRECATIONS - -#endif /* __OSINFO_MACROS_H__ */ diff --git a/osinfo/osinfo_media.h b/osinfo/osinfo_media.h index bc76dd2..b759c9a 100644 --- a/osinfo/osinfo_media.h +++ b/osinfo/osinfo_media.h @@ -18,20 +18,19 @@ * . */ +#pragma once + #include #include #include #include -#ifndef __OSINFO_MEDIA_H__ -# define __OSINFO_MEDIA_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" GQuark osinfo_media_error_quark (void) G_GNUC_CONST; -# define OSINFO_MEDIA_ERROR (osinfo_media_error_quark ()) +#define OSINFO_MEDIA_ERROR (osinfo_media_error_quark ()) /** * OsinfoMediaError: @@ -67,32 +66,32 @@ typedef enum { OSINFO_MEDIA_DETECT_REQUIRE_BOOTABLE = 1 << 0, } OsinfoMediaDetectFlags; -# define OSINFO_TYPE_MEDIA (osinfo_media_get_type ()) +#define OSINFO_TYPE_MEDIA (osinfo_media_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoMedia, osinfo_media, OSINFO, MEDIA, OsinfoEntity) -# define OSINFO_MEDIA_PROP_ARCHITECTURE "architecture" -# define OSINFO_MEDIA_PROP_URL "url" -# define OSINFO_MEDIA_PROP_VOLUME_ID "volume-id" -# define OSINFO_MEDIA_PROP_SYSTEM_ID "system-id" -# define OSINFO_MEDIA_PROP_PUBLISHER_ID "publisher-id" -# define OSINFO_MEDIA_PROP_APPLICATION_ID "application-id" -# define OSINFO_MEDIA_PROP_KERNEL "kernel" -# define OSINFO_MEDIA_PROP_INITRD "initrd" -# define OSINFO_MEDIA_PROP_LIVE "live" -# define OSINFO_MEDIA_PROP_INSTALLER "installer" -# define OSINFO_MEDIA_PROP_INSTALLER_REBOOTS "installer-reboots" -# define OSINFO_MEDIA_PROP_LANG "l10n-language" -# define OSINFO_MEDIA_PROP_LANG_REGEX "l10n-language-regex" -# define OSINFO_MEDIA_PROP_LANG_MAP "l10n-language-map" -# define OSINFO_MEDIA_PROP_VARIANT "variant" -# define OSINFO_MEDIA_PROP_VOLUME_SIZE "volume-size" -# define OSINFO_MEDIA_PROP_EJECT_AFTER_INSTALL "eject-after-install" -# define OSINFO_MEDIA_PROP_INSTALLER_SCRIPT "installer-script" -# define OSINFO_MEDIA_PROP_BOOTABLE "bootable" +#define OSINFO_MEDIA_PROP_ARCHITECTURE "architecture" +#define OSINFO_MEDIA_PROP_URL "url" +#define OSINFO_MEDIA_PROP_VOLUME_ID "volume-id" +#define OSINFO_MEDIA_PROP_SYSTEM_ID "system-id" +#define OSINFO_MEDIA_PROP_PUBLISHER_ID "publisher-id" +#define OSINFO_MEDIA_PROP_APPLICATION_ID "application-id" +#define OSINFO_MEDIA_PROP_KERNEL "kernel" +#define OSINFO_MEDIA_PROP_INITRD "initrd" +#define OSINFO_MEDIA_PROP_LIVE "live" +#define OSINFO_MEDIA_PROP_INSTALLER "installer" +#define OSINFO_MEDIA_PROP_INSTALLER_REBOOTS "installer-reboots" +#define OSINFO_MEDIA_PROP_LANG "l10n-language" +#define OSINFO_MEDIA_PROP_LANG_REGEX "l10n-language-regex" +#define OSINFO_MEDIA_PROP_LANG_MAP "l10n-language-map" +#define OSINFO_MEDIA_PROP_VARIANT "variant" +#define OSINFO_MEDIA_PROP_VOLUME_SIZE "volume-size" +#define OSINFO_MEDIA_PROP_EJECT_AFTER_INSTALL "eject-after-install" +#define OSINFO_MEDIA_PROP_INSTALLER_SCRIPT "installer-script" +#define OSINFO_MEDIA_PROP_BOOTABLE "bootable" OsinfoMedia *osinfo_media_new(const gchar *id, const gchar *architecture); OsinfoMedia *osinfo_media_create_from_location(const gchar *location, @@ -139,5 +138,3 @@ gboolean osinfo_media_get_eject_after_install(OsinfoMedia *media); gboolean osinfo_media_supports_installer_script(OsinfoMedia *media); void osinfo_media_add_install_script(OsinfoMedia *media, OsinfoInstallScript *script); OsinfoInstallScriptList *osinfo_media_get_install_script_list(OsinfoMedia *media); - -#endif /* __OSINFO_MEDIA_H__ */ diff --git a/osinfo/osinfo_media_private.h b/osinfo/osinfo_media_private.h index bf8a410..5cef870 100644 --- a/osinfo/osinfo_media_private.h +++ b/osinfo/osinfo_media_private.h @@ -18,12 +18,9 @@ * . */ -#include +#pragma once -#ifndef __OSINFO_MEDIA_PRIVATE_H__ -# define __OSINFO_MEDIA_PRIVATE_H__ +#include void osinfo_media_set_languages(OsinfoMedia *media, GList *languages); void osinfo_media_set_os(OsinfoMedia *media, OsinfoOs *os); - -#endif /* __OSINFO_MEDIA_PRIVATE_H__ */ diff --git a/osinfo/osinfo_medialist.h b/osinfo/osinfo_medialist.h index 0f8c19a..3ef082e 100644 --- a/osinfo/osinfo_medialist.h +++ b/osinfo/osinfo_medialist.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_MEDIALIST_H__ -# define __OSINFO_MEDIALIST_H__ - -# define OSINFO_TYPE_MEDIALIST (osinfo_medialist_get_type ()) +#define OSINFO_TYPE_MEDIALIST (osinfo_medialist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoMediaList, osinfo_medialist, OSINFO, @@ -40,5 +39,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoMediaList *osinfo_medialist_new_intersection(OsinfoMediaList *sourceOne, OsinfoMediaList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoMediaList *osinfo_medialist_new_union(OsinfoMediaList *sourceOne, OsinfoMediaList *sourceTwo); - -#endif /* __OSINFO_MEDIALIST_H__ */ diff --git a/osinfo/osinfo_os.h b/osinfo/osinfo_os.h index 8358c71..72c2be5 100644 --- a/osinfo/osinfo_os.h +++ b/osinfo/osinfo_os.h @@ -18,6 +18,8 @@ * . */ +#pragma once + #include #include #include @@ -33,23 +35,20 @@ #include #include -#ifndef __OSINFO_OS_H__ -# define __OSINFO_OS_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_OS (osinfo_os_get_type ()) +#define OSINFO_TYPE_OS (osinfo_os_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoOs, osinfo_os, OSINFO, OS, OsinfoProduct) -# define OSINFO_OS_PROP_FAMILY "family" -# define OSINFO_OS_PROP_DISTRO "distro" -# define OSINFO_OS_PROP_RELEASE_STATUS "release-status" -# define OSINFO_OS_PROP_KERNEL_URL_ARGUMENT "kernel-url-argument" -# define OSINFO_OS_PROP_CLOUD_IMAGE_USERNAME "cloud-image-username" +#define OSINFO_OS_PROP_FAMILY "family" +#define OSINFO_OS_PROP_DISTRO "distro" +#define OSINFO_OS_PROP_RELEASE_STATUS "release-status" +#define OSINFO_OS_PROP_KERNEL_URL_ARGUMENT "kernel-url-argument" +#define OSINFO_OS_PROP_CLOUD_IMAGE_USERNAME "cloud-image-username" /** * OsinfoReleaseStatus: @@ -117,5 +116,3 @@ OsinfoFirmwareList *osinfo_os_get_complete_firmware_list(OsinfoOs *os, OsinfoFil void osinfo_os_add_firmware(OsinfoOs *os, OsinfoFirmware *firmware); const gchar *osinfo_os_get_cloud_image_username(OsinfoOs *os); - -#endif /* __OSINFO_OS_H__ */ diff --git a/osinfo/osinfo_os_variant.h b/osinfo/osinfo_os_variant.h index b4cccf1..6b3eda8 100644 --- a/osinfo/osinfo_os_variant.h +++ b/osinfo/osinfo_os_variant.h @@ -18,25 +18,22 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_OS_VARIANT_H__ -# define __OSINFO_OS_VARIANT_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_OS_VARIANT (osinfo_os_variant_get_type ()) +#define OSINFO_TYPE_OS_VARIANT (osinfo_os_variant_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoOsVariant, osinfo_os_variant, OSINFO, OS_VARIANT, OsinfoEntity) -# define OSINFO_OS_VARIANT_PROP_NAME "name" +#define OSINFO_OS_VARIANT_PROP_NAME "name" OsinfoOsVariant *osinfo_os_variant_new(const gchar *id); const gchar *osinfo_os_variant_get_name(OsinfoOsVariant *variant); - -#endif /* __OSINFO_OS_VARIANT_H__ */ diff --git a/osinfo/osinfo_os_variantlist.h b/osinfo/osinfo_os_variantlist.h index ef1fcb8..b01a5b1 100644 --- a/osinfo/osinfo_os_variantlist.h +++ b/osinfo/osinfo_os_variantlist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_OS_VARIANTLIST_H__ -# define __OSINFO_OS_VARIANTLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_OS_VARIANTLIST (osinfo_os_variantlist_get_type ()) +#define OSINFO_TYPE_OS_VARIANTLIST (osinfo_os_variantlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoOsVariantList, osinfo_os_variantlist, OSINFO, @@ -34,5 +33,3 @@ OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoOsVariantList, OsinfoList) OsinfoOsVariantList *osinfo_os_variantlist_new(void); - -#endif /* __OSINFO_OS_VARIANTLIST_H__ */ diff --git a/osinfo/osinfo_oslist.h b/osinfo/osinfo_oslist.h index cf2f624..2ab2c2f 100644 --- a/osinfo/osinfo_oslist.h +++ b/osinfo/osinfo_oslist.h @@ -18,16 +18,15 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_OSLIST_H__ -# define __OSINFO_OSLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_OSLIST (osinfo_oslist_get_type ()) +#define OSINFO_TYPE_OSLIST (osinfo_oslist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoOsList, osinfo_oslist, OSINFO, @@ -43,5 +42,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoOsList *osinfo_oslist_new_intersection(OsinfoOsList *sourceOne, OsinfoOsList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoOsList *osinfo_oslist_new_union(OsinfoOsList *sourceOne, OsinfoOsList *sourceTwo); - -#endif /* __OSINFO_OSLIST_H__ */ diff --git a/osinfo/osinfo_platform.h b/osinfo/osinfo_platform.h index dceec48..d7ba29d 100644 --- a/osinfo/osinfo_platform.h +++ b/osinfo/osinfo_platform.h @@ -18,18 +18,17 @@ * . */ +#pragma once + #include #include #include #include -#ifndef __OSINFO_PLATFORM_H__ -# define __OSINFO_PLATFORM_H__ - /* * Type macros. */ -# define OSINFO_TYPE_PLATFORM (osinfo_platform_get_type ()) +#define OSINFO_TYPE_PLATFORM (osinfo_platform_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoPlatform, osinfo_platform, OSINFO, @@ -43,5 +42,3 @@ OsinfoDeviceList *osinfo_platform_get_all_devices(OsinfoPlatform *platform, Osin OsinfoDeviceLinkList *osinfo_platform_get_device_links(OsinfoPlatform *platform, OsinfoFilter *filter); OsinfoDeviceLink *osinfo_platform_add_device(OsinfoPlatform *platform, OsinfoDevice *dev); - -#endif /* __OSINFO_PLATFORM_H__ */ diff --git a/osinfo/osinfo_platformlist.h b/osinfo/osinfo_platformlist.h index 7582674..1313878 100644 --- a/osinfo/osinfo_platformlist.h +++ b/osinfo/osinfo_platformlist.h @@ -18,14 +18,13 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_PLATFORMLIST_H__ -# define __OSINFO_PLATFORMLIST_H__ - -# define OSINFO_TYPE_PLATFORMLIST (osinfo_platformlist_get_type ()) +#define OSINFO_TYPE_PLATFORMLIST (osinfo_platformlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoPlatformList, osinfo_platformlist, OSINFO, @@ -41,5 +40,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoPlatformList *osinfo_platformlist_new_intersection(OsinfoPlatformList *sourceOne, OsinfoPlatformList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoPlatformList *osinfo_platformlist_new_union(OsinfoPlatformList *sourceOne, OsinfoPlatformList *sourceTwo); - -#endif /* __OSINFO_PLATFORMLIST_H__ */ diff --git a/osinfo/osinfo_product.h b/osinfo/osinfo_product.h index eef778e..45919c0 100644 --- a/osinfo/osinfo_product.h +++ b/osinfo/osinfo_product.h @@ -18,29 +18,28 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_PRODUCT_H__ -# define __OSINFO_PRODUCT_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_PRODUCT (osinfo_product_get_type ()) +#define OSINFO_TYPE_PRODUCT (osinfo_product_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoProduct, osinfo_product, OSINFO, PRODUCT, OsinfoEntity) -# define OSINFO_PRODUCT_PROP_VENDOR "vendor" -# define OSINFO_PRODUCT_PROP_VERSION "version" -# define OSINFO_PRODUCT_PROP_SHORT_ID "short-id" -# define OSINFO_PRODUCT_PROP_NAME "name" -# define OSINFO_PRODUCT_PROP_RELEASE_DATE "release-date" -# define OSINFO_PRODUCT_PROP_EOL_DATE "eol-date" -# define OSINFO_PRODUCT_PROP_CODENAME "codename" -# define OSINFO_PRODUCT_PROP_LOGO "logo" +#define OSINFO_PRODUCT_PROP_VENDOR "vendor" +#define OSINFO_PRODUCT_PROP_VERSION "version" +#define OSINFO_PRODUCT_PROP_SHORT_ID "short-id" +#define OSINFO_PRODUCT_PROP_NAME "name" +#define OSINFO_PRODUCT_PROP_RELEASE_DATE "release-date" +#define OSINFO_PRODUCT_PROP_EOL_DATE "eol-date" +#define OSINFO_PRODUCT_PROP_CODENAME "codename" +#define OSINFO_PRODUCT_PROP_LOGO "logo" typedef enum { OSINFO_PRODUCT_RELATIONSHIP_DERIVES_FROM, @@ -65,5 +64,3 @@ GDate *osinfo_product_get_eol_date(OsinfoProduct *product); const gchar *osinfo_product_get_logo(OsinfoProduct *product); GList *osinfo_product_get_short_id_list(OsinfoProduct *product); - -#endif /* __OSINFO_PRODUCT_H__ */ diff --git a/osinfo/osinfo_product_private.h b/osinfo/osinfo_product_private.h index 9a7006b..7dd9c38 100644 --- a/osinfo/osinfo_product_private.h +++ b/osinfo/osinfo_product_private.h @@ -18,10 +18,9 @@ * . */ -#include "osinfo_product.h" +#pragma once -#ifndef __OSINFO_PRODUCT_PRIVATE_H__ -# define __OSINFO_PRODUCT_PRIVATE_H__ +#include "osinfo_product.h" typedef void (*OsinfoProductForeach)(OsinfoProduct *product, gpointer user_data); @@ -36,5 +35,3 @@ void osinfo_product_foreach_related(OsinfoProduct *product, unsigned int flags, OsinfoProductForeach foreach_func, gpointer user_data); - -#endif /* __OSINFO_PRODUCT_PRIVATE_H__ */ diff --git a/osinfo/osinfo_productfilter.h b/osinfo/osinfo_productfilter.h index bc9586f..8a5b440 100644 --- a/osinfo/osinfo_productfilter.h +++ b/osinfo/osinfo_productfilter.h @@ -18,12 +18,11 @@ * . */ -#ifndef __OSINFO_PRODUCTFILTER_H__ -# define __OSINFO_PRODUCTFILTER_H__ +#pragma once -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_PRODUCTFILTER (osinfo_productfilter_get_type ()) +#define OSINFO_TYPE_PRODUCTFILTER (osinfo_productfilter_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoProductFilter, osinfo_productfilter, OSINFO, @@ -39,5 +38,3 @@ void osinfo_productfilter_clear_product_constraints(OsinfoProductFilter *product GList *osinfo_productfilter_get_product_constraint_values(OsinfoProductFilter *productfilter, OsinfoProductRelationship relshp); void osinfo_productfilter_add_support_date_constraint(OsinfoProductFilter *productfilter, GDate *when); - -#endif /* __OSINFO_PRODUCTFILTER_H__ */ diff --git a/osinfo/osinfo_productlist.h b/osinfo/osinfo_productlist.h index 5509420..58555de 100644 --- a/osinfo/osinfo_productlist.h +++ b/osinfo/osinfo_productlist.h @@ -18,16 +18,15 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_PRODUCTLIST_H__ -# define __OSINFO_PRODUCTLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_PRODUCTLIST (osinfo_productlist_get_type ()) +#define OSINFO_TYPE_PRODUCTLIST (osinfo_productlist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoProductList, osinfo_productlist, OSINFO, @@ -43,5 +42,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoProductList *osinfo_productlist_new_intersection(OsinfoProductList *sourceOne, OsinfoProductList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoProductList *osinfo_productlist_new_union(OsinfoProductList *sourceOne, OsinfoProductList *sourceTwo); - -#endif /* __OSINFO_PRODUCTLIST_H__ */ diff --git a/osinfo/osinfo_resources.h b/osinfo/osinfo_resources.h index 4f55458..097516c 100644 --- a/osinfo/osinfo_resources.h +++ b/osinfo/osinfo_resources.h @@ -18,33 +18,32 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_RESOURCES_H__ -# define __OSINFO_RESOURCES_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_ARCHITECTURE_ALL "all" -# define OSINFO_MEGAHERTZ 1000000 -# define OSINFO_KIBIBYTES 1024 -# define OSINFO_MEBIBYTES 1048576 -# define OSINFO_GIBIBYTES 1073741824 +#define OSINFO_ARCHITECTURE_ALL "all" +#define OSINFO_MEGAHERTZ 1000000 +#define OSINFO_KIBIBYTES 1024 +#define OSINFO_MEBIBYTES 1048576 +#define OSINFO_GIBIBYTES 1073741824 -# define OSINFO_TYPE_RESOURCES (osinfo_resources_get_type ()) +#define OSINFO_TYPE_RESOURCES (osinfo_resources_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoResources, osinfo_resources, OSINFO, RESOURCES, OsinfoEntity) -# define OSINFO_RESOURCES_PROP_ARCHITECTURE "architecture" -# define OSINFO_RESOURCES_PROP_CPU "cpu" -# define OSINFO_RESOURCES_PROP_N_CPUS "n-cpus" -# define OSINFO_RESOURCES_PROP_RAM "ram" -# define OSINFO_RESOURCES_PROP_STORAGE "storage" +#define OSINFO_RESOURCES_PROP_ARCHITECTURE "architecture" +#define OSINFO_RESOURCES_PROP_CPU "cpu" +#define OSINFO_RESOURCES_PROP_N_CPUS "n-cpus" +#define OSINFO_RESOURCES_PROP_RAM "ram" +#define OSINFO_RESOURCES_PROP_STORAGE "storage" OsinfoResources *osinfo_resources_new(const gchar *id, const gchar *architecture); @@ -58,5 +57,3 @@ void osinfo_resources_set_n_cpus(OsinfoResources *resources, gint n_cpus); void osinfo_resources_set_cpu(OsinfoResources *resources, gint64 cpu); void osinfo_resources_set_ram(OsinfoResources *resources, gint64 ram); void osinfo_resources_set_storage(OsinfoResources *resources, gint64 storage); - -#endif /* __OSINFO_RESOURCES_H__ */ diff --git a/osinfo/osinfo_resources_private.h b/osinfo/osinfo_resources_private.h index 214837b..770002f 100644 --- a/osinfo/osinfo_resources_private.h +++ b/osinfo/osinfo_resources_private.h @@ -18,12 +18,9 @@ * . */ -#include +#pragma once -#ifndef __OSINFO_RESOURCES_PRIVATE_H__ -# define __OSINFO_RESOURCES_PRIVATE_H__ +#include void osinfo_resources_set_inherit(OsinfoResources *resources, gboolean inherit); gboolean osinfo_resources_get_inherit(OsinfoResources *resources); - -#endif /* __OSINFO_RESOURCES_PRIVATE_H__ */ diff --git a/osinfo/osinfo_resourceslist.h b/osinfo/osinfo_resourceslist.h index cc69f1c..09f43d0 100644 --- a/osinfo/osinfo_resourceslist.h +++ b/osinfo/osinfo_resourceslist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_RESOURCESLIST_H__ -# define __OSINFO_RESOURCESLIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_RESOURCESLIST (osinfo_resourceslist_get_type ()) +#define OSINFO_TYPE_RESOURCESLIST (osinfo_resourceslist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoResourcesList, osinfo_resourceslist, OSINFO, @@ -48,5 +47,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoResourcesList *osinfo_resourceslist_new_union (OsinfoResourcesList *sourceOne, OsinfoResourcesList *sourceTwo); - -#endif /* __OSINFO_RESOURCESLIST_H__ */ diff --git a/osinfo/osinfo_tree.h b/osinfo/osinfo_tree.h index 59cf63f..353dc0c 100644 --- a/osinfo/osinfo_tree.h +++ b/osinfo/osinfo_tree.h @@ -18,19 +18,18 @@ * . */ +#pragma once + #include #include #include -#ifndef __OSINFO_TREE_H__ -# define __OSINFO_TREE_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" GQuark osinfo_tree_error_quark (void) G_GNUC_CONST; -# define OSINFO_TREE_ERROR (osinfo_tree_error_quark ()) +#define OSINFO_TREE_ERROR (osinfo_tree_error_quark ()) /** * OsinfoTreeError: @@ -47,24 +46,24 @@ typedef enum { OSINFO_TREE_ERROR_NOT_SUPPORTED_PROTOCOL } OsinfoTreeError; -# define OSINFO_TYPE_TREE (osinfo_tree_get_type ()) +#define OSINFO_TYPE_TREE (osinfo_tree_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoTree, osinfo_tree, OSINFO, TREE, OsinfoEntity) -# define OSINFO_TREE_PROP_ARCHITECTURE "architecture" -# define OSINFO_TREE_PROP_URL "url" -# define OSINFO_TREE_PROP_TREEINFO_FAMILY "treeinfo-family" -# define OSINFO_TREE_PROP_TREEINFO_VARIANT "treeinfo-variant" -# define OSINFO_TREE_PROP_TREEINFO_VERSION "treeinfo-version" -# define OSINFO_TREE_PROP_TREEINFO_ARCH "treeinfo-arch" -# define OSINFO_TREE_PROP_BOOT_ISO "boot-iso" -# define OSINFO_TREE_PROP_KERNEL "kernel" -# define OSINFO_TREE_PROP_INITRD "initrd" -# define OSINFO_TREE_PROP_HAS_TREEINFO "has-treeinfo" -# define OSINFO_TREE_PROP_VARIANT "variant" +#define OSINFO_TREE_PROP_ARCHITECTURE "architecture" +#define OSINFO_TREE_PROP_URL "url" +#define OSINFO_TREE_PROP_TREEINFO_FAMILY "treeinfo-family" +#define OSINFO_TREE_PROP_TREEINFO_VARIANT "treeinfo-variant" +#define OSINFO_TREE_PROP_TREEINFO_VERSION "treeinfo-version" +#define OSINFO_TREE_PROP_TREEINFO_ARCH "treeinfo-arch" +#define OSINFO_TREE_PROP_BOOT_ISO "boot-iso" +#define OSINFO_TREE_PROP_KERNEL "kernel" +#define OSINFO_TREE_PROP_INITRD "initrd" +#define OSINFO_TREE_PROP_HAS_TREEINFO "has-treeinfo" +#define OSINFO_TREE_PROP_VARIANT "variant" OsinfoTree *osinfo_tree_new(const gchar *id, const gchar *architecture); OsinfoTree *osinfo_tree_create_from_location(const gchar *location, @@ -97,5 +96,3 @@ OsinfoOs *osinfo_tree_get_os(OsinfoTree *tree); void osinfo_tree_set_os(OsinfoTree *tree, OsinfoOs *os); OsinfoOsVariantList *osinfo_tree_get_os_variants(OsinfoTree *tree); /* XXX Xen kernel/initrd paths ? */ - -#endif /* __OSINFO_TREE_H__ */ diff --git a/osinfo/osinfo_treelist.h b/osinfo/osinfo_treelist.h index 2c792fa..8be8cbc 100644 --- a/osinfo/osinfo_treelist.h +++ b/osinfo/osinfo_treelist.h @@ -18,15 +18,14 @@ * . */ +#pragma once + #include #include -#ifndef __OSINFO_TREELIST_H__ -# define __OSINFO_TREELIST_H__ - -# include "osinfo/osinfo_macros.h" +#include "osinfo/osinfo_macros.h" -# define OSINFO_TYPE_TREELIST (osinfo_treelist_get_type ()) +#define OSINFO_TYPE_TREELIST (osinfo_treelist_get_type ()) OSINFO_DECLARE_TYPE_WITH_PRIVATE_AND_CLASS(OsinfoTreeList, osinfo_treelist, OSINFO, @@ -42,5 +41,3 @@ G_DEPRECATED_FOR(osinfo_list_new_intersection) OsinfoTreeList *osinfo_treelist_new_intersection(OsinfoTreeList *sourceOne, OsinfoTreeList *sourceTwo); G_DEPRECATED_FOR(osinfo_list_new_union) OsinfoTreeList *osinfo_treelist_new_union(OsinfoTreeList *sourceOne, OsinfoTreeList *sourceTwo); - -#endif /* __OSINFO_TREELIST_H__ */ diff --git a/osinfo/osinfo_util_private.h b/osinfo/osinfo_util_private.h index 9fed7d4..d83dd70 100644 --- a/osinfo/osinfo_util_private.h +++ b/osinfo/osinfo_util_private.h @@ -18,16 +18,13 @@ * . */ -#ifndef __OSINFO_UTIL_PRIVATE_H__ -# define __OSINFO_UTIL_PRIVATE_H__ +#pragma once -# include +#include gboolean osinfo_util_requires_soup(const gchar *location); -# if SOUP_MAJOR_VERSION < 3 -# define soup_message_get_status(message) message->status_code -# define soup_message_get_response_headers(message) message->response_headers -# endif - -#endif /* __OSINFO_UTIL_PRIVATE_H__ */ +#if SOUP_MAJOR_VERSION < 3 +# define soup_message_get_status(message) message->status_code +# define soup_message_get_response_headers(message) message->response_headers +#endif -- cgit v1.2.1