SIPURL Class Reference

#include <sippdu.h>

List of all members.

Public Member Functions

 SIPURL ()
 SIPURL (const char *cstr, const char *defaultScheme=NULL)
 SIPURL (const PString &str, const char *defaultScheme=NULL)
 SIPURL (const PString &name, const OpalTransportAddress &address, WORD listenerPort=0)
PString AsQuotedString () const
PString GetDisplayName () const
void SetDisplayName (const PString &str)
OpalTransportAddress GetHostAddress () const
void AdjustForRequestURI ()

Protected Member Functions

virtual BOOL InternalParse (const char *cstr, const char *defaultScheme)

Protected Attributes

PString displayName


Detailed Description

This class extends PURL to include displayname, optional "<>" delimiters and extended parameters - like tag. It may be used for From:, To: and Contact: lines.


Constructor & Destructor Documentation

SIPURL::SIPURL  ) 
 

SIPURL::SIPURL const char *  cstr,
const char *  defaultScheme = NULL
 

str goes straight to Parse()

Parameters:
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()

Parameters:
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: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()


Member Function Documentation

void SIPURL::AdjustForRequestURI  ) 
 

Removes tag parm & query vars and recalculates urlString (scheme, user, password, host, port & URI parms (like transport))

PString SIPURL::AsQuotedString  )  const
 

Returns complete SIPURL as one string, including displayname (in quotes) and address in angle brackets.

PString SIPURL::GetDisplayName  )  const
 

Returns display name only

OpalTransportAddress SIPURL::GetHostAddress  )  const
 

virtual BOOL SIPURL::InternalParse const char *  cstr,
const char *  defaultScheme
[protected, virtual]
 

Parses name-addr, like: "displayname"<scheme:user:password:port;transport=type>;tag=value into: displayname (quotes around name are optional, all before '<' is used) scheme username password hostname port pathStr path paramVars queryVars fragment

Note that tag parameter outside of <> will be lost, but tag in URL without <> will be kept until AdjustForRequestURI

void SIPURL::SetDisplayName const PString &  str  )  [inline]
 


Member Data Documentation

PString SIPURL::displayName [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Jan 7 22:32:57 2008 for OPAL by  doxygen 1.4.6