summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/tox.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index c28c5178..23d0d3e4 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -72,23 +72,26 @@ typedef struct Messenger Tox;
72 72
73uint32_t tox_version_major(void) 73uint32_t tox_version_major(void)
74{ 74{
75 return 0; 75 return TOX_VERSION_MAJOR;
76} 76}
77 77
78uint32_t tox_version_minor(void) 78uint32_t tox_version_minor(void)
79{ 79{
80 return 0; 80 return TOX_VERSION_MINOR;
81} 81}
82 82
83uint32_t tox_version_patch(void) 83uint32_t tox_version_patch(void)
84{ 84{
85 return 0; 85 return TOX_VERSION_PATCH;
86} 86}
87 87
88bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) 88bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch)
89{ 89{
90 //TODO 90 return (TOX_VERSION_MAJOR == major && /* Force the major version */
91 return 1; 91 (TOX_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */
92 (TOX_VERSION_MINOR == minor && TOX_VERSION_PATCH >= patch) /* the patch must be the same or newer */
93 )
94 );
92} 95}
93 96
94 97