summaryrefslogtreecommitdiff
path: root/toxav/toxav.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 /toxav/toxav.h
parent95b8365af690595d9d1b8d9aa9f6ed56c710e13e (diff)
v0.0.0 => v0.0.1
Diffstat (limited to 'toxav/toxav.h')
-rw-r--r--toxav/toxav.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/toxav/toxav.h b/toxav/toxav.h
index 38ba354e..298dbbd0 100644
--- a/toxav/toxav.h
+++ b/toxav/toxav.h
@@ -93,74 +93,6 @@ typedef struct ToxAV ToxAV;
93 93
94/******************************************************************************* 94/*******************************************************************************
95 * 95 *
96 * :: API version
97 *
98 ******************************************************************************/
99
100
101
102/**
103 * The major version number. Incremented when the API or ABI changes in an
104 * incompatible way.
105 *
106 * The function variants of these constants return the version number of the
107 * library. They can be used to display the Tox library version or to check
108 * whether the client is compatible with the dynamically linked version of Tox.
109 */
110#define TOXAV_VERSION_MAJOR 0
111
112uint32_t toxav_version_major(void);
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 */
119#define TOXAV_VERSION_MINOR 0
120
121uint32_t toxav_version_minor(void);
122
123/**
124 * The patch or revision number. Incremented when bugfixes are applied without
125 * changing any functionality or API or ABI.
126 */
127#define TOXAV_VERSION_PATCH 0
128
129uint32_t toxav_version_patch(void);
130
131/**
132 * A macro to check at preprocessing time whether the client code is compatible
133 * with the installed version of ToxAV.
134 */
135#define TOXAV_VERSION_IS_API_COMPATIBLE(MAJOR, MINOR, PATCH) \
136 (TOXAV_VERSION_MAJOR == MAJOR && \
137 (TOXAV_VERSION_MINOR > MINOR || \
138 (TOXAV_VERSION_MINOR == MINOR && \
139 TOXAV_VERSION_PATCH >= PATCH)))
140
141/**
142 * A macro to make compilation fail if the client code is not compatible with
143 * the installed version of ToxAV.
144 */
145#define TOXAV_VERSION_REQUIRE(MAJOR, MINOR, PATCH) \
146 typedef char toxav_required_version[TOXAV_IS_COMPATIBLE(MAJOR, MINOR, PATCH) ? 1 : -1]
147
148/**
149 * A convenience macro to call toxav_version_is_compatible with the currently
150 * compiling API version.
151 */
152#define TOXAV_VERSION_IS_ABI_COMPATIBLE() \
153 toxav_version_is_compatible(TOXAV_VERSION_MAJOR, TOXAV_VERSION_MINOR, TOXAV_VERSION_PATCH)
154
155/**
156 * Return whether the compiled library version is compatible with the passed
157 * version numbers.
158 */
159bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch);
160
161
162/*******************************************************************************
163 *
164 * :: Creation and destruction 96 * :: Creation and destruction
165 * 97 *
166 ******************************************************************************/ 98 ******************************************************************************/