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 Apr 1, 2023
1 parent 172f279 commit cfaa31a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
62d2c7ab2a14d1f9b00acaf13813b3ea916ccfb2173c9ba95ac82a843a258119 /usr/local/bin/tox-bootstrapd
f46fb6f7617730af4914104e2ff76ba562f84ac0c73610d2b1552d8bb7456475 /usr/local/bin/tox-bootstrapd
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 @@ -3516,7 +3516,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 @@ -3577,7 +3577,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 @@ -3661,7 +3661,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 @@ -3701,7 +3701,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 @@ -4811,7 +4811,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 cfaa31a

Please sign in to comment.