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

MPD client idle event handling. More...

Include dependency graph for idle.c:

Functions

static void mympd_client_idle_partition (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, struct t_work_request *request)
 
static void mympd_client_parse_idle (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, unsigned idle_bitmask)
 
void mympd_client_idle (struct t_mympd_state *mympd_state, struct t_work_request *request)
 
void mympd_client_scrobble (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state)
 

Detailed Description

MPD client idle event handling.

Function Documentation

◆ mympd_client_idle()

void mympd_client_idle ( struct t_mympd_state mympd_state,
struct t_work_request request 
)

Public functions This is the central function to handle api requests and mpd events. It is called from the mympd_api thread.

Parameters
mympd_statepointer to the mympd state struct
requestwork request from the mympd_api queue

◆ mympd_client_idle_partition()

static void mympd_client_idle_partition ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state,
struct t_work_request request 
)
static

Private definitions

Private functions This function checks the mpd connection state, handles api requests and mpd events per partition.

Parameters
mympd_statepointer to mympd state
partition_statepointer to the partition state
requestapi request

◆ mympd_client_parse_idle()

static void mympd_client_parse_idle ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state,
unsigned  idle_bitmask 
)
static

Handles mpd idle events

Parameters
mympd_statepointer to partition state
partition_statepointer to partition specific state
idle_bitmasktriggered mpd idle events as bitmask

◆ mympd_client_scrobble()

void mympd_client_scrobble ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state 
)

Scrobble event Execute scrobble event scripts, updates the last play list and sets stickers.

Parameters
mympd_statepointer to partition state
partition_statepointer to partition specific state