summaryrefslogtreecommitdiff
path: root/smarttvfactory.c
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-10-03 12:34:48 +0200
committerthlo <smarttv640@gmail.com>2013-10-03 12:34:48 +0200
commitda43351ba6ca31c3ad1cab41231ea7ff772b350f (patch)
tree948c95d51ea231f872f455e5015732b0e0e0123f /smarttvfactory.c
parentaaa2ea1a1d576dcad5397e4bc650a0efcdd860a4 (diff)
downloadvdr-plugin-smarttvweb-da43351ba6ca31c3ad1cab41231ea7ff772b350f.tar.gz
vdr-plugin-smarttvweb-da43351ba6ca31c3ad1cab41231ea7ff772b350f.tar.bz2
handling of commands.conf added. smarttvweb.conf parameter changed from reccmds to commands.
Diffstat (limited to 'smarttvfactory.c')
-rwxr-xr-xsmarttvfactory.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/smarttvfactory.c b/smarttvfactory.c
index 94242e6..c6b0524 100755
--- a/smarttvfactory.c
+++ b/smarttvfactory.c
@@ -109,7 +109,8 @@ void cCmd::trim(string &t) {
SmartTvServer::SmartTvServer(): cStatus(), mRequestCount(0), isInited(false), serverPort(PORT), mServerFd(-1),
mSegmentDuration(10), mHasMinBufferTime(40), mLiveChannels(20),
- clientList(), mConTvClients(), mRecCmds(), mRecMsg(), mActiveSessions(0), mHttpClientId(0), mConfig(NULL), mMaxFd(0),
+ clientList(), mConTvClients(), mRecCmds(), mCmdCmds(), mRecMsg(), mCmdMsg(), mActiveSessions(0), mHttpClientId(0),
+ mConfig(NULL), mMaxFd(0),
mManagedUrls(NULL){
}
@@ -121,6 +122,9 @@ SmartTvServer::~SmartTvServer() {
for (uint i =0; i < mRecCmds.size(); i++)
delete mRecCmds[i];
+
+ for (uint i =0; i < mCmdCmds.size(); i++)
+ delete mCmdCmds[i];
}
// Status methods
@@ -702,6 +706,16 @@ void SmartTvServer::initRecCmds() {
}
+void SmartTvServer::initCmdCmds() {
+ mRecMsg = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ mRecMsg += "<cmdcmds>\n";
+ mRecMsg += processNestedItemList("", &Commands, &mCmdCmds);
+ mRecMsg += "</cmdcmds>\n";
+
+ *(mLog.log()) << "reccmds.conf parsed" << endl;
+
+}
+
void SmartTvServer::initServer(string dir) {
/* This function initialtes the listening socket for the server
* and sets isInited to true
@@ -724,6 +738,7 @@ void SmartTvServer::initServer(string dir) {
*(mLog.log()) << "LogFile= " << mConfig->getLogFile() << endl;
initRecCmds();
+ initCmdCmds();
#else
mConfig = new cSmartTvConfig(".");