/*$cb
 *    This file is a part of OpenMHP VDR plugin.
 *
 *    Copyright (C) 2005 Mikko Novaro <miknov@gmail.com>
 *
 *    See README file for licensing and contact information.
 $ce*/

#ifndef XLETTHREAD_H
#define XLETTHREAD_H

#include <vdr/plugin.h>
#include "libopenmhp/openmhp.h"

class cXletThread : public cThread {
 private:
  cXlet *xlet;
  const char *xserver;
  int xdisplay;
  const char *openmhpout;
 public:
  cXletThread(cXlet *xlt, const char *virtualxserver = "none",
	      int virtualxdisplay = 0,
	      const char *openmhpoutput = "discard");
  virtual void Action(void);
  /* Stop thread execution. Allow "timeout" seconds to stop by itself,
     after which force termination. */
  void Stop(int timeout = 1);
};

#endif
