MythTV master
ExternalRecChannelFetcher.h
Go to the documentation of this file.
1/* -*- Mode: c++ -*-
2 * Class ExternalFetcher
3 *
4 * Copyright (C) John Poet 2018
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21// Qt includes
22#include <QString>
23
25
27{
28 public:
29 ExternalRecChannelFetcher(int cardid, QString cmd);
31
32 bool Valid(void) const;
33
34 int LoadChannels(void);
35 bool FirstChannel(QString & channum,
36 QString & name,
37 QString & callsign,
38 QString & xmltvid,
39 QString & icon)
40 {
41 return FetchChannel("FirstChannel", channum, name, callsign,
42 xmltvid, icon);
43 }
44 bool NextChannel(QString & channum,
45 QString & name,
46 QString & callsign,
47 QString & xmltvid,
48 QString & icon)
49 {
50 return FetchChannel("NextChannel", channum, name, callsign,
51 xmltvid, icon);
52
53 }
54
55 protected:
56 void Close(void);
57 bool FetchChannel(const QString & cmd,
58 QString & channum,
59 QString & name,
60 QString & callsign,
61 QString & xmltvid,
62 QString & icon);
63
64
65 private:
67 QString m_command;
68
70};
ExternalRecChannelFetcher(int cardid, QString cmd)
bool FirstChannel(QString &channum, QString &name, QString &callsign, QString &xmltvid, QString &icon)
bool NextChannel(QString &channum, QString &name, QString &callsign, QString &xmltvid, QString &icon)
ExternalStreamHandler * m_streamHandler
bool FetchChannel(const QString &cmd, QString &channum, QString &name, QString &callsign, QString &xmltvid, QString &icon)