diff --git a/Config.cc b/Config.cc new file mode 100644 index 0000000..a9e82a6 --- /dev/null +++ b/Config.cc @@ -0,0 +1,19 @@ + +#include "Config.h" +#include +#include +using namespace std; + +Config::Entry::Entry(const string & name) +{ + this->name = name; + pin = -1; + on_start = NONE; + on_exit = NONE; + on_lock = NONE; + on_unlock = NONE; +} + +void Config::read(const char * file) +{ +} diff --git a/Config.h b/Config.h new file mode 100644 index 0000000..f51eb9f --- /dev/null +++ b/Config.h @@ -0,0 +1,32 @@ + +#ifndef CONFIG_H +#define CONFIG_H + +#include +#include + +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: + }; + + void read(const char * file); + + protected: + std::vector m_entries; +}; + +#endif diff --git a/Makefile b/Makefile index 804d4d5..1e07866 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ TARGET := pppc.exe -OBJS := pppc.o session_notification.o resources.o pport.o parseCmdLine.o +OBJS := pppc.o +OBJS += session_notification.o +OBJS += resources.o +OBJS += pport.o +OBJS += parseCmdLine.o +OBJS += Config.o CXXFLAGS := -O2 -Wall LDFLAGS := -mwindows