ledger-core
Account.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from wallet.djinni
3 
4 #ifndef DJINNI_GENERATED_ACCOUNT_HPP
5 #define DJINNI_GENERATED_ACCOUNT_HPP
6 
7 #include <chrono>
8 #include <cstdint>
9 #include <memory>
10 #include <string>
11 #ifndef LIBCORE_EXPORT
12  #if defined(_MSC_VER)
13  #include <libcore_export.h>
14  #else
15  #define LIBCORE_EXPORT
16  #endif
17 #endif
18 
19 namespace ledger { namespace core { namespace api {
20 
21 class AddressListCallback;
22 class AmountCallback;
23 class AmountListCallback;
24 class BitcoinLikeAccount;
25 class BlockCallback;
26 class ErrorCodeCallback;
27 class EthereumLikeAccount;
28 class EventBus;
29 class Logger;
30 class OperationQuery;
31 class Preferences;
32 class RippleLikeAccount;
33 class TezosLikeAccount;
34 enum class TimePeriod;
35 enum class WalletType;
36 
38 class LIBCORE_EXPORT Account {
39 public:
40  virtual ~Account() {}
41 
46  static std::string const EV_SYNC_DURATION_MS;
47 
49  static std::string const EV_SYNC_ERROR_CODE;
50 
51  static std::string const EV_SYNC_ERROR_CODE_INT;
52 
54  static std::string const EV_SYNC_ERROR_MESSAGE;
55 
57  static std::string const EV_NEW_BLOCK_CURRENCY_NAME;
58 
59  static std::string const EV_NEW_BLOCK_HASH;
60 
61  static std::string const EV_NEW_BLOCK_HEIGHT;
62 
64  static std::string const EV_NEW_OP_WALLET_NAME;
65 
66  static std::string const EV_NEW_OP_ACCOUNT_INDEX;
67 
68  static std::string const EV_NEW_OP_UID;
69 
74  virtual int32_t getIndex() = 0;
75 
77  virtual std::shared_ptr<OperationQuery> queryOperations() = 0;
78 
83  virtual void getBalance(const std::shared_ptr<AmountCallback> & callback) = 0;
84 
92  virtual void getBalanceHistory(const std::string & start, const std::string & end, TimePeriod period, const std::shared_ptr<AmountListCallback> & callback) = 0;
93 
98  virtual bool isSynchronizing() = 0;
99 
104  virtual std::shared_ptr<EventBus> synchronize() = 0;
105 
110  virtual std::shared_ptr<Preferences> getPreferences() = 0;
111 
116  virtual std::shared_ptr<Logger> getLogger() = 0;
117 
122  virtual std::shared_ptr<Preferences> getOperationPreferences(const std::string & uid) = 0;
123 
128  virtual std::shared_ptr<BitcoinLikeAccount> asBitcoinLikeAccount() = 0;
129 
134  virtual std::shared_ptr<EthereumLikeAccount> asEthereumLikeAccount() = 0;
135 
137  virtual std::shared_ptr<RippleLikeAccount> asRippleLikeAccount() = 0;
138 
140  virtual std::shared_ptr<TezosLikeAccount> asTezosLikeAccount() = 0;
141 
146  virtual bool isInstanceOfBitcoinLikeAccount() = 0;
147 
152  virtual bool isInstanceOfEthereumLikeAccount() = 0;
153 
158  virtual bool isInstanceOfRippleLikeAccount() = 0;
159 
161  virtual void getFreshPublicAddresses(const std::shared_ptr<AddressListCallback> & callback) = 0;
162 
167  virtual WalletType getWalletType() = 0;
168 
173  virtual std::shared_ptr<EventBus> getEventBus() = 0;
174 
176  virtual void startBlockchainObservation() = 0;
177 
179  virtual void stopBlockchainObservation() = 0;
180 
185  virtual bool isObservingBlockchain() = 0;
186 
191  virtual void getLastBlock(const std::shared_ptr<BlockCallback> & callback) = 0;
192 
194  virtual std::string getRestoreKey() = 0;
195 
200  virtual void eraseDataSince(const std::chrono::system_clock::time_point & date, const std::shared_ptr<ErrorCodeCallback> & callback) = 0;
201 };
202 
203 } } } // namespace ledger::core::api
204 #endif //DJINNI_GENERATED_ACCOUNT_HPP
static std::string const EV_NEW_BLOCK_CURRENCY_NAME
Definition: Account.hpp:57
static std::string const EV_SYNC_DURATION_MS
Definition: Account.hpp:46
static std::string const EV_NEW_OP_WALLET_NAME
Definition: Account.hpp:64
Definition: Account.hpp:38
Definition: Account.cpp:8
WalletType
Definition: WalletType.hpp:20
static std::string const EV_SYNC_ERROR_MESSAGE
Definition: Account.hpp:54
static std::string const EV_SYNC_ERROR_CODE
Definition: Account.hpp:49