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 #include "mythsystemevent.h"
9 
10 class EncoderLink;
11 class AutoExpire;
12 class Scheduler;
13 class JobQueue;
14 class HouseKeeper;
15 class MediaServer;
16 class BackendContext;
17 
18 extern QMap<int, EncoderLink *> tvList;
19 extern AutoExpire *expirer;
20 extern JobQueue *jobqueue;
22 extern MediaServer *g_pUPnp;
24 extern QString pidfile;
25 extern QString logfile;
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:47
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:149
BackendContext::SetFrontendDisconnected
void SetFrontendDisconnected(const QString &name)
Definition: backendcontext.cpp:79
MediaServer
Definition: mediaserver.h:33
BackendContext
Definition: backendcontext.h:43
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:62
Frontend::~Frontend
~Frontend()=default
mythsystemevent.h
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:29
jobqueue
JobQueue * jobqueue
Definition: backendcontext.cpp:9
gBackendContext
BackendContext * gBackendContext
Definition: backendcontext.cpp:12
housekeeping
HouseKeeper * housekeeping
Definition: backendcontext.cpp:10
BackendContext::GetConnectedFrontends
QMap< QString, Frontend * > GetConnectedFrontends() const
Definition: backendcontext.h:51
pidfile
QString pidfile
Definition: backendcontext.cpp:13
sysEventHandler
MythSystemEventHandler * sysEventHandler
Definition: backendcontext.cpp:15
tvList
QMap< int, EncoderLink * > tvList
Definition: backendcontext.cpp:7
BackendContext::~BackendContext
~BackendContext()
Definition: backendcontext.cpp:17
logfile
QString logfile
Definition: backendcontext.cpp:14
Frontend::m_connectionCount
int m_connectionCount
The frontend IP address.
Definition: backendcontext.h:37
BackendContext::SetFrontendConnected
void SetFrontendConnected(Frontend *frontend)
Definition: backendcontext.cpp:32
JobQueue
Definition: jobqueue.h:125
Frontend::m_ip
QHostAddress m_ip
The user friendly name of the frontend.
Definition: backendcontext.h:35
expirer
AutoExpire * expirer
Definition: backendcontext.cpp:8
MythSystemEventHandler
Handles incoming MythSystemEvent messages.
Definition: mythsystemevent.h:25
Frontend::m_name
QString m_name
Definition: backendcontext.h:34