mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 10:06:41 +00:00
Remove some deprecated API
This commit is contained in:
parent
a5a978b3f6
commit
f42b44e427
@ -16,6 +16,8 @@ Remember: Plugins should be upstream!
|
||||
* Migrate from FuUsbDevice->probe(), FuUsbDevice->open() and FuUsbDevice->close() to using the superclass helpers
|
||||
* Migrate from FuUdevDevice->to_string(), FuUdevDevice->probe(), FuUdevDevice->open() and FuUdevDevice->close() to using the superclass helpers
|
||||
* Migrate from fu_device_get_protocol() to fu_device_get_protocols() and fu_device_set_protocol() to fu_device_add_protocol()
|
||||
* Migrate from fu_device_has_custom_flag() to fu_device_has_private_flag()
|
||||
* Migrate from fu_udev_device_set_readonly() to fu_udev_device_set_flags()
|
||||
|
||||
## Planned API/ABI changes for next release
|
||||
|
||||
|
@ -3043,37 +3043,6 @@ fu_device_get_custom_flags (FuDevice *self)
|
||||
return fu_device_get_metadata (self, "CustomFlags");
|
||||
}
|
||||
|
||||
/**
|
||||
* fu_device_has_custom_flag:
|
||||
* @self: a #FuDevice
|
||||
* @hint: a string, e.g. `bootloader`
|
||||
*
|
||||
* Checks if the custom flag exists for the device from the quirk system.
|
||||
*
|
||||
* It may be more efficient to call fu_device_get_custom_flags() and split the
|
||||
* string locally if checking for lots of different flags.
|
||||
*
|
||||
* Returns: %TRUE if the hint exists
|
||||
*
|
||||
* Since: 1.1.0
|
||||
**/
|
||||
gboolean
|
||||
fu_device_has_custom_flag (FuDevice *self, const gchar *hint)
|
||||
{
|
||||
const gchar *hint_str;
|
||||
g_auto(GStrv) hints = NULL;
|
||||
|
||||
g_return_val_if_fail (FU_IS_DEVICE (self), FALSE);
|
||||
g_return_val_if_fail (hint != NULL, FALSE);
|
||||
|
||||
/* no hint is perfectly valid */
|
||||
hint_str = fu_device_get_custom_flags (self);
|
||||
if (hint_str == NULL)
|
||||
return FALSE;
|
||||
hints = g_strsplit (hint_str, ",", -1);
|
||||
return g_strv_contains ((const gchar * const *) hints, hint);
|
||||
}
|
||||
|
||||
/**
|
||||
* fu_device_get_remove_delay:
|
||||
* @self: a #FuDevice
|
||||
|
@ -506,9 +506,6 @@ void fu_device_add_flag (FuDevice *self,
|
||||
void fu_device_remove_flag (FuDevice *self,
|
||||
FwupdDeviceFlags flag);
|
||||
const gchar *fu_device_get_custom_flags (FuDevice *self);
|
||||
gboolean fu_device_has_custom_flag (FuDevice *self,
|
||||
const gchar *hint)
|
||||
G_DEPRECATED_FOR(fu_device_has_private_flag);
|
||||
void fu_device_set_custom_flags (FuDevice *self,
|
||||
const gchar *custom_flags);
|
||||
void fu_device_set_name (FuDevice *self,
|
||||
|
@ -1201,26 +1201,6 @@ fu_udev_device_set_fd (FuUdevDevice *self, gint fd)
|
||||
priv->fd = fd;
|
||||
}
|
||||
|
||||
/**
|
||||
* fu_udev_device_set_readonly:
|
||||
* @self: a #FuUdevDevice
|
||||
* @readonly: %TRUE if the device file should be opened readonly
|
||||
*
|
||||
* Sets the open mode to `O_RDONLY` use when opening the device with
|
||||
* fu_device_open(). By default devices are opened with `O_RDWR`.
|
||||
*
|
||||
* Since: 1.3.3
|
||||
**/
|
||||
void
|
||||
fu_udev_device_set_readonly (FuUdevDevice *self, gboolean readonly)
|
||||
{
|
||||
FuUdevDevicePrivate *priv = GET_PRIVATE (self);
|
||||
g_return_if_fail (FU_IS_UDEV_DEVICE (self));
|
||||
priv->flags = readonly ? FU_UDEV_DEVICE_FLAG_OPEN_READ :
|
||||
FU_UDEV_DEVICE_FLAG_OPEN_READ |
|
||||
FU_UDEV_DEVICE_FLAG_OPEN_WRITE;
|
||||
}
|
||||
|
||||
/**
|
||||
* fu_udev_device_set_flags:
|
||||
* @self: a #FuUdevDevice
|
||||
|
@ -72,9 +72,6 @@ gboolean fu_udev_device_set_logical_id (FuUdevDevice *self,
|
||||
const gchar *subsystem,
|
||||
GError **error)
|
||||
G_GNUC_WARN_UNUSED_RESULT;
|
||||
void fu_udev_device_set_readonly (FuUdevDevice *self,
|
||||
gboolean readonly)
|
||||
G_GNUC_DEPRECATED_FOR(fu_udev_device_set_flags);
|
||||
void fu_udev_device_set_flags (FuUdevDevice *self,
|
||||
FuUdevDeviceFlags flags);
|
||||
|
||||
|
@ -214,7 +214,6 @@ LIBFWUPDPLUGIN_1.1.0 {
|
||||
global:
|
||||
fu_device_get_alternate_id;
|
||||
fu_device_get_custom_flags;
|
||||
fu_device_has_custom_flag;
|
||||
fu_device_incorporate;
|
||||
fu_device_set_alternate_id;
|
||||
fu_device_set_custom_flags;
|
||||
@ -423,7 +422,6 @@ LIBFWUPDPLUGIN_1.3.3 {
|
||||
fu_udev_device_pread;
|
||||
fu_udev_device_pwrite;
|
||||
fu_udev_device_set_fd;
|
||||
fu_udev_device_set_readonly;
|
||||
local: *;
|
||||
} LIBFWUPDPLUGIN_1.3.2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user