reSIProcate/stack  9694
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
resip::CpimContents Class Reference

SIP body type for holding CPIM (Common Profile for Instant Messaging) contents (MIME content-type message/cpim). More...

#include <CpimContents.hxx>

Inheritance diagram for resip::CpimContents:
Inheritance graph
[legend]
Collaboration diagram for resip::CpimContents:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CpimContents ()
 CpimContents (const Data &text)
 CpimContents (const HeaderFieldValue &hfv, const Mime &contentType)
 CpimContents (const Data &data, const Mime &contentType)
 CpimContents (const CpimContents &rhs)
virtual ~CpimContents ()
CpimContentsoperator= (const CpimContents &rhs)
virtual Contentsclone () const
 duplicate an CpimContents object
virtual EncodeStreamencodeParsed (EncodeStream &str) const
virtual void parse (ParseBuffer &pb)
Datatext ()
 Get the CPIM message text.

Static Public Member Functions

static const MimegetStaticType ()
static bool init ()

Static Public Attributes

static const CpimContents Empty

Private Attributes

Data mText

Detailed Description

SIP body type for holding CPIM (Common Profile for Instant Messaging) contents (MIME content-type message/cpim).

Definition at line 15 of file CpimContents.hxx.


Constructor & Destructor Documentation

CpimContents::CpimContents ( )

Definition at line 27 of file CpimContents.cxx.

Referenced by clone().

CpimContents::CpimContents ( const Data text)

Definition at line 32 of file CpimContents.cxx.

   : Contents(getStaticType()),
     mText(txt)
{}
CpimContents::CpimContents ( const HeaderFieldValue hfv,
const Mime contentType 
)

Definition at line 37 of file CpimContents.cxx.

   : Contents(hfv, contentsType),
     mText()
{
}
CpimContents::CpimContents ( const Data data,
const Mime contentType 
)

Definition at line 43 of file CpimContents.cxx.

   : Contents(contentsType),
     mText(txt)
{
}
CpimContents::CpimContents ( const CpimContents rhs)

Definition at line 49 of file CpimContents.cxx.

   : Contents(rhs),
     mText(rhs.mText)
{
}
CpimContents::~CpimContents ( ) [virtual]

Definition at line 55 of file CpimContents.cxx.

{
}

Member Function Documentation

Contents * CpimContents::clone ( ) const [virtual]

duplicate an CpimContents object

Returns:
pointer to a new CpimContents object

Implements resip::Contents.

Definition at line 71 of file CpimContents.cxx.

References CpimContents().

{
   return new CpimContents(*this);
}

Here is the call graph for this function:

EncodeStream & CpimContents::encodeParsed ( EncodeStream str) const [virtual]

Implements resip::LazyParser.

Definition at line 84 of file CpimContents.cxx.

References mText.

{
   //DebugLog(<< "CpimContents::encodeParsed " << mText);
   str << mText;
   return str;
}
const Mime & CpimContents::getStaticType ( ) [static]

Definition at line 77 of file CpimContents.cxx.

References type.

{
   static Mime type("message","cpim");
   return type;
}
bool CpimContents::init ( ) [static]

Reimplemented from resip::Contents.

Definition at line 18 of file CpimContents.cxx.

{
   static ContentsFactory<CpimContents> factory;
   (void)factory;
   return true;
}
CpimContents & CpimContents::operator= ( const CpimContents rhs)

Definition at line 60 of file CpimContents.cxx.

References mText.

{
   if (this != &rhs)
   {
      Contents::operator=(rhs);
      mText = rhs.mText;
   }
   return *this;
}
void CpimContents::parse ( ParseBuffer pb) [virtual]

Implements resip::LazyParser.

Definition at line 92 of file CpimContents.cxx.

References resip::ParseBuffer::data(), mText, resip::ParseBuffer::position(), and resip::ParseBuffer::skipToEnd().

{
   //DebugLog(<< "CpimContents::parse: " << pb.position());

   const char* anchor = pb.position();
   pb.skipToEnd();
   pb.data(mText, anchor);

   //DebugLog("CpimContents::parsed <" << mText << ">" );
}

Here is the call graph for this function:

Data& resip::CpimContents::text ( ) [inline]

Get the CPIM message text.

Returns:
Data containing the CPIM message text.

Definition at line 40 of file CpimContents.hxx.

References resip::LazyParser::checkParsed(), and mText.

Referenced by resip::TuIM::processMessageRequest().

{checkParsed(); return mText;}

Here is the call graph for this function:


Member Data Documentation

Definition at line 18 of file CpimContents.hxx.

Definition at line 44 of file CpimContents.hxx.

Referenced by encodeParsed(), operator=(), parse(), and text().


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