Merge pull request #3246 from bavison/faster_sorting_step2
[vuplus_xbmc] / xbmc / FileItem.h
1 /*!
2  \file FileItem.h
3  \brief
4  */
5 #pragma once
6
7 /*
8  *      Copyright (C) 2005-2013 Team XBMC
9  *      http://xbmc.org
10  *
11  *  This Program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2, or (at your option)
14  *  any later version.
15  *
16  *  This Program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with XBMC; see the file COPYING.  If not, see
23  *  <http://www.gnu.org/licenses/>.
24  *
25  */
26
27 #include "guilib/GUIListItem.h"
28 #include "utils/Archive.h"
29 #include "utils/ISerializable.h"
30 #include "utils/ISortable.h"
31 #include "XBDateTime.h"
32 #include "utils/SortUtils.h"
33 #include "utils/LabelFormatter.h"
34 #include "GUIPassword.h"
35 #include "threads/CriticalSection.h"
36
37 #include <vector>
38 #include "boost/shared_ptr.hpp"
39
40 namespace MUSIC_INFO
41 {
42   class CMusicInfoTag;
43 }
44 class CVideoInfoTag;
45 namespace EPG
46 {
47   class CEpgInfoTag;
48 }
49 namespace PVR
50 {
51   class CPVRChannel;
52   class CPVRRecording;
53   class CPVRTimerInfoTag;
54 }
55 class CPictureInfoTag;
56
57 class CAlbum;
58 class CArtist;
59 class CSong;
60 class CGenre;
61
62 class CURL;
63
64 /* special startoffset used to indicate that we wish to resume */
65 #define STARTOFFSET_RESUME (-1)
66
67 class CMediaSource;
68
69 enum EFileFolderType {
70   EFILEFOLDER_TYPE_ALWAYS     = 1<<0,
71   EFILEFOLDER_TYPE_ONCLICK    = 1<<1,
72   EFILEFOLDER_TYPE_ONBROWSE   = 1<<2,
73
74   EFILEFOLDER_MASK_ALL        = 0xff,
75   EFILEFOLDER_MASK_ONCLICK    = EFILEFOLDER_TYPE_ALWAYS
76                               | EFILEFOLDER_TYPE_ONCLICK,
77   EFILEFOLDER_MASK_ONBROWSE   = EFILEFOLDER_TYPE_ALWAYS
78                               | EFILEFOLDER_TYPE_ONCLICK
79                               | EFILEFOLDER_TYPE_ONBROWSE,
80 };
81
82 /*!
83   \brief Represents a file on a share
84   \sa CFileItemList
85   */
86 class CFileItem :
87   public CGUIListItem, public IArchivable, public ISerializable, public ISortable
88 {
89 public:
90   CFileItem(void);
91   CFileItem(const CFileItem& item);
92   CFileItem(const CGUIListItem& item);
93   CFileItem(const CStdString& strLabel);
94   CFileItem(const CStdString& strPath, bool bIsFolder);
95   CFileItem(const CSong& song);
96   CFileItem(const CStdString &path, const CAlbum& album);
97   CFileItem(const CArtist& artist);
98   CFileItem(const CGenre& genre);
99   CFileItem(const MUSIC_INFO::CMusicInfoTag& music);
100   CFileItem(const CVideoInfoTag& movie);
101   CFileItem(const EPG::CEpgInfoTag& tag);
102   CFileItem(const PVR::CPVRChannel& channel);
103   CFileItem(const PVR::CPVRRecording& record);
104   CFileItem(const PVR::CPVRTimerInfoTag& timer);
105   CFileItem(const CMediaSource& share);
106   virtual ~CFileItem(void);
107   virtual CGUIListItem *Clone() const { return new CFileItem(*this); };
108
109   const CStdString &GetPath() const { return m_strPath; };
110   void SetPath(const CStdString &path) { m_strPath = path; };
111
112   void Reset();
113   const CFileItem& operator=(const CFileItem& item);
114   virtual void Archive(CArchive& ar);
115   virtual void Serialize(CVariant& value) const;
116   virtual void ToSortable(SortItem &sortable, Field field) const;
117   void ToSortable(SortItem &sortable, const Fields &fields) const;
118   virtual bool IsFileItem() const { return true; };
119
120   bool Exists(bool bUseCache = true) const;
121   
122   /*!
123    \brief Check whether an item is a video item. Note that this returns true for
124     anything with a video info tag, so that may include eg. folders.
125    \return true if item is video, false otherwise. 
126    */
127   bool IsVideo() const;
128
129   bool IsDiscStub() const;
130
131   /*!
132    \brief Check whether an item is a picture item. Note that this returns true for
133     anything with a picture info tag, so that may include eg. folders.
134    \return true if item is picture, false otherwise. 
135    */
136   bool IsPicture() const;
137   bool IsLyrics() const;
138
139   /*!
140    \brief Check whether an item is an audio item. Note that this returns true for
141     anything with a music info tag, so that may include eg. folders.
142    \return true if item is audio, false otherwise. 
143    */
144   bool IsAudio() const;
145
146   bool IsKaraoke() const;
147   bool IsCUESheet() const;
148   bool IsInternetStream(const bool bStrictCheck = false) const;
149   bool IsPlayList() const;
150   bool IsSmartPlayList() const;
151   bool IsLibraryFolder() const;
152   bool IsPythonScript() const;
153   bool IsPlugin() const;
154   bool IsScript() const;
155   bool IsAddonsPath() const;
156   bool IsSourcesPath() const;
157   bool IsNFO() const;
158   bool IsDVDImage() const;
159   bool IsOpticalMediaFile() const;
160   bool IsDVDFile(bool bVobs = true, bool bIfos = true) const;
161   bool IsBDFile() const;
162   bool IsRAR() const;
163   bool IsAPK() const;
164   bool IsZIP() const;
165   bool IsCBZ() const;
166   bool IsCBR() const;
167   bool IsISO9660() const;
168   bool IsCDDA() const;
169   bool IsDVD() const;
170   bool IsOnDVD() const;
171   bool IsOnLAN() const;
172   bool IsHD() const;
173   bool IsNfs() const;  
174   bool IsAfp() const;    
175   bool IsRemote() const;
176   bool IsSmb() const;
177   bool IsURL() const;
178   bool IsDAAP() const;
179   bool IsStack() const;
180   bool IsMultiPath() const;
181   bool IsMusicDb() const;
182   bool IsVideoDb() const;
183   bool IsEPG() const;
184   bool IsPVRChannel() const;
185   bool IsPVRRecording() const;
186   bool IsPVRTimer() const;
187   bool IsType(const char *ext) const;
188   bool IsVirtualDirectoryRoot() const;
189   bool IsReadOnly() const;
190   bool CanQueue() const;
191   void SetCanQueue(bool bYesNo);
192   bool IsParentFolder() const;
193   bool IsFileFolder(EFileFolderType types = EFILEFOLDER_MASK_ALL) const;
194   bool IsRemovable() const;
195   bool IsTuxBox() const;
196   bool IsMythTV() const;
197   bool IsHDHomeRun() const;
198   bool IsSlingbox() const;
199   bool IsVTP() const;
200   bool IsPVR() const;
201   bool IsLiveTV() const;
202   bool IsRSS() const;
203   bool IsAndroidApp() const;
204
205   void RemoveExtension();
206   void CleanString();
207   void FillInDefaultIcon();
208   void SetFileSizeLabel();
209   virtual void SetLabel(const CStdString &strLabel);
210   CURL GetAsUrl() const;
211   int GetVideoContentType() const; /* return VIDEODB_CONTENT_TYPE, but don't want to include videodb in this header */
212   bool IsLabelPreformated() const { return m_bLabelPreformated; }
213   void SetLabelPreformated(bool bYesNo) { m_bLabelPreformated=bYesNo; }
214   bool SortsOnTop() const { return m_specialSort == SortSpecialOnTop; }
215   bool SortsOnBottom() const { return m_specialSort == SortSpecialOnBottom; }
216   void SetSpecialSort(SortSpecial sort) { m_specialSort = sort; }
217
218   inline bool HasMusicInfoTag() const
219   {
220     return m_musicInfoTag != NULL;
221   }
222
223   MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
224
225   inline const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag() const
226   {
227     return m_musicInfoTag;
228   }
229
230   inline bool HasVideoInfoTag() const
231   {
232     return m_videoInfoTag != NULL;
233   }
234
235   CVideoInfoTag* GetVideoInfoTag();
236
237   inline const CVideoInfoTag* GetVideoInfoTag() const
238   {
239     return m_videoInfoTag;
240   }
241
242   inline bool HasEPGInfoTag() const
243   {
244     return m_epgInfoTag != NULL;
245   }
246
247   EPG::CEpgInfoTag* GetEPGInfoTag();
248
249   inline const EPG::CEpgInfoTag* GetEPGInfoTag() const
250   {
251     return m_epgInfoTag;
252   }
253
254   inline bool HasPVRChannelInfoTag() const
255   {
256     return m_pvrChannelInfoTag != NULL;
257   }
258
259   PVR::CPVRChannel* GetPVRChannelInfoTag();
260
261   inline const PVR::CPVRChannel* GetPVRChannelInfoTag() const
262   {
263     return m_pvrChannelInfoTag;
264   }
265
266   inline bool HasPVRRecordingInfoTag() const
267   {
268     return m_pvrRecordingInfoTag != NULL;
269   }
270
271   PVR::CPVRRecording* GetPVRRecordingInfoTag();
272
273   inline const PVR::CPVRRecording* GetPVRRecordingInfoTag() const
274   {
275     return m_pvrRecordingInfoTag;
276   }
277
278   inline bool HasPVRTimerInfoTag() const
279   {
280     return m_pvrTimerInfoTag != NULL;
281   }
282
283   PVR::CPVRTimerInfoTag* GetPVRTimerInfoTag();
284
285   inline const PVR::CPVRTimerInfoTag* GetPVRTimerInfoTag() const
286   {
287     return m_pvrTimerInfoTag;
288   }
289
290   inline bool HasPictureInfoTag() const
291   {
292     return m_pictureInfoTag != NULL;
293   }
294
295   inline const CPictureInfoTag* GetPictureInfoTag() const
296   {
297     return m_pictureInfoTag;
298   }
299
300   CPictureInfoTag* GetPictureInfoTag();
301
302   /*!
303    \brief Get the local fanart for this item if it exists
304    \return path to the local fanart for this item, or empty if none exists
305    \sa GetFolderThumb, GetTBNFile
306    */
307   CStdString GetLocalFanart() const;
308
309   /*! \brief Assemble the filename of a particular piece of local artwork for an item.
310              No file existence check is typically performed.
311    \param artFile the art file to search for.
312    \param useFolder whether to look in the folder for the art file. Defaults to false.
313    \return the path to the local artwork.
314    \sa FindLocalArt
315    */
316   CStdString GetLocalArt(const std::string &artFile, bool useFolder = false) const;
317
318   /*! \brief Assemble the filename of a particular piece of local artwork for an item,
319              and check for file existence.
320    \param artFile the art file to search for.
321    \param useFolder whether to look in the folder for the art file. Defaults to false.
322    \return the path to the local artwork if it exists, empty otherwise.
323    \sa GetLocalArt
324    */
325   CStdString FindLocalArt(const std::string &artFile, bool useFolder) const;
326
327   // Gets the .tbn file associated with this item
328   CStdString GetTBNFile() const;
329   // Gets the folder image associated with this item (defaults to folder.jpg)
330   CStdString GetFolderThumb(const CStdString &folderJPG = "folder.jpg") const;
331   // Gets the correct movie title
332   CStdString GetMovieName(bool bUseFolderNames = false) const;
333
334   /*! \brief Find the base movie path (i.e. the item the user expects us to use to lookup the movie)
335    For folder items, with "use foldernames for lookups" it returns the folder.
336    Regardless of settings, for VIDEO_TS/BDMV it returns the parent of the VIDEO_TS/BDMV folder (if present)
337
338    \param useFolderNames whether we're using foldernames for lookups
339    \return the base movie folder
340    */
341   CStdString GetBaseMoviePath(bool useFolderNames) const;
342
343   // Gets the user thumb, if it exists
344   CStdString GetUserMusicThumb(bool alwaysCheckRemote = false, bool fallbackToFolder = false) const;
345
346   /*! \brief Get the path where we expect local metadata to reside.
347    For a folder, this is just the existing path (eg tvshow folder)
348    For a file, this is the parent path, with exceptions made for VIDEO_TS and BDMV files
349
350    Three cases are handled:
351
352      /foo/bar/movie_name/file_name          -> /foo/bar/movie_name/
353      /foo/bar/movie_name/VIDEO_TS/file_name -> /foo/bar/movie_name/
354      /foo/bar/movie_name/BDMV/file_name     -> /foo/bar/movie_name/
355
356      \sa URIUtils::GetParentPath
357    */
358   CStdString GetLocalMetadataPath() const;
359
360   // finds a matching local trailer file
361   CStdString FindTrailer() const;
362
363   virtual bool LoadMusicTag();
364
365   /* Returns the content type of this item if known */
366   const CStdString& GetMimeType() const { return m_mimetype; }
367
368   /* sets the mime-type if known beforehand */
369   void SetMimeType(const CStdString& mimetype) { m_mimetype = mimetype; } ;
370
371   /*! \brief Resolve the MIME type based on file extension or a web lookup
372    If m_mimetype is already set (non-empty), this function has no effect. For
373    http:// and shout:// streams, this will query the stream (blocking operation).
374    Set lookup=false to skip any internet lookups and always return immediately.
375    */
376   void FillInMimeType(bool lookup = true);
377
378   /* general extra info about the contents of the item, not for display */
379   void SetExtraInfo(const CStdString& info) { m_extrainfo = info; };
380   const CStdString& GetExtraInfo() const { return m_extrainfo; };
381
382   /*! \brief Update an item with information from another item
383    We take metadata information from the given item and supplement the current item
384    with that info.  If tags exist in the new item we use the entire tag information.
385    Properties are appended, and labels, thumbnail and icon are updated if non-empty
386    in the given item.
387    \param item the item used to supplement information
388    \param replaceLabels whether to replace labels (defaults to true)
389    */
390   void UpdateInfo(const CFileItem &item, bool replaceLabels = true);
391
392   bool IsSamePath(const CFileItem *item) const;
393
394   bool IsAlbum() const;
395
396   /*! \brief Sets details using the information from the CVideoInfoTag object
397    Sets the videoinfotag and uses its information to set the label and path.
398    \param video video details to use and set
399    */
400   void SetFromVideoInfoTag(const CVideoInfoTag &video);
401   /*! \brief Sets details using the information from the CAlbum object
402    Sets the album in the music info tag and uses its information to set the
403    label and album-specific properties.
404    \param album album details to use and set
405    */
406   void SetFromAlbum(const CAlbum &album);
407   /*! \brief Sets details using the information from the CSong object
408    Sets the song in the music info tag and uses its information to set the
409    label, path, song-specific properties and artwork.
410    \param song song details to use and set
411    */
412   void SetFromSong(const CSong &song);
413
414   bool m_bIsShareOrDrive;    ///< is this a root share/drive
415   int m_iDriveType;     ///< If \e m_bIsShareOrDrive is \e true, use to get the share type. Types see: CMediaSource::m_iDriveType
416   CDateTime m_dateTime;             ///< file creation date & time
417   int64_t m_dwSize;             ///< file size (0 for folders)
418   CStdString m_strDVDLabel;
419   CStdString m_strTitle;
420   int m_iprogramCount;
421   int m_idepth;
422   int m_lStartOffset;
423   int m_lStartPartNumber;
424   int m_lEndOffset;
425   LockType m_iLockMode;
426   CStdString m_strLockCode;
427   int m_iHasLock; // 0 - no lock 1 - lock, but unlocked 2 - locked
428   int m_iBadPwdCount;
429
430 private:
431   CStdString m_strPath;            ///< complete path to item
432
433   SortSpecial m_specialSort;
434   bool m_bIsParentFolder;
435   bool m_bCanQueue;
436   bool m_bLabelPreformated;
437   CStdString m_mimetype;
438   CStdString m_extrainfo;
439   MUSIC_INFO::CMusicInfoTag* m_musicInfoTag;
440   CVideoInfoTag* m_videoInfoTag;
441   EPG::CEpgInfoTag* m_epgInfoTag;
442   PVR::CPVRChannel* m_pvrChannelInfoTag;
443   PVR::CPVRRecording* m_pvrRecordingInfoTag;
444   PVR::CPVRTimerInfoTag * m_pvrTimerInfoTag;
445   CPictureInfoTag* m_pictureInfoTag;
446   bool m_bIsAlbum;
447 };
448
449 /*!
450   \brief A shared pointer to CFileItem
451   \sa CFileItem
452   */
453 typedef boost::shared_ptr<CFileItem> CFileItemPtr;
454
455 /*!
456   \brief A vector of pointer to CFileItem
457   \sa CFileItem
458   */
459 typedef std::vector< CFileItemPtr > VECFILEITEMS;
460
461 /*!
462   \brief Iterator for VECFILEITEMS
463   \sa CFileItemList
464   */
465 typedef std::vector< CFileItemPtr >::iterator IVECFILEITEMS;
466
467 /*!
468   \brief A map of pointers to CFileItem
469   \sa CFileItem
470   */
471 typedef std::map<CStdString, CFileItemPtr > MAPFILEITEMS;
472
473 /*!
474   \brief Iterator for MAPFILEITEMS
475   \sa MAPFILEITEMS
476   */
477 typedef std::map<CStdString, CFileItemPtr >::iterator IMAPFILEITEMS;
478
479 /*!
480   \brief Pair for MAPFILEITEMS
481   \sa MAPFILEITEMS
482   */
483 typedef std::pair<CStdString, CFileItemPtr > MAPFILEITEMSPAIR;
484
485 typedef bool (*FILEITEMLISTCOMPARISONFUNC) (const CFileItemPtr &pItem1, const CFileItemPtr &pItem2);
486 typedef void (*FILEITEMFILLFUNC) (CFileItemPtr &item);
487
488 /*!
489   \brief Represents a list of files
490   \sa CFileItemList, CFileItem
491   */
492 class CFileItemList : public CFileItem
493 {
494 public:
495   enum CACHE_TYPE { CACHE_NEVER = 0, CACHE_IF_SLOW, CACHE_ALWAYS };
496
497   CFileItemList();
498   CFileItemList(const CStdString& strPath);
499   virtual ~CFileItemList();
500   virtual void Archive(CArchive& ar);
501   CFileItemPtr operator[] (int iItem);
502   const CFileItemPtr operator[] (int iItem) const;
503   CFileItemPtr operator[] (const CStdString& strPath);
504   const CFileItemPtr operator[] (const CStdString& strPath) const;
505   void Clear();
506   void ClearItems();
507   void Add(const CFileItemPtr &pItem);
508   void AddFront(const CFileItemPtr &pItem, int itemPosition);
509   void Remove(CFileItem* pItem);
510   void Remove(int iItem);
511   CFileItemPtr Get(int iItem);
512   const CFileItemPtr Get(int iItem) const;
513   const VECFILEITEMS GetList() const { return m_items; }
514   CFileItemPtr Get(const CStdString& strPath);
515   const CFileItemPtr Get(const CStdString& strPath) const;
516   int Size() const;
517   bool IsEmpty() const;
518   void Append(const CFileItemList& itemlist);
519   void Assign(const CFileItemList& itemlist, bool append = false);
520   bool Copy  (const CFileItemList& item, bool copyItems = true);
521   void Reserve(int iCount);
522   void Sort(SortBy sortBy, SortOrder sortOrder, SortAttribute sortAttributes = SortAttributeNone);
523   /* \brief Sorts the items based on the given sorting options
524
525   In contrast to Sort (see above) this does not change the internal
526   state by storing the sorting method and order used and therefore
527   will always execute the sorting even if the list of items has
528   already been sorted with the same options before.
529   */
530   void Sort(SortDescription sortDescription);
531   void Randomize();
532   void FillInDefaultIcons();
533   int GetFolderCount() const;
534   int GetFileCount() const;
535   int GetSelectedCount() const;
536   int GetObjectCount() const;
537   void FilterCueItems();
538   void RemoveExtensions();
539   void SetFastLookup(bool fastLookup);
540   bool Contains(const CStdString& fileName) const;
541   bool GetFastLookup() const { return m_fastLookup; };
542
543   /*! \brief stack a CFileItemList
544    By default we stack all items (files and folders) in a CFileItemList
545    \param stackFiles whether to stack all items or just collapse folders (defaults to true)
546    \sa StackFiles,StackFolders
547    */
548   void Stack(bool stackFiles = true);
549
550   SortOrder GetSortOrder() const { return m_sortDescription.sortOrder; }
551   SortBy GetSortMethod() const { return m_sortDescription.sortBy; }
552   /*! \brief load a CFileItemList out of the cache
553
554    The file list may be cached based on which window we're viewing in, as different
555    windows will be listing different portions of the same URL (eg viewing music files
556    versus viewing video files)
557    
558    \param windowID id of the window that's loading this list (defaults to 0)
559    \return true if we loaded from the cache, false otherwise.
560    \sa Save,RemoveDiscCache
561    */
562   bool Load(int windowID = 0);
563
564   /*! \brief save a CFileItemList to the cache
565    
566    The file list may be cached based on which window we're viewing in, as different
567    windows will be listing different portions of the same URL (eg viewing music files
568    versus viewing video files)
569    
570    \param windowID id of the window that's saving this list (defaults to 0)
571    \return true if successful, false otherwise.
572    \sa Load,RemoveDiscCache
573    */
574   bool Save(int windowID = 0);
575   void SetCacheToDisc(CACHE_TYPE cacheToDisc) { m_cacheToDisc = cacheToDisc; }
576   bool CacheToDiscAlways() const { return m_cacheToDisc == CACHE_ALWAYS; }
577   bool CacheToDiscIfSlow() const { return m_cacheToDisc == CACHE_IF_SLOW; }
578   /*! \brief remove a previously cached CFileItemList from the cache
579    
580    The file list may be cached based on which window we're viewing in, as different
581    windows will be listing different portions of the same URL (eg viewing music files
582    versus viewing video files)
583    
584    \param windowID id of the window whose cache we which to remove (defaults to 0)
585    \sa Save,Load
586    */
587   void RemoveDiscCache(int windowID = 0) const;
588   bool AlwaysCache() const;
589
590   void Swap(unsigned int item1, unsigned int item2);
591
592   /*! \brief Update an item in the item list
593    \param item the new item, which we match based on path to an existing item in the list
594    \return true if the item exists in the list (and was thus updated), false otherwise.
595    */
596   bool UpdateItem(const CFileItem *item);
597
598   void AddSortMethod(SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes = SortAttributeNone);
599   void AddSortMethod(SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks);
600   void AddSortMethod(SortDescription sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks);
601   bool HasSortDetails() const { return m_sortDetails.size() != 0; };
602   const std::vector<SORT_METHOD_DETAILS> &GetSortDetails() const { return m_sortDetails; };
603
604   /*! \brief Specify whether this list should be sorted with folders separate from files
605    By default we sort with folders listed (and sorted separately) except for those sort modes
606    which should be explicitly sorted with folders interleaved with files (eg SORT_METHOD_FILES).
607    With this set the folder state will be ignored, allowing folders and files to sort interleaved.
608    \param sort whether to ignore the folder state.
609    */
610   void SetSortIgnoreFolders(bool sort) { m_sortIgnoreFolders = sort; };
611   bool GetReplaceListing() const { return m_replaceListing; };
612   void SetReplaceListing(bool replace);
613   void SetContent(const CStdString &content) { m_content = content; };
614   const CStdString &GetContent() const { return m_content; };
615
616   void ClearSortState();
617 private:
618   void Sort(FILEITEMLISTCOMPARISONFUNC func);
619   void FillSortFields(FILEITEMFILLFUNC func);
620   CStdString GetDiscFileCache(int windowID) const;
621
622   /*!
623    \brief stack files in a CFileItemList
624    \sa Stack
625    */
626   void StackFiles();
627
628   /*!
629    \brief stack folders in a CFileItemList
630    \sa Stack
631    */
632   void StackFolders();
633
634   VECFILEITEMS m_items;
635   MAPFILEITEMS m_map;
636   bool m_fastLookup;
637   SortDescription m_sortDescription;
638   bool m_sortIgnoreFolders;
639   CACHE_TYPE m_cacheToDisc;
640   bool m_replaceListing;
641   CStdString m_content;
642
643   std::vector<SORT_METHOD_DETAILS> m_sortDetails;
644
645   CCriticalSection m_lock;
646 };