Commit 3fb66aa1 authored by Richard Hughes's avatar Richard Hughes

Use '#pragma once' to avoid a lot of boilerplate

parent 4f38e396
Pipeline #57965 passed with stage
in 5 minutes and 33 seconds
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GNOME_SOFTWARE_PRIVATE_H__
#define __GNOME_SOFTWARE_PRIVATE_H__
#pragma once
#ifndef I_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE
#define I_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE
......@@ -21,6 +20,3 @@
#include <gs-plugin-loader.h>
#include <gs-plugin-loader-sync.h>
#include <gs-plugin-private.h>
#endif /* __GNOME_SOFTWARE_PRIVATE_H__ */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GNOME_SOFTWARE_H__
#define __GNOME_SOFTWARE_H__
#pragma once
#ifndef I_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE
#error You have to define I_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE
......@@ -21,6 +20,3 @@
#include <gs-plugin.h>
#include <gs-plugin-vfuncs.h>
#include <gs-utils.h>
#endif /* __GNOME_SOFTWARE_H__ */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_APP_COLLATION_H
#define __GS_APP_COLLATION_H
#pragma once
#include <glib-object.h>
......@@ -19,5 +18,3 @@ GsAppList *gs_app_get_addons (GsApp *app);
GsAppList *gs_app_get_history (GsApp *app);
G_END_DECLS
#endif /* __GS_APP_COLLATION_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_APP_LIST_PRIVATE_H
#define __GS_APP_LIST_PRIVATE_H
#pragma once
#include "gs-app-list.h"
......@@ -73,5 +72,3 @@ AsAppState gs_app_list_get_state (GsAppList *list);
guint gs_app_list_get_progress (GsAppList *list);
G_END_DECLS
#endif /* __GS_APP_LIST_PRIVATE_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_APP_LIST_H
#define __GS_APP_LIST_H
#pragma once
#include <glib-object.h>
......@@ -44,5 +43,3 @@ void gs_app_list_filter (GsAppList *list,
gpointer user_data);
G_END_DECLS
#endif /* __GS_APP_LIST_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_APP_PRIVATE_H
#define __GS_APP_PRIVATE_H
#pragma once
#include "gs-app.h"
#include "gs-plugin-types.h"
......@@ -28,5 +27,3 @@ gint gs_app_compare_priority (GsApp *app1,
GsApp *app2);
G_END_DECLS
#endif /* __GS_APP_PRIVATE_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_APP_H
#define __GS_APP_H
#pragma once
#include <glib-object.h>
#include <gdk/gdk.h>
......@@ -384,5 +383,3 @@ void gs_app_set_update_permissions (GsApp *app,
GsAppPermissions update_permissions);
G_END_DECLS
#endif /* __GS_APP_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_AUTH_H
#define __GS_AUTH_H
#pragma once
#include <glib-object.h>
#include <gio/gio.h>
......@@ -38,5 +37,3 @@ GoaObject *gs_auth_peek_goa_object (GsAuth *auth);
void gs_auth_set_goa_object (GsAuth *auth,
GoaObject *goa_object);
G_END_DECLS
#endif /* __GS_AUTH_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_CATEGORY_PRIVATE_H
#define __GS_CATEGORY_PRIVATE_H
#pragma once
#include "gs-category.h"
......@@ -19,5 +18,3 @@ void gs_category_set_size (GsCategory *category,
gchar *gs_category_to_string (GsCategory *category);
G_END_DECLS
#endif /* __GS_CATEGORY_PRIVATE_H */
......@@ -7,8 +7,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_CATEGORY_H
#define __GS_CATEGORY_H
#pragma once
#include <glib-object.h>
#include <gdk/gdk.h>
......@@ -52,5 +51,3 @@ guint gs_category_get_size (GsCategory *category);
void gs_category_increment_size (GsCategory *category);
G_END_DECLS
#endif /* __GS_CATEGORY_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_DEBUG_H
#define __GS_DEBUG_H
#pragma once
#include <glib-object.h>
......@@ -19,5 +18,3 @@ G_DECLARE_FINAL_TYPE (GsDebug, gs_debug, GS, DEBUG, GObject)
GsDebug *gs_debug_new (void);
G_END_DECLS
#endif /* __GS_DEBUG_H */
......@@ -18,8 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef __GS_IOPRIO_H__
#define __GS_IOPRIO_H__
#pragma once
#include <glib.h>
......@@ -28,5 +27,3 @@ G_BEGIN_DECLS
void gs_ioprio_init (void);
G_END_DECLS
#endif /* __GS_IOPRIO_H__ */
......@@ -6,9 +6,6 @@
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
*/
/**
* SECTION:gs-os-release
* @title: GsOsRelease
......
......@@ -7,10 +7,6 @@
*/
#pragma once
*/
#ifndef __GS_OS_RELEASE_H
#define __GS_OS_RELEASE_H
#include <glib-object.h>
......@@ -34,5 +30,3 @@ const gchar *gs_os_release_get_distro_codename (GsOsRelease *os_release);
const gchar *gs_os_release_get_home_url (GsOsRelease *os_release);
G_END_DECLS
#endif /* __GS_OS_RELEASE_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_EVENT
#define __GS_PLUGIN_EVENT
#pragma once
#include <glib-object.h>
......@@ -65,5 +64,3 @@ gboolean gs_plugin_event_has_flag (GsPluginEvent *event,
GsPluginEventFlag flag);
G_END_DECLS
#endif /* __GS_PLUGIN_EVENT */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_JOB_PRIVATE
#define __GS_PLUGIN_JOB_PRIVATE
#pragma once
#include <glib-object.h>
......@@ -44,5 +43,3 @@ void gs_plugin_job_set_action (GsPluginJob *self,
GsPluginAction action);
G_END_DECLS
#endif /* __GS_PLUGIN_JOB_PRIVATE */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_JOB
#define __GS_PLUGIN_JOB
#pragma once
#include <glib-object.h>
......@@ -62,5 +61,3 @@ void gs_plugin_job_set_price (GsPluginJob *self,
#define gs_plugin_job_newv(a,...) GS_PLUGIN_JOB(g_object_new(GS_TYPE_PLUGIN_JOB, "action", a, __VA_ARGS__))
G_END_DECLS
#endif /* __GS_PLUGIN_JOB */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_LOADER_SYNC_H
#define __GS_PLUGIN_LOADER_SYNC_H
#pragma once
#include <glib-object.h>
......@@ -32,5 +31,3 @@ GPtrArray *gs_plugin_loader_job_get_categories (GsPluginLoader *plugin_loader,
GError **error);
G_END_DECLS
#endif /* __GS_PLUGIN_LOADER_SYNC_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_LOADER_H
#define __GS_PLUGIN_LOADER_H
#pragma once
#include <glib-object.h>
......@@ -94,7 +93,4 @@ GsPlugin *gs_plugin_loader_find_plugin (GsPluginLoader *plugin_loader,
void gs_plugin_loader_set_max_parallel_ops (GsPluginLoader *plugin_loader,
guint max_ops);
G_END_DECLS
#endif /* __GS_PLUGIN_LOADER_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_PRIVATE_H
#define __GS_PLUGIN_PRIVATE_H
#pragma once
#include <appstream-glib.h>
#include <glib-object.h>
......@@ -53,5 +52,3 @@ void gs_plugin_set_network_monitor (GsPlugin *plugin,
GNetworkMonitor *monitor);
G_END_DECLS
#endif /* __GS_PLUGIN_PRIVATE_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_TYPES_H
#define __GS_PLUGIN_TYPES_H
#pragma once
#include <glib-object.h>
......@@ -280,5 +279,3 @@ typedef enum {
} GsPluginAction;
G_END_DECLS
#endif /* __GS_PLUGIN_TYPES_H */
......@@ -5,6 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#pragma once
/**
* SECTION:gs-plugin-vfuncs
......@@ -14,9 +15,6 @@
* @short_description: Vfuncs that plugins can implement
*/
#ifndef __GS_PLUGIN_VFUNCS_H
#define __GS_PLUGIN_VFUNCS_H
#include <appstream-glib.h>
#include <glib-object.h>
#include <gmodule.h>
......@@ -964,5 +962,3 @@ gboolean gs_plugin_update (GsPlugin *plugin,
GError **error);
G_END_DECLS
#endif /* __GS_PLUGIN_VFUNCS_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PLUGIN_H
#define __GS_PLUGIN_H
#pragma once
#include <appstream-glib.h>
#include <glib-object.h>
......@@ -124,5 +123,3 @@ void gs_plugin_set_allow_updates (GsPlugin *plugin,
gboolean gs_plugin_get_network_available (GsPlugin *plugin);
G_END_DECLS
#endif /* __GS_PLUGIN_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PRICE_H
#define __GS_PRICE_H
#pragma once
#include <glib-object.h>
......@@ -30,5 +29,3 @@ void gs_price_set_currency (GsPrice *price,
gchar *gs_price_to_string (GsPrice *price);
G_END_DECLS
#endif /* __GS_PRICE_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_TEST_H
#define __GS_TEST_H
#pragma once
#include "gs-app.h"
......@@ -17,5 +16,3 @@ gchar *gs_test_get_filename (const gchar *testdatadir,
const gchar *filename);
G_END_DECLS
#endif /* __GS_TEST_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_UTILS_H
#define __GS_UTILS_H
#pragma once
#include <gio/gdesktopappinfo.h>
#include <gtk/gtk.h>
......@@ -91,5 +90,3 @@ gboolean gs_utils_parse_evr (const gchar *evr,
gchar **out_release);
G_END_DECLS
#endif /* __GS_UTILS_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __APPSTREAM_COMMON_H
#define __APPSTREAM_COMMON_H
#pragma once
#include <gnome-software.h>
#include <xmlb.h>
......@@ -74,5 +73,3 @@ void gs_appstream_component_add_provide (XbBuilderNode *component,
const gchar *str);
G_END_DECLS
#endif /* __APPSTREAM_COMMON_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_DESKTOP_GROUP_H
#define __GS_DESKTOP_GROUP_H
#pragma once
#include <glib-object.h>
......@@ -30,5 +29,3 @@ typedef struct {
const GsDesktopData *gs_desktop_get_data (void);
G_END_DECLS
#endif /* __GS_DESKTOP_GROUP_H */
......@@ -7,13 +7,10 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_EXTERNAL_APPSTREAM_UTILS_H
#define GS_EXTERNAL_APPSTREAM_UTILS_H
#pragma once
#include <config.h>
#include <glib.h>
const gchar *gs_external_appstream_utils_get_system_dir (void);
gchar *gs_external_appstream_utils_get_file_cache_path (const gchar *file_name);
#endif /* GS_EXTERNAL_APPSTREAM_UTILS_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_FLATPAK_APP_H
#define __GS_FLATPAK_APP_H
#pragma once
#include <gnome-software.h>
#include <flatpak.h>
......@@ -63,5 +62,3 @@ void gs_flatpak_app_set_main_app_ref_name (GsApp *app,
const gchar *gs_flatpak_app_get_main_app_ref_name (GsApp *app);
G_END_DECLS
#endif /* __GS_FLATPAK_APP_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_FLATPAK_TRANSACTION_H
#define __GS_FLATPAK_TRANSACTION_H
#pragma once
#include <gnome-software.h>
#include <flatpak.h>
......@@ -30,6 +29,3 @@ gboolean gs_flatpak_transaction_run (FlatpakTransaction *transaction,
GError **error);
G_END_DECLS
#endif /* __GS_FLATPAK_TRANSACTION_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_FLATPAK_UTILS_H
#define __GS_FLATPAK_UTILS_H
#pragma once
G_BEGIN_DECLS
......@@ -19,6 +18,3 @@ GsApp *gs_flatpak_app_new_from_repo_file (GFile *file,
GError **error);
G_END_DECLS
#endif /* __GS_FLATPAK_UTILS_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_FLATPAK_H
#define __GS_FLATPAK_H
#pragma once
#include <gnome-software.h>
#include <flatpak.h>
......@@ -126,6 +125,3 @@ gboolean gs_flatpak_add_recent (GsFlatpak *self,
GError **error);
G_END_DECLS
#endif /* __GS_FLATPAK_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_FWUPD_APP_H
#define __GS_FWUPD_APP_H
#pragma once
#include <gnome-software.h>
#include <fwupd.h>
......@@ -29,5 +28,3 @@ void gs_fwupd_app_set_from_release (GsApp *app,
FwupdRelease *rel);
G_END_DECLS
#endif /* __GS_FWUPD_APP_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_MARKDOWN_H
#define __GS_MARKDOWN_H
#pragma once
#include <glib-object.h>
......@@ -39,6 +38,3 @@ gchar *gs_markdown_parse (GsMarkdown *self,
const gchar *text);
G_END_DECLS
#endif /* __GS_MARKDOWN_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_PACKAGEKIT_HELPER_H
#define __GS_PACKAGEKIT_HELPER_H
#pragma once
#include <glib-object.h>
#include <gnome-software.h>
......@@ -30,6 +29,3 @@ void gs_packagekit_helper_cb (PkProgress *progress,
G_END_DECLS
#endif /* __GS_PACKAGEKIT_HELPER_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __PACKAGEKIT_COMMON_H
#define __PACKAGEKIT_COMMON_H
#pragma once
#include <glib.h>
#include <gnome-software.h>
......@@ -37,5 +36,3 @@ void gs_plugin_packagekit_set_packaging_format (GsPlugin *plugin,
GsApp *app);
G_END_DECLS
#endif /* __PACKAGEKIT_COMMON_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_APP_ADDON_ROW_H
#define GS_APP_ADDON_ROW_H
#pragma once
#include <gtk/gtk.h>
......@@ -27,5 +26,3 @@ gboolean gs_app_addon_row_get_selected (GsAppAddonRow *row);
GsApp *gs_app_addon_row_get_addon (GsAppAddonRow *row);
G_END_DECLS
#endif /* GS_APP_ADDON_ROW_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_APP_FOLDER_DIALOG_H
#define GS_APP_FOLDER_DIALOG_H
#pragma once
#include <gtk/gtk.h>
......@@ -22,5 +21,3 @@ GtkWidget *gs_app_folder_dialog_new (GtkWindow *parent,
GList *apps);
G_END_DECLS
#endif /* GS_APP_FOLDER_DIALOG_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_APP_ROW_H
#define GS_APP_ROW_H
#pragma once
#include <gtk/gtk.h>
......@@ -54,5 +53,3 @@ void gs_app_row_set_show_installed_size (GsAppRow *app_row,
gboolean show_size);
G_END_DECLS
#endif /* GS_APP_ROW_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_APP_TILE_H
#define GS_APP_TILE_H
#pragma once
#include <gtk/gtk.h>
......@@ -33,5 +32,3 @@ void gs_app_tile_set_app (GsAppTile *tile,
GsApp *cat);
G_END_DECLS
#endif /* GS_APP_TILE_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_APPLICATION_H
#define __GS_APPLICATION_H
#pragma once
#include <gtk/gtk.h>
......@@ -19,5 +18,3 @@ G_DECLARE_FINAL_TYPE (GsApplication, gs_application, GS, APPLICATION, GtkApplica
GsApplication *gs_application_new (void);
GsPluginLoader *gs_application_get_plugin_loader (GsApplication *application);
gboolean gs_application_has_active_window (GsApplication *application);
#endif /* __GS_APPLICATION_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_AUTH_DIALOG_H
#define GS_AUTH_DIALOG_H
#pragma once
#include <gtk/gtk.h>
......@@ -24,5 +23,3 @@ GtkWidget *gs_auth_dialog_new (GsPluginLoader *plugin_loader,
GError **error);
G_END_DECLS
#endif /* GS_AUTH_DIALOG_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_CATEGORY_PAGE_H
#define __GS_CATEGORY_PAGE_H
#pragma once
#include "gs-page.h"
......@@ -23,5 +22,3 @@ void gs_category_page_set_category (GsCategoryPage *self,
GsCategory *gs_category_page_get_category (GsCategoryPage *self);
G_END_DECLS
#endif /* __GS_CATEGORY_PAGE_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef GS_CATEGORY_TILE_H
#define GS_CATEGORY_TILE_H
#pragma once
#include <gtk/gtk.h>
......@@ -27,5 +26,3 @@ void gs_category_tile_set_colorful (GsCategoryTile *tile,
gboolean colorful);
G_END_DECLS
#endif /* GS_CATEGORY_TILE_H */
......@@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_COMMON_H
#define __GS_COMMON_H
#pragma once
#include <gio/gdesktopappinfo.h>
#include <gtk/gtk.h>
......@@ -46,5 +45,3 @@ gboolean gs_utils_list_has_app_fuzzy (GsAppList *list,
GsApp *app);
G_END_DECLS
#endif /* __GS_COMMON_H */
......@@ -5,8 +5,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __GS_CONTENT_RATING_H
#define __GS_CONTENT_RATING_H
#pragma once
G_BEGIN_DECLS