trivial: Add FWUPD_DEVICE_FLAG_REPORTED

This flag is present in the history database when a report has been uploaded.
This commit is contained in:
Richard Hughes 2018-01-10 14:02:14 +00:00
parent a2f8e45c0f
commit d0d2c8b84e
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
* *
* Copyright (C) 2015 Richard Hughes <richard@hughsie.com> * Copyright (C) 2015-2018 Richard Hughes <richard@hughsie.com>
* *
* Licensed under the GNU Lesser General Public License Version 2.1 * 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"; return "registered";
if (device_flag == FWUPD_DEVICE_FLAG_NEEDS_REBOOT) if (device_flag == FWUPD_DEVICE_FLAG_NEEDS_REBOOT)
return "needs-reboot"; return "needs-reboot";
if (device_flag == FWUPD_DEVICE_FLAG_REPORTED)
return "reported";
if (device_flag == FWUPD_DEVICE_FLAG_UNKNOWN) if (device_flag == FWUPD_DEVICE_FLAG_UNKNOWN)
return "unknown"; return "unknown";
return NULL; return NULL;
@ -190,6 +192,8 @@ fwupd_device_flag_from_string (const gchar *device_flag)
return FWUPD_DEVICE_FLAG_REGISTERED; return FWUPD_DEVICE_FLAG_REGISTERED;
if (g_strcmp0 (device_flag, "needs-reboot") == 0) if (g_strcmp0 (device_flag, "needs-reboot") == 0)
return FWUPD_DEVICE_FLAG_NEEDS_REBOOT; return FWUPD_DEVICE_FLAG_NEEDS_REBOOT;
if (g_strcmp0 (device_flag, "reported") == 0)
return FWUPD_DEVICE_FLAG_REPORTED;
return FWUPD_DEVICE_FLAG_UNKNOWN; return FWUPD_DEVICE_FLAG_UNKNOWN;
} }

View File

@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
* *
* Copyright (C) 2015 Richard Hughes <richard@hughsie.com> * Copyright (C) 2015-2018 Richard Hughes <richard@hughsie.com>
* *
* Licensed under the GNU Lesser General Public License Version 2.1 * 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_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_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_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. * 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_NEEDS_BOOTLOADER (1u << 6) /* Since: 0.7.3 */
#define FWUPD_DEVICE_FLAG_REGISTERED (1u << 7) /* Since: 0.9.7 */ #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_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 */ #define FWUPD_DEVICE_FLAG_UNKNOWN G_MAXUINT64 /* Since: 0.7.3 */
typedef guint64 FwupdDeviceFlags; typedef guint64 FwupdDeviceFlags;