Browse CVS Repository
Contents of /tombo/Tombo/Src/VFManager.h
Parent Directory
| Revision Log
| Revision Graph
Revision 1.4 -
( show annotations)
( download)
( as text)
Sun Aug 10 14:26:51 2003 UTC
(20 years, 8 months ago)
by hirami
Branch: MAIN
CVS Tags: B118, B155, B110, B111, B113, B114, B115, B116, B117, Tombo_2_0a3, Tombo_2_0a2, Tombo_2_0a1, Tombo_1_8_1, Tombo_1_17_1, B153, B109, B191, B192, B193, B194, Tombo_1_9b1, B196, B197, B198, B199, B200, B201, B202, B203, B205, B206, B207, B208, SNAPSHOT_20040920, SNAPSHOT_20040925, B183, B181, B180, B187, B186, B184, B189, B188, B213, B212, B211, B217, B216, B215, B214, B219, B218, SNAPSHOT_20030824, Tombo_2_0b2, Tombo_2_0b3, Tombo_2_0b1, Tombo_1_9, Tombo_1_8, Tombo_2_0b4, Tombo_1_7, B136, B134, B135, B132, B133, B228, B229, B226, B227, B224, B225, B222, B223, B220, B221, B154, B172, B156, B157, B150, B151, B152, B173, B158, B159, B130, B171, Tombo_1_10, Tombo_1_13, SNAPSHOT20051220, Tombo_1_12, B131, B121, B120, B123, B122, B125, B124, B126, B231, B230, B147, B146, B145, B144, B143, B142, B141, B140, B149, B148, B129, B128, Tombo_1_8b1, Tombo_1_15, Tombo_1_14, Tombo_1_17, Tombo_1_16, Tombo_1_11, B177, B174, B175, B178, B179, B164, B169, B168, B165, SNAPSHOT_20041121, B166, B161, B160, B163, B162, SNAPSHOT_20040314, B138, B139, HEAD
Branch point for: Tombo_2_0alpha_branch, Tombo_1_8_1_branch, Tombo_1_17_1_branch
Changes since 1.3: +7 -1 lines
File MIME type: text/x-chdr
* Implimenting that display full path to the virtual folder notes but not finished at 1.7
* Modify help messages for addition of %F/%f.
| 1 |
#ifndef VFMANAGER_H |
| 2 |
#define VFMANAGER_H |
| 3 |
|
| 4 |
class VFDirectoryGenerator; |
| 5 |
class VFStore; |
| 6 |
class File; |
| 7 |
|
| 8 |
#define VFINFO_VIEWTYPE_DEFAULT 0 |
| 9 |
#define VFINFO_VIEWTYPE_PREV 1 |
| 10 |
#define VFINFO_VIEWTYPE_POST 2 |
| 11 |
|
| 12 |
///////////////////////////////////////////// |
| 13 |
// Virtual folder definition |
| 14 |
///////////////////////////////////////////// |
| 15 |
|
| 16 |
class VFInfo { |
| 17 |
public: |
| 18 |
VFInfo() : pName(NULL), nViewType(VFINFO_VIEWTYPE_DEFAULT){} |
| 19 |
|
| 20 |
void Release(); |
| 21 |
BOOL WriteXML(File *p); |
| 22 |
VFInfo *Clone(); |
| 23 |
|
| 24 |
LPTSTR pName; |
| 25 |
BOOL bPersist; |
| 26 |
VFDirectoryGenerator *pGenerator; |
| 27 |
VFStore *pStore; |
| 28 |
|
| 29 |
DWORD nViewType; |
| 30 |
}; |
| 31 |
|
| 32 |
///////////////////////////////////////////// |
| 33 |
// Enumerator |
| 34 |
///////////////////////////////////////////// |
| 35 |
|
| 36 |
class VirtualFolderEnumListener { |
| 37 |
public: |
| 38 |
virtual ~VirtualFolderEnumListener(); |
| 39 |
|
| 40 |
// pGen and pStore is controled under callee. you must release stream. |
| 41 |
virtual BOOL ProcessStream(LPCTSTR pName, BOOL bPersist, VFDirectoryGenerator *pGen, VFStore *pStore) = 0; |
| 42 |
}; |
| 43 |
|
| 44 |
///////////////////////////////////////////// |
| 45 |
// Virtual folder manager |
| 46 |
///////////////////////////////////////////// |
| 47 |
|
| 48 |
class VFManager { |
| 49 |
DWORD nGrepCount; |
| 50 |
TVector<VFInfo> vbInfo; |
| 51 |
protected: |
| 52 |
void ClearInfo(); |
| 53 |
|
| 54 |
public: |
| 55 |
///////////////////////////////// |
| 56 |
// ctor & dtor |
| 57 |
VFManager(); |
| 58 |
~VFManager(); |
| 59 |
BOOL Init(); |
| 60 |
|
| 61 |
///////////////////////////////// |
| 62 |
// factory methods |
| 63 |
BOOL StreamObjectsFactory(const VFInfo *pInfo, VFDirectoryGenerator **ppGen, VFStore **ppStore); |
| 64 |
const VFInfo *GetGrepVFInfo(LPCTSTR pPath, LPCTSTR pRegex, |
| 65 |
BOOL bIsCaseSensitive, BOOL bCheckCrypt, BOOL bCheckFileName, BOOL bNegate); |
| 66 |
|
| 67 |
///////////////////////////////// |
| 68 |
// enumerators |
| 69 |
BOOL Enum(VirtualFolderEnumListener *pListener); |
| 70 |
BOOL RetrieveInfo(const VFInfo *pInfo, VirtualFolderEnumListener *pListener); |
| 71 |
|
| 72 |
///////////////////////////////// |
| 73 |
// Update folders |
| 74 |
BOOL UpdateVirtualFolders(VFInfo **ppInfo, DWORD nNumFolders); |
| 75 |
|
| 76 |
///////////////////////////////// |
| 77 |
|
| 78 |
LPTSTR GetNodeName(); |
| 79 |
}; |
| 80 |
|
| 81 |
#endif |
| |