/*
 * VdrmonThread
 */

#ifndef _VDRMON_THREAD
#define _VDRMON_THREAD

#include <sys/poll.h>
#include <vdr/plugin.h>
#include <vdr/thread.h>
#include <vdr/device.h>
#include <vdr/player.h>
#include <string>

using namespace std;

class cSelect;

class cVdrmonThread : public cThread {
private:
  cSelect * select;
  int pipe[2];
  int port;
  int records;
  static bool plays;
  static string playname;
public:
  cVdrmonThread(int port);
  virtual void Action(void);
  void Shutdown();
  int GetVdrPipe();
  void Replaying(const char * name);
  void Recording(const char * name);
  static bool Plays(string& name);
private:
  ~cVdrmonThread();
  void Cleanup();
  bool Init();
};

#endif


