/*
 * gexiv2-version.h
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef GEXIV2_VERSION_H
#define GEXIV2_VERSION_H

#include <glib-object.h>

G_BEGIN_DECLS

#mesondefine GEXIV2_MAJOR_VERSION
#mesondefine GEXIV2_MINOR_VERSION
#mesondefine GEXIV2_MICRO_VERSION

/**
 * GEXIV2_CHECK_VERSION:
 * @major: the major version to check for
 * @minor: the minor version to check for
 * @micro: the micro version to check for
 *
 * Check if the current gexiv2 library version is greater than or equal to the
 * supplied version requirement.
 *
 * Returns: Boolean indicating success.
 */
#define GEXIV2_CHECK_VERSION(major, minor, micro) \
    (GEXIV2_MAJOR_VERSION > (major) || \
     (GEXIV2_MAJOR_VERSION == (major) && GEXIV2_MINOR_VERSION > (minor)) || \
     (GEXIV2_MAJOR_VERSION == (major) && GEXIV2_MINOR_VERSION == (minor) && \
      GEXIV2_MICRO_VERSION >= (micro)))

/**
 * gexiv2_get_version:
 *
 * The gexiv2 library's version number as a formatted decimal XXYYZZ.
 *
 * XX is the major version, YY is the minor version, and ZZ is the micro version
 *
 * For example, version 0.6.1 will be returned as 000601.
 *
 * Returns: Integer representing the current version.
 */
gint gexiv2_get_version (void);

G_END_DECLS
#endif
