Develop and Download Open Source Software

Browse CVS Repository

Contents of /tombo/Tombo/Src/MemoFolder.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Fri Nov 12 23:23:15 2004 UTC (19 years, 5 months ago) by hirami
Branch: MAIN
CVS Tags: Tombo_2_0a3, Tombo_2_0a2, Tombo_2_0a1, Tombo_1_17_1, B191, B192, B193, B194, B196, B197, B198, B199, B200, B201, B202, B203, B205, B206, B207, B208, B183, B181, B180, B187, B186, B184, B189, B188, B213, B212, B211, B217, B216, B215, B214, B219, B218, Tombo_2_0b2, Tombo_2_0b3, Tombo_2_0b1, Tombo_2_0b4, B228, B229, B226, B227, B224, B225, B222, B223, B220, B221, B172, B173, B171, Tombo_1_13, SNAPSHOT20051220, B231, B230, Tombo_1_15, Tombo_1_14, Tombo_1_17, Tombo_1_16, B177, B174, B175, B178, B179, B169, B168, SNAPSHOT_20041121, HEAD
Branch point for: Tombo_1_17_1_branch
Changes since 1.3: +19 -2 lines
File MIME type: text/x-chdr
* FIX: bookmark is not work
* FIX: Copy of *.chs file is not work

1 #ifndef MEMOFOLDER_H
2 #define MEMOFOLDER_H
3
4 class PasswordManager;
5 class TString;
6
7 /////////////////////////////////////////
8 // Folder operation classes
9 /////////////////////////////////////////
10 //
11 // Thease classes should be used by only LocalRepository.
12 // If you want to use thease features, request to it.
13
14
15 class MemoFolder {
16 LPCTSTR pTopDir;
17 LPTSTR pFullPath;
18 TString sErrorReason;
19 public:
20
21 ///////////////////////////////////////////////
22 // ctor & dtor
23 MemoFolder();
24 ~MemoFolder();
25 BOOL Init(LPCTSTR pTopDir, LPCTSTR pPath);
26
27 BOOL Copy(LPCTSTR pDst);
28 BOOL Move(LPCTSTR pDst);
29 BOOL Rename(LPCTSTR pNewName);
30
31 LPCTSTR GetErrorReason() { return sErrorReason.Get(); }
32 };
33
34 /////////////////////////////////////////
35 // Encrypt/decrypt folder
36 /////////////////////////////////////////
37
38 class DSEncrypt: public DirectoryScanner {
39 DWORD nBaseLen;
40 PasswordManager *pPassMgr;
41 BOOL bEncrypt;
42
43 TString *pURI;
44 DWORD nURIBufSize;
45 DWORD nCurrentPos;
46
47 protected:
48 BOOL CheckURIBuffer(LPCTSTR p);
49
50 public:
51 DWORD nNotEncrypted;
52
53 ~DSEncrypt();
54 // If bEncrypt is FALSE, decrypt files.
55 BOOL Init(LPCTSTR pTopDir, LPCTSTR pPath, LPCTSTR pBaseURI, BOOL bEncrypt);
56
57 void InitialScan() {}
58 void AfterScan() {}
59 void PreDirectory(LPCTSTR);
60 void PostDirectory(LPCTSTR);
61 void File(LPCTSTR);
62 };
63
64 ///////////////////////////////////////////////
65 // Delete directory
66 ///////////////////////////////////////////////
67
68 class DSFileDelete: public DirectoryScanner {
69 public:
70 TCHAR aFailPath[MAX_PATH * 2];
71 TCHAR aErrorMsg[1024];
72
73 DSFileDelete();
74
75 BOOL Init(LPCTSTR pPath);
76 void InitialScan();
77 void AfterScan();
78 void PreDirectory(LPCTSTR);
79 void PostDirectory(LPCTSTR);
80 void File(LPCTSTR);
81 };
82
83 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26