X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/cdabf44d4bf72678b402c0fd7dac394eb36513da..f4604d0d467ae510f8167d3109e6fd05f57f1cde:/server/disorder-server.h diff --git a/server/disorder-server.h b/server/disorder-server.h index 7cd1cf6..7a6b73a 100644 --- a/server/disorder-server.h +++ b/server/disorder-server.h @@ -1,6 +1,6 @@ /* * This file is part of DisOrder - * Copyright (C) 2008-2010 Richard Kettlewell + * Copyright (C) 2008-2012 Richard Kettlewell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -179,13 +179,16 @@ void play(ev_source *ev); /* try to play something, if playing is enabled and nothing is playing * already */ +/** @brief Return true if @p represents a true flag */ +int flag_enabled(const char *s); + int playing_is_enabled(void); /* return true iff playing is enabled */ void enable_playing(const char *who, ev_source *ev); /* enable playing */ -void disable_playing(const char *who); +void disable_playing(const char *who, ev_source *ev); /* disable playing. */ int random_is_enabled(void); @@ -194,7 +197,7 @@ int random_is_enabled(void); void enable_random(const char *who, ev_source *ev); /* enable random play */ -void disable_random(const char *who); +void disable_random(const char *who, ev_source *ev); /* disable random play */ void scratch(const char *who, const char *id); @@ -231,7 +234,8 @@ void add_random_track(ev_source *ev); int server_start(ev_source *ev, int pf, size_t socklen, const struct sockaddr *sa, - const char *name); + const char *name, + int privileged); /* start listening. Return the fd. */ int server_stop(ev_source *ev, int fd); @@ -345,8 +349,6 @@ struct pbgc_params { int argc; /** @brief Player command */ const char **argv; - /** @brief Device to wait for or NULL */ - const char *waitdevice; /** @brief Raw track name */ const char *rawpath; }; @@ -374,15 +376,8 @@ int play_background(ev_source *ev, void periodic_mount_check(ev_source *ev_); -#ifndef MOUNT_CHECK_INTERVAL -# ifdef PATH_MTAB -// statting a file is really cheap so check once a second -# define MOUNT_CHECK_INTERVAL 1 -# else -// hashing getfsstat() output could be more expensive so be less aggressive -# define MOUNT_CHECK_INTERVAL 5 -# endif -#endif +/** @brief How often to check for new (or old) filesystems */ +# define MOUNT_CHECK_INTERVAL 5 /* seconds */ #endif /* DISORDER_SERVER_H */