|
myMPD
Internal API documentation
|
Configuration handling. More...
#include "compile_time.h"#include "src/lib/config.h"#include "src/lib/cacertstore.h"#include "src/lib/cache/cache_rax_album.h"#include "src/lib/config_def.h"#include "src/lib/env.h"#include "src/lib/filehandler.h"#include "src/lib/mem.h"#include "src/lib/sds_extras.h"#include "src/lib/state_files.h"#include "src/lib/utility.h"#include "src/lib/validate.h"#include <assert.h>#include <dirent.h>#include <inttypes.h>#include <stdbool.h>#include <string.h>#include <time.h>
Data Structures | |
| struct | t_config_value_default |
| struct | t_config_value |
| struct | t_config_default |
Macros | |
| #define | IFV_N (sizeof config_default/sizeof config_default[0]) |
Enumerations | |
| enum | config_item { CI_ACL = 0 , CI_ALBUM_GROUP_TAG , CI_ALBUM_MODE , CI_ALBUM_UNKNOWN , CI_CA_CERT_STORE , CI_CACHE_COVER_KEEP_DAYS , CI_CACHE_HTTP_KEEP_DAYS , CI_CACHE_LYRICS_KEEP_DAYS , CI_CACHE_MISC_KEEP_DAYS , CI_CACHE_THUMBS_KEEP_DAYS , CI_CERT_CHECK , CI_CUSTOM_CERT , CI_CUSTOM_CSS , CI_CUSTOM_JS , CI_HTTP , CI_HTTP_HOST , CI_HTTP_PORT , CI_LOGLEVEL , CI_MYMPD_URI , CI_PIN_HASH , CI_SCRIPTACL , CI_SCRIPTS_EXTERNAL , CI_SSL , CI_SSL_CERT , CI_SSL_KEY , CI_SSL_PORT , CI_SSL_SAN , CI_STICKERS , CI_STICKERS_PAD_INT , CI_WEBRADIODB , CI_JUKEBOX_QUEUE_LENGTH_SONG , CI_JUKEBOX_QUEUE_LENGTH_SONG_MIN , CI_JUKEBOX_QUEUE_LENGTH_ALBUM , CI_JUKEBOX_QUEUE_LENGTH_ALBUM_MIN , CI_COUNT } |
| enum | config_item_type { CIT_B , CIT_I , CIT_S } |
Functions | |
| void | mympd_config_free (struct t_config *config) |
| void | mympd_config_defaults_initial (struct t_config *config) |
| static void | set_config (struct t_config *config, enum config_item ci, struct t_config_value *value) |
| bool | mympd_config_read (struct t_config *config) |
| void | mympd_config_dump_default (void) |
Variables | |
| static const struct t_config_default | config_default [] |
Configuration handling.
| #define IFV_N (sizeof config_default/sizeof config_default[0]) |
Compile time initialization check
| enum config_item |
Config items
| enum config_item_type |
| void mympd_config_defaults_initial | ( | struct t_config * | config | ) |
Sets the initial default values for config struct This function is used before reading command line arguments
| config | pointer to config struct |
| void mympd_config_dump_default | ( | void | ) |
Dumps the default myMPD configuration
| void mympd_config_free | ( | struct t_config * | config | ) |
Frees the config struct
| config | pointer to config struct |
| bool mympd_config_read | ( | struct t_config * | config | ) |
Reads the myMPD configuration from environment or files This function is used after reading command line arguments.
| config | pointer to config struct |
|
static |
Sets config values
| config | Pointer to config |
| ci | Config item enum |
| value | Value to set |
|
static |
Default config definition