UrlMapping Class Reference

#include <UrlMapping.h>

Inheritance diagram for UrlMapping:

AuthRulesUrlMapping EmergencyRulesUrlMapping FallbackRulesUrlMapping MappingRulesUrlMapping

List of all members.


Detailed Description

This class interprets the rules encoded by two XML schemas (see the description elements in the schema files for the structure and contents of the files):.


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 &regExp)

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

TiXmlDocumentmDoc
UtlBoolean mParseFirstTime
PatternsmPatterns
UtlString mVoicemail
UtlString mLocalhost
UtlString mMediaServer

Constructor & Destructor Documentation

UrlMapping (  ) 

~UrlMapping (  )  [virtual]


Member Function Documentation

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.

void convertRegularExpression ( const UtlString source,
UtlString regExp 
) [static]

OsStatus getUserMatchContainerMatchingRequestURI ( const Url requestUri,
UtlString variableDigits,
const TiXmlNode *&  prMatchingUserMatchContainerNode,
const TiXmlNode *&  prMatchingHostMatchContainerNode,
const char *  ruleType = NULL 
) const [protected]

Parameters:
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.

Returns:
true iff a name/value pair was found. Supports two syntaxes; suppose that an attribute 'bar' exists. It may be encoded in either of two ways:
 Old Syntax:
            <foo>bar=value</foo>
 New Syntax:
            <foo name='bar'>value</foo>
The New syntax is preferred because it eliminates some obnoxious parsing ambiguities.
Parameters:
component  the xml element to interpret
name  the content name
value  the content value

void getVDigits ( RegEx userPattern,
UtlString vdigits 
) const [private]


Member Data Documentation

TiXmlDocument* mDoc [private]

Patterns* mPatterns [private]

UtlString mVoicemail [private]

UtlString mLocalhost [private]


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:13:23 build16 abuild