3 * Copyright (C) 2005-2008 Team XBMC
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)
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.
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
24 #include "utils/StdString.h"
30 namespace MUSICDATABASEDIRECTORY
34 typedef enum _NODE_TYPE
43 NODE_TYPE_ALBUM_RECENTLY_ADDED,
44 NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS,
45 NODE_TYPE_ALBUM_RECENTLY_PLAYED,
46 NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS,
47 NODE_TYPE_ALBUM_TOP100,
48 NODE_TYPE_ALBUM_TOP100_SONGS,
49 NODE_TYPE_ALBUM_COMPILATIONS,
50 NODE_TYPE_ALBUM_COMPILATIONS_SONGS,
52 NODE_TYPE_SONG_TOP100,
68 static CDirectoryNode* ParseURL(const CStdString& strPath);
69 static void GetDatabaseInfo(const CStdString& strPath, CQueryParams& params);
70 virtual ~CDirectoryNode();
72 NODE_TYPE GetType() const;
74 bool GetChilds(CFileItemList& items);
75 virtual NODE_TYPE GetChildType() const;
76 virtual CStdString GetLocalizedName() const;
78 CDirectoryNode* GetParent() const;
79 bool CanCache() const;
82 CDirectoryNode(NODE_TYPE Type, const CStdString& strName, CDirectoryNode* pParent);
83 static CDirectoryNode* CreateNode(NODE_TYPE Type, const CStdString& strName, CDirectoryNode* pParent);
85 void CollectQueryParams(CQueryParams& params) const;
87 const CStdString& GetName() const;
91 virtual bool GetContent(CFileItemList& items) const;
93 CStdString BuildPath() const;
96 void AddQueuingFolder(CFileItemList& items) const;
100 CStdString m_strName;
101 CDirectoryNode* m_pParent;