diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 005025f..67920d3 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -2794,6 +2794,18 @@ namespace monero { throw runtime_error("get_address_book_entries() not implemented"); } + uint32_t monero_wallet::add_address_book_entry(const string& address, boost::optional description, boost::optional payment_id) { + throw runtime_error("add_address_book_entry() not implemented"); + } + + void monero_wallet::edit_address_book_entry(uint32_t index, bool set_address, boost::optional address, bool set_description, boost::optional description, bool set_paymenet_id, boost::optional payment_id) { + throw runtime_error("edit_address_book_entry() not implemented"); + } + + void monero_wallet::delete_address_book_entry(uint32_t entry_idx) { + throw runtime_error("delete_address_book_entry() not implemented"); + } + string monero_wallet::create_payment_uri(const monero_send_request& request) const { MTRACE("create_payment_uri()"); diff --git a/src/wallet/monero_wallet.h b/src/wallet/monero_wallet.h index 3932bdc..2161914 100644 --- a/src/wallet/monero_wallet.h +++ b/src/wallet/monero_wallet.h @@ -1175,21 +1175,34 @@ namespace monero { */ vector get_address_book_entries(const vector& indices) const; -// /** -// * Add an address book entry. -// * -// * @param address is the entry address -// * @param description is the entry description (optional) -// * @return the index of the added entry -// */ -// uint32_t add_address_book_entry(const string& address, const string& description); -// -// /** -// * Delete an address book entry. -// * -// * @param entryIdx is the index of the entry to delete -// */ -// public void deleteAddressBookEntry(int entryIdx); + /** + * Add an address book entry. + * + * @param address is the entry address + * @param description is the entry description (optional) + * @return the index of the added entry + */ + uint32_t add_address_book_entry(const string& address, boost::optional description = boost::none, boost::optional payment_id = boost::none); + + /** + * Edit an address book entry. + * + * @param index is the index of the address book entry to edit + * @param set_address specifies if the address should be updated + * @param address is the updated address + * @param set_description specifies if the description should be updated + * @param description is the updated description + * @param set_payment_id specifies if the payment id should be updated + * @param payment_id is the updated payment id + */ + void edit_address_book_entry(uint32_t index, bool set_address, boost::optional address, bool set_description, boost::optional description, bool set_paymenet_id, boost::optional payment_id); + + /** + * Delete an address book entry. + * + * @param entry_idx is the index of the entry to delete + */ + void delete_address_book_entry(uint32_t entry_idx); // /** // * Tag accounts.