2009-04-18 08:14:26 -04:00
|
|
|
|
|
|
|
#ifndef __CONFFILE_H__
|
|
|
|
#define __CONFFILE_H__
|
|
|
|
|
2011-07-09 05:50:27 -04:00
|
|
|
#include <sys/types.h>
|
2020-02-01 16:15:56 -05:00
|
|
|
#include <stdint.h>
|
2011-07-09 05:50:27 -04:00
|
|
|
|
2009-04-18 11:18:37 -04:00
|
|
|
#include <confuse.h>
|
2009-04-18 08:14:26 -04:00
|
|
|
|
2021-04-09 14:21:20 -04:00
|
|
|
#define CONFFILE CONFDIR "/owntone.conf"
|
2009-06-12 05:09:58 -04:00
|
|
|
|
2020-05-11 11:02:14 -04:00
|
|
|
// Some shorthand macros for poor man's
|
|
|
|
#define CFG_NAME_UNKNOWN_TITLE (cfg_getstr(cfg_getsec(cfg, "library"), "name_unknown_title"))
|
|
|
|
#define CFG_NAME_UNKNOWN_ARTIST (cfg_getstr(cfg_getsec(cfg, "library"), "name_unknown_artist"))
|
|
|
|
#define CFG_NAME_UNKNOWN_ALBUM (cfg_getstr(cfg_getsec(cfg, "library"), "name_unknown_album"))
|
|
|
|
#define CFG_NAME_UNKNOWN_GENRE (cfg_getstr(cfg_getsec(cfg, "library"), "name_unknown_genre"))
|
|
|
|
#define CFG_NAME_UNKNOWN_COMPOSER (cfg_getstr(cfg_getsec(cfg, "library"), "name_unknown_composer"))
|
|
|
|
|
2009-04-18 11:18:37 -04:00
|
|
|
extern cfg_t *cfg;
|
2010-04-02 12:28:43 -04:00
|
|
|
extern uint64_t libhash;
|
2011-07-09 05:50:27 -04:00
|
|
|
extern uid_t runas_uid;
|
|
|
|
extern gid_t runas_gid;
|
2009-04-18 08:14:26 -04:00
|
|
|
|
|
|
|
int
|
|
|
|
conffile_load(char *file);
|
|
|
|
|
|
|
|
void
|
|
|
|
conffile_unload(void);
|
|
|
|
|
|
|
|
#endif /* !__CONFFILE_H__ */
|