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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
/*
* Copyright 2016 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#pragma once
#include "fu-context.h"
#include "fu-plugin.h"
#include "fu-security-attrs.h"
FuPlugin *
fu_plugin_new(FuContext *ctx);
FuPlugin *
fu_plugin_new_from_gtype(GType gtype, FuContext *ctx) G_GNUC_NON_NULL(2);
void
fu_plugin_set_context(FuPlugin *self, FuContext *ctx) G_GNUC_NON_NULL(1);
gboolean
fu_plugin_is_open(FuPlugin *self) G_GNUC_NON_NULL(1);
guint
fu_plugin_get_order(FuPlugin *self) G_GNUC_NON_NULL(1);
void
fu_plugin_set_order(FuPlugin *self, guint order) G_GNUC_NON_NULL(1);
guint
fu_plugin_get_priority(FuPlugin *self) G_GNUC_NON_NULL(1);
void
fu_plugin_set_priority(FuPlugin *self, guint priority) G_GNUC_NON_NULL(1);
GArray *
fu_plugin_get_device_gtypes(FuPlugin *self) G_GNUC_NON_NULL(1);
gchar *
fu_plugin_to_string(FuPlugin *self) G_GNUC_NON_NULL(1);
void
fu_plugin_add_string(FuPlugin *self, guint idt, GString *str) G_GNUC_NON_NULL(1);
GPtrArray *
fu_plugin_get_rules(FuPlugin *self, FuPluginRule rule) G_GNUC_NON_NULL(1);
GHashTable *
fu_plugin_get_report_metadata(FuPlugin *self) G_GNUC_NON_NULL(1);
gboolean
fu_plugin_open(FuPlugin *self, const gchar *filename, GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_reset_config_values(FuPlugin *self, GError **error) G_GNUC_NON_NULL(1);
void
fu_plugin_runner_init(FuPlugin *self) G_GNUC_NON_NULL(1);
gboolean
fu_plugin_runner_startup(FuPlugin *self,
FuProgress *progress,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_ready(FuPlugin *self,
FuProgress *progress,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_coldplug(FuPlugin *self,
FuProgress *progress,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_prepare(FuPlugin *self,
FuDevice *device,
FuProgress *progress,
FwupdInstallFlags flags,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_cleanup(FuPlugin *self,
FuDevice *device,
FuProgress *progress,
FwupdInstallFlags flags,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_composite_prepare(FuPlugin *self,
GPtrArray *devices,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_composite_cleanup(FuPlugin *self,
GPtrArray *devices,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_composite_peek_firmware(FuPlugin *self,
FuDevice *device,
FuFirmware *firmware,
FuProgress *progress,
FwupdInstallFlags flags,
GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2, 3, 4);
gboolean
fu_plugin_runner_attach(FuPlugin *self, FuDevice *device, FuProgress *progress, GError **error)
G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_detach(FuPlugin *self, FuDevice *device, FuProgress *progress, GError **error)
G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_reload(FuPlugin *self, FuDevice *device, GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_backend_device_added(FuPlugin *self,
FuDevice *device,
FuProgress *progress,
GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_backend_device_changed(FuPlugin *self,
FuDevice *device,
GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_device_created(FuPlugin *self,
FuDevice *device,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
void
fu_plugin_runner_device_added(FuPlugin *self, FuDevice *device) G_GNUC_NON_NULL(1, 2);
void
fu_plugin_runner_device_removed(FuPlugin *self, FuDevice *device) G_GNUC_NON_NULL(1, 2);
void
fu_plugin_runner_device_register(FuPlugin *self, FuDevice *device) G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_write_firmware(FuPlugin *self,
FuDevice *device,
FuFirmware *firmware,
FuProgress *progress,
FwupdInstallFlags flags,
GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2, 3, 4);
gboolean
fu_plugin_runner_verify(FuPlugin *self,
FuDevice *device,
FuProgress *progress,
FuPluginVerifyFlags flags,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_activate(FuPlugin *self, FuDevice *device, FuProgress *progress, GError **error)
G_GNUC_NON_NULL(1, 2, 3);
gboolean
fu_plugin_runner_unlock(FuPlugin *self, FuDevice *device, GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_clear_results(FuPlugin *self,
FuDevice *device,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_get_results(FuPlugin *self,
FuDevice *device,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_fix_host_security_attr(FuPlugin *self,
FwupdSecurityAttr *attr,
GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_undo_host_security_attr(FuPlugin *self,
FwupdSecurityAttr *attr,
GError **error) G_GNUC_WARN_UNUSED_RESULT
G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_reboot_cleanup(FuPlugin *self,
FuDevice *device,
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1, 2);
void
fu_plugin_runner_add_security_attrs(FuPlugin *self, FuSecurityAttrs *attrs) G_GNUC_NON_NULL(1, 2);
gboolean
fu_plugin_runner_modify_config(FuPlugin *self, const gchar *key, const gchar *value, GError **error)
G_GNUC_NON_NULL(1, 2, 3);
gint
fu_plugin_name_compare(FuPlugin *plugin1, FuPlugin *plugin2) G_GNUC_NON_NULL(1, 2);
gint
fu_plugin_order_compare(FuPlugin *plugin1, FuPlugin *plugin2) G_GNUC_NON_NULL(1, 2);
/* utils */
gchar *
fu_plugin_guess_name_from_fn(const gchar *filename) G_GNUC_NON_NULL(1);
|