diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-01-03 08:12:27 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-01-03 08:12:27 +0000 |
commit | f1f8a71bd4df7f239e28a9625b82ee02428c3f3f (patch) | |
tree | 9bfbccff9826c0cb530805eec4373a1365122201 /protocols/Tox/src/api_avatars.cpp | |
parent | c42d4e21629ebefaf5a720c5270e77187edfc720 (diff) |
Tox: work commit
- removed *.lib and lib generator
- disabled profile encryption and import
- loading tox profile on connection
- project reordering
- http proxy support
git-svn-id: http://svn.miranda-ng.org/main/trunk@11730 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/api_avatars.cpp')
-rw-r--r-- | protocols/Tox/src/api_avatars.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/protocols/Tox/src/api_avatars.cpp b/protocols/Tox/src/api_avatars.cpp new file mode 100644 index 0000000000..5b5aa0c487 --- /dev/null +++ b/protocols/Tox/src/api_avatars.cpp @@ -0,0 +1,48 @@ +#include "common.h"
+
+/* AVATAR FUNCTIONS */
+
+void tox_callback_avatar_info(Tox *tox, void(*function)(Tox *tox, int32_t, uint8_t, uint8_t *, void *), void *userdata)
+{
+ CreateFunction<int(*)(Tox*, void(*)(Tox*, int32_t, uint8_t, uint8_t*, void*), void*)>(__FUNCTION__)(tox, function, userdata);
+}
+
+void tox_callback_avatar_data(Tox *tox, void(*function)(Tox *tox, int32_t, uint8_t, uint8_t *, uint8_t *, uint32_t, void *), void *userdata)
+{
+ CreateFunction<int(*)(Tox*, void(*)(Tox*, int32_t, uint8_t, uint8_t*, uint8_t*, uint32_t, void*), void*)>(__FUNCTION__)(tox, function, userdata);
+}
+
+int tox_set_avatar(Tox *tox, uint8_t format, const uint8_t *data, uint32_t length)
+{
+ return CreateFunction<int(*)(Tox*, uint8_t, const uint8_t*, uint32_t)>(__FUNCTION__)(tox, format, data, length);
+}
+
+int tox_unset_avatar(Tox *tox)
+{
+ return CreateFunction<int(*)(const Tox*)>(__FUNCTION__)(tox);
+}
+
+int tox_get_self_avatar(const Tox *tox, uint8_t *format, uint8_t *buf, uint32_t *length, uint32_t maxlen, uint8_t *hash)
+{
+ return CreateFunction<int(*)(const Tox*, uint8_t*, uint8_t*, uint32_t*, uint32_t, uint8_t*)>(__FUNCTION__)(tox, format, buf, length, maxlen, hash);
+}
+
+int tox_hash(uint8_t *hash, const uint8_t *data, const uint32_t datalen)
+{
+ return CreateFunction<int(*)(uint8_t*, const uint8_t*, const uint32_t)>(__FUNCTION__)(hash, data, datalen);
+}
+
+int tox_request_avatar_info(const Tox *tox, const int32_t friendnumber)
+{
+ return CreateFunction<int(*)(const Tox*, const int32_t)>(__FUNCTION__)(tox, friendnumber);
+}
+
+int tox_send_avatar_info(Tox *tox, const int32_t friendnumber)
+{
+ return CreateFunction<int(*)(const Tox*, const int32_t)>(__FUNCTION__)(tox, friendnumber);
+}
+
+int tox_request_avatar_data(const Tox *tox, const int32_t friendnumber)
+{
+ return CreateFunction<int(*)(const Tox*, const int32_t)>(__FUNCTION__)(tox, friendnumber);
+}
\ No newline at end of file |