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:
parent
6714dab3e2
commit
86e9c1adbc
19
Config.cc
Normal file
19
Config.cc
Normal 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
32
Config.h
Normal 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
|
7
Makefile
7
Makefile
@ -1,6 +1,11 @@
|
|||||||
|
|
||||||
TARGET := pppc.exe
|
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
|
CXXFLAGS := -O2 -Wall
|
||||||
LDFLAGS := -mwindows
|
LDFLAGS := -mwindows
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user