Debian Codegraph @

src/Cards.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 <vector>
11 #include <string>
12 #include "DateTime.h"
13
14
15 /**
16 * MediaPortal TVServer card settings ("card" table in the database)
17 */
18 typedef struct Card
19 {
20 int IdCard;
21 std::string DevicePath;
22 std::string Name;
23 int Priority;
24 bool GrabEPG;
25 MPTV::CDateTime LastEpgGrab;
26 std::string RecordingFolder;
27 std::string RecordingFolderUNC;
28 int IdServer;
29 bool Enabled;
30 int CamType;
31 std::string TimeshiftFolder;
32 std::string TimeshiftFolderUNC;
33 int RecordingFormat;
34 int DecryptLimit;
35 bool Preload;
36 bool CAM;
37 int NetProvider;
38 bool StopGraph;
39 } Card;
40
41 class CCards: public std::vector<Card>
42 {
43 public:
44
45 /**
46 * \brief Parse the multi-line string response from the TVServerKodi plugin command "GetCardSettings"
47 * The data is stored in "struct Card" item.
48 *
49 * \param lines Vector with response lines
50 * \return True on success, False on failure
51 */
52 bool ParseLines(std::vector<std::string>& lines);
53
54 /**
55 * \brief Return the data for the card with the given id
56 * \param id The card id
57 * \param card Return value: card data or NULL if not found.
58 * \return True on success, False on failure
59 */
60 bool GetCard(int id, Card& card);
61 };