PebbleOS
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
Vibe score catalog

Built-in vibe scores, their names and the alerts they can be used for. More...

Macros

#define DEFAULT_VIBE_SCORE_NOTIFS   (VibeScoreId_NudgeNudge)
 Default score for notifications; VibeScoreId_StandardShortPulseHigh on Asterix.
 
#define DEFAULT_VIBE_SCORE_INCOMING_CALLS   (VibeScoreId_Pulse)
 Default score for incoming calls.
 
#define DEFAULT_VIBE_SCORE_ALARMS   (VibeScoreId_Reveille)
 Default score for alarms.
 
#define DEFAULT_VIBE_SCORE_HOURLY   (VibeScoreId_Disabled)
 Default score for the hourly vibration.
 
#define DEFAULT_VIBE_SCORE_ON_DISCONNECT   (VibeScoreId_Disabled)
 Default score for phone disconnection.
 

Enumerations

enum  VibeScoreId { VibeScoreId_Invalid = 0 }
 ID of a built-in vibe score. More...
 

Functions

uint32_t vibe_score_info_get_resource_id (VibeScoreId id)
 Get the resource of a vibe score.
 
const char * vibe_score_info_get_name (VibeScoreId id)
 Get the display name of a vibe score.
 
VibeScoreId vibe_score_info_cycle_next (VibeClient client, VibeScoreId curr_id)
 Get the next vibe score available to an alert, in catalog order.
 
bool vibe_score_info_is_valid (VibeScoreId id)
 Check whether a vibe score ID can be used.
 

Detailed Description

Built-in vibe scores, their names and the alerts they can be used for.

The catalog is defined in vibes.def. Score IDs are persisted in preferences, so they are never reused.

Macro Definition Documentation

◆ DEFAULT_VIBE_SCORE_ALARMS

#define DEFAULT_VIBE_SCORE_ALARMS   (VibeScoreId_Reveille)

Default score for alarms.

◆ DEFAULT_VIBE_SCORE_HOURLY

#define DEFAULT_VIBE_SCORE_HOURLY   (VibeScoreId_Disabled)

Default score for the hourly vibration.

◆ DEFAULT_VIBE_SCORE_INCOMING_CALLS

#define DEFAULT_VIBE_SCORE_INCOMING_CALLS   (VibeScoreId_Pulse)

Default score for incoming calls.

◆ DEFAULT_VIBE_SCORE_NOTIFS

#define DEFAULT_VIBE_SCORE_NOTIFS   (VibeScoreId_NudgeNudge)

Default score for notifications; VibeScoreId_StandardShortPulseHigh on Asterix.

◆ DEFAULT_VIBE_SCORE_ON_DISCONNECT

#define DEFAULT_VIBE_SCORE_ON_DISCONNECT   (VibeScoreId_Disabled)

Default score for phone disconnection.

Enumeration Type Documentation

◆ VibeScoreId

ID of a built-in vibe score.

Generated from vibes.def: besides VibeScoreId_Invalid, each entry defines a value named after the score, e.g. VibeScoreId_Disabled or VibeScoreId_Pulse.

Enumerator
VibeScoreId_Invalid 

Invalid ID, never used by a score.

Function Documentation

◆ vibe_score_info_cycle_next()

VibeScoreId vibe_score_info_cycle_next ( VibeClient  client,
VibeScoreId  curr_id 
)

Get the next vibe score available to an alert, in catalog order.

Wraps around at the end of the catalog.

Parameters
clientKind of alert; VibeClient_AlarmsLPM is not allowed.
curr_idCurrent score.
Returns
Next score, or curr_id if there is no other.

◆ vibe_score_info_get_name()

const char * vibe_score_info_get_name ( VibeScoreId  id)

Get the display name of a vibe score.

Parameters
idScore ID.
Returns
Name (untranslated where marked for translation), or "" if unknown.

◆ vibe_score_info_get_resource_id()

uint32_t vibe_score_info_get_resource_id ( VibeScoreId  id)

Get the resource of a vibe score.

Parameters
idScore ID.
Returns
System resource ID of the score, RESOURCE_ID_INVALID if unknown or for VibeScoreId_Disabled.

◆ vibe_score_info_is_valid()

bool vibe_score_info_is_valid ( VibeScoreId  id)

Check whether a vibe score ID can be used.

Parameters
idScore ID.
Returns
true if the score exists and has a resource, or is VibeScoreId_Disabled.