-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfbData.h
More file actions
66 lines (49 loc) · 1.61 KB
/
fbData.h
File metadata and controls
66 lines (49 loc) · 1.61 KB
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
55
56
57
58
59
60
61
62
63
64
65
/* $Id: fbData.h,v 1.12 2008/04/11 02:21:15 ctubbsii Exp $ */
#ifndef fbDATA_H
#define fbDATA_H
#include "global.h"
#include "fbErrorLogger.h"
#include "fbDatabase.h"
#include "fbConfig.h"
class fbData
{
public:
fbData();
~fbData();
//ErrorLogger Functions
//void err(ERROR_CODES code, const char* str);
void err(ERROR_CODES code, string& str);
//void warn(ERROR_CODES code, const char* str);
void warn(ERROR_CODES code, string& str);
//void msg(ERROR_CODES code, const char* str);
void msg(ERROR_CODES code, string& str);
//void debug(ERROR_CODES code, const char* str);
void debug(ERROR_CODES code, string& str);
void err(ERROR_CODES code, const char* str, ...);
void warn(ERROR_CODES code, const char* str, ...);
void msg(ERROR_CODES code, const char* str, ...);
void debug(ERROR_CODES code, const char* str,...);
//config functions
int loadConfig();
int saveConfig();
void setWebServerAddr(const string& strAddr);
void setWebServerPort(const int port);
void setWebServerRootPath(const string& strPath);
void setDBPath(const string& strPath);
const string& getWebServerAddr();
const int getWebServerPort();
const string& getWebServerRootPath();
const string& getDBPath();
//Database functions
bool addBackupJob(string* desc, fbDate* date, fbTime* time, string* path, Repeat_type rt = ONCE, int rv = 0);
bool queryBackups();
bool addRestoreJob(string* tarfile, string* dest);
bool queryRestore();
bool addRepo(string* desc, fbDate* date, fbTime* time, string* path, string* tarfile);
bool queryRepo();
//private:
fbErrorLogger* errlog;
fbDatabase* db;
fbConfig* config;
};
#endif