2006-02-05 17:43:00 +00:00
|
|
|
#ifndef _GYR_CONFIG_H
|
|
|
|
#define _GYR_CONFIG_H
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
#include <getopt.h>
|
|
|
|
#include <glibmm.h>
|
|
|
|
|
|
|
|
#include "protocol.h"
|
|
|
|
#include "group.h"
|
|
|
|
|
|
|
|
class Config {
|
|
|
|
private:
|
|
|
|
std::list<HostId> _group_hosts;
|
|
|
|
int _port;
|
|
|
|
Protocol::Type _mode;
|
2006-02-05 18:24:11 +00:00
|
|
|
short _index;
|
2006-02-05 17:43:00 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Config(int argc, char **argv);
|
|
|
|
|
|
|
|
void usage();
|
|
|
|
bool isValid();
|
|
|
|
std::list<HostId> getGroupHosts();
|
|
|
|
int getPort();
|
2006-02-05 18:24:11 +00:00
|
|
|
short getIndex();
|
2006-02-05 17:43:00 +00:00
|
|
|
Protocol::Type getMode();
|
|
|
|
};
|
|
|
|
#endif // _GYR_CONFIG_H
|