/*
 * icetftclient.c: Demo icetft service client plugin
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id: $
 */

#include <stdlib.h>
#include <vdr/interface.h>
#include <vdr/plugin.h>
#include <vdr/tools.h>

static const char VERSION[]       = "0.0.1";
static const char DESCRIPTION[]   = "ICE-TFT demo client";
static const char MAINMENUENTRY[] = "Switching ICE-TFT by service interface";

class cPluginIcetftClient : public cPlugin {
public:
  virtual const char *Version(void) { return VERSION; }
  virtual const char *Description(void) { return DESCRIPTION; }
  virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
  virtual cOsdObject *MainMenuAction(void);
  };


cOsdObject *cPluginIcetftClient::MainMenuAction(void)
{
  char *output;
  cPlugin *p;

  p = cPluginManager::CallFirstService("Icetft-Toggle-v1.0", &output);
  if (p) {
     dsyslog("icetftclient: tft state changed \n");
     }
  else
     dsyslog("\n--- No support for IcetftService-v1.0 found ---\n");

  return NULL;
}

VDRPLUGINCREATOR(cPluginIcetftClient); // Don't touch this!
