vdr-plugin-streamdev/client/streamdev-client.c

56 lines
1.5 KiB
C
Raw Normal View History

2010-12-02 08:53:01 +01:00
/*
* streamdev.c: A plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
2010-12-02 09:51:02 +01:00
* $Id: streamdev-client.c,v 1.2 2010/07/19 13:49:25 schmirl Exp $
2010-12-02 08:53:01 +01:00
*/
#include "streamdev-client.h"
#include "client/device.h"
#include "client/setup.h"
2010-12-02 09:43:13 +01:00
#if !defined(APIVERSNUM) || APIVERSNUM < 10509
#error "VDR-1.5.9 API version or greater is required!"
#endif
const char *cPluginStreamdevClient::DESCRIPTION = trNOOP("VTP Streaming Client");
2010-12-02 08:53:01 +01:00
cPluginStreamdevClient::cPluginStreamdevClient(void) {
}
cPluginStreamdevClient::~cPluginStreamdevClient() {
}
const char *cPluginStreamdevClient::Description(void) {
return tr(DESCRIPTION);
}
bool cPluginStreamdevClient::Start(void) {
2010-12-02 09:43:13 +01:00
I18nRegister(PLUGIN_NAME_I18N);
2010-12-02 08:53:01 +01:00
cStreamdevDevice::Init();
2010-12-02 09:43:13 +01:00
return true;
2010-12-02 08:53:01 +01:00
}
const char *cPluginStreamdevClient::MainMenuEntry(void) {
2010-12-02 09:43:13 +01:00
return StreamdevClientSetup.StartClient && !StreamdevClientSetup.HideMenuEntry ? tr("Suspend Server") : NULL;
2010-12-02 08:53:01 +01:00
}
cOsdObject *cPluginStreamdevClient::MainMenuAction(void) {
2010-12-02 09:43:13 +01:00
if (ClientSocket.SuspendServer())
Skins.Message(mtInfo, tr("Server is suspended"));
else
Skins.Message(mtError, tr("Couldn't suspend Server!"));
2010-12-02 08:53:01 +01:00
return NULL;
}
cMenuSetupPage *cPluginStreamdevClient::SetupMenu(void) {
return new cStreamdevClientMenuSetupPage;
}
bool cPluginStreamdevClient::SetupParse(const char *Name, const char *Value) {
return StreamdevClientSetup.SetupParse(Name, Value);
}
VDRPLUGINCREATOR(cPluginStreamdevClient); // Don't touch this!