5#ifndef BITCOIN_QT_SENDCOINSRECIPIENT_H
6#define BITCOIN_QT_SENDCOINSRECIPIENT_H
8#if defined(HAVE_CONFIG_H)
9#include <config/bitcoin-config.h>
29 const Amount _amount,
const QString &_message)
63 std::string address_str, label_str, message_str, auth_merchant_str;
64 std::string payment_request_str;
66 SER_WRITE(obj, address_str = obj.address.toStdString());
67 SER_WRITE(obj, label_str = obj.label.toStdString());
68 SER_WRITE(obj, message_str = obj.message.toStdString());
70 if (obj.paymentRequest.IsInitialized()) {
71 SER_WRITE(obj, obj.paymentRequest.SerializeToString(
72 &payment_request_str));
75 SER_WRITE(obj, payment_request_str = obj.sPaymentRequest);
78 auth_merchant_str = obj.authenticatedMerchant.toStdString());
80 READWRITE(obj.nVersion, address_str, label_str, obj.amount, message_str,
81 payment_request_str, auth_merchant_str);
83 SER_READ(obj, obj.address = QString::fromStdString(address_str));
84 SER_READ(obj, obj.label = QString::fromStdString(label_str));
85 SER_READ(obj, obj.message = QString::fromStdString(message_str));
87 if (!payment_request_str.empty()) {
88 SER_READ(obj, obj.paymentRequest.parse(QByteArray::fromRawData(
89 payment_request_str.data(),
90 payment_request_str.size())));
93 SER_READ(obj, obj.sPaymentRequest = payment_request_str);
95 SER_READ(obj, obj.authenticatedMerchant =
96 QString::fromStdString(auth_merchant_str));
SendCoinsRecipient(const QString &addr, const QString &_label, const Amount _amount, const QString &_message)
static const int CURRENT_VERSION
SERIALIZE_METHODS(SendCoinsRecipient, obj)
bool fSubtractFeeFromAmount
std::string sPaymentRequest
QString authenticatedMerchant
#define SER_WRITE(obj, code)
#define SER_READ(obj, code)