#include <UrlMapping.h>

Public Member Functions | |
| UrlMapping () | |
| virtual | ~UrlMapping () |
| virtual OsStatus | loadMappings (const UtlString &configFileName, const UtlString &mediaserver="", const UtlString &voicemail="", const UtlString &localhost="") |
| Read a mappings file into the XML DOM, providing translations for replacement tokens. | |
Static Public Member Functions | |
| static void | convertRegularExpression (const UtlString &source, UtlString ®Exp) |
Protected Member Functions | |
| OsStatus | getUserMatchContainerMatchingRequestURI (const Url &requestUri, UtlString &variableDigits, const TiXmlNode *&prMatchingUserMatchContainerNode, const TiXmlNode *&prMatchingHostMatchContainerNode, const char *ruleType=NULL) const |
| OsStatus | doTransform (const Url &requestUri, const UtlString &vdigits, ResultSet &rRegistratons, const TiXmlNode *permMatchNode) const |
Private Member Functions | |
| OsStatus | getUserMatchContainer (const Url &requestUri, const TiXmlNode *const pHostMatchNode, UtlString &variableDigits, const TiXmlNode *&prMatchingUserMatchContainerNode) const |
| bool | getNamedAttribute (const TiXmlElement *component, UtlString &name, UtlString &value) const |
| Get the name/value pair from an element; supports two syntaxes. | |
| void | getVDigits (RegEx &userPattern, UtlString &vdigits) const |
Private Attributes | |
| TiXmlDocument * | mDoc |
| UtlBoolean | mParseFirstTime |
| Patterns * | mPatterns |
| UtlString | mVoicemail |
| UtlString | mLocalhost |
| UtlString | mMediaServer |
| UrlMapping | ( | ) |
| ~UrlMapping | ( | ) | [virtual] |
| OsStatus loadMappings | ( | const UtlString & | configFileName, | |
| const UtlString & | mediaserver = "", |
|||
| const UtlString & | voicemail = "", |
|||
| const UtlString & | localhost = "" | |||
| ) | [virtual] |
Read a mappings file into the XML DOM, providing translations for replacement tokens.
Reimplemented in AuthRulesUrlMapping, EmergencyRulesUrlMapping, and MappingRulesUrlMapping.
| OsStatus getUserMatchContainerMatchingRequestURI | ( | const Url & | requestUri, | |
| UtlString & | variableDigits, | |||
| const TiXmlNode *& | prMatchingUserMatchContainerNode, | |||
| const TiXmlNode *& | prMatchingHostMatchContainerNode, | |||
| const char * | ruleType = NULL | |||
| ) | const [protected] |
| ruleType | e.g. Emergency to match only emerg rules |
| OsStatus doTransform | ( | const Url & | requestUri, | |
| const UtlString & | vdigits, | |||
| ResultSet & | rRegistratons, | |||
| const TiXmlNode * | permMatchNode | |||
| ) | const [protected] |
| OsStatus getUserMatchContainer | ( | const Url & | requestUri, | |
| const TiXmlNode *const | pHostMatchNode, | |||
| UtlString & | variableDigits, | |||
| const TiXmlNode *& | prMatchingUserMatchContainerNode | |||
| ) | const [private] |
| bool getNamedAttribute | ( | const TiXmlElement * | component, | |
| UtlString & | name, | |||
| UtlString & | value | |||
| ) | const [private] |
Get the name/value pair from an element; supports two syntaxes.
Old Syntax:
<foo>bar=value</foo>
New Syntax:
<foo name='bar'>value</foo>
| component | the xml element to interpret |
| name | the content name |
| value | the content value |
TiXmlDocument* mDoc [private] |
UtlBoolean mParseFirstTime [private] |
UtlString mVoicemail [private] |
UtlString mLocalhost [private] |
UtlString mMediaServer [private] |