|
myMPD
Internal API documentation
|
MPD client idle event handling. More...
#include "compile_time.h"#include "src/mympd_client/idle.h"#include "src/lib/datetime.h"#include "src/lib/event.h"#include "src/lib/json/json_rpc.h"#include "src/lib/log.h"#include "src/lib/msg_queue.h"#include "src/lib/mympd_state.h"#include "src/lib/sds_extras.h"#include "src/mympd_api/last_played.h"#include "src/mympd_api/mympd_api_handler.h"#include "src/mympd_api/status.h"#include "src/mympd_api/timer.h"#include "src/mympd_api/timer_handlers.h"#include "src/mympd_api/trigger.h"#include "src/mympd_client/connection.h"#include "src/mympd_client/errorhandler.h"#include "src/mympd_client/jukebox.h"#include "src/mympd_client/partitions.h"#include "src/mympd_client/queue.h"#include "src/mympd_client/stickerdb.h"#include <string.h>
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) |
MPD client idle event handling.
| 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.
| mympd_state | pointer to the mympd state struct |
| request | work request from the mympd_api queue |
|
static |
Private definitions
Private functions This function checks the mpd connection state, handles api requests and mpd events per partition.
| mympd_state | pointer to mympd state |
| partition_state | pointer to the partition state |
| request | api request |
|
static |
Handles mpd idle events
| mympd_state | pointer to partition state |
| partition_state | pointer to partition specific state |
| idle_bitmask | triggered mpd idle events as bitmask |
| 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.
| mympd_state | pointer to partition state |
| partition_state | pointer to partition specific state |