Bitcoin ABC  0.26.3
P2P Digital Currency
notifications_interface.h
Go to the documentation of this file.
1 // Copyright (c) 2023 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 BITCOIN_KERNEL_NOTIFICATIONS_INTERFACE_H
6 #define BITCOIN_KERNEL_NOTIFICATIONS_INTERFACE_H
7 
8 #include <cstdint>
9 #include <string>
10 
11 class CBlockIndex;
12 enum class SynchronizationState;
13 struct bilingual_str;
14 
15 namespace kernel {
16 
22 public:
23  virtual ~Notifications(){};
24 
25  virtual void blockTip(SynchronizationState state, CBlockIndex &index) {}
26  virtual void headerTip(SynchronizationState state, int64_t height,
27  int64_t timestamp, bool presync) {}
28  virtual void progress(const bilingual_str &title, int progress_percent,
29  bool resume_possible) {}
30  virtual void warning(const std::string &warning) {}
31 };
32 } // namespace kernel
33 
34 #endif // BITCOIN_KERNEL_NOTIFICATIONS_INTERFACE_H
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:25
A base class defining functions for notifying about certain kernel events.
virtual void headerTip(SynchronizationState state, int64_t height, int64_t timestamp, bool presync)
virtual void warning(const std::string &warning)
virtual void progress(const bilingual_str &title, int progress_percent, bool resume_possible)
virtual void blockTip(SynchronizationState state, CBlockIndex &index)
Bilingual messages:
Definition: translation.h:17
SynchronizationState
Current sync state passed to tip changed callbacks.
Definition: validation.h:113