Skip to content

Commit

Permalink
const a few tox pointers for groupchat API
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman committed Aug 17, 2023
1 parent a1e2458 commit 576fcfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -2935,7 +2935,7 @@ void tox_callback_group_join_fail(Tox *tox, tox_group_join_fail_cb *callback)
tox->group_join_fail_callback = callback;
}

uint32_t tox_group_new(Tox *tox, Tox_Group_Privacy_State privacy_state, const uint8_t *group_name,
uint32_t tox_group_new(const Tox *tox, Tox_Group_Privacy_State privacy_state, const uint8_t *group_name,

Check warning on line 2938 in toxcore/tox.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox.c#L2938

Added line #L2938 was not covered by tests
size_t group_name_length, const uint8_t *name, size_t name_length, Tox_Err_Group_New *error)
{
assert(tox != nullptr);
Expand Down Expand Up @@ -2983,7 +2983,7 @@ uint32_t tox_group_new(Tox *tox, Tox_Group_Privacy_State privacy_state, const ui
return UINT32_MAX;
}

uint32_t tox_group_join(Tox *tox, const uint8_t *chat_id, const uint8_t *name, size_t name_length,
uint32_t tox_group_join(const Tox *tox, const uint8_t *chat_id, const uint8_t *name, size_t name_length,

Check warning on line 2986 in toxcore/tox.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox.c#L2986

Added line #L2986 was not covered by tests
const uint8_t *password, size_t password_length, Tox_Err_Group_Join *error)
{
assert(tox != nullptr);
Expand Down Expand Up @@ -3090,7 +3090,7 @@ bool tox_group_disconnect(const Tox *tox, uint32_t group_number, Tox_Err_Group_D
return true;
}

bool tox_group_reconnect(Tox *tox, uint32_t group_number, Tox_Err_Group_Reconnect *error)
bool tox_group_reconnect(const Tox *tox, uint32_t group_number, Tox_Err_Group_Reconnect *error)

Check warning on line 3093 in toxcore/tox.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox.c#L3093

Added line #L3093 was not covered by tests
{
assert(tox != nullptr);

Expand Down Expand Up @@ -3129,7 +3129,7 @@ bool tox_group_reconnect(Tox *tox, uint32_t group_number, Tox_Err_Group_Reconnec
return false;
}

bool tox_group_leave(Tox *tox, uint32_t group_number, const uint8_t *part_message, size_t length,
bool tox_group_leave(const Tox *tox, uint32_t group_number, const uint8_t *part_message, size_t length,

Check warning on line 3132 in toxcore/tox.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox.c#L3132

Added line #L3132 was not covered by tests
Tox_Err_Group_Leave *error)
{
assert(tox != nullptr);
Expand Down Expand Up @@ -4122,7 +4122,7 @@ bool tox_group_invite_friend(const Tox *tox, uint32_t group_number, uint32_t fri
return false;
}

uint32_t tox_group_invite_accept(Tox *tox, uint32_t friend_number, const uint8_t *invite_data, size_t length,
uint32_t tox_group_invite_accept(const Tox *tox, uint32_t friend_number, const uint8_t *invite_data, size_t length,

Check warning on line 4125 in toxcore/tox.c

View check run for this annotation

Codecov / codecov/patch

toxcore/tox.c#L4125

Added line #L4125 was not covered by tests
const uint8_t *name, size_t name_length, const uint8_t *password,
size_t password_length, Tox_Err_Group_Invite_Accept *error)
{
Expand Down
10 changes: 5 additions & 5 deletions toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -3522,7 +3522,7 @@ typedef enum Tox_Err_Group_New {
*
* @return group_number on success, UINT32_MAX on failure.
*/
uint32_t tox_group_new(Tox *tox, Tox_Group_Privacy_State privacy_state, const uint8_t *group_name,
uint32_t tox_group_new(const Tox *tox, Tox_Group_Privacy_State privacy_state, const uint8_t *group_name,
size_t group_name_length, const uint8_t *name, size_t name_length, Tox_Err_Group_New *error);

typedef enum Tox_Err_Group_Join {
Expand Down Expand Up @@ -3583,7 +3583,7 @@ typedef enum Tox_Err_Group_Join {
*
* @return group_number on success, UINT32_MAX on failure.
*/
uint32_t tox_group_join(Tox *tox, const uint8_t *chat_id, const uint8_t *name, size_t name_length,
uint32_t tox_group_join(const Tox *tox, const uint8_t *chat_id, const uint8_t *name, size_t name_length,
const uint8_t *password, size_t password_length, Tox_Err_Group_Join *error);

typedef enum Tox_Err_Group_Is_Connected {
Expand Down Expand Up @@ -3667,7 +3667,7 @@ typedef enum Tox_Err_Group_Reconnect {
*
* @return true on success.
*/
bool tox_group_reconnect(Tox *tox, uint32_t group_number, Tox_Err_Group_Reconnect *error);
bool tox_group_reconnect(const Tox *tox, uint32_t group_number, Tox_Err_Group_Reconnect *error);

typedef enum Tox_Err_Group_Leave {

Expand Down Expand Up @@ -3707,7 +3707,7 @@ typedef enum Tox_Err_Group_Leave {
*
* @return true if the group chat instance is successfully deleted.
*/
bool tox_group_leave(Tox *tox, uint32_t group_number, const uint8_t *part_message, size_t length,
bool tox_group_leave(const Tox *tox, uint32_t group_number, const uint8_t *part_message, size_t length,
Tox_Err_Group_Leave *error);


Expand Down Expand Up @@ -4817,7 +4817,7 @@ typedef enum Tox_Err_Group_Invite_Accept {
*
* @return the group_number on success, UINT32_MAX on failure.
*/
uint32_t tox_group_invite_accept(Tox *tox, uint32_t friend_number, const uint8_t *invite_data, size_t length,
uint32_t tox_group_invite_accept(const Tox *tox, uint32_t friend_number, const uint8_t *invite_data, size_t length,
const uint8_t *name, size_t name_length, const uint8_t *password, size_t password_length,
Tox_Err_Group_Invite_Accept *error);

Expand Down

0 comments on commit 576fcfc

Please sign in to comment.