MythTV  master
mythtv/programs/mythtv-setup/main.cpp
Go to the documentation of this file.
1 #include <unistd.h>
2 #include <fcntl.h>
3 
4 #include <iostream>
5 #include <memory>
6 
7 #include <QString>
8 #include <QDir>
9 #include <QMap>
10 #include <QApplication>
11 #include <QFileInfo>
12 
13 #include "mythconfig.h"
14 #include "mythcontext.h"
15 #include "mythdbcon.h"
16 #include "dbutil.h"
17 #include "loggingserver.h"
18 #include "mythlogging.h"
19 #include "mythversion.h"
20 #include "langsettings.h"
21 #include "mythtranslation.h"
22 #include "exitcodes.h"
23 #include "exitprompt.h"
24 #include "storagegroupeditor.h"
25 #include "myththemedmenu.h"
26 #include "mythuihelper.h"
27 #include "mythdirs.h"
28 #include "channelscanner_cli.h"
29 #include "scanwizardconfig.h"
30 #include "scaninfo.h"
31 #include "channelimporter.h"
32 #include "cardutil.h"
33 #include "dbcheck.h"
34 #include "videosource.h"
35 #include "channeleditor.h"
36 #include "remoteutil.h"
37 #include "backendsettings.h"
38 #include "checksetup.h"
39 #include "startprompt.h"
40 #include "mythsystemevent.h"
41 #include "expertsettingseditor.h"
42 #include "commandlineparser.h"
43 #include "profilegroup.h"
44 #include "signalhandling.h"
45 #include "mythmiscutil.h"
46 #include "ssdp.h"
47 #if CONFIG_DARWIN
48 #include "mythuidefines.h"
49 #endif
50 #include "cleanupguard.h"
51 
52 using namespace std;
53 
56 
58 static QString logfile;
59 
60 static void cleanup()
61 {
63 
64  delete gContext;
65  gContext = nullptr;
66 
67  delete qApp;
68 
70 }
71 
72 static void SetupMenuCallback(void* /* data */, QString& selection)
73 {
74  QString sel = selection.toLower();
75 
76  if (sel == "general")
77  {
80  new StandardSettingDialog(mainStack, "generalsettings",
81  new BackendSettings());
82 
83  if (ssd->Create())
84  mainStack->AddScreen(ssd);
85  else
86  delete ssd;
87  }
88  else if (sel == "capture cards")
89  {
92  new StandardSettingDialog(mainStack, "capturecardeditor",
93  new CaptureCardEditor());
94 
95  if (ssd->Create())
96  mainStack->AddScreen(ssd);
97  else
98  delete ssd;
99  }
100  else if (sel == "video sources")
101  {
103  StandardSettingDialog *ssd =
104  new StandardSettingDialog(mainStack, "videosourceeditor",
105  new VideoSourceEditor());
106  if (ssd->Create())
107  mainStack->AddScreen(ssd);
108  else
109  delete ssd;
110  }
111  else if (sel == "card inputs")
112  {
114  StandardSettingDialog *ssd =
115  new StandardSettingDialog(mainStack, "cardinputeditor",
116  new CardInputEditor());
117 
118  if (ssd->Create())
119  mainStack->AddScreen(ssd);
120  else
121  delete ssd;
122  }
123  else if (sel == "recording profile")
124  {
126  StandardSettingDialog *ssd =
127  new StandardSettingDialog(mainStack, "recordingprofileeditor",
128  new ProfileGroupEditor());
129 
130  if (ssd->Create())
131  mainStack->AddScreen(ssd);
132  else
133  delete ssd;
134  }
135  else if (sel == "channel editor")
136  {
138 
139  ChannelEditor *chanedit = new ChannelEditor(mainStack);
140 
141  if (chanedit->Create())
142  mainStack->AddScreen(chanedit);
143  else
144  delete chanedit;
145  }
146  else if (sel == "storage groups")
147  {
149  StandardSettingDialog *ssd =
150  new StandardSettingDialog(mainStack, "storagegroupeditor",
151  new StorageGroupListEditor());
152 
153  if (ssd->Create())
154  mainStack->AddScreen(ssd);
155  else
156  delete ssd;
157  }
158  else if (sel == "systemeventeditor")
159  {
161 
163  mainStack, "System Event Editor");
164 
165  if (msee->Create())
166  mainStack->AddScreen(msee);
167  else
168  delete msee;
169  }
170  else if (sel.startsWith("exiting_app") || (sel == "standby_mode"))
171  {
172  if (!exitPrompt)
173  exitPrompt = new ExitPrompter();
175  }
176  else
177  LOG(VB_GENERAL, LOG_ERR, "Unknown menu action: " + selection);
178 }
179 
180 static bool RunMenu(const QString& themedir, const QString& themename)
181 {
182  QByteArray tmp = themedir.toLocal8Bit();
183  menu = new MythThemedMenu(
184  QString(tmp.constData()), "setup.xml",
185  GetMythMainWindow()->GetMainStack(), "mainmenu", false);
186 
187  if (menu->foundTheme())
188  {
191  return true;
192  }
193 
194  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't use theme '%1'").arg(themename));
195  delete menu;
196  menu = nullptr;
197 
198  return false;
199 }
200 
201 // If the theme specified in the DB is somehow broken, try a standard one:
202 //
203 static bool resetTheme(QString themedir, const QString &badtheme)
204 {
205  QString themename = DEFAULT_UI_THEME;
206 
207  if (badtheme == DEFAULT_UI_THEME)
208  themename = FALLBACK_UI_THEME;
209 
210  LOG(VB_GENERAL, LOG_ERR,
211  QString("Overriding broken theme '%1' with '%2'")
212  .arg(badtheme).arg(themename));
213 
214  gCoreContext->OverrideSettingForSession("Theme", themename);
215  themedir = GetMythUI()->FindThemeDir(themename);
216 
218  GetMythUI()->LoadQtConfig();
219 #if CONFIG_DARWIN
221 #else
222  GetMythMainWindow()->Init();
223 #endif
225 
226  return RunMenu(themedir, themename);
227 }
228 
229 static int reloadTheme(void)
230 {
231  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
232  QString themedir = GetMythUI()->FindThemeDir(themename);
233  if (themedir.isEmpty())
234  {
235  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
236  .arg(themename));
237  return GENERIC_EXIT_NO_THEME;
238  }
239 
241 
243 
244  GetMythUI()->LoadQtConfig();
245 
246  if (menu)
247  {
248  menu->Close();
249  }
250 #if CONFIG_DARWIN
252 #else
253  GetMythMainWindow()->Init();
254 #endif
255 
257 
259 
260  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
261  return GENERIC_EXIT_NO_THEME;
262 
263  return 0;
264 }
265 
266 int main(int argc, char *argv[])
267 {
268  QString geometry;
269  QString display;
270  bool doScan = false;
271  bool doScanList = false;
272  bool doScanSaveOnly = false;
273  bool scanInteractive = true;
274  bool expertMode = false;
275  uint scanImport = 0;
276  bool scanFTAOnly = false;
277  bool scanLCNOnly = false;
278  bool scanCompleteOnly = false;
279  bool scanFullChannelSearch = false;
280  bool addFullTS = false;
281  ServiceRequirements scanServiceRequirements = kRequireAV;
282  uint scanCardId = 0;
283  QString frequencyStandard = "atsc";
284  QString modulation = "vsb8";
285  QString region = "us";
286  QString scanInputName = "";
287 
288 #if CONFIG_OMX_RPI
289  setenv("QT_XCB_GL_INTEGRATION","none",0);
290 #endif
291 
293  if (!cmdline.Parse(argc, argv))
294  {
295  cmdline.PrintHelp();
297  }
298 
299  if (cmdline.toBool("showhelp"))
300  {
301  cmdline.PrintHelp();
302  return GENERIC_EXIT_OK;
303  }
304 
305  if (cmdline.toBool("showversion"))
306  {
308  return GENERIC_EXIT_OK;
309  }
310 
311  bool quiet = false, use_display = true;
312  if (cmdline.toBool("scan"))
313  {
314  quiet = true;
315  use_display = false;
316  }
317 
318  CleanupGuard callCleanup(cleanup);
319 
320  if (use_display)
321  {
322 
323 #ifdef Q_OS_MAC
324  // Without this, we can't set focus to any of the CheckBoxSetting, and most
325  // of the MythPushButton widgets, and they don't use the themed background.
326  QApplication::setDesktopSettingsAware(false);
327 #endif
328  new QApplication(argc, argv);
329  }
330  else {
331  new QCoreApplication(argc, argv);
332  }
333  QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHTV_SETUP);
334 
335 #ifndef _WIN32
336  QList<int> signallist;
337  signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT << SIGBUS << SIGFPE
338  << SIGILL;
339 #if ! CONFIG_DARWIN
340  signallist << SIGRTMIN;
341 #endif
342  SignalHandler::Init(signallist);
343  SignalHandler::SetHandler(SIGHUP, logSigHup);
344 #endif
345 
346  if (cmdline.toBool("display"))
347  display = cmdline.toString("display");
348  if (cmdline.toBool("geometry"))
349  geometry = cmdline.toString("geometry");
350 
351  QString mask("general");
352  int retval = cmdline.ConfigureLogging(mask, quiet);
353  if (retval != GENERIC_EXIT_OK)
354  return retval;
355 
356  if (cmdline.toBool("expert"))
357  expertMode = true;
358  if (cmdline.toBool("scanlist"))
359  doScanList = true;
360  if (cmdline.toBool("savescan"))
361  doScanSaveOnly = true;
362  if (cmdline.toBool("scannoninteractive"))
363  scanInteractive = false;
364 
365  if (cmdline.toBool("importscan"))
366  scanImport = cmdline.toUInt("importscan");
367  if (cmdline.toBool("ftaonly"))
368  scanFTAOnly = true;
369  if (cmdline.toBool("lcnonly"))
370  scanLCNOnly = true;
371  if (cmdline.toBool("completeonly"))
372  scanCompleteOnly = true;
373  if (cmdline.toBool("fullsearch"))
374  scanFullChannelSearch = true;
375  if (cmdline.toBool("addfullts"))
376  addFullTS = true;
377  if (cmdline.toBool("servicetype"))
378  {
379  scanServiceRequirements = kRequireNothing;
380  if (cmdline.toString("servicetype").contains("radio"))
381  scanServiceRequirements = kRequireAudio;
382  if (cmdline.toString("servicetype").contains("tv"))
383  scanServiceRequirements = kRequireAV;
384  if (cmdline.toString("servicetype").contains("tv+radio") ||
385  cmdline.toString("servicetype").contains("radio+tv"))
386  scanServiceRequirements = kRequireAudio;
387  if (cmdline.toString("servicetype").contains("all"))
388  scanServiceRequirements = kRequireNothing;
389  }
390 
391  if (!cmdline.toBool("noupnp"))
392  {
393  // start looking for any uPnP devices we can use like VBoxes
394  SSDP::Instance()->PerformSearch("ssdp:all");
395  }
396  if (cmdline.toBool("scan"))
397  {
398  scanCardId = cmdline.toUInt("scan");
399  doScan = true;
400  }
401  if (cmdline.toBool("freqstd"))
402  frequencyStandard = cmdline.toString("freqstd").toLower();
403  if (cmdline.toBool("modulation"))
404  modulation = cmdline.toString("modulation").toLower();
405  if (cmdline.toBool("region"))
406  region = cmdline.toString("region").toLower();
407  if (cmdline.toBool("inputname"))
408  scanInputName = cmdline.toString("inputname");
409 
410  if (!display.isEmpty())
411  {
413  }
414 
415  if (!geometry.isEmpty())
416  {
418  }
419 
421 
423  if (!gContext->Init(use_display,false,true)) // No Upnp, Prompt for db
424  {
425  LOG(VB_GENERAL, LOG_ERR, "Failed to init MythContext, exiting.");
427  }
428 
430 
431  if (!GetMythDB()->HaveSchema())
432  {
433  if (!InitializeMythSchema())
434  return GENERIC_EXIT_DB_ERROR;
435  }
436 
437  setHttpProxy();
438 
439  if (use_display)
440  {
441  GetMythUI()->LoadQtConfig();
442 
443  QString fileprefix = GetConfDir();
444 
445  QDir dir(fileprefix);
446  if (!dir.exists())
447  dir.mkdir(fileprefix);
448  }
449 
450  if (doScan)
451  {
452  bool okCardID = scanCardId != 0U;
453 
454  if (scanInputName.isEmpty())
455  scanInputName = CardUtil::GetInputName(scanCardId);
456 
457  bool okInputName = (scanInputName == CardUtil::GetInputName(scanCardId)
458  && scanInputName != "None");
459 
460  doScan = (okCardID && okInputName);
461 
462  if (!okCardID)
463  {
464  cerr << "You must enter a valid cardid to scan." << endl;
465  vector<uint> cardids = CardUtil::GetInputIDs();
466  if (cardids.empty())
467  {
468  cerr << "But no cards have been defined on this host"
469  << endl;
471  }
472  cerr << "Valid cards: " << endl;
473  for (size_t i = 0; i < cardids.size(); i++)
474  {
475  fprintf(stderr, "%5u: %s %s\n",
476  cardids[i],
477  CardUtil::GetRawInputType(cardids[i])
478  .toLatin1().constData(),
479  CardUtil::GetVideoDevice(cardids[i])
480  .toLatin1().constData());
481  }
483  }
484 
485  if (!okInputName)
486  {
487  cerr << "You must enter a valid input to scan this card."
488  << endl;
489  cerr << "Valid input: "
490  << CardUtil::GetInputName(scanCardId).toLatin1().constData()
491  << endl;
493  }
494  }
495 
496  if (doScan)
497  {
498  int ret = 0;
499  uint inputid = scanCardId;
500  uint sourceid = CardUtil::GetSourceID(inputid);
501  QMap<QString,QString> startChan;
502  {
503  ChannelScannerCLI scanner(doScanSaveOnly, scanInteractive);
504 
505  int scantype = ScanTypeSetting::FullScan_ATSC;
506  if (frequencyStandard == "atsc")
508  else if (frequencyStandard == "dvbt")
510  else if (frequencyStandard == "mpeg")
512  else if (frequencyStandard == "iptv")
513  {
515  scanner.ImportM3U(scanCardId, scanInputName, sourceid, true);
516  }
517  else if (frequencyStandard == "extern")
519  else
521 
522  scanner.Scan(scantype,
523  /* cardid */ scanCardId,
524  /* inputname */ scanInputName,
525  /* sourceid */ sourceid,
526  /* ignore signal timeout */ false,
527  /* follow_nit */ true,
528  /* test decryption */ true,
529  scanFTAOnly,
530  scanLCNOnly,
531  scanCompleteOnly,
532  scanFullChannelSearch,
533  addFullTS,
534  scanServiceRequirements,
535  // stuff needed for particular scans
536  /* mplexid */ 0,
537  startChan, frequencyStandard, modulation, region);
538  ret = qApp->exec();
539  }
540  return (ret) ? GENERIC_EXIT_NOT_OK : GENERIC_EXIT_OK;
541  }
542 
543  if (doScanList)
544  {
545  vector<ScanInfo> scans = LoadScanList();
546 
547  cout<<" scanid cardid sourceid processed date"<<endl;
548  for (size_t i = 0; i < scans.size(); i++)
549  {
550  printf("%5i %6i %8i %8s %20s\n",
551  scans[i].m_scanid, scans[i].m_cardid,
552  scans[i].m_sourceid, (scans[i].m_processed) ? "yes" : "no",
553  scans[i].m_scandate.toString(Qt::ISODate)
554  .toLatin1().constData());
555  }
556  cout<<endl;
557 
558  return GENERIC_EXIT_OK;
559  }
560 
561  if (scanImport)
562  {
563  cout<<"*** SCAN IMPORT START ***"<<endl;
564  {
565  ScanDTVTransportList list = LoadScan(scanImport);
566  ChannelImporter ci(false, true, true, true, false,
567  scanFTAOnly, scanLCNOnly, scanCompleteOnly,
568  scanFullChannelSearch, scanServiceRequirements);
569  ci.Process(list);
570  }
571  cout<<"*** SCAN IMPORT END ***"<<endl;
572  return GENERIC_EXIT_OK;
573  }
574 
575  MythTranslation::load("mythfrontend");
576 
577  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
578  QString themedir = GetMythUI()->FindThemeDir(themename);
579  if (themedir.isEmpty())
580  {
581  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
582  .arg(themename));
583  return GENERIC_EXIT_NO_THEME;
584  }
585 
586  MythMainWindow *mainWindow = GetMythMainWindow();
587 #if CONFIG_DARWIN
588  mainWindow->Init(QT_PAINTER);
589 #else
590  mainWindow->Init();
591 #endif
592  mainWindow->setWindowTitle(QObject::tr("MythTV Setup"));
593 
594  // We must reload the translation after a language change and this
595  // also means clearing the cached/loaded theme strings, so reload the
596  // theme which also triggers a translation reload
598  {
599  if (!reloadTheme())
600  return GENERIC_EXIT_NO_THEME;
601  }
602 
604  {
605  LOG(VB_GENERAL, LOG_ERR,
606  "MySQL time zone support is missing. "
607  "Please install it and try again. "
608  "See 'mysql_tzinfo_to_sql' for assistance.");
610  }
611 
612  if (!UpgradeTVDatabaseSchema(true))
613  {
614  LOG(VB_GENERAL, LOG_ERR, "Couldn't upgrade database to new schema.");
616  }
617 
618  // Refresh Global/Main Menu keys after DB update in case there was no DB
619  // when they were written originally
620  mainWindow->ReloadKeys();
621 
622  if (!startPrompt)
623  startPrompt = new StartPrompter();
625 
626  // Let the user select buttons, type values, scan for channels, etc.
627  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
628  return GENERIC_EXIT_NO_THEME;
629 
630  ExpertSettingsEditor *expertEditor = nullptr;
631  if (expertMode)
632  {
634  expertEditor =
635  new ExpertSettingsEditor(mainStack, "Expert Settings Editor");
636  if (expertEditor->Create())
637  mainStack->AddScreen(expertEditor);
638  else
639  {
640  delete expertEditor;
641  expertEditor = nullptr;
642  LOG(VB_GENERAL, LOG_ERR,
643  "Unable to create expert settings editor window");
644  return GENERIC_EXIT_OK;
645  }
646  }
647 
648  qApp->exec();
649 }
650 
651 /* vim: set expandtab tabstop=4 shiftwidth=4: */
vector< ScanInfo > LoadScanList(void)
Definition: scaninfo.cpp:251
#define GENERIC_EXIT_DB_ERROR
Database error.
Definition: exitcodes.h:17
Startup context for MythTV.
Definition: mythcontext.h:42
QString FindThemeDir(const QString &themename, bool doFallback=true)
Returns the full path to the theme denoted by themename.
bool UpgradeTVDatabaseSchema(const bool upgradeAllowed, const bool upgradeIfNoUI, const bool informSystemd)
Called from outside dbcheck.cpp to update the schema.
stderr
Definition: ttvdb.py:1426
static QString GetInputName(uint inputid)
Definition: cardutil.cpp:1676
static QString themedir
Definition: mythdirs.cpp:21
void LoadQtConfig(void)
void handleStart()
Definition: startprompt.cpp:35
#define GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:10
void setHttpProxy(void)
Get network proxy settings from OS, and use for [Q]Http[Comms].
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
bool Create(void) override
Creates the UI screen.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:141
static void Init(QList< int > &signallist, QObject *parent=nullptr)
static bool resetTheme(QString themedir, const QString &badtheme)
void DestroyMythMainWindow(void)
void setCallback(void(*lcallback)(void *, QString &), void *data)
Set the themed menus callback function and data for that function.
#define DEFAULT_UI_THEME
Definition: mythuihelper.h:12
unsigned int uint
Definition: compat.h:140
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythScreenStack * GetMainStack()
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
MythContext * gContext
This global variable contains the MythContext instance for the application.
Definition: mythcontext.cpp:63
static MythThemedMenu * menu
static void SetupMenuCallback(void *, QString &selection)
int main(int argc, char *argv[])
static guint32 * tmp
Definition: goom_core.c:35
void Init(const QString &forcedpainter=QString(), bool mayReInit=true)
#define MYTH_APPNAME_MYTHTV_SETUP
static void SetX11Display(const QString &display)
This needs to be set before MythUIHelper is initialized so that the MythUIHelper::Init() can detect X...
QString GetConfDir(void)
Definition: mythdirs.cpp:224
virtual void Close()
void ApplySettingsOverride(void)
Apply all overrides to the global context.
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
void PerformSearch(const QString &sST, uint timeout_secs=2)
Definition: ssdp.cpp:206
#define GENERIC_EXIT_DB_NOTIMEZONE
Missing DB time zone support.
Definition: exitcodes.h:36
bool Create(void) override
Definition: osd.cpp:46
void OverrideSettingForSession(const QString &key, const QString &value)
QString GetSetting(const QString &key, const QString &defaultval="")
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
static void ParseGeometryOverride(const QString &geometry)
Parse an X11 style command line geometry string.
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
static void Done(void)
static vector< uint > GetInputIDs(const QString &videodevice=QString(), const QString &rawtype=QString(), const QString &inputname=QString(), QString hostname=QString())
Returns all inputids of inputs that uses the specified videodevice if specified, and optionally rawty...
Definition: cardutil.cpp:1243
static void SetHandler(int signum, SigHandlerFunc handler)
MythCommFlagCommandLineParser cmdline
static bool prompt(bool force=false)
Ask the user for the language to use.
StartPrompter * startPrompt
MythUIHelper * GetMythUI()
static void reload()
Reload all active translators based on the current language setting.
MythMainWindow * GetMythMainWindow(void)
void Scan(int scantype, uint cardid, const QString &inputname, uint sourceid, bool do_ignore_signal_timeout, bool do_follow_nit, bool do_test_decryption, bool do_fta_only, bool do_lcn_only, bool do_complete_only, bool do_full_search, bool do_add_full_ts, ServiceRequirements service_requirements, uint mplexid, const QMap< QString, QString > &startChan, const QString &freq_std, const QString &mod, const QString &tbl, const QString &tbl_start=QString(), const QString &tbl_end=QString())
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:273
#define FALLBACK_UI_THEME
Definition: mythuihelper.h:13
static int reloadTheme(void)
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: mythlogging.h:41
Themed menu class, used for main menus in MythTV frontend.
bool Create(void) override
static SSDP * Instance()
Definition: ssdp.cpp:54
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
#define SIGHUP
Definition: compat.h:213
void SetEffectsEnabled(bool enable)
ServiceRequirements
#define MYTH_BINARY_VERSION
Update this whenever the plug-in ABI changes.
Definition: mythversion.h:16
bool foundTheme(void)
Returns true iff a theme has been found by a previous call to SetMenuTheme().
An editor for MythSystemEvent handler commands.
ExitPrompter * exitPrompt
ScanDTVTransportList LoadScan(uint scanid)
Definition: scaninfo.cpp:72
#define QT_PAINTER
Definition: mythuidefines.h:2
static uint GetSourceID(uint inputid)
Definition: cardutil.cpp:1724
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:271
#define setenv(x, y, z)
Definition: compat.h:156
bool Init(const bool gui=true, const bool promptForBackend=false, const bool disableAutoDiscovery=false, const bool ignoreDB=false)
#define GENERIC_EXIT_NO_THEME
No Theme available.
Definition: exitcodes.h:14
MythDB * GetMythDB(void)
Definition: mythdb.cpp:46
#define GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
Definition: exitcodes.h:13
static QString logfile
#define GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
Definition: exitcodes.h:15
Scans the transport when there is no tuner (for ASI)
#define GENERIC_EXIT_NOT_OK
Exited with error.
Definition: exitcodes.h:11
uint toUInt(const QString &key) const
Returns stored QVariant as an unsigned integer, falling to default if not provided.
void ReinitDone(void)
void ReloadKeys(void)
static void cleanup()
Default UTC.
Definition: mythdate.h:14
static bool RunMenu(const QString &themedir, const QString &themename)
bool InitializeMythSchema(void)
command to get the the initial database layout from an empty database:
int ConfigureLogging(const QString &mask="general", unsigned int progress=0)
Read in logging options and initialize the logging interface.
static bool CheckTimeZoneSupport(void)
Check if MySQL has working timz zone support.
Definition: dbutil.cpp:868
#define GENERIC_EXIT_DB_OUTOFDATE
Database needs upgrade.
Definition: exitcodes.h:16
void Process(const ScanDTVTransportList &, int sourceid=-1)