summaryrefslogtreecommitdiff
path: root/update.h
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2022-02-12 09:49:54 +0100
committerhorchi <vdr@jwendel.de>2022-02-12 09:49:54 +0100
commit9c515233168067ee8e56d35a8ee89bfc4d74e618 (patch)
tree44dbd7fb64ef237295a099ed571ea9b800f55077 /update.h
parent29d493f3120a2da8d400e2427151551e32781a86 (diff)
downloadvdr-plugin-epg2vdr-1.2.6.tar.gz
vdr-plugin-epg2vdr-1.2.6.tar.bz2
2022-01-12: version 1.2.6 (horchi)\n - change: Further porting to vdr 2.6 (fixed detection of timer stop)\n\n1.2.6
Diffstat (limited to 'update.h')
-rw-r--r--update.h52
1 files changed, 21 insertions, 31 deletions
diff --git a/update.h b/update.h
index 173763f..77481cb 100644
--- a/update.h
+++ b/update.h
@@ -5,8 +5,7 @@
*
*/
-#ifndef __UPDATE_H
-#define __UPDATE_H
+#pragma once
#include <mysql.h>
#include <queue>
@@ -38,42 +37,36 @@ class cRunningRecording : public cListObject
cRunningRecording(const cTimer* t, long did = na)
{
+ doneid = did;
id = t->Id();
-
- if (remote)
- free(remote);
-
remote = t->Remote() ? strdup(t->Remote()) : nullptr;
- doneid = did;
- lastBreak = 0;
- info = 0;
-
- finished = no;
- failed = no;
-
- // copy until timer get waste ..
-
- aux = strdup(t->Aux() ? t->Aux() : "");
+ aux = notNull(t->Aux());
+ startTime = t->StartTime();
+ stopTime = t->StopTime();
+ file = notNull(t->File());
+ if (t->Event())
+ vps = t->HasFlags(tfVps) && t->Event()->Vps();
}
~cRunningRecording()
{
- free(aux);
- free(info);
+ free(remote);
}
- void setInfo(const char* i) { info = strdup(i); }
-
- // data
+ void setInfo(const char* i) { info = notNull(i); }
- int id = 0; // use timer->Id(), timer->Remote and GetById instead of pointer to a timer
+ int id {0}; // use timer->Id(), timer->Remote and GetById instead of pointer to a timer
char* remote {nullptr};
- time_t lastBreak;
- int finished;
- int failed;
- long doneid;
- char* aux {nullptr};
- char* info {nullptr};
+ time_t lastBreak {0};
+ int finished {no};
+ int failed {no};
+ long doneid {0};
+ std::string aux;
+ std::string info;
+ std::string file;
+ time_t startTime {0};
+ time_t stopTime {0};
+ bool vps {false};
};
//***************************************************************************
@@ -327,6 +320,3 @@ class cUpdate : public cThread, public cStatus, public cParameters
static const char* auxFields[];
};
-
-//***************************************************************************
-#endif //__UPDATE_H