solanaceae_ipc1/solanaceae/ipc1/zpp_rpc_cldev.hpp

90 lines
6.0 KiB
C++
Raw Normal View History

2023-04-08 22:19:09 +02:00
#pragma once
#include <solanaceae/core/tox_interface.hpp>
#include <zpp_bits/zpp_bits.h>
static constexpr size_t RPC_MEM_SIZE = 1024u * 4u; // 4kb
static constexpr size_t EVENTS_MEM_SIZE = 1024u * 1024u * 64u; // 64mb
static constexpr uint8_t EVENTS_WRITTEN = 0x05;
static constexpr uint8_t EVENTS_READ = 0x00;
using namespace zpp::bits::literals;
using ToxI_rpc = zpp::bits::rpc<
zpp::bits::bind<&ToxI::toxSelfGetConnectionStatus, "ToxI::toxSelfGetConnectionStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxIterationInterval, "ToxI::toxIterationInterval"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetAddress, "ToxI::toxSelfGetAddress"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfSetNospam, "ToxI::toxSelfSetNospam"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetNospam, "ToxI::toxSelfGetNospam"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetPublicKey, "ToxI::toxSelfGetPublicKey"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfSetName_str, "ToxI::toxSelfSetName"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetName, "ToxI::toxSelfGetName"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfSetStatusMessage_str, "ToxI::toxSelfSetStatusMessage"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetStatusMessage, "ToxI::toxSelfGetStatusMessage"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfSetStatus, "ToxI::toxSelfSetStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetStatus, "ToxI::toxSelfGetStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendAdd_str, "ToxI::toxFriendAdd"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendAddNorequest, "ToxI::toxFriendAddNorequest"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendDelete, "ToxI::toxFriendDelete"_sha1_int>,
2023-04-18 17:32:54 +02:00
zpp::bits::bind<&ToxI::toxFriendByPublicKey, "ToxI::toxFriendByPublicKey"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendExists, "ToxI::toxFriendExists"_sha1_int>,
2023-05-14 18:10:27 +02:00
zpp::bits::bind<&ToxI::toxSelfGetFriendListSize, "ToxI::toxSelfGetFriendListSize"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfGetFriendList, "ToxI::toxSelfGetFriendList"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxFriendGetPublicKey, "ToxI::toxFriendGetPublicKey"_sha1_int>,
2023-04-18 17:32:54 +02:00
zpp::bits::bind<&ToxI::toxFriendGetLastOnline, "ToxI::toxFriendGetLastOnline"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetName, "ToxI::toxFriendGetName"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetStatusMessage, "ToxI::toxFriendGetStatusMessage"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetStatus, "ToxI::toxFriendGetStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetConnectionStatus, "ToxI::toxFriendGetConnectionStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendGetTyping, "ToxI::toxFriendGetTyping"_sha1_int>,
zpp::bits::bind<&ToxI::toxSelfSetTyping, "ToxI::toxSelfSetTyping"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxFriendSendMessage_str, "ToxI::toxFriendSendMessage"_sha1_int>,
2023-04-10 00:37:57 +02:00
2023-04-19 17:44:37 +02:00
zpp::bits::bind<&ToxI::toxHash, "ToxI::toxHash"_sha1_int>, // TODO: remove lol
2023-04-10 00:37:57 +02:00
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>,
2023-04-08 23:24:58 +02:00
zpp::bits::bind<&ToxI::toxConferenceJoin, "ToxI::toxConferenceJoin"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxConferenceSendMessage_str, "ToxI::toxConferenceSendMessage"_sha1_int>,
2023-04-19 17:44:37 +02:00
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxFriendSendLossyPacket, "ToxI::toxFriendSendLossyPacket"_sha1_int>,
zpp::bits::bind<&ToxI::toxFriendSendLosslessPacket, "ToxI::toxFriendSendLosslessPacket"_sha1_int>,
2023-04-19 17:44:37 +02:00
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxGroupNew_str, "ToxI::toxGroupNew"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupJoin_str, "ToxI::toxGroupJoin"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupIsConnected, "ToxI::toxGroupIsConnected"_sha1_int>,
2023-04-19 17:44:37 +02:00
zpp::bits::bind<&ToxI::toxGroupDisconnect, "ToxI::toxGroupDisconnect"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxGroupReconnect, "ToxI::toxGroupReconnect"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupLeave_str, "ToxI::toxGroupLeave"_sha1_int>,
2023-04-19 17:44:37 +02:00
zpp::bits::bind<&ToxI::toxGroupSelfSetName_str, "ToxI::toxGroupSelfSetName"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxGroupSelfGetName, "ToxI::toxGroupSelfGetName"_sha1_int>,
2023-04-19 17:44:37 +02:00
zpp::bits::bind<&ToxI::toxGroupSelfSetStatus, "ToxI::toxGroupSelfSetStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSelfGetStatus, "ToxI::toxGroupSelfGetStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSelfGetRole, "ToxI::toxGroupSelfGetRole"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSelfGetPeerId, "ToxI::toxGroupSelfGetPeerId"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupSelfGetPublicKey, "ToxI::toxGroupSelfGetPublicKey"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxGroupPeerGetName, "ToxI::toxGroupPeerGetName"_sha1_int>,
2023-04-19 17:44:37 +02:00
zpp::bits::bind<&ToxI::toxGroupPeerGetStatus, "ToxI::toxGroupPeerGetStatus"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupPeerGetRole, "ToxI::toxGroupPeerGetRole"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxGroupPeerGetConnectionStatus, "ToxI::toxGroupPeerGetConnectionStatus"_sha1_int>,
2023-04-19 17:44:37 +02:00
zpp::bits::bind<&ToxI::toxGroupPeerGetPublicKey, "ToxI::toxGroupPeerGetPublicKey"_sha1_int>,
2023-04-08 22:19:09 +02:00
zpp::bits::bind<&ToxI::toxGroupSetTopic_str, "ToxI::toxGroupSetTopic"_sha1_int>,
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>,
2023-05-14 18:10:27 +02:00
zpp::bits::bind<&ToxI::toxGroupGetNumberGroups, "ToxI::toxGroupGetNumberGroups"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupGetList, "ToxI::toxGroupGetList"_sha1_int>,
2023-04-08 22:19:09 +02:00
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>,
zpp::bits::bind<&ToxI::toxGroupSendCustomPrivatePacket, "ToxI::toxGroupSendCustomPrivatePacket"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupInviteFriend, "ToxI::toxGroupInviteFriend"_sha1_int>,
zpp::bits::bind<&ToxI::toxGroupInviteAccept_str, "ToxI::toxGroupInviteAccept"_sha1_int>
>;