kodi
MusicGUIInfo.h
1 /*
2  * Copyright (C) 2012-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "guilib/guiinfo/GUIInfoProvider.h"
12 
13 namespace KODI
14 {
15 namespace GUILIB
16 {
17 namespace GUIINFO
18 {
19 
20 class CGUIInfo;
21 
23 {
24 public:
25  CMusicGUIInfo() = default;
26  ~CMusicGUIInfo() override = default;
27 
28  // KODI::GUILIB::GUIINFO::IGUIInfoProvider implementation
29  bool InitCurrentItem(CFileItem *item) override;
30  bool GetLabel(std::string& value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const override;
31  bool GetFallbackLabel(std::string& value,
32  const CFileItem* item,
33  int contextWindow,
34  const CGUIInfo& info,
35  std::string* fallback) override;
36  bool GetInt(int& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override;
37  bool GetBool(bool& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override;
38 
39 private:
40  bool GetPartyModeLabel(std::string& value, const CGUIInfo &info) const;
41  bool GetPlaylistInfo(std::string& value, const CGUIInfo &info) const;
42 };
43 
44 } // namespace GUIINFO
45 } // namespace GUILIB
46 } // namespace KODI
Definition: GUIListItem.h:29
bool GetLabel(std::string &value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const override
Get a GUIInfoManager label string.
Definition: MusicGUIInfo.cpp:77
bool InitCurrentItem(CFileItem *item) override
Init a new current guiinfo manager item. Gets called whenever the active guiinfo manager item changes...
Definition: MusicGUIInfo.cpp:37
Definition: GUIInfoProvider.h:23
Definition: MusicGUIInfo.h:22
bool GetFallbackLabel(std::string &value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) override
Get a GUIInfoManager label fallback string. Will be called if none of the registered provider's GetLa...
Definition: MusicGUIInfo.cpp:592
Definition: AudioDecoder.h:18
bool GetBool(bool &value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override
Get a GUIInfoManager bool value.
Definition: MusicGUIInfo.cpp:629
bool GetInt(int &value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override
Get a GUIInfoManager integer value.
Definition: MusicGUIInfo.cpp:624
Definition: GUIInfo.h:23
Represents a file on a share.
Definition: FileItem.h:102