Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <paymentserver.h>
Public Slots | |
void | uiReady () |
void | fetchPaymentACK (CWallet *wallet, const SendCoinsRecipient &recipient, QByteArray transaction) |
void | handleURIOrFile (const QString &s) |
Signals | |
void | receivedPaymentRequest (SendCoinsRecipient) |
void | receivedPaymentACK (const QString &paymentACKMsg) |
void | message (const QString &title, const QString &message, unsigned int style) |
Public Member Functions | |
PaymentServer (QObject *parent, bool startLocalServer=true) | |
~PaymentServer () | |
void | setOptionsModel (OptionsModel *optionsModel) |
Static Public Member Functions | |
static void | ipcParseCommandLine (int argc, char *argv[]) |
static bool | ipcSendCommandLine () |
static void | LoadRootCAs (X509_STORE *store=nullptr) |
static X509_STORE * | getCertStore () |
static bool | verifyNetwork (const payments::PaymentDetails &requestDetails) |
static bool | verifyExpired (const payments::PaymentDetails &requestDetails) |
static bool | verifySize (qint64 requestSize) |
static bool | verifyAmount (const CAmount &requestAmount) |
Protected Member Functions | |
bool | eventFilter (QObject *object, QEvent *event) |
Private Slots | |
void | handleURIConnection () |
void | netRequestFinished (QNetworkReply *) |
void | reportSslErrors (QNetworkReply *, const QList< QSslError > &) |
void | handlePaymentACK (const QString &paymentACKMsg) |
Private Member Functions | |
bool | processPaymentRequest (const PaymentRequestPlus &request, SendCoinsRecipient &recipient) |
void | fetchRequest (const QUrl &url) |
void | initNetManager () |
Static Private Member Functions | |
static bool | readPaymentRequestFromFile (const QString &filename, PaymentRequestPlus &request) |
Private Attributes | |
bool | saveURIs |
QLocalServer * | uriServer |
QNetworkAccessManager * | netManager |
OptionsModel * | optionsModel |
Detailed Description
Definition at line 58 of file paymentserver.h.
Constructor & Destructor Documentation
◆ PaymentServer()
|
explicit |
Definition at line 300 of file paymentserver.cpp.
References handlePaymentACK(), handleURIConnection(), ipcServerName(), name, receivedPaymentACK(), and uriServer.
◆ ~PaymentServer()
PaymentServer::~PaymentServer | ( | ) |
Definition at line 338 of file paymentserver.cpp.
Member Function Documentation
◆ eventFilter()
|
protected |
Definition at line 348 of file paymentserver.cpp.
References handleURIOrFile().
◆ fetchPaymentACK
|
slot |
Definition at line 621 of file paymentserver.cpp.
References SendCoinsRecipient::authenticatedMerchant, BIP70_MESSAGE_PAYMENTACK, BIP71_MIMETYPE_PAYMENT, BIP71_MIMETYPE_PAYMENTACK, CLIENT_NAME, CWallet::GetAccountAddresses(), PaymentRequestPlus::getDetails(), CPubKey::GetID(), CWallet::GetKeyFromPool(), GetScriptForDestination(), netManager, SendCoinsRecipient::paymentRequest, CWallet::SetAddressBook(), and prevector< N, T, Size, Diff >::size().
◆ fetchRequest()
|
private |
Definition at line 611 of file paymentserver.cpp.
References BIP70_MESSAGE_PAYMENTREQUEST, BIP71_MIMETYPE_PAYMENTREQUEST, CLIENT_NAME, and netManager.
Referenced by handleURIOrFile().
◆ getCertStore()
|
static |
Definition at line 809 of file paymentserver.cpp.
Referenced by TransactionDesc::toHTML().
◆ handlePaymentACK
|
privateslot |
Definition at line 755 of file paymentserver.cpp.
References CClientUIInterface::ICON_INFORMATION, message(), and CClientUIInterface::MODAL.
Referenced by PaymentServer().
◆ handleURIConnection
|
privateslot |
Definition at line 476 of file paymentserver.cpp.
References handleURIOrFile(), and uriServer.
Referenced by PaymentServer().
◆ handleURIOrFile
|
slot |
Definition at line 401 of file paymentserver.cpp.
References SendCoinsRecipient::address, BITCOIN_IPC_PREFIX(), fetchRequest(), CClientUIInterface::ICON_WARNING, IsValidDestinationString(), message(), CClientUIInterface::MSG_ERROR, GUIUtil::parseBitcoinURI(), processPaymentRequest(), readPaymentRequestFromFile(), receivedPaymentRequest(), savedPaymentRequests, and saveURIs.
Referenced by eventFilter(), handleURIConnection(), and uiReady().
◆ initNetManager()
|
private |
Definition at line 363 of file paymentserver.cpp.
References OptionsModel::getProxySettings(), netManager, netRequestFinished(), optionsModel, and reportSslErrors().
Referenced by uiReady().
◆ ipcParseCommandLine()
|
static |
Definition at line 204 of file paymentserver.cpp.
References SendCoinsRecipient::address, BITCOIN_IPC_PREFIX(), CreateChainParams(), PaymentRequestPlus::getDetails(), IsValidDestinationString(), CBaseChainParams::MAIN, GUIUtil::parseBitcoinURI(), readPaymentRequestFromFile(), savedPaymentRequests, SelectParams(), and CBaseChainParams::TESTNET.
Referenced by main().
◆ ipcSendCommandLine()
|
static |
Definition at line 267 of file paymentserver.cpp.
References BITCOIN_IPC_CONNECT_TIMEOUT, ipcServerName(), and savedPaymentRequests.
Referenced by main().
◆ LoadRootCAs()
|
static |
Definition at line 113 of file paymentserver.cpp.
References gArgs, ArgsManager::GetArg(), and ReportInvalidCertificate().
Referenced by BitcoinApplication::initializeResult().
◆ message
|
signal |
Referenced by handlePaymentACK(), handleURIOrFile(), netRequestFinished(), processPaymentRequest(), and reportSslErrors().
◆ netRequestFinished
|
privateslot |
Definition at line 676 of file paymentserver.cpp.
References BIP70_MAX_PAYMENTREQUEST_SIZE, BIP70_MESSAGE_PAYMENTACK, BIP70_MESSAGE_PAYMENTREQUEST, GUIUtil::HtmlEscape(), message(), CClientUIInterface::MSG_ERROR, PaymentRequestPlus::parse(), processPaymentRequest(), receivedPaymentACK(), receivedPaymentRequest(), and verifySize().
Referenced by initNetManager().
◆ processPaymentRequest()
|
private |
Definition at line 519 of file paymentserver.cpp.
References SendCoinsRecipient::address, SendCoinsRecipient::amount, SendCoinsRecipient::authenticatedMerchant, dustRelayFee, EncodeDestination(), ExtractDestination(), BitcoinUnits::formatWithUnit(), PaymentRequestPlus::getDetails(), OptionsModel::getDisplayUnit(), PaymentRequestPlus::getMerchant(), PaymentRequestPlus::getPayTo(), GUIUtil::HtmlEscape(), IsDust(), PaymentRequestPlus::IsInitialized(), SendCoinsRecipient::message, message(), CClientUIInterface::MSG_ERROR, optionsModel, SendCoinsRecipient::paymentRequest, verifyAmount(), verifyExpired(), and verifyNetwork().
Referenced by handleURIOrFile(), and netRequestFinished().
◆ readPaymentRequestFromFile()
|
staticprivate |
Definition at line 501 of file paymentserver.cpp.
References PaymentRequestPlus::parse(), and verifySize().
Referenced by handleURIOrFile(), and ipcParseCommandLine().
◆ receivedPaymentACK
|
signal |
Referenced by netRequestFinished(), and PaymentServer().
◆ receivedPaymentRequest
|
signal |
Referenced by handleURIOrFile(), and netRequestFinished().
◆ reportSslErrors
|
privateslot |
Definition at line 738 of file paymentserver.cpp.
References message(), and CClientUIInterface::MSG_ERROR.
Referenced by initNetManager().
◆ setOptionsModel()
void PaymentServer::setOptionsModel | ( | OptionsModel * | optionsModel | ) |
Definition at line 750 of file paymentserver.cpp.
References optionsModel.
◆ uiReady
|
slot |
Definition at line 389 of file paymentserver.cpp.
References handleURIOrFile(), initNetManager(), savedPaymentRequests, and saveURIs.
◆ verifyAmount()
|
static |
Definition at line 797 of file paymentserver.cpp.
References MAX_MONEY, and MoneyRange().
Referenced by processPaymentRequest().
◆ verifyExpired()
|
static |
Definition at line 773 of file paymentserver.cpp.
References DateTimeStrFormat(), and GetTime().
Referenced by processPaymentRequest(), and WalletModel::sendCoins().
◆ verifyNetwork()
|
static |
Definition at line 761 of file paymentserver.cpp.
References CChainParams::NetworkIDString(), and Params().
Referenced by processPaymentRequest().
◆ verifySize()
|
static |
Definition at line 785 of file paymentserver.cpp.
References BIP70_MAX_PAYMENTREQUEST_SIZE.
Referenced by netRequestFinished(), and readPaymentRequestFromFile().
Member Data Documentation
◆ netManager
|
private |
Definition at line 143 of file paymentserver.h.
Referenced by fetchPaymentACK(), fetchRequest(), and initNetManager().
◆ optionsModel
|
private |
Definition at line 145 of file paymentserver.h.
Referenced by initNetManager(), processPaymentRequest(), and setOptionsModel().
◆ saveURIs
|
private |
Definition at line 140 of file paymentserver.h.
Referenced by handleURIOrFile(), and uiReady().
◆ uriServer
|
private |
Definition at line 141 of file paymentserver.h.
Referenced by handleURIConnection(), and PaymentServer().
The documentation for this class was generated from the following files:
- src/qt/paymentserver.h
- src/qt/paymentserver.cpp