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