diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:57:17 +0100 |
---|---|---|
committer | Mikko Matilainen <mikkom@iki.fi> | 2011-03-22 21:16:18 +0200 |
commit | 6ea5efe93960fc761dbb5e0b2d93d9b5818d5d7c (patch) | |
tree | 836d96c9a4688a01745719787a7a0e83804356f8 /client/streamdev-client.c | |
parent | 0a860a1e3e45ee83563b09beb93ede0e99eb75fb (diff) | |
download | vdr-plugin-streamdev-6ea5efe93960fc761dbb5e0b2d93d9b5818d5d7c.tar.gz vdr-plugin-streamdev-6ea5efe93960fc761dbb5e0b2d93d9b5818d5d7c.tar.bz2 |
Snapshot 2010-09-15
Diffstat (limited to 'client/streamdev-client.c')
-rw-r--r-- | client/streamdev-client.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/client/streamdev-client.c b/client/streamdev-client.c new file mode 100644 index 0000000..00fa90c --- /dev/null +++ b/client/streamdev-client.c @@ -0,0 +1,59 @@ +/* + * streamdev.c: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * $Id: streamdev-client.c,v 1.3 2010/08/18 10:26:56 schmirl Exp $ + */ + +#include "streamdev-client.h" +#include "client/device.h" +#include "client/setup.h" + +#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"); + +cPluginStreamdevClient::cPluginStreamdevClient(void) { +} + +cPluginStreamdevClient::~cPluginStreamdevClient() { +} + +const char *cPluginStreamdevClient::Description(void) { + return tr(DESCRIPTION); +} + +bool cPluginStreamdevClient::Start(void) { + I18nRegister(PLUGIN_NAME_I18N); + cStreamdevDevice::Init(); + return true; +} + +const char *cPluginStreamdevClient::MainMenuEntry(void) { + return StreamdevClientSetup.StartClient && !StreamdevClientSetup.HideMenuEntry ? tr("Suspend Server") : NULL; +} + +cOsdObject *cPluginStreamdevClient::MainMenuAction(void) { + if (ClientSocket.SuspendServer()) + Skins.Message(mtInfo, tr("Server is suspended")); + else + Skins.Message(mtError, tr("Couldn't suspend Server!")); + return NULL; +} + +cMenuSetupPage *cPluginStreamdevClient::SetupMenu(void) { + return new cStreamdevClientMenuSetupPage; +} + +bool cPluginStreamdevClient::SetupParse(const char *Name, const char *Value) { + return StreamdevClientSetup.SetupParse(Name, Value); +} + +void cPluginStreamdevClient::MainThreadHook(void) { + cStreamdevDevice::UpdatePriority(); +} + +VDRPLUGINCREATOR(cPluginStreamdevClient); // Don't touch this! |