|
1
|
1 #pragma once
|
|
|
2 #include "commonObjects.h"
|
|
|
3
|
|
|
4 namespace fb2k {
|
|
|
5 //! \since 2.0
|
|
|
6 class NOVTABLE console_notify {
|
|
|
7 public:
|
|
|
8 virtual void onConsoleRefresh() = 0;
|
|
|
9 virtual void onConsoleLines(size_t oldLinesGone, arrayRef newLines, arrayRef newLinesTS) { (void)oldLinesGone; (void)newLines; (void)newLinesTS; onConsoleRefresh(); }
|
|
|
10 };
|
|
|
11 //! \since 2.0
|
|
|
12 class NOVTABLE console_manager : public service_base {
|
|
|
13 FB2K_MAKE_SERVICE_COREAPI(console_manager);
|
|
|
14 public:
|
|
|
15 virtual void clearBacklog() = 0;
|
|
|
16 virtual fb2k::arrayRef getLines() = 0;
|
|
|
17 virtual fb2k::arrayRef getLinesTimestamped() = 0;
|
|
|
18 virtual void addNotify(console_notify* notify) = 0;
|
|
|
19 virtual void removeNotify(console_notify* notify) = 0;
|
|
|
20 //! Obsolete, done implicitly by toggling logging, do not use.
|
|
|
21 virtual void saveBacklog() = 0;
|
|
|
22 //! Always true, reserved for future use.
|
|
|
23 virtual bool isVerbose() = 0;
|
|
|
24 };
|
|
|
25 } // namespace fb2k
|
|
|
26
|
|
|
27 namespace console {
|
|
|
28 void addNotify(fb2k::console_notify*);
|
|
|
29 void removeNotify(fb2k::console_notify*);
|
|
|
30 fb2k::arrayRef getLines();
|
|
|
31 void clearBacklog();
|
|
|
32 }
|