| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "guilib/guiinfo/GUIInfoProvider.h" |
| 12 |
|
| 13 |
#include <string> |
| 14 |
#include <utility> |
| 15 |
#include <vector> |
| 16 |
|
| 17 |
namespace KODI |
| 18 |
{ |
| 19 |
namespace GUILIB |
| 20 |
{ |
| 21 |
namespace GUIINFO |
| 22 |
{ |
| 23 |
|
| 24 |
class CGUIInfo; |
| 25 |
|
| 26 |
class CLibraryGUIInfo : public CGUIInfoProvider |
| 27 |
{ |
| 28 |
public: |
| 29 |
CLibraryGUIInfo(); |
| 30 |
~CLibraryGUIInfo() override = default; |
| 31 |
|
| 32 |
|
| 33 |
bool InitCurrentItem(CFileItem *item) override; |
| 34 |
bool GetLabel(std::string& value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const override; |
| 35 |
bool GetInt(int& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override; |
| 36 |
bool GetBool(bool& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override; |
| 37 |
|
| 38 |
bool GetLibraryBool(int condition) const; |
| 39 |
void SetLibraryBool(int condition, bool value); |
| 40 |
void ResetLibraryBools(); |
| 41 |
|
| 42 |
private: |
| 43 |
mutable int m_libraryHasMusic; |
| 44 |
mutable int m_libraryHasMovies; |
| 45 |
mutable int m_libraryHasTVShows; |
| 46 |
mutable int m_libraryHasMusicVideos; |
| 47 |
mutable int m_libraryHasMovieSets; |
| 48 |
mutable int m_libraryHasSingles; |
| 49 |
mutable int m_libraryHasCompilations; |
| 50 |
mutable int m_libraryHasBoxsets; |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
mutable std::vector<std::pair<std::string, int>> m_libraryRoleCounts; |
| 55 |
}; |
| 56 |
|
| 57 |
} |
| 58 |
} |
| 59 |
} |