From 47edfd721129d2127600f250adca057b6c778af0 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 13 Dec 2016 19:51:07 +0100 Subject: [PATCH] rename Bitmonero to Monero --- src/libwalletqt/PendingTransaction.cpp | 2 +- src/libwalletqt/PendingTransaction.h | 16 ++++++++-------- src/libwalletqt/TransactionHistory.cpp | 2 +- src/libwalletqt/TransactionHistory.h | 6 +++--- src/libwalletqt/TransactionInfo.cpp | 2 +- src/libwalletqt/TransactionInfo.h | 8 ++++---- src/libwalletqt/Wallet.cpp | 20 ++++++++++---------- src/libwalletqt/Wallet.h | 18 +++++++++--------- src/libwalletqt/WalletManager.cpp | 24 ++++++++++++------------ src/libwalletqt/WalletManager.h | 20 ++++++++++---------- 10 files changed, 59 insertions(+), 59 deletions(-) diff --git a/src/libwalletqt/PendingTransaction.cpp b/src/libwalletqt/PendingTransaction.cpp index 8140ceac..8df7ad28 100644 --- a/src/libwalletqt/PendingTransaction.cpp +++ b/src/libwalletqt/PendingTransaction.cpp @@ -47,7 +47,7 @@ quint64 PendingTransaction::txCount() const return m_pimpl->txCount(); } -PendingTransaction::PendingTransaction(Bitmonero::PendingTransaction *pt, QObject *parent) +PendingTransaction::PendingTransaction(Monero::PendingTransaction *pt, QObject *parent) : QObject(parent), m_pimpl(pt) { diff --git a/src/libwalletqt/PendingTransaction.h b/src/libwalletqt/PendingTransaction.h index 3e31acbc..f1c7f0c6 100644 --- a/src/libwalletqt/PendingTransaction.h +++ b/src/libwalletqt/PendingTransaction.h @@ -5,7 +5,7 @@ #include -//namespace Bitmonero { +//namespace Monero { //class PendingTransaction; //} @@ -22,15 +22,15 @@ class PendingTransaction : public QObject public: enum Status { - Status_Ok = Bitmonero::PendingTransaction::Status_Ok, - Status_Error = Bitmonero::PendingTransaction::Status_Error + Status_Ok = Monero::PendingTransaction::Status_Ok, + Status_Error = Monero::PendingTransaction::Status_Error }; Q_ENUM(Status) enum Priority { - Priority_Low = Bitmonero::PendingTransaction::Priority_Low, - Priority_Medium = Bitmonero::PendingTransaction::Priority_Medium, - Priority_High = Bitmonero::PendingTransaction::Priority_High + Priority_Low = Monero::PendingTransaction::Priority_Low, + Priority_Medium = Monero::PendingTransaction::Priority_Medium, + Priority_High = Monero::PendingTransaction::Priority_High }; Q_ENUM(Priority) @@ -45,11 +45,11 @@ public: quint64 txCount() const; private: - explicit PendingTransaction(Bitmonero::PendingTransaction * pt, QObject *parent = 0); + explicit PendingTransaction(Monero::PendingTransaction * pt, QObject *parent = 0); private: friend class Wallet; - Bitmonero::PendingTransaction * m_pimpl; + Monero::PendingTransaction * m_pimpl; }; #endif // PENDINGTRANSACTION_H diff --git a/src/libwalletqt/TransactionHistory.cpp b/src/libwalletqt/TransactionHistory.cpp index bf9cbeb5..b2c5cebe 100644 --- a/src/libwalletqt/TransactionHistory.cpp +++ b/src/libwalletqt/TransactionHistory.cpp @@ -82,7 +82,7 @@ QDateTime TransactionHistory::lastDateTime() const } -TransactionHistory::TransactionHistory(Bitmonero::TransactionHistory *pimpl, QObject *parent) +TransactionHistory::TransactionHistory(Monero::TransactionHistory *pimpl, QObject *parent) : QObject(parent), m_pimpl(pimpl) { m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block diff --git a/src/libwalletqt/TransactionHistory.h b/src/libwalletqt/TransactionHistory.h index 41ee6338..7ded833c 100644 --- a/src/libwalletqt/TransactionHistory.h +++ b/src/libwalletqt/TransactionHistory.h @@ -5,7 +5,7 @@ #include #include -namespace Bitmonero { +namespace Monero { class TransactionHistory; } @@ -37,11 +37,11 @@ public slots: private: - explicit TransactionHistory(Bitmonero::TransactionHistory * pimpl, QObject *parent = 0); + explicit TransactionHistory(Monero::TransactionHistory * pimpl, QObject *parent = 0); private: friend class Wallet; - Bitmonero::TransactionHistory * m_pimpl; + Monero::TransactionHistory * m_pimpl; mutable QList m_tinfo; mutable QDateTime m_firstDateTime; mutable QDateTime m_lastDateTime; diff --git a/src/libwalletqt/TransactionInfo.cpp b/src/libwalletqt/TransactionInfo.cpp index ba81b6a8..ed73a29f 100644 --- a/src/libwalletqt/TransactionInfo.cpp +++ b/src/libwalletqt/TransactionInfo.cpp @@ -97,7 +97,7 @@ QList TransactionInfo::transfers() const return m_transfers; } -TransactionInfo::TransactionInfo(Bitmonero::TransactionInfo *pimpl, QObject *parent) +TransactionInfo::TransactionInfo(Monero::TransactionInfo *pimpl, QObject *parent) : QObject(parent), m_pimpl(pimpl) { diff --git a/src/libwalletqt/TransactionInfo.h b/src/libwalletqt/TransactionInfo.h index cd4ce3d0..6d9fc270 100644 --- a/src/libwalletqt/TransactionInfo.h +++ b/src/libwalletqt/TransactionInfo.h @@ -27,8 +27,8 @@ class TransactionInfo : public QObject public: enum Direction { - Direction_In = Bitmonero::TransactionInfo::Direction_In, - Direction_Out = Bitmonero::TransactionInfo::Direction_Out, + Direction_In = Monero::TransactionInfo::Direction_In, + Direction_Out = Monero::TransactionInfo::Direction_Out, Direction_Both // invalid direction value, used for filtering }; @@ -54,10 +54,10 @@ public: //! Could be useful later when addressbook is implemented Q_INVOKABLE QList transfers() const; private: - explicit TransactionInfo(Bitmonero::TransactionInfo * pimpl, QObject *parent = 0); + explicit TransactionInfo(Monero::TransactionInfo * pimpl, QObject *parent = 0); private: friend class TransactionHistory; - Bitmonero::TransactionInfo * m_pimpl; + Monero::TransactionInfo * m_pimpl; mutable QList m_transfers; }; diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 915b4d4f..5eb9cb46 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -18,7 +18,7 @@ namespace { static const int WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS = 5; } -class WalletListenerImpl : public Bitmonero::WalletListener +class WalletListenerImpl : public Monero::WalletListener { public: WalletListenerImpl(Wallet * w) @@ -226,9 +226,9 @@ PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QSt quint64 amount, quint32 mixin_count, PendingTransaction::Priority priority) { - Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction( + Monero::PendingTransaction * ptImpl = m_walletImpl->createTransaction( dst_addr.toStdString(), payment_id.toStdString(), amount, mixin_count, - static_cast(priority)); + static_cast(priority)); PendingTransaction * result = new PendingTransaction(ptImpl,0); return result; } @@ -252,9 +252,9 @@ void Wallet::createTransactionAsync(const QString &dst_addr, const QString &paym PendingTransaction *Wallet::createTransactionAll(const QString &dst_addr, const QString &payment_id, quint32 mixin_count, PendingTransaction::Priority priority) { - Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction( - dst_addr.toStdString(), payment_id.toStdString(), Bitmonero::optional(), mixin_count, - static_cast(priority)); + Monero::PendingTransaction * ptImpl = m_walletImpl->createTransaction( + dst_addr.toStdString(), payment_id.toStdString(), Monero::optional(), mixin_count, + static_cast(priority)); PendingTransaction * result = new PendingTransaction(ptImpl, this); return result; } @@ -277,7 +277,7 @@ void Wallet::createTransactionAllAsync(const QString &dst_addr, const QString &p PendingTransaction *Wallet::createSweepUnmixableTransaction() { - Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createSweepUnmixableTransaction(); + Monero::PendingTransaction * ptImpl = m_walletImpl->createSweepUnmixableTransaction(); PendingTransaction * result = new PendingTransaction(ptImpl, this); return result; } @@ -322,7 +322,7 @@ TransactionHistorySortFilterModel *Wallet::historyModel() const QString Wallet::generatePaymentId() const { - return QString::fromStdString(Bitmonero::Wallet::genPaymentId()); + return QString::fromStdString(Monero::Wallet::genPaymentId()); } QString Wallet::integratedAddress(const QString &paymentId) const @@ -427,7 +427,7 @@ bool Wallet::verifySignedMessage(const QString &message, const QString &address, } } -Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent) +Wallet::Wallet(Monero::Wallet *w, QObject *parent) : QObject(parent) , m_walletImpl(w) , m_history(nullptr) @@ -452,5 +452,5 @@ Wallet::~Wallet() { qDebug("~Wallet: Closing wallet"); delete m_history; - Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl); + Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl); } diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index ad4c393e..c5a98be2 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -4,10 +4,10 @@ #include #include -#include "wallet/wallet2_api.h" // we need to have an access to the Bitmonero::Wallet::Status enum here; +#include "wallet/wallet2_api.h" // we need to have an access to the Monero::Wallet::Status enum here; #include "PendingTransaction.h" // we need to have an access to the PendingTransaction::Priority enum here; -namespace Bitmonero { +namespace Monero { class Wallet; // forward declaration } @@ -37,16 +37,16 @@ public: enum Status { - Status_Ok = Bitmonero::Wallet::Status_Ok, - Status_Error = Bitmonero::Wallet::Status_Error + Status_Ok = Monero::Wallet::Status_Ok, + Status_Error = Monero::Wallet::Status_Error }; Q_ENUM(Status) enum ConnectionStatus { - ConnectionStatus_Connected = Bitmonero::Wallet::ConnectionStatus_Connected, - ConnectionStatus_Disconnected = Bitmonero::Wallet::ConnectionStatus_Disconnected, - ConnectionStatus_WrongVersion = Bitmonero::Wallet::ConnectionStatus_WrongVersion + ConnectionStatus_Connected = Monero::Wallet::ConnectionStatus_Connected, + ConnectionStatus_Disconnected = Monero::Wallet::ConnectionStatus_Disconnected, + ConnectionStatus_WrongVersion = Monero::Wallet::ConnectionStatus_WrongVersion }; Q_ENUM(ConnectionStatus) @@ -204,13 +204,13 @@ signals: private: Wallet(QObject * parent = nullptr); - Wallet(Bitmonero::Wallet *w, QObject * parent = 0); + Wallet(Monero::Wallet *w, QObject * parent = 0); ~Wallet(); private: friend class WalletManager; friend class WalletListenerImpl; //! libwallet's - Bitmonero::Wallet * m_walletImpl; + Monero::Wallet * m_walletImpl; // history lifetime managed by wallet; TransactionHistory * m_history; // Used for UI history view diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp index a5f4818a..37f04f71 100644 --- a/src/libwalletqt/WalletManager.cpp +++ b/src/libwalletqt/WalletManager.cpp @@ -23,7 +23,7 @@ WalletManager *WalletManager::instance() Wallet *WalletManager::createWallet(const QString &path, const QString &password, const QString &language, bool testnet) { - Bitmonero::Wallet * w = m_pimpl->createWallet(path.toStdString(), password.toStdString(), + Monero::Wallet * w = m_pimpl->createWallet(path.toStdString(), password.toStdString(), language.toStdString(), testnet); Wallet * wallet = new Wallet(w); return wallet; @@ -34,7 +34,7 @@ Wallet *WalletManager::openWallet(const QString &path, const QString &password, qDebug("%s: opening wallet at %s, testnet = %d ", __PRETTY_FUNCTION__, qPrintable(path), testnet); - Bitmonero::Wallet * w = m_pimpl->openWallet(path.toStdString(), password.toStdString(), testnet); + Monero::Wallet * w = m_pimpl->openWallet(path.toStdString(), password.toStdString(), testnet); qDebug("%s: opened wallet: %s, status: %d", __PRETTY_FUNCTION__, w->address().c_str(), w->status()); Wallet * wallet = new Wallet(w); @@ -63,7 +63,7 @@ void WalletManager::openWalletAsync(const QString &path, const QString &password Wallet *WalletManager::recoveryWallet(const QString &path, const QString &memo, bool testnet, quint64 restoreHeight) { - Bitmonero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), memo.toStdString(), testnet, restoreHeight); + Monero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), memo.toStdString(), testnet, restoreHeight); Wallet * wallet = new Wallet(w); return wallet; } @@ -124,7 +124,7 @@ QString WalletManager::walletLanguage(const QString &locale) quint64 WalletManager::maximumAllowedAmount() const { - return Bitmonero::Wallet::maximumAllowedAmount(); + return Monero::Wallet::maximumAllowedAmount(); } QString WalletManager::maximumAllowedAmountAsSting() const @@ -136,32 +136,32 @@ QString WalletManager::maximumAllowedAmountAsSting() const QString WalletManager::displayAmount(quint64 amount) const { - return QString::fromStdString(Bitmonero::Wallet::displayAmount(amount)); + return QString::fromStdString(Monero::Wallet::displayAmount(amount)); } quint64 WalletManager::amountFromString(const QString &amount) const { - return Bitmonero::Wallet::amountFromString(amount.toStdString()); + return Monero::Wallet::amountFromString(amount.toStdString()); } quint64 WalletManager::amountFromDouble(double amount) const { - return Bitmonero::Wallet::amountFromDouble(amount); + return Monero::Wallet::amountFromDouble(amount); } bool WalletManager::paymentIdValid(const QString &payment_id) const { - return Bitmonero::Wallet::paymentIdValid(payment_id.toStdString()); + return Monero::Wallet::paymentIdValid(payment_id.toStdString()); } bool WalletManager::addressValid(const QString &address, bool testnet) const { - return Bitmonero::Wallet::addressValid(address.toStdString(), testnet); + return Monero::Wallet::addressValid(address.toStdString(), testnet); } QString WalletManager::paymentIdFromAddress(const QString &address, bool testnet) const { - return QString::fromStdString(Bitmonero::Wallet::paymentIdFromAddress(address.toStdString(), testnet)); + return QString::fromStdString(Monero::Wallet::paymentIdFromAddress(address.toStdString(), testnet)); } QString WalletManager::checkPayment(const QString &address, const QString &txid, const QString &txkey, const QString &daemon_address) const @@ -206,7 +206,7 @@ double WalletManager::miningHashRate() const void WalletManager::setLogLevel(int logLevel) { - Bitmonero::WalletManagerFactory::setLogLevel(logLevel); + Monero::WalletManagerFactory::setLogLevel(logLevel); } QString WalletManager::urlToLocalPath(const QUrl &url) const @@ -221,5 +221,5 @@ QUrl WalletManager::localPathToUrl(const QString &path) const WalletManager::WalletManager(QObject *parent) : QObject(parent) { - m_pimpl = Bitmonero::WalletManagerFactory::getWalletManager(); + m_pimpl = Monero::WalletManagerFactory::getWalletManager(); } diff --git a/src/libwalletqt/WalletManager.h b/src/libwalletqt/WalletManager.h index 687008e9..7dcff8fa 100644 --- a/src/libwalletqt/WalletManager.h +++ b/src/libwalletqt/WalletManager.h @@ -6,7 +6,7 @@ #include class Wallet; -namespace Bitmonero { +namespace Monero { class WalletManager; } @@ -17,14 +17,14 @@ class WalletManager : public QObject public: enum LogLevel { - LogLevel_Silent = Bitmonero::WalletManagerFactory::LogLevel_Silent, - LogLevel_0 = Bitmonero::WalletManagerFactory::LogLevel_0, - LogLevel_1 = Bitmonero::WalletManagerFactory::LogLevel_1, - LogLevel_2 = Bitmonero::WalletManagerFactory::LogLevel_2, - LogLevel_3 = Bitmonero::WalletManagerFactory::LogLevel_3, - LogLevel_4 = Bitmonero::WalletManagerFactory::LogLevel_4, - LogLevel_Min = Bitmonero::WalletManagerFactory::LogLevel_Min, - LogLevel_Max = Bitmonero::WalletManagerFactory::LogLevel_Max, + LogLevel_Silent = Monero::WalletManagerFactory::LogLevel_Silent, + LogLevel_0 = Monero::WalletManagerFactory::LogLevel_0, + LogLevel_1 = Monero::WalletManagerFactory::LogLevel_1, + LogLevel_2 = Monero::WalletManagerFactory::LogLevel_2, + LogLevel_3 = Monero::WalletManagerFactory::LogLevel_3, + LogLevel_4 = Monero::WalletManagerFactory::LogLevel_4, + LogLevel_Min = Monero::WalletManagerFactory::LogLevel_Min, + LogLevel_Max = Monero::WalletManagerFactory::LogLevel_Max, }; static WalletManager * instance(); @@ -124,7 +124,7 @@ private: explicit WalletManager(QObject *parent = 0); static WalletManager * m_instance; - Bitmonero::WalletManager * m_pimpl; + Monero::WalletManager * m_pimpl; };