Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Attributes | List of all members
ersa::events::Subscription Struct Reference

#include <event_bus.h>

Collaboration diagram for ersa::events::Subscription:
Collaboration graph
[legend]

Public Attributes

SubscriptionId id {0}
 
EventType type {EventType::None}
 
EventCallback callback {nullptr}
 
IEventListener * listener {nullptr}
 
void * userData {nullptr}
 
bool active {false}
 

Detailed Description

One bounded EventBus registration. Callback and listener pointers are non-owning: the subscriber must unregister before its target is destroyed.

Member Data Documentation

◆ active

bool ersa::events::Subscription::active {false}

False means the fixed slot is unused and may be recycled.

◆ callback

EventCallback ersa::events::Subscription::callback {nullptr}

Optional C callback used instead of the listener interface.

◆ id

SubscriptionId ersa::events::Subscription::id {0}

Handle returned to callers and used for unsubscribe().

◆ listener

IEventListener* ersa::events::Subscription::listener {nullptr}

Optional object listener used instead of the C callback.

◆ type

EventType ersa::events::Subscription::type {EventType::None}

Event filter; None matches every event type.

◆ userData

void* ersa::events::Subscription::userData {nullptr}

Caller context passed back unchanged to callback.


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