sync to core

This commit is contained in:
Green Sky 2023-05-14 18:10:27 +02:00
parent 6d2e7af087
commit b07c66b252
No known key found for this signature in database
3 changed files with 25 additions and 0 deletions

View File

@ -229,6 +229,14 @@ bool ToxIPCClient::toxFriendExists(uint32_t friend_number) {
CL_BODY(toxFriendExists, friend_number) CL_BODY(toxFriendExists, friend_number)
} }
size_t ToxIPCClient::toxSelfGetFriendListSize(void) {
CL_BODY(toxSelfGetFriendListSize)
}
std::vector<uint32_t> ToxIPCClient::toxSelfGetFriendList(void) {
CL_BODY(toxSelfGetFriendList)
}
std::optional<std::vector<uint8_t>> ToxIPCClient::toxFriendGetPublicKey(uint32_t friend_number) { std::optional<std::vector<uint8_t>> ToxIPCClient::toxFriendGetPublicKey(uint32_t friend_number) {
CL_BODY(toxFriendGetPublicKey, friend_number) CL_BODY(toxFriendGetPublicKey, friend_number)
} }
@ -393,6 +401,14 @@ std::optional<std::vector<uint8_t>> ToxIPCClient::toxGroupGetChatId(uint32_t gro
CL_BODY(toxGroupGetChatId, group_number) CL_BODY(toxGroupGetChatId, group_number)
} }
size_t ToxIPCClient::toxGroupGetNumberGroups(void) {
CL_BODY(toxGroupGetNumberGroups)
}
std::vector<uint32_t> ToxIPCClient::toxGroupGetList(void) {
CL_BODY(toxGroupGetList)
}
std::tuple<std::optional<uint32_t>, Tox_Err_Group_Send_Message> ToxIPCClient::toxGroupSendMessage(uint32_t group_number, Tox_Message_Type type, std::string_view message) { std::tuple<std::optional<uint32_t>, Tox_Err_Group_Send_Message> ToxIPCClient::toxGroupSendMessage(uint32_t group_number, Tox_Message_Type type, std::string_view message) {
CL_BODY(toxGroupSendMessage, group_number, type, std::string{message}) CL_BODY(toxGroupSendMessage, group_number, type, std::string{message})
} }

View File

@ -47,6 +47,8 @@ class ToxIPCClient : public ToxI, public ToxEventProviderBase {
Tox_Err_Friend_Delete toxFriendDelete(uint32_t friend_number) override; Tox_Err_Friend_Delete toxFriendDelete(uint32_t friend_number) override;
std::tuple<std::optional<uint32_t>, Tox_Err_Friend_By_Public_Key> toxFriendByPublicKey(const std::vector<uint8_t>& public_key) override; std::tuple<std::optional<uint32_t>, Tox_Err_Friend_By_Public_Key> toxFriendByPublicKey(const std::vector<uint8_t>& public_key) override;
bool toxFriendExists(uint32_t friend_number) override; bool toxFriendExists(uint32_t friend_number) override;
size_t toxSelfGetFriendListSize(void) override;
std::vector<uint32_t> toxSelfGetFriendList(void) override;
std::optional<std::vector<uint8_t>> toxFriendGetPublicKey(uint32_t friend_number) override; std::optional<std::vector<uint8_t>> toxFriendGetPublicKey(uint32_t friend_number) override;
std::optional<uint64_t> toxFriendGetLastOnline(uint32_t friend_number) override; std::optional<uint64_t> toxFriendGetLastOnline(uint32_t friend_number) override;
std::optional<std::string> toxFriendGetName(uint32_t friend_number) override; std::optional<std::string> toxFriendGetName(uint32_t friend_number) override;
@ -109,6 +111,9 @@ class ToxIPCClient : public ToxI, public ToxEventProviderBase {
std::optional<std::vector<uint8_t>> toxGroupGetChatId(uint32_t group_number) override; std::optional<std::vector<uint8_t>> toxGroupGetChatId(uint32_t group_number) override;
// TODO: str // TODO: str
size_t toxGroupGetNumberGroups(void) override;
std::vector<uint32_t> toxGroupGetList(void) override;
std::tuple<std::optional<uint32_t>, Tox_Err_Group_Send_Message> toxGroupSendMessage(uint32_t group_number, Tox_Message_Type type, std::string_view message) override; std::tuple<std::optional<uint32_t>, Tox_Err_Group_Send_Message> toxGroupSendMessage(uint32_t group_number, Tox_Message_Type type, std::string_view message) override;
Tox_Err_Group_Send_Private_Message toxGroupSendPrivateMessage(uint32_t group_number, uint32_t peer_id, Tox_Message_Type type, std::string_view message) override; Tox_Err_Group_Send_Private_Message toxGroupSendPrivateMessage(uint32_t group_number, uint32_t peer_id, Tox_Message_Type type, std::string_view message) override;

View File

@ -30,6 +30,8 @@ using ToxI_rpc = zpp::bits::rpc<
zpp::bits::bind<&ToxI::toxFriendDelete, "ToxI::toxFriendDelete"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendDelete, "ToxI::toxFriendDelete"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendByPublicKey, "ToxI::toxFriendByPublicKey"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendByPublicKey, "ToxI::toxFriendByPublicKey"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendExists, "ToxI::toxFriendExists"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendExists, "ToxI::toxFriendExists"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetFriendListSize, "ToxI::toxSelfGetFriendListSize"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetFriendList, "ToxI::toxSelfGetFriendList"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetPublicKey, "ToxI::toxFriendGetPublicKey"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendGetPublicKey, "ToxI::toxFriendGetPublicKey"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetLastOnline, "ToxI::toxFriendGetLastOnline"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendGetLastOnline, "ToxI::toxFriendGetLastOnline"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetName, "ToxI::toxFriendGetName"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendGetName, "ToxI::toxFriendGetName"_sha1_int>,
@ -75,6 +77,8 @@ using ToxI_rpc = zpp::bits::rpc<
zpp::bits::bind<&ToxI::toxGroupGetTopic, "ToxI::toxGroupGetTopic"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupGetTopic, "ToxI::toxGroupGetTopic"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupGetName, "ToxI::toxGroupGetName"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupGetName, "ToxI::toxGroupGetName"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupGetChatId, "ToxI::toxGroupGetChatId"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupGetChatId, "ToxI::toxGroupGetChatId"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupGetNumberGroups, "ToxI::toxGroupGetNumberGroups"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupGetList, "ToxI::toxGroupGetList"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSendMessage_str, "ToxI::toxGroupSendMessage"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupSendMessage_str, "ToxI::toxGroupSendMessage"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSendPrivateMessage_str, "ToxI::toxGroupSendPrivateMessage"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupSendPrivateMessage_str, "ToxI::toxGroupSendPrivateMessage"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSendCustomPacket, "ToxI::toxGroupSendCustomPacket"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupSendCustomPacket, "ToxI::toxGroupSendCustomPacket"_sha1_int>,