From 86e9c1adbc2b176a5167f573bfcfc18a69a236cf Mon Sep 17 00:00:00 2001 From: joshholtrop Date: Wed, 19 Aug 2009 16:38:44 +0000 Subject: [PATCH] added Config module... not using it yet git-svn-id: http://apu.dw.local/svnusers/JoshHoltrop/pppc/trunk@50 8131a0b2-b21c-1c47-bd6a-f003126495bd --- Config.cc | 19 +++++++++++++++++++ Config.h | 32 ++++++++++++++++++++++++++++++++ Makefile | 7 ++++++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 Config.cc create mode 100644 Config.h 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