6 #ifndef PACKAGE_VERSION     7 #define PACKAGE_VERSION "unknown"    22       static void signal_handler(
int signum, siginfo_t * sigInfo, 
void * ignore);
    32       bool parseArgs(
int & argc, 
char ** & argv);
    34       std::string 
getString(std::string optname);
    36       bool getBool(std::string optname);
    51   void getMyExec(std::deque<std::string> & execs);
 
void printHelp(std::ostream &output)
Prints a usage message to the given output. 
Definition: config.cpp:98
int long_count
Definition: config.h:21
void addBasicConnectorOptions(JSON::Value &capabilities)
Adds the default connector options. Also updates the capabilities structure with the default options...
Definition: config.cpp:526
void activate()
Activated the stored config. 
Definition: config.cpp:436
JSON::Value & getOption(std::string optname, bool asArray=false)
Returns a reference to the current value of an option or default if none was set. ...
Definition: config.cpp:308
static void signal_handler(int signum, siginfo_t *sigInfo, void *ignore)
Basic signal handler. 
Definition: config.cpp:469
bool parseArgs(int &argc, char **&argv)
Parses commandline arguments. 
Definition: config.cpp:193
int forkServer(Socket::Server &server_socket, int(*callback)(Socket::Connection &S))
void addOption(std::string optname, JSON::Value option)
Adds an option to the configuration parser. 
Definition: config.cpp:80
A JSON::Value is either a string or an integer, but may also be an object, array or null...
Definition: json.h:21
std::string getString(std::string optname)
Returns the current value of an option or default if none was set as a string. 
Definition: config.cpp:326
void addConnectorOptions(int port, JSON::Value &capabilities)
Adds the default connector options. 
Definition: config.cpp:495
JSON::Value capabilities
Global storage of capabilities. 
Definition: controller_capabilities.cpp:12
void setUser(std::string user)
Will set the active user to the named username. 
Definition: config.cpp:632
static bool is_active
Set to true by activate(), set to false by the signal handler. 
Definition: config.h:25
std::string getMyPath()
Gets directory the current executable is stored in. 
Definition: config.cpp:569
Contains utility code, not directly related to streaming media. 
Definition: bitfields.h:3
This class is for easily setting up listening socket, either TCP or Unix. 
Definition: socket.h:104
int servePlainSocket(int(*callback)(Socket::Connection &S))
void Daemonize(bool notClose=false)
Will turn the current process into a daemon. 
Definition: config.cpp:652
Deals with parsing configuration from commandline options. 
Definition: config.h:18
void getMyExec(std::deque< std::string > &execs)
Gets all executables in getMyPath that start with "Mist". 
Definition: config.cpp:600
Config()
Definition: config.cpp:39
bool getBool(std::string optname)
Returns the current value of an option or default if none was set as a bool. 
Definition: config.cpp:338
JSON::Value vals
Holds all current config values. 
Definition: config.h:20
int threadServer(Socket::Server &server_socket, int(*callback)(Socket::Connection &S))
long long int getInteger(std::string optname)
Returns the current value of an option or default if none was set as a long long int. 
Definition: config.cpp:332
static unsigned int printDebugLevel
Definition: config.h:26
This class is for easy communicating through sockets, either TCP or Unix. 
Definition: socket.h:47
int serveThreadedSocket(int(*callback)(Socket::Connection &S))
int serveForkedSocket(int(*callback)(Socket::Connection &S))
Definition: config.cpp:414