diff options
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r-- | toxav/toxav.c | 20 |
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 | ||
107 | uint32_t toxav_version_major(void) | 107 | uint32_t toxav_version_major(void) |
108 | { | 108 | { |
109 | return 0; | 109 | return TOXAV_VERSION_MAJOR; |
110 | } | 110 | } |
111 | |||
111 | uint32_t toxav_version_minor(void) | 112 | uint32_t toxav_version_minor(void) |
112 | { | 113 | { |
113 | return 0; | 114 | return TOXAV_VERSION_MINOR; |
114 | } | 115 | } |
116 | |||
115 | uint32_t toxav_version_patch(void) | 117 | uint32_t toxav_version_patch(void) |
116 | { | 118 | { |
117 | return 0; | 119 | return TOXAV_VERSION_PATCH; |
118 | } | 120 | } |
121 | |||
119 | bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) | 122 | bool 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 | |||
127 | ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error) | 131 | ToxAV *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; |