diff options
author | Gregory Mullen (grayhatter) <greg@grayhatter.com> | 2016-09-24 16:26:35 -0700 |
---|---|---|
committer | Gregory Mullen (grayhatter) <greg@grayhatter.com> | 2016-09-28 12:12:39 -0700 |
commit | 51139a080c982a6460aa25975b3a1e0866f518ed (patch) | |
tree | 4fb34aa71d9d73ddae7fd17865c1330fc4ca69b7 | |
parent | 95b8365af690595d9d1b8d9aa9f6ed56c710e13e (diff) |
v0.0.0 => v0.0.1
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | other/apidsl/tox.in.h | 2 | ||||
-rw-r--r-- | other/apidsl/toxav.in.h | 67 | ||||
-rw-r--r-- | toxav/toxav.c | 24 | ||||
-rw-r--r-- | toxav/toxav.h | 68 | ||||
-rw-r--r-- | toxcore/tox.h | 2 | ||||
-rw-r--r-- | toxencryptsave/toxencryptsave.c | 24 | ||||
-rw-r--r-- | toxencryptsave/toxencryptsave.h | 74 |
9 files changed, 5 insertions, 263 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bbb9a014..a65716e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -4,7 +4,7 @@ include(CTest) | |||
4 | 4 | ||
5 | # This version is for the entire project. All libraries (core, av, ...) move in | 5 | # This version is for the entire project. All libraries (core, av, ...) move in |
6 | # versions in a synchronised way. | 6 | # versions in a synchronised way. |
7 | set(PROJECT_VERSION "0.0.0") | 7 | set(PROJECT_VERSION "0.0.1") |
8 | 8 | ||
9 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | 9 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
10 | 10 | ||
diff --git a/configure.ac b/configure.ac index 64eb4b5e..1496ba84 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -2,7 +2,7 @@ | |||
2 | # Process this file with autoconf to produce a configure script. | 2 | # Process this file with autoconf to produce a configure script. |
3 | 3 | ||
4 | AC_PREREQ([2.65]) | 4 | AC_PREREQ([2.65]) |
5 | AC_INIT([tox], [0.0.0]) | 5 | AC_INIT([tox], [0.0.1]) |
6 | AC_CONFIG_AUX_DIR(configure_aux) | 6 | AC_CONFIG_AUX_DIR(configure_aux) |
7 | AC_CONFIG_SRCDIR([toxcore/net_crypto.c]) | 7 | AC_CONFIG_SRCDIR([toxcore/net_crypto.c]) |
8 | AC_CONFIG_HEADERS([config.h]) | 8 | AC_CONFIG_HEADERS([config.h]) |
@@ -13,7 +13,6 @@ AC_CONFIG_MACRO_DIR([m4]) | |||
13 | EXTRA_LT_LDFLAGS= | 13 | EXTRA_LT_LDFLAGS= |
14 | 14 | ||
15 | LIBTOXCORE_LT_VERSION=0:0:0 | 15 | LIBTOXCORE_LT_VERSION=0:0:0 |
16 | LIBTOXAV_LT_VERSION=0:0:0 | ||
17 | dnl | 16 | dnl |
18 | dnl current:revision:age | 17 | dnl current:revision:age |
19 | dnl | 18 | dnl |
@@ -44,7 +43,7 @@ WANT_NACL="no" | |||
44 | ADD_NACL_OBJECTS_TO_PKGCONFIG="yes" | 43 | ADD_NACL_OBJECTS_TO_PKGCONFIG="yes" |
45 | 44 | ||
46 | TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" | 45 | TOXCORE_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" |
47 | TOXAV_LT_LDFLAGS="-version-info $LIBTOXAV_LT_VERSION" | 46 | TOXAV_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" |
48 | 47 | ||
49 | AC_ARG_ENABLE([soname-versions], | 48 | AC_ARG_ENABLE([soname-versions], |
50 | [AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for android) (default: enabled)]) ], | 49 | [AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for android) (default: enabled)]) ], |
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 |
diff --git a/toxav/toxav.c b/toxav/toxav.c index a5314d23..c0f64648 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -106,30 +106,6 @@ ToxAVCall *call_remove(ToxAVCall *call); | |||
106 | bool call_prepare_transmission(ToxAVCall *call); | 106 | bool call_prepare_transmission(ToxAVCall *call); |
107 | void call_kill_transmission(ToxAVCall *call); | 107 | void call_kill_transmission(ToxAVCall *call); |
108 | 108 | ||
109 | uint32_t toxav_version_major(void) | ||
110 | { | ||
111 | return TOXAV_VERSION_MAJOR; | ||
112 | } | ||
113 | |||
114 | uint32_t toxav_version_minor(void) | ||
115 | { | ||
116 | return TOXAV_VERSION_MINOR; | ||
117 | } | ||
118 | |||
119 | uint32_t toxav_version_patch(void) | ||
120 | { | ||
121 | return TOXAV_VERSION_PATCH; | ||
122 | } | ||
123 | |||
124 | bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) | ||
125 | { | ||
126 | return (TOXAV_VERSION_MAJOR == major && /* Force the major version */ | ||
127 | (TOXAV_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */ | ||
128 | (TOXAV_VERSION_MINOR == minor && TOXAV_VERSION_PATCH >= patch) /* the patch must be the same or newer */ | ||
129 | ) | ||
130 | ); | ||
131 | } | ||
132 | |||
133 | ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error) | 109 | ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error) |
134 | { | 110 | { |
135 | TOXAV_ERR_NEW rc = TOXAV_ERR_NEW_OK; | 111 | TOXAV_ERR_NEW rc = TOXAV_ERR_NEW_OK; |
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 | |||
112 | uint32_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 | |||
121 | uint32_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 | |||
129 | uint32_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 | */ | ||
159 | bool 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 | ******************************************************************************/ |
diff --git a/toxcore/tox.h b/toxcore/tox.h index ecb21ae2..49710e8a 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -180,7 +180,7 @@ uint32_t tox_version_minor(void); | |||
180 | * The patch or revision number. Incremented when bugfixes are applied without | 180 | * The patch or revision number. Incremented when bugfixes are applied without |
181 | * changing any functionality or API or ABI. | 181 | * changing any functionality or API or ABI. |
182 | */ | 182 | */ |
183 | #define TOX_VERSION_PATCH 0 | 183 | #define TOX_VERSION_PATCH 1 |
184 | 184 | ||
185 | uint32_t tox_version_patch(void); | 185 | uint32_t tox_version_patch(void); |
186 | 186 | ||
diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c index 69e5c0f3..a6a75b0d 100644 --- a/toxencryptsave/toxencryptsave.c +++ b/toxencryptsave/toxencryptsave.c | |||
@@ -47,30 +47,6 @@ | |||
47 | #error TOX_PASS_ENCRYPTION_EXTRA_LENGTH is assumed to be equal to (crypto_box_MACBYTES + crypto_box_NONCEBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES + TOX_ENC_SAVE_MAGIC_LENGTH) | 47 | #error TOX_PASS_ENCRYPTION_EXTRA_LENGTH is assumed to be equal to (crypto_box_MACBYTES + crypto_box_NONCEBYTES + crypto_pwhash_scryptsalsa208sha256_SALTBYTES + TOX_ENC_SAVE_MAGIC_LENGTH) |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | uint32_t toxes_version_major(void) | ||
51 | { | ||
52 | return TOXES_VERSION_MAJOR; | ||
53 | } | ||
54 | |||
55 | uint32_t toxes_version_minor(void) | ||
56 | { | ||
57 | return TOXES_VERSION_MINOR; | ||
58 | } | ||
59 | |||
60 | uint32_t toxes_version_patch(void) | ||
61 | { | ||
62 | return TOXES_VERSION_PATCH; | ||
63 | } | ||
64 | |||
65 | bool toxes_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) | ||
66 | { | ||
67 | return (TOXES_VERSION_MAJOR == major && /* Force the major version */ | ||
68 | (TOXES_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */ | ||
69 | (TOXES_VERSION_MINOR == minor && TOXES_VERSION_PATCH >= patch) /* the patch must be the same or newer */ | ||
70 | ) | ||
71 | ); | ||
72 | } | ||
73 | |||
74 | /* Clients should consider alerting their users that, unlike plain data, if even one bit | 50 | /* Clients should consider alerting their users that, unlike plain data, if even one bit |
75 | * becomes corrupted, the data will be entirely unrecoverable. | 51 | * becomes corrupted, the data will be entirely unrecoverable. |
76 | * Ditto if they forget their password, there is no way to recover the data. | 52 | * Ditto if they forget their password, there is no way to recover the data. |
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h index 6451f3f5..a6537fad 100644 --- a/toxencryptsave/toxencryptsave.h +++ b/toxencryptsave/toxencryptsave.h | |||
@@ -49,80 +49,6 @@ struct Tox_Options; | |||
49 | #define TOXES_DEFINED | 49 | #define TOXES_DEFINED |
50 | #endif /* TOXES_DEFINED */ | 50 | #endif /* TOXES_DEFINED */ |
51 | 51 | ||
52 | |||
53 | /******************************************************************************* | ||
54 | * | ||
55 | * :: API version | ||
56 | * | ||
57 | ******************************************************************************/ | ||
58 | /** | ||
59 | * The major version number. Incremented when the API or ABI changes in an | ||
60 | * incompatible way. | ||
61 | */ | ||
62 | #define TOXES_VERSION_MAJOR 0u | ||
63 | |||
64 | /** | ||
65 | * The minor version number. Incremented when functionality is added without | ||
66 | * breaking the API or ABI. Set to 0 when the major version number is | ||
67 | * incremented. | ||
68 | */ | ||
69 | #define TOXES_VERSION_MINOR 0u | ||
70 | |||
71 | /** | ||
72 | * The patch or revision number. Incremented when bugfixes are applied without | ||
73 | * changing any functionality or API or ABI. | ||
74 | */ | ||
75 | #define TOXES_VERSION_PATCH 0u | ||
76 | |||
77 | /** | ||
78 | * A macro to check at preprocessing time whether the client code is compatible | ||
79 | * with the installed version of ToxAV. | ||
80 | */ | ||
81 | #define TOXES_VERSION_IS_API_COMPATIBLE(MAJOR, MINOR, PATCH) \ | ||
82 | (TOXES_VERSION_MAJOR == MAJOR && \ | ||
83 | (TOXES_VERSION_MINOR > MINOR || \ | ||
84 | (TOXES_VERSION_MINOR == MINOR && \ | ||
85 | TOXES_VERSION_PATCH >= PATCH))) | ||
86 | |||
87 | /** | ||
88 | * A macro to make compilation fail if the client code is not compatible with | ||
89 | * the installed version of ToxAV. | ||
90 | */ | ||
91 | #define TOXES_VERSION_REQUIRE(MAJOR, MINOR, PATCH) \ | ||
92 | typedef char toxes_required_version[TOXES_IS_COMPATIBLE(MAJOR, MINOR, PATCH) ? 1 : -1] | ||
93 | |||
94 | /** | ||
95 | * A convenience macro to call toxES_version_is_compatible with the currently | ||
96 | * compiling API version. | ||
97 | */ | ||
98 | #define TOXES_VERSION_IS_ABI_COMPATIBLE() \ | ||
99 | toxes_version_is_compatible(TOXES_VERSION_MAJOR, TOXES_VERSION_MINOR, TOXES_VERSION_PATCH) | ||
100 | |||
101 | /** | ||
102 | * Return the major version number of the library. Can be used to display the | ||
103 | * ToxAV library version or to check whether the client is compatible with the | ||
104 | * dynamically linked version of ToxAV. | ||
105 | */ | ||
106 | uint32_t toxes_version_major(void); | ||
107 | |||
108 | /** | ||
109 | * Return the minor version number of the library. | ||
110 | */ | ||
111 | uint32_t toxes_version_minor(void); | ||
112 | |||
113 | /** | ||
114 | * Return the patch number of the library. | ||
115 | */ | ||
116 | uint32_t toxes_version_patch(void); | ||
117 | |||
118 | /** | ||
119 | * Return whether the compiled library version is compatible with the passed | ||
120 | * version numbers. | ||
121 | */ | ||
122 | bool toxes_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch); | ||
123 | |||
124 | |||
125 | |||
126 | /* This module is conceptually organized into two parts. The first part are the functions | 52 | /* This module is conceptually organized into two parts. The first part are the functions |
127 | * with "key" in the name. To use these functions, first derive an encryption key | 53 | * with "key" in the name. To use these functions, first derive an encryption key |
128 | * from a password with tox_derive_key_from_pass, and use the returned key to | 54 | * from a password with tox_derive_key_from_pass, and use the returned key to |