xeme/xeme

Add version labels to all the things

6 months ago, Gary Kramlich
5a507826b7bf
Parents 9aba27798541
Children 6f495ad383bb
Add version labels to all the things
--- a/xeme/meson.build Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/meson.build Fri Dec 01 03:13:26 2023 -0600
@@ -4,6 +4,7 @@
'xemeoutputstream.c',
'xemestanza.c',
'xemestream.c',
+ 'xemeversion.c',
]
XEME_HEADERS = [
@@ -14,12 +15,24 @@
'xemestanza.h',
'xemestream.h',
'xemestring.h',
+ 'xemeversion.h',
]
XEME_BUILT_HEADERS = []
XEME_GENERATED_SOURCES = []
###############################################################################
+# xemeversionconsts.h
+###############################################################################
+xeme_version_consts_h = configure_file(
+ input : 'xemeversionconsts.h.in',
+ output : 'xemeversionconsts.h',
+ configuration : version_config,
+ install : true,
+ install_dir : get_option('includedir') / 'xeme-1.0' / 'xeme')
+XEME_BUILT_HEADERS += xeme_version_consts_h
+
+###############################################################################
# Single Header
###############################################################################
XEME_H_INCLUDES = []
@@ -46,6 +59,7 @@
xeme_lib = library('xeme',
XEME_SOURCES + XEME_HEADERS,
c_args : ['-DXEME_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Xeme"'],
+ gnu_symbol_visibility : 'hidden',
dependencies : [gio_dep, glib_dep, gobject_dep],
include_directories : [toplevel_inc, xeme_inc],
install : true)
--- a/xeme/xemecore.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xemecore.h Fri Dec 01 03:13:26 2023 -0600
@@ -20,6 +20,6 @@
#include <glib.h>
-#define XEME_DOMAIN (g_quark_from_static_string("xeme"))
+#define XEME_DOMAIN (g_quark_from_static_string("xeme")) XEME_AVAILABLE_MACRO_IN_0_1
#endif /* XEME_CORE_H */
--- a/xeme/xemeinputstream.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xemeinputstream.h Fri Dec 01 03:13:26 2023 -0600
@@ -25,10 +25,13 @@
#include <xeme/xememessage.h>
#include <xeme/xemestream.h>
+#include <xeme/xemeversion.h>
G_BEGIN_DECLS
#define XEME_TYPE_INPUT_STREAM (xeme_input_stream_get_type())
+
+XEME_AVAILABLE_IN_0_1
G_DECLARE_DERIVABLE_TYPE(XemeInputStream, xeme_input_stream, XEME, INPUT_STREAM, XemeStream)
struct _XemeInputStreamClass {
@@ -48,6 +51,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
XemeInputStream *xeme_input_stream_new(void);
/**
@@ -69,6 +73,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
gboolean xeme_input_stream_start(XemeInputStream *stream, GInputStream *input, GError **error);
G_END_DECLS
--- a/xeme/xememessage.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xememessage.h Fri Dec 01 03:13:26 2023 -0600
@@ -21,11 +21,14 @@
#include <glib.h>
#include <glib-object.h>
-#include <xeme/xemestanza.h>
+#include "xemestanza.h"
+#include "xemeversion.h"
G_BEGIN_DECLS
#define XEME_TYPE_MESSAGE (xeme_message_get_type())
+
+XEME_AVAILABLE_IN_0_1
G_DECLARE_FINAL_TYPE(XemeMessage, xeme_message, XEME, MESSAGE, XemeStanza)
/**
@@ -37,6 +40,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
XemeStanza *xeme_message_new(void);
/**
@@ -49,6 +53,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_message_get_thread(XemeMessage *message);
/**
@@ -58,8 +63,9 @@
*
* Sets the thread identifier of @message.
*
- * Since: 3.0.0
+ * Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_message_set_thread(XemeMessage *message, const char *thread);
/**
@@ -72,6 +78,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_message_get_thread_parent(XemeMessage *message);
/**
@@ -81,8 +88,9 @@
*
* Sets the thread parent identifier of @message.
*
- * Since: 3.0.0
+ * Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_message_set_thread_parent(XemeMessage *message, const char *thread_parent);
/**
@@ -96,6 +104,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_message_add_subject(XemeMessage *message, const char *language, const char *content);
/**
@@ -109,6 +118,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_message_add_body(XemeMessage *message, const char *language, const char *content);
G_END_DECLS
--- a/xeme/xemeoutputstream.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xemeoutputstream.h Fri Dec 01 03:13:26 2023 -0600
@@ -23,11 +23,14 @@
#include <gio/gio.h>
-#include <xeme/xemestream.h>
+#include "xemestream.h"
+#include "xemeversion.h"
G_BEGIN_DECLS
#define XEME_TYPE_OUTPUT_STREAM (xeme_output_stream_get_type())
+
+XEME_AVAILABLE_IN_0_1
G_DECLARE_FINAL_TYPE(XemeOutputStream, xeme_output_stream, XEME, OUTPUT_STREAM, XemeStream)
/**
@@ -41,6 +44,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
XemeOutputStream *xeme_output_stream_new(const char *to, const char *from, GCancellable *cancellable);
/**
@@ -62,6 +66,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
gboolean xeme_output_stream_start(XemeOutputStream *stream, GOutputStream *output, GError **error);
/**
@@ -76,6 +81,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
gboolean xeme_output_stream_stop(XemeOutputStream *stream, GError **error);
G_END_DECLS
--- a/xeme/xemestanza.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xemestanza.h Fri Dec 01 03:13:26 2023 -0600
@@ -21,9 +21,13 @@
#include <glib.h>
#include <glib-object.h>
+#include "xemeversion.h"
+
G_BEGIN_DECLS
#define XEME_TYPE_STANZA (xeme_stanza_get_type())
+
+XEME_AVAILABLE_IN_0_1
G_DECLARE_DERIVABLE_TYPE(XemeStanza, xeme_stanza, XEME, STANZA, GObject)
struct _XemeStanzaClass {
@@ -45,8 +49,9 @@
*
* Returns: (nullable): The content type of @stanza.
*
- * Since: 1.0.0
+ * Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stanza_get_content_type(XemeStanza *stanza);
/**
@@ -58,6 +63,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stanza_set_content_type(XemeStanza *stanza, const char *content_type);
/**
@@ -70,6 +76,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stanza_get_from(XemeStanza *stanza);
/**
@@ -81,6 +88,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stanza_set_from(XemeStanza *stanza, const char *from);
/**
@@ -93,6 +101,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stanza_get_id(XemeStanza *stanza);
/**
@@ -104,6 +113,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stanza_set_id(XemeStanza *stanza, const char *id);
/**
@@ -116,6 +126,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stanza_get_to(XemeStanza *stanza);
/**
@@ -127,6 +138,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stanza_set_to(XemeStanza *stanza, const char *to);
/**
@@ -139,6 +151,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stanza_get_xml_lang(XemeStanza *stanza);
/**
@@ -150,6 +163,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stanza_set_xml_lang(XemeStanza *stanza, const char *xml_lang);
/**
@@ -165,6 +179,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
char *xeme_stanza_marshal(XemeStanza *stanza, GError **error);
/**
@@ -182,6 +197,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
char *xeme_stanza_marshal_attributes(XemeStanza *stanza);
G_END_DECLS
--- a/xeme/xemestream.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xemestream.h Fri Dec 01 03:13:26 2023 -0600
@@ -23,14 +23,18 @@
#include <gio/gio.h>
+#include "xemeversion.h"
+
G_BEGIN_DECLS
-#define XEME_STREAM_PI "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-#define XEME_STREAM_VERSION "1.0"
-#define XEME_STREAM_XMLNS "jabber:client"
-#define XEME_STREAM_XMLNS_STREAM "http://etherx.jabber.org/streams"
+#define XEME_STREAM_PI "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" XEME_AVAILABLE_MACRO_IN_0_1
+#define XEME_STREAM_VERSION "1.0" XEME_AVAILABLE_MACRO_IN_0_1
+#define XEME_STREAM_XMLNS "jabber:client" XEME_AVAILABLE_MACRO_IN_0_1
+#define XEME_STREAM_XMLNS_STREAM "http://etherx.jabber.org/streams" XEME_AVAILABLE_MACRO_IN_0_1
#define XEME_TYPE_STREAM (xeme_stream_get_type())
+
+XEME_AVAILABLE_IN_0_1
G_DECLARE_DERIVABLE_TYPE(XemeStream, xeme_stream, XEME, STREAM, GObject)
struct _XemeStreamClass {
@@ -51,6 +55,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
GCancellable *xeme_stream_get_cancellable(XemeStream *stream);
/**
@@ -63,6 +68,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stream_get_id(XemeStream *stream);
/**
@@ -74,6 +80,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stream_set_id(XemeStream *stream, const char *id);
/**
@@ -86,6 +93,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stream_get_to(XemeStream *stream);
/**
@@ -97,6 +105,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stream_set_to(XemeStream *stream, const char *to);
/**
@@ -109,6 +118,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stream_get_from(XemeStream *stream);
/**
@@ -120,6 +130,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stream_set_from(XemeStream *stream, const char *from);
/**
@@ -132,6 +143,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stream_get_language(XemeStream *stream);
/**
@@ -145,6 +157,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stream_set_language(XemeStream *stream, const char *language);
/**
@@ -157,6 +170,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
const char *xeme_stream_get_version(XemeStream *stream);
/**
@@ -168,6 +182,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_IN_0_1
void xeme_stream_set_version(XemeStream *stream, const char *version);
G_END_DECLS
--- a/xeme/xemestring.h Fri Dec 01 01:53:45 2023 -0600
+++ b/xeme/xemestring.h Fri Dec 01 03:13:26 2023 -0600
@@ -32,6 +32,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_STATIC_INLINE_IN_0_1
static inline gboolean
xeme_str_is_empty(const char *str) {
return (str == NULL || str[0] == '\0');
@@ -48,6 +49,7 @@
*
* Since: 0.1.0
*/
+XEME_AVAILABLE_STATIC_INLINE_IN_0_1
static inline gboolean
xeme_str_equal(const char *str1, const char *str2) {
return (g_strcmp0(str1, str2) == 0);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xeme/xemeversion.c Fri Dec 01 03:13:26 2023 -0600
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2023 Xeme Developers
+ *
+ * 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, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "xemeversion.h"
+
+/******************************************************************************
+ * Externals
+ *****************************************************************************/
+const guint xeme_major_version = XEME_MAJOR_VERSION;
+const guint xeme_minor_version = XEME_MINOR_VERSION;
+const guint xeme_micro_version = XEME_MICRO_VERSION;
+const char *xeme_version = XEME_VERSION;
+
+/******************************************************************************
+ * Public API
+ *****************************************************************************/
+const char *
+xeme_check_version(guint required_major, guint required_minor,
+ guint required_micro)
+{
+ if(required_major > XEME_MAJOR_VERSION) {
+ return "xeme version too old (major mismatch)";
+ }
+
+#if XEME_CHECK_VERSION(1, 0, 0)
+ if(required_major < XEME_MAJOR_VERSION) {
+ return "xeme version too new (major mismatch)";
+ }
+#endif
+
+ if(required_minor > XEME_MINOR_VERSION) {
+ return "xeme version too old (minor mismatch)";
+ }
+
+ if((required_minor == XEME_MINOR_VERSION) &&
+ (required_micro > XEME_MICRO_VERSION))
+ {
+ return "xeme version too old (micro mismatch)";
+ }
+
+ return NULL;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xeme/xemeversion.h Fri Dec 01 03:13:26 2023 -0600
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2023 Xeme Developers
+ *
+ * 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, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef XEME_VERSION_H
+#define XEME_VERSION_H
+
+#include <glib.h>
+
+#include "xemeversionconsts.h"
+
+/* clang-format tries to remove the space after 'if', which confuses
+ * gobject-introspection, so turn it off temporarily. */
+/* clang-format off */
+#if (defined(_WIN32) || defined(__CYGWIN__)) && \
+ !defined(XEME_STATIC_COMPILATION)
+/* clang-format on */
+#define _XEME_EXPORT __declspec(dllexport)
+#define _XEME_IMPORT __declspec(dllimport)
+#elif __GNUC__ >= 4
+#define _XEME_EXPORT __attribute__((visibility("default")))
+#define _XEME_IMPORT
+#else
+#define _XEME_EXPORT
+#define _XEME_IMPORT
+#endif
+#ifdef XEME_COMPILATION
+#define _XEME_API _XEME_EXPORT
+#else
+#define _XEME_API _XEME_IMPORT
+#endif
+
+#define _XEME_EXTERN _XEME_API extern
+
+#ifdef XEME_DISABLE_DEPRECATION_WARNINGS
+#define XEME_DEPRECATED _XEME_EXTERN
+#define XEME_DEPRECATED_FOR(f) _XEME_EXTERN
+#define XEME_UNAVAILABLE(maj, min) _XEME_EXTERN
+#define XEME_UNAVAILABLE_STATIC_INLINE(maj, min)
+#define XEME_UNAVAILABLE_TYPE(maj, min)
+#else
+#define XEME_DEPRECATED G_DEPRECATED _XEME_EXTERN
+#define XEME_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _XEME_EXTERN
+#define XEME_UNAVAILABLE(maj, min) G_UNAVAILABLE(maj, min) _XEME_EXTERN
+#define XEME_UNAVAILABLE_STATIC_INLINE(maj, min) G_UNAVAILABLE(maj, min)
+#define XEME_UNAVAILABLE_TYPE(maj, min) G_UNAVAILABLE(maj, min)
+#endif
+
+/**
+ * XEME_VERSION_CUR_STABLE:
+ *
+ * A macro that evaluates to the current stable version of xeme, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_VERSION_CUR_STABLE \
+ (G_ENCODE_VERSION(XEME_MAJOR_VERSION, XEME_MINOR_VERSION))
+
+/* If the package sets XEME_VERSION_MIN_REQUIRED to some future
+ * XEME_VERSION_X_Y value that we don't know about, it will compare as 0 in
+ * preprocessor tests.
+ */
+#ifndef XEME_VERSION_MIN_REQUIRED
+#define XEME_VERSION_MIN_REQUIRED (XEME_VERSION_CUR_STABLE)
+#elif XEME_VERSION_MIN_REQUIRED == 0
+#undef XEME_VERSION_MIN_REQUIRED
+#define XEME_VERSION_MIN_REQUIRED (XEME_VERSION_CUR_STABLE + 1)
+#endif /* XEME_VERSION_MIN_REQUIRED */
+
+#if !defined(XEME_VERSION_MAX_ALLOWED) || (XEME_VERSION_MAX_ALLOWED == 0)
+#undef XEME_VERSION_MAX_ALLOWED
+#define XEME_VERSION_MAX_ALLOWED (XEME_VERSION_CUR_STABLE)
+#endif /* XEME_VERSION_MAX_ALLOWED */
+
+/* sanity checks */
+#if XEME_VERSION_MIN_REQUIRED > XEME_VERSION_CUR_STABLE
+#error "XEME_VERSION_MIN_REQUIRED must be <= XEME_VERSION_CUR_STABLE"
+#endif
+#if XEME_VERSION_MAX_ALLOWED < XEME_VERSION_MIN_REQUIRED
+#error "XEME_VERSION_MAX_ALLOWED must be >= XEME_VERSION_MIN_REQUIRED"
+#endif
+#if XEME_VERSION_MIN_REQUIRED < G_ENCODE_VERSION(0, 1)
+#error "XEME_VERSION_MIN_REQUIRED must be >= XEME_VERSION_0_1"
+#endif
+
+#define XEME_VAR _XEME_EXTERN
+#define XEME_AVAILABLE_IN_ALL _XEME_EXTERN
+
+/**
+ * XEME_VERSION_0_1:
+ *
+ * A macro that evaluates to the 0.1 version of xeme, in a format that can be
+ * used by the C pre-processor.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_VERSION_0_1 (G_ENCODE_VERSION(0, 1))
+
+#if XEME_VERSION_MAX_ALLOWED < XEME_VERSION_0_1
+#define XEME_AVAILABLE_IN_0_1 XEME_UNAVAILABLE(0, 1)
+#define XEME_AVAILABLE_STATIC_INLINE_IN_0_1 XEME_UNAVAILABLE_STATIC_INLINE(0, 1)
+#define XEME_AVAILABLE_MACRO_IN_0_1 XEME_UNAVAILABLE_MACRO(0, 1)
+#define XEME_AVAILABLE_ENUMERATOR_IN_0_1 XEME_UNAVAILABLE_ENUMERATOR(0, 1)
+#define XEME_AVAILABLE_TYPE_IN_0_1 XEME_UNAVAILABLE_TYPE(0, 1)
+#else
+#define XEME_AVAILABLE_IN_0_1 _XEME_EXTERN
+#define XEME_AVAILABLE_STATIC_INLINE_IN_0_1
+#define XEME_AVAILABLE_MACRO_IN_0_1
+#define XEME_AVAILABLE_ENUMERATOR_IN_0_1
+#define XEME_AVAILABLE_TYPE_IN_0_1
+#endif
+
+G_BEGIN_DECLS
+
+/**
+ * XEME_CHECK_VERSION:
+ * @major: The major version to check for.
+ * @minor: The minor version to check for.
+ * @micro: The micro version to check for.
+ *
+ * Checks the version of xeme being compiled against. See [func@check_version]
+ * for a runtime check.
+ *
+ * Returns: %TRUE if the version is the same or newer than the passed-in
+ * version.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_CHECK_VERSION(major, minor, micro) ((major) == XEME_MAJOR_VERSION && \
+ ((minor) < XEME_MINOR_VERSION || \
+ ((minor) == XEME_MINOR_VERSION && (micro) <= XEME_MICRO_VERSION)))
+
+/**
+ * xeme_check_version:
+ * @required_major: the required major version.
+ * @required_minor: the required minor version.
+ * @required_micro: the required micro version.
+ *
+ * Checks that the xeme version is compatible with the requested version.
+ *
+ * Returns: %NULL if the versions are compatible, or a string describing
+ * the version mismatch if not compatible.
+ *
+ * Since: 0.1.0
+ */
+XEME_AVAILABLE_IN_ALL
+const char *xeme_check_version(guint required_major, guint required_minor, guint required_micro);
+
+/**
+ * xeme_version:
+ *
+ * The full version string of the running xeme.
+ *
+ * Since: 0.1.0
+ */
+XEME_VAR const char *xeme_version;
+
+/**
+ * xeme_major_version:
+ *
+ * The major version of the running xeme. Contrast with #XEME_MAJOR_VERSION,
+ * which expands at compile time to the major version of xeme being compiled
+ * against.
+ *
+ * Since: 0.1.0
+ */
+XEME_VAR const guint xeme_major_version;
+
+/**
+ * xeme_minor_version:
+ *
+ * The minor version of the running xeme. Contrast with #XEME_MINOR_VERSION,
+ * which expands at compile time to the minor version of xeme being compiled
+ * against.
+ *
+ * Since: 0.1.0
+ */
+XEME_VAR const guint xeme_minor_version;
+
+/**
+ * xeme_micro_version:
+ *
+ * The micro version of the running xeme. Contrast with #XEME_MICRO_VERSION,
+ * which expands at compile time to the micro version of xeme being compiled
+ * against.
+ *
+ * Since: 0.1.0
+ */
+XEME_VAR const guint xeme_micro_version;
+
+G_END_DECLS
+
+#endif /* XEME_VERSION_CONSTS_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xeme/xemeversionconsts.h.in Fri Dec 01 03:13:26 2023 -0600
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2023 Xeme Developers
+ *
+ * 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, see <https://www.gnu.org/licenses/>.
+ */
+
+#ifndef XEME_VERSION_CONSTS_H
+#define XEME_VERSION_CONSTS_H
+
+/**
+ * XEME_MAJOR_VERSION:
+ *
+ * The major version of the version of XEME that was compiled against.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_MAJOR_VERSION (@XEME_MAJOR_VERSION@)
+
+/**
+ * XEME_MINOR_VERSION:
+ *
+ * The minor version of the version of XEME that was compiled against.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_MINOR_VERSION (@XEME_MINOR_VERSION@)
+
+/**
+ * XEME_MICRO_VERSION:
+ *
+ * The micro version of the version of XEME that was compiled against.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_MICRO_VERSION (@XEME_MICRO_VERSION@)
+
+/**
+ * XEME_EXTRA_VERSION:
+ *
+ * The extra version of the version of XEME that was compiled against.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_EXTRA_VERSION ("@XEME_EXTRA_VERSION@")
+
+/**
+ * XEME_VERSION:
+ *
+ * The full version number for the version of XEME that was compiled against.
+ *
+ * Since: 0.1.0
+ */
+#define XEME_VERSION ("@XEME_VERSION@")
+
+#endif /* XEME_VERSION_CONSTS_H */