aboutsummaryrefslogtreecommitdiff
path: root/src/qt/paymentserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/paymentserver.h')
-rw-r--r--src/qt/paymentserver.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index d84d09c57d..e1305b9437 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -1,9 +1,10 @@
// Copyright (c) 2011-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef PAYMENTSERVER_H
-#define PAYMENTSERVER_H
+#ifndef BITCOIN_QT_PAYMENTSERVER_H
+#define BITCOIN_QT_PAYMENTSERVER_H
+
// This class handles payment requests from clicking on
// bitcoin: URIs
//
@@ -39,6 +40,8 @@
class OptionsModel;
+class CWallet;
+
QT_BEGIN_NAMESPACE
class QApplication;
class QByteArray;
@@ -49,7 +52,8 @@ class QSslError;
class QUrl;
QT_END_NAMESPACE
-class CWallet;
+// BIP70 max payment request size in bytes (DoS protection)
+extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE;
class PaymentServer : public QObject
{
@@ -58,7 +62,7 @@ class PaymentServer : public QObject
public:
// Parse URIs on command line
// Returns false on error
- static bool ipcParseCommandLine(int argc, char *argv[]);
+ static void ipcParseCommandLine(int argc, char *argv[]);
// Returns true if there were URIs on the command line
// which were successfully sent to an already-running
@@ -84,6 +88,9 @@ public:
// OptionsModel is used for getting proxy settings and display unit
void setOptionsModel(OptionsModel *optionsModel);
+ // This is now public, because we use it in paymentservertests.cpp
+ static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request);
+
signals:
// Fired when a valid payment request is received
void receivedPaymentRequest(SendCoinsRecipient);
@@ -117,7 +124,6 @@ protected:
bool eventFilter(QObject *object, QEvent *event);
private:
- static bool readPaymentRequest(const QString& filename, PaymentRequestPlus& request);
bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient);
void fetchRequest(const QUrl& url);
@@ -135,4 +141,4 @@ private:
OptionsModel *optionsModel;
};
-#endif // PAYMENTSERVER_H
+#endif // BITCOIN_QT_PAYMENTSERVER_H