add file
This commit is contained in:
parent
9a63edb018
commit
bfc9cfa1b3
@ -233,6 +233,26 @@ std::vector<uint8_t> ToxIPCClient::toxHash(const std::vector<uint8_t>& data) {
|
||||
CL_BODY(toxHash, data)
|
||||
}
|
||||
|
||||
Tox_Err_File_Control ToxIPCClient::toxFileControl(uint32_t friend_number, uint32_t file_number, Tox_File_Control control) {
|
||||
CL_BODY(toxFileControl, friend_number, file_number, control)
|
||||
}
|
||||
|
||||
Tox_Err_File_Seek ToxIPCClient::toxFileSeek(uint32_t friend_number, uint32_t file_number, uint64_t position) {
|
||||
CL_BODY(toxFileSeek, friend_number, file_number, position)
|
||||
}
|
||||
|
||||
std::tuple<std::optional<std::vector<uint8_t>>, Tox_Err_File_Get> ToxIPCClient::toxFileGetFileID(uint32_t friend_number, uint32_t file_number) {
|
||||
CL_BODY(toxFileGetFileID, friend_number, file_number)
|
||||
}
|
||||
|
||||
std::tuple<std::optional<uint32_t>, Tox_Err_File_Send> ToxIPCClient::toxFileSend(uint32_t friend_number, uint32_t kind, uint64_t file_size, const std::vector<uint8_t>& file_id, std::string_view filename) {
|
||||
CL_BODY(toxFileSend, friend_number, kind, file_size, file_id, std::string{filename})
|
||||
}
|
||||
|
||||
Tox_Err_File_Send_Chunk ToxIPCClient::toxFileSendChunk(uint32_t friend_number, uint32_t file_number, uint64_t position, const std::vector<uint8_t>& data) {
|
||||
CL_BODY(toxFileSendChunk, friend_number, file_number, position, data)
|
||||
}
|
||||
|
||||
std::tuple<std::optional<uint32_t>, Tox_Err_Conference_Join> ToxIPCClient::toxConferenceJoin(uint32_t friend_number, const std::vector<uint8_t>& cookie) {
|
||||
CL_BODY(toxConferenceJoin, friend_number, cookie)
|
||||
}
|
||||
|
@ -54,6 +54,12 @@ class ToxIPCClient : public ToxI, public ToxEventProviderBase {
|
||||
std::vector<uint8_t> toxHash(const std::vector<uint8_t>& data) override;
|
||||
|
||||
// files
|
||||
Tox_Err_File_Control toxFileControl(uint32_t friend_number, uint32_t file_number, Tox_File_Control control) override;
|
||||
Tox_Err_File_Seek toxFileSeek(uint32_t friend_number, uint32_t file_number, uint64_t position) override;
|
||||
std::tuple<std::optional<std::vector<uint8_t>>, Tox_Err_File_Get> toxFileGetFileID(uint32_t friend_number, uint32_t file_number) override;
|
||||
std::tuple<std::optional<uint32_t>, Tox_Err_File_Send> toxFileSend(uint32_t friend_number, uint32_t kind, uint64_t file_size, const std::vector<uint8_t>& file_id, std::string_view filename) override;
|
||||
Tox_Err_File_Send_Chunk toxFileSendChunk(uint32_t friend_number, uint32_t file_number, uint64_t position, const std::vector<uint8_t>& data) override;
|
||||
|
||||
// conferece
|
||||
std::tuple<std::optional<uint32_t>, Tox_Err_Conference_Join> toxConferenceJoin(uint32_t friend_number, const std::vector<uint8_t>& cookie) override;
|
||||
Tox_Err_Conference_Send_Message toxConferenceSendMessage(uint32_t conference_number, Tox_Message_Type type, std::string_view message) override;
|
||||
|
@ -31,6 +31,13 @@ using ToxI_rpc = zpp::bits::rpc<
|
||||
zpp::bits::bind<&ToxI::toxFriendGetPublicKey, "ToxI::toxFriendGetPublicKey"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxFriendSendMessage_str, "ToxI::toxFriendSendMessage"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxHash, "ToxI::toxHash"_sha1_int>, // TODO: remove lol
|
||||
|
||||
zpp::bits::bind<&ToxI::toxFileControl, "ToxI::toxFileControl"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxFileSeek, "ToxI::toxFileSeek"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxFileGetFileID, "ToxI::toxFileGetFileID"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxFileSend_str, "ToxI::toxFileSend"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxFileSendChunk, "ToxI::toxFileSendChunk"_sha1_int>,
|
||||
|
||||
zpp::bits::bind<&ToxI::toxConferenceJoin, "ToxI::toxConferenceJoin"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxConferenceSendMessage_str, "ToxI::toxConferenceSendMessage"_sha1_int>,
|
||||
zpp::bits::bind<&ToxI::toxFriendSendLossyPacket, "ToxI::toxFriendSendLossyPacket"_sha1_int>,
|
||||
|
Loading…
Reference in New Issue
Block a user