MythTV  master
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
MythContext Class Reference

Startup context for MythTV. More...

#include <libmyth/mythcontext.h>

Collaboration diagram for MythContext:
[legend]

Classes

class  Impl
 

Public Types

using CleanupFunction = void(*)()
 

Public Member Functions

 MythContext (QString binversion, bool needsBackend=false)
 
virtual ~MythContext ()
 
bool Init (bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
 
void setCleanup (CleanupFunction cleanup)
 
bool saveSettingsCache ()
 
void SetDisableEventPopup (bool check)
 

Private Attributes

Implm_impl {nullptr}
 PIMPL idiom. More...
 
QString m_appBinaryVersion
 
CleanupFunction m_cleanup {nullptr}
 This is used to destroy global state before main() returns. More...
 

Detailed Description

Startup context for MythTV.

This class has methods used during startup for setting up database connections, checking for correct database version, locating the backend. After startup, context information is handled by MythCoreContext.

Definition at line 19 of file mythcontext.h.

Member Typedef Documentation

◆ CleanupFunction

using MythContext::CleanupFunction = void (*)()

Definition at line 30 of file mythcontext.h.

Constructor & Destructor Documentation

◆ MythContext()

MythContext::MythContext ( QString  binversion,
bool  needsBackend = false 
)
explicit

Definition at line 1539 of file mythcontext.cpp.

◆ ~MythContext()

MythContext::~MythContext ( )
virtual

Definition at line 1665 of file mythcontext.cpp.

Member Function Documentation

◆ Init()

bool MythContext::Init ( bool  gui = true,
bool  promptForBackend = false,
bool  disableAutoDiscovery = false,
bool  ignoreDB = false 
)

Definition at line 1566 of file mythcontext.cpp.

◆ setCleanup()

void MythContext::setCleanup ( CleanupFunction  cleanup)
inline

Definition at line 31 of file mythcontext.h.

◆ saveSettingsCache()

bool MythContext::saveSettingsCache ( )

Definition at line 1703 of file mythcontext.cpp.

Referenced by Init().

◆ SetDisableEventPopup()

void MythContext::SetDisableEventPopup ( bool  check)

Definition at line 1698 of file mythcontext.cpp.

Referenced by Init().

Member Data Documentation

◆ m_impl

Impl* MythContext::m_impl {nullptr}
private

PIMPL idiom.

Definition at line 41 of file mythcontext.h.

Referenced by Init(), MythContext(), saveSettingsCache(), SetDisableEventPopup(), and ~MythContext().

◆ m_appBinaryVersion

QString MythContext::m_appBinaryVersion
private

Definition at line 42 of file mythcontext.h.

Referenced by Init(), and MythContext().

◆ m_cleanup

CleanupFunction MythContext::m_cleanup {nullptr}
private

This is used to destroy global state before main() returns.

It is called first before anything else is done in ~MythContext() if it is not nullptr.

Definition at line 47 of file mythcontext.h.

Referenced by ~MythContext().


The documentation for this class was generated from the following files: