|
OPAL
Version 3.10.10
|
#include <sippdu.h>
Public Types | |
| enum | UsageContext { ExternalURI, RequestURI, ToURI, FromURI, RouteURI, RedirectURI, ContactURI, RegContactURI, RegisterURI } |
Public Member Functions | |
| SIPURL () | |
| SIPURL (const PURL &url) | |
| SIPURL & | operator= (const PURL &url) |
| SIPURL (const char *cstr, const char *defaultScheme=NULL) | |
| SIPURL & | operator= (const char *cstr) |
| SIPURL (const PString &str, const char *defaultScheme=NULL) | |
| SIPURL & | operator= (const PString &str) |
| SIPURL (const PString &name, const OpalTransportAddress &address, WORD listenerPort=0) | |
| SIPURL (const OpalTransportAddress &address, WORD listenerPort=0) | |
| SIPURL & | operator= (const OpalTransportAddress &address) |
| SIPURL (const SIPMIMEInfo &mime, const char *name) | |
| virtual Comparison | Compare (const PObject &obj) const |
| PString | AsQuotedString () const |
| PString | GetDisplayName (PBoolean useDefault=true) const |
| void | SetDisplayName (const PString &str) |
| const PStringOptions & | GetFieldParameters () const |
| Return string options in field parameters. More... | |
| PStringOptions & | GetFieldParameters () |
| OpalTransportAddress | GetHostAddress () const |
| void | SetHostAddress (const OpalTransportAddress &addr) |
| void | Sanitise (UsageContext context) |
| PBoolean | AdjustToDNS (PINDEX entry=0) |
| void | SetTag (const PString &tag=PString::Empty(), bool force=false) |
| Set a tag with a new unique ID. More... | |
Static Public Member Functions | |
| static PString | GenerateTag () |
| Generate a unique string suitable as a dialog tag. More... | |
Protected Member Functions | |
| void | ParseAsAddress (const PString &name, const OpalTransportAddress &_address, WORD listenerPort=0) |
| virtual PBoolean | InternalParse (const char *cstr, const char *defaultScheme) |
| bool | ReallyInternalParse (bool fromField, const char *cstr, const char *defaultScheme) |
Protected Attributes | |
| PString | m_displayName |
| PStringOptions | m_fieldParameters |
This class extends PURL to include displayname, optional "<>" delimiters and extended parameters - like tag. It may be used for From:, To: and Contact: lines.
| enum SIPURL::UsageContext |
| SIPURL::SIPURL | ( | ) |
Referenced by operator=().
|
inline |
| SIPURL::SIPURL | ( | const char * | cstr, |
| const char * | defaultScheme = NULL |
||
| ) |
str goes straight to Parse()
| cstr | C string representation of the URL. |
| defaultScheme | Default scheme for URL |
| SIPURL::SIPURL | ( | const PString & | str, |
| const char * | defaultScheme = NULL |
||
| ) |
str goes straight to Parse()
| str | String representation of the URL. |
| defaultScheme | Default scheme for URL |
| SIPURL::SIPURL | ( | const PString & | name, |
| const OpalTransportAddress & | address, | ||
| WORD | listenerPort = 0 |
||
| ) |
If name does not start with 'sip' then construct URI in the form
sip:name@host:port;transport=transport
where host comes from address, port is listenerPort or port from address if that was 0 transport is udp unless address specified tcp Send name starting with 'sip' or constructed URI to Parse()
| SIPURL::SIPURL | ( | const OpalTransportAddress & | address, |
| WORD | listenerPort = 0 |
||
| ) |
| SIPURL::SIPURL | ( | const SIPMIMEInfo & | mime, |
| const char * | name | ||
| ) |
| PBoolean SIPURL::AdjustToDNS | ( | PINDEX | entry = 0 | ) |
This will adjust the current URL according to RFC3263, using DNS SRV records.
| entry | Entry in the SRV record to adjust to |
| PString SIPURL::AsQuotedString | ( | ) | const |
Returns complete SIPURL as one string, including displayname (in quotes) and address in angle brackets.
Referenced by operator=().
|
virtual |
Compare the two SIPURLs and return their relative rank. Note that does an intelligent comparison according to the rules in RFC3261 Section 19.1.4.
LessThan, EqualTo or GreaterThan according to the relative rank of the objects. | obj | Object to compare against. |
Referenced by operator=(), and SIPSubscribe::EventPackage::operator==().
|
static |
Generate a unique string suitable as a dialog tag.
| PString SIPURL::GetDisplayName | ( | PBoolean | useDefault = true | ) | const |
Returns display name only
Referenced by operator=().
|
inline |
Return string options in field parameters.
References m_fieldParameters.
|
inline |
References GetHostAddress(), m_fieldParameters, and SetHostAddress().
| OpalTransportAddress SIPURL::GetHostAddress | ( | ) | const |
Get the host and port as a transport address.
Referenced by GetFieldParameters().
|
inlineprotectedvirtual |
References ReallyInternalParse().
|
inline |
References SIPURL().
Referenced by SIPSubscribe::EventPackage::EventPackage(), and operator=().
|
inline |
References AsQuotedString(), Compare(), GetDisplayName(), operator=(), and SIPURL().
| SIPURL& SIPURL::operator= | ( | const OpalTransportAddress & | address | ) |
|
protected |
|
protected |
Referenced by InternalParse().
| void SIPURL::Sanitise | ( | UsageContext | context | ) |
Removes tag parm & query vars and recalculates urlString (scheme, user, password, host, port & URI parms (like transport)) which are not allowed in the context specified, e.g. Request-URI etc According to RFC3261, 19.1.1 Table 1
| context | Context for URI |
|
inline |
References m_displayName.
| void SIPURL::SetHostAddress | ( | const OpalTransportAddress & | addr | ) |
Set the host and port as a transport address.
Referenced by GetFieldParameters().
| void SIPURL::SetTag | ( | const PString & | tag = PString::Empty(), |
| bool | force = false |
||
| ) |
Set a tag with a new unique ID.
|
protected |
Referenced by SetDisplayName().
|
protected |
Referenced by GetFieldParameters().