mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-14 21:57:34 +00:00

This exports FuSecurityAttrs into libfwupdplugin so that we can pass the plugins this object rather than a 'bare' GPtrArray. This greatly simplifies the object ownership, and also allows us to check the object type before adding. In the future we could also check for duplicate appstream IDs or missing properties at insertion time. This change also changes the fu_plugin_add_security_attrs() to not return an error. This forces the plugin to handle the error, storing the failure in the attribute itself. Only the plugin know if a missing file it needs to read indicates a runtime problem or a simple failure to obtain a specific HSI level.
19 lines
433 B
C
19 lines
433 B
C
/*
|
|
* Copyright (C) 2020 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include "fwupd-security-attr-private.h"
|
|
|
|
#define FU_TYPE_SECURITY_ATTRS (fu_security_attrs_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (FuSecurityAttrs, fu_security_attrs, FU, SECURITY_ATTRS, GObject)
|
|
|
|
void fu_security_attrs_append (FuSecurityAttrs *self,
|
|
FwupdSecurityAttr *attr);
|