forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from 03e9fbf3703..55752a2e2ef
55752a2e2ef fix(toxav): pass video bit rate as kbit Previously we unintentionally made it Mbit. 7e573280a75 docs(toxav): fix docs of toxav.h - fix units to be more readable - use width before height consistently - video -> audio typo 5f88a084e8c fix: friend_connections leak on allocation failure clean up when it only contains connections in the NONE state 6d27a1ae178 fix: wrong comment for closelist ce4f29e8036 cleanup: Fix all `-Wsign-compare` warnings. 4d4251c397f chore: lower cirrus ci timeout drastically 40676284507 fix: events leak that can occur if allocation fails rare in practice, found by fuzzing 9610ac31c5f fix: Return an error instead of crashing on nullptr args in NGC. a57c2c8f956 refactor: Make ToxAV independent of toxcore internals. 5752fc29f86 refactor: Make tox-bootstrapd use bool instead of int df675786eb2 chore: Add release-drafter github action. 03fd7a69dcf chore: Use toktok's cmp instead of upstream. 350c0ba1205 cleanup: Sort apk/apt install commands in Dockerfiles. 8c1bda502cb chore(deps): bump golang.org/x/net ddb9d3210da chore: Upgrade to FreeBSD 14.1 in cirrus build. e9076f45bd3 chore(cmake): set options changes as cache and with force git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 55752a2e2ef894bfa6d7a2a21a0278e3f2bede7d
This commit is contained in:
@ -200,20 +200,10 @@ typedef void m_friend_lossy_packet_cb(Messenger *m, uint32_t friend_number, uint
|
||||
size_t length, void *user_data);
|
||||
typedef void m_friend_lossless_packet_cb(Messenger *m, uint32_t friend_number, uint8_t packet_id, const uint8_t *data,
|
||||
size_t length, void *user_data);
|
||||
typedef void m_friend_connectionstatuschange_internal_cb(Messenger *m, uint32_t friend_number,
|
||||
bool is_online, void *user_data);
|
||||
typedef void m_conference_invite_cb(Messenger *m, uint32_t friend_number, const uint8_t *cookie, uint16_t length,
|
||||
void *user_data);
|
||||
typedef void m_group_invite_cb(const Messenger *m, uint32_t friend_number, const uint8_t *invite_data, size_t length,
|
||||
const uint8_t *group_name, size_t group_name_length, void *user_data);
|
||||
typedef void m_msi_packet_cb(Messenger *m, uint32_t friend_number, const uint8_t *data, uint16_t length,
|
||||
void *user_data);
|
||||
typedef int m_lossy_rtp_packet_cb(Messenger *m, uint32_t friend_number, const uint8_t *data, uint16_t length, void *object);
|
||||
|
||||
typedef struct RTP_Packet_Handler {
|
||||
m_lossy_rtp_packet_cb *function;
|
||||
void *object;
|
||||
} RTP_Packet_Handler;
|
||||
|
||||
typedef struct Friend {
|
||||
uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE];
|
||||
@ -243,8 +233,6 @@ typedef struct Friend {
|
||||
uint32_t num_sending_files;
|
||||
struct File_Transfers file_receiving[MAX_CONCURRENT_FILE_PIPES];
|
||||
|
||||
RTP_Packet_Handler lossy_rtp_packethandlers[PACKET_ID_RANGE_LOSSY_AV_SIZE];
|
||||
|
||||
struct Receipts *receipts_start;
|
||||
struct Receipts *receipts_end;
|
||||
} Friend;
|
||||
@ -301,8 +289,6 @@ struct Messenger {
|
||||
m_friend_typing_cb *friend_typingchange;
|
||||
m_friend_read_receipt_cb *read_receipt;
|
||||
m_friend_connection_status_cb *friend_connectionstatuschange;
|
||||
m_friend_connectionstatuschange_internal_cb *friend_connectionstatuschange_internal;
|
||||
void *friend_connectionstatuschange_internal_userdata;
|
||||
|
||||
struct Group_Chats *conferences_object;
|
||||
m_conference_invite_cb *conference_invite;
|
||||
@ -314,9 +300,6 @@ struct Messenger {
|
||||
m_file_recv_chunk_cb *file_filedata;
|
||||
m_file_chunk_request_cb *file_reqchunk;
|
||||
|
||||
m_msi_packet_cb *msi_packet;
|
||||
void *msi_packet_userdata;
|
||||
|
||||
m_friend_lossy_packet_cb *lossy_packethandler;
|
||||
m_friend_lossless_packet_cb *lossless_packethandler;
|
||||
|
||||
@ -614,10 +597,6 @@ non_null() void m_callback_read_receipt(Messenger *m, m_friend_read_receipt_cb *
|
||||
*/
|
||||
non_null() void m_callback_connectionstatus(Messenger *m, m_friend_connection_status_cb *function);
|
||||
|
||||
/** Same as previous but for internal A/V core usage only */
|
||||
non_null() void m_callback_connectionstatus_internal_av(
|
||||
Messenger *m, m_friend_connectionstatuschange_internal_cb *function, void *userdata);
|
||||
|
||||
/** @brief Set the callback for typing changes. */
|
||||
non_null() void m_callback_core_connection(Messenger *m, m_self_connection_status_cb *function);
|
||||
|
||||
@ -731,42 +710,12 @@ non_null(1) nullable(5)
|
||||
int send_file_data(const Messenger *m, int32_t friendnumber, uint32_t filenumber, uint64_t position,
|
||||
const uint8_t *data, uint16_t length);
|
||||
|
||||
/*** A/V related */
|
||||
|
||||
/** @brief Set the callback for msi packets. */
|
||||
non_null(1) nullable(2, 3)
|
||||
void m_callback_msi_packet(Messenger *m, m_msi_packet_cb *function, void *userdata);
|
||||
|
||||
/** @brief Send an msi packet.
|
||||
*
|
||||
* @retval true on success
|
||||
* @retval false on failure
|
||||
*/
|
||||
non_null()
|
||||
bool m_msi_packet(const Messenger *m, int32_t friendnumber, const uint8_t *data, uint16_t length);
|
||||
|
||||
/** @brief Set handlers for lossy rtp packets.
|
||||
*
|
||||
* @retval -1 on failure.
|
||||
* @retval 0 on success.
|
||||
*/
|
||||
non_null(1) nullable(4, 5)
|
||||
int m_callback_rtp_packet(Messenger *m, int32_t friendnumber, uint8_t byte,
|
||||
m_lossy_rtp_packet_cb *function, void *object);
|
||||
|
||||
/*** CUSTOM PACKETS */
|
||||
|
||||
/** @brief Set handlers for custom lossy packets. */
|
||||
non_null() void custom_lossy_packet_registerhandler(Messenger *m, m_friend_lossy_packet_cb *lossy_packethandler);
|
||||
|
||||
/** @brief High level function to send custom lossy packets.
|
||||
*
|
||||
* TODO(oxij): this name is confusing, because this function sends both av and custom lossy packets.
|
||||
* Meanwhile, m_handle_lossy_packet routes custom packets to custom_lossy_packet_registerhandler
|
||||
* as you would expect from its name.
|
||||
*
|
||||
* I.e. custom_lossy_packet_registerhandler's "custom lossy packet" and this "custom lossy packet"
|
||||
* are not the same set of packets.
|
||||
*
|
||||
* @retval -1 if friend invalid.
|
||||
* @retval -2 if length wrong.
|
||||
|
Reference in New Issue
Block a user