Skip to content

Commit

Permalink
Added functions to get/set the nospam value to the public api.
Browse files Browse the repository at this point in the history
  • Loading branch information
irungentoo committed Apr 4, 2014
1 parent 413933a commit 23f57d8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
18 changes: 17 additions & 1 deletion toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,23 @@ void tox_callback_connection_status(Tox *tox, void (*function)(Messenger *tox, i
m_callback_connectionstatus(m, function, userdata);
}

/**********GROUP CHAT FUNCTIONS: WARNING WILL BREAK A LOT************/
/**********ADVANCED FUNCTIONS (If you don't know what they do you can safely ignore them.) ************/

/* Functions to get/set the nospam part of the id.
*/
uint32_t tox_get_nospam(Tox *tox)
{
Messenger *m = tox;
return get_nospam(&(m->fr));
}

void tox_set_nospam(Tox *tox, uint32_t nospam)
{
Messenger *m = tox;
set_nospam(&(m->fr), nospam);
}

/**********GROUP CHAT FUNCTIONS: WARNING Group chats will be rewritten so this might change ************/

/* Set the callback for group invites.
*
Expand Down
11 changes: 10 additions & 1 deletion toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,16 @@ void tox_callback_read_receipt(Tox *tox, void (*function)(Tox *tox, int32_t, uin
*/
void tox_callback_connection_status(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, void *), void *userdata);

/**********GROUP CHAT FUNCTIONS: WARNING WILL BREAK A LOT************/

/**********ADVANCED FUNCTIONS (If you don't know what they do you can safely ignore them.) ************/

/* Functions to get/set the nospam part of the id.
*/
uint32_t tox_get_nospam(Tox *tox);
void tox_set_nospam(Tox *tox, uint32_t nospam);


/**********GROUP CHAT FUNCTIONS: WARNING Group chats will be rewritten so this might change ************/

/* Set the callback for group invites.
*
Expand Down

0 comments on commit 23f57d8

Please sign in to comment.