MythTV master
channelscanner_cli.h
Go to the documentation of this file.
1/* -*- Mode: c++ -*-
2 * vim: set expandtab tabstop=4 shiftwidth=4:
3 *
4 * Original Project
5 * MythTV http://www.mythtv.org
6 *
7 * Copyright (c) 2004, 2005 John Pullan <john@pullan.org>
8 * Copyright (c) 2005 - 2007 Daniel Kristjansson
9 *
10 * Description:
11 * Collection of classes to provide channel scanning functionallity
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27 *
28 */
29
30#ifndef CHANNEL_SCANNER_CLI_H
31#define CHANNEL_SCANNER_CLI_H
32
33// Qt headers
34#include <QString>
35
36// MythTV headers
37#include "libmythtv/mythtvexp.h"
38#include "channelscanner.h"
39
41{
42 public:
43 ChannelScannerCLI(bool doScanSaveOnly, bool promptsOk)
44 : m_onlysavescan(doScanSaveOnly), m_interactive(promptsOk) {}
45 ~ChannelScannerCLI() override = default;
46
47 void HandleEvent(const ScannerEvent *scanEvent) override; // ChannelScanner
48
49 bool IsDone(void) const { return m_done; }
50
51 protected:
52 void InformUser(const QString &error) override; // ChannelScanner
53 virtual void Process(const ScanDTVTransportList &_transports);
54 void MonitorProgress(bool lock, bool strength,
55 bool snr, bool rotor) override; // ChannelScanner
56 private:
57 bool m_done {false};
60 bool m_statusLock {false};
61 uint m_statusComplete {0};
62 float m_statusSnr {0.0};
63 QString m_statusText;
65};
66
67#endif // CHANNEL_SCANNER_CLI_H
bool IsDone(void) const
~ChannelScannerCLI() override=default
ChannelScannerCLI(bool doScanSaveOnly, bool promptsOk)
virtual void HandleEvent(const ScannerEvent *)=0
virtual void MonitorProgress(bool, bool, bool, bool)
virtual void InformUser(const QString &)=0
std::vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:143
unsigned int uint
Definition: freesurround.h:24
#define MTV_PUBLIC
Definition: mythtvexp.h:15
def error(message)
Definition: smolt.py:409