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
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 // Qt includes
22 #include <QString>
23 
25 
27 {
28  public:
29  ExternalRecChannelFetcher(int cardid, const 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  {
40  return FetchChannel("FirstChannel", channum, name, callsign, xmltvid);
41  }
42  bool NextChannel(QString & channum,
43  QString & name,
44  QString & callsign,
45  QString & xmltvid)
46  {
47  return FetchChannel("NextChannel", channum, name, callsign, xmltvid);
48  }
49 
50 
51  protected:
52  void Close(void);
53  bool FetchChannel(const QString & cmd,
54  QString & channum,
55  QString & name,
56  QString & callsign,
57  QString & xmltvid);
58 
59 
60  private:
61  int m_cardid;
62  QString m_command;
63 
65 };
bool FirstChannel(QString &channum, QString &name, QString &callsign, QString &xmltvid)
ExternalStreamHandler * m_stream_handler
bool FetchChannel(const QString &cmd, QString &channum, QString &name, QString &callsign, QString &xmltvid)
const char * name
Definition: ParseText.cpp:328
ExternalRecChannelFetcher(int cardid, const QString &cmd)
bool NextChannel(QString &channum, QString &name, QString &callsign, QString &xmltvid)