blob: f541ec77e268f817e3b5f46198c49fcb20bbca48 [file] [log] [blame]
Richard Hughes02c90d82018-08-09 12:13:03 +01001/*
Richard Hughes943d2c92017-06-21 09:04:39 +01002 * Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
3 *
Mario Limonciello51308e62018-05-28 20:05:46 -05004 * SPDX-License-Identifier: LGPL-2.1+
Richard Hughes943d2c92017-06-21 09:04:39 +01005 */
6
Richard Hughesbfd946e2019-02-09 08:21:40 +00007#pragma once
Richard Hughes943d2c92017-06-21 09:04:39 +01008
Richard Hughesadc9dad2017-09-04 13:19:27 +01009#include <gio/gio.h>
Richard Hughes52441f22021-03-12 21:21:10 +000010#include <xmlb.h>
Richard Hughes943d2c92017-06-21 09:04:39 +010011
Richard Hughes8f0b2d12020-08-12 12:41:53 +010012#include "fu-volume.h"
13
Mario Limonciello39602652019-04-29 21:08:58 -050014/**
15 * FuAppFlags:
16 * @FU_APP_FLAGS_NONE: No flags set
17 * @FU_APP_FLAGS_NO_IDLE_SOURCES: Disallow idle sources
Mario Limonciello39602652019-04-29 21:08:58 -050018 *
19 * The flags to use when loading an application.
20 **/
Richard Hughes5b5f6552018-05-18 10:22:39 +010021typedef enum {
22 FU_APP_FLAGS_NONE = 0,
23 FU_APP_FLAGS_NO_IDLE_SOURCES = 1 << 0,
Mario Limonciello39602652019-04-29 21:08:58 -050024 /*< private >*/
Richard Hughes5b5f6552018-05-18 10:22:39 +010025 FU_APP_FLAGS_LAST
26} FuAppFlags;
27
Mario Limonciello39602652019-04-29 21:08:58 -050028/**
29 * FuDumpFlags:
30 * @FU_DUMP_FLAGS_NONE: No flags set
31 * @FU_DUMP_FLAGS_SHOW_ASCII: Show ASCII in debugging dumps
32 * @FU_DUMP_FLAGS_SHOW_ADDRESSES: Show addresses in debugging dumps
33 *
34 * The flags to use when configuring debugging
35 **/
Richard Hughes4be17d12018-05-30 20:36:29 +010036typedef enum {
Richard Hughes35481862019-01-06 12:01:58 +000037 FU_DUMP_FLAGS_NONE = 0,
38 FU_DUMP_FLAGS_SHOW_ASCII = 1 << 0,
39 FU_DUMP_FLAGS_SHOW_ADDRESSES = 1 << 1,
Mario Limonciello39602652019-04-29 21:08:58 -050040 /*< private >*/
Richard Hughes35481862019-01-06 12:01:58 +000041 FU_DUMP_FLAGS_LAST
42} FuDumpFlags;
43
Richard Hughes37c6a7b2019-08-14 21:57:43 +010044typedef guint FuEndianType;
45
Mario Limonciello39602652019-04-29 21:08:58 -050046/**
47 * FuPathKind:
48 * @FU_PATH_KIND_CACHEDIR_PKG: The cache directory (IE /var/cache/fwupd)
49 * @FU_PATH_KIND_DATADIR_PKG: The non-volatile data store (IE /usr/share/fwupd)
50 * @FU_PATH_KIND_EFIAPPDIR: The location to store EFI apps before install (IE /usr/libexec/fwupd/efi)
51 * @FU_PATH_KIND_LOCALSTATEDIR: The local state directory (IE /var)
52 * @FU_PATH_KIND_LOCALSTATEDIR_PKG: The local state directory for the package (IE /var/lib/fwupd)
53 * @FU_PATH_KIND_PLUGINDIR_PKG: The location to look for plugins for package (IE /usr/lib/[triplet]/fwupd-plugins-3)
54 * @FU_PATH_KIND_SYSCONFDIR: The configuration location (IE /etc)
55 * @FU_PATH_KIND_SYSCONFDIR_PKG: The package configuration location (IE /etc/fwupd)
56 * @FU_PATH_KIND_SYSFSDIR_FW: The sysfs firmware location (IE /sys/firmware)
57 * @FU_PATH_KIND_SYSFSDIR_DRIVERS: The platform sysfs directory (IE /sys/bus/platform/drivers)
58 * @FU_PATH_KIND_SYSFSDIR_TPM: The TPM sysfs directory (IE /sys/class/tpm)
Richard Hughesc3689582020-05-06 12:35:20 +010059 * @FU_PATH_KIND_PROCFS: The procfs location (IE /proc)
Mario Limonciellod8af5de2019-11-04 09:33:34 -060060 * @FU_PATH_KIND_POLKIT_ACTIONS: The directory for policy kit actions (IE /usr/share/polkit-1/actions/)
Richard Hughesafdba372019-11-23 12:57:35 +000061 * @FU_PATH_KIND_OFFLINE_TRIGGER: The file for the offline trigger (IE /system-update)
Mario Limonciello9dce1f72020-02-04 09:12:52 -060062 * @FU_PATH_KIND_SYSFSDIR_SECURITY: The sysfs security location (IE /sys/kernel/security)
Richard Hughesa7157912020-05-11 17:14:05 +010063 * @FU_PATH_KIND_ACPI_TABLES: The location of the ACPI tables
Mario Limonciello39602652019-04-29 21:08:58 -050064 *
65 * Path types to use when dynamically determining a path at runtime
66 **/
Richard Hughes35481862019-01-06 12:01:58 +000067typedef enum {
Richard Hughes4be17d12018-05-30 20:36:29 +010068 FU_PATH_KIND_CACHEDIR_PKG,
69 FU_PATH_KIND_DATADIR_PKG,
Mario Limoncielloe6e2bf92018-07-10 12:11:25 -050070 FU_PATH_KIND_EFIAPPDIR,
Richard Hughes4be17d12018-05-30 20:36:29 +010071 FU_PATH_KIND_LOCALSTATEDIR,
72 FU_PATH_KIND_LOCALSTATEDIR_PKG,
73 FU_PATH_KIND_PLUGINDIR_PKG,
74 FU_PATH_KIND_SYSCONFDIR,
75 FU_PATH_KIND_SYSCONFDIR_PKG,
Richard Hughes282b10d2018-06-22 14:48:00 +010076 FU_PATH_KIND_SYSFSDIR_FW,
Richard Hughes83390f62018-06-22 20:36:46 +010077 FU_PATH_KIND_SYSFSDIR_DRIVERS,
Richard Hughesb56015e2018-12-12 09:25:32 +000078 FU_PATH_KIND_SYSFSDIR_TPM,
Richard Hughesc3689582020-05-06 12:35:20 +010079 FU_PATH_KIND_PROCFS,
Mario Limonciello057c67a2019-05-23 10:44:19 -050080 FU_PATH_KIND_POLKIT_ACTIONS,
Richard Hughesafdba372019-11-23 12:57:35 +000081 FU_PATH_KIND_OFFLINE_TRIGGER,
Mario Limonciello9dce1f72020-02-04 09:12:52 -060082 FU_PATH_KIND_SYSFSDIR_SECURITY,
Richard Hughesa7157912020-05-11 17:14:05 +010083 FU_PATH_KIND_ACPI_TABLES,
Mario Limonciello39602652019-04-29 21:08:58 -050084 /*< private >*/
Richard Hughes4be17d12018-05-30 20:36:29 +010085 FU_PATH_KIND_LAST
86} FuPathKind;
87
Richard Hughesb63cfa92021-01-05 22:57:12 +000088/**
89 * FuCpuVendor:
90 * @FU_CPU_VENDOR_UNKNOWN: Unknown
91 * @FU_CPU_VENDOR_INTEL: Intel
92 * @FU_CPU_VENDOR_AMD: AMD
93 *
94 * The CPU vendor.
95 **/
96typedef enum {
97 FU_CPU_VENDOR_UNKNOWN,
98 FU_CPU_VENDOR_INTEL,
99 FU_CPU_VENDOR_AMD,
100 /*< private >*/
101 FU_CPU_VENDOR_LAST
102} FuCpuVendor;
103
Richard Hughes049ccc82017-08-09 15:26:56 +0100104typedef void (*FuOutputHandler) (const gchar *line,
105 gpointer user_data);
106
107gboolean fu_common_spawn_sync (const gchar * const *argv,
Richard Hughes4eada342017-10-03 21:20:32 +0100108 FuOutputHandler handler_cb,
Richard Hughes049ccc82017-08-09 15:26:56 +0100109 gpointer handler_user_data,
Richard Hughesb768e4d2019-02-26 13:55:18 +0000110 guint timeout_ms,
Richard Hughes049ccc82017-08-09 15:26:56 +0100111 GCancellable *cancellable,
Richard Hughesa2abc422020-12-22 09:38:59 +0000112 GError **error)
113 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes049ccc82017-08-09 15:26:56 +0100114
Richard Hughes4be17d12018-05-30 20:36:29 +0100115gchar *fu_common_get_path (FuPathKind path_kind);
Richard Hughes484ee292019-03-22 16:10:50 +0000116gchar *fu_common_realpath (const gchar *filename,
Richard Hughesa2abc422020-12-22 09:38:59 +0000117 GError **error)
118 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesa84d7a72020-05-06 12:11:51 +0100119GPtrArray *fu_common_filename_glob (const gchar *directory,
120 const gchar *pattern,
Richard Hughesa2abc422020-12-22 09:38:59 +0000121 GError **error)
122 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes5c508de2019-11-22 09:57:34 +0000123gboolean fu_common_fnmatch (const gchar *pattern,
124 const gchar *str);
Richard Hughes954dd9f2017-08-08 13:36:25 +0100125gboolean fu_common_rmtree (const gchar *directory,
Richard Hughesa2abc422020-12-22 09:38:59 +0000126 GError **error)
127 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes89e968b2018-03-07 10:01:08 +0000128GPtrArray *fu_common_get_files_recursive (const gchar *path,
Richard Hughesa2abc422020-12-22 09:38:59 +0000129 GError **error)
130 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes7ee42fe2017-08-15 14:06:21 +0100131gboolean fu_common_mkdir_parent (const gchar *filename,
Richard Hughesa2abc422020-12-22 09:38:59 +0000132 GError **error)
133 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes943d2c92017-06-21 09:04:39 +0100134gboolean fu_common_set_contents_bytes (const gchar *filename,
Richard Hughes4eada342017-10-03 21:20:32 +0100135 GBytes *bytes,
Richard Hughesa2abc422020-12-22 09:38:59 +0000136 GError **error)
137 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesd0d2ae62017-08-08 12:22:30 +0100138GBytes *fu_common_get_contents_bytes (const gchar *filename,
Richard Hughesa2abc422020-12-22 09:38:59 +0000139 GError **error)
140 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes943d2c92017-06-21 09:04:39 +0100141GBytes *fu_common_get_contents_fd (gint fd,
142 gsize count,
Richard Hughesa2abc422020-12-22 09:38:59 +0000143 GError **error)
144 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes94f939a2017-08-08 12:21:39 +0100145gboolean fu_common_extract_archive (GBytes *blob,
146 const gchar *dir,
Richard Hughesa2abc422020-12-22 09:38:59 +0000147 GError **error)
148 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes41cbe2a2017-08-08 14:13:35 +0100149GBytes *fu_common_firmware_builder (GBytes *bytes,
150 const gchar *script_fn,
151 const gchar *output_fn,
Richard Hughesa2abc422020-12-22 09:38:59 +0000152 GError **error)
153 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughese82eef32018-05-20 10:41:26 +0100154GError *fu_common_error_array_get_best (GPtrArray *errors);
Richard Hughes73bf2332018-08-28 09:38:09 +0100155guint64 fu_common_strtoull (const gchar *str);
Richard Hughes22367e72018-08-30 10:24:04 +0100156gchar *fu_common_find_program_in_path (const gchar *basename,
Richard Hughesa2abc422020-12-22 09:38:59 +0000157 GError **error)
158 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesa574a752018-08-31 13:31:03 +0100159gchar *fu_common_strstrip (const gchar *str);
Richard Hughese59cb9a2018-12-05 14:37:40 +0000160void fu_common_dump_raw (const gchar *log_domain,
161 const gchar *title,
162 const guint8 *data,
163 gsize len);
Richard Hughes35481862019-01-06 12:01:58 +0000164void fu_common_dump_full (const gchar *log_domain,
165 const gchar *title,
166 const guint8 *data,
167 gsize len,
168 guint columns,
169 FuDumpFlags flags);
Richard Hughese59cb9a2018-12-05 14:37:40 +0000170void fu_common_dump_bytes (const gchar *log_domain,
171 const gchar *title,
172 GBytes *bytes);
Richard Hughesfc90f392019-01-15 21:21:16 +0000173GBytes *fu_common_bytes_align (GBytes *bytes,
174 gsize blksz,
175 gchar padval);
Richard Hughes36999462019-03-19 20:23:29 +0000176gboolean fu_common_bytes_is_empty (GBytes *bytes);
Richard Hughes2aad1042019-03-21 09:03:32 +0000177gboolean fu_common_bytes_compare (GBytes *bytes1,
178 GBytes *bytes2,
Richard Hughesa2abc422020-12-22 09:38:59 +0000179 GError **error)
180 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes38245ff2019-09-18 14:46:09 +0100181gboolean fu_common_bytes_compare_raw (const guint8 *buf1,
182 gsize bufsz1,
183 const guint8 *buf2,
184 gsize bufsz2,
Richard Hughesa2abc422020-12-22 09:38:59 +0000185 GError **error)
186 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes7afd7cb2019-08-07 11:42:42 +0100187GBytes *fu_common_bytes_pad (GBytes *bytes,
188 gsize sz);
Richard Hughes05e33772020-12-08 18:37:02 +0000189GBytes *fu_common_bytes_new_offset (GBytes *bytes,
190 gsize offset,
191 gsize length,
Richard Hughesa2abc422020-12-22 09:38:59 +0000192 GError **error)
193 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesae96a1f2019-09-23 11:16:36 +0100194gsize fu_common_strwidth (const gchar *text);
Richard Hughes9b11af92021-02-04 20:28:49 +0000195guint8 *fu_memdup_safe (const guint8 *src,
196 gsize n,
197 GError **error)
198 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes5308ea42019-08-09 12:25:13 +0100199gboolean fu_memcpy_safe (guint8 *dst,
200 gsize dst_sz,
201 gsize dst_offset,
202 const guint8 *src,
203 gsize src_sz,
204 gsize src_offset,
205 gsize n,
Richard Hughesa2abc422020-12-22 09:38:59 +0000206 GError **error)
207 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesc21a0b92019-10-24 12:24:37 +0100208gboolean fu_common_read_uint8_safe (const guint8 *buf,
209 gsize bufsz,
210 gsize offset,
211 guint8 *value,
Richard Hughesa2abc422020-12-22 09:38:59 +0000212 GError **error)
213 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes80768f52019-10-22 07:19:14 +0100214gboolean fu_common_read_uint16_safe (const guint8 *buf,
215 gsize bufsz,
216 gsize offset,
217 guint16 *value,
218 FuEndianType endian,
Richard Hughesa2abc422020-12-22 09:38:59 +0000219 GError **error)
220 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes80768f52019-10-22 07:19:14 +0100221gboolean fu_common_read_uint32_safe (const guint8 *buf,
222 gsize bufsz,
223 gsize offset,
224 guint32 *value,
225 FuEndianType endian,
Richard Hughesa2abc422020-12-22 09:38:59 +0000226 GError **error)
227 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesf2849d22021-03-05 17:19:17 +0000228gboolean fu_common_read_uint64_safe (const guint8 *buf,
229 gsize bufsz,
230 gsize offset,
231 guint64 *value,
232 FuEndianType endian,
233 GError **error)
234 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes32ffdb22021-03-04 17:38:12 +0000235gboolean fu_common_write_uint8_safe (guint8 *buf,
236 gsize bufsz,
237 gsize offset,
238 guint8 value,
239 GError **error)
240 G_GNUC_WARN_UNUSED_RESULT;
241gboolean fu_common_write_uint16_safe (guint8 *buf,
242 gsize bufsz,
243 gsize offset,
244 guint16 value,
245 FuEndianType endian,
246 GError **error)
247 G_GNUC_WARN_UNUSED_RESULT;
248gboolean fu_common_write_uint32_safe (guint8 *buf,
249 gsize bufsz,
250 gsize offset,
251 guint32 value,
252 FuEndianType endian,
253 GError **error)
254 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesf2849d22021-03-05 17:19:17 +0000255gboolean fu_common_write_uint64_safe (guint8 *buf,
256 gsize bufsz,
257 gsize offset,
258 guint64 value,
259 FuEndianType endian,
260 GError **error)
261 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes943d2c92017-06-21 09:04:39 +0100262
Richard Hughesa2a8f8e2020-10-20 09:27:26 +0100263void fu_byte_array_set_size (GByteArray *array,
264 guint length);
Richard Hughes74db3402021-03-11 13:20:25 +0000265void fu_byte_array_set_size_full (GByteArray *array,
266 guint length,
267 guint8 data);
268void fu_byte_array_align_up (GByteArray *array,
269 guint8 alignment,
270 guint8 data);
Richard Hughes37c6a7b2019-08-14 21:57:43 +0100271void fu_byte_array_append_uint8 (GByteArray *array,
272 guint8 data);
273void fu_byte_array_append_uint16 (GByteArray *array,
274 guint16 data,
275 FuEndianType endian);
276void fu_byte_array_append_uint32 (GByteArray *array,
277 guint32 data,
278 FuEndianType endian);
Richard Hughesf2849d22021-03-05 17:19:17 +0000279void fu_byte_array_append_uint64 (GByteArray *array,
280 guint64 data,
281 FuEndianType endian);
Richard Hughese9664e82021-03-10 13:38:06 +0000282void fu_byte_array_append_bytes (GByteArray *array,
283 GBytes *bytes);
Richard Hughesae252cd2017-12-08 10:48:15 +0000284
285void fu_common_write_uint16 (guint8 *buf,
286 guint16 val_native,
287 FuEndianType endian);
288void fu_common_write_uint32 (guint8 *buf,
289 guint32 val_native,
290 FuEndianType endian);
Richard Hughesf2849d22021-03-05 17:19:17 +0000291void fu_common_write_uint64 (guint8 *buf,
292 guint64 val_native,
293 FuEndianType endian);
Richard Hughesae252cd2017-12-08 10:48:15 +0000294guint16 fu_common_read_uint16 (const guint8 *buf,
295 FuEndianType endian);
296guint32 fu_common_read_uint32 (const guint8 *buf,
297 FuEndianType endian);
Richard Hughesf2849d22021-03-05 17:19:17 +0000298guint64 fu_common_read_uint64 (const guint8 *buf,
299 FuEndianType endian);
Richard Hughesae252cd2017-12-08 10:48:15 +0000300
Richard Hughes83e56c12018-10-10 20:24:41 +0100301guint fu_common_string_replace (GString *string,
302 const gchar *search,
303 const gchar *replace);
Richard Hughescea28de2019-08-09 11:16:40 +0100304void fu_common_string_append_kv (GString *str,
Richard Hughes6e3e62b2019-08-14 10:43:08 +0100305 guint idt,
Richard Hughescea28de2019-08-09 11:16:40 +0100306 const gchar *key,
307 const gchar *value);
Richard Hughes6e3e62b2019-08-14 10:43:08 +0100308void fu_common_string_append_ku (GString *str,
309 guint idt,
310 const gchar *key,
311 guint64 value);
312void fu_common_string_append_kx (GString *str,
313 guint idt,
314 const gchar *key,
315 guint64 value);
316void fu_common_string_append_kb (GString *str,
317 guint idt,
318 const gchar *key,
319 gboolean value);
Richard Hughes7afd7cb2019-08-07 11:42:42 +0100320gchar **fu_common_strnsplit (const gchar *str,
321 gsize sz,
322 const gchar *delimiter,
323 gint max_tokens);
Richard Hughes364e2682021-01-05 14:38:15 +0000324gchar *fu_common_strsafe (const gchar *str,
325 gsize maxsz);
Richard Hughese52e1b42021-01-26 09:59:15 +0000326gchar *fu_common_strjoin_array (const gchar *separator,
327 GPtrArray *array);
Mario Limonciello9dce1f72020-02-04 09:12:52 -0600328gboolean fu_common_kernel_locked_down (void);
Richard Hughesbd1dc2a2020-08-20 15:35:28 +0100329gboolean fu_common_cpuid (guint32 leaf,
330 guint32 *eax,
331 guint32 *ebx,
332 guint32 *ecx,
333 guint32 *edx,
Richard Hughesa2abc422020-12-22 09:38:59 +0000334 GError **error)
335 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughesb63cfa92021-01-05 22:57:12 +0000336FuCpuVendor fu_common_get_cpu_vendor (void);
Richard Hughes36111472020-08-12 15:04:24 +0100337gboolean fu_common_is_live_media (void);
Richard Hughes68175e92021-01-14 09:43:33 +0000338guint64 fu_common_get_memory_size (void);
Richard Hughes8f0b2d12020-08-12 12:41:53 +0100339GPtrArray *fu_common_get_volumes_by_kind (const gchar *kind,
Richard Hughesa2abc422020-12-22 09:38:59 +0000340 GError **error)
341 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes0bdf5612020-10-30 14:56:22 +0000342FuVolume *fu_common_get_volume_by_device (const gchar *device,
Richard Hughesa2abc422020-12-22 09:38:59 +0000343 GError **error)
344 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes0bdf5612020-10-30 14:56:22 +0000345FuVolume *fu_common_get_volume_by_devnum (guint32 devnum,
Richard Hughesa2abc422020-12-22 09:38:59 +0000346 GError **error)
347 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes8f0b2d12020-08-12 12:41:53 +0100348FuVolume *fu_common_get_esp_for_path (const gchar *esp_path,
Richard Hughesa2abc422020-12-22 09:38:59 +0000349 GError **error)
350 G_GNUC_WARN_UNUSED_RESULT;
351FuVolume *fu_common_get_esp_default (GError **error)
352 G_GNUC_WARN_UNUSED_RESULT;
Richard Hughes6f5e35a2020-09-25 14:14:52 +0100353
Richard Hughes44ae2a72020-09-25 18:00:21 +0100354guint8 fu_common_crc8 (const guint8 *buf,
355 gsize bufsz);
Richard Hughes6f5e35a2020-09-25 14:14:52 +0100356guint16 fu_common_crc16 (const guint8 *buf,
357 gsize bufsz);
358guint32 fu_common_crc32 (const guint8 *buf,
359 gsize bufsz);
360guint32 fu_common_crc32_full (const guint8 *buf,
361 gsize bufsz,
362 guint32 crc,
363 guint32 polynomial);
Richard Hughesc7546672021-01-28 10:53:30 +0000364gchar *fu_common_uri_get_scheme (const gchar *uri);
Richard Hughes58d52ed2021-03-10 13:42:59 +0000365gsize fu_common_align_up (gsize value,
366 guint8 alignment);
Richard Hughes52441f22021-03-12 21:21:10 +0000367
368void fu_xmlb_builder_insert_kv (XbBuilderNode *bn,
369 const gchar *key,
370 const gchar *value);
371void fu_xmlb_builder_insert_kx (XbBuilderNode *bn,
372 const gchar *key,
373 guint64 value);
374void fu_xmlb_builder_insert_kb (XbBuilderNode *bn,
375 const gchar *key,
376 gboolean value);