Constified all TokenDicts in the ysig library.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4121 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-02-21 11:56:06 +00:00
parent d8255c7ee1
commit a8c6c7d2b6
7 changed files with 85 additions and 85 deletions

View File

@ -28,7 +28,7 @@
using namespace TelEngine; using namespace TelEngine;
#define MAKE_NAME(x) { #x, x } #define MAKE_NAME(x) { #x, x }
TokenDict SS7PointCode::s_names[] = { const TokenDict SS7PointCode::s_names[] = {
MAKE_NAME(ITU), MAKE_NAME(ITU),
MAKE_NAME(ANSI), MAKE_NAME(ANSI),
MAKE_NAME(ANSI8), MAKE_NAME(ANSI8),

View File

@ -525,7 +525,7 @@ unsigned int SignallingTimer::getInterval(const NamedList& params, const char* p
*/ */
// Coding standard as defined in Q.931/Q.850 // Coding standard as defined in Q.931/Q.850
static TokenDict s_dict_codingStandard[] = { static const TokenDict s_dict_codingStandard[] = {
{"CCITT", 0x00}, {"CCITT", 0x00},
{"ISO/IEC", 0x20}, {"ISO/IEC", 0x20},
{"national", 0x40}, {"national", 0x40},
@ -534,7 +534,7 @@ static TokenDict s_dict_codingStandard[] = {
}; };
// Locations as defined in Q.850 // Locations as defined in Q.850
static TokenDict s_dict_location[] = { static const TokenDict s_dict_location[] = {
{"U", 0x00}, // User {"U", 0x00}, // User
{"LPN", 0x01}, // Private network serving the local user {"LPN", 0x01}, // Private network serving the local user
{"LN", 0x02}, // Public network serving the local user {"LN", 0x02}, // Public network serving the local user
@ -549,7 +549,7 @@ static TokenDict s_dict_location[] = {
// Q.850 2.2.5. Cause class: Bits 4-6 // Q.850 2.2.5. Cause class: Bits 4-6
// Q.850 Table 1. Cause value: Bits 0-6 // Q.850 Table 1. Cause value: Bits 0-6
// Defined for CCITT coding standard // Defined for CCITT coding standard
static TokenDict s_dict_causeCCITT[] = { static const TokenDict s_dict_causeCCITT[] = {
// normal-event class // normal-event class
{"normal-event", 0x00}, {"normal-event", 0x00},
{"unallocated", 0x01}, // Unallocated (unassigned) number {"unallocated", 0x01}, // Unallocated (unassigned) number
@ -638,7 +638,7 @@ static TokenDict s_dict_causeCCITT[] = {
// Q.931 4.5.5. Information transfer capability: Bits 0-4 // Q.931 4.5.5. Information transfer capability: Bits 0-4
// Defined for CCITT coding standard // Defined for CCITT coding standard
static TokenDict s_dict_transferCapCCITT[] = { static const TokenDict s_dict_transferCapCCITT[] = {
{"speech", 0x00}, // Speech {"speech", 0x00}, // Speech
{"udi", 0x08}, // Unrestricted digital information {"udi", 0x08}, // Unrestricted digital information
{"rdi", 0x09}, // Restricted digital information {"rdi", 0x09}, // Restricted digital information
@ -650,7 +650,7 @@ static TokenDict s_dict_transferCapCCITT[] = {
// Q.931 4.5.5. Transfer mode: Bits 5,6 // Q.931 4.5.5. Transfer mode: Bits 5,6
// Defined for CCITT coding standard // Defined for CCITT coding standard
static TokenDict s_dict_transferModeCCITT[] = { static const TokenDict s_dict_transferModeCCITT[] = {
{"circuit", 0x00}, // Circuit switch mode {"circuit", 0x00}, // Circuit switch mode
{"packet", 0x40}, // Packet mode {"packet", 0x40}, // Packet mode
{0,0} {0,0}
@ -658,7 +658,7 @@ static TokenDict s_dict_transferModeCCITT[] = {
// Q.931 4.5.5. Transfer rate: Bits 0-4 // Q.931 4.5.5. Transfer rate: Bits 0-4
// Defined for CCITT coding standard // Defined for CCITT coding standard
static TokenDict s_dict_transferRateCCITT[] = { static const TokenDict s_dict_transferRateCCITT[] = {
{"packet", 0x00}, // Packet mode only {"packet", 0x00}, // Packet mode only
{"64kbit", 0x10}, // 64 kbit/s {"64kbit", 0x10}, // 64 kbit/s
{"2x64kbit", 0x11}, // 2x64 kbit/s {"2x64kbit", 0x11}, // 2x64 kbit/s
@ -671,7 +671,7 @@ static TokenDict s_dict_transferRateCCITT[] = {
// Q.931 4.5.5. User information Layer 1 protocol: Bits 0-4 // Q.931 4.5.5. User information Layer 1 protocol: Bits 0-4
// Defined for CCITT coding standard // Defined for CCITT coding standard
static TokenDict s_dict_formatCCITT[] = { static const TokenDict s_dict_formatCCITT[] = {
{"v110", 0x01}, // Recomendation V.110 and X.30 {"v110", 0x01}, // Recomendation V.110 and X.30
{"mulaw", 0x02}, // Recomendation G.711 mu-law {"mulaw", 0x02}, // Recomendation G.711 mu-law
{"alaw", 0x03}, // Recomendation G.711 A-law {"alaw", 0x03}, // Recomendation G.711 A-law
@ -683,7 +683,7 @@ static TokenDict s_dict_formatCCITT[] = {
{0,0} {0,0}
}; };
TokenDict* SignallingUtils::s_dictCCITT[5] = { const TokenDict* SignallingUtils::s_dictCCITT[5] = {
s_dict_causeCCITT, s_dict_causeCCITT,
s_dict_formatCCITT, s_dict_formatCCITT,
s_dict_transferCapCCITT, s_dict_transferCapCCITT,
@ -901,7 +901,7 @@ bool SignallingUtils::decodeCaps(const SignallingComponent* comp, NamedList& lis
// Encode a comma separated list of flags. Flags can be prefixed with the '-' // Encode a comma separated list of flags. Flags can be prefixed with the '-'
// character to be reset if previously set // character to be reset if previously set
void SignallingUtils::encodeFlags(const SignallingComponent* comp, void SignallingUtils::encodeFlags(const SignallingComponent* comp,
int& dest, const String& flags, TokenDict* dict) int& dest, const String& flags, const TokenDict* dict)
{ {
if (flags.null() || !dict) if (flags.null() || !dict)
return; return;
@ -910,7 +910,7 @@ void SignallingUtils::encodeFlags(const SignallingComponent* comp,
for (ObjList* o = list->skipNull(); o; o = o->skipNext()) { for (ObjList* o = list->skipNull(); o; o = o->skipNext()) {
String* s = static_cast<String*>(o->get()); String* s = static_cast<String*>(o->get());
bool set = !s->startSkip("-",false); bool set = !s->startSkip("-",false);
TokenDict* p = dict; const TokenDict* p = dict;
for (; p->token && *s != p->token; p++) ; for (; p->token && *s != p->token; p++) ;
if (!p->token) { if (!p->token) {
DDebug(comp,DebugAll,"Utils::encodeFlags '%s' not found",s->c_str()); DDebug(comp,DebugAll,"Utils::encodeFlags '%s' not found",s->c_str());

View File

@ -28,7 +28,7 @@
using namespace TelEngine; using namespace TelEngine;
// SignallingInterface notification texts used to print debug // SignallingInterface notification texts used to print debug
TokenDict SignallingInterface::s_notifName[] = { const TokenDict SignallingInterface::s_notifName[] = {
{"LinkUp", LinkUp}, {"LinkUp", LinkUp},
{"LinkDown", LinkDown}, {"LinkDown", LinkDown},
{"HWError", HardwareError}, {"HWError", HardwareError},

View File

@ -1733,7 +1733,7 @@ bool ISDNQ921Passive::dropFrame(const ISDNFrame* frame, const char* reason)
/** /**
* ISDNLayer2 * ISDNLayer2
*/ */
TokenDict ISDNLayer2::m_states[] = { const TokenDict ISDNLayer2::m_states[] = {
{"Released", Released}, {"Released", Released},
{"WaitEstablish", WaitEstablish}, {"WaitEstablish", WaitEstablish},
{"Established", Established}, {"Established", Established},
@ -1985,7 +1985,7 @@ static inline void setControl(u_int8_t* buf, u_int8_t cr_ns, u_int8_t nr, bool p
buf[3] |= 0x01; buf[3] |= 0x01;
} }
TokenDict ISDNFrame::s_types[] = { const TokenDict ISDNFrame::s_types[] = {
{"DISC", DISC}, {"DISC", DISC},
{"DM", DM}, {"DM", DM},
{"FRMR", FRMR}, {"FRMR", FRMR},

View File

@ -168,29 +168,29 @@ public:
u_int8_t encode(ISDNQ931Message* msg, ObjList& dest); u_int8_t encode(ISDNQ931Message* msg, ObjList& dest);
// Field names // Field names
static TokenDict s_dict_congestion[]; static const TokenDict s_dict_congestion[];
static TokenDict s_dict_bearerTransCap[]; static const TokenDict s_dict_bearerTransCap[];
static TokenDict s_dict_bearerTransMode[]; static const TokenDict s_dict_bearerTransMode[];
static TokenDict s_dict_bearerTransRate[]; static const TokenDict s_dict_bearerTransRate[];
static TokenDict s_dict_bearerProto1[]; static const TokenDict s_dict_bearerProto1[];
static TokenDict s_dict_bearerProto2[]; static const TokenDict s_dict_bearerProto2[];
static TokenDict s_dict_bearerProto3[]; static const TokenDict s_dict_bearerProto3[];
static TokenDict s_dict_typeOfNumber[]; static const TokenDict s_dict_typeOfNumber[];
static TokenDict s_dict_numPlan[]; static const TokenDict s_dict_numPlan[];
static TokenDict s_dict_presentation[]; static const TokenDict s_dict_presentation[];
static TokenDict s_dict_screening[]; static const TokenDict s_dict_screening[];
static TokenDict s_dict_subaddrType[]; static const TokenDict s_dict_subaddrType[];
static TokenDict s_dict_channelIDSelect_BRI[]; static const TokenDict s_dict_channelIDSelect_BRI[];
static TokenDict s_dict_channelIDSelect_PRI[]; static const TokenDict s_dict_channelIDSelect_PRI[];
static TokenDict s_dict_channelIDUnits[]; static const TokenDict s_dict_channelIDUnits[];
static TokenDict s_dict_loLayerProto2[]; static const TokenDict s_dict_loLayerProto2[];
static TokenDict s_dict_loLayerProto3[]; static const TokenDict s_dict_loLayerProto3[];
static TokenDict s_dict_networkIdType[]; static const TokenDict s_dict_networkIdType[];
static TokenDict s_dict_networkIdPlan[]; static const TokenDict s_dict_networkIdPlan[];
static TokenDict s_dict_notification[]; static const TokenDict s_dict_notification[];
static TokenDict s_dict_progressDescr[]; static const TokenDict s_dict_progressDescr[];
static TokenDict s_dict_restartClass[]; static const TokenDict s_dict_restartClass[];
static TokenDict s_dict_signalValue[]; static const TokenDict s_dict_signalValue[];
private: private:
// Encode a full message. Parameter ieEncoded is true if the IEs buffers are already filled // Encode a full message. Parameter ieEncoded is true if the IEs buffers are already filled
@ -562,7 +562,7 @@ bool ISDNQ931IEData::processKeypad(ISDNQ931Message* msg, bool add,
/** /**
* ISDNQ931State * ISDNQ931State
*/ */
TokenDict ISDNQ931State::s_states[] = { const TokenDict ISDNQ931State::s_states[] = {
{"Null", Null}, {"Null", Null},
{"CallInitiated", CallInitiated}, {"CallInitiated", CallInitiated},
{"OverlapSend", OverlapSend}, {"OverlapSend", OverlapSend},
@ -2311,7 +2311,7 @@ ISDNQ931ParserData::ISDNQ931ParserData(const NamedList& params, DebugEnabler* db
/** /**
* ISDNQ931 * ISDNQ931
*/ */
TokenDict ISDNQ931::s_flags[] = { const TokenDict ISDNQ931::s_flags[] = {
{"sendnonisdnsource", SendNonIsdnSource}, {"sendnonisdnsource", SendNonIsdnSource},
{"ignorenonisdndest", IgnoreNonIsdnDest}, {"ignorenonisdndest", IgnoreNonIsdnDest},
{"forcepresnetprov", ForcePresNetProv}, {"forcepresnetprov", ForcePresNetProv},
@ -2327,7 +2327,7 @@ TokenDict ISDNQ931::s_flags[] = {
{0,0}, {0,0},
}; };
TokenDict ISDNQ931::s_swType[] = { const TokenDict ISDNQ931::s_swType[] = {
{"euro-isdn-e1", EuroIsdnE1}, {"euro-isdn-e1", EuroIsdnE1},
{"euro-isdn-t1", EuroIsdnT1}, {"euro-isdn-t1", EuroIsdnT1},
{"national-isdn", NationalIsdn}, {"national-isdn", NationalIsdn},
@ -2418,7 +2418,7 @@ ISDNQ931::ISDNQ931(const NamedList& params, const char* name)
#ifdef DEBUG #ifdef DEBUG
s << " type=" << lookup(m_parserData.m_flags,s_swType,"Custom"); s << " type=" << lookup(m_parserData.m_flags,s_swType,"Custom");
String t; String t;
for (TokenDict* p = s_flags; p->token; p++) for (const TokenDict* p = s_flags; p->token; p++)
if (m_parserData.flag(p->value)) if (m_parserData.flag(p->value))
t.append(p->token,","); t.append(p->token,",");
if (!t.null()) if (!t.null())
@ -3780,7 +3780,7 @@ void ISDNQ931Monitor::terminateMonitor(ISDNQ931CallMonitor* mon, const char* rea
/** /**
* ISDNQ931IE * ISDNQ931IE
*/ */
TokenDict ISDNQ931IE::s_type[] = { const TokenDict ISDNQ931IE::s_type[] = {
{"Shift", Shift}, {"Shift", Shift},
{"More data", MoreData}, {"More data", MoreData},
{"Sending complete", SendComplete}, {"Sending complete", SendComplete},
@ -3854,7 +3854,7 @@ void ISDNQ931IE::toString(String& dest, bool extendedDebug, const char* before)
/** /**
* ISDNQ931Message * ISDNQ931Message
*/ */
TokenDict ISDNQ931Message::s_type[] = { const TokenDict ISDNQ931Message::s_type[] = {
{"ALERTING", Alerting}, {"ALERTING", Alerting},
{"CALL PROCEEDING", Proceeding}, {"CALL PROCEEDING", Proceeding},
{"CONNECT", Connect}, {"CONNECT", Connect},
@ -4071,7 +4071,7 @@ static const char* s_errorUnsuppCoding = "unsupported coding standard";
// *** Fixed (1 byte length) IEs // *** Fixed (1 byte length) IEs
// 4.5.14 // 4.5.14
TokenDict Q931Parser::s_dict_congestion[] = { const TokenDict Q931Parser::s_dict_congestion[] = {
{"recv-ready", 0x00}, // Receiver ready {"recv-ready", 0x00}, // Receiver ready
{"recv-not-ready", 0x0f}, // Receiver not ready {"recv-not-ready", 0x0f}, // Receiver not ready
// aliases for level=... // aliases for level=...
@ -4093,7 +4093,7 @@ static const IEParam s_ie_ieFixed[] = {
// *** Q.931 4.5.5: Bearer capability // *** Q.931 4.5.5: Bearer capability
// Q.931 4.5.5. Information transfer capability: Bits 0-4 // Q.931 4.5.5. Information transfer capability: Bits 0-4
TokenDict Q931Parser::s_dict_bearerTransCap[] = { const TokenDict Q931Parser::s_dict_bearerTransCap[] = {
{"speech", 0x00}, // Speech {"speech", 0x00}, // Speech
{"udi", 0x08}, // Unrestricted digital information {"udi", 0x08}, // Unrestricted digital information
{"rdi", 0x09}, // Restricted digital information {"rdi", 0x09}, // Restricted digital information
@ -4104,14 +4104,14 @@ TokenDict Q931Parser::s_dict_bearerTransCap[] = {
}; };
// Q.931 4.5.5. Transfer mode: Bits 5,6 // Q.931 4.5.5. Transfer mode: Bits 5,6
TokenDict Q931Parser::s_dict_bearerTransMode[] = { const TokenDict Q931Parser::s_dict_bearerTransMode[] = {
{"circuit", 0x00}, // Circuit switch mode {"circuit", 0x00}, // Circuit switch mode
{"packet", 0x40}, // Packet mode {"packet", 0x40}, // Packet mode
{0,0} {0,0}
}; };
// Q.931 4.5.5. Transfer rate: Bits 0-4 // Q.931 4.5.5. Transfer rate: Bits 0-4
TokenDict Q931Parser::s_dict_bearerTransRate[] = { const TokenDict Q931Parser::s_dict_bearerTransRate[] = {
{"packet", 0x00}, // Packet mode use {"packet", 0x00}, // Packet mode use
{"64kbit", 0x10}, // 64 kbit/s {"64kbit", 0x10}, // 64 kbit/s
{"2x64kbit", 0x11}, // 2x64 kbit/s {"2x64kbit", 0x11}, // 2x64 kbit/s
@ -4123,7 +4123,7 @@ TokenDict Q931Parser::s_dict_bearerTransRate[] = {
}; };
// Q.931 4.5.5. User information Layer 1 protocol: Bits 0-4 // Q.931 4.5.5. User information Layer 1 protocol: Bits 0-4
TokenDict Q931Parser::s_dict_bearerProto1[] = { const TokenDict Q931Parser::s_dict_bearerProto1[] = {
{"v110", 0x01}, // Recomendation V.110 and X.30 {"v110", 0x01}, // Recomendation V.110 and X.30
{"mulaw", 0x02}, // Recomendation G.711 mu-law {"mulaw", 0x02}, // Recomendation G.711 mu-law
{"alaw", 0x03}, // Recomendation G.711 A-law {"alaw", 0x03}, // Recomendation G.711 A-law
@ -4136,14 +4136,14 @@ TokenDict Q931Parser::s_dict_bearerProto1[] = {
}; };
// Q.931 4.5.5. User information Layer 2 protocol: Bits 0-4 // Q.931 4.5.5. User information Layer 2 protocol: Bits 0-4
TokenDict Q931Parser::s_dict_bearerProto2[] = { const TokenDict Q931Parser::s_dict_bearerProto2[] = {
{"q921", 0x02}, // Recommendation Q.921 or I441 {"q921", 0x02}, // Recommendation Q.921 or I441
{"x25", 0x06}, // Recommendation X.25 link layer {"x25", 0x06}, // Recommendation X.25 link layer
{0,0} {0,0}
}; };
// Q.931 4.5.5. User information Layer 3 protocol: Bits 0-4 // Q.931 4.5.5. User information Layer 3 protocol: Bits 0-4
TokenDict Q931Parser::s_dict_bearerProto3[] = { const TokenDict Q931Parser::s_dict_bearerProto3[] = {
{"q931", 0x02}, // Recommendation Q.931 or I451 {"q931", 0x02}, // Recommendation Q.931 or I451
{"x25", 0x06}, // Recommendation X.25 packet layer {"x25", 0x06}, // Recommendation X.25 packet layer
{0,0} {0,0}
@ -4184,7 +4184,7 @@ static const IEParam s_ie_ieCallState[] = {
// Q.931 4.5.10: Calling party number // Q.931 4.5.10: Calling party number
// Q.931 4.5.10 Type of number: Bits 4-6 // Q.931 4.5.10 Type of number: Bits 4-6
TokenDict Q931Parser::s_dict_typeOfNumber[] = { const TokenDict Q931Parser::s_dict_typeOfNumber[] = {
{"unknown", 0x00}, // Unknown {"unknown", 0x00}, // Unknown
{"international", 0x10}, // International number {"international", 0x10}, // International number
{"national", 0x20}, // National number {"national", 0x20}, // National number
@ -4196,7 +4196,7 @@ TokenDict Q931Parser::s_dict_typeOfNumber[] = {
}; };
// Q.931 4.5.10 Numbering plan: Bits 0-3. Apply only for type 0,1,2,4 // Q.931 4.5.10 Numbering plan: Bits 0-3. Apply only for type 0,1,2,4
TokenDict Q931Parser::s_dict_numPlan[] = { const TokenDict Q931Parser::s_dict_numPlan[] = {
{"unknown", 0x00}, // Unknown {"unknown", 0x00}, // Unknown
{"isdn", 0x01}, // ISDN/telephoby numbering plan {"isdn", 0x01}, // ISDN/telephoby numbering plan
{"data", 0x03}, // Data numbering plan {"data", 0x03}, // Data numbering plan
@ -4208,7 +4208,7 @@ TokenDict Q931Parser::s_dict_numPlan[] = {
}; };
// Q.931 4.5.10 Presentation indicator: Bits 5,6 // Q.931 4.5.10 Presentation indicator: Bits 5,6
TokenDict Q931Parser::s_dict_presentation[] = { const TokenDict Q931Parser::s_dict_presentation[] = {
{"allowed", 0x00}, // Presentation allowed {"allowed", 0x00}, // Presentation allowed
{"restricted", 0x20}, // Presentation restricted {"restricted", 0x20}, // Presentation restricted
{"unavailable", 0x40}, // Number not available due to interworking {"unavailable", 0x40}, // Number not available due to interworking
@ -4222,7 +4222,7 @@ TokenDict Q931Parser::s_dict_presentation[] = {
}; };
// Q.931 4.5.10 Presentation indicator: Bits 0,1 // Q.931 4.5.10 Presentation indicator: Bits 0,1
TokenDict Q931Parser::s_dict_screening[] = { const TokenDict Q931Parser::s_dict_screening[] = {
{"user-provided", 0x00}, // User-provided, not screened {"user-provided", 0x00}, // User-provided, not screened
{"user-provided-passed", 0x01}, // User-provided, verified and passed {"user-provided-passed", 0x01}, // User-provided, verified and passed
{"user-provided-failed", 0x02}, // User-provided, verified and failed {"user-provided-failed", 0x02}, // User-provided, verified and failed
@ -4249,7 +4249,7 @@ static const IEParam s_ie_ieNumber[] = {
// Q.931 4.5.11: Calling party subaddress // Q.931 4.5.11: Calling party subaddress
// Q.931 4.5.9 Type of subaddress: Bits 5-6 // Q.931 4.5.9 Type of subaddress: Bits 5-6
TokenDict Q931Parser::s_dict_subaddrType[] = { const TokenDict Q931Parser::s_dict_subaddrType[] = {
{"nsap", 0x00}, // NSAP (CCITT Rec. X.213/ISO 8348 AD2) {"nsap", 0x00}, // NSAP (CCITT Rec. X.213/ISO 8348 AD2)
{"user", 0x20}, // User-specified {"user", 0x20}, // User-specified
{0,0} {0,0}
@ -4266,7 +4266,7 @@ static const IEParam s_ie_ieSubAddress[] = {
// *** Q.931 4.5.13: Channel identification // *** Q.931 4.5.13: Channel identification
// Q.931 4.5.13. Channel id selection for BRI interface: Bits 0,1 // Q.931 4.5.13. Channel id selection for BRI interface: Bits 0,1
TokenDict Q931Parser::s_dict_channelIDSelect_BRI[] = { const TokenDict Q931Parser::s_dict_channelIDSelect_BRI[] = {
{"none", 0x00}, // No channel {"none", 0x00}, // No channel
{"b1", 0x01}, // B1 channel {"b1", 0x01}, // B1 channel
{"b2", 0x02}, // B2 channel {"b2", 0x02}, // B2 channel
@ -4275,7 +4275,7 @@ TokenDict Q931Parser::s_dict_channelIDSelect_BRI[] = {
}; };
// Q.931 4.5.13. Channel id selection for PRI interface: Bits 0,1 // Q.931 4.5.13. Channel id selection for PRI interface: Bits 0,1
TokenDict Q931Parser::s_dict_channelIDSelect_PRI[] = { const TokenDict Q931Parser::s_dict_channelIDSelect_PRI[] = {
{"none", 0x00}, // No channel {"none", 0x00}, // No channel
{"present", 0x01}, // Defined by the following bytes {"present", 0x01}, // Defined by the following bytes
{"reserved", 0x02}, // Reserved value {"reserved", 0x02}, // Reserved value
@ -4284,7 +4284,7 @@ TokenDict Q931Parser::s_dict_channelIDSelect_PRI[] = {
}; };
// Q.931 4.5.13. Channel type: Bits 0-3 // Q.931 4.5.13. Channel type: Bits 0-3
TokenDict Q931Parser::s_dict_channelIDUnits[] = { const TokenDict Q931Parser::s_dict_channelIDUnits[] = {
{"B", 0x03}, // B-channel {"B", 0x03}, // B-channel
{"H0", 0x06}, // H0-channel {"H0", 0x06}, // H0-channel
{"H11", 0x08}, // H11-channel {"H11", 0x08}, // H11-channel
@ -4353,7 +4353,7 @@ static const IEParam s_ie_ieKeypad[] = {
// *** Q.931 4.5.19: Low layer compatibility // *** Q.931 4.5.19: Low layer compatibility
// Q.931 4.5.19. User information Layer 2 protocol: Bits 0-4 // Q.931 4.5.19. User information Layer 2 protocol: Bits 0-4
TokenDict Q931Parser::s_dict_loLayerProto2[] = { const TokenDict Q931Parser::s_dict_loLayerProto2[] = {
{"iso1745", 0x01}, // Basic mode ISO 1745 {"iso1745", 0x01}, // Basic mode ISO 1745
{"q921", 0x02}, // Recommendation Q.921 or I441 {"q921", 0x02}, // Recommendation Q.921 or I441
{"x25", 0x06}, // Recommendation X.25 link layer {"x25", 0x06}, // Recommendation X.25 link layer
@ -4372,7 +4372,7 @@ TokenDict Q931Parser::s_dict_loLayerProto2[] = {
}; };
// Q.931 4.5.19. User information Layer 3 protocol: Bits 0-4 // Q.931 4.5.19. User information Layer 3 protocol: Bits 0-4
TokenDict Q931Parser::s_dict_loLayerProto3[] = { const TokenDict Q931Parser::s_dict_loLayerProto3[] = {
{"q931", 0x02}, // Recommendation Q.931 or I451 {"q931", 0x02}, // Recommendation Q.931 or I451
{"x25", 0x06}, // Recommendation X.25 packet layer {"x25", 0x06}, // Recommendation X.25 packet layer
{"iso8208", 0x07}, // ISO/IEC 8208 (X.25 packet level protocol for data terminal equipment) {"iso8208", 0x07}, // ISO/IEC 8208 (X.25 packet level protocol for data terminal equipment)
@ -4409,7 +4409,7 @@ static const IEParam s_ie_ieLoLayerCompat[] = {
// Q.931 4.5.29: Transit network selection // Q.931 4.5.29: Transit network selection
// Q.931 4.5.21. Type of network identification: Bits 4-6 // Q.931 4.5.21. Type of network identification: Bits 4-6
TokenDict Q931Parser::s_dict_networkIdType[] = { const TokenDict Q931Parser::s_dict_networkIdType[] = {
{"user", 0x00}, // User specified {"user", 0x00}, // User specified
{"national", 0x20}, // National network identification {"national", 0x20}, // National network identification
{"international", 0x30}, // International network identification {"international", 0x30}, // International network identification
@ -4417,7 +4417,7 @@ TokenDict Q931Parser::s_dict_networkIdType[] = {
}; };
// Q.931 4.5.21. Network identification plan: Bits 0-3 // Q.931 4.5.21. Network identification plan: Bits 0-3
TokenDict Q931Parser::s_dict_networkIdPlan[] = { const TokenDict Q931Parser::s_dict_networkIdPlan[] = {
{"unknown", 0x00}, // Unknown {"unknown", 0x00}, // Unknown
{"carrier", 0x01}, // Carrier identification code {"carrier", 0x01}, // Carrier identification code
{"data", 0x03}, // Data network identification code (Recommendation X.121) {"data", 0x03}, // Data network identification code (Recommendation X.121)
@ -4443,7 +4443,7 @@ static const IEParam s_ie_ieNetTransit[] = {
// *** Q.931 4.5.22: Notification // *** Q.931 4.5.22: Notification
TokenDict Q931Parser::s_dict_notification[] = { const TokenDict Q931Parser::s_dict_notification[] = {
{"suspended", 0x00}, {"suspended", 0x00},
{"resumed", 0x01}, {"resumed", 0x01},
{"bearer-service-change", 0x02}, {"bearer-service-change", 0x02},
@ -4459,7 +4459,7 @@ static const IEParam s_ie_ieNotification[] = {
// *** Q.931 4.5.23: Progress indication // *** Q.931 4.5.23: Progress indication
// Progress description: Bits 0-6 // Progress description: Bits 0-6
TokenDict Q931Parser::s_dict_progressDescr[] = { const TokenDict Q931Parser::s_dict_progressDescr[] = {
{"non-isdn", 0x01}, // Call is not end-to-end ISDN, further call progress info may be present in-band {"non-isdn", 0x01}, // Call is not end-to-end ISDN, further call progress info may be present in-band
{"non-isdn-destination", 0x02}, // Destination address is non ISDN {"non-isdn-destination", 0x02}, // Destination address is non ISDN
{"non-isdn-source", 0x03}, // Source address is non ISDN {"non-isdn-source", 0x03}, // Source address is non ISDN
@ -4479,7 +4479,7 @@ static const IEParam s_ie_ieProgress[] = {
// *** Q.931 4.5.25: Restart indicator // *** Q.931 4.5.25: Restart indicator
// Class: Bits 0-2 // Class: Bits 0-2
TokenDict Q931Parser::s_dict_restartClass[] = { const TokenDict Q931Parser::s_dict_restartClass[] = {
{"channels", 0x00}, // Indicated channels {"channels", 0x00}, // Indicated channels
{"interface", 0x06}, // Single interface {"interface", 0x06}, // Single interface
{"all-interfaces", 0x07}, // All interfaces {"all-interfaces", 0x07}, // All interfaces
@ -4505,7 +4505,7 @@ static const IEParam s_ie_ieSegmented[] = {
// *** Q.931 4.5.28: Signal // *** Q.931 4.5.28: Signal
// Q.931 4.5.28 Signal values: first byte // Q.931 4.5.28 Signal values: first byte
TokenDict Q931Parser::s_dict_signalValue[] = { const TokenDict Q931Parser::s_dict_signalValue[] = {
{"dial", 0x00}, // Dial tone on {"dial", 0x00}, // Dial tone on
{"ring", 0x01}, // Ring back tone on {"ring", 0x01}, // Ring back tone on
{"intercept", 0x02}, // Intercept tone on {"intercept", 0x02}, // Intercept tone on

View File

@ -30,7 +30,7 @@
using namespace TelEngine; using namespace TelEngine;
TokenDict SignallingCircuit::s_lockNames[] = { const TokenDict SignallingCircuit::s_lockNames[] = {
{"localhw", LockLocalHWFail}, {"localhw", LockLocalHWFail},
{"localmaint", LockLocalMaint}, {"localmaint", LockLocalMaint},
{"lockinghw", LockingHWFail}, {"lockinghw", LockingHWFail},
@ -321,7 +321,7 @@ SignallingMessage* SignallingCall::dequeue(bool remove)
/** /**
* SignallingEvent * SignallingEvent
*/ */
TokenDict SignallingEvent::s_types[] = { const TokenDict SignallingEvent::s_types[] = {
{"Unknown", Unknown}, {"Unknown", Unknown},
{"Generic", Generic}, {"Generic", Generic},
{"NewCall", NewCall}, {"NewCall", NewCall},
@ -430,7 +430,7 @@ bool SignallingCircuitEvent::sendEvent()
/** /**
* SignallingCircuit * SignallingCircuit
*/ */
static TokenDict s_cicTypeDict[] = { static const TokenDict s_cicTypeDict[] = {
{"TDM", SignallingCircuit::TDM}, {"TDM", SignallingCircuit::TDM},
{"RTP", SignallingCircuit::RTP}, {"RTP", SignallingCircuit::RTP},
{"IAX", SignallingCircuit::IAX}, {"IAX", SignallingCircuit::IAX},
@ -439,7 +439,7 @@ static TokenDict s_cicTypeDict[] = {
{0,0} {0,0}
}; };
static TokenDict s_cicStatusDict[] = { static const TokenDict s_cicStatusDict[] = {
{"Missing", SignallingCircuit::Missing}, {"Missing", SignallingCircuit::Missing},
{"Disabled", SignallingCircuit::Disabled}, {"Disabled", SignallingCircuit::Disabled},
{"Idle", SignallingCircuit::Idle}, {"Idle", SignallingCircuit::Idle},
@ -676,7 +676,7 @@ void SignallingCircuitRange::updateLast()
/** /**
* SignallingCircuitGroup * SignallingCircuitGroup
*/ */
TokenDict SignallingCircuitGroup::s_strategy[] = { const TokenDict SignallingCircuitGroup::s_strategy[] = {
{"increment", Increment}, {"increment", Increment},
{"decrement", Decrement}, {"decrement", Decrement},
{"lowest", Lowest}, {"lowest", Lowest},

View File

@ -1485,7 +1485,7 @@ private:
SignallingCall* m_call; SignallingCall* m_call;
SignallingCallControl* m_controller; SignallingCallControl* m_controller;
SignallingCircuitEvent* m_cicEvent; SignallingCircuitEvent* m_cicEvent;
static TokenDict s_types[]; static const TokenDict s_types[];
}; };
/** /**
@ -1876,7 +1876,7 @@ public:
/** /**
* Keep the lock flags names * Keep the lock flags names
*/ */
static TokenDict s_lockNames[]; static const TokenDict s_lockNames[];
protected: protected:
/** /**
@ -2278,7 +2278,7 @@ public:
/** /**
* Keep the strategy names * Keep the strategy names
*/ */
static TokenDict s_strategy[]; static const TokenDict s_strategy[];
protected: protected:
/** /**
@ -2454,7 +2454,7 @@ public:
/** /**
* Keeps the names associated with the notifications * Keeps the names associated with the notifications
*/ */
static TokenDict s_notifName[]; static const TokenDict s_notifName[];
protected: protected:
/** /**
@ -2748,7 +2748,7 @@ public:
* @return The OR'd value of found flags * @return The OR'd value of found flags
*/ */
static void encodeFlags(const SignallingComponent* comp, int& dest, const String& flags, static void encodeFlags(const SignallingComponent* comp, int& dest, const String& flags,
TokenDict* dict); const TokenDict* dict);
/** /**
* Encode a comma separated list of signalling flags * Encode a comma separated list of signalling flags
@ -2803,7 +2803,7 @@ public:
unsigned int& count, bool discardDup); unsigned int& count, bool discardDup);
private: private:
static TokenDict* s_dictCCITT[5]; static const TokenDict* s_dictCCITT[5];
}; };
/** /**
@ -3615,7 +3615,7 @@ public:
{ return TelEngine::lookup((int)type,s_names); } { return TelEngine::lookup((int)type,s_names); }
private: private:
static TokenDict s_names[]; // Keep the strigns associated with point code type static const TokenDict s_names[]; // Keep the strigns associated with point code type
unsigned char m_network; unsigned char m_network;
unsigned char m_cluster; unsigned char m_cluster;
unsigned char m_member; unsigned char m_member;
@ -8790,7 +8790,7 @@ private:
bool m_autoRestart; // True to restart when released bool m_autoRestart; // True to restart when released
u_int32_t m_maxUserData; // Maximum length of user data transported trough this layer u_int32_t m_maxUserData; // Maximum length of user data transported trough this layer
unsigned int m_teiRefNumber; // The Reference Number (Ri) carried by a TEI management frame unsigned int m_teiRefNumber; // The Reference Number (Ri) carried by a TEI management frame
static TokenDict m_states[]; // Keep the string associated with each state static const TokenDict m_states[]; // Keep the string associated with each state
}; };
/** /**
@ -9163,7 +9163,7 @@ public:
/** /**
* Keep the association between frame types and texts * Keep the association between frame types and texts
*/ */
static TokenDict s_types[]; static const TokenDict s_types[];
protected: protected:
/** /**
@ -9952,7 +9952,7 @@ public:
/** /**
* Keep the string associated with IE types * Keep the string associated with IE types
*/ */
static TokenDict s_type[]; static const TokenDict s_type[];
/** /**
* Internally used buffer * Internally used buffer
@ -10199,7 +10199,7 @@ public:
/** /**
* Keep the string associated with message types * Keep the string associated with message types
*/ */
static TokenDict s_type[]; static const TokenDict s_type[];
/** /**
* Internally used buffer for debug purposes * Internally used buffer for debug purposes
@ -10330,7 +10330,7 @@ public:
/** /**
* Keep the association between state values and their texts * Keep the association between state values and their texts
*/ */
static TokenDict s_states[]; static const TokenDict s_states[];
protected: protected:
/** /**
@ -10956,12 +10956,12 @@ public:
/** /**
* The list of behaviour flag names * The list of behaviour flag names
*/ */
static TokenDict s_flags[]; static const TokenDict s_flags[];
/** /**
* The list of switch type names * The list of switch type names
*/ */
static TokenDict s_swType[]; static const TokenDict s_swType[];
protected: protected:
/** /**