2004-12-30 23:43:55 +01:00
|
|
|
/*
|
2008-04-07 16:50:32 +02:00
|
|
|
* $Id: server.h,v 1.3 2008/04/07 14:50:33 schmirl 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"
|
|
|
|
|
2008-04-07 16:50:32 +02:00
|
|
|
#define EXTERNREMUXPATH (*AddDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), "externremux.sh"))
|
|
|
|
#define STREAMDEVHOSTSPATH (*AddDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), "streamdevhosts.conf"))
|
2005-05-09 22:22:29 +02:00
|
|
|
|
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
|