kodi
PVRTimersPath.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 <string>
12 
13 namespace PVR
14 {
16 {
17 public:
18  static const std::string PATH_ADDTIMER;
19  static const std::string PATH_NEW;
20  static const std::string PATH_TV_TIMERS;
21  static const std::string PATH_TV_TIMER_RULES;
22  static const std::string PATH_RADIO_TIMERS;
23  static const std::string PATH_RADIO_TIMER_RULES;
24 
25  explicit CPVRTimersPath(const std::string& strPath);
26  CPVRTimersPath(const std::string& strPath, int iClientId, int iParentId);
27  CPVRTimersPath(bool bRadio, bool bTimerRules);
28 
29  bool IsValid() const { return m_bValid; }
30 
31  const std::string& GetPath() const { return m_path; }
32  bool IsTimersRoot() const { return m_bRoot; }
33  bool IsTimerRule() const { return !IsTimersRoot(); }
34  bool IsRadio() const { return m_bRadio; }
35  bool IsRules() const { return m_bTimerRules; }
36  int GetClientId() const { return m_iClientId; }
37  int GetParentId() const { return m_iParentId; }
38 
39 private:
40  bool Init(const std::string& strPath);
41 
42  std::string m_path;
43  bool m_bValid = false;
44  bool m_bRoot = false;
45  bool m_bRadio = false;
46  bool m_bTimerRules = false;
47  int m_iClientId = -1;
48  int m_iParentId = 0;
49 };
50 } // namespace PVR
Definition: PVRTimersPath.h:15
Definition: ContextMenuManager.h:24