Reece
99c5e1fa65
[*] Split up Aurora Async [*] Split Async app into seperate ThreadPool concept [*] Fix various OSThread bugs and tls transfer issues [*] Set default affinity to 0xFFFFFFFF [*] Update Build script [+] Add AuTuplePopFront [+] New Network Interface (unimplemented) [*] Stub out the interfaces required for a better logger [*] Fix Win32 ShellExecute bug; windows 11 struggles without explicit com init per the docs - now deferring to thread pool [*] Update gitignore [*] Follow XDG home standard [*] Refactor some namespaces to use the shorthand aliases [*] Various stability fixes
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Hooks.hpp
|
|
Date: 2021-6-9
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include "IConsoleSubscriber.hpp"
|
|
#include "ITextLineSubscriber.hpp"
|
|
|
|
namespace Aurora::Console::Hooks
|
|
{
|
|
AUKN_SYM void AddSubscription(const AuSPtr<IConsoleSubscriber> &subscriber);
|
|
AUKN_SYM void RemoveSubscription(const AuSPtr<IConsoleSubscriber> &subscriber);
|
|
|
|
using LineHook_cb = std::function<void(const ConsoleMessage &string)>;
|
|
|
|
/// @deprecated wont ever remove
|
|
/// Most c++ styleguides would have you chuck an IConsoleSubscriber in your app somewhere
|
|
AUKN_SYM void AddFunctionalHook(LineHook_cb hook);
|
|
|
|
|
|
/**
|
|
* Hijacks the UTF-8 input line processor coming from the consoles.
|
|
* Call with an empty interface pointer to reenable command processing
|
|
*
|
|
* Requires AsyncApp or RuntimePump() calls
|
|
*/
|
|
AUKN_SYM void SetCallbackAndDisableCmdProcessing(const AuSPtr<Hooks::ITextLineSubscriber> &subscriber);
|
|
} |