MythTV  master
backendcontext.h
Go to the documentation of this file.
1 #ifndef BACKEND_CONTEXT_H
2 #define BACKEND_CONTEXT_H
3 
4 #include <QString>
5 #include <QMap>
6 #include <QList>
7 #include <QHostAddress>
8 
10 
11 class EncoderLink;
12 class AutoExpire;
13 class Scheduler;
14 class JobQueue;
15 class HouseKeeper;
16 class MediaServer;
17 class BackendContext;
18 
19 extern QMap<int, EncoderLink *> gTVList;
20 extern AutoExpire *gExpirer;
21 extern JobQueue *gJobQueue;
23 extern MediaServer *g_pUPnp;
25 extern QString gPidFile;
27 
28 class Frontend
29 {
30  public:
31  Frontend() = default;
32  ~Frontend() = default;
33 
34  QString m_name;
35  QHostAddress m_ip;
36 
38 
39  //int m_capabilities; // Future expansion, a bitmap of 'capabilities'
40 };
41 
43 {
44  public:
45  BackendContext() = default;
47 
48  void SetFrontendConnected(Frontend *frontend);
49  void SetFrontendDisconnected(const QString &name);
50 
51  QMap<QString, Frontend*> GetConnectedFrontends() const { return m_connectedFrontends; }
52  QMap<QString, Frontend*> GetFrontends() const { return m_knownFrontends; }
53 
54  private:
55  QMap<QString, Frontend*> m_connectedFrontends;
56  QMap<QString, Frontend*> m_knownFrontends;
57 };
58 
59 #endif // BACKEND_CONTEXT_H
Scheduler
Definition: scheduler.h:45
BackendContext::m_connectedFrontends
QMap< QString, Frontend * > m_connectedFrontends
Definition: backendcontext.h:55
Frontend::Frontend
Frontend()=default
HouseKeeper
Manages registered HouseKeeperTasks and queues tasks for operation.
Definition: housekeeper.h:150
gExpirer
AutoExpire * gExpirer
Definition: backendcontext.cpp:8
gJobQueue
JobQueue * gJobQueue
Definition: backendcontext.cpp:9
BackendContext::SetFrontendDisconnected
void SetFrontendDisconnected(const QString &name)
Definition: backendcontext.cpp:78
MediaServer
Definition: mediaserver.h:32
BackendContext
Definition: backendcontext.h:42
g_pUPnp
MediaServer * g_pUPnp
Definition: backendcontext.cpp:11
BackendContext::BackendContext
BackendContext()=default
AutoExpire
Used to expire recordings to make space for new recordings.
Definition: autoexpire.h:60
Frontend::~Frontend
~Frontend()=default
mythsystemevent.h
gSysEventHandler
MythSystemEventHandler * gSysEventHandler
Definition: backendcontext.cpp:14
BackendContext::GetFrontends
QMap< QString, Frontend * > GetFrontends() const
Definition: backendcontext.h:52
BackendContext::m_knownFrontends
QMap< QString, Frontend * > m_knownFrontends
Definition: backendcontext.h:56
Frontend
Definition: backendcontext.h:28
gBackendContext
BackendContext * gBackendContext
Definition: backendcontext.cpp:12
BackendContext::GetConnectedFrontends
QMap< QString, Frontend * > GetConnectedFrontends() const
Definition: backendcontext.h:51
BackendContext::~BackendContext
~BackendContext()
Definition: backendcontext.cpp:16
Frontend::m_connectionCount
int m_connectionCount
The frontend IP address.
Definition: backendcontext.h:37
BackendContext::SetFrontendConnected
void SetFrontendConnected(Frontend *frontend)
Definition: backendcontext.cpp:31
JobQueue
Definition: jobqueue.h:126
Frontend::m_ip
QHostAddress m_ip
The user friendly name of the frontend.
Definition: backendcontext.h:35
gPidFile
QString gPidFile
Definition: backendcontext.cpp:13
MythSystemEventHandler
Handles incoming MythSystemEvent messages.
Definition: mythsystemevent.h:24
gTVList
QMap< int, EncoderLink * > gTVList
Definition: backendcontext.cpp:7
Frontend::m_name
QString m_name
Definition: backendcontext.h:34
gHousekeeping
HouseKeeper * gHousekeeping
Definition: backendcontext.cpp:10