summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-03-07 13:56:09 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-03-07 13:56:09 +0100
commit1c922cbb542132481004aabe7d7ffff26e641ce9 (patch)
tree133db2dfcdc6841c7bef971f00ebf59578407605
parent74d6d35bce1f724e0d1e1b57fe5b022189c73f2c (diff)
downloadvdr-1c922cbb542132481004aabe7d7ffff26e641ce9.tar.gz
vdr-1c922cbb542132481004aabe7d7ffff26e641ce9.tar.bz2
Added cChannel::IsSourceType() to test if a channel's source is of a given type
-rw-r--r--HISTORY1
-rw-r--r--channels.h3
-rw-r--r--sources.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index aed3841f..1b848143 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6402,3 +6402,4 @@ Video Disk Recorder Revision History
patch: 0 means timeshift recordings are not automatically deleted (the default behavior
as in previous versions), while 1 means to ask the user whether the recording shall be
deleted.
+- Added cChannel::IsSourceType() to test if a channel's source is of a given type.
diff --git a/channels.h b/channels.h
index 98c71dfe..5c9727f1 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 2.9 2010/03/06 11:54:17 kls Exp $
+ * $Id: channels.h 2.10 2010/03/07 13:47:13 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -176,6 +176,7 @@ public:
bool IsCable(void) const { return cSource::IsCable(source); }
bool IsSat(void) const { return cSource::IsSat(source); }
bool IsTerr(void) const { return cSource::IsTerr(source); }
+ bool IsSourceType(char Source) const { return cSource::IsType(source, Source); }
tChannelID GetChannelID(void) const { return tChannelID(source, nid, (nid || tid) ? tid : Transponder(), sid, rid); }
bool HasTimer(void) const;
int Modification(int Mask = CHANNELMOD_ALL);
diff --git a/sources.h b/sources.h
index 116bd2bb..6b362e38 100644
--- a/sources.h
+++ b/sources.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.h 2.2 2010/03/06 11:53:54 kls Exp $
+ * $Id: sources.h 2.3 2010/03/07 13:53:11 kls Exp $
*/
#ifndef __SOURCES_H
@@ -40,6 +40,7 @@ public:
static bool IsCable(int Code) { return (Code & st_Mask) == stCable; }
static bool IsSat(int Code) { return (Code & st_Mask) == stSat; }
static bool IsTerr(int Code) { return (Code & st_Mask) == stTerr; }
+ static bool IsType(int Code, char Source) { return int(Code & st_Mask) == (int(Source) << 24); }
};
class cSources : public cConfig<cSource> {