1/*
2 * Copyright (C) 2018 Igalia S.L.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if !defined(__JSC_H_INSIDE__) && !defined(JSC_COMPILATION) && !defined(WEBKIT2_COMPILATION)
21#error "Only <jsc/jsc.h> can be included directly."
22#endif
23
24#ifndef JSCVersion_h
25#define JSCVersion_h
26
27#include <jsc/JSCDefines.h>
28
29G_BEGIN_DECLS
30
31/**
32 * JSC_MAJOR_VERSION:
33 *
34 * Like jsc_get_major_version(), but from the headers used at
35 * application compile time, rather than from the library linked
36 * against at application run time.
37 */
38#define JSC_MAJOR_VERSION (2)
39
40/**
41 * JSC_MINOR_VERSION:
42 *
43 * Like jsc_get_minor_version(), but from the headers used at
44 * application compile time, rather than from the library linked
45 * against at application run time.
46 */
47#define JSC_MINOR_VERSION (25)
48
49/**
50 * JSC_MICRO_VERSION:
51 *
52 * Like jsc_get_micro_version(), but from the headers used at
53 * application compile time, rather than from the library linked
54 * against at application run time.
55 */
56#define JSC_MICRO_VERSION (2)
57
58/**
59 * JSC_CHECK_VERSION:
60 * @major: major version (e.g. 1 for version 1.2.5)
61 * @minor: minor version (e.g. 2 for version 1.2.5)
62 * @micro: micro version (e.g. 5 for version 1.2.5)
63 *
64 * Returns: %TRUE if the version of the JavaScriptCore header files
65 * is the same as or newer than the passed-in version.
66 */
67#define JSC_CHECK_VERSION(major, minor, micro) \
68 (JSC_MAJOR_VERSION > (major) || \
69 (JSC_MAJOR_VERSION == (major) && JSC_MINOR_VERSION > (minor)) || \
70 (JSC_MAJOR_VERSION == (major) && JSC_MINOR_VERSION == (minor) && \
71 JSC_MICRO_VERSION >= (micro)))
72
73JSC_API guint
74jsc_get_major_version (void);
75
76JSC_API guint
77jsc_get_minor_version (void);
78
79JSC_API guint
80jsc_get_micro_version (void);
81
82G_END_DECLS
83
84#endif /* JSCVersion_h */
85