From b07c66b2527f60479a06a2e58af3d3337ea2dd59 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 14 May 2023 18:10:27 +0200 Subject: [PATCH] sync to core --- solanaceae/ipc1/tox_ipc_client.cpp | 16 ++++++++++++++++ solanaceae/ipc1/tox_ipc_client.hpp | 5 +++++ solanaceae/ipc1/zpp_rpc_cldev.hpp | 4 ++++ 3 files changed, 25 insertions(+) diff --git a/solanaceae/ipc1/tox_ipc_client.cpp b/solanaceae/ipc1/tox_ipc_client.cpp index f9bc3df..769e102 100644 --- a/solanaceae/ipc1/tox_ipc_client.cpp +++ b/solanaceae/ipc1/tox_ipc_client.cpp @@ -229,6 +229,14 @@ bool ToxIPCClient::toxFriendExists(uint32_t friend_number) { CL_BODY(toxFriendExists, friend_number) } +size_t ToxIPCClient::toxSelfGetFriendListSize(void) { + CL_BODY(toxSelfGetFriendListSize) +} + +std::vector ToxIPCClient::toxSelfGetFriendList(void) { + CL_BODY(toxSelfGetFriendList) +} + std::optional> ToxIPCClient::toxFriendGetPublicKey(uint32_t friend_number) { CL_BODY(toxFriendGetPublicKey, friend_number) } @@ -393,6 +401,14 @@ std::optional> ToxIPCClient::toxGroupGetChatId(uint32_t gro CL_BODY(toxGroupGetChatId, group_number) } +size_t ToxIPCClient::toxGroupGetNumberGroups(void) { + CL_BODY(toxGroupGetNumberGroups) +} + +std::vector ToxIPCClient::toxGroupGetList(void) { + CL_BODY(toxGroupGetList) +} + std::tuple, 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}) } diff --git a/solanaceae/ipc1/tox_ipc_client.hpp b/solanaceae/ipc1/tox_ipc_client.hpp index d14c2ef..b983fb8 100644 --- a/solanaceae/ipc1/tox_ipc_client.hpp +++ b/solanaceae/ipc1/tox_ipc_client.hpp @@ -47,6 +47,8 @@ class ToxIPCClient : public ToxI, public ToxEventProviderBase { Tox_Err_Friend_Delete toxFriendDelete(uint32_t friend_number) override; std::tuple, Tox_Err_Friend_By_Public_Key> toxFriendByPublicKey(const std::vector& public_key) override; bool toxFriendExists(uint32_t friend_number) override; + size_t toxSelfGetFriendListSize(void) override; + std::vector toxSelfGetFriendList(void) override; std::optional> toxFriendGetPublicKey(uint32_t friend_number) override; std::optional toxFriendGetLastOnline(uint32_t friend_number) override; std::optional toxFriendGetName(uint32_t friend_number) override; @@ -109,6 +111,9 @@ class ToxIPCClient : public ToxI, public ToxEventProviderBase { std::optional> toxGroupGetChatId(uint32_t group_number) override; // TODO: str + size_t toxGroupGetNumberGroups(void) override; + std::vector toxGroupGetList(void) override; + std::tuple, 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; diff --git a/solanaceae/ipc1/zpp_rpc_cldev.hpp b/solanaceae/ipc1/zpp_rpc_cldev.hpp index cf9172b..31d0915 100644 --- a/solanaceae/ipc1/zpp_rpc_cldev.hpp +++ b/solanaceae/ipc1/zpp_rpc_cldev.hpp @@ -30,6 +30,8 @@ using ToxI_rpc = zpp::bits::rpc< zpp::bits::bind<&ToxI::toxFriendDelete, "ToxI::toxFriendDelete"_sha1_int>, zpp::bits::bind<&ToxI::toxFriendByPublicKey, "ToxI::toxFriendByPublicKey"_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::toxFriendGetLastOnline, "ToxI::toxFriendGetLastOnline"_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::toxGroupGetName, "ToxI::toxGroupGetName"_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::toxGroupSendPrivateMessage_str, "ToxI::toxGroupSendPrivateMessage"_sha1_int>, zpp::bits::bind<&ToxI::toxGroupSendCustomPacket, "ToxI::toxGroupSendCustomPacket"_sha1_int>,