blob: 5940cf502c6537769aa1b6d8f4821983d5af3d4b (
plain)
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
|
// --------------------------------------------------------------------------
//
// File
// Name: BackupClientDeleteList.h
// Purpose: List of pending deletes for backup
// Created: 10/11/03
//
// --------------------------------------------------------------------------
#ifndef BACKUPCLIENTDELETELIST__H
#define BACKUPCLIENTDELETELIST__H
#include "BackupStoreFilename.h"
class BackupClientContext;
#include <vector>
#include <utility>
#include <set>
// --------------------------------------------------------------------------
//
// Class
// Name: BackupClientDeleteList
// Purpose: List of pending deletes for backup
// Created: 10/11/03
//
// --------------------------------------------------------------------------
class BackupClientDeleteList
{
public:
BackupClientDeleteList();
~BackupClientDeleteList();
void AddDirectoryDelete(int64_t ObjectID);
void AddFileDelete(int64_t DirectoryID, const BackupStoreFilename &rFilename);
void StopDirectoryDeletion(int64_t ObjectID);
void StopFileDeletion(int64_t DirectoryID, const BackupStoreFilename &rFilename);
void PerformDeletions(BackupClientContext &rContext);
private:
std::vector<int64_t> mDirectoryList;
std::set<int64_t> mDirectoryNoDeleteList; // note: things only get in this list if they're not present in mDirectoryList when they are 'added'
std::vector<std::pair<int64_t, BackupStoreFilename> > mFileList;
std::vector<std::pair<int64_t, BackupStoreFilename> > mFileNoDeleteList;
};
#endif // BACKUPCLIENTDELETELIST__H
|