2004-12-30 23:43:55 +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:39:01 +01:00
|
|
|
* $Id: streamdev-client.c,v 1.5.2.2 2010/08/18 10:26:18 schmirl Exp $
|
2004-12-30 23:43:55 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "streamdev-client.h"
|
|
|
|
#include "client/device.h"
|
|
|
|
#include "client/setup.h"
|
|
|
|
#include "i18n.h"
|
|
|
|
|
2008-04-07 16:27:27 +02:00
|
|
|
#if VDRVERSNUM < 10400
|
|
|
|
#error "VDR-1.4.0 or greater is required"
|
|
|
|
#endif
|
|
|
|
|
2004-12-30 23:43:55 +01:00
|
|
|
const char *cPluginStreamdevClient::DESCRIPTION = "VTP Streaming Client";
|
|
|
|
|
|
|
|
cPluginStreamdevClient::cPluginStreamdevClient(void) {
|
|
|
|
}
|
|
|
|
|
|
|
|
cPluginStreamdevClient::~cPluginStreamdevClient() {
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *cPluginStreamdevClient::Description(void) {
|
|
|
|
return tr(DESCRIPTION);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool cPluginStreamdevClient::Start(void) {
|
|
|
|
i18n_name = Name();
|
|
|
|
RegisterI18n(Phrases);
|
|
|
|
|
|
|
|
cStreamdevDevice::Init();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *cPluginStreamdevClient::MainMenuEntry(void) {
|
2008-04-07 16:50:32 +02:00
|
|
|
return StreamdevClientSetup.StartClient && !StreamdevClientSetup.HideMenuEntry ? tr("Suspend Server") : NULL;
|
2004-12-30 23:43:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
cOsdObject *cPluginStreamdevClient::MainMenuAction(void) {
|
2008-04-07 16:40:39 +02:00
|
|
|
if (ClientSocket.SuspendServer())
|
|
|
|
Skins.Message(mtInfo, tr("Server is suspended"));
|
|
|
|
else
|
|
|
|
Skins.Message(mtError, tr("Couldn't suspend Server!"));
|
2005-04-24 18:19:14 +02:00
|
|
|
return NULL;
|
2004-12-30 23:43:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
cMenuSetupPage *cPluginStreamdevClient::SetupMenu(void) {
|
|
|
|
return new cStreamdevClientMenuSetupPage;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool cPluginStreamdevClient::SetupParse(const char *Name, const char *Value) {
|
|
|
|
return StreamdevClientSetup.SetupParse(Name, Value);
|
|
|
|
}
|
|
|
|
|
2010-12-02 09:39:01 +01:00
|
|
|
void cPluginStreamdevClient::MainThreadHook(void) {
|
|
|
|
cStreamdevDevice::UpdatePriority();
|
|
|
|
}
|
|
|
|
|
2004-12-30 23:43:55 +01:00
|
|
|
VDRPLUGINCREATOR(cPluginStreamdevClient); // Don't touch this!
|