forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from b03b571272..3e05824b80
3e05824b80 refactor: Rename `out` parameters to `out_$something`. 0199c0f17f cleanup: apply the same scheme to types aebbfabe26 cleanup: event length naming inconsistencies 2457125aa8 cleanup: align group send err enum order git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 3e05824b80eb9bee33e8254cba0780d84c522182
This commit is contained in:
@ -4094,11 +4094,11 @@ bool tox_group_peer_get_public_key(
|
||||
* @param group_number The group number of the group the name change is intended for.
|
||||
* @param peer_id The ID of the peer who has changed their name.
|
||||
* @param name The name data.
|
||||
* @param length The length of the name.
|
||||
* @param name_length The length of the name.
|
||||
*/
|
||||
typedef void tox_group_peer_name_cb(
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id,
|
||||
const uint8_t name[], size_t length, void *user_data);
|
||||
const uint8_t name[], size_t name_length, void *user_data);
|
||||
|
||||
/**
|
||||
* Set the callback for the `group_peer_name` event. Pass NULL to unset.
|
||||
@ -4235,11 +4235,11 @@ bool tox_group_get_topic(
|
||||
* @param peer_id The ID of the peer who changed the topic. If the peer who set the topic
|
||||
* is not present in our peer list this value will be set to 0.
|
||||
* @param topic The topic data.
|
||||
* @param length The topic length.
|
||||
* @param topic_length The topic length.
|
||||
*/
|
||||
typedef void tox_group_topic_cb(
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id,
|
||||
const uint8_t topic[], size_t length,
|
||||
const uint8_t topic[], size_t topic_length,
|
||||
void *user_data);
|
||||
|
||||
/**
|
||||
@ -4416,11 +4416,11 @@ bool tox_group_get_password(
|
||||
/**
|
||||
* @param group_number The group number of the group for which the password has changed.
|
||||
* @param password The new group password.
|
||||
* @param length The length of the password.
|
||||
* @param password_length The length of the password.
|
||||
*/
|
||||
typedef void tox_group_password_cb(
|
||||
Tox *tox, Tox_Group_Number group_number,
|
||||
const uint8_t password[], size_t length,
|
||||
const uint8_t password[], size_t password_length,
|
||||
void *user_data);
|
||||
|
||||
/**
|
||||
@ -4493,7 +4493,7 @@ const char *tox_err_group_send_message_to_string(Tox_Err_Group_Send_Message valu
|
||||
* then reassemble the fragments. Messages may not be empty.
|
||||
*
|
||||
* @param group_number The group number of the group the message is intended for.
|
||||
* @param type Message type (normal, action, ...).
|
||||
* @param message_type Message type (normal, action, ...).
|
||||
* @param message A non-NULL pointer to the first element of a byte array
|
||||
* containing the message text.
|
||||
* @param length Length of the message to be sent.
|
||||
@ -4502,7 +4502,7 @@ const char *tox_err_group_send_message_to_string(Tox_Err_Group_Send_Message valu
|
||||
* returned message ID value will be undefined.
|
||||
*/
|
||||
Tox_Group_Message_Id tox_group_send_message(
|
||||
const Tox *tox, Tox_Group_Number group_number, Tox_Message_Type type,
|
||||
const Tox *tox, Tox_Group_Number group_number, Tox_Message_Type message_type,
|
||||
const uint8_t message[], size_t length,
|
||||
Tox_Err_Group_Send_Message *error);
|
||||
|
||||
@ -4533,6 +4533,11 @@ typedef enum Tox_Err_Group_Send_Private_Message {
|
||||
*/
|
||||
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_EMPTY,
|
||||
|
||||
/**
|
||||
* The message type is invalid.
|
||||
*/
|
||||
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE,
|
||||
|
||||
/**
|
||||
* The caller does not have the required permissions to send group messages.
|
||||
*/
|
||||
@ -4548,11 +4553,6 @@ typedef enum Tox_Err_Group_Send_Private_Message {
|
||||
*/
|
||||
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_DISCONNECTED,
|
||||
|
||||
/**
|
||||
* The message type is invalid.
|
||||
*/
|
||||
TOX_ERR_GROUP_SEND_PRIVATE_MESSAGE_BAD_TYPE,
|
||||
|
||||
} Tox_Err_Group_Send_Private_Message;
|
||||
|
||||
const char *tox_err_group_send_private_message_to_string(Tox_Err_Group_Send_Private_Message value);
|
||||
@ -4569,6 +4569,7 @@ const char *tox_err_group_send_private_message_to_string(Tox_Err_Group_Send_Priv
|
||||
*
|
||||
* @param group_number The group number of the group the message is intended for.
|
||||
* @param peer_id The ID of the peer the message is intended for.
|
||||
* @param message_type The type of message (normal, action, ...).
|
||||
* @param message A non-NULL pointer to the first element of a byte array
|
||||
* containing the message text.
|
||||
* @param length Length of the message to be sent.
|
||||
@ -4576,7 +4577,7 @@ const char *tox_err_group_send_private_message_to_string(Tox_Err_Group_Send_Priv
|
||||
* @return true on success.
|
||||
*/
|
||||
Tox_Group_Message_Id tox_group_send_private_message(
|
||||
const Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id, Tox_Message_Type type,
|
||||
const Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id, Tox_Message_Type message_type,
|
||||
const uint8_t message[], size_t length,
|
||||
Tox_Err_Group_Send_Private_Message *error);
|
||||
|
||||
@ -4729,14 +4730,14 @@ bool tox_group_send_custom_private_packet(const Tox *tox, Tox_Group_Number group
|
||||
/**
|
||||
* @param group_number The group number of the group the message is intended for.
|
||||
* @param peer_id The ID of the peer who sent the message.
|
||||
* @param type The type of message (normal, action, ...).
|
||||
* @param message_type The type of message (normal, action, ...).
|
||||
* @param message The message data.
|
||||
* @param message_length The length of the message.
|
||||
* @param message_id A pseudo message id that clients can use to uniquely identify this group message.
|
||||
* @param length The length of the message.
|
||||
*/
|
||||
typedef void tox_group_message_cb(
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id, Tox_Message_Type type,
|
||||
const uint8_t message[], size_t length, Tox_Group_Message_Id message_id, void *user_data);
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id, Tox_Message_Type message_type,
|
||||
const uint8_t message[], size_t message_length, Tox_Group_Message_Id message_id, void *user_data);
|
||||
|
||||
/**
|
||||
* Set the callback for the `group_message` event. Pass NULL to unset.
|
||||
@ -4748,12 +4749,14 @@ void tox_callback_group_message(Tox *tox, tox_group_message_cb *callback);
|
||||
/**
|
||||
* @param group_number The group number of the group the private message is intended for.
|
||||
* @param peer_id The ID of the peer who sent the private message.
|
||||
* @param message_type The type of message (normal, action, ...).
|
||||
* @param message The message data.
|
||||
* @param length The length of the message.
|
||||
* @param message_length The length of the message.
|
||||
* @param message_id A pseudo message id that clients can use to uniquely identify this group message.
|
||||
*/
|
||||
typedef void tox_group_private_message_cb(
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id, Tox_Message_Type type,
|
||||
const uint8_t message[], size_t length, Tox_Group_Message_Id message_id, void *user_data);
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id, Tox_Message_Type message_type,
|
||||
const uint8_t message[], size_t message_length, Tox_Group_Message_Id message_id, void *user_data);
|
||||
|
||||
/**
|
||||
* Set the callback for the `group_private_message` event. Pass NULL to unset.
|
||||
@ -4766,11 +4769,11 @@ void tox_callback_group_private_message(Tox *tox, tox_group_private_message_cb *
|
||||
* @param group_number The group number of the group the packet is intended for.
|
||||
* @param peer_id The ID of the peer who sent the packet.
|
||||
* @param data The packet data.
|
||||
* @param length The length of the data.
|
||||
* @param data_length The length of the data.
|
||||
*/
|
||||
typedef void tox_group_custom_packet_cb(
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id,
|
||||
const uint8_t data[], size_t length, void *user_data);
|
||||
const uint8_t data[], size_t data_length, void *user_data);
|
||||
|
||||
/**
|
||||
* Set the callback for the `group_custom_packet` event. Pass NULL to unset.
|
||||
@ -4783,11 +4786,11 @@ void tox_callback_group_custom_packet(Tox *tox, tox_group_custom_packet_cb *call
|
||||
* @param group_number The group number of the group the packet is intended for.
|
||||
* @param peer_id The ID of the peer who sent the packet.
|
||||
* @param data The packet data.
|
||||
* @param length The length of the data.
|
||||
* @param data_length The length of the data.
|
||||
*/
|
||||
typedef void tox_group_custom_private_packet_cb(
|
||||
Tox *tox, Tox_Group_Number group_number, Tox_Group_Peer_Number peer_id,
|
||||
const uint8_t data[], size_t length, void *user_data);
|
||||
const uint8_t data[], size_t data_length, void *user_data);
|
||||
|
||||
/**
|
||||
* Set the callback for the `group_custom_private_packet` event. Pass NULL to unset.
|
||||
@ -4923,11 +4926,11 @@ Tox_Group_Number tox_group_invite_accept(
|
||||
/**
|
||||
* @param friend_number The friend number of the contact who sent the invite.
|
||||
* @param invite_data The invite data.
|
||||
* @param length The length of invite_data.
|
||||
* @param invite_data_length The length of invite_data.
|
||||
*/
|
||||
typedef void tox_group_invite_cb(
|
||||
Tox *tox, Tox_Friend_Number friend_number,
|
||||
const uint8_t invite_data[], size_t length,
|
||||
const uint8_t invite_data[], size_t invite_data_length,
|
||||
const uint8_t group_name[], size_t group_name_length,
|
||||
void *user_data);
|
||||
|
||||
|
Reference in New Issue
Block a user