ledger-core
Operation.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from wallet.djinni
3 
4 #ifndef DJINNI_GENERATED_OPERATION_HPP
5 #define DJINNI_GENERATED_OPERATION_HPP
6 
7 #include "../utils/optional.hpp"
8 #include <chrono>
9 #include <cstdint>
10 #include <memory>
11 #include <string>
12 #include <vector>
13 #ifndef LIBCORE_EXPORT
14  #if defined(_MSC_VER)
15  #include <libcore_export.h>
16  #else
17  #define LIBCORE_EXPORT
18  #endif
19 #endif
20 
21 namespace ledger { namespace core { namespace api {
22 
23 class Amount;
24 class BitcoinLikeOperation;
25 class EthereumLikeOperation;
26 class Preferences;
27 class RippleLikeOperation;
28 class TezosLikeOperation;
29 class TrustIndicator;
30 enum class OperationType;
31 enum class WalletType;
32 struct Currency;
33 
35 class LIBCORE_EXPORT Operation {
36 public:
37  virtual ~Operation() {}
38 
43  virtual std::string getUid() = 0;
44 
49  virtual int32_t getAccountIndex() = 0;
50 
55  virtual OperationType getOperationType() = 0;
56 
61  virtual std::chrono::system_clock::time_point getDate() = 0;
62 
67  virtual std::vector<std::string> getSenders() = 0;
68 
73  virtual std::vector<std::string> getRecipients() = 0;
74 
79  virtual std::shared_ptr<Amount> getAmount() = 0;
80 
85  virtual std::shared_ptr<Amount> getFees() = 0;
86 
91  virtual std::shared_ptr<Preferences> getPreferences() = 0;
92 
97  virtual std::shared_ptr<TrustIndicator> getTrust() = 0;
98 
103  virtual std::experimental::optional<int64_t> getBlockHeight() = 0;
104 
109  virtual std::shared_ptr<BitcoinLikeOperation> asBitcoinLikeOperation() = 0;
110 
115  virtual std::shared_ptr<EthereumLikeOperation> asEthereumLikeOperation() = 0;
116 
121  virtual std::shared_ptr<RippleLikeOperation> asRippleLikeOperation() = 0;
122 
127  virtual std::shared_ptr<TezosLikeOperation> asTezosLikeOperation() = 0;
128 
130  virtual bool isInstanceOfBitcoinLikeOperation() = 0;
131 
133  virtual bool isInstanceOfEthereumLikeOperation() = 0;
134 
136  virtual bool isInstanceOfRippleLikeOperation() = 0;
137 
139  virtual bool isInstanceOfTezosLikeOperation() = 0;
140 
145  virtual bool isComplete() = 0;
146 
151  virtual WalletType getWalletType() = 0;
152 
154  virtual Currency getCurrency() = 0;
155 };
156 
157 } } } // namespace ledger::core::api
158 #endif //DJINNI_GENERATED_OPERATION_HPP
Definition: Currency.hpp:23
Definition: Account.cpp:8
WalletType
Definition: WalletType.hpp:20
Definition: Operation.hpp:35