MythTV  0.26-pre
mythcontext.h
Go to the documentation of this file.
00001 #ifndef MYTHCONTEXT_H_
00002 #define MYTHCONTEXT_H_
00003 
00004 #include <QObject>
00005 #include <QString>
00006 
00007 #include "mythcorecontext.h"
00008 #include "mythevent.h"
00009 #include "mythexp.h"
00010 #include "mythlogging.h"
00011 
00012 class MythPluginManager;
00013 class MythContextPrivate;
00014 
00015 class MythContextSlotHandler : public QObject
00016 {
00017     Q_OBJECT
00018 
00019   public:
00020     MythContextSlotHandler(MythContextPrivate *x) : d(x) { }
00021 
00022   private slots:
00023     void ConnectFailurePopupClosed(void);
00024     void VersionMismatchPopupClosed(void);
00025 
00026   private:
00027     ~MythContextSlotHandler() {}
00028 
00029     MythContextPrivate *d;
00030 };
00031 
00042 class MPUBLIC MythContext
00043 {
00044   public:
00045     MythContext(const QString &binversion);
00046     virtual ~MythContext();
00047 
00048     bool Init(const bool gui = true,
00049               const bool promptForBackend = false,
00050               const bool bypassAutoDiscovery = false,
00051               const bool ignoreDB = false);
00052 
00053     DatabaseParams GetDatabaseParams(void);
00054     bool SaveDatabaseParams(const DatabaseParams &params);
00055 
00056     bool TestPopupVersion(const QString &name, const QString &libversion,
00057                           const QString &pluginversion);
00058 
00059     void SetDisableEventPopup(bool check);
00060     void SetDisableLibraryPopup(bool check);
00061 
00062     void SetPluginManager(MythPluginManager *pmanager);
00063     MythPluginManager *getPluginManager(void);
00064 
00065   private:
00066     MythContextPrivate *d;
00067     QString app_binary_version;
00068 };
00069 
00071 extern MPUBLIC MythContext *gContext;
00072 
00074 extern const QString gBackendURI;
00075 
00076 #endif
00077 
00078 /* vim: set expandtab tabstop=4 shiftwidth=4: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends