Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
PaymentServer Class Reference

#include <paymentserver.h>

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

Public Slots

void uiReady ()
 
void fetchPaymentACK (CWallet *wallet, 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 bool ipcParseCommandLine (int argc, char *argv[])
 
static bool ipcSendCommandLine ()
 
static void LoadRootCAs (X509_STORE *store=NULL)
 
static X509_STORE * getCertStore ()
 

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 (PaymentRequestPlus &request, SendCoinsRecipient &recipient)
 
void fetchRequest (const QUrl &url)
 
void initNetManager ()
 

Static Private Member Functions

static bool readPaymentRequest (const QString &filename, PaymentRequestPlus &request)
 
static void freeCertStore ()
 

Private Attributes

bool saveURIs
 
QLocalServer * uriServer
 
QNetworkAccessManager * netManager
 
OptionsModeloptionsModel
 

Static Private Attributes

static X509_STORE * certStore = NULL
 

Detailed Description

Definition at line 54 of file paymentserver.h.

Constructor & Destructor Documentation

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

Definition at line 264 of file paymentserver.cpp.

References handlePaymentACK(), handleURIConnection(), ipcServerName(), receivedPaymentACK(), and uriServer.

+ Here is the call graph for this function:

PaymentServer::~PaymentServer ( )

Definition at line 302 of file paymentserver.cpp.

Member Function Documentation

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

Definition at line 311 of file paymentserver.cpp.

References handleURIOrFile().

+ Here is the call graph for this function:

void PaymentServer::fetchPaymentACK ( CWallet wallet,
SendCoinsRecipient  recipient,
QByteArray  transaction 
)
slot
void PaymentServer::fetchRequest ( const QUrl &  url)
private

Definition at line 536 of file paymentserver.cpp.

References BITCOIN_REQUEST_MIMETYPE, CLIENT_NAME, and netManager.

Referenced by handleURIOrFile().

+ Here is the caller graph for this function:

void PaymentServer::freeCertStore ( )
staticprivate

Definition at line 56 of file paymentserver.cpp.

References certStore.

Referenced by LoadRootCAs().

+ Here is the caller graph for this function:

static X509_STORE* PaymentServer::getCertStore ( )
inlinestatic

Definition at line 82 of file paymentserver.h.

References certStore.

Referenced by TransactionDesc::toHTML().

+ Here is the caller graph for this function:

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

Definition at line 672 of file paymentserver.cpp.

References CClientUIInterface::ICON_INFORMATION, message(), and CClientUIInterface::MODAL.

Referenced by PaymentServer().

+ Here is the caller graph for this function:

void PaymentServer::handleURIConnection ( )
privateslot

Definition at line 439 of file paymentserver.cpp.

References handleURIOrFile(), and uriServer.

Referenced by PaymentServer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PaymentServer::handleURIOrFile ( const QString &  s)
slot

Definition at line 373 of file paymentserver.cpp.

References BITCOIN_IPC_PREFIX(), fetchRequest(), CClientUIInterface::ICON_WARNING, message(), GUIUtil::parseBitcoinURI(), processPaymentRequest(), readPaymentRequest(), receivedPaymentRequest(), savedPaymentRequests, and saveURIs.

Referenced by eventFilter(), handleURIConnection(), and uiReady().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PaymentServer::initNetManager ( )
private

Definition at line 328 of file paymentserver.cpp.

References OptionsModel::getProxySettings(), message(), CClientUIInterface::MSG_WARNING, netManager, netRequestFinished(), optionsModel, and reportSslErrors().

Referenced by uiReady().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PaymentServer::ipcParseCommandLine ( int  argc,
char *  argv[] 
)
static

Definition at line 181 of file paymentserver.cpp.

References SendCoinsRecipient::address, BITCOIN_IPC_PREFIX(), PaymentRequestPlus::getDetails(), CChainParams::MAIN, payments::PaymentDetails::network(), GUIUtil::parseBitcoinURI(), savedPaymentRequests, SelectParams(), and CChainParams::TESTNET.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PaymentServer::ipcSendCommandLine ( )
static

Definition at line 234 of file paymentserver.cpp.

References ipcServerName(), and savedPaymentRequests.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 98 of file paymentserver.cpp.

References certStore, Checkpoints::data, freeCertStore(), GetArg(), and ReportInvalidCertificate().

Referenced by BitcoinApplication::initializeResult().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 137 of file moc_paymentserver.cpp.

Referenced by handlePaymentACK(), handleURIOrFile(), initNetManager(), netRequestFinished(), processPaymentRequest(), and reportSslErrors().

+ Here is the caller graph for this function:

void PaymentServer::netRequestFinished ( QNetworkReply *  reply)
privateslot

Definition at line 602 of file paymentserver.cpp.

References Checkpoints::data, GUIUtil::HtmlEscape(), payments::PaymentACK::memo(), message(), CClientUIInterface::MSG_ERROR, PaymentRequestPlus::parse(), processPaymentRequest(), receivedPaymentACK(), and receivedPaymentRequest().

Referenced by initNetManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PaymentServer::processPaymentRequest ( PaymentRequestPlus request,
SendCoinsRecipient recipient 
)
private

Definition at line 480 of file paymentserver.cpp.

References SendCoinsRecipient::address, SendCoinsRecipient::amount, SendCoinsRecipient::authenticatedMerchant, certStore, ExtractDestination(), BitcoinUnits::formatWithUnit(), PaymentRequestPlus::getDetails(), OptionsModel::getDisplayUnit(), PaymentRequestPlus::getMerchant(), PaymentRequestPlus::getPayTo(), GUIUtil::HtmlEscape(), CTxOut::IsDust(), payments::PaymentDetails::memo(), SendCoinsRecipient::message, message(), CClientUIInterface::MSG_ERROR, CTransaction::nMinRelayTxFee, optionsModel, PAIRTYPE, and SendCoinsRecipient::paymentRequest.

Referenced by handleURIOrFile(), and netRequestFinished().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 460 of file paymentserver.cpp.

References Checkpoints::data, MAX_PAYMENT_REQUEST_SIZE, and PaymentRequestPlus::parse().

Referenced by handleURIOrFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 130 of file moc_paymentserver.cpp.

Referenced by netRequestFinished(), and PaymentServer().

+ Here is the caller graph for this function:

void PaymentServer::receivedPaymentRequest ( SendCoinsRecipient  _t1)
signal

Definition at line 123 of file moc_paymentserver.cpp.

Referenced by handleURIOrFile(), and netRequestFinished().

+ Here is the caller graph for this function:

void PaymentServer::reportSslErrors ( QNetworkReply *  reply,
const QList< QSslError > &  errs 
)
privateslot

Definition at line 655 of file paymentserver.cpp.

References message(), and CClientUIInterface::MSG_ERROR.

Referenced by initNetManager().

+ Here is the caller graph for this function:

void PaymentServer::setOptionsModel ( OptionsModel optionsModel)

Definition at line 667 of file paymentserver.cpp.

References optionsModel.

void PaymentServer::uiReady ( )
slot

Definition at line 361 of file paymentserver.cpp.

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

+ Here is the call graph for this function:

Member Data Documentation

X509_STORE * PaymentServer::certStore = NULL
staticprivate

Definition at line 130 of file paymentserver.h.

Referenced by freeCertStore(), getCertStore(), LoadRootCAs(), and processPaymentRequest().

QNetworkAccessManager* PaymentServer::netManager
private

Definition at line 133 of file paymentserver.h.

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

OptionsModel* PaymentServer::optionsModel
private

Definition at line 135 of file paymentserver.h.

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

bool PaymentServer::saveURIs
private

Definition at line 127 of file paymentserver.h.

Referenced by handleURIOrFile(), and uiReady().

QLocalServer* PaymentServer::uriServer
private

Definition at line 128 of file paymentserver.h.

Referenced by handleURIConnection(), and PaymentServer().


The documentation for this class was generated from the following files: