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:
parent
623991ace0
commit
ed09963253
8
source.c
8
source.c
@ -129,6 +129,8 @@ bool cIptvTransponderParameters::Parse(const char *strP)
|
||||
|
||||
// --- cIptvSourceParam ------------------------------------------------------
|
||||
|
||||
const char *cIptvSourceParam::allowedProtocolCharsS = " abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]()*+?{}/%@&=";
|
||||
|
||||
cIptvSourceParam::cIptvSourceParam(char sourceP, const char *descriptionP)
|
||||
: cSourceParam(sourceP, descriptionP),
|
||||
paramM(0),
|
||||
@ -175,9 +177,9 @@ cOsdItem *cIptvSourceParam::GetOsdItem(void)
|
||||
case 2: return new cMenuEditIntItem( tr("Rid"), &ridM, 0);
|
||||
case 3: return new cMenuEditBoolItem(tr("Scan section ids"), &itpM.sidScanM);
|
||||
case 4: return new cMenuEditBoolItem(tr("Scan pids"), &itpM.pidScanM);
|
||||
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 7: return new cMenuEditIntItem( tr("Parameter"), &itpM.parameterM, 0, 0xFFFF);
|
||||
case 5: return new cMenuEditStraItem(tr("Protocol"), &itpM.protocolM, ELEMENTS(protocolsM), protocolsM);
|
||||
case 6: return new cMenuEditStrItem( tr("Address"), itpM.addressM, sizeof(itpM.addressM), allowedProtocolCharsS);
|
||||
case 7: return new cMenuEditIntItem( tr("Parameter"), &itpM.parameterM, 0, 0xFFFF);
|
||||
default: return NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
3
source.h
3
source.h
@ -58,6 +58,9 @@ private:
|
||||
cIptvTransponderParameters itpM;
|
||||
const char *protocolsM[cIptvTransponderParameters::eProtocolCount];
|
||||
|
||||
private:
|
||||
static const char *allowedProtocolCharsS;
|
||||
|
||||
public:
|
||||
cIptvSourceParam(char sourceP, const char *descriptionP);
|
||||
virtual void SetData(cChannel *channelP);
|
||||
|
Loading…
Reference in New Issue
Block a user