def callback_friend_read_receipt(self, callback, user_data):
"""
Set the callback for the `friend_read_receipt` event. Pass None to unset.
This event is triggered when the friend receives the message sent with tox_friend_send_message with the
corresponding message ID.
:param callback: Python function. Should take pointer (c_void_p) to Tox object,
The friend number (c_uint32) of the friend who received the message,
The message ID (c_uint32) as returned from tox_friend_send_message corresponding to the message sent,
pointer (c_void_p) to user_data
:param user_data: pointer (c_void_p) to user data
"""
c_callback = CFUNCTYPE(None, c_void_p, c_uint32, c_uint32, c_void_p)
self.friend_read_receipt_cb = c_callback(callback)
Tox.libtoxcore.tox_callback_friend_read_receipt(self._tox_pointer,
self.friend_read_receipt_cb, c_void_p(user_data))
# -----------------------------------------------------------------------------------------------------------------
# Receiving private messages and friend requests
# -----------------------------------------------------------------------------------------------------------------
评论列表
文章目录