Debian Codegraph @

src/libqrtr-glib/qrtr-version.h.in

raw
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 /*
4 * Copyright (C) 2021 Aleksander Morgado <[email protected]>
5 */
6
7 #ifndef _QRTR_VERSION_H_
8 #define _QRTR_VERSION_H_
9
10 /**
11 * SECTION:qrtr-version
12 * @short_description: Version information in the API.
13 *
14 * This section defines types that are used to identify the libqrtr-glib version.
15 **/
16
17 /**
18 * QRTR_MAJOR_VERSION:
19 *
20 * Evaluates to the major version number of libqrtr-glib which this source
21 * is compiled against.
22 *
23 * Since: 1.0
24 */
25 #define QRTR_MAJOR_VERSION (@QRTR_MAJOR_VERSION@)
26
27 /**
28 * QRTR_MINOR_VERSION:
29 *
30 * Evaluates to the minor version number of libqrtr-glib which this source
31 * is compiled against.
32 *
33 * Since: 1.0
34 */
35 #define QRTR_MINOR_VERSION (@QRTR_MINOR_VERSION@)
36
37 /**
38 * QRTR_MICRO_VERSION:
39 *
40 * Evaluates to the micro version number of libqrtr-glib which this source
41 * compiled against.
42 *
43 * Since: 1.0
44 */
45 #define QRTR_MICRO_VERSION (@QRTR_MICRO_VERSION@)
46
47 /**
48 * QRTR_CHECK_VERSION:
49 * @major: major version (e.g. 1 for version 1.2.5)
50 * @minor: minor version (e.g. 2 for version 1.2.5)
51 * @micro: micro version (e.g. 5 for version 1.2.5)
52 *
53 * Checks the version of the libqrtr library that is being compiled against.
54 *
55 * Returns: %TRUE if the version of the libqrtr-glib header files
56 * is the same as or newer than the passed-in version.
57 *
58 * Since: 1.0
59 */
60 #define QRTR_CHECK_VERSION(major,minor,micro) \
61 (QRTR_MAJOR_VERSION > (major) || \
62 (QRTR_MAJOR_VERSION == (major) && QRTR_MINOR_VERSION > (minor)) || \
63 (QRTR_MAJOR_VERSION == (major) && QRTR_MINOR_VERSION == (minor) && QRTR_MICRO_VERSION >= (micro)))
64
65 #endif /* _QRTR_VERSION_H_ */