MythTV  master
Macros | Functions | Variables
mythtv/programs/mythfrontend/main.cpp File Reference
#include <cerrno>
#include <csignal>
#include <cstdlib>
#include <fcntl.h>
#include <iostream>
#include <memory>
#include <QFile>
#include <QFileInfo>
#include <QMap>
#include <QKeyEvent>
#include <QEvent>
#include <QDir>
#include <QTextCodec>
#include <QApplication>
#include <QTimer>
#include <QProcessEnvironment>
#include "previewgeneratorqueue.h"
#include "referencecounter.h"
#include "mythmiscutil.h"
#include "mythconfig.h"
#include "mythcdrom.h"
#include "mythsystemlegacy.h"
#include "tv.h"
#include "proglist.h"
#include "prevreclist.h"
#include "progfind.h"
#include "scheduleeditor.h"
#include "manualschedule.h"
#include "playbackbox.h"
#include "themechooser.h"
#include "setupwizard_general.h"
#include "customedit.h"
#include "viewscheduled.h"
#include "programrecpriority.h"
#include "channelrecpriority.h"
#include "custompriority.h"
#include "audiooutput.h"
#include "globalsettings.h"
#include "audiogeneralsettings.h"
#include "grabbersettings.h"
#include "playgroup.h"
#include "networkcontrol.h"
#include "scheduledrecording.h"
#include "mythsystemevent.h"
#include "hardwareprofile.h"
#include "signalhandling.h"
#include "loggingserver.h"
#include "compat.h"
#include "exitcodes.h"
#include "exitprompt.h"
#include "programinfo.h"
#include "mythcontext.h"
#include "mythdbcon.h"
#include "guidegrid.h"
#include "mythplugin.h"
#include "remoteutil.h"
#include "dbcheck.h"
#include "mythmediamonitor.h"
#include "statusbox.h"
#include "idlescreen.h"
#include "lcddevice.h"
#include "langsettings.h"
#include "mythtranslation.h"
#include "commandlineparser.h"
#include "tvremoteutil.h"
#include "channelutil.h"
#include "myththemedmenu.h"
#include "mediarenderer.h"
#include "mythmainwindow.h"
#include "mythcontrols.h"
#include "mythuihelper.h"
#include "mythdirs.h"
#include "mythdb.h"
#include "backendconnectionmanager.h"
#include "mythversion.h"
#include "taskqueue.h"
#include "cleanupguard.h"
#include "standardsettings.h"
#include "settingshelper.h"
#include "cleanup.h"
#include "globals.h"
#include "videodlg.h"
#include "videoglobalsettings.h"
#include "videofileassoc.h"
#include "videoplayersettings.h"
#include "videometadatasettings.h"
#include "videolist.h"
#include "gallerythumbview.h"
#include "DVD/mythdvdbuffer.h"
#include "Bluray/mythbdinfo.h"
#include "Bluray/mythbdbuffer.h"
#include "main.moc"
Include dependency graph for mythtv/programs/mythfrontend/main.cpp:

Go to the source code of this file.

Macros

#define fe_sd_notify(x)
 

Functions

static void handleExit (bool prompt)
 
static void resetAllKeys (void)
 Reset this host's key bindings and jump points to default values. More...
 
void handleSIGUSR1 (void)
 
void handleSIGUSR2 (void)
 
static void startAppearWiz (void)
 
static void startKeysSetup ()
 
static void startGuide (void)
 
static void startFinder (void)
 
static void startSearchTitle (void)
 
static void startSearchKeyword (void)
 
static void startSearchPeople (void)
 
static void startSearchPower (void)
 
static void startSearchStored (void)
 
static void startSearchChannel (void)
 
static void startSearchCategory (void)
 
static void startSearchMovie (void)
 
static void startSearchNew (void)
 
static void startSearchTime (void)
 
static void startManaged (void)
 
static void startManageRecordingRules (void)
 
static void startChannelRecPriorities (void)
 
static void startCustomPriority (void)
 
static void startPlaybackWithGroup (const QString &recGroup="")
 
static void startPlayback (void)
 
static void startPrevious (void)
 
static void startPreviousOld (void)
 
static void startCustomEdit (void)
 
static void startManualSchedule (void)
 
static bool isLiveTVAvailable (void)
 
static void startTVNormal (void)
 
static void showStatus (void)
 
static void standbyScreen (void)
 
static void RunVideoScreen (VideoDialog::DialogType type, bool fromJump=false)
 
static void jumpScreenVideoManager ()
 
static void jumpScreenVideoBrowser ()
 
static void jumpScreenVideoTree ()
 
static void jumpScreenVideoGallery ()
 
static void jumpScreenVideoDefault ()
 
static void RunGallery ()
 
static void playDisc ()
 
static void handleDVDMedia (MythMediaDevice *dvd)
 
static void handleGalleryMedia (MythMediaDevice *dev)
 
static void TVMenuCallback (void *data, QString &selection)
 
static bool RunMenu (const QString &themedir, const QString &themename)
 
static void WriteDefaults ()
 
static int internal_play_media (const QString &mrl, const QString &plot, const QString &title, const QString &subtitle, const QString &director, int season, int episode, const QString &inetref, int lenMins, const QString &year, const QString &id, const bool useBookmark)
 
static void gotoMainMenu (void)
 
static bool resetTheme (QString themedir, const QString &badtheme)
 
static int reloadTheme (void)
 
static void reloadTheme_void (void)
 
static void setDebugShowBorders (void)
 
static void setDebugShowNames (void)
 
static void InitJumpPoints (void)
 
static void ReloadJumpPoints (void)
 
static void InitKeys (void)
 
static void ReloadKeys (void)
 
static void SetFuncPtrs (void)
 
static void clearAllKeys (void)
 Deletes all key bindings and jump points for this host. More...
 
static int internal_media_init ()
 
static void CleanupMyOldInUsePrograms (void)
 
static bool WasAutomaticStart (void)
 
static int revokeRoot (void)
 
int main (int argc, char **argv)
 

Variables

static ExitPrompterg_exitPopup = nullptr
 
static MythThemedMenug_menu
 
static MediaRendererg_pUPnp = nullptr
 
static MythPluginManagerg_pmanager = nullptr
 
static SettingsHelperg_settingsHelper = nullptr
 
static const QString sLocation
 

Macro Definition Documentation

◆ fe_sd_notify

#define fe_sd_notify (   x)

Definition at line 126 of file mythtv/programs/mythfrontend/main.cpp.

Function Documentation

◆ handleExit()

static void handleExit ( bool  prompt)
static

Definition at line 1204 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ resetAllKeys()

static void resetAllKeys ( void  )
static

Reset this host's key bindings and jump points to default values.

Definition at line 1684 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ handleSIGUSR1()

void handleSIGUSR1 ( void  )

Definition at line 2205 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ handleSIGUSR2()

void handleSIGUSR2 ( void  )

Definition at line 2214 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ startAppearWiz()

static void startAppearWiz ( void  )
static

Definition at line 321 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startKeysSetup()

static void startKeysSetup ( )
static

Definition at line 370 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startGuide()

static void startGuide ( void  )
static

Definition at line 382 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ startFinder()

static void startFinder ( void  )
static

Definition at line 390 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ startSearchTitle()

static void startSearchTitle ( void  )
static

Definition at line 395 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchKeyword()

static void startSearchKeyword ( void  )
static

Definition at line 405 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchPeople()

static void startSearchPeople ( void  )
static

Definition at line 415 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchPower()

static void startSearchPower ( void  )
static

Definition at line 425 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchStored()

static void startSearchStored ( void  )
static

Definition at line 435 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchChannel()

static void startSearchChannel ( void  )
static

Definition at line 445 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchCategory()

static void startSearchCategory ( void  )
static

Definition at line 455 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchMovie()

static void startSearchMovie ( void  )
static

Definition at line 465 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchNew()

static void startSearchNew ( void  )
static

Definition at line 475 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startSearchTime()

static void startSearchTime ( void  )
static

Definition at line 485 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startManaged()

static void startManaged ( void  )
static

Definition at line 495 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ startManageRecordingRules()

static void startManageRecordingRules ( void  )
static

Definition at line 507 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ startChannelRecPriorities()

static void startChannelRecPriorities ( void  )
static

Definition at line 519 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ startCustomPriority()

static void startCustomPriority ( void  )
static

Definition at line 531 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startPlaybackWithGroup()

static void startPlaybackWithGroup ( const QString &  recGroup = "")
static

Definition at line 543 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by startPlayback(), and TVMenuCallback().

◆ startPlayback()

static void startPlayback ( void  )
static

◆ startPrevious()

static void startPrevious ( void  )
static

Definition at line 565 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ startPreviousOld()

static void startPreviousOld ( void  )
static

Definition at line 575 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startCustomEdit()

static void startCustomEdit ( void  )
static

Definition at line 585 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ startManualSchedule()

static void startManualSchedule ( void  )
static

Definition at line 596 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ isLiveTVAvailable()

static bool isLiveTVAvailable ( void  )
static

Definition at line 608 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by startTVNormal().

◆ startTVNormal()

static void startTVNormal ( void  )
static

Definition at line 622 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), and TVMenuCallback().

◆ showStatus()

static void showStatus ( void  )
static

◆ standbyScreen()

static void standbyScreen ( void  )
static

Definition at line 663 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints(), main(), and TVMenuCallback().

◆ RunVideoScreen()

static void RunVideoScreen ( VideoDialog::DialogType  type,
bool  fromJump = false 
)
static

◆ jumpScreenVideoManager()

static void jumpScreenVideoManager ( )
static

Definition at line 724 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ jumpScreenVideoBrowser()

static void jumpScreenVideoBrowser ( )
static

Definition at line 725 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ jumpScreenVideoTree()

static void jumpScreenVideoTree ( )
static

Definition at line 726 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ jumpScreenVideoGallery()

static void jumpScreenVideoGallery ( )
static

Definition at line 727 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ jumpScreenVideoDefault()

static void jumpScreenVideoDefault ( )
static

Definition at line 728 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ RunGallery()

static void RunGallery ( )
static

Definition at line 730 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ playDisc()

static void playDisc ( )
static

◆ handleDVDMedia()

static void handleDVDMedia ( MythMediaDevice dvd)
static

Definition at line 828 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by internal_media_init().

◆ handleGalleryMedia()

static void handleGalleryMedia ( MythMediaDevice dev)
static

Definition at line 850 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by internal_media_init().

◆ TVMenuCallback()

static void TVMenuCallback ( void *  data,
QString &  selection 
)
static

Definition at line 881 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by RunMenu().

◆ RunMenu()

static bool RunMenu ( const QString &  themedir,
const QString &  themename 
)
static

Definition at line 1216 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main(), reloadTheme(), and resetTheme().

◆ WriteDefaults()

static void WriteDefaults ( )
static

Definition at line 1241 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ internal_play_media()

static int internal_play_media ( const QString &  mrl,
const QString &  plot,
const QString &  title,
const QString &  subtitle,
const QString &  director,
int  season,
int  episode,
const QString &  inetref,
int  lenMins,
const QString &  year,
const QString &  id,
const bool  useBookmark 
)
static

Definition at line 1271 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by internal_media_init().

◆ gotoMainMenu()

static void gotoMainMenu ( void  )
static

Definition at line 1380 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ resetTheme()

static bool resetTheme ( QString  themedir,
const QString &  badtheme 
)
static

Definition at line 1391 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main(), and reloadTheme().

◆ reloadTheme()

static int reloadTheme ( void  )
static

Definition at line 1414 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main(), and reloadTheme_void().

◆ reloadTheme_void()

static void reloadTheme_void ( void  )
static

Definition at line 1502 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ setDebugShowBorders()

static void setDebugShowBorders ( void  )
static

Definition at line 1509 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ setDebugShowNames()

static void setDebugShowNames ( void  )
static

Definition at line 1518 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by InitJumpPoints().

◆ InitJumpPoints()

static void InitJumpPoints ( void  )
static

Definition at line 1527 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main(), and ReloadJumpPoints().

◆ ReloadJumpPoints()

static void ReloadJumpPoints ( void  )
static

Definition at line 1586 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by resetAllKeys().

◆ InitKeys()

static void InitKeys ( void  )
static

Definition at line 1593 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main(), TV::ReloadKeys(), and ReloadKeys().

◆ ReloadKeys()

static void ReloadKeys ( void  )
static

Definition at line 1645 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by resetAllKeys().

◆ SetFuncPtrs()

static void SetFuncPtrs ( void  )
static

Definition at line 1653 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ clearAllKeys()

static void clearAllKeys ( void  )
static

Deletes all key bindings and jump points for this host.

Definition at line 1665 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by resetAllKeys().

◆ internal_media_init()

static int internal_media_init ( )
static

Definition at line 1695 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ CleanupMyOldInUsePrograms()

static void CleanupMyOldInUsePrograms ( void  )
static

Definition at line 1715 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ WasAutomaticStart()

static bool WasAutomaticStart ( void  )
static

Definition at line 1726 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ revokeRoot()

static int revokeRoot ( void  )
static

Definition at line 1826 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1837 of file mythtv/programs/mythfrontend/main.cpp.

Variable Documentation

◆ g_exitPopup

ExitPrompter* g_exitPopup = nullptr
static

Definition at line 129 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by handleExit().

◆ g_menu

MythThemedMenu* g_menu
static

Definition at line 130 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by reloadTheme(), and RunMenu().

◆ g_pUPnp

MediaRenderer* g_pUPnp = nullptr
static

Definition at line 132 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ g_pmanager

MythPluginManager* g_pmanager = nullptr
static

Definition at line 133 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by main().

◆ g_settingsHelper

SettingsHelper* g_settingsHelper = nullptr
static

Definition at line 135 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by TVMenuCallback().

◆ sLocation

const QString sLocation
static
Initial value:
= QCoreApplication::translate("(Common)",
"MythFrontend")

Definition at line 146 of file mythtv/programs/mythfrontend/main.cpp.

Referenced by internal_play_media().