tox.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:milisia-tox 作者: milisarge 项目源码 文件源码
def callback_file_recv_control(self, callback, user_data):
        """
        Set the callback for the `file_recv_control` event. Pass NULL to unset.

        This event is triggered when a file control command is received from a friend.

        :param callback: Python function.
        When receiving TOX_FILE_CONTROL_CANCEL, the client should release the resources associated with the file number
        and consider the transfer failed.

        Should take pointer (c_void_p) to Tox object,
        The friend number (c_uint32) of the friend who is sending the file.
        The friend-specific file number (c_uint32) the data received is associated with.
        The file control (TOX_FILE_CONTROL) command received.
        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_int, c_void_p)
        self.file_recv_control_cb = c_callback(callback)
        Tox.libtoxcore.tox_callback_file_recv_control(self._tox_pointer,
                                                      self.file_recv_control_cb, user_data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号