kodi
PVRItem.h
1 /*
2  * Copyright (C) 2016-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 <memory>
12 
13 class CFileItem;
14 
15 namespace PVR
16 {
17 class CPVRChannel;
18 class CPVREpgInfoTag;
19 class CPVRRecording;
20 class CPVRTimerInfoTag;
21 
22 class CPVRItem
23 {
24 public:
25  explicit CPVRItem(const std::shared_ptr<CFileItem>& item) : m_item(item.get()) {}
26  explicit CPVRItem(const CFileItem* item) : m_item(item) {}
27  explicit CPVRItem(const CFileItem& item) : m_item(&item) {}
28 
29  std::shared_ptr<CPVREpgInfoTag> GetEpgInfoTag() const;
30  std::shared_ptr<CPVREpgInfoTag> GetNextEpgInfoTag() const;
31  std::shared_ptr<CPVRChannel> GetChannel() const;
32  std::shared_ptr<CPVRTimerInfoTag> GetTimerInfoTag() const;
33  std::shared_ptr<CPVRRecording> GetRecording() const;
34 
35  bool IsRadio() const;
36 
37 private:
38  const CFileItem* m_item;
39 };
40 
41 } // namespace PVR
Definition: ContextMenuManager.h:24
Definition: PVRItem.h:22
Represents a file on a share.
Definition: FileItem.h:102