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  const QMap<QString, Frontend*> GetConnectedFrontends() const { return m_connectedFrontends; }
52  const 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_
QString m_name
~Frontend()=default
const QMap< QString, Frontend * > GetConnectedFrontends() const
int m_connectionCount
The frontend IP address.
BackendContext * gBackendContext
QString pidfile
A simple wrapper containing details about a UPnP Media Server.
Definition: mediaserver.h:32
BackendContext()=default
QMap< QString, Frontend * > m_connectedFrontends
MythSystemEventHandler * sysEventHandler
const QMap< QString, Frontend * > GetFrontends() const
QHostAddress m_ip
The user friendly name of the frontend.
MediaServer * g_pUPnp
AutoExpire * expirer
JobQueue * jobqueue
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:328
QString logfile
Frontend()=default
Used to expire recordings to make space for new recordings.
Definition: autoexpire.h:61
HouseKeeper * housekeeping
Handles incoming MythSystemEvent messages.
void SetFrontendDisconnected(const QString &name)