summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/api_connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/api_connection.cpp')
-rw-r--r--protocols/Tox/src/api_connection.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/Tox/src/api_connection.cpp b/protocols/Tox/src/api_connection.cpp
new file mode 100644
index 0000000000..3b3ffb4143
--- /dev/null
+++ b/protocols/Tox/src/api_connection.cpp
@@ -0,0 +1,28 @@
+#include "common.h"
+
+/* CONNECTION FUNCTIONS */
+
+int tox_bootstrap_from_address(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key)
+{
+ return CreateFunction<int(*)(Tox*, const char*, uint16_t, const uint8_t*)>(__FUNCTION__)(tox, address, port, public_key);
+}
+
+int tox_add_tcp_relay(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key)
+{
+ return CreateFunction<int(*)(Tox*, const char*, uint16_t, const uint8_t*)>(__FUNCTION__)(tox, address, port, public_key);
+}
+
+int tox_isconnected(const Tox *tox)
+{
+ return CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
+}
+
+uint32_t tox_do_interval(Tox *tox)
+{
+ return CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
+}
+
+void tox_do(Tox *tox)
+{
+ CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
+} \ No newline at end of file