diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-11-14 01:59:06 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-11-15 17:56:21 +0000 |
commit | 878efdc969facf85d43498d4025ca7841de8b3bc (patch) | |
tree | b9a7fe3b7a0db3a887899600e573b1c57a96cee6 /toxcore/tox.h | |
parent | 8822f595a8eaa3eb20195c967642445377aa3881 (diff) |
Convert to and from network byte order in set/get nospam.
Fixes #205.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index eae37ac2..af25d8fa 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -979,14 +979,17 @@ void tox_iterate(Tox *tox, void *user_data); | |||
979 | void tox_self_get_address(const Tox *tox, uint8_t *address); | 979 | void tox_self_get_address(const Tox *tox, uint8_t *address); |
980 | 980 | ||
981 | /** | 981 | /** |
982 | * Set the 4-byte nospam part of the address. | 982 | * Set the 4-byte nospam part of the address. This value is expected in host |
983 | * byte order. I.e. 0x12345678 will form the bytes [12, 34, 56, 78] in the | ||
984 | * nospam part of the Tox friend address. | ||
983 | * | 985 | * |
984 | * @param nospam Any 32 bit unsigned integer. | 986 | * @param nospam Any 32 bit unsigned integer. |
985 | */ | 987 | */ |
986 | void tox_self_set_nospam(Tox *tox, uint32_t nospam); | 988 | void tox_self_set_nospam(Tox *tox, uint32_t nospam); |
987 | 989 | ||
988 | /** | 990 | /** |
989 | * Get the 4-byte nospam part of the address. | 991 | * Get the 4-byte nospam part of the address. This value is returned in host |
992 | * byte order. | ||
990 | */ | 993 | */ |
991 | uint32_t tox_self_get_nospam(const Tox *tox); | 994 | uint32_t tox_self_get_nospam(const Tox *tox); |
992 | 995 | ||