"Fossies" - the Fresh Open Source Software Archive

Member "flatpak-1.12.2/common/flatpak-version-macros.h" (12 Oct 2021, 2045 Bytes) of package /linux/misc/flatpak-1.12.2.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "flatpak-version-macros.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.12.1_vs_1.12.2.

    1 /*
    2  * Copyright © 2015 Red Hat, Inc
    3  *
    4  * This program is free software; you can redistribute it and/or
    5  * modify it under the terms of the GNU Lesser General Public
    6  * License as published by the Free Software Foundation; either
    7  * version 2 of the License, or (at your option) any later version.
    8  *
    9  * This library is distributed in the hope that it will be useful,
   10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12  * Lesser General Public License for more details.
   13  *
   14  * You should have received a copy of the GNU Lesser General Public
   15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
   16  *
   17  * Authors:
   18  *       Alexander Larsson <alexl@redhat.com>
   19  */
   20 
   21 #if !defined (__FLATPAK_H_INSIDE__) && !defined (FLATPAK_COMPILATION)
   22 #error "Only <flatpak.h> can be included directly."
   23 #endif
   24 
   25 #ifndef __FLATPAK_VERSION_MACROS_H__
   26 #define __FLATPAK_VERSION_MACROS_H__
   27 
   28 
   29 /**
   30  * FLATPAK_MAJOR_VERSION:
   31  *
   32  * The major version.
   33  */
   34 #define FLATPAK_MAJOR_VERSION (1)
   35 
   36 /**
   37  * FLATPAK_MINOR_VERSION:
   38  *
   39  * The minor version.
   40  */
   41 #define FLATPAK_MINOR_VERSION (12)
   42 
   43 /**
   44  * FLATPAK_MICRO_VERSION:
   45  *
   46  * The micro version.
   47  */
   48 #define FLATPAK_MICRO_VERSION (2)
   49 
   50 /**
   51  * FLATPAK_CHECK_VERSION:
   52  * @major: major version to compare against
   53  * @minor: minor version to compare against
   54  * @micro: micro version to compare against
   55  *
   56  * Check that the current version is at least @major.@minor.@micro.
   57  */
   58 #define FLATPAK_CHECK_VERSION(major,minor,micro)        \
   59     (FLATPAK_MAJOR_VERSION > (major) || \
   60      (FLATPAK_MAJOR_VERSION == (major) && FLATPAK_MINOR_VERSION > (minor)) || \
   61      (FLATPAK_MAJOR_VERSION == (major) && FLATPAK_MINOR_VERSION == (minor) && \
   62       FLATPAK_MICRO_VERSION >= (micro)))
   63 
   64 #ifndef FLATPAK_EXTERN
   65 #define FLATPAK_EXTERN extern
   66 #endif
   67 
   68 /**
   69  * SECTION:flatpak-version-macros
   70  * @Title: Version information
   71  *
   72  * These macros can be used to check the library version in use.
   73  */
   74 
   75 #endif /* __FLATPAK_VERSION_MACROS_H__ */