-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfbDatabase.h
More file actions
59 lines (45 loc) · 1.34 KB
/
fbDatabase.h
File metadata and controls
59 lines (45 loc) · 1.34 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
/* $Id: fbDatabase.h,v 1.11 2008/04/18 04:50:54 laffer1 Exp $ */
#ifndef fbDATABASE_H
#define fbDATABASE_H
#include "global.h"
#include "fbErrorLogger.h"
#include "fbLock.h"
#include "fbSQL.h"
#include "fbDate.h"
#include "fbTime.h"
#include "fbRepeatType.h"
/**
* fbDatabase
* main database access object
* @author Byron Heads
* @date MARCH 16, 2008
*/
class fbDatabase
{
public:
fbDatabase(fbErrorLogger* log, string path);
fbDatabase(fbErrorLogger* log, const char* path);
~fbDatabase();
string & getBackupList(); /// Get a list of pending and current backups.
/// Backup SQL
bool addBackupJob(string& desc, fbDate& date, fbTime& time, string& path, Repeat_type rt = ONCE, int rv = 0);
bool queryBackups();
bool getBackupRow(string& desc, fbDate& date, fbTime& time, string& path,
Repeat_type* rt, int* rv, int* id);
/// Restore SQL
bool addRestoreJob(string& tarfile, string& dest);
bool getRestoreRow(string& tarfile, string& path, int* id);
bool queryRestore();
///Repo SQL
bool addRepo(string& desc, fbDate& date, fbTime& time, string& path, string& tarfile);
bool getRepoRow(string& desc, fbDate& date, fbTime& time, string& path, string& tarfile, int* id);
bool queryRepo();
/// Generic SQL
bool deleteRow(const char* table, int id);
private:
fbErrorLogger* errlog;
fbCriticalSection cs;
fbSQL db;
int row;
};
#endif