MythTV  master
mythcontext.h
Go to the documentation of this file.
1 #ifndef MYTHCONTEXT_H_
2 #define MYTHCONTEXT_H_
3 
4 #include <QObject>
5 #include <QString>
6 
7 #include "mythcorecontext.h"
8 #include "mythevent.h"
9 #include "mythexp.h"
10 #include "mythlogging.h"
11 
12 class MythContextPrivate;
13 
14 class MythContextSlotHandler : public QObject
15 {
16  Q_OBJECT
17 
18  public:
20 
21  private slots:
22  void VersionMismatchPopupClosed(void);
23 
24  public slots:
25  void OnCloseDialog(void);
26 
27  private:
28  ~MythContextSlotHandler() = default;
29 
30  MythContextPrivate *d {nullptr};
31 };
32 
43 {
44  public:
45  MythContext(const QString &binversion, bool needsBackend = false);
46  virtual ~MythContext();
47 
48  bool Init(const bool gui = true,
49  const bool promptForBackend = false,
50  const bool disableAutoDiscovery = false,
51  const bool ignoreDB = false);
52 
53  DatabaseParams GetDatabaseParams(void);
54  bool SaveDatabaseParams(const DatabaseParams &params);
55  bool saveSettingsCache(void);
56 
57  void SetDisableEventPopup(bool check);
58 
59  private:
60  MythContextPrivate *d {nullptr};
62 };
63 
66 
68 extern const QString gBackendURI;
69 
70 #endif
71 
72 /* vim: set expandtab tabstop=4 shiftwidth=4: */
Startup context for MythTV.
Definition: mythcontext.h:42
unsigned int slots[4]
Definition: element.c:38
#define MPUBLIC
Definition: mythexp.h:10
~MythContextSlotHandler()=default
MPUBLIC MythContext * gContext
This global variable contains the MythContext instance for the application.
Definition: mythcontext.cpp:63
void VersionMismatchPopupClosed(void)
QString m_app_binary_version
Definition: mythcontext.h:61
static const uint16_t * d
Structure containing the basic Database parameters.
Definition: mythdbparams.h:9
MythContextSlotHandler(MythContextPrivate *x)
Definition: mythcontext.h:19
MythContextPrivate * d
Definition: mythcontext.h:30
const QString gBackendURI
Service type for the backend's UPnP server.
Definition: backendselect.h:21