summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorT <t.l@g.de>2017-03-30 22:57:49 +0200
committerT <t.l@g.de>2017-03-30 22:57:49 +0200
commitf8ecc2cd3727b0fde8e75a66b4f20ba8d2670e37 (patch)
tree748a1a5f8fb34afbc915565bdfaf0464e5fa72fb
parent176a5badb7842f49ec86a456643b617d2099d007 (diff)
downloadvdr-plugin-smarttvweb-f8ecc2cd3727b0fde8e75a66b4f20ba8d2670e37.tar.gz
vdr-plugin-smarttvweb-f8ecc2cd3727b0fde8e75a66b4f20ba8d2670e37.tar.bz2
Changes due to API version 2.3.0
-rwxr-xr-xresponsememblk.c11
-rwxr-xr-xsmarttvfactory.c19
-rwxr-xr-xsmarttvfactory.h8
3 files changed, 37 insertions, 1 deletions
diff --git a/responsememblk.c b/responsememblk.c
index 7a72b67..410ff1b 100755
--- a/responsememblk.c
+++ b/responsememblk.c
@@ -2762,9 +2762,14 @@ int cResponseMemBlk::GetRecordings( ) {
hdr+= "<title>VDR Recordings List</title>\n";
*mResponseMessage += hdr;
+#if APIVERSNUM > 20300
+ LOCK_RECORDINGS_READ;
+ const cRecording *recording = NULL;
+ recording = Recordings->First();
+#else
cRecording *recording = NULL;
recording = Recordings.First();
-
+#endif
while (recording != NULL) {
hdr = "";
@@ -2797,7 +2802,11 @@ int cResponseMemBlk::GetRecordings( ) {
return OKAY;
}
item_count ++;
+#if APIVERSNUM > 20300
+ recording = (!single_item) ? Recordings->Next(recording) : NULL;
+#else
recording = (!single_item) ? Recordings.Next(recording) : NULL;
+#endif
}
hdr = "</channel>\n";
diff --git a/smarttvfactory.c b/smarttvfactory.c
index eba6329..ac29a45 100755
--- a/smarttvfactory.c
+++ b/smarttvfactory.c
@@ -136,8 +136,13 @@ void cRecFolder::print(string pref) {
};
+#if APIVERSNUM > 20300
+cRecEntry::cRecEntry(string n, int l, Log* lg, const cRecording* r) : cRecEntryBase(n, l, false, lg), mRec(r), mSubfolders(),
+ mError(false), mTitle(n) {
+#else
cRecEntry::cRecEntry(string n, int l, Log* lg, cRecording* r) : cRecEntryBase(n, l, false, lg), mRec(r), mSubfolders(),
mError(false), mTitle(n) {
+#endif
size_t pos = 0;
size_t l_pos = 0;
@@ -956,7 +961,12 @@ void SmartTvServer::acceptHttpResource(int &req_id) {
cRecFolder* SmartTvServer::GetRecDb() {
+#if APIVERSNUM > 20300
+ static cStateKey RecordingsStateKey;
+ bool changed = cRecordings::GetRecordingsRead(RecordingsStateKey);
+#else
bool changed = Recordings.StateChanged(mRecState);
+#endif
*(mLog.log()) << mLog.getTimeString()
<< " GetRecDb Changed= " << ((changed) ? "Yes" : "No")
<< endl;
@@ -970,7 +980,12 @@ cRecFolder* SmartTvServer::GetRecDb() {
}
void SmartTvServer::CreateRecDb() {
+#if APIVERSNUM > 20300
+ LOCK_RECORDINGS_READ
+ const cRecording *recording = Recordings->First();
+#else
cRecording *recording = Recordings.First();
+#endif
*(mLog.log()) << mLog.getTimeString() << ": CreateRecDb "
<< " NewState= " << mRecState
<< endl;
@@ -989,7 +1004,11 @@ void SmartTvServer::CreateRecDb() {
<< " FName= " << recording->Name()
<< endl;
*/
+#if APIVERSNUM > 20300
+ recording = Recordings->Next(recording);
+#else
recording = Recordings.Next(recording);
+#endif
}
diff --git a/smarttvfactory.h b/smarttvfactory.h
index 5356bb6..e313e65 100755
--- a/smarttvfactory.h
+++ b/smarttvfactory.h
@@ -123,7 +123,11 @@ class cRecFolder : public cRecEntryBase {
};
class cRecEntry : public cRecEntryBase {
+#if APIVERSNUM > 20300
+ const cRecording* mRec;
+#else
cRecording* mRec;
+#endif
// bool mIsFolder ;
public:
vector<string> mSubfolders;
@@ -132,7 +136,11 @@ class cRecEntry : public cRecEntryBase {
string mTitle;
// list<cRecEntry*> mEntries; // only when folder
+#if APIVERSNUM > 20300
+ cRecEntry(string mName, int l, Log* lg, const cRecording*);
+#else
cRecEntry(string mName, int l, Log* lg, cRecording*);
+#endif
virtual ~cRecEntry() {};
int writeXmlItem(string *, string own_ip, int own_port);