File: fu-version-common.h

package info (click to toggle)
fwupd 2.0.20-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 32,504 kB
  • sloc: ansic: 277,388; python: 11,485; xml: 9,493; sh: 1,625; makefile: 167; cpp: 19; asm: 11; javascript: 9
file content (35 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download | duplicates (3)
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
/*
 * Copyright 2017 Richard Hughes <richard@hughsie.com>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once

#include <fwupd.h>
#include <gio/gio.h>

gint
fu_version_compare(const gchar *version_a, const gchar *version_b, FwupdVersionFormat fmt);
gchar *
fu_version_from_uint64(guint64 val, FwupdVersionFormat kind);
gchar *
fu_version_from_uint32(guint32 val, FwupdVersionFormat kind);
gchar *
fu_version_from_uint32_hex(guint32 val, FwupdVersionFormat kind);
gchar *
fu_version_from_uint24(guint32 val, FwupdVersionFormat kind);
gchar *
fu_version_from_uint16(guint16 val, FwupdVersionFormat kind);
gchar *
fu_version_from_uint16_hex(guint16 val, FwupdVersionFormat kind);
gchar *
fu_version_parse_from_format(const gchar *version, FwupdVersionFormat fmt);
gchar *
fu_version_ensure_semver(const gchar *version, FwupdVersionFormat fmt) G_GNUC_NON_NULL(1);
FwupdVersionFormat
fu_version_guess_format(const gchar *version);
gboolean
fu_version_verify_format(const gchar *version,
			 FwupdVersionFormat fmt,
			 GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NON_NULL(1);