fwupd/libfwupdplugin/fu-common-version.h
Richard Hughes 5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00

34 lines
1.1 KiB
C

/*
* Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include <gio/gio.h>
#include <fwupd.h>
gint fu_common_vercmp (const gchar *version_a,
const gchar *version_b)
G_DEPRECATED_FOR(fu_common_vercmp_full);
gint fu_common_vercmp_full (const gchar *version_a,
const gchar *version_b,
FwupdVersionFormat fmt);
gchar *fu_common_version_from_uint64 (guint64 val,
FwupdVersionFormat kind);
gchar *fu_common_version_from_uint32 (guint32 val,
FwupdVersionFormat kind);
gchar *fu_common_version_from_uint16 (guint16 val,
FwupdVersionFormat kind);
gchar *fu_common_version_parse (const gchar *version)
G_DEPRECATED_FOR(fu_common_version_parse_from_format);
gchar *fu_common_version_parse_from_format (const gchar *version,
FwupdVersionFormat fmt);
gchar *fu_common_version_ensure_semver (const gchar *version);
FwupdVersionFormat fu_common_version_guess_format (const gchar *version);
gboolean fu_common_version_verify_format (const gchar *version,
FwupdVersionFormat fmt,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;