|
reSIProcate/stack
9694
|
SIP body type for holding plain contents (MIME content-type text/plain). More...
#include <PlainContents.hxx>


Public Member Functions | |
| PlainContents () | |
| PlainContents (const Data &text) | |
| PlainContents (const HeaderFieldValue &hfv, const Mime &contentType) | |
| PlainContents (const Data &data, const Mime &contentType) | |
| PlainContents (const PlainContents &rhs) | |
| virtual | ~PlainContents () |
| PlainContents & | operator= (const PlainContents &rhs) |
| virtual Contents * | clone () const |
| duplicate an PlainContents object | |
| virtual EncodeStream & | encodeParsed (EncodeStream &str) const |
| virtual void | parse (ParseBuffer &pb) |
| const Data & | text () const |
| Data & | text () |
Static Public Member Functions | |
| static const Mime & | getStaticType () |
| static bool | init () |
Static Public Attributes | |
| static const PlainContents | Empty |
Private Attributes | |
| Data | mText |
SIP body type for holding plain contents (MIME content-type text/plain).
Definition at line 13 of file PlainContents.hxx.
| PlainContents::PlainContents | ( | ) |
Definition at line 29 of file PlainContents.cxx.
Referenced by clone().
: Contents(getStaticType()), mText() {}
| PlainContents::PlainContents | ( | const Data & | text | ) |
Definition at line 34 of file PlainContents.cxx.
: Contents(getStaticType()), mText(txt) {}
| PlainContents::PlainContents | ( | const HeaderFieldValue & | hfv, |
| const Mime & | contentType | ||
| ) |
Definition at line 39 of file PlainContents.cxx.
Definition at line 45 of file PlainContents.cxx.
| PlainContents::PlainContents | ( | const PlainContents & | rhs | ) |
Definition at line 51 of file PlainContents.cxx.
| PlainContents::~PlainContents | ( | ) | [virtual] |
Definition at line 57 of file PlainContents.cxx.
{
}
| Contents * PlainContents::clone | ( | ) | const [virtual] |
duplicate an PlainContents object
Implements resip::Contents.
Reimplemented in resip::GenericContents.
Definition at line 73 of file PlainContents.cxx.
References PlainContents().
{
return new PlainContents(*this);
}

| EncodeStream & PlainContents::encodeParsed | ( | EncodeStream & | str | ) | const [virtual] |
Implements resip::LazyParser.
Definition at line 86 of file PlainContents.cxx.
References mText.
{
//DebugLog(<< "PlainContents::encodeParsed " << mText);
str << mText;
return str;
}
| const Mime & PlainContents::getStaticType | ( | ) | [static] |
| bool PlainContents::init | ( | ) | [static] |
Reimplemented from resip::Contents.
Definition at line 21 of file PlainContents.cxx.
{
static ContentsFactory<PlainContents> factory;
(void)factory;
return true;
}
| PlainContents & PlainContents::operator= | ( | const PlainContents & | rhs | ) |
Definition at line 62 of file PlainContents.cxx.
References mText.
{
if (this != &rhs)
{
Contents::operator=(rhs);
mText = rhs.mText;
}
return *this;
}
| void PlainContents::parse | ( | ParseBuffer & | pb | ) | [virtual] |
Implements resip::LazyParser.
Definition at line 94 of file PlainContents.cxx.
References resip::ParseBuffer::data(), mText, resip::ParseBuffer::position(), and resip::ParseBuffer::skipToEnd().
{
//DebugLog(<< "PlainContents::parse: " << pb.position());
const char* anchor = pb.position();
pb.skipToEnd();
pb.data(mText, anchor);
//DebugLog("PlainContents::parsed <" << mText << ">" );
}

| const Data& resip::PlainContents::text | ( | ) | const [inline] |
Definition at line 36 of file PlainContents.hxx.
References resip::LazyParser::checkParsed(), and mText.
Referenced by main(), and resip::TuIM::processMessageRequest().
{checkParsed(); return mText;}

| Data& resip::PlainContents::text | ( | ) | [inline] |
Definition at line 37 of file PlainContents.hxx.
References resip::LazyParser::checkParsed(), and mText.
{checkParsed(); return mText;}

const PlainContents PlainContents::Empty [static] |
Definition at line 16 of file PlainContents.hxx.
Data resip::PlainContents::mText [private] |
Definition at line 41 of file PlainContents.hxx.
Referenced by encodeParsed(), operator=(), parse(), and text().
1.7.5.1