1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Added a character validation into the channel editor.

This commit is contained in:
Rolf Ahrenberg 2013-02-23 20:06:55 +02:00
parent 623991ace0
commit ed09963253
2 changed files with 8 additions and 3 deletions

View File

@ -129,6 +129,8 @@ bool cIptvTransponderParameters::Parse(const char *strP)
// --- cIptvSourceParam ------------------------------------------------------ // --- cIptvSourceParam ------------------------------------------------------
const char *cIptvSourceParam::allowedProtocolCharsS = " abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]()*+?{}/%@&=";
cIptvSourceParam::cIptvSourceParam(char sourceP, const char *descriptionP) cIptvSourceParam::cIptvSourceParam(char sourceP, const char *descriptionP)
: cSourceParam(sourceP, descriptionP), : cSourceParam(sourceP, descriptionP),
paramM(0), paramM(0),
@ -175,9 +177,9 @@ cOsdItem *cIptvSourceParam::GetOsdItem(void)
case 2: return new cMenuEditIntItem( tr("Rid"), &ridM, 0); case 2: return new cMenuEditIntItem( tr("Rid"), &ridM, 0);
case 3: return new cMenuEditBoolItem(tr("Scan section ids"), &itpM.sidScanM); case 3: return new cMenuEditBoolItem(tr("Scan section ids"), &itpM.sidScanM);
case 4: return new cMenuEditBoolItem(tr("Scan pids"), &itpM.pidScanM); case 4: return new cMenuEditBoolItem(tr("Scan pids"), &itpM.pidScanM);
case 5: return new cMenuEditStraItem(tr("Protocol"), &itpM.protocolM, ELEMENTS(protocolsM), protocolsM); case 5: return new cMenuEditStraItem(tr("Protocol"), &itpM.protocolM, ELEMENTS(protocolsM), protocolsM);
case 6: return new cMenuEditStrItem( tr("Address"), itpM.addressM, sizeof(itpM.addressM)); case 6: return new cMenuEditStrItem( tr("Address"), itpM.addressM, sizeof(itpM.addressM), allowedProtocolCharsS);
case 7: return new cMenuEditIntItem( tr("Parameter"), &itpM.parameterM, 0, 0xFFFF); case 7: return new cMenuEditIntItem( tr("Parameter"), &itpM.parameterM, 0, 0xFFFF);
default: return NULL; default: return NULL;
} }
return NULL; return NULL;

View File

@ -58,6 +58,9 @@ private:
cIptvTransponderParameters itpM; cIptvTransponderParameters itpM;
const char *protocolsM[cIptvTransponderParameters::eProtocolCount]; const char *protocolsM[cIptvTransponderParameters::eProtocolCount];
private:
static const char *allowedProtocolCharsS;
public: public:
cIptvSourceParam(char sourceP, const char *descriptionP); cIptvSourceParam(char sourceP, const char *descriptionP);
virtual void SetData(cChannel *channelP); virtual void SetData(cChannel *channelP);