diff options
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index a4413c4f..b44f0ee6 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -798,6 +798,57 @@ uint64_t tox_file_data_remaining(const Tox *tox, int32_t friendnumber, uint8_t f | |||
798 | return file_dataremaining(m, friendnumber, filenumber, send_receive); | 798 | return file_dataremaining(m, friendnumber, filenumber, send_receive); |
799 | } | 799 | } |
800 | 800 | ||
801 | |||
802 | /****************AVATAR FUNCTIONS*****************/ | ||
803 | |||
804 | void tox_callback_avatar_info(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, uint8_t *, void *), void *userdata) | ||
805 | { | ||
806 | Messenger *m = tox; | ||
807 | m_callback_avatar_info(m, function, userdata); | ||
808 | } | ||
809 | |||
810 | void tox_callback_avatar_data(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, uint8_t *, uint8_t *, uint32_t, | ||
811 | void *), void *userdata) | ||
812 | { | ||
813 | Messenger *m = tox; | ||
814 | m_callback_avatar_data(m, function, userdata); | ||
815 | } | ||
816 | |||
817 | int tox_set_avatar(Tox *tox, uint8_t format, const uint8_t *data, uint32_t length) | ||
818 | { | ||
819 | Messenger *m = tox; | ||
820 | return m_set_avatar(m, format, data, length); | ||
821 | } | ||
822 | |||
823 | int tox_get_self_avatar(const Tox *tox, uint8_t *format, uint8_t *buf, uint32_t *length, uint32_t maxlen, uint8_t *hash) | ||
824 | { | ||
825 | const Messenger *m = tox; | ||
826 | return m_get_self_avatar(m, format, buf, length, maxlen, hash); | ||
827 | } | ||
828 | |||
829 | int tox_avatar_hash(const Tox *tox, uint8_t *hash, const uint8_t *data, const uint32_t datalen) | ||
830 | { | ||
831 | return m_avatar_hash(hash, data, datalen); | ||
832 | } | ||
833 | |||
834 | int tox_request_avatar_info(const Tox *tox, const int32_t friendnumber) | ||
835 | { | ||
836 | const Messenger *m = tox; | ||
837 | return m_request_avatar_info(m, friendnumber); | ||
838 | } | ||
839 | |||
840 | int tox_send_avatar_info(Tox *tox, const int32_t friendnumber) | ||
841 | { | ||
842 | const Messenger *m = tox; | ||
843 | return m_send_avatar_info(m, friendnumber); | ||
844 | } | ||
845 | |||
846 | int tox_request_avatar_data(const Tox *tox, const int32_t friendnumber) | ||
847 | { | ||
848 | const Messenger *m = tox; | ||
849 | return m_request_avatar_data(m, friendnumber); | ||
850 | } | ||
851 | |||
801 | /***************END OF FILE SENDING FUNCTIONS******************/ | 852 | /***************END OF FILE SENDING FUNCTIONS******************/ |
802 | 853 | ||
803 | /* Like tox_bootstrap_from_address but for TCP relays only. | 854 | /* Like tox_bootstrap_from_address but for TCP relays only. |