kodi
IGUIInfoProvider.h
1 /*
2  * Copyright (C) 2005-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 <string>
12 
13 class CFileItem;
14 class CGUIListItem;
15 
16 struct AudioStreamInfo;
17 struct VideoStreamInfo;
18 
19 namespace KODI
20 {
21 namespace GUILIB
22 {
23 namespace GUIINFO
24 {
25 
26 class CGUIInfo;
27 
29 {
30 public:
31  virtual ~IGUIInfoProvider() = default;
32 
38  virtual bool InitCurrentItem(CFileItem *item) = 0;
39 
49  virtual bool GetLabel(std::string &value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const = 0;
50 
61  virtual bool GetFallbackLabel(std::string& value,
62  const CFileItem* item,
63  int contextWindow,
64  const CGUIInfo& info,
65  std::string* fallback) = 0;
66 
75  virtual bool GetInt(int& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const = 0;
76 
85  virtual bool GetBool(bool& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const = 0;
86 
92  virtual void UpdateAVInfo(const AudioStreamInfo& audioInfo, const VideoStreamInfo& videoInfo, const SubtitleStreamInfo& subtitleInfo) = 0;
93 };
94 
95 } // namespace GUIINFO
96 } // namespace GUILIB
97 } // namespace KODI
virtual bool GetFallbackLabel(std::string &value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback)=0
Get a GUIInfoManager label fallback string. Will be called if none of the registered provider&#39;s GetLa...
Definition: StreamInfo.h:65
Definition: GUIListItem.h:29
virtual bool GetInt(int &value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const =0
Get a GUIInfoManager integer value.
Definition: IGUIInfoProvider.h:28
Definition: StreamInfo.h:55
virtual void UpdateAVInfo(const AudioStreamInfo &audioInfo, const VideoStreamInfo &videoInfo, const SubtitleStreamInfo &subtitleInfo)=0
Set new audio/video stream info data.
Definition: StreamInfo.h:62
Definition: AudioDecoder.h:18
virtual bool InitCurrentItem(CFileItem *item)=0
Init a new current guiinfo manager item. Gets called whenever the active guiinfo manager item changes...
virtual bool GetBool(bool &value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const =0
Get a GUIInfoManager bool value.
virtual bool GetLabel(std::string &value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const =0
Get a GUIInfoManager label string.
Definition: GUIInfo.h:23
Represents a file on a share.
Definition: FileItem.h:102