summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorAlexandre Erwin Ittner <alexandre@ittner.com.br>2014-09-25 22:03:36 -0300
committerAlexandre Erwin Ittner <alexandre@ittner.com.br>2014-09-25 22:03:36 -0300
commitc17fc040a4087c33cc5004038adc15f67aa7d9ae (patch)
tree98842fa915ec4666cc2e4dc8eafdb82bebc05541 /toxcore
parentd2640103649b4513d2fc4d7bbb291fa941023ebf (diff)
Update avatar documentation
Update the documentation to reflect the API changes introduced by commits 21be438b2b3f7aa1b65b76a7f528eacfe5b634db and d409bad30dd1657f6b54ea5e38a4d9155f718ae1
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/tox.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h
index 61cfdf70..fc5ccafc 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -539,8 +539,8 @@ uint32_t tox_get_chatlist(const Tox *tox, int *out_list, uint32_t list_size);
539 * function(Tox *tox, int32_t friendnumber, uint8_t format, uint8_t *hash, void *userdata) 539 * function(Tox *tox, int32_t friendnumber, uint8_t format, uint8_t *hash, void *userdata)
540 * 540 *
541 * where 'format' is the avatar image format (see TOX_AVATAR_FORMAT) and 'hash' is the hash of 541 * where 'format' is the avatar image format (see TOX_AVATAR_FORMAT) and 'hash' is the hash of
542 * the avatar data for caching purposes and it is exactly TOX_AVATAR_HASH_LENGTH long. If the 542 * the avatar data for caching purposes and it is exactly TOX_HASH_LENGTH long. If the image
543 * image format is NONE, the hash is zeroed. 543 * format is NONE, the hash is zeroed.
544 * 544 *
545 */ 545 */
546void tox_callback_avatar_info(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, uint8_t *, void *), 546void tox_callback_avatar_info(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, uint8_t *, void *),
@@ -556,12 +556,12 @@ void tox_callback_avatar_info(Tox *tox, void (*function)(Tox *tox, int32_t, uint
556 * 556 *
557 * where 'format' is the avatar image format (see TOX_AVATAR_FORMAT); 'hash' is the 557 * where 'format' is the avatar image format (see TOX_AVATAR_FORMAT); 'hash' is the
558 * locally-calculated cryptographic hash of the avatar data and it is exactly 558 * locally-calculated cryptographic hash of the avatar data and it is exactly
559 * TOX_AVATAR_HASH_LENGTH long; 'data' is the avatar image data and 'datalen' is the length 559 * TOX_HASH_LENGTH long; 'data' is the avatar image data and 'datalen' is the length
560 * of such data. 560 * of such data.
561 * 561 *
562 * If format is NONE, 'data' is NULL, 'datalen' is zero, and the hash is zeroed. The hash is 562 * If format is NONE, 'data' is NULL, 'datalen' is zero, and the hash is zeroed. The hash is
563 * always validated locally with the function tox_avatar_hash and ensured to match the image 563 * always validated locally with the function tox_hash and ensured to match the image data,
564 * data, so this value can be safely used to compare with cached avatars. 564 * so this value can be safely used to compare with cached avatars.
565 * 565 *
566 * WARNING: users MUST treat all avatar image data received from another peer as untrusted and 566 * WARNING: users MUST treat all avatar image data received from another peer as untrusted and
567 * potentially malicious. The library only ensures that the data which arrived is the same the 567 * potentially malicious. The library only ensures that the data which arrived is the same the
@@ -601,7 +601,7 @@ int tox_set_avatar(Tox *tox, uint8_t format, const uint8_t *data, uint32_t lengt
601 * buf - destination buffer to the image data. Must have at least 'maxlen' bytes; 601 * buf - destination buffer to the image data. Must have at least 'maxlen' bytes;
602 * length - destination pointer to the image data length; 602 * length - destination pointer to the image data length;
603 * maxlen - length of the destination buffer 'buf'; 603 * maxlen - length of the destination buffer 'buf';
604 * hash - destination pointer to the avatar hash (it must be exactly TOX_AVATAR_HASH_LENGTH bytes long). 604 * hash - destination pointer to the avatar hash (it must be exactly TOX_HASH_LENGTH bytes long).
605 * 605 *
606 * returns 0 on success; 606 * returns 0 on success;
607 * returns -1 on failure. 607 * returns -1 on failure.