CFileSystemChangeStorage.h
Go to the documentation of this file.
1 #ifndef ihotf_CFileSystemChangeStorage_included
2 #define ihotf_CFileSystemChangeStorage_included
3 
4 
5 // Qt includes
6 #include <QtCore/QVector>
7 #include <QtCore/QMutex>
8 
9 // ACF includes
10 #include "istd/TSmartPtr.h"
11 
12 // AcfSln includes
14 
15 
16 namespace ihotf
17 {
18 
19 
25 {
26 public:
27  // reimplemented (ihotf::IFileSystemChangeStorage)
28  virtual int GetStorageItemsCount() const;
29  virtual QString GetItemPath(int fileIndex) const;
30  virtual int GetItemState(int fileIndex) const;
31  virtual void UpdateStorageItem(const QString& path, int itemFlags);
32  virtual void ResetStorage();
33 
34 private:
35  int GetFileIndexFromPath(const QString& filePath) const;
36 
37 private:
38  struct FileItem
39  {
40  QString path;
41  int state;
42  };
43 
44  typedef QVector<FileItem> FileItems;
45  FileItems m_storageItems;
46 
47  mutable QMutex m_mutex;
48 };
49 
50 
51 } // namespace ihotf
52 
53 
54 #endif // !ihotf_CFileSystemChangeStorage_included
55 
virtual int GetItemState(int fileIndex) const
Get item state with the given index from the storage.
virtual void ResetStorage()
Reset the storage.
Implementation of the file storage.
virtual int GetStorageItemsCount() const
Get number of items in the storage.
Common interface for a storage of files.
virtual QString GetItemPath(int fileIndex) const
Get item path with the given index from the storage.
virtual void UpdateStorageItem(const QString &path, int itemFlags)
Update storage item.

© 2007-2011 Witold Gantzke and Kirill Lepskiy