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 
9 class EncoderLink;
10 class AutoExpire;
11 class Scheduler;
12 class JobQueue;
13 class HouseKeeper;
14 class MediaServer;
15 class BackendContext;
16 
17 extern QMap<int, EncoderLink *> tvList;
18 extern AutoExpire *expirer;
19 extern JobQueue *jobqueue;
21 extern MediaServer *g_pUPnp;
23 extern QString pidfile;
24 extern QString logfile;
25 
26 class Frontend
27 {
28  public:
30  ~Frontend() = default;
31 
32  QString name;
33  QHostAddress ip;
34 
36 
37  //int capabilities; // Future expansion, a bitmap of 'capabilities'
38 };
39 
41 {
42  public:
43  BackendContext() = default;
45 
46  void SetFrontendConnected(Frontend *frontend);
47  void SetFrontendDisconnected(const QString &name);
48 
49  const QMap<QString, Frontend*> GetConnectedFrontends() const { return m_connectedFrontends; }
50  const QMap<QString, Frontend*> GetFrontends() const { return m_knownFrontends; }
51 
52  private:
53  QMap<QString, Frontend*> m_connectedFrontends;
54  QMap<QString, Frontend*> m_knownFrontends;
55 };
56 
57 #endif // _BACKEND_CONTEXT_H_
~Frontend()=default
const QMap< QString, Frontend * > GetConnectedFrontends() const
BackendContext * gBackendContext
QString pidfile
A simple wrapper containing details about a UPnP Media Server.
Definition: mediaserver.h:31
QHostAddress ip
The user friendly name of the frontend.
BackendContext()=default
QMap< QString, Frontend * > m_connectedFrontends
const QMap< QString, Frontend * > GetFrontends() const
MediaServer * g_pUPnp
AutoExpire * expirer
JobQueue * jobqueue
int connectionCount
The frontend IP address.
QMap< int, EncoderLink * > tvList
QMap< QString, Frontend * > m_knownFrontends
Manages registered HouseKeeperTasks and queues tasks for operation.
Definition: housekeeper.h:148
void SetFrontendConnected(Frontend *frontend)
const char * name
Definition: ParseText.cpp:339
QString logfile
Used to expire recordings to make space for new recordings.
Definition: autoexpire.h:61
HouseKeeper * housekeeping
void SetFrontendDisconnected(const QString &name)
QString name