From d0d2c8b84e7cb04f2f94cc0f1f08e829a38b108d Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 10 Jan 2018 14:02:14 +0000 Subject: [PATCH] trivial: Add FWUPD_DEVICE_FLAG_REPORTED This flag is present in the history database when a report has been uploaded. --- libfwupd/fwupd-enums.c | 6 +++++- libfwupd/fwupd-enums.h | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libfwupd/fwupd-enums.c b/libfwupd/fwupd-enums.c index 6bd21b472..9466d621e 100644 --- a/libfwupd/fwupd-enums.c +++ b/libfwupd/fwupd-enums.c @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2015 Richard Hughes + * Copyright (C) 2015-2018 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -150,6 +150,8 @@ fwupd_device_flag_to_string (FwupdDeviceFlags device_flag) return "registered"; if (device_flag == FWUPD_DEVICE_FLAG_NEEDS_REBOOT) return "needs-reboot"; + if (device_flag == FWUPD_DEVICE_FLAG_REPORTED) + return "reported"; if (device_flag == FWUPD_DEVICE_FLAG_UNKNOWN) return "unknown"; return NULL; @@ -190,6 +192,8 @@ fwupd_device_flag_from_string (const gchar *device_flag) return FWUPD_DEVICE_FLAG_REGISTERED; if (g_strcmp0 (device_flag, "needs-reboot") == 0) return FWUPD_DEVICE_FLAG_NEEDS_REBOOT; + if (g_strcmp0 (device_flag, "reported") == 0) + return FWUPD_DEVICE_FLAG_REPORTED; return FWUPD_DEVICE_FLAG_UNKNOWN; } diff --git a/libfwupd/fwupd-enums.h b/libfwupd/fwupd-enums.h index 55695fb3a..2cd095545 100644 --- a/libfwupd/fwupd-enums.h +++ b/libfwupd/fwupd-enums.h @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * - * Copyright (C) 2015 Richard Hughes + * Copyright (C) 2015-2018 Richard Hughes * * Licensed under the GNU Lesser General Public License Version 2.1 * @@ -88,6 +88,7 @@ typedef enum { * @FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER: Requires a bootloader mode to be manually enabled by the user * @FWUPD_DEVICE_FLAG_REGISTERED: Has been registered with other plugins * @FWUPD_DEVICE_FLAG_NEEDS_REBOOT: Requires a reboot to apply firmware or to reload hardware + * @FWUPD_DEVICE_FLAG_REPORTED: Has been reported to a metadata server * * The device flags. **/ @@ -101,6 +102,7 @@ typedef enum { #define FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER (1u << 6) /* Since: 0.7.3 */ #define FWUPD_DEVICE_FLAG_REGISTERED (1u << 7) /* Since: 0.9.7 */ #define FWUPD_DEVICE_FLAG_NEEDS_REBOOT (1u << 8) /* Since: 0.9.7 */ +#define FWUPD_DEVICE_FLAG_REPORTED (1u << 9) /* Since: 1.0.4 */ #define FWUPD_DEVICE_FLAG_UNKNOWN G_MAXUINT64 /* Since: 0.7.3 */ typedef guint64 FwupdDeviceFlags;