add get_address_book_entries() stack w/o impl

This commit is contained in:
woodser
2019-11-28 12:53:19 -05:00
parent 802958e8e7
commit bc7e97563c
4 changed files with 35 additions and 8 deletions
+4
View File
@@ -2790,6 +2790,10 @@ namespace monero {
}
}
vector<monero_address_book_entry> monero_wallet::get_address_book_entries(const vector<uint32_t>& indices) const {
throw runtime_error("get_address_book_entries() not implemented");
}
string monero_wallet::create_payment_uri(const monero_send_request& request) const {
MTRACE("create_payment_uri()");
+8 -8
View File
@@ -1167,14 +1167,14 @@ namespace monero {
*/
void set_tx_notes(const vector<string>& tx_ids, const vector<string>& notes);
// /**
// * Get all address book entries.
// *
// * @param indices are indices of the entries to get
// * @return the address book entries
// */
// vector<monero_address_book_entry> get_address_book_entries(const vector<uint32_t>& indices) const;
//
/**
* Get all address book entries.
*
* @param indices are indices of the entries to get
* @return the address book entries
*/
vector<monero_address_book_entry> get_address_book_entries(const vector<uint32_t>& indices) const;
// /**
// * Add an address book entry.
// *
+11
View File
@@ -795,4 +795,15 @@ namespace monero {
if (!m_tx_ids.empty()) node.add_child("txIds", monero_utils::to_property_tree(m_tx_ids));
return node;
}
// -------------------------- MONERO ADDRESS BOOK ---------------------------
boost::property_tree::ptree monero_address_book_entry::to_property_tree() const {
boost::property_tree::ptree node;
if (m_index != boost::none) node.put("index", *m_index);
if (m_address != boost::none) node.put("address", *m_address);
if (m_description != boost::none) node.put("description", *m_description);
if (m_payment_id != boost::none) node.put("paymentId", *m_payment_id);
return node;
}
}
+12
View File
@@ -443,4 +443,16 @@ namespace monero {
boost::property_tree::ptree to_property_tree() const;
};
/**
* Monero address book entry model.
*/
struct monero_address_book_entry : serializable_struct {
boost::optional<uint32_t> m_index;
boost::optional<string> m_address;
boost::optional<string> m_description;
boost::optional<string> m_payment_id;
boost::property_tree::ptree to_property_tree() const;
};
}