Radix Relay
Hybrid mesh communications with Signal Protocol encryption
Loading...
Searching...
No Matches
radix_relay::core::presentation_handler Struct Reference

Handles presentation events and generates user-facing messages. More...

#include <presentation_handler.hpp>

Classes

struct  out_queues_t
 

Public Types

using in_queue_t = async::async_queue< events::presentation_event_variant_t >
 

Public Member Functions

 presentation_handler (const out_queues_t &queues)
 Constructs a presentation handler.
 
auto handle (const events::presentation_event_variant_t &event) const -> void
 Variant handler for standard_processor.
 
auto handle (const events::message_received &evt) const -> void
 Handles a received encrypted message event.
 
auto handle (const events::session_established &evt) const -> void
 Handles a session established event.
 
auto handle (const events::message_sent &evt) const -> void
 Handles a message sent event.
 
auto handle (const events::bundle_published &evt) const -> void
 Handles a bundle published event.
 
auto handle (const events::identities_listed &evt) const -> void
 Handles an identities listed event.
 

Static Public Member Functions

static auto handle (const events::bundle_announcement_received &evt) -> void
 Handles a bundle announcement received event.
 
static auto handle (const events::bundle_announcement_removed &evt) -> void
 Handles a bundle announcement removed event.
 
static auto handle (const events::subscription_established &evt) -> void
 Handles a subscription established event.
 

Detailed Description

Handles presentation events and generates user-facing messages.

Converts presentation events (messages received, sessions established, etc.) into formatted display messages for the user interface.

Definition at line 19 of file presentation_handler.hpp.

Member Typedef Documentation

◆ in_queue_t

Constructor & Destructor Documentation

◆ presentation_handler()

radix_relay::core::presentation_handler::presentation_handler ( const out_queues_t queues)
inlineexplicit

Constructs a presentation handler.

Parameters
queuesOutput queues for display messages

Definition at line 34 of file presentation_handler.hpp.

Member Function Documentation

◆ handle() [1/9]

static auto radix_relay::core::presentation_handler::handle ( const events::bundle_announcement_received evt) -> void
inlinestatic

Handles a bundle announcement received event.

Parameters
evtBundle announcement received event

Definition at line 81 of file presentation_handler.hpp.

◆ handle() [2/9]

static auto radix_relay::core::presentation_handler::handle ( const events::bundle_announcement_removed evt) -> void
inlinestatic

Handles a bundle announcement removed event.

Parameters
evtBundle announcement removed event

Definition at line 91 of file presentation_handler.hpp.

◆ handle() [3/9]

auto radix_relay::core::presentation_handler::handle ( const events::bundle_published evt) const -> void
inline

Handles a bundle published event.

Parameters
evtBundle published event

Definition at line 120 of file presentation_handler.hpp.

References radix_relay::core::events::display_message::bundle_announcement, and radix_relay::platform::current_timestamp_ms().

◆ handle() [4/9]

auto radix_relay::core::presentation_handler::handle ( const events::identities_listed evt) const -> void
inline

Handles an identities listed event.

Parameters
evtIdentities listed event

Definition at line 152 of file presentation_handler.hpp.

References radix_relay::platform::current_timestamp_ms(), and radix_relay::core::events::display_message::system.

◆ handle() [5/9]

auto radix_relay::core::presentation_handler::handle ( const events::message_received evt) const -> void
inline

Handles a received encrypted message event.

Parameters
evtMessage received event

Definition at line 51 of file presentation_handler.hpp.

References radix_relay::core::events::display_message::incoming_message.

◆ handle() [6/9]

auto radix_relay::core::presentation_handler::handle ( const events::message_sent evt) const -> void
inline

Handles a message sent event.

Parameters
evtMessage sent event

Definition at line 101 of file presentation_handler.hpp.

References radix_relay::platform::current_timestamp_ms(), and radix_relay::core::events::display_message::outgoing_message.

◆ handle() [7/9]

auto radix_relay::core::presentation_handler::handle ( const events::presentation_event_variant_t event) const -> void
inline

Variant handler for standard_processor.

Parameters
eventPresentation event variant

Definition at line 41 of file presentation_handler.hpp.

References handle().

Referenced by handle().

◆ handle() [8/9]

auto radix_relay::core::presentation_handler::handle ( const events::session_established evt) const -> void
inline

Handles a session established event.

Parameters
evtSession established event

Definition at line 67 of file presentation_handler.hpp.

References radix_relay::platform::current_timestamp_ms(), and radix_relay::core::events::display_message::session_event.

◆ handle() [9/9]

static auto radix_relay::core::presentation_handler::handle ( const events::subscription_established evt) -> void
inlinestatic

Handles a subscription established event.

Parameters
evtSubscription established event

Definition at line 142 of file presentation_handler.hpp.


The documentation for this struct was generated from the following file: