|
Radix Relay
Hybrid mesh communications with Signal Protocol encryption
|
Parses raw command strings into typed command events. More...
#include <event_handler.hpp>
Classes | |
| struct | out_queues_t |
Public Types | |
| using | command_handler_t = CmdHandler |
| using | in_queue_t = async::async_queue< events::raw_command > |
Public Member Functions | |
| event_handler (std::shared_ptr< CmdHandler > command_handler, const out_queues_t &) | |
| Constructs an event handler with the given command handler. | |
| auto | handle (const events::raw_command &event) const -> void |
| Parses and handles a raw command string. | |
Parses raw command strings into typed command events.
| CmdHandler | Type satisfying the command_handler concept |
Converts raw text commands from the user into strongly-typed event structures and dispatches them to the command handler.
Definition at line 20 of file event_handler.hpp.
| using radix_relay::core::event_handler< CmdHandler >::command_handler_t = CmdHandler |
Definition at line 22 of file event_handler.hpp.
| using radix_relay::core::event_handler< CmdHandler >::in_queue_t = async::async_queue<events::raw_command> |
Definition at line 25 of file event_handler.hpp.
|
inlineexplicit |
Constructs an event handler with the given command handler.
| command_handler | Shared pointer to the command handler |
| queues | Output queues (unused for event_handler) |
Definition at line 38 of file event_handler.hpp.
|
inline |
Parses and handles a raw command string.
| event | Raw command event containing unparsed user input |
Definition at line 47 of file event_handler.hpp.
References radix_relay::core::events::chat::contact, radix_relay::core::events::broadcast::message, radix_relay::core::events::mode::new_mode, radix_relay::core::events::send::peer, radix_relay::core::events::trust::peer, radix_relay::core::events::verify::peer, and radix_relay::core::events::connect::relay.