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

myMPD timer handlers More...

#include "compile_time.h"
#include "src/mympd_api/timer_handlers.h"
#include "src/lib/api.h"
#include "src/lib/json/json_print.h"
#include "src/lib/json/json_query.h"
#include "src/lib/json/json_rpc.h"
#include "src/lib/list.h"
#include "src/lib/log.h"
#include "src/lib/mympd_state.h"
#include "src/lib/sds_extras.h"
#include "src/mympd_api/requests.h"
#include "src/mympd_client/errorhandler.h"
#include "src/mympd_client/jukebox.h"
#include "src/mympd_client/shortcuts.h"
#include "src/mympd_client/volume.h"
#include <string.h>
Include dependency graph for timer_handlers.c:

Functions

static void timer_handler_cache_disk_crop (void)
 
static void timer_handler_smartpls_update (void)
 
static void timer_handler_caches_create (void)
 
static void timer_handler_webradiodb_update (void)
 
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

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_cache_disk_crop()

static void timer_handler_cache_disk_crop ( void  )
static

Private definitions

Private functions Timer handler for timer_id TIMER_ID_DISK_CACHE_CROP

◆ timer_handler_caches_create()

static void timer_handler_caches_create ( void  )
static

Timer handler for timer_id TIMER_ID_CACHES_CREATE

◆ 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

◆ timer_handler_smartpls_update()

static void timer_handler_smartpls_update ( void  )
static

Timer handler for timer_id TIMER_ID_SMARTPLS_UPDATE

◆ timer_handler_webradiodb_update()

static void timer_handler_webradiodb_update ( void  )
static

Timer handler for timer_id TIMER_ID_WEBRADIODB_UPDATE