/*
 * 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

#define GEXIV2_MAJOR_VERSION 0
#define GEXIV2_MINOR_VERSION 16
#define GEXIV2_MICRO_VERSION 1

/**
 * 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
