/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 *
 * Copyright (C) 2014 Richard Hughes <richard@hughsie.com>
 *
 * Licensed under the GNU Lesser General Public License Version 2.1
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:hif-version
 * @short_description: Preprocessor macros for the libhif version
 * @include: libhif.h
 * @stability: Stable
 *
 * These functions are used in client code to conditionalize compilation
 * depending on the version of libhif headers installed.
 */

#if !defined (__LIBHIF_H) && !defined (HIF_COMPILATION)
#error "Only <libhif.h> can be included directly."
#endif

#ifndef __HIF_VERSION_H
#define __HIF_VERSION_H

/* compile time version
 */
#define HIF_MAJOR_VERSION				(0)
#define HIF_MINOR_VERSION				(1)
#define HIF_MICRO_VERSION				(7)

/* check whether a As version equal to or greater than
 * major.minor.micro.
 */
#define HIF_CHECK_VERSION(major,minor,micro)    \
    (HIF_MAJOR_VERSION > (major) || \
     (HIF_MAJOR_VERSION == (major) && HIF_MINOR_VERSION > (minor)) || \
     (HIF_MAJOR_VERSION == (major) && HIF_MINOR_VERSION == (minor) && \
      HIF_MICRO_VERSION >= (micro)))

#endif /* __HIF_VERSION_H */
