vdr-plugin-streamdev/server/server.h

48 lines
971 B
C
Raw Normal View History

2004-12-30 23:43:55 +01:00
/*
2005-05-09 22:22:29 +02:00
* $Id: server.h,v 1.2 2005/05/09 20:22:29 lordjaxom Exp $
2004-12-30 23:43:55 +01:00
*/
#ifndef VDR_STREAMDEV_SERVER_H
#define VDR_STREAMDEV_SERVER_H
#include <vdr/thread.h>
#include "server/component.h"
#include "server/connection.h"
2005-05-09 22:22:29 +02:00
#define STREAMDEVHOSTSPATH (*AddDirectory(cPlugin::ConfigDirectory(), "streamdevhosts.conf"))
2004-12-30 23:43:55 +01:00
class cStreamdevServer: public cThread {
private:
bool m_Active;
2005-05-09 22:22:29 +02:00
static cStreamdevServer *m_Instance;
static cList<cServerComponent> m_Servers;
static cList<cServerConnection> m_Clients;
2004-12-30 23:43:55 +01:00
protected:
2005-05-09 22:22:29 +02:00
void Stop(void);
2004-12-30 23:43:55 +01:00
virtual void Action(void);
2005-05-09 22:22:29 +02:00
static void Register(cServerComponent *Server);
2004-12-30 23:43:55 +01:00
public:
cStreamdevServer(void);
virtual ~cStreamdevServer();
2005-05-09 22:22:29 +02:00
static void Initialize(void);
static void Destruct(void);
2004-12-30 23:43:55 +01:00
static bool Active(void);
};
2005-05-09 22:22:29 +02:00
inline bool cStreamdevServer::Active(void)
{
return m_Instance != NULL
&& m_Instance->m_Clients.Count() > 0;
2004-12-30 23:43:55 +01:00
}
extern cSVDRPhosts StreamdevHosts;
#endif // VDR_STREAMDEV_SERVER_H