From 1c922cbb542132481004aabe7d7ffff26e641ce9 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 7 Mar 2010 13:56:09 +0100 Subject: Added cChannel::IsSourceType() to test if a channel's source is of a given type --- sources.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sources.h') 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 { -- cgit v1.2.3