Fabcoin Core  0.16.2
P2P Digital Currency
paymentrequestplus.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2017 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef FABCOIN_QT_PAYMENTREQUESTPLUS_H
6 #define FABCOIN_QT_PAYMENTREQUESTPLUS_H
7 
8 #pragma GCC diagnostic push
9 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
10 #include <paymentrequest.pb.h>
11 #pragma GCC diagnostic pop
12 
13 #include <base58.h>
14 
15 #include <openssl/x509.h>
16 
17 #include <QByteArray>
18 #include <QList>
19 #include <QString>
20 
21 static const bool DEFAULT_SELFSIGNED_ROOTCERTS = false;
22 
23 //
24 // Wraps dumb protocol buffer paymentRequest
25 // with extra methods
26 //
27 
29 {
30 public:
32 
33  bool parse(const QByteArray& data);
34  bool SerializeToString(std::string* output) const;
35 
36  bool IsInitialized() const;
37  // Returns true if merchant's identity is authenticated, and
38  // returns human-readable merchant identity in merchant
39  bool getMerchant(X509_STORE* certStore, QString& merchant) const;
40 
41  // Returns list of outputs, amount
42  QList<std::pair<CScript,CAmount> > getPayTo() const;
43 
44  const payments::PaymentDetails& getDetails() const { return details; }
45 
46 private:
49 };
50 
51 #endif // FABCOIN_QT_PAYMENTREQUESTPLUS_H
bool IsInitialized() const
bool getMerchant(X509_STORE *certStore, QString &merchant) const
bool SerializeToString(std::string *output) const
const payments::PaymentDetails & getDetails() const
bool parse(const QByteArray &data)
payments::PaymentDetails details
QList< std::pair< CScript, CAmount > > getPayTo() const
payments::PaymentRequest paymentRequest
uint8_t const * data
Definition: sha3.h:19