myMPD
Internal API documentation
Loading...
Searching...
No Matches
timer_handlers.h File Reference

myMPD timer handlers More...

Include dependency graph for timer_handlers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  timer_ids { TIMER_ID_DISK_CACHE_CROP = 1 , TIMER_ID_SMARTPLS_UPDATE = 2 , TIMER_ID_CACHES_CREATE = 3 , TIMER_ID_WEBRADIODB_UPDATE = 4 }
 

Functions

const char * get_timer_name (unsigned timer_id)
 
void timer_handler_by_id (unsigned timer_id, struct t_timer_definition *definition)
 
void timer_handler_select (unsigned timer_id, struct t_timer_definition *definition)
 
bool mympd_api_timer_startplay (struct t_partition_state *partition_state, unsigned volume, sds playlist, sds preset)
 

Detailed Description

myMPD timer handlers

Enumeration Type Documentation

◆ timer_ids

enum timer_ids

Internal timer ids

Function Documentation

◆ get_timer_name()

const char * get_timer_name ( unsigned  timer_id)

Public functions Return the timer name for a timer_id

Parameters
timer_idTimer ID
Returns
const char* Timer name

◆ mympd_api_timer_startplay()

bool mympd_api_timer_startplay ( struct t_partition_state partition_state,
unsigned  volume,
sds  playlist,
sds  preset 
)

This function is used by INTERNAL_API_TIMER_STARTPLAY and is called from the mympd_api_handler

Parameters
partition_statepointer to the partition_state
volumempd volume to set
playlistthe mpd playlist to load
presetthe preset to load
Returns
true on success else false

◆ timer_handler_by_id()

void timer_handler_by_id ( unsigned  timer_id,
struct t_timer_definition definition 
)

Handles timer by timer_id, this is only used for internal timers

Parameters
timer_idthe internal timer_id from enum timer_ids
definitionthe timer definition - not used

◆ timer_handler_select()

void timer_handler_select ( unsigned  timer_id,
struct t_timer_definition definition 
)

Handles user defined timers

Parameters
timer_idthe timer id
definitionthe timer definition