aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-07-22 16:50:39 +1000
committerGavin Andresen <gavinandresen@gmail.com>2013-08-22 16:18:25 +1000
commita41d5fe01947f2f878c055670986a165af800f9a (patch)
tree40eeada1ebc180f8e3669a7d164104686dc0c618 /src/qt/walletmodel.h
parent47d0534368fbf0e3fb2cad7d05d60501d29f62aa (diff)
Payment Protocol: X509-validated payment requests
Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r--src/qt/walletmodel.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index f14b09effe..8cba10f5d2 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -4,6 +4,7 @@
#include <QObject>
#include "allocators.h" /* for SecureString */
+#include "paymentrequestplus.h"
class OptionsModel;
class AddressTableModel;
@@ -17,9 +18,15 @@ QT_END_NAMESPACE
class SendCoinsRecipient
{
public:
+ SendCoinsRecipient() : amount(0) { }
+
QString address;
QString label;
qint64 amount;
+
+ // If from a payment request, paymentRequest.IsInitialized() will be true
+ PaymentRequestPlus paymentRequest;
+ QString authenticatedMerchant; // Empty if no authentication or invalid signature/cert/etc.
};
/** Interface to Bitcoin wallet from Qt view code. */
@@ -68,12 +75,10 @@ public:
struct SendCoinsReturn
{
SendCoinsReturn(StatusCode status,
- qint64 fee=0,
- QString hex=QString()):
- status(status), fee(fee), hex(hex) {}
+ qint64 fee=0):
+ status(status), fee(fee) {}
StatusCode status;
qint64 fee; // is used in case status is "AmountWithFeeExceedsBalance"
- QString hex; // is filled with the transaction hash if status is "OK"
};
// Send coins to a list of recipients
@@ -151,6 +156,9 @@ signals:
// Asynchronous message notification
void message(const QString &title, const QString &message, unsigned int style);
+ // Coins sent: from wallet, to recipient, in (serialized) transaction:
+ void coinsSent(CWallet* wallet, SendCoinsRecipient recipient, QByteArray transaction);
+
public slots:
/* Wallet status might have changed */
void updateStatus();