summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2017-07-30 11:00:22 (GMT)
committerFrank Neumann <fnu@yavdr.org>2017-07-30 11:00:22 (GMT)
commitc804b85247f2ae8e3ba412b2e266bc3fed51d1ae (patch)
tree57c4b46a37bb9d8d8ab8b8ef2cfcf69bdcaf0546
parent65aabbfb1f7ffd79e739f77360ff8f21cf70fb50 (diff)
downloadvdr-plugin-epgsearch-c804b85247f2ae8e3ba412b2e266bc3fed51d1ae.tar.gz
vdr-plugin-epgsearch-c804b85247f2ae8e3ba412b2e266bc3fed51d1ae.tar.bz2
Use namespace for svdrpclient.
-rw-r--r--epgsearch.c10
-rw-r--r--epgsearchtools.c4
-rw-r--r--searchtimer_thread.c2
-rw-r--r--svdrpclient.h4
-rw-r--r--timer_thread.c2
5 files changed, 13 insertions, 9 deletions
diff --git a/epgsearch.c b/epgsearch.c
index 3bcd3d9..2e01d0e 100644
--- a/epgsearch.c
+++ b/epgsearch.c
@@ -89,7 +89,7 @@ int cLogFile::loglevellimit = 0;
bool cPluginEpgsearch::VDR_readyafterStartup = false;
// external SVDRPCommand
-const char *cSVDRPClient::SVDRPSendCmd = "svdrpsend";
+const char *epgsSVDRP::cSVDRPClient::SVDRPSendCmd = "svdrpsend";
cPluginEpgsearch::cPluginEpgsearch(void)
{
@@ -189,7 +189,7 @@ bool cPluginEpgsearch::ProcessArgs(int argc, char *argv[])
switch (c) {
case 'f':
- cSVDRPClient::SVDRPSendCmd = optarg;
+ epgsSVDRP::cSVDRPClient::SVDRPSendCmd = optarg;
EPGSearchConfig.useExternalSVDRP = 1;
break;
case 'c':
@@ -211,10 +211,10 @@ bool cPluginEpgsearch::ProcessArgs(int argc, char *argv[])
}
}
- if (EPGSearchConfig.useExternalSVDRP && access(cSVDRPClient::SVDRPSendCmd, F_OK) != 0)
+ if (EPGSearchConfig.useExternalSVDRP && access(epgsSVDRP::cSVDRPClient::SVDRPSendCmd, F_OK) != 0)
{
- LogFile.eSysLog("ERROR - can't find svdrpsend script: '%s'", cSVDRPClient::SVDRPSendCmd);
- cSVDRPClient::SVDRPSendCmd = NULL;
+ LogFile.eSysLog("ERROR - can't find svdrpsend script: '%s'", epgsSVDRP::cSVDRPClient::SVDRPSendCmd);
+ epgsSVDRP::cSVDRPClient::SVDRPSendCmd = NULL;
}
return true;
diff --git a/epgsearchtools.c b/epgsearchtools.c
index b8a8c6c..76b1b9a 100644
--- a/epgsearchtools.c
+++ b/epgsearchtools.c
@@ -409,7 +409,7 @@ bool SendViaSVDRP(cString SVDRPcmd)
if (EPGSearchConfig.useExternalSVDRP)
{
cmdbuf = cString::sprintf("%s -p %d \"%s\"",
- cSVDRPClient::SVDRPSendCmd,
+ epgsSVDRP::cSVDRPClient::SVDRPSendCmd,
EPGSearchConfig.SVDRPPort,
*SVDRPcmd);
@@ -425,7 +425,7 @@ bool SendViaSVDRP(cString SVDRPcmd)
else
{
cmdbuf = SVDRPcmd;
- cSVDRPClient client;
+ epgsSVDRP::cSVDRPClient client;
if (!client.SendCmd(*cmdbuf))
{
LogFile.eSysLog("command '%s' failed", *cmdbuf);
diff --git a/searchtimer_thread.c b/searchtimer_thread.c
index 8f5773a..ba54566 100644
--- a/searchtimer_thread.c
+++ b/searchtimer_thread.c
@@ -198,7 +198,7 @@ bool cSearchTimerThread::TimerWasModified(const cTimer* t)
void cSearchTimerThread::Action(void)
{
- if (EPGSearchConfig.useExternalSVDRP && !cSVDRPClient::SVDRPSendCmd)
+ if (EPGSearchConfig.useExternalSVDRP && !epgsSVDRP::cSVDRPClient::SVDRPSendCmd)
{
LogFile.eSysLog("ERROR - SVDRPSend script not specified or does not exist (use -f option)");
return;
diff --git a/svdrpclient.h b/svdrpclient.h
index d76a1f6..e9533fe 100644
--- a/svdrpclient.h
+++ b/svdrpclient.h
@@ -31,6 +31,8 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#define SVDRPDISCONNECT 221
#define CMDSUCCESS 250
+namespace epgsSVDRP {
+
class cSVDRPClient {
private:
int sock;
@@ -142,4 +144,6 @@ public:
static const char *SVDRPSendCmd;
};
+};
+
#endif
diff --git a/timer_thread.c b/timer_thread.c
index feef7b3..ba82c41 100644
--- a/timer_thread.c
+++ b/timer_thread.c
@@ -76,7 +76,7 @@ void cTimerThread::Stop(void) {
void cTimerThread::Action(void)
{
m_Active = true;
- if (EPGSearchConfig.useExternalSVDRP && !cSVDRPClient::SVDRPSendCmd)
+ if (EPGSearchConfig.useExternalSVDRP && !epgsSVDRP::cSVDRPClient::SVDRPSendCmd)
{
LogFile.eSysLog("ERROR - SVDRPSend script not specified or does not exist (use -f option)");
m_Active = false;