summaryrefslogtreecommitdiff
path: root/other/apidsl/toxav.in.h
diff options
context:
space:
mode:
authorGregory Mullen (grayhatter) <greg@grayhatter.com>2016-09-24 16:26:35 -0700
committerGregory Mullen (grayhatter) <greg@grayhatter.com>2016-09-28 12:12:39 -0700
commit51139a080c982a6460aa25975b3a1e0866f518ed (patch)
tree4fb34aa71d9d73ddae7fd17865c1330fc4ca69b7 /other/apidsl/toxav.in.h
parent95b8365af690595d9d1b8d9aa9f6ed56c710e13e (diff)
v0.0.0 => v0.0.1
Diffstat (limited to 'other/apidsl/toxav.in.h')
-rw-r--r--other/apidsl/toxav.in.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/other/apidsl/toxav.in.h b/other/apidsl/toxav.in.h
index 8a7d5358..07808eec 100644
--- a/other/apidsl/toxav.in.h
+++ b/other/apidsl/toxav.in.h
@@ -93,73 +93,6 @@ class toxAV {
93 */ 93 */
94struct this; 94struct this;
95 95
96
97/*******************************************************************************
98 *
99 * :: API version
100 *
101 ******************************************************************************/
102
103
104/**
105 * The major version number. Incremented when the API or ABI changes in an
106 * incompatible way.
107 *
108 * The function variants of these constants return the version number of the
109 * library. They can be used to display the Tox library version or to check
110 * whether the client is compatible with the dynamically linked version of Tox.
111 */
112const VERSION_MAJOR = 0;
113
114/**
115 * The minor version number. Incremented when functionality is added without
116 * breaking the API or ABI. Set to 0 when the major version number is
117 * incremented.
118 */
119const VERSION_MINOR = 0;
120
121/**
122 * The patch or revision number. Incremented when bugfixes are applied without
123 * changing any functionality or API or ABI.
124 */
125const VERSION_PATCH = 0;
126
127/**
128 * A macro to check at preprocessing time whether the client code is compatible
129 * with the installed version of ToxAV.
130 */
131#define TOXAV_VERSION_IS_API_COMPATIBLE(MAJOR, MINOR, PATCH) \
132 (TOXAV_VERSION_MAJOR == MAJOR && \
133 (TOXAV_VERSION_MINOR > MINOR || \
134 (TOXAV_VERSION_MINOR == MINOR && \
135 TOXAV_VERSION_PATCH >= PATCH)))
136
137/**
138 * A macro to make compilation fail if the client code is not compatible with
139 * the installed version of ToxAV.
140 */
141#define TOXAV_VERSION_REQUIRE(MAJOR, MINOR, PATCH) \
142 typedef char toxav_required_version[TOXAV_IS_COMPATIBLE(MAJOR, MINOR, PATCH) ? 1 : -1]
143
144/**
145 * A convenience macro to call ${version.is_compatible} with the currently
146 * compiling API version.
147 */
148#define TOXAV_VERSION_IS_ABI_COMPATIBLE() \
149 toxav_version_is_compatible(TOXAV_VERSION_MAJOR, TOXAV_VERSION_MINOR, TOXAV_VERSION_PATCH)
150
151
152static namespace version {
153
154 /**
155 * Return whether the compiled library version is compatible with the passed
156 * version numbers.
157 */
158 bool is_compatible(uint32_t major, uint32_t minor, uint32_t patch);
159
160}
161
162
163/******************************************************************************* 96/*******************************************************************************
164 * 97 *
165 * :: Creation and destruction 98 * :: Creation and destruction