diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-10 12:01:55 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-10 12:01:55 +0000 |
commit | 78f97fe198286a120370f6c56921205191f986b0 (patch) | |
tree | 96629174df34f22697c5eaad7cfe102f8f7fd5eb /protocols/Tox/src/api_connection.cpp | |
parent | bff791f9bd1828c66e1462a4a3f86a800b58ad13 (diff) |
Tox:
- switched to new api
- updated tox core
git-svn-id: http://svn.miranda-ng.org/main/trunk@12726 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/api_connection.cpp')
-rw-r--r-- | protocols/Tox/src/api_connection.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/protocols/Tox/src/api_connection.cpp b/protocols/Tox/src/api_connection.cpp index 6a854612fb..7777755fd6 100644 --- a/protocols/Tox/src/api_connection.cpp +++ b/protocols/Tox/src/api_connection.cpp @@ -2,31 +2,27 @@ /* CONNECTION FUNCTIONS */
-int tox_bootstrap_from_address(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key)
+bool tox_bootstrap(Tox *tox, const char *host, uint16_t port, const uint8_t *public_key, TOX_ERR_BOOTSTRAP *error)
{
- if (public_key == NULL)
- return 0;
- return CreateFunction<int(*)(Tox*, const char*, uint16_t, const uint8_t*)>(__FUNCTION__)(tox, address, port, public_key);
+ return CreateFunction<bool(*)(Tox*, const char*, uint16_t, const uint8_t*, TOX_ERR_BOOTSTRAP*)>(__FUNCTION__)(tox, host, port, public_key, error);
}
-int tox_add_tcp_relay(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key)
+bool tox_add_tcp_relay(Tox *tox, const char *host, uint16_t port, const uint8_t *public_key, TOX_ERR_BOOTSTRAP *error)
{
- if (public_key == NULL)
- return 0;
- return CreateFunction<int(*)(Tox*, const char*, uint16_t, const uint8_t*)>(__FUNCTION__)(tox, address, port, public_key);
+ return CreateFunction<bool(*)(Tox*, const char*, uint16_t, const uint8_t*, TOX_ERR_BOOTSTRAP*)>(__FUNCTION__)(tox, host, port, public_key, error);
}
-int tox_isconnected(const Tox *tox)
+TOX_CONNECTION tox_self_get_connection_status(const Tox *tox)
{
- return CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
+ return CreateFunction<TOX_CONNECTION(*)(const Tox*)>(__FUNCTION__)(tox);
}
-uint32_t tox_do_interval(Tox *tox)
+uint32_t tox_iteration_interval(const Tox *tox)
{
- return CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
+ return CreateFunction<uint32_t(*)(const Tox*)>(__FUNCTION__)(tox);
}
-void tox_do(Tox *tox)
+void tox_iterate(Tox *tox)
{
CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
}
\ No newline at end of file |