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:
66  int m_cardid;
67  QString m_command;
68 
70 };
ExternalRecChannelFetcher::m_command
QString m_command
Definition: ExternalRecChannelFetcher.h:67
ExternalRecChannelFetcher::~ExternalRecChannelFetcher
~ExternalRecChannelFetcher(void)
Definition: ExternalRecChannelFetcher.cpp:46
ExternalRecChannelFetcher::ExternalRecChannelFetcher
ExternalRecChannelFetcher(int cardid, QString cmd)
Definition: ExternalRecChannelFetcher.cpp:33
ExternalRecChannelFetcher::m_cardid
int m_cardid
Definition: ExternalRecChannelFetcher.h:66
ExternalStreamHandler
Definition: ExternalStreamHandler.h:68
ExternalRecChannelFetcher::LoadChannels
int LoadChannels(void)
Definition: ExternalRecChannelFetcher.cpp:126
ExternalRecChannelFetcher
Definition: ExternalRecChannelFetcher.h:26
ExternalRecChannelFetcher::NextChannel
bool NextChannel(QString &channum, QString &name, QString &callsign, QString &xmltvid, QString &icon)
Definition: ExternalRecChannelFetcher.h:44
ExternalRecChannelFetcher::FirstChannel
bool FirstChannel(QString &channum, QString &name, QString &callsign, QString &xmltvid, QString &icon)
Definition: ExternalRecChannelFetcher.h:35
ExternalRecChannelFetcher::Close
void Close(void)
Definition: ExternalRecChannelFetcher.cpp:51
ExternalRecChannelFetcher::Valid
bool Valid(void) const
Definition: ExternalRecChannelFetcher.cpp:57
ExternalRecChannelFetcher::FetchChannel
bool FetchChannel(const QString &cmd, QString &channum, QString &name, QString &callsign, QString &xmltvid, QString &icon)
Definition: ExternalRecChannelFetcher.cpp:74
ExternalRecChannelFetcher::m_streamHandler
ExternalStreamHandler * m_streamHandler
Definition: ExternalRecChannelFetcher.h:69