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

SIP body type for holding Octet contents (MIME content-type application/octet-stream). More...

#include <OctetContents.hxx>

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

List of all members.

Public Member Functions

 OctetContents ()
 OctetContents (const Data &octets)
 OctetContents (const HeaderFieldValue &hfv, const Mime &contentType)
 OctetContents (const Data &data, const Mime &contentType)
 OctetContents (const OctetContents &rhs)
virtual ~OctetContents ()
OctetContentsoperator= (const OctetContents &rhs)
virtual Contentsclone () const
 duplicate an OctetContents object
virtual EncodeStreamencodeParsed (EncodeStream &str) const
virtual void parse (ParseBuffer &pb)
Dataoctets ()
const Dataoctets () const

Static Public Member Functions

static const MimegetStaticType ()
static bool init ()

Static Public Attributes

static const OctetContents Empty

Private Attributes

Data mOctets

Detailed Description

SIP body type for holding Octet contents (MIME content-type application/octet-stream).

Definition at line 14 of file OctetContents.hxx.


Constructor & Destructor Documentation

OctetContents::OctetContents ( )

Definition at line 27 of file OctetContents.cxx.

Referenced by clone().

OctetContents::OctetContents ( const Data octets)

Definition at line 32 of file OctetContents.cxx.

   : Contents(getStaticType()),
     mOctets(octets)
{}
OctetContents::OctetContents ( const HeaderFieldValue hfv,
const Mime contentType 
)

Definition at line 37 of file OctetContents.cxx.

   : Contents(hfv, contentsType),
     mOctets()
{
}
OctetContents::OctetContents ( const Data data,
const Mime contentType 
)

Definition at line 43 of file OctetContents.cxx.

   : Contents(contentsType),
     mOctets(octets)
{
}
OctetContents::OctetContents ( const OctetContents rhs)

Definition at line 49 of file OctetContents.cxx.

   : Contents(rhs),
     mOctets(rhs.mOctets)
{
}
OctetContents::~OctetContents ( ) [virtual]

Definition at line 55 of file OctetContents.cxx.

{
}

Member Function Documentation

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

duplicate an OctetContents object

Returns:
pointer to a new OctetContents object

Implements resip::Contents.

Definition at line 71 of file OctetContents.cxx.

References OctetContents().

{
   return new OctetContents(*this);
}

Here is the call graph for this function:

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

Implements resip::LazyParser.

Definition at line 84 of file OctetContents.cxx.

References mOctets.

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

Definition at line 77 of file OctetContents.cxx.

References type.

Referenced by resip::SipMessage::getContents().

{
   static Mime type("application","octet-stream");
   return type;
}
bool OctetContents::init ( ) [static]

Reimplemented from resip::Contents.

Definition at line 20 of file OctetContents.cxx.

{
   static ContentsFactory<OctetContents> factory;
   (void)factory;
   return true;
}
Data& resip::OctetContents::octets ( ) [inline]

Definition at line 38 of file OctetContents.hxx.

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

{checkParsed(); return mOctets;}

Here is the call graph for this function:

const Data& resip::OctetContents::octets ( ) const [inline]

Definition at line 39 of file OctetContents.hxx.

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

{checkParsed(); return mOctets;}

Here is the call graph for this function:

OctetContents & OctetContents::operator= ( const OctetContents rhs)

Definition at line 60 of file OctetContents.cxx.

References mOctets.

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

Implements resip::LazyParser.

Definition at line 92 of file OctetContents.cxx.

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

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

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

   //DebugLog("OctetContents::parsed <" << mOctets << ">" );
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 17 of file OctetContents.hxx.

Definition at line 43 of file OctetContents.hxx.

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


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