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

MPD feature detection. More...

#include "compile_time.h"
#include "src/mympd_client/features.h"
#include "src/lib/filehandler.h"
#include "src/lib/log.h"
#include "src/lib/sds_extras.h"
#include "src/lib/utility.h"
#include "src/mympd_api/settings.h"
#include "src/mympd_client/errorhandler.h"
#include "src/mympd_client/tags.h"
#include <stdbool.h>
#include <string.h>
Include dependency graph for features.c:

Functions

static void features_commands (struct t_partition_state *partition_state)
 
static void features_mpd_tags (struct t_partition_state *partition_state)
 
static void features_tags (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state)
 
static void set_simple_album_tags (struct t_partition_state *partition_state)
 
static void set_album_tags (struct t_partition_state *partition_state)
 
static void features_config (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state)
 
static sds set_directory (const char *desc, sds directory, sds value)
 
void mympd_client_mpd_features (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state)
 

Detailed Description

MPD feature detection.

Function Documentation

◆ features_commands()

static void features_commands ( struct t_partition_state partition_state)
static

Private definitions

Private functions Looks for allowed MPD command

Parameters
partition_statepointer to partition state

◆ features_config()

static void features_config ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state 
)
static

Uses the config command to check for MPD features

Parameters
mympd_statepointer to mympd state
partition_statepointer to partition state

◆ features_mpd_tags()

static void features_mpd_tags ( struct t_partition_state partition_state)
static

Checks enabled tags from MPD and populates tags_mpd and tags_mympd

Parameters
partition_statepointer to partition state

◆ features_tags()

static void features_tags ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state 
)
static

Sets enabled tags for myMPD

Parameters
mympd_statepointer to mympd state
partition_statepointer to partition state

◆ mympd_client_mpd_features()

void mympd_client_mpd_features ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state 
)

Public functions Detects MPD features and disables/enables myMPD features accordingly

Parameters
mympd_statepointer to mympd state
partition_statepointer to partition state

◆ set_album_tags()

static void set_album_tags ( struct t_partition_state partition_state)
static

Sets the tags for albums

Parameters
partition_statepointer to partition state

◆ set_directory()

static sds set_directory ( const char *  desc,
sds  directory,
sds  value 
)
static

Checks and sets a mpd directory

Parameters
descdescriptive name
directorydirectory setting (auto, none or a directory)
valuealready allocated sds string to set
Returns
pointer to value

◆ set_simple_album_tags()

static void set_simple_album_tags ( struct t_partition_state partition_state)
static

Sets the tags for simple albums

Parameters
partition_statepointer to partition state