implement get/set attributes

This commit is contained in:
woodser
2019-07-04 09:37:27 -04:00
parent fcf691a216
commit 8b3e23c472
2 changed files with 23 additions and 15 deletions
+8
View File
@@ -1600,6 +1600,14 @@ namespace monero {
return wallet2->import_outputs_from_str(blob);
}
void MoneroWallet::setAttribute(const string& key, const string& val) {
wallet2->set_attribute(key, val);
}
string MoneroWallet::getAttribute(const string& key) const {
return wallet2->get_attribute(key);
}
void MoneroWallet::startMining(boost::optional<uint64_t> numThreads, boost::optional<bool> backgroundMining, boost::optional<bool> ignoreBattery) {
cout << "startMining" << endl;
+15 -15
View File
@@ -1014,21 +1014,21 @@ namespace monero {
*/
int importOutputsHex(const string& outputsHex);
// /**
// * Set an arbitrary attribute.
// *
// * @param key is the attribute key
// * @param val is the attribute value
// */
// public void setAttribute(string key, string val);
//
// /**
// * Get an attribute.
// *
// * @param key is the attribute to get the value of
// * @return the attribute's value
// */
// public string getAttribute(string key);
/**
* Set an arbitrary attribute.
*
* @param key is the attribute key
* @param val is the attribute value
*/
void setAttribute(const string& key, const string& val);
/**
* Get an attribute.
*
* @param key is the attribute to get the value of
* @return the attribute's value
*/
string getAttribute(const string& key) const;
/**
* Start mining.