diff options
Diffstat (limited to 'other/apidsl')
-rw-r--r-- | other/apidsl/tox.in.h | 2 | ||||
-rw-r--r-- | other/apidsl/toxav.in.h | 67 |
2 files changed, 1 insertions, 68 deletions
diff --git a/other/apidsl/tox.in.h b/other/apidsl/tox.in.h index dfc658d5..91cd0eb8 100644 --- a/other/apidsl/tox.in.h +++ b/other/apidsl/tox.in.h | |||
@@ -179,7 +179,7 @@ const VERSION_MINOR = 0; | |||
179 | * The patch or revision number. Incremented when bugfixes are applied without | 179 | * The patch or revision number. Incremented when bugfixes are applied without |
180 | * changing any functionality or API or ABI. | 180 | * changing any functionality or API or ABI. |
181 | */ | 181 | */ |
182 | const VERSION_PATCH = 0; | 182 | const VERSION_PATCH = 1; |
183 | 183 | ||
184 | /** | 184 | /** |
185 | * A macro to check at preprocessing time whether the client code is compatible | 185 | * A macro to check at preprocessing time whether the client code is compatible |
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 | */ |
94 | struct this; | 94 | struct 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 | */ | ||
112 | const 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 | */ | ||
119 | const 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 | */ | ||
125 | const 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 | |||
152 | static 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 |