reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::Uri Class Reference

Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar. More...

#include <Uri.hxx>

Inheritance diagram for resip::Uri:
[legend]

Public Types

typedef std::bitset< Uri::uriEncodingTableSize > EncodingTable
 
- Public Types inherited from resip::ParserCategory
enum  { UnknownParserCategory = -1 }
 
enum  CommaHandlingMode { NoCommaTokenizing = 0 , CommasAllowedOutputMulti = 1 , CommasAllowedOutputCommas = 3 }
 
typedef std::set< ParameterTypes::Type > ParameterTypeSet
 

Public Member Functions

 RESIP_HeapCount (Uri)
 
 Uri (PoolBase *pool=0)
 
 Uri (const HeaderFieldValue &hfv, Headers::Type type, PoolBase *pool=0)
 
 Uri (const Uri &orig, PoolBase *pool=0)
 
 Uri (const Data &data)
 
 ~Uri ()
 
Data & host ()
 
const Data & host () const
 
Data & user ()
 
const Data & user () const
 
Data & userParameters ()
 
const Data & userParameters () const
 
Data & opaque ()
 
const Data & opaque () const
 
Data & path ()
 
const Data & path () const
 
Data getAor () const
 
Data getAorNoPort () const
 
Data getAorNoReally () const
 
Data getAOR (bool addPort) const
 
Uri getAorAsUri (TransportType transportTypeToRemoveDefaultPort=UNKNOWN_TRANSPORT) const
 
bool userIsTelephoneSubscriber () const
 Returns true if the user appears to fit the BNF for the 'telephone-subscriber' element in the RFC 3261 (and by extension, RFC 3966) grammar.
 
Token getUserAsTelephoneSubscriber () const
 Returns the user-part as a 'telephone-subscriber' grammar element (in other words, this parses the user-part into a dial string and parameters, with the dial-string accessible with Token::value(), and the parameters accessible with the various Token::param() and Token::exists() interfaces).
 
void setUserAsTelephoneSubscriber (const Token &telephoneSubscriber)
 Sets the user-part of this URI using the dial-string and parameters stored in telephoneSubscriber.
 
Data & scheme ()
 
const Data & scheme () const
 
int & port ()
 
int port () const
 
Data & password ()
 
const Data & password () const
 
Data & netNs ()
 
const Data & netNs () const
 
Data toString () const
 
bool isEnumSearchable () const
 Returns true if the uri can be converted into a string that can be used as an enum lookup.
 
std::vector< Data > getEnumLookups (const std::vector< Data > &suffixes) const
 Return a vector of domains to do a NAPTR lookup for enum.
 
bool hasEmbedded () const
 
SipMessage & embedded ()
 
const SipMessage & embedded () const
 
void removeEmbedded ()
 
virtual void parse (ParseBuffer &pb)
 
virtual ParserCategory * clone () const
 
virtual ParserCategory * clone (void *location) const
 
virtual ParserCategory * clone (PoolBase *pool) const
 
virtual EncodeStream & encodeParsed (EncodeStream &str) const
 
void parseEmbeddedHeaders (ParseBuffer &pb)
 
EncodeStream & encodeEmbeddedHeaders (EncodeStream &str) const
 
Uri & operator= (const Uri &rhs)
 
bool operator== (const Uri &other) const
 
bool operator!= (const Uri &other) const
 
bool operator< (const Uri &other) const
 
bool aorEqual (const Uri &rhs) const
 
void setIsBetweenAngleQuotes (bool value)
 
void setIsBareAddrSpec (bool value)
 Tells the parser this URI is being parsed as a bare (unbracketed) addr-spec inside a header value (e.g.
 
bool isUserRelevant () const
 Checks if this URI's scheme has sip:/sips:/tel: user-part semantics, i.e.
 
virtual Parameter * createParam (ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
 
bool exists (const Param< Uri > &paramType) const
 
void remove (const Param< Uri > &paramType)
 
 defineParam (ob,"ob", ExistsParameter,"RFC 5626")
 
 defineParam (gr, "gr", ExistsOrDataParameter, "RFC 5627")
 
 defineParam (comp, "comp", DataParameter, "RFC 3486")
 
 defineParam (duration, "duration", UInt32Parameter, "RFC 4240")
 
 defineParam (lr, "lr", ExistsParameter, "RFC 3261")
 
 defineParam (maddr, "maddr", DataParameter, "RFC 3261")
 
 defineParam (method, "method", DataParameter, "RFC 3261")
 
 defineParam (transport, "transport", DataParameter, "RFC 3261")
 
 defineParam (ttl, "ttl", UInt32Parameter, "RFC 3261")
 
 defineParam (user, "user", DataParameter, "RFC 3261, 4967")
 
 defineParam (extension, "ext", DataParameter, "RFC 3966")
 
 defineParam (sigcompId, "sigcomp-id", QuotedDataParameter, "RFC 5049")
 
 defineParam (rinstance, "rinstance", DataParameter, "proprietary (resip)")
 
 defineParam (addTransport, "addTransport", ExistsParameter, "RESIP INTERNAL")
 
 defineParam (wsSrcIp, "ws-src-ip", DataParameter, "RESIP INTERNAL (WebSocket)")
 
 defineParam (wsSrcPort, "ws-src-port", UInt32Parameter, "RESIP INTERNAL (WebSocket)")
 
bool exists (const ParamBase &paramType) const
 Checks for the existence of a natively supported parameter.
 
bool exists (const ExtensionParameter &param) const
 Checks for the existence of a non-natively-supported parameter.
 
void remove (const ParamBase &paramType)
 Removes a natively supported parameter, if the parameter is present.
 
void remove (const ExtensionParameter &param)
 Removes a non-natively-supported parameter, if the parameter is present.
 
const Data & param (const ExtensionParameter &param) const
 Const accessor for non-natively-supported parameter types.
 
Data & param (const ExtensionParameter &param)
 Accessor for non-natively-supported parameter types.
 
- Public Member Functions inherited from resip::ParserCategory
 ParserCategory (const HeaderFieldValue &headerFieldValue, Headers::Type type, PoolBase *pool=0)
 
 ParserCategory (const char *buf, int length, Headers::Type type, PoolBase *pool=0)
 
 ParserCategory (const ParserCategory &rhs, PoolBase *pool=0)
 
ParserCategory & operator= (const ParserCategory &rhs)
 
virtual ~ParserCategory ()
 
bool exists (const ParamBase &paramType) const
 Checks for the existence of a natively supported parameter.
 
void remove (const ParamBase &paramType)
 Removes a natively supported parameter, if the parameter is present.
 
const Data & param (const ExtensionParameter &param) const
 Const accessor for non-natively-supported parameter types.
 
Data & param (const ExtensionParameter &param)
 Accessor for non-natively-supported parameter types.
 
void remove (const ExtensionParameter &param)
 Removes a non-natively-supported parameter, if the parameter is present.
 
bool exists (const ExtensionParameter &param) const
 Checks for the existence of a non-natively-supported parameter.
 
void removeParametersExcept (const ParameterTypeSet &set=EmptyParameterTypeSet)
 Removes all known parameters except those that are specified in set.
 
void clearUnknownParameters ()
 
void parseParameters (ParseBuffer &pb)
 
EncodeStream & encodeParameters (EncodeStream &str) const
 Encodes parameters as they should appear on the wire.
 
Data commutativeParameterHash () const
 
Parameter * getParameterByEnum (ParameterTypes::Type type) const
 
void removeParameterByEnum (ParameterTypes::Type type)
 
void setParameter (const Parameter *parameter)
 
int numKnownParams () const
 Returns the number of known (natively supported) parameters.
 
int numUnknownParams () const
 Returns the number of unknown parameters.
 
- Public Member Functions inherited from resip::LazyParser
 LazyParser (const HeaderFieldValue &headerFieldValue)
 
 LazyParser (const char *buf, int length)
 
 LazyParser (const HeaderFieldValue &headerFieldValue, HeaderFieldValue::CopyPaddingEnum e)
 
 LazyParser (const LazyParser &rhs)
 
 LazyParser (const LazyParser &rhs, HeaderFieldValue::CopyPaddingEnum e)
 
LazyParser & operator= (const LazyParser &rhs)
 
virtual ~LazyParser ()
 
EncodeStream & encode (EncodeStream &str) const
 Encodes this element to a stream, in the fashion it should be represented on the wire.
 
bool isParsed () const
 Returns true iff a parse has been attempted.
 
HeaderFieldValue & getHeaderField ()
 
void checkParsed () const
 
void checkParsed ()
 
void doParse () const
 
void markDirty () const
 
bool isWellFormed () const
 Returns true iff this element was parsed successfully, according to the implementation of parse().
 

Static Public Member Functions

static Uri fromTel (const Uri &, const Uri &hostUri)
 
static void setUriUserEncoding (unsigned char c, bool encode)
 Modifies the default URI encoding character sets.
 
static void setUriPasswordEncoding (unsigned char c, bool encode)
 
static void setUriUrnEncoding (unsigned char c, bool encode)
 
static bool compareUriParametersEqual (Parameter *param1, Parameter *param2)
 Compares two known URI parameters for equality.
 
static bool compareUriParametersLessThan (Parameter *param1, Parameter *param2)
 Compares two URI parameters to determine if the first is less than the second.
 
static bool isSignificantUriParameter (const ParameterTypes::Type type) noexcept
 Checks if the URI-parameter appearing in only one URI must not be ignored when comparing the URIs.
 
static EncodingTable & getUserEncodingTable ()
 
static EncodingTable & getPasswordEncodingTable ()
 
static EncodingTable & getUrnEncodingTable ()
 Encoding table for the NID:NSS (plus optional rq-components/fragment) of a urn: URI (RFC 8141: namestring = "urn" ":" NID ":" NSS).
 
static EncodingTable & getLocalNumberTable ()
 
static EncodingTable & getGlobalNumberTable ()
 

Static Public Attributes

static const size_t uriEncodingTableSize = 256
 
- Static Public Attributes inherited from resip::ParserCategory
static const ParameterTypeSet EmptyParameterTypeSet
 

Protected Member Functions

void getAorInternal (bool dropScheme, bool addPort, Data &aor) const
 
- Protected Member Functions inherited from resip::ParserCategory
 ParserCategory (PoolBase *pool=0)
 
bool addParameter (Parameter *param)
 
bool addParameter (UnknownParameter *unknownParam)
 
Parameter * getParameterByData (const Data &data) const
 
void removeParameterByData (const Data &data)
 
PoolBase * getPool ()
 
void freeParameter (Parameter *p)
 
virtual const Data & errorContext () const
 
- Protected Member Functions inherited from resip::LazyParser
 LazyParser ()
 
void clear ()
 

Protected Attributes

Data mScheme
 
Data mHost
 
Data mUser
 
Data mUserParameters
 
int mPort
 
Data mPassword
 
Data mNetNs
 Net namespace name scoping host and port.
 
Data mPath
 
bool mHostCanonicalized
 
Data mCanonicalHost
 cache for IPv6 host comparison
 
bool mIsBetweenAngleQuotes
 
bool mIsBareAddrSpec
 
- Protected Attributes inherited from resip::ParserCategory
ParameterList mParameters
 
ParameterList mUnknownParameters
 
PoolBase * mPool
 
Headers::Type mHeaderType
 

Additional Inherited Members

- Protected Types inherited from resip::ParserCategory
typedef std::vector< Parameter *, StlPoolAllocator< Parameter *, PoolBase > > ParameterList
 

Detailed Description

Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.

Also can be made to represent other URI types (like tel URIs)

Definition at line 21 of file Uri.hxx.

Member Typedef Documentation

◆ EncodingTable

Definition at line 245 of file Uri.hxx.

Constructor & Destructor Documentation

◆ Uri() [1/4]

Uri::Uri ( PoolBase *  pool = 0)

Definition at line 39 of file Uri.cxx.

◆ Uri() [2/4]

Uri::Uri ( const HeaderFieldValue &  hfv,
Headers::Type  type,
PoolBase *  pool = 0 
)

Definition at line 49 of file Uri.cxx.

◆ Uri() [3/4]

Uri::Uri ( const Uri &  orig,
PoolBase *  pool = 0 
)

Definition at line 74 of file Uri.cxx.

◆ Uri() [4/4]

Uri::Uri ( const Data &  data)
explicit

Definition at line 59 of file Uri.cxx.

◆ ~Uri()

Uri::~Uri ( )

Definition at line 95 of file Uri.cxx.

Member Function Documentation

◆ aorEqual()

bool Uri::aorEqual ( const Uri &  rhs) const

Definition at line 877 of file Uri.cxx.

◆ clone() [1/3]

ParserCategory * Uri::clone ( ) const
virtual

Implements resip::ParserCategory.

Definition at line 1462 of file Uri.cxx.

◆ clone() [2/3]

ParserCategory * Uri::clone ( PoolBase *  pool) const
virtual

Implements resip::ParserCategory.

Definition at line 1474 of file Uri.cxx.

◆ clone() [3/3]

ParserCategory * Uri::clone ( void *  location) const
virtual

Implements resip::ParserCategory.

Definition at line 1468 of file Uri.cxx.

◆ compareUriParametersEqual()

bool Uri::compareUriParametersEqual ( Parameter *  param1,
Parameter *  param2 
)
static

Compares two known URI parameters for equality.

Parameters
param1The first parameter to compare.
param2The second parameter to compare.
Returns
true if the parameters are equal; otherwise, false.

Definition at line 435 of file Uri.cxx.

◆ compareUriParametersLessThan()

bool Uri::compareUriParametersLessThan ( Parameter *  param1,
Parameter *  param2 
)
static

Compares two URI parameters to determine if the first is less than the second.

Parameters
param1The first parameter to compare.
param2The second parameter to compare.
Returns
true if the first parameter is less than the second; otherwise, false.

Definition at line 477 of file Uri.cxx.

◆ createParam()

Parameter * Uri::createParam ( ParameterTypes::Type  type,
ParseBuffer &  pb,
const std::bitset< 256 > &  terminators,
PoolBase *  pool 
)
virtual

Reimplemented from resip::ParserCategory.

Definition at line 1691 of file Uri.cxx.

◆ defineParam() [1/16]

resip::Uri::defineParam ( addTransport  ,
"addTransport"  ,
ExistsParameter  ,
"RESIP INTERNAL"   
)

◆ defineParam() [2/16]

resip::Uri::defineParam ( comp  ,
"comp"  ,
DataParameter  ,
"RFC 3486"   
)

◆ defineParam() [3/16]

resip::Uri::defineParam ( duration  ,
"duration"  ,
UInt32Parameter  ,
"RFC 4240"   
)

◆ defineParam() [4/16]

resip::Uri::defineParam ( extension  ,
"ext"  ,
DataParameter  ,
"RFC 3966"   
)

◆ defineParam() [5/16]

resip::Uri::defineParam ( gr  ,
"gr"  ,
ExistsOrDataParameter  ,
"RFC 5627"   
)

◆ defineParam() [6/16]

resip::Uri::defineParam ( lr  ,
"lr"  ,
ExistsParameter  ,
"RFC 3261"   
)

◆ defineParam() [7/16]

resip::Uri::defineParam ( maddr  ,
"maddr"  ,
DataParameter  ,
"RFC 3261"   
)

◆ defineParam() [8/16]

resip::Uri::defineParam ( method  ,
"method"  ,
DataParameter  ,
"RFC 3261"   
)

◆ defineParam() [9/16]

resip::Uri::defineParam ( ob  ,
"ob"  ,
ExistsParameter  ,
"RFC 5626"   
)

◆ defineParam() [10/16]

resip::Uri::defineParam ( rinstance  ,
"rinstance"  ,
DataParameter  ,
"proprietary (resip)"   
)

◆ defineParam() [11/16]

resip::Uri::defineParam ( sigcompId  ,
"sigcomp-id"  ,
QuotedDataParameter  ,
"RFC 5049"   
)

◆ defineParam() [12/16]

resip::Uri::defineParam ( transport  ,
"transport"  ,
DataParameter  ,
"RFC 3261"   
)

◆ defineParam() [13/16]

resip::Uri::defineParam ( ttl  ,
"ttl"  ,
UInt32Parameter  ,
"RFC 3261"   
)

◆ defineParam() [14/16]

resip::Uri::defineParam ( user  ,
"user"  ,
DataParameter  ,
"RFC  3261,
4967"   
)

◆ defineParam() [15/16]

resip::Uri::defineParam ( wsSrcIp  ,
"ws-src-ip"  ,
DataParameter  ,
"RESIP INTERNAL (WebSocket)"   
)

◆ defineParam() [16/16]

resip::Uri::defineParam ( wsSrcPort  ,
"ws-src-port"  ,
UInt32Parameter  ,
"RESIP INTERNAL (WebSocket)"   
)

◆ embedded() [1/2]

SipMessage & Uri::embedded ( )

Definition at line 1586 of file Uri.cxx.

◆ embedded() [2/2]

const SipMessage & Uri::embedded ( ) const

Definition at line 1603 of file Uri.cxx.

◆ encodeEmbeddedHeaders()

EncodeStream & Uri::encodeEmbeddedHeaders ( EncodeStream &  str) const

Definition at line 1663 of file Uri.cxx.

◆ encodeParsed()

EncodeStream & Uri::encodeParsed ( EncodeStream &  str) const
virtual

Implements resip::LazyParser.

Definition at line 1496 of file Uri.cxx.

◆ exists() [1/3]

bool ParserCategory::exists ( const ExtensionParameter &  param) const

Checks for the existence of a non-natively-supported parameter.

Parameters
paramThe runtime constructed accessor token.
Returns
true iff the parameter is present.

Definition at line 187 of file ParserCategory.cxx.

◆ exists() [2/3]

bool Uri::exists ( const Param< Uri > &  paramType) const

Definition at line 1701 of file Uri.cxx.

◆ exists() [3/3]

bool resip::ParserCategory::exists ( const ParamBase &  paramType) const
inline

Checks for the existence of a natively supported parameter.

Parameters
paramTypeThe accessor token for the parameter.
Returns
true iff the parameter is present.

Definition at line 145 of file ParserCategory.hxx.

◆ fromTel()

Uri Uri::fromTel ( const Uri &  tel,
const Uri &  hostUri 
)
static

Definition at line 184 of file Uri.cxx.

◆ getAor()

Data Uri::getAor ( ) const

Definition at line 1095 of file Uri.cxx.

◆ getAOR()

Data Uri::getAOR ( bool  addPort) const

Definition at line 999 of file Uri.cxx.

◆ getAorAsUri()

Uri Uri::getAorAsUri ( TransportType  transportTypeToRemoveDefaultPort = UNKNOWN_TRANSPORT) const

Definition at line 1103 of file Uri.cxx.

◆ getAorInternal()

void Uri::getAorInternal ( bool  dropScheme,
bool  addPort,
Data &  aor 
) const
protected

Definition at line 915 of file Uri.cxx.

◆ getAorNoPort()

Data Uri::getAorNoPort ( ) const

Definition at line 1087 of file Uri.cxx.

◆ getAorNoReally()

Data resip::Uri::getAorNoReally ( ) const
inline

Definition at line 57 of file Uri.hxx.

◆ getEnumLookups()

std::vector< Data > Uri::getEnumLookups ( const std::vector< Data > &  suffixes) const

Return a vector of domains to do a NAPTR lookup for enum.

Definition at line 318 of file Uri.cxx.

◆ getGlobalNumberTable()

static EncodingTable & resip::Uri::getGlobalNumberTable ( )
inlinestatic

Definition at line 296 of file Uri.hxx.

◆ getLocalNumberTable()

static EncodingTable & resip::Uri::getLocalNumberTable ( )
inlinestatic

Definition at line 287 of file Uri.hxx.

◆ getPasswordEncodingTable()

static EncodingTable & resip::Uri::getPasswordEncodingTable ( )
inlinestatic

Definition at line 257 of file Uri.hxx.

◆ getUrnEncodingTable()

static EncodingTable & resip::Uri::getUrnEncodingTable ( )
inlinestatic

Encoding table for the NID:NSS (plus optional rq-components/fragment) of a urn: URI (RFC 8141: namestring = "urn" ":" NID ":" NSS).

https://tools.ietf.org/html/rfc8141#section-2

Definition at line 273 of file Uri.hxx.

◆ getUserAsTelephoneSubscriber()

Token Uri::getUserAsTelephoneSubscriber ( ) const

Returns the user-part as a 'telephone-subscriber' grammar element (in other words, this parses the user-part into a dial string and parameters, with the dial-string accessible with Token::value(), and the parameters accessible with the various Token::param() and Token::exists() interfaces).

For example, suppose the following is in the Request-URI:

sip:5555551234;phone-context=+86@example.com;user=dialstring

The user-part of this SIP URI is "5555551234;phone-context=+86", and it fits the BNF for the 'telephone-subscriber' grammar element. To access the 'phone-context' parameter, do something like the following:

Uri& reqUri(sip.header(h_RequestLine).uri());
// !bwc! May add native support for this param later
static ExtensionParameter p_phoneContext("phone-context");
Data phoneContextValue;
if(reqUri.isWellFormed())
{
if(reqUri.exists(p_phoneContext))
{
// Phone context as URI param
phoneContextValue=reqUri.param(p_phoneContext);
}
else if(reqUri.scheme()=="sip" || reqUri.scheme()=="sips")
{
// Might have phone-context as a user param (only happens
// in a sip or sips URI)
// Technically, this userIsTelephoneSubscriber() check is
// required:
// sip:bob;phone-context=+86@example.com doesn't have a
// phone-context param according to the BNF in 3261. But,
// interop may require you to parse this as if it did have
// such a param.
if(reqUri.userIsTelephoneSubscriber())
{
Token telSub(reqUri.getUserAsTelephoneSubscriber());
if(telSub.isWellFormed() && telSub.exists(p_phoneContext))
{
// Phone context as user param
phoneContextValue=telSub.param(p_phoneContext);
}
}
}
}
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents the "token" element in the RFC 3261 grammar.
Definition Token.hxx:18
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
RequestLineType h_RequestLine
Definition Headers.cxx:347

Definition at line 1060 of file Uri.cxx.

◆ getUserEncodingTable()

static EncodingTable & resip::Uri::getUserEncodingTable ( )
inlinestatic

Definition at line 247 of file Uri.hxx.

◆ hasEmbedded()

bool Uri::hasEmbedded ( ) const

Definition at line 343 of file Uri.cxx.

◆ host() [1/2]

Data & resip::Uri::host ( )
inline

Definition at line 40 of file Uri.hxx.

◆ host() [2/2]

const Data & resip::Uri::host ( ) const
inline

Definition at line 41 of file Uri.hxx.

◆ isEnumSearchable()

bool Uri::isEnumSearchable ( ) const

Returns true if the uri can be converted into a string that can be used as an enum lookup.

Definition at line 265 of file Uri.cxx.

◆ isSignificantUriParameter()

bool Uri::isSignificantUriParameter ( const ParameterTypes::Type  type)
staticnoexcept

Checks if the URI-parameter appearing in only one URI must not be ignored when comparing the URIs.

Parameters
typeThe type of the parameter to check.
Returns
true if such a parameter must not be ignored; otherwise, false.
Note
Follows RFC 3261 section 19.1.4.

Definition at line 519 of file Uri.cxx.

◆ isUserRelevant()

bool Uri::isUserRelevant ( ) const

Checks if this URI's scheme has sip:/sips:/tel: user-part semantics, i.e.

whether its user() can be safely copied into another URI (e.g. a Contact, which is always sip:/sips:) that assumes that syntax.

Returns
true for sip:, sips: and tel:; false for any other scheme (e.g. urn:, whose user-part ABNF is incompatible).

Definition at line 528 of file Uri.cxx.

◆ netNs() [1/2]

Data & resip::Uri::netNs ( )
inline

Definition at line 150 of file Uri.hxx.

◆ netNs() [2/2]

const Data & resip::Uri::netNs ( ) const
inline

Definition at line 151 of file Uri.hxx.

◆ opaque() [1/2]

Data & resip::Uri::opaque ( )
inline

Definition at line 46 of file Uri.hxx.

◆ opaque() [2/2]

const Data & resip::Uri::opaque ( ) const
inline

Definition at line 47 of file Uri.hxx.

◆ operator!=()

bool Uri::operator!= ( const Uri &  other) const

Definition at line 702 of file Uri.cxx.

◆ operator<()

bool Uri::operator< ( const Uri &  other) const

Definition at line 707 of file Uri.cxx.

◆ operator=()

Uri & Uri::operator= ( const Uri &  rhs)

Definition at line 358 of file Uri.cxx.

◆ operator==()

bool Uri::operator== ( const Uri &  other) const

Definition at line 537 of file Uri.cxx.

◆ param() [1/2]

Data & ParserCategory::param ( const ExtensionParameter &  param)

Accessor for non-natively-supported parameter types.

Will create the parameter if it does not exist.

Parameters
paramThe runtime constructed parameter accessor.
Returns
The parameter, as a raw Data.

Definition at line 173 of file ParserCategory.cxx.

◆ param() [2/2]

const Data & ParserCategory::param ( const ExtensionParameter &  param) const

Const accessor for non-natively-supported parameter types.

Exceptions
ParserCategory::Exceptionif this parameter doesn't exist.
Parameters
paramThe runtime constructed parameter accessor.
Returns
The parameter, as a raw Data.

Definition at line 165 of file ParserCategory.cxx.

◆ parse()

void Uri::parse ( ParseBuffer &  pb)
virtual

Implements resip::LazyParser.

Definition at line 1176 of file Uri.cxx.

◆ parseEmbeddedHeaders()

void Uri::parseEmbeddedHeaders ( ParseBuffer &  pb)

Definition at line 1611 of file Uri.cxx.

◆ password() [1/2]

Data & resip::Uri::password ( )
inline

Definition at line 147 of file Uri.hxx.

◆ password() [2/2]

const Data & resip::Uri::password ( ) const
inline

Definition at line 148 of file Uri.hxx.

◆ path() [1/2]

Data & resip::Uri::path ( )
inline

Definition at line 48 of file Uri.hxx.

◆ path() [2/2]

const Data & resip::Uri::path ( ) const
inline

Definition at line 49 of file Uri.hxx.

◆ port() [1/2]

int & resip::Uri::port ( )
inline

Definition at line 145 of file Uri.hxx.

◆ port() [2/2]

int resip::Uri::port ( ) const
inline

Definition at line 146 of file Uri.hxx.

◆ remove() [1/3]

void ParserCategory::remove ( const ExtensionParameter &  param)

Removes a non-natively-supported parameter, if the parameter is present.

Parameters
paramThe accessor token for the parameter.

Definition at line 180 of file ParserCategory.cxx.

◆ remove() [2/3]

void Uri::remove ( const Param< Uri > &  paramType)

Definition at line 1709 of file Uri.cxx.

◆ remove() [3/3]

void ParserCategory::remove ( const ParamBase &  paramType)

Removes a natively supported parameter, if the parameter is present.

Parameters
paramTypeThe accessor token for the parameter.

Definition at line 156 of file ParserCategory.cxx.

◆ removeEmbedded()

void Uri::removeEmbedded ( )

Definition at line 350 of file Uri.cxx.

◆ RESIP_HeapCount()

resip::Uri::RESIP_HeapCount ( Uri  )

◆ scheme() [1/2]

Data & resip::Uri::scheme ( )
inline

Definition at line 143 of file Uri.hxx.

◆ scheme() [2/2]

const Data & resip::Uri::scheme ( ) const
inline

Definition at line 144 of file Uri.hxx.

◆ setIsBareAddrSpec()

void resip::Uri::setIsBareAddrSpec ( bool  value)
inline

Tells the parser this URI is being parsed as a bare (unbracketed) addr-spec inside a header value (e.g.

a To/From without "<...>"), where NameAddr-style header parameters (";tag=...", etc.) may follow directly with no separator of their own. Needed so schemes like urn: (whose NSS may legitimately contain ';'/'?'/',', RFC 8141) know to stop at those characters here – unlike every other context (Request-URI, a standalone Uri built directly from a string, or between angle brackets), where the same characters are legal NSS content and nothing ambiguous can follow. Set by NameAddr::parse() only; false everywhere else by default.

Definition at line 205 of file Uri.hxx.

◆ setIsBetweenAngleQuotes()

void resip::Uri::setIsBetweenAngleQuotes ( bool  value)
inline

Definition at line 189 of file Uri.hxx.

◆ setUriPasswordEncoding()

void Uri::setUriPasswordEncoding ( unsigned char  c,
bool  encode 
)
static

Definition at line 1484 of file Uri.cxx.

◆ setUriUrnEncoding()

void Uri::setUriUrnEncoding ( unsigned char  c,
bool  encode 
)
static

Definition at line 1489 of file Uri.cxx.

◆ setUriUserEncoding()

void Uri::setUriUserEncoding ( unsigned char  c,
bool  encode 
)
static

Modifies the default URI encoding character sets.

Definition at line 1479 of file Uri.cxx.

◆ setUserAsTelephoneSubscriber()

void Uri::setUserAsTelephoneSubscriber ( const Token &  telephoneSubscriber)

Sets the user-part of this URI using the dial-string and parameters stored in telephoneSubscriber.

Parameters
telephoneSubscriberThe user-part, as a 'telephone-subscriber' grammar element.

Definition at line 1078 of file Uri.cxx.

◆ toString()

Data Uri::toString ( ) const

Definition at line 1678 of file Uri.cxx.

◆ user() [1/2]

Data & resip::Uri::user ( )
inline

Definition at line 42 of file Uri.hxx.

◆ user() [2/2]

const Data & resip::Uri::user ( ) const
inline

Definition at line 43 of file Uri.hxx.

◆ userIsTelephoneSubscriber()

bool Uri::userIsTelephoneSubscriber ( ) const

Returns true if the user appears to fit the BNF for the 'telephone-subscriber' element in the RFC 3261 (and by extension, RFC 3966) grammar.

This is important because 'telephone-subscriber' can have parameters, which you could then access easily through the getUserAsTelephoneSubscriber() and setUserAsTelephoneSubscriber() calls.

Definition at line 1007 of file Uri.cxx.

◆ userParameters() [1/2]

Data & resip::Uri::userParameters ( )
inline

Definition at line 44 of file Uri.hxx.

◆ userParameters() [2/2]

const Data & resip::Uri::userParameters ( ) const
inline

Definition at line 45 of file Uri.hxx.

Member Data Documentation

◆ mCanonicalHost

Data resip::Uri::mCanonicalHost
mutableprotected

cache for IPv6 host comparison

Definition at line 349 of file Uri.hxx.

◆ mHost

Data resip::Uri::mHost
protected

Definition at line 339 of file Uri.hxx.

◆ mHostCanonicalized

bool resip::Uri::mHostCanonicalized
mutableprotected

Definition at line 348 of file Uri.hxx.

◆ mIsBareAddrSpec

bool resip::Uri::mIsBareAddrSpec
protected

Definition at line 352 of file Uri.hxx.

◆ mIsBetweenAngleQuotes

bool resip::Uri::mIsBetweenAngleQuotes
protected

Definition at line 351 of file Uri.hxx.

◆ mNetNs

Data resip::Uri::mNetNs
protected

Net namespace name scoping host and port.

Definition at line 344 of file Uri.hxx.

◆ mPassword

Data resip::Uri::mPassword
protected

Definition at line 343 of file Uri.hxx.

◆ mPath

Data resip::Uri::mPath
protected

Definition at line 345 of file Uri.hxx.

◆ mPort

int resip::Uri::mPort
protected

Definition at line 342 of file Uri.hxx.

◆ mScheme

Data resip::Uri::mScheme
protected

Definition at line 338 of file Uri.hxx.

◆ mUser

Data resip::Uri::mUser
protected

Definition at line 340 of file Uri.hxx.

◆ mUserParameters

Data resip::Uri::mUserParameters
protected

Definition at line 341 of file Uri.hxx.

◆ uriEncodingTableSize

const size_t resip::Uri::uriEncodingTableSize = 256
static

Definition at line 26 of file Uri.hxx.


The documentation for this class was generated from the following files: