Debian Codegraph @

xbmc/guilib/guiinfo/VideoGUIInfo.h

raw symbols SCIP
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 #include <memory>
14
15 class CApplicationPlayer;
16 class CVideoInfoTag;
17
18 namespace KODI
19 {
20 namespace GUILIB
21 {
22 namespace GUIINFO
23 {
24
25 class CGUIInfo;
26
27 class CVideoGUIInfo : public CGUIInfoProvider
28 {
29 public:
30 CVideoGUIInfo();
31 ~CVideoGUIInfo() override = default;
32
33 // KODI::GUILIB::GUIINFO::IGUIInfoProvider implementation
34 bool InitCurrentItem(CFileItem *item) override;
35 bool GetLabel(std::string& value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const override;
36 bool GetFallbackLabel(std::string& value,
37 const CFileItem* item,
38 int contextWindow,
39 const CGUIInfo& info,
40 std::string* fallback) override;
41 bool GetInt(int& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override;
42 bool GetBool(bool& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override;
43
44 private:
45 int GetPercentPlayed(const CVideoInfoTag* tag) const;
46 bool GetPlaylistInfo(std::string& value, const CGUIInfo& info) const;
47
48 const std::shared_ptr<CApplicationPlayer> m_appPlayer;
49 };
50
51 } // namespace GUIINFO
52 } // namespace GUILIB
53 } // namespace KODI