git-svn-id: http://apu.dw.local/svnusers/JoshHoltrop/pppc/trunk@51 8131a0b2-b21c-1c47-bd6a-f003126495bd
33 lines
635 B
C++
33 lines
635 B
C++
|
|
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class Config
|
|
{
|
|
public:
|
|
enum Action { NONE, ON, OFF, PREVIOUS };
|
|
|
|
class Entry
|
|
{
|
|
public:
|
|
Entry(const std::string & name);
|
|
std::string name;
|
|
int pin;
|
|
Action on_start;
|
|
Action on_exit;
|
|
Action on_lock;
|
|
Action on_unlock;
|
|
protected:
|
|
};
|
|
|
|
std::string port;
|
|
std::vector<Entry> entries;
|
|
|
|
void read(const char * file);
|
|
};
|
|
|
|
#endif
|