diff options
author | horchi <vdr@jwendel.de> | 2022-02-21 15:00:59 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2022-02-21 15:00:59 +0100 |
commit | d1e3f613ce43e5b355807398369393fb8e35e63e (patch) | |
tree | 79d3a951870598473f94d6413ba748174b9a8f8c | |
parent | 9f8fb2260b73971d69691962df472c992d94b123 (diff) | |
download | vdr-plugin-pin-d1e3f613ce43e5b355807398369393fb8e35e63e.tar.gz vdr-plugin-pin-d1e3f613ce43e5b355807398369393fb8e35e63e.tar.bz2 |
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | locks.c | 2 | ||||
-rw-r--r-- | locks.h | 21 | ||||
-rw-r--r-- | menu.h | 16 | ||||
-rw-r--r-- | pin.h | 2 | ||||
-rw-r--r-- | setupmenu.h | 6 | ||||
-rw-r--r-- | talk.h | 8 |
7 files changed, 28 insertions, 28 deletions
@@ -5,6 +5,7 @@ * build version date comment * + * #43 0.1.18 21.02.21, change: compiler porting * #42 0.1.17 05.05.20, change: fixed compile (patch by Alexander Grothe) * #41 0.1.16 01.11.15, added: fixed backward compatibility * #40 0.1.15 09.10.15, added: ported to vdr 2.3.1 @@ -233,7 +233,7 @@ bool cLockItem::MatchPattern(const char* aName) else if (searchMode == smExact) return strcmp(pattern, aName) == 0; else if (searchMode == smInclude) - return strstr(aName, pattern) > 0; + return strstr(aName, pattern) != nullptr; else if (searchMode == smStartWith) return strstr(aName, pattern) == aName; @@ -24,7 +24,7 @@ //*************************************************************************** class cLockItem : public cListObject -{ +{ public: enum SearchMode @@ -38,11 +38,11 @@ class cLockItem : public cListObject smCount }; - + cLockItem(int aActive = no); cLockItem(const char* aName, int aActive = yes, const char* aTitle = 0); virtual ~cLockItem(); - + // interface virtual bool Parse(char* line); @@ -53,7 +53,7 @@ class cLockItem : public cListObject virtual int Locked(long startTime = 0); bool MatchPattern(const char* aName); bool HasName(const char* aName); - + // gettings int GetActive() { return active; } @@ -83,7 +83,7 @@ class cLockItem : public cListObject static const char* searchModes[smCount+1]; protected: - + char* name; char* title; long start; // in seconds @@ -99,7 +99,7 @@ class cLockItem : public cListObject //*************************************************************************** class cLockedBroadcast : public cLockItem -{ +{ public: cLockedBroadcast(); @@ -136,18 +136,18 @@ template<class T> class cLockList : public cConfig<T> if (!aName) return 0; - + for (item = (T*)this->First(); item; item = (T*)this->Next(item)) { if (item->HasName(aName)) return item; } - + return 0; } protected: - + int listType; }; @@ -173,10 +173,9 @@ class cLockedBroadcasts : public cLockList<cLockedBroadcast> public: cLockedBroadcasts(int aType = na) : cLockList<cLockedBroadcast>::cLockList(aType) {} - + virtual int Locked(const char* aName, long startTime = 0); }; //*************************************************************************** #endif // VDR_PIN_LOCKS_H - @@ -24,7 +24,7 @@ class cPinMenuItem : public cOsdItem { public: - + cPinMenuItem(const char* title, int osState); }; @@ -48,12 +48,12 @@ class cPinMenu : public cOsdMenu, public PinService miEditMenuItemList, miProtectSetup }; - - cPinMenu(const char* title, cLockItems* theChannels, + + cPinMenu(const char* title, cLockItems* theChannels, cLockedBroadcasts* theBroadcasts, cLockItems* thePlugins, cLockItems* theMenuItems); virtual ~cPinMenu(); - + virtual eOSState ProcessKey(eKeys key); int addCurrentChannel(); @@ -74,9 +74,9 @@ class cPinMenu : public cOsdMenu, public PinService class cLockMenuItem : public cOsdItem { - + public: - + cLockMenuItem(cLockItem* aItem); virtual ~cLockMenuItem(); @@ -96,10 +96,10 @@ class cLockMenuItem : public cOsdItem class cLockMenu : public cOsdMenu, public PinService { public: - + cLockMenu(const char* title, cLockItems* theItems, ListType theType); virtual ~cLockMenu(); - + eOSState ProcessKey(eKeys key); protected: @@ -25,7 +25,7 @@ // Constants //*************************************************************************** -static const char *VERSION = "0.1.17"; +static const char *VERSION = "0.1.18"; static const char *DESCRIPTION = "Childlock plugin"; static const char *MAINMENUENTRY = tr("Childlock"); diff --git a/setupmenu.h b/setupmenu.h index 7b70944..7f70a50 100644 --- a/setupmenu.h +++ b/setupmenu.h @@ -17,12 +17,12 @@ class PinSetupMenu : public cMenuSetupPage { public: - + PinSetupMenu(); ~PinSetupMenu(); - + protected: - + void Store(void); // data @@ -51,7 +51,7 @@ class Talk evtAnswer, // = 5 evtExit // = 6 }; - + struct Header { long sender; @@ -74,11 +74,11 @@ class Talk int isOpen() { return opened; } long getTimeout() { return timeout; } - int getEvent() { return event; } - long getFrom() { return from; } + int getEvent() { return event; } + long getFrom() { return from; } const char* getMessage() { return message; } - void setTimeout(long t) { timeout = t; } + void setTimeout(long t) { timeout = t; } protected: |