Debian Codegraph @

src/channels.h

raw
1 /*
2 * Copyright (C) 2005-2021 Team Kodi (https://kodi.tv)
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSE.md for more information.
6 */
7
8 #pragma once
9
10 #include <string>
11
12 namespace TvDatabase
13 {
14 // From MediaPortal: TvDatabase.ChannelType
15 namespace ChannelType
16 {
17 const int Unknown = -1; //Added
18 const int Tv = 0;
19 const int Radio = 1;
20 const int Web = 2;
21 const int All = 3;
22 };
23 }
24
25 class cChannel
26 {
27 private:
28 std::string name;
29 int uid;
30 int external_id;
31 bool encrypted;
32 bool iswebstream;
33 bool visibleinguide;
34 std::string url;
35 int majorChannelNr;
36 int minorChannelNr;
37
38 public:
39 cChannel();
40 virtual ~cChannel();
41
42 bool Parse(const std::string& data);
43 const char *Name(void) const { return name.c_str(); }
44 int UID(void) const { return uid; }
45 int ExternalID(void) const { return external_id; }
46 bool Encrypted(void) const { return encrypted; }
47 bool IsWebstream(void) const { return iswebstream; }
48 bool VisibleInGuide(void) const { return visibleinguide; }
49 const char* URL(void) const { return url.c_str(); }
50 int MajorChannelNr(void) const { return majorChannelNr; }
51 int MinorChannelNr(void) const { return minorChannelNr; }
52 };
53