summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index 448ce3f8..814c4f26 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -106,24 +106,28 @@ void call_kill_transmission(ToxAVCall *call);
106 106
107uint32_t toxav_version_major(void) 107uint32_t toxav_version_major(void)
108{ 108{
109 return 0; 109 return TOXAV_VERSION_MAJOR;
110} 110}
111
111uint32_t toxav_version_minor(void) 112uint32_t toxav_version_minor(void)
112{ 113{
113 return 0; 114 return TOXAV_VERSION_MINOR;
114} 115}
116
115uint32_t toxav_version_patch(void) 117uint32_t toxav_version_patch(void)
116{ 118{
117 return 0; 119 return TOXAV_VERSION_PATCH;
118} 120}
121
119bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) 122bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
120{ 123{
121 (void)major; 124 return (TOXAV_VERSION_MAJOR == major && /* Force the major version */
122 (void)minor; 125 (TOXAV_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */
123 (void)patch; 126 (TOXAV_VERSION_MINOR == minor && TOXAV_VERSION_PATCH >= patch) /* the patch must be the same or newer */
124 127 )
125 return 1; 128 );
126} 129}
130
127ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error) 131ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error)
128{ 132{
129 TOXAV_ERR_NEW rc = TOXAV_ERR_NEW_OK; 133 TOXAV_ERR_NEW rc = TOXAV_ERR_NEW_OK;