X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/985bb670b4e07d35cb1580780253ded2524a342e..47854c5fdbdebaf707de438f0fa86c4cb99d2268:/lib/configuration.h diff --git a/lib/configuration.h b/lib/configuration.h index 4cb5677..f1794aa 100644 --- a/lib/configuration.h +++ b/lib/configuration.h @@ -70,7 +70,8 @@ struct collectionlist { struct namepart { char *part; /* part */ - pcre *re; /* regexp */ + pcre *re; /* compiled regexp */ + char *res; /* regexp as a string */ char *replace; /* replacement string */ char *context; /* context glob */ unsigned reflags; /* regexp flags */ @@ -184,14 +185,20 @@ struct config { /** @brief API used to play sound */ const char *api; + /** @brief Maximum size of a playlist */ + long playlist_max; + + /** @brief Maximum lifetime of a playlist lock */ + long playlist_lock_timeout; + /** @brief Home directory for state files */ const char *home; /** @brief Login username */ - const char *username; + char *username; /** @brief Login password */ - const char *password; + char *password; /** @brief Address to connect to */ struct netaddress connect; @@ -292,7 +299,8 @@ struct config { extern struct config *config; /* the current configuration */ -int config_read(int server); +int config_read(int server, + const struct config *oldconfig); /* re-read config, return 0 on success or non-0 on error. * Only updates @config@ if the new configuration is valid. */ @@ -312,6 +320,8 @@ char *config_usersysconf(const struct passwd *pw ); char *config_private(void); /* get the private config file */ +void config_free(struct config *c); + extern char *configfile; extern int config_per_user;