source: box/trunk/bin/bbackupd/BackupClientInodeToIDMap.h @ 2794

Revision 2794, 1.4 KB checked in by chris, 19 months ago (diff)

Revert [2710] and [2717], remove TDB and replace with QDBM again, to fix
build on Windows and make it easier to merge Charles' work.

  • Property svn:eol-style set to native
Line 
1// --------------------------------------------------------------------------
2//
3// File
4//              Name:    BackupClientInodeToIDMap.h
5//              Purpose: Map of inode numbers to file IDs on the store
6//              Created: 11/11/03
7//
8// --------------------------------------------------------------------------
9
10#ifndef BACKUPCLIENTINODETOIDMAP_H
11#define BACKUPCLIENTINODETOIDMAP_H
12
13#include <sys/types.h>
14
15#include <map>
16#include <utility>
17
18// avoid having to include the DB files when not necessary
19#ifndef BACKIPCLIENTINODETOIDMAP_IMPLEMENTATION
20        class DEPOT;
21#endif
22
23// --------------------------------------------------------------------------
24//
25// Class
26//              Name:    BackupClientInodeToIDMap
27//              Purpose: Map of inode numbers to file IDs on the store
28//              Created: 11/11/03
29//
30// --------------------------------------------------------------------------
31class BackupClientInodeToIDMap
32{
33public:
34        BackupClientInodeToIDMap();
35        ~BackupClientInodeToIDMap();
36private:
37        BackupClientInodeToIDMap(const BackupClientInodeToIDMap &rToCopy);      // not allowed
38public:
39
40        void Open(const char *Filename, bool ReadOnly, bool CreateNew);
41        void OpenEmpty();
42
43        void AddToMap(InodeRefType InodeRef, int64_t ObjectID, int64_t InDirectory);
44        bool Lookup(InodeRefType InodeRef, int64_t &rObjectIDOut, int64_t &rInDirectoryOut) const;
45
46        void Close();
47
48private:
49        bool mReadOnly;
50        bool mEmpty;
51        std::string mFilename;
52        DEPOT *mpDepot;
53};
54
55#endif // BACKUPCLIENTINODETOIDMAP_H
56
57
Note: See TracBrowser for help on using the repository browser.