Merge pull request #5095 from koying/fixdroidappcrash
[vuplus_xbmc] / xbmc / filesystem / DAAPDirectory.h
1 #pragma once
2 /*
3  * DAAP Support for XBMC
4  *      Copyright (c) 2004 Forza (Chris Barnett)
5  *      Portions Copyright (c) by the authors of libOpenDAAP
6  *      Copyright (C) 2005-2013 Team XBMC
7  *      http://xbmc.org
8  *
9  *  This Program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2, or (at your option)
12  *  any later version.
13  *
14  *  This Program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with XBMC; see the file COPYING.  If not, see
21  *  <http://www.gnu.org/licenses/>.
22  *
23  */
24
25 #include "IDirectory.h"
26
27 extern "C"
28 {
29 #include "lib/libXDAAP/client.h"
30 #include "lib/libXDAAP/private.h"
31 }
32
33 namespace XFILE
34 {
35 class CDAAPDirectory :
36
37       public IDirectory
38 {
39 public:
40   CDAAPDirectory(void);
41   virtual ~CDAAPDirectory(void);
42   virtual bool IsAllowed(const CStdString &strFile) const { return true; };
43   virtual bool GetDirectory(const CStdString& strPath, CFileItemList &items);
44   //virtual void CloseDAAP(void);
45   int GetCurrLevel(CStdString strPath);
46
47 private:
48   void free_albums(albumPTR *alb);
49   void free_artists();
50   void AddToArtistAlbum(char *artist_s, char *album_s);
51
52   DAAP_ClientHost_DatabaseItem *m_currentSongItems;
53   int m_currentSongItemCount;
54
55   DAAP_SClientHost *m_thisHost;
56   int m_currLevel;
57
58   artistPTR *m_artisthead;
59   CStdString m_selectedPlaylist;
60   CStdString m_selectedArtist;
61   CStdString m_selectedAlbum;
62 };
63 }