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

#include <apple_notifications.h>

Public Member Functions

void update (uint32_t id, uint8_t eventFlags)
 
bool remove (uint32_t id)
 
bool action (uint32_t id, bool positive, uint8_t(&out)[6]) const
 

Public Attributes

uint32_t uid {0}
 
uint8_t flags {0}
 
bool ringing {false}
 

Detailed Description

Tracks an ANCS call notification and validates call actions against its UID. The phone may remove a notification while the UI is open; checking the UID and advertised action flags prevents stale controls from acting on another call or sending unsupported actions.

Member Function Documentation

◆ action()

bool ersa::protocols::AncsCall::action ( uint32_t  id,
bool  positive,
uint8_t(&)  out[6] 
) const
inline

Encode a supported positive/negative action for the matching live UID.

Returns
False when stale, absent, or not advertised by the phone.

◆ remove()

bool ersa::protocols::AncsCall::remove ( uint32_t  id)
inline

Remove the currently tracked call only when the UID matches.

◆ update()

void ersa::protocols::AncsCall::update ( uint32_t  id,
uint8_t  eventFlags 
)
inline

Record a new active call notification and its supported action bits.

Member Data Documentation

◆ flags

uint8_t ersa::protocols::AncsCall::flags {0}

Action bits advertised by the remote notification.

◆ ringing

bool ersa::protocols::AncsCall::ringing {false}

Whether the tracked call notification is still present.

◆ uid

uint32_t ersa::protocols::AncsCall::uid {0}

Notification UID that owns the current call action flags.


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