|
reSIProcate/stack
9694
|
SIP body type for holding PKCS7 contents (MIME content-type application/pkcs7-mime). More...
#include <Pkcs7Contents.hxx>


Public Member Functions | |
| Pkcs7Contents () | |
| Pkcs7Contents (const Data &text) | |
| Pkcs7Contents (const HeaderFieldValue &hfv, const Mime &contentType) | |
| Pkcs7Contents (const Data &data, const Mime &contentType) | |
| Pkcs7Contents (const Pkcs7Contents &rhs) | |
| virtual | ~Pkcs7Contents () |
| Pkcs7Contents & | operator= (const Pkcs7Contents &rhs) |
| virtual Contents * | clone () const |
| duplicate an Pkcs7Contents object | |
| virtual EncodeStream & | encodeParsed (EncodeStream &str) const |
| virtual void | parse (ParseBuffer &pb) |
Static Public Member Functions | |
| static const Mime & | getStaticType () |
| static bool | init () |
Static Public Attributes | |
| static const Pkcs7Contents | Empty |
Private Attributes | |
| Data | mText |
SIP body type for holding PKCS7 contents (MIME content-type application/pkcs7-mime).
Definition at line 14 of file Pkcs7Contents.hxx.
| Pkcs7Contents::Pkcs7Contents | ( | ) |
Definition at line 35 of file Pkcs7Contents.cxx.
Referenced by clone().
: Contents(getStaticType()), mText() { }
| Pkcs7Contents::Pkcs7Contents | ( | const Data & | text | ) |
Definition at line 45 of file Pkcs7Contents.cxx.
: Contents(getStaticType()), mText(txt) { }
| Pkcs7Contents::Pkcs7Contents | ( | const HeaderFieldValue & | hfv, |
| const Mime & | contentType | ||
| ) |
Definition at line 62 of file Pkcs7Contents.cxx.
Definition at line 56 of file Pkcs7Contents.cxx.
| Pkcs7Contents::Pkcs7Contents | ( | const Pkcs7Contents & | rhs | ) |
Definition at line 73 of file Pkcs7Contents.cxx.
| Pkcs7Contents::~Pkcs7Contents | ( | ) | [virtual] |
Definition at line 84 of file Pkcs7Contents.cxx.
{
}
| Contents * Pkcs7Contents::clone | ( | ) | const [virtual] |
duplicate an Pkcs7Contents object
Implements resip::Contents.
Reimplemented in resip::Pkcs7SignedContents.
Definition at line 104 of file Pkcs7Contents.cxx.
References Pkcs7Contents().
{
return new Pkcs7Contents(*this);
}

| EncodeStream & Pkcs7Contents::encodeParsed | ( | EncodeStream & | str | ) | const [virtual] |
Implements resip::LazyParser.
Definition at line 131 of file Pkcs7Contents.cxx.
References mText.
{
//DebugLog(<< "Pkcs7Contents::encodeParsed " << mText);
str << mText;
return str;
}
| const Mime & Pkcs7Contents::getStaticType | ( | ) | [static] |
Reimplemented in resip::Pkcs7SignedContents.
Definition at line 116 of file Pkcs7Contents.cxx.
References type.
| bool Pkcs7Contents::init | ( | ) | [static] |
Reimplemented from resip::Contents.
Reimplemented in resip::Pkcs7SignedContents.
Definition at line 20 of file Pkcs7Contents.cxx.
{
static ContentsFactory<Pkcs7Contents> factory;
(void)factory;
return true;
}
| Pkcs7Contents & Pkcs7Contents::operator= | ( | const Pkcs7Contents & | rhs | ) |
Definition at line 93 of file Pkcs7Contents.cxx.
References mText.
{
if (this != &rhs)
{
Contents::operator=(rhs);
mText = rhs.mText;
}
return *this;
}
| void Pkcs7Contents::parse | ( | ParseBuffer & | pb | ) | [virtual] |
Implements resip::LazyParser.
Definition at line 140 of file Pkcs7Contents.cxx.
References resip::Data::base64decode(), resip::ParseBuffer::data(), DebugLog, resip::Data::escaped(), InfoLog, mText, resip::Contents::mTransferEncoding, resip::ParseBuffer::position(), and resip::ParseBuffer::skipToEnd().
{
const char* anchor = pb.position();
pb.skipToEnd();
pb.data(mText, anchor);
if ( mTransferEncoding )
{
InfoLog( << "Transfer Encoding is " << mTransferEncoding->value() );
if ( mTransferEncoding->value() == Data("base64") )
{
Data bin = mText.base64decode();
mText = bin;
InfoLog( << "Base64 decoded to " << mText.escaped() );
}
}
DebugLog(<< "Pkcs7Contents::parsed <" << mText.escaped() << ">" );
}

const Pkcs7Contents Pkcs7Contents::Empty [static] |
Reimplemented in resip::Pkcs7SignedContents.
Definition at line 17 of file Pkcs7Contents.hxx.
Data resip::Pkcs7Contents::mText [private] |
Definition at line 42 of file Pkcs7Contents.hxx.
Referenced by encodeParsed(), operator=(), and parse().
1.7.5.1