added Config module... not using it yet

git-svn-id: http://apu.dw.local/svnusers/JoshHoltrop/pppc/trunk@50 8131a0b2-b21c-1c47-bd6a-f003126495bd
This commit is contained in:
joshholtrop 2009-08-19 16:38:44 +00:00
parent 6714dab3e2
commit 86e9c1adbc
3 changed files with 57 additions and 1 deletions

19
Config.cc Normal file
View File

@ -0,0 +1,19 @@
#include "Config.h"
#include <iostream>
#include <string>
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)
{
}

32
Config.h Normal file
View File

@ -0,0 +1,32 @@
#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:
};
void read(const char * file);
protected:
std::vector<Entry> m_entries;
};
#endif

View File

@ -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