summaryrefslogtreecommitdiff
path: root/smarttvfactory.c
diff options
context:
space:
mode:
authorthlo <t.lohmar@gmx.de>2013-05-11 15:45:00 +0200
committerthlo <t.lohmar@gmx.de>2013-05-11 15:45:00 +0200
commitaa83ca05d35edbba7784909ee09da1980b9fe450 (patch)
treedc05639fb53cff2c37963fad7dad06a20366adb7 /smarttvfactory.c
parent2c84a7c872c7237b0b2b87d9fe20fc4335573321 (diff)
downloadvdr-plugin-smarttvweb-aa83ca05d35edbba7784909ee09da1980b9fe450.tar.gz
vdr-plugin-smarttvweb-aa83ca05d35edbba7784909ee09da1980b9fe450.tar.bz2
OsdStatusMessage added.
Diffstat (limited to 'smarttvfactory.c')
-rwxr-xr-xsmarttvfactory.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/smarttvfactory.c b/smarttvfactory.c
index f721658..763baeb 100755
--- a/smarttvfactory.c
+++ b/smarttvfactory.c
@@ -132,6 +132,7 @@ void SmartTvServer::Recording(const cDevice *Device, const char *Name, const cha
}
};
+
void SmartTvServer::TimerChange(const cTimer *Timer, eTimerChange Change) {
#ifndef DEBUG
*(mLog.log()) << "SmartTvServer::TimerChange"
@@ -181,6 +182,24 @@ void SmartTvServer::TimerChange(const cTimer *Timer, eTimerChange Change) {
}
}
+void SmartTvServer::OsdStatusMessage(const char *Message) {
+ *(mLog.log()) << "SmartTvServer::OsdStatusMessage: Msg= " << ((Message != NULL) ? Message : "") << endl;
+
+ if (Message == NULL)
+ return;
+
+ string msg = Message;
+
+ for (uint i = 0; i < mConTvClients.size(); i ++) {
+ if ((mConTvClients[i]->ip).compare("") != 0) {
+ int cfd= connectToClient(mConTvClients[i]->ip);
+ if (cfd < 0)
+ continue;
+ addHttpResource(cfd, new cHttpMesgPushClient(cfd, mHttpClientId, serverPort, this, mConTvClients[i]->ip, msg));
+ }
+ }
+}
+
void SmartTvServer::cleanUp() {
// close listening ports
for (uint idx= 0; idx < clientList.size(); idx++) {
@@ -373,7 +392,7 @@ void SmartTvServer::threadLoop() {
void SmartTvServer::loop() {
socklen_t addr_size = 0;
- int rfd;
+ unsigned int rfd;
sockaddr_in sadr;
int req_id = 0;
int ret = 0;