OPAL  Version 3.10.10
SIPMIMEInfo Class Reference

#include <sippdu.h>

Inheritance diagram for SIPMIMEInfo:

Public Member Functions

 SIPMIMEInfo (bool compactForm=false)
 
virtual void PrintOn (ostream &strm) const
 
virtual bool InternalAddMIME (const PString &fieldName, const PString &fieldValue)
 
void SetCompactForm (bool form)
 
PCaselessString GetContentType (bool includeParameters=false) const
 
void SetContentType (const PString &v)
 
PCaselessString GetContentEncoding () const
 
void SetContentEncoding (const PString &v)
 
SIPURL GetFrom () const
 
void SetFrom (const PString &v)
 
SIPURL GetPAssertedIdentity () const
 
void SetPAssertedIdentity (const PString &v)
 
SIPURL 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
 
unsigned GetAllowBitMask () const
 
void SetAllow (const PString &v)
 
PString GetCallID () const
 
void SetCallID (const PString &v)
 
SIPURL GetContact () const
 
bool GetContacts (SIPURLList &contacts) const
 
void SetContact (const PString &v)
 
PString GetSubject () const
 
void SetSubject (const PString &v)
 
SIPURL GetTo () const
 
void SetTo (const PString &v)
 
PString GetVia () const
 
void SetVia (const PString &v)
 
bool GetViaList (PStringList &v) const
 
void SetViaList (const PStringList &v)
 
PString GetFirstVia () const
 
OpalTransportAddress GetViaReceivedAddress () const
 
SIPURL GetReferTo () const
 
void SetReferTo (const PString &r)
 
SIPURL 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)
 
PString GetRoute () const
 
bool GetRoute (SIPURLList &proxies) const
 
void SetRoute (const PString &v)
 
void SetRoute (const SIPURLList &proxies)
 
PString GetRecordRoute () const
 
bool GetRecordRoute (SIPURLList &proxies, bool reversed) const
 
void SetRecordRoute (const PString &v)
 
void SetRecordRoute (const SIPURLList &proxies)
 
unsigned GetCSeqIndex () const
 
PStringSet GetRequire () const
 
void SetRequire (const PStringSet &v)
 
void AddRequire (const PString &v)
 
PStringSet GetSupported () const
 
void SetSupported (const PStringSet &v)
 
void AddSupported (const PString &v)
 
PStringSet GetUnsupported () const
 
void SetUnsupported (const PStringSet &v)
 
void AddUnsupported (const PString &v)
 
PString GetEvent () const
 
void SetEvent (const PString &v)
 
PCaselessString GetSubscriptionState (PStringToString &info) 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)
 
void GetAlertInfo (PString &info, int &appearance)
 
void SetAlertInfo (const PString &info, int appearance)
 
PString GetCallInfo () const
 
PString GetAllowEvents () const
 
void SetAllowEvents (const PString &v)
 
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

PStringSet GetTokenSet (const char *field) const
 
void AddTokenSet (const char *field, const PString &token)
 
void SetTokenSet (const char *field, const PStringSet &tokens)
 

Protected Attributes

bool compactForm
 Encode using compact form. More...
 

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::SIPMIMEInfo ( bool  compactForm = false)

Member Function Documentation

◆ AddRequire()

void SIPMIMEInfo::AddRequire ( const PString &  v)

◆ AddSupported()

void SIPMIMEInfo::AddSupported ( const PString &  v)

◆ AddTokenSet()

void SIPMIMEInfo::AddTokenSet ( const char *  field,
const PString &  token 
)
protected

◆ AddUnsupported()

void SIPMIMEInfo::AddUnsupported ( const PString &  v)

◆ ExtractFieldParameter()

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
fieldValueValue of field string
paramNameField parameter name
defaultValueDefault value for parameter

◆ GetAccept()

PString SIPMIMEInfo::GetAccept ( ) const

◆ GetAcceptEncoding()

PString SIPMIMEInfo::GetAcceptEncoding ( ) const

◆ GetAcceptLanguage()

PString SIPMIMEInfo::GetAcceptLanguage ( ) const

◆ GetAlertInfo()

void SIPMIMEInfo::GetAlertInfo ( PString &  info,
int &  appearance 
)

◆ GetAllow()

PString SIPMIMEInfo::GetAllow ( ) const

◆ GetAllowBitMask()

unsigned SIPMIMEInfo::GetAllowBitMask ( ) const

◆ GetAllowEvents()

PString SIPMIMEInfo::GetAllowEvents ( ) const

◆ GetCallID()

PString SIPMIMEInfo::GetCallID ( ) const

◆ GetCallInfo()

PString SIPMIMEInfo::GetCallInfo ( ) const

◆ GetContact()

SIPURL SIPMIMEInfo::GetContact ( ) const

◆ GetContacts()

bool SIPMIMEInfo::GetContacts ( SIPURLList contacts) const

◆ GetContentEncoding()

PCaselessString SIPMIMEInfo::GetContentEncoding ( ) const

◆ GetContentLength()

PINDEX SIPMIMEInfo::GetContentLength ( ) const

◆ GetContentType()

PCaselessString SIPMIMEInfo::GetContentType ( bool  includeParameters = false) const

◆ GetCSeq()

PString SIPMIMEInfo::GetCSeq ( ) const

◆ GetCSeqIndex()

unsigned SIPMIMEInfo::GetCSeqIndex ( ) const
inline

◆ GetDate()

PString SIPMIMEInfo::GetDate ( ) const

◆ GetEvent()

PString SIPMIMEInfo::GetEvent ( ) const

◆ GetExpires()

unsigned SIPMIMEInfo::GetExpires ( unsigned  dflt = UINT_MAX) const

◆ GetFieldParameter()

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
fieldNameField name in dictionary
paramNameField parameter name
defaultValueDefault value for parameter

◆ GetFirstVia()

PString SIPMIMEInfo::GetFirstVia ( ) const

◆ GetFrom()

SIPURL SIPMIMEInfo::GetFrom ( ) const

◆ GetMaxForwards()

PINDEX SIPMIMEInfo::GetMaxForwards ( ) const

◆ GetMinExpires()

PINDEX SIPMIMEInfo::GetMinExpires ( ) const

◆ GetOrganization()

PString SIPMIMEInfo::GetOrganization ( ) const

◆ GetPAssertedIdentity()

SIPURL SIPMIMEInfo::GetPAssertedIdentity ( ) const

◆ GetPPreferredIdentity()

SIPURL SIPMIMEInfo::GetPPreferredIdentity ( ) const

◆ GetProductInfo()

void SIPMIMEInfo::GetProductInfo ( OpalProductInfo info) const

◆ GetProxyAuthenticate()

PString SIPMIMEInfo::GetProxyAuthenticate ( ) const

◆ GetRecordRoute() [1/2]

PString SIPMIMEInfo::GetRecordRoute ( ) const

◆ GetRecordRoute() [2/2]

bool SIPMIMEInfo::GetRecordRoute ( SIPURLList proxies,
bool  reversed 
) const

◆ GetReferredBy()

SIPURL SIPMIMEInfo::GetReferredBy ( ) const

◆ GetReferTo()

SIPURL SIPMIMEInfo::GetReferTo ( ) const

◆ GetRequire()

PStringSet SIPMIMEInfo::GetRequire ( ) const

◆ GetRoute() [1/2]

PString SIPMIMEInfo::GetRoute ( ) const

◆ GetRoute() [2/2]

bool SIPMIMEInfo::GetRoute ( SIPURLList proxies) const

◆ GetSIPETag()

PString SIPMIMEInfo::GetSIPETag ( ) const

◆ GetSIPIfMatch()

PString SIPMIMEInfo::GetSIPIfMatch ( ) const

◆ GetSubject()

PString SIPMIMEInfo::GetSubject ( ) const

◆ GetSubscriptionState()

PCaselessString SIPMIMEInfo::GetSubscriptionState ( PStringToString &  info) const

◆ GetSupported()

PStringSet SIPMIMEInfo::GetSupported ( ) const

◆ GetTo()

SIPURL SIPMIMEInfo::GetTo ( ) const

◆ GetTokenSet()

PStringSet SIPMIMEInfo::GetTokenSet ( const char *  field) const
protected

◆ GetUnsupported()

PStringSet SIPMIMEInfo::GetUnsupported ( ) const

◆ GetUserAgent()

PString SIPMIMEInfo::GetUserAgent ( ) const

◆ GetVia()

PString SIPMIMEInfo::GetVia ( ) const

◆ GetViaList()

bool SIPMIMEInfo::GetViaList ( PStringList &  v) const

◆ GetViaReceivedAddress()

OpalTransportAddress SIPMIMEInfo::GetViaReceivedAddress ( ) const

◆ GetWWWAuthenticate()

PString SIPMIMEInfo::GetWWWAuthenticate ( ) const

◆ InsertFieldParameter()

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
fieldValueValue of field string
paramNameField parameter name
newValueNew value for parameter

◆ InternalAddMIME()

virtual bool SIPMIMEInfo::InternalAddMIME ( const PString &  fieldName,
const PString &  fieldValue 
)
virtual

◆ IsContentLengthPresent()

PBoolean SIPMIMEInfo::IsContentLengthPresent ( ) const

◆ PrintOn()

virtual void SIPMIMEInfo::PrintOn ( ostream &  strm) const
virtual

◆ SetAccept()

void SIPMIMEInfo::SetAccept ( const PString &  v)

◆ SetAcceptEncoding()

void SIPMIMEInfo::SetAcceptEncoding ( const PString &  v)

◆ SetAcceptLanguage()

void SIPMIMEInfo::SetAcceptLanguage ( const PString &  v)

◆ SetAlertInfo()

void SIPMIMEInfo::SetAlertInfo ( const PString &  info,
int  appearance 
)

◆ SetAllow()

void SIPMIMEInfo::SetAllow ( const PString &  v)

◆ SetAllowEvents()

void SIPMIMEInfo::SetAllowEvents ( const PString &  v)

◆ SetCallID()

void SIPMIMEInfo::SetCallID ( const PString &  v)

◆ SetCompactForm()

void SIPMIMEInfo::SetCompactForm ( bool  form)
inline

◆ SetContact()

void SIPMIMEInfo::SetContact ( const PString &  v)

◆ SetContentEncoding()

void SIPMIMEInfo::SetContentEncoding ( const PString &  v)

◆ SetContentLength()

void SIPMIMEInfo::SetContentLength ( PINDEX  v)

◆ SetContentType()

void SIPMIMEInfo::SetContentType ( const PString &  v)

◆ SetCSeq()

void SIPMIMEInfo::SetCSeq ( const PString &  v)

◆ SetDate() [1/3]

void SIPMIMEInfo::SetDate ( const PString &  v)

◆ SetDate() [2/3]

void SIPMIMEInfo::SetDate ( const PTime &  t)

◆ SetDate() [3/3]

void SIPMIMEInfo::SetDate ( void  )

◆ SetEvent()

void SIPMIMEInfo::SetEvent ( const PString &  v)

◆ SetExpires()

void SIPMIMEInfo::SetExpires ( unsigned  v)

◆ SetFieldParameter()

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
fieldNameField name in dictionary
paramNameField parameter name
newValueNew value for parameter

◆ SetFrom()

void SIPMIMEInfo::SetFrom ( const PString &  v)

◆ SetMaxForwards()

void SIPMIMEInfo::SetMaxForwards ( PINDEX  v)

◆ SetMinExpires()

void SIPMIMEInfo::SetMinExpires ( PINDEX  v)

◆ SetOrganization()

void SIPMIMEInfo::SetOrganization ( const PString &  v)

◆ SetPAssertedIdentity()

void SIPMIMEInfo::SetPAssertedIdentity ( const PString &  v)

◆ SetPPreferredIdentity()

void SIPMIMEInfo::SetPPreferredIdentity ( const PString &  v)

◆ SetProductInfo()

void SIPMIMEInfo::SetProductInfo ( const PString &  ua,
const OpalProductInfo info 
)

◆ SetProxyAuthenticate()

void SIPMIMEInfo::SetProxyAuthenticate ( const PString &  v)

◆ SetRecordRoute() [1/2]

void SIPMIMEInfo::SetRecordRoute ( const PString &  v)

◆ SetRecordRoute() [2/2]

void SIPMIMEInfo::SetRecordRoute ( const SIPURLList proxies)

◆ SetReferredBy()

void SIPMIMEInfo::SetReferredBy ( const PString &  r)

◆ SetReferTo()

void SIPMIMEInfo::SetReferTo ( const PString &  r)

◆ SetRequire()

void SIPMIMEInfo::SetRequire ( const PStringSet &  v)

◆ SetRoute() [1/2]

void SIPMIMEInfo::SetRoute ( const PString &  v)

◆ SetRoute() [2/2]

void SIPMIMEInfo::SetRoute ( const SIPURLList proxies)

◆ SetSIPETag()

void SIPMIMEInfo::SetSIPETag ( const PString &  v)

◆ SetSIPIfMatch()

void SIPMIMEInfo::SetSIPIfMatch ( const PString &  v)

◆ SetSubject()

void SIPMIMEInfo::SetSubject ( const PString &  v)

◆ SetSubscriptionState()

void SIPMIMEInfo::SetSubscriptionState ( const PString &  v)

◆ SetSupported()

void SIPMIMEInfo::SetSupported ( const PStringSet &  v)

◆ SetTo()

void SIPMIMEInfo::SetTo ( const PString &  v)

◆ SetTokenSet()

void SIPMIMEInfo::SetTokenSet ( const char *  field,
const PStringSet &  tokens 
)
protected

◆ SetUnsupported()

void SIPMIMEInfo::SetUnsupported ( const PStringSet &  v)

◆ SetUserAgent()

void SIPMIMEInfo::SetUserAgent ( const PString &  v)

◆ SetVia()

void SIPMIMEInfo::SetVia ( const PString &  v)

◆ SetViaList()

void SIPMIMEInfo::SetViaList ( const PStringList &  v)

◆ SetWWWAuthenticate()

void SIPMIMEInfo::SetWWWAuthenticate ( const PString &  v)

Field Documentation

◆ compactForm

bool SIPMIMEInfo::compactForm
protected

Encode using compact form.


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