ledger-core
WalletPool.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from wallet_pool.djinni
3 
4 #ifndef DJINNI_GENERATED_WALLETPOOL_HPP
5 #define DJINNI_GENERATED_WALLETPOOL_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 BlockCallback;
22 class CurrencyCallback;
23 class CurrencyListCallback;
24 class DatabaseBackend;
25 class DynamicObject;
26 class ErrorCodeCallback;
27 class EventBus;
28 class HttpClient;
29 class I32Callback;
30 class LogPrinter;
31 class Logger;
32 class PathResolver;
33 class Preferences;
34 class RandomNumberGenerator;
35 class ThreadDispatcher;
36 class WalletCallback;
37 class WalletListCallback;
38 class WebSocketClient;
39 struct Currency;
40 
42 class LIBCORE_EXPORT WalletPool {
43 public:
44  virtual ~WalletPool() {}
45 
60  static std::shared_ptr<WalletPool> newInstance(const std::string & name, const std::string & password, const std::shared_ptr<HttpClient> & httpClient, const std::shared_ptr<WebSocketClient> & webSocketClient, const std::shared_ptr<PathResolver> & pathResolver, const std::shared_ptr<LogPrinter> & logPrinter, const std::shared_ptr<ThreadDispatcher> & dispatcher, const std::shared_ptr<RandomNumberGenerator> & rng, const std::shared_ptr<DatabaseBackend> & backend, const std::shared_ptr<DynamicObject> & configuration);
61 
66  virtual std::shared_ptr<Logger> getLogger() = 0;
67 
72  virtual std::string getName() = 0;
73 
78  virtual std::shared_ptr<Preferences> getPreferences() = 0;
79 
84  virtual void getWalletCount(const std::shared_ptr<I32Callback> & callback) = 0;
85 
92  virtual void getWallets(int32_t from, int32_t size, const std::shared_ptr<WalletListCallback> & callback) = 0;
93 
99  virtual void getWallet(const std::string & name, const std::shared_ptr<WalletCallback> & callback) = 0;
100 
109  virtual void updateWalletConfig(const std::string & name, const std::shared_ptr<DynamicObject> & configuration, const std::shared_ptr<ErrorCodeCallback> & callback) = 0;
110 
118  virtual void createWallet(const std::string & name, const Currency & currency, const std::shared_ptr<DynamicObject> & configuration, const std::shared_ptr<WalletCallback> & callback) = 0;
119 
124  virtual void getCurrencies(const std::shared_ptr<CurrencyListCallback> & callback) = 0;
125 
131  virtual void getCurrency(const std::string & name, const std::shared_ptr<CurrencyCallback> & callback) = 0;
132 
138  virtual void getLastBlock(const std::string & currencyName, const std::shared_ptr<BlockCallback> & callback) = 0;
139 
144  virtual std::shared_ptr<EventBus> getEventBus() = 0;
145 
150  virtual void eraseDataSince(const std::chrono::system_clock::time_point & date, const std::shared_ptr<ErrorCodeCallback> & callback) = 0;
151 
170  virtual void freshResetAll(const std::shared_ptr<ErrorCodeCallback> & callback) = 0;
171 
181  virtual void changePassword(const std::string & oldPassword, const std::string & newPassword, const std::shared_ptr<ErrorCodeCallback> & callback) = 0;
182 };
183 
184 } } } // namespace ledger::core::api
185 #endif //DJINNI_GENERATED_WALLETPOOL_HPP
Definition: Currency.hpp:23
Definition: Account.cpp:8
Definition: WalletPool.hpp:42