forked from bigmacd/trapreceiver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.h
More file actions
56 lines (34 loc) · 863 Bytes
/
Config.h
File metadata and controls
56 lines (34 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __CONFIG_H__
#define __CONFIG_H__
#include <afxwin.h>
#include <iostream>
#include <fstream>
using namespace std;
class Config
{
private:
BOOL mGotConfig;
std::ifstream mConfigFile;
char mLineBuffer[4096];
char* mLineBuf;
HANDLE mLock;
void Rewind();
const char* Search(char* param);
// returns how many match the param
unsigned int SearchAll(char* param);
// returns an individual one of the group
const char* SearchOne(char* param, int which);
void Lock();
void Unlock();
protected:
public:
Config();
~Config();
int TrapPort();
int Mode();
CString ModeText();
int ActionCount();
CString WatchType(int which);
CString WatchValue(int which);
};
#endif