diff options
author | thlo <smarttv640@gmail.com> | 2016-08-13 12:44:16 +0200 |
---|---|---|
committer | thlo <smarttv640@gmail.com> | 2016-08-13 12:44:16 +0200 |
commit | 4f636a7a63c76359ec2ce374a4abf7aaafde2b48 (patch) | |
tree | 62f1dd19cb3c3b4095c6023d4cc18bcd45ad0e7c | |
parent | 24ad136d8851411c988b4c95c6adca4d09f74d61 (diff) | |
download | vdr-plugin-smarttvweb-4f636a7a63c76359ec2ce374a4abf7aaafde2b48.tar.gz vdr-plugin-smarttvweb-4f636a7a63c76359ec2ce374a4abf7aaafde2b48.tar.bz2 |
widget.conf creation from memory added. Add no-cache HTTP headers to the recordings.xml and media.xml
-rwxr-xr-x | responsememblk.c | 25 | ||||
-rwxr-xr-x | responsememblk.h | 2 |
2 files changed, 25 insertions, 2 deletions
diff --git a/responsememblk.c b/responsememblk.c index 3f7a182..c0d1054 100755 --- a/responsememblk.c +++ b/responsememblk.c @@ -442,6 +442,7 @@ int cResponseMemBlk::sendResumeXml () { return OKAY; } + int cResponseMemBlk::sendMp4Covr() { if (isHeadRequest()) return OKAY; @@ -502,6 +503,26 @@ int cResponseMemBlk::sendMp4Covr() { return OKAY; } +void cResponseMemBlk::sendWidgetConf() { + if (isHeadRequest()) + return; +#ifndef STANDALONE + mResponseMessage = new string(); + *mResponseMessage = ""; + mResponseMessagePos = 0; + + mRequest->mConnState = SERVING; + + // cWidgetConfigBase widget_conf; + // *mResponseMessage = widget_conf.GetWidgetConf(); + *mResponseMessage = mRequest->mFactory->getConfig()->GetWidgetConf(); + + sendHeaders(200, "OK", NULL, "application/xml", mResponseMessage->size(), -1); + +#endif +} + + int cResponseMemBlk::sendMarksXml () { if (isHeadRequest()) return OKAY; @@ -1993,7 +2014,7 @@ int cResponseMemBlk::sendMediaXml (struct stat *statbuf) { hdr = "</channel>\n"; hdr += "</rss>\n"; *mResponseMessage += hdr; - sendHeaders(200, "OK", NULL, "application/xml", mResponseMessage->size(), statbuf->st_mtime); + sendHeaders(200, "OK", "Cache-Control: no-cache, must-revalidate", "application/xml", mResponseMessage->size(), statbuf->st_mtime); return OKAY; } @@ -2963,7 +2984,7 @@ int cResponseMemBlk::sendRecordingsXml(struct stat *statbuf) { *(mLog->log())<< DEBUGPREFIX << " Recording Count= " <<item_count<< endl; #endif - sendHeaders(200, "OK", NULL, "application/xml", mResponseMessage->size(), statbuf->st_mtime); + sendHeaders(200, "OK", "Cache-Control: no-cache, must-revalidate", "application/xml", mResponseMessage->size(), statbuf->st_mtime); return OKAY; } diff --git a/responsememblk.h b/responsememblk.h index 5cd11e8..2cdfae9 100755 --- a/responsememblk.h +++ b/responsememblk.h @@ -79,6 +79,8 @@ class cResponseMemBlk : public cResponseBase { int sendBmlInstHtml(); int sendMp4Covr(); + void sendWidgetConf(); + int sendEpgXml (struct stat *statbuf); int sendUrlsXml (); int sendMediaXml (struct stat *statbuf); |