mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
parent
8822f595a8
commit
878efdc969
|
@ -844,14 +844,17 @@ inline namespace self {
|
||||||
|
|
||||||
uint32_t nospam {
|
uint32_t nospam {
|
||||||
/**
|
/**
|
||||||
* Set the 4-byte nospam part of the address.
|
* Set the 4-byte nospam part of the address. This value is expected in host
|
||||||
|
* byte order. I.e. 0x12345678 will form the bytes [12, 34, 56, 78] in the
|
||||||
|
* nospam part of the Tox friend address.
|
||||||
*
|
*
|
||||||
* @param nospam Any 32 bit unsigned integer.
|
* @param nospam Any 32 bit unsigned integer.
|
||||||
*/
|
*/
|
||||||
set();
|
set();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the 4-byte nospam part of the address.
|
* Get the 4-byte nospam part of the address. This value is returned in host
|
||||||
|
* byte order.
|
||||||
*/
|
*/
|
||||||
get();
|
get();
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,13 +479,13 @@ void tox_self_get_address(const Tox *tox, uint8_t *address)
|
||||||
void tox_self_set_nospam(Tox *tox, uint32_t nospam)
|
void tox_self_set_nospam(Tox *tox, uint32_t nospam)
|
||||||
{
|
{
|
||||||
Messenger *m = tox;
|
Messenger *m = tox;
|
||||||
set_nospam(&(m->fr), nospam);
|
set_nospam(&(m->fr), htonl(nospam));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t tox_self_get_nospam(const Tox *tox)
|
uint32_t tox_self_get_nospam(const Tox *tox)
|
||||||
{
|
{
|
||||||
const Messenger *m = tox;
|
const Messenger *m = tox;
|
||||||
return get_nospam(&(m->fr));
|
return ntohl(get_nospam(&(m->fr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tox_self_get_public_key(const Tox *tox, uint8_t *public_key)
|
void tox_self_get_public_key(const Tox *tox, uint8_t *public_key)
|
||||||
|
|
|
@ -979,14 +979,17 @@ void tox_iterate(Tox *tox, void *user_data);
|
||||||
void tox_self_get_address(const Tox *tox, uint8_t *address);
|
void tox_self_get_address(const Tox *tox, uint8_t *address);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the 4-byte nospam part of the address.
|
* Set the 4-byte nospam part of the address. This value is expected in host
|
||||||
|
* byte order. I.e. 0x12345678 will form the bytes [12, 34, 56, 78] in the
|
||||||
|
* nospam part of the Tox friend address.
|
||||||
*
|
*
|
||||||
* @param nospam Any 32 bit unsigned integer.
|
* @param nospam Any 32 bit unsigned integer.
|
||||||
*/
|
*/
|
||||||
void tox_self_set_nospam(Tox *tox, uint32_t nospam);
|
void tox_self_set_nospam(Tox *tox, uint32_t nospam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the 4-byte nospam part of the address.
|
* Get the 4-byte nospam part of the address. This value is returned in host
|
||||||
|
* byte order.
|
||||||
*/
|
*/
|
||||||
uint32_t tox_self_get_nospam(const Tox *tox);
|
uint32_t tox_self_get_nospam(const Tox *tox);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user