-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram5.h
43 lines (32 loc) · 846 Bytes
/
program5.h
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
#ifndef _PROGRAM5_H_
#define _PROGRAM5_H_
#include <map>
#include <string>
#include <fstream>
#include <csignal>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <tclap/CmdLine.h>
#include <rude/config.h>
#include "InotifyFunctions.h"
using namespace std;
//Functions
void parseCmdLine(int, char**);
void parseConfigFile(void);
void signalHandling(InotifyFunctions&);
void processControl(InotifyFunctions&);
//Helper functions
void log(string);
inline bool doesFileExist(string);
//Variables/Objects
extern map<int, string> cmdArgs;
enum cmdKeys {DAEMON, CONFIG_FILE};
extern map<int, string> configParams;
enum configKeys {VERBOSE, LOG_FILE, PASSWORD, NUM_VERSIONS, WATCH_DIR};
extern bool isLogCreated;
#endif //_PROGRAM5_H_