/usr/include/fwupd-1/libfwupd/fwupd-enums.h is in libfwupd-dev 0.7.0-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2015 Richard Hughes <richard@hughsie.com>
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __FWUPD_ENUMS_H
#define __FWUPD_ENUMS_H
#include <glib.h>
#define FWUPD_DBUS_PATH "/"
#define FWUPD_DBUS_SERVICE "org.freedesktop.fwupd"
#define FWUPD_DBUS_INTERFACE "org.freedesktop.fwupd"
#define FWUPD_DEVICE_ID_ANY "*"
/**
* FwupdStatus:
* @FWUPD_STATUS_UNKNOWN: Unknown state
* @FWUPD_STATUS_IDLE: Idle
* @FWUPD_STATUS_LOADING: Loading a resource
* @FWUPD_STATUS_DECOMPRESSING: Decompressing firmware
* @FWUPD_STATUS_DEVICE_RESTART: Restarting the device
* @FWUPD_STATUS_DEVICE_WRITE: Writing to a device
* @FWUPD_STATUS_DEVICE_VERIFY: Verifying (reading) a device
* @FWUPD_STATUS_SCHEDULING: Scheduling an offline update
*
* The flags to show daemon status.
**/
typedef enum {
FWUPD_STATUS_UNKNOWN, /* Since: 0.1.1 */
FWUPD_STATUS_IDLE, /* Since: 0.1.1 */
FWUPD_STATUS_LOADING, /* Since: 0.1.1 */
FWUPD_STATUS_DECOMPRESSING, /* Since: 0.1.1 */
FWUPD_STATUS_DEVICE_RESTART, /* Since: 0.1.1 */
FWUPD_STATUS_DEVICE_WRITE, /* Since: 0.1.1 */
FWUPD_STATUS_DEVICE_VERIFY, /* Since: 0.1.1 */
FWUPD_STATUS_SCHEDULING, /* Since: 0.1.1 */
/*< private >*/
FWUPD_STATUS_LAST
} FwupdStatus;
/**
* FwupdTrustFlags:
* @FWUPD_TRUST_FLAG_NONE: No trust
* @FWUPD_TRUST_FLAG_PAYLOAD: The firmware is trusted
* @FWUPD_TRUST_FLAG_METADATA: The metadata is trusted
*
* The flags to show the level of trust.
**/
typedef enum {
FWUPD_TRUST_FLAG_NONE = 0, /* Since: 0.1.2 */
FWUPD_TRUST_FLAG_PAYLOAD = 1 << 0, /* Since: 0.1.2 */
FWUPD_TRUST_FLAG_METADATA = 1 << 1, /* Since: 0.1.2 */
/*< private >*/
FWUPD_TRUST_FLAG_LAST
} FwupdTrustFlags;
/**
* FwupdDeviceFlags:
* @FU_DEVICE_FLAG_NONE: No flags set
* @FU_DEVICE_FLAG_INTERNAL: Device cannot be removed easily
* @FU_DEVICE_FLAG_ALLOW_ONLINE: Permits 'live' updating
* @FU_DEVICE_FLAG_ALLOW_OFFLINE: Permits 'offline' updating
* @FU_DEVICE_FLAG_REQUIRE_AC: Requires AC power
* @FU_DEVICE_FLAG_LOCKED: Is locked and can be unlocked
*
* FIXME: rename FU_DEVICE_ -> FWUPD_DEVICE_ when we break API
*
* The device flags.
**/
typedef enum {
FU_DEVICE_FLAG_NONE = 0, /* Since: 0.1.3 */
FU_DEVICE_FLAG_INTERNAL = 1 << 0, /* Since: 0.1.3 */
FU_DEVICE_FLAG_ALLOW_ONLINE = 1 << 1, /* Since: 0.1.3 */
FU_DEVICE_FLAG_ALLOW_OFFLINE = 1 << 2, /* Since: 0.1.3 */
FU_DEVICE_FLAG_REQUIRE_AC = 1 << 3, /* Since: 0.6.3 */
FU_DEVICE_FLAG_LOCKED = 1 << 4, /* Since: 0.6.3 */
/*< private >*/
FU_DEVICE_FLAG_LAST
} FwupdDeviceFlags;
/**
* FwupdInstallFlags:
* @FWUPD_INSTALL_FLAG_NONE: No flags set
* @FWUPD_INSTALL_FLAG_OFFLINE: Perform this offline
* @FWUPD_INSTALL_FLAG_ALLOW_REINSTALL: Allow reinstalling the same version
* @FWUPD_INSTALL_FLAG_ALLOW_OLDER: Allow downgrading firmware
*
* Flags to set when performing the firwmare update or install.
**/
typedef enum {
FWUPD_INSTALL_FLAG_NONE = 0, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_OFFLINE = 1, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_ALLOW_REINSTALL = 2, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_ALLOW_OLDER = 4, /* Since: 0.7.0 */
/*< private >*/
FWUPD_INSTALL_FLAG_LAST
} FwupdInstallFlags;
/**
* FwupdUpdateState:
* @FWUPD_UPDATE_STATE_UNKNOWN: Unknown
* @FWUPD_UPDATE_STATE_PENDING: Update is pending
* @FWUPD_UPDATE_STATE_SUCCESS: Update was successfull
* @FWUPD_UPDATE_STATE_FAILED: Update failed
*
* The update state.
**/
typedef enum {
FWUPD_UPDATE_STATE_UNKNOWN, /* Since: 0.7.0 */
FWUPD_UPDATE_STATE_PENDING, /* Since: 0.7.0 */
FWUPD_UPDATE_STATE_SUCCESS, /* Since: 0.7.0 */
FWUPD_UPDATE_STATE_FAILED, /* Since: 0.7.0 */
/*< private >*/
FWUPD_UPDATE_STATE_LAST
} FwupdUpdateState;
const gchar *fwupd_status_to_string (FwupdStatus status);
FwupdStatus fwupd_status_from_string (const gchar *status);
const gchar *fwupd_device_flag_to_string (FwupdDeviceFlags device_flag);
FwupdDeviceFlags fwupd_device_flag_from_string (const gchar *device_flag);
const gchar *fwupd_update_state_to_string (FwupdUpdateState update_state);
FwupdUpdateState fwupd_update_state_from_string (const gchar *update_state);
const gchar *fwupd_trust_flag_to_string (FwupdTrustFlags trust_flag);
FwupdTrustFlags fwupd_trust_flag_from_string (const gchar *trust_flag);
#endif /* __FWUPD_ENUMS_H */
|