AuroraRuntime/Include/Aurora/Console/Commands/Commands.hpp
Reece Wilson 124038df62 [*] Refactor public headers
[+] AuConsole::Commands::RemoveCommand
[+] EExtendedUsage::eServerAuth
[+] SysPanic2 for SysSafeLine hints (backtrace may contain optimized SysPanics, making tracing the true origin difficult)
[*] Reworked SysAssertions
[*] AuParse::EncodeHex now takes AuMemoryViewRead
[*] AuRng::ReadSecureRNG now takes AuMemoryViewWrite
[*] AuRng::ReadFastRNG now takes AuMemoryViewWrite
2023-01-15 06:05:22 +00:00

45 lines
1.4 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Commands.hpp
Date: 2021-6-10
Author: Reece
***/
#pragma once
#include <Aurora/Parse/Parse.hpp>
#include "ICommandSubscriber.hpp"
namespace Aurora::Async
{
struct WorkerId_t;
struct WorkerPId_t;
}
namespace Aurora::Console::Commands
{
AUKN_SYM void AddCommand(const AuString &tag, const Parse::ParseObject &commandStructure, const AuSPtr<ICommandSubscriber> &subscriber);
AUKN_SYM void RemoveCommand(const AuString &tag);
/**
* Dispatch a command to the main thread or aurora async overloaded command dispatcher thread worker id
*/
AUKN_SYM bool DispatchCommand(const AuString &string);
/**
* Parses `string` and dispatches the parsed command on the current thread instantly
*/
AUKN_SYM bool DispatchCommandThisThread(const AuString &string);
/**
* Parses `string` on the current thread and then schedules the ICommandSubscriber callback on the specified thread
*/
AUKN_SYM bool DispatchCommandToAsyncRunner(const AuString &string, Async::WorkerId_t id);
/**
* Parses `string` on the current thread and then schedules the ICommandSubscriber callback on the specified thread
*/
AUKN_SYM bool DispatchCommandToAsyncRunner(const AuString &string, Async::WorkerPId_t id);
}