SIPMIMEInfo Class Reference

#include <sippdu.h>

List of all members.

Public Member Functions

 SIPMIMEInfo (bool compactForm=false)
virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
void SetCompactForm (bool form)
PCaselessString GetContentType (bool includeParameters=false) const
void SetContentType (const PString &v)
PCaselessString GetContentEncoding () const
void SetContentEncoding (const PString &v)
PString GetFrom () const
void SetFrom (const PString &v)
PString GetPAssertedIdentity () const
void SetPAssertedIdentity (const PString &v)
PString GetPPreferredIdentity () const
void SetPPreferredIdentity (const PString &v)
PString GetAccept () const
void SetAccept (const PString &v)
PString GetAcceptEncoding () const
void SetAcceptEncoding (const PString &v)
PString GetAcceptLanguage () const
void SetAcceptLanguage (const PString &v)
PString GetAllow () const
void SetAllow (const PString &v)
PString GetCallID () const
void SetCallID (const PString &v)
PString GetContact () const
bool GetContacts (std::list< SIPURL > &contacts) const
void SetContact (const PString &v)
void SetContact (const SIPURL &url)
PString GetSubject () const
void SetSubject (const PString &v)
PString GetTo () const
void SetTo (const PString &v)
PString GetVia () const
void SetVia (const PString &v)
PStringList GetViaList () const
void SetViaList (const PStringList &v)
PString GetReferTo () const
void SetReferTo (const PString &r)
PString GetReferredBy () const
void SetReferredBy (const PString &r)
PINDEX GetContentLength () const
void SetContentLength (PINDEX v)
PBoolean IsContentLengthPresent () const
PString GetCSeq () const
void SetCSeq (const PString &v)
PString GetDate () const
void SetDate (const PString &v)
void SetDate (const PTime &t)
void SetDate (void)
unsigned GetExpires (unsigned dflt=UINT_MAX) const
void SetExpires (unsigned v)
PINDEX GetMaxForwards () const
void SetMaxForwards (PINDEX v)
PINDEX GetMinExpires () const
void SetMinExpires (PINDEX v)
PString GetProxyAuthenticate () const
void SetProxyAuthenticate (const PString &v)
PStringList GetRoute () const
void SetRoute (const PString &v)
void SetRoute (const PStringList &v)
PStringList GetRecordRoute (bool reversed) const
void SetRecordRoute (const PStringList &v)
unsigned GetCSeqIndex () const
PString GetSupported () const
void SetSupported (const PString &v)
PString GetUnsupported () const
void SetUnsupported (const PString &v)
PString GetEvent () const
void SetEvent (const PString &v)
PCaselessString GetSubscriptionState () const
void SetSubscriptionState (const PString &v)
PString GetUserAgent () const
void SetUserAgent (const PString &v)
PString GetOrganization () const
void SetOrganization (const PString &v)
void GetProductInfo (OpalProductInfo &info) const
void SetProductInfo (const PString &ua, const OpalProductInfo &info)
PString GetWWWAuthenticate () const
void SetWWWAuthenticate (const PString &v)
PString GetSIPIfMatch () const
void SetSIPIfMatch (const PString &v)
PString GetSIPETag () const
void SetSIPETag (const PString &v)
PString GetRequire () const
void SetRequire (const PString &v, bool overwrite)
void GetAlertInfo (PString &info, int &appearance)
void SetAlertInfo (const PString &info, int appearance)
PString GetFieldParameter (const PString &fieldName, const PString &paramName, const PString &defaultValue=PString::Empty()) const
void SetFieldParameter (const PString &fieldName, const PString &paramName, const PString &newValue)

Static Public Member Functions

static PString ExtractFieldParameter (const PString &fieldValue, const PString &paramName, const PString &defaultValue=PString::Empty())
static PString InsertFieldParameter (const PString &fieldValue, const PString &paramName, const PString &newValue)

Protected Member Functions

PStringList GetRouteList (const char *name, bool reversed) const
void SetRouteList (const char *name, const PStringList &v)

Protected Attributes

bool compactForm
 Encode using compact form.

Detailed Description

Session Initiation Protocol MIME info container This is a string dictionary: for each item mime header is key, value is value. Headers may be full ("From") or compact ("f"). Colons not included. PMIMEInfo::ReadFrom (>>) parses from stream. That adds a header-value element for each mime line. If a mime header is duplicated in the stream then the additional value is appended to the existing, separated by "/n". PMIMEInfo::ReadFrom supports multi-line values if the next line starts with a space - it just appends the next line to the existing string with the separating space. There is no checking of header names or values. compactForm decides whether 'Set' methods store full or compact headers. 'Set' methods replace values, there is no method for appending except ReadFrom. 'Get' methods work whether stored headers are full or compact.

to do to satisfy RFC3261 (mandatory(*) & should): Accept Accept-Encoding Accept-Language Allow Max-Forwards Min-Expires Proxy-Authenticate Supported Unsupported WWW-Authenticate


Constructor & Destructor Documentation

SIPMIMEInfo::SIPMIMEInfo ( bool  compactForm = false  ) 

Member Function Documentation

static PString SIPMIMEInfo::ExtractFieldParameter ( const PString &  fieldValue,
const PString &  paramName,
const PString &  defaultValue = PString::Empty() 
) [static]

return the value of a header field parameter, empty if none

Parameters:
fieldValue Value of field string
paramName Field parameter name
defaultValue Default value for parameter

Referenced by GetFieldParameter().

PString SIPMIMEInfo::GetAccept (  )  const
PString SIPMIMEInfo::GetAcceptEncoding (  )  const
PString SIPMIMEInfo::GetAcceptLanguage (  )  const
void SIPMIMEInfo::GetAlertInfo ( PString &  info,
int &  appearance 
)
PString SIPMIMEInfo::GetAllow (  )  const
PString SIPMIMEInfo::GetCallID (  )  const
PString SIPMIMEInfo::GetContact (  )  const
bool SIPMIMEInfo::GetContacts ( std::list< SIPURL > &  contacts  )  const
PCaselessString SIPMIMEInfo::GetContentEncoding (  )  const
PINDEX SIPMIMEInfo::GetContentLength (  )  const
PCaselessString SIPMIMEInfo::GetContentType ( bool  includeParameters = false  )  const
PString SIPMIMEInfo::GetCSeq (  )  const

Referenced by GetCSeqIndex().

unsigned SIPMIMEInfo::GetCSeqIndex (  )  const [inline]

References GetCSeq().

PString SIPMIMEInfo::GetDate (  )  const
PString SIPMIMEInfo::GetEvent (  )  const
unsigned SIPMIMEInfo::GetExpires ( unsigned  dflt = UINT_MAX  )  const
PString SIPMIMEInfo::GetFieldParameter ( const PString &  fieldName,
const PString &  paramName,
const PString &  defaultValue = PString::Empty() 
) const [inline]

return the value of a header field parameter, empty if none

Parameters:
fieldName Field name in dictionary
paramName Field parameter name
defaultValue Default value for parameter

References ExtractFieldParameter().

PString SIPMIMEInfo::GetFrom (  )  const
PINDEX SIPMIMEInfo::GetMaxForwards (  )  const
PINDEX SIPMIMEInfo::GetMinExpires (  )  const
PString SIPMIMEInfo::GetOrganization (  )  const
PString SIPMIMEInfo::GetPAssertedIdentity (  )  const
PString SIPMIMEInfo::GetPPreferredIdentity (  )  const
void SIPMIMEInfo::GetProductInfo ( OpalProductInfo info  )  const
PString SIPMIMEInfo::GetProxyAuthenticate (  )  const
PStringList SIPMIMEInfo::GetRecordRoute ( bool  reversed  )  const
PString SIPMIMEInfo::GetReferredBy (  )  const
PString SIPMIMEInfo::GetReferTo (  )  const
PString SIPMIMEInfo::GetRequire (  )  const
PStringList SIPMIMEInfo::GetRoute (  )  const
PStringList SIPMIMEInfo::GetRouteList ( const char *  name,
bool  reversed 
) const [protected]

return list of route values from internal comma-delimited list

PString SIPMIMEInfo::GetSIPETag (  )  const
PString SIPMIMEInfo::GetSIPIfMatch (  )  const
PString SIPMIMEInfo::GetSubject (  )  const
PCaselessString SIPMIMEInfo::GetSubscriptionState (  )  const
PString SIPMIMEInfo::GetSupported (  )  const
PString SIPMIMEInfo::GetTo (  )  const
PString SIPMIMEInfo::GetUnsupported (  )  const
PString SIPMIMEInfo::GetUserAgent (  )  const
PString SIPMIMEInfo::GetVia (  )  const
PStringList SIPMIMEInfo::GetViaList (  )  const
PString SIPMIMEInfo::GetWWWAuthenticate (  )  const
static PString SIPMIMEInfo::InsertFieldParameter ( const PString &  fieldValue,
const PString &  paramName,
const PString &  newValue 
) [static]

set the value for a header field parameter, replace the current value, or add the parameter and its value if not already present.

Parameters:
fieldValue Value of field string
paramName Field parameter name
newValue New value for parameter

Referenced by SetFieldParameter().

PBoolean SIPMIMEInfo::IsContentLengthPresent (  )  const
virtual void SIPMIMEInfo::PrintOn ( ostream &  strm  )  const [virtual]
virtual void SIPMIMEInfo::ReadFrom ( istream &  strm  )  [virtual]
void SIPMIMEInfo::SetAccept ( const PString &  v  ) 
void SIPMIMEInfo::SetAcceptEncoding ( const PString &  v  ) 
void SIPMIMEInfo::SetAcceptLanguage ( const PString &  v  ) 
void SIPMIMEInfo::SetAlertInfo ( const PString &  info,
int  appearance 
)
void SIPMIMEInfo::SetAllow ( const PString &  v  ) 
void SIPMIMEInfo::SetCallID ( const PString &  v  ) 
void SIPMIMEInfo::SetCompactForm ( bool  form  )  [inline]

References compactForm.

void SIPMIMEInfo::SetContact ( const SIPURL url  ) 
void SIPMIMEInfo::SetContact ( const PString &  v  ) 
void SIPMIMEInfo::SetContentEncoding ( const PString &  v  ) 
void SIPMIMEInfo::SetContentLength ( PINDEX  v  ) 
void SIPMIMEInfo::SetContentType ( const PString &  v  ) 
void SIPMIMEInfo::SetCSeq ( const PString &  v  ) 
void SIPMIMEInfo::SetDate ( void   ) 
void SIPMIMEInfo::SetDate ( const PTime &  t  ) 
void SIPMIMEInfo::SetDate ( const PString &  v  ) 
void SIPMIMEInfo::SetEvent ( const PString &  v  ) 
void SIPMIMEInfo::SetExpires ( unsigned  v  ) 
void SIPMIMEInfo::SetFieldParameter ( const PString &  fieldName,
const PString &  paramName,
const PString &  newValue 
) [inline]

set the value for a header field parameter, replace the current value, or add the parameter and its value if not already present.

Parameters:
fieldName Field name in dictionary
paramName Field parameter name
newValue New value for parameter

References InsertFieldParameter().

void SIPMIMEInfo::SetFrom ( const PString &  v  ) 
void SIPMIMEInfo::SetMaxForwards ( PINDEX  v  ) 
void SIPMIMEInfo::SetMinExpires ( PINDEX  v  ) 
void SIPMIMEInfo::SetOrganization ( const PString &  v  ) 
void SIPMIMEInfo::SetPAssertedIdentity ( const PString &  v  ) 
void SIPMIMEInfo::SetPPreferredIdentity ( const PString &  v  ) 
void SIPMIMEInfo::SetProductInfo ( const PString &  ua,
const OpalProductInfo info 
)
void SIPMIMEInfo::SetProxyAuthenticate ( const PString &  v  ) 
void SIPMIMEInfo::SetRecordRoute ( const PStringList &  v  ) 
void SIPMIMEInfo::SetReferredBy ( const PString &  r  ) 
void SIPMIMEInfo::SetReferTo ( const PString &  r  ) 
void SIPMIMEInfo::SetRequire ( const PString &  v,
bool  overwrite 
)
void SIPMIMEInfo::SetRoute ( const PStringList &  v  ) 
void SIPMIMEInfo::SetRoute ( const PString &  v  ) 
void SIPMIMEInfo::SetRouteList ( const char *  name,
const PStringList &  v 
) [protected]

store string list as one comma-delimited string of route values value formed as "<v[0]>,<v[1]>,<v[2]>" etc

void SIPMIMEInfo::SetSIPETag ( const PString &  v  ) 
void SIPMIMEInfo::SetSIPIfMatch ( const PString &  v  ) 
void SIPMIMEInfo::SetSubject ( const PString &  v  ) 
void SIPMIMEInfo::SetSubscriptionState ( const PString &  v  ) 
void SIPMIMEInfo::SetSupported ( const PString &  v  ) 
void SIPMIMEInfo::SetTo ( const PString &  v  ) 
void SIPMIMEInfo::SetUnsupported ( const PString &  v  ) 
void SIPMIMEInfo::SetUserAgent ( const PString &  v  ) 
void SIPMIMEInfo::SetVia ( const PString &  v  ) 
void SIPMIMEInfo::SetViaList ( const PStringList &  v  ) 
void SIPMIMEInfo::SetWWWAuthenticate ( const PString &  v  ) 

Member Data Documentation

bool SIPMIMEInfo::compactForm [protected]

Encode using compact form.

Referenced by SetCompactForm().


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 10:25:09 2010 for OPAL by  doxygen 1.6.3