From 4f5b130de933f82f25f8bdfd70e28eab3924f11d Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 4 Feb 2017 11:40:49 +0000 Subject: wallet_rpc_server: add address book RPC calls --- src/wallet/wallet_rpc_server_commands_defs.h | 79 ++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) (limited to 'src/wallet/wallet_rpc_server_commands_defs.h') diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h index 4d643637f..e132b4e2b 100644 --- a/src/wallet/wallet_rpc_server_commands_defs.h +++ b/src/wallet/wallet_rpc_server_commands_defs.h @@ -786,5 +786,84 @@ namespace wallet_rpc }; }; + struct COMMAND_RPC_ADD_ADDRESS_BOOK_ENTRY + { + struct request + { + std::string address; + std::string payment_id; + std::string description; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(address) + KV_SERIALIZE(payment_id) + KV_SERIALIZE(description) + END_KV_SERIALIZE_MAP() + }; + + struct response + { + uint64_t index; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(index); + END_KV_SERIALIZE_MAP() + }; + }; + + struct COMMAND_RPC_GET_ADDRESS_BOOK_ENTRY + { + struct request + { + std::list entries; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(entries) + END_KV_SERIALIZE_MAP() + }; + + struct entry + { + uint64_t index; + std::string address; + std::string payment_id; + std::string description; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(index) + KV_SERIALIZE(address) + KV_SERIALIZE(payment_id) + KV_SERIALIZE(description) + END_KV_SERIALIZE_MAP() + }; + + struct response + { + std::vector entries; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(entries) + END_KV_SERIALIZE_MAP() + }; + }; + + struct COMMAND_RPC_DELETE_ADDRESS_BOOK_ENTRY + { + struct request + { + uint64_t index; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(index); + END_KV_SERIALIZE_MAP() + }; + + struct response + { + BEGIN_KV_SERIALIZE_MAP() + END_KV_SERIALIZE_MAP() + }; + }; + } } -- cgit v1.2.3