Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <paymentserver.h>

+ Inheritance diagram for PaymentServer:
+ Collaboration diagram for PaymentServer:

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
 
OptionsModeloptionsModel
 

Detailed Description

Definition at line 58 of file paymentserver.h.

Constructor & Destructor Documentation

◆ PaymentServer()

PaymentServer::PaymentServer ( QObject *  parent,
bool  startLocalServer = true 
)
explicit

◆ ~PaymentServer()

PaymentServer::~PaymentServer ( )

Definition at line 338 of file paymentserver.cpp.

Member Function Documentation

◆ eventFilter()

bool PaymentServer::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Definition at line 348 of file paymentserver.cpp.

References handleURIOrFile().

◆ fetchPaymentACK

◆ fetchRequest()

void PaymentServer::fetchRequest ( const QUrl &  url)
private

◆ getCertStore()

X509_STORE * PaymentServer::getCertStore ( )
static

Definition at line 809 of file paymentserver.cpp.

Referenced by TransactionDesc::toHTML().

◆ handlePaymentACK

void PaymentServer::handlePaymentACK ( const QString &  paymentACKMsg)
privateslot

◆ handleURIConnection

void PaymentServer::handleURIConnection ( )
privateslot

Definition at line 476 of file paymentserver.cpp.

References handleURIOrFile(), and uriServer.

Referenced by PaymentServer().

◆ handleURIOrFile

◆ initNetManager()

void PaymentServer::initNetManager ( )
private

◆ ipcParseCommandLine()

◆ ipcSendCommandLine()

bool PaymentServer::ipcSendCommandLine ( )
static

Definition at line 267 of file paymentserver.cpp.

References BITCOIN_IPC_CONNECT_TIMEOUT, ipcServerName(), and savedPaymentRequests.

Referenced by main().

◆ LoadRootCAs()

void PaymentServer::LoadRootCAs ( X509_STORE *  store = nullptr)
static

◆ message

void PaymentServer::message ( const QString &  title,
const QString &  message,
unsigned int  style 
)
signal

◆ netRequestFinished

◆ processPaymentRequest()

◆ readPaymentRequestFromFile()

bool PaymentServer::readPaymentRequestFromFile ( const QString &  filename,
PaymentRequestPlus request 
)
staticprivate

Definition at line 501 of file paymentserver.cpp.

References PaymentRequestPlus::parse(), and verifySize().

Referenced by handleURIOrFile(), and ipcParseCommandLine().

◆ receivedPaymentACK

void PaymentServer::receivedPaymentACK ( const QString &  paymentACKMsg)
signal

◆ receivedPaymentRequest

void PaymentServer::receivedPaymentRequest ( SendCoinsRecipient  )
signal

◆ reportSslErrors

void PaymentServer::reportSslErrors ( QNetworkReply *  reply,
const QList< QSslError > &  errs 
)
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

void PaymentServer::uiReady ( )
slot

Definition at line 389 of file paymentserver.cpp.

References handleURIOrFile(), initNetManager(), savedPaymentRequests, and saveURIs.

◆ verifyAmount()

bool PaymentServer::verifyAmount ( const CAmount requestAmount)
static

Definition at line 797 of file paymentserver.cpp.

References MAX_MONEY, and MoneyRange().

Referenced by processPaymentRequest().

◆ verifyExpired()

bool PaymentServer::verifyExpired ( const payments::PaymentDetails &  requestDetails)
static

Definition at line 773 of file paymentserver.cpp.

References DateTimeStrFormat(), and GetTime().

Referenced by processPaymentRequest(), and WalletModel::sendCoins().

◆ verifyNetwork()

bool PaymentServer::verifyNetwork ( const payments::PaymentDetails &  requestDetails)
static

Definition at line 761 of file paymentserver.cpp.

References CChainParams::NetworkIDString(), and Params().

Referenced by processPaymentRequest().

◆ verifySize()

bool PaymentServer::verifySize ( qint64  requestSize)
static

Definition at line 785 of file paymentserver.cpp.

References BIP70_MAX_PAYMENTREQUEST_SIZE.

Referenced by netRequestFinished(), and readPaymentRequestFromFile().

Member Data Documentation

◆ netManager

QNetworkAccessManager* PaymentServer::netManager
private

Definition at line 143 of file paymentserver.h.

Referenced by fetchPaymentACK(), fetchRequest(), and initNetManager().

◆ optionsModel

OptionsModel* PaymentServer::optionsModel
private

Definition at line 145 of file paymentserver.h.

Referenced by initNetManager(), processPaymentRequest(), and setOptionsModel().

◆ saveURIs

bool PaymentServer::saveURIs
private

Definition at line 140 of file paymentserver.h.

Referenced by handleURIOrFile(), and uiReady().

◆ uriServer

QLocalServer* PaymentServer::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:
Released under the MIT license