LinuxRendererGLES.h: correct path to `DVDVideoCodec.h`
[vuplus_xbmc] / xbmc / filesystem / VideoDatabaseDirectory / DirectoryNode.h
1 #pragma once
2 /*
3  *      Copyright (C) 2005-2008 Team XBMC
4  *      http://www.xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, write to
18  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19  *  http://www.gnu.org/copyleft/gpl.html
20  *
21  */
22
23
24 #include "utils/StdString.h"
25
26 class CFileItemList;
27
28 namespace XFILE
29 {
30   namespace VIDEODATABASEDIRECTORY
31   {
32     class CQueryParams;
33
34     typedef enum _NODE_TYPE
35     {
36       NODE_TYPE_NONE=0,
37       NODE_TYPE_MOVIES_OVERVIEW,
38       NODE_TYPE_TVSHOWS_OVERVIEW,
39       NODE_TYPE_GENRE,
40       NODE_TYPE_ACTOR,
41       NODE_TYPE_ROOT,
42       NODE_TYPE_OVERVIEW,
43       NODE_TYPE_TITLE_MOVIES,
44       NODE_TYPE_YEAR,
45       NODE_TYPE_DIRECTOR,
46       NODE_TYPE_TITLE_TVSHOWS,
47       NODE_TYPE_SEASONS,
48       NODE_TYPE_EPISODES,
49       NODE_TYPE_RECENTLY_ADDED_MOVIES,
50       NODE_TYPE_RECENTLY_ADDED_EPISODES,
51       NODE_TYPE_STUDIO,
52       NODE_TYPE_MUSICVIDEOS_OVERVIEW,
53       NODE_TYPE_RECENTLY_ADDED_MUSICVIDEOS,
54       NODE_TYPE_TITLE_MUSICVIDEOS,
55       NODE_TYPE_MUSICVIDEOS_ALBUM,
56       NODE_TYPE_SETS,
57       NODE_TYPE_COUNTRY
58     } NODE_TYPE;
59
60     class CDirectoryNode
61     {
62     public:
63       static CDirectoryNode* ParseURL(const CStdString& strPath);
64       static void GetDatabaseInfo(const CStdString& strPath, CQueryParams& params);
65       virtual ~CDirectoryNode();
66
67       NODE_TYPE GetType();
68
69       bool GetChilds(CFileItemList& items);
70       virtual NODE_TYPE GetChildType();
71
72       CDirectoryNode* GetParent();
73
74       bool CanCache();
75     protected:
76       CDirectoryNode(NODE_TYPE Type, const CStdString& strName, CDirectoryNode* pParent);
77       static CDirectoryNode* CreateNode(NODE_TYPE Type, const CStdString& strName, CDirectoryNode* pParent);
78
79       void CollectQueryParams(CQueryParams& params);
80
81       const CStdString& GetName();
82       void RemoveParent();
83
84       virtual bool GetContent(CFileItemList& items);
85
86       CStdString BuildPath();
87
88     private:
89       void AddQueuingFolder(CFileItemList& items);
90
91     private:
92       NODE_TYPE m_Type;
93       CStdString m_strName;
94       CDirectoryNode* m_pParent;
95     };
96   }
97 }
98
99
100