reSIProcate/stack  9694
Public Types | Public Member Functions | Private Attributes
resip::WarningCategory Class Reference

Represents the "warning-value" element in the RFC 3261 grammar. More...

#include <WarningCategory.hxx>

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

List of all members.

Public Types

enum  { commaHandling = CommasAllowedOutputCommas }

Public Member Functions

 WarningCategory ()
 WarningCategory (const HeaderFieldValue &hfv, Headers::Type type, PoolBase *pool=0)
 WarningCategory (const WarningCategory &orig, PoolBase *pool=0)
WarningCategoryoperator= (const WarningCategory &)
virtual void parse (ParseBuffer &pb)
virtual ParserCategoryclone () const
virtual ParserCategoryclone (void *location) const
virtual ParserCategoryclone (PoolBase *pool) const
virtual EncodeStreamencodeParsed (EncodeStream &str) const
int & code ()
int code () const
Datahostname ()
const Datahostname () const
Datatext ()
const Datatext () const

Private Attributes

int mCode
Data mHostname
Data mText

Detailed Description

Represents the "warning-value" element in the RFC 3261 grammar.

Definition at line 17 of file WarningCategory.hxx.


Member Enumeration Documentation

anonymous enum
Enumerator:
commaHandling 

Definition at line 20 of file WarningCategory.hxx.


Constructor & Destructor Documentation

WarningCategory::WarningCategory ( )

Definition at line 18 of file WarningCategory.cxx.

Referenced by clone().

WarningCategory::WarningCategory ( const HeaderFieldValue hfv,
Headers::Type  type,
PoolBase pool = 0 
)

Definition at line 22 of file WarningCategory.cxx.

   : ParserCategory(hfv, type, pool) 
{}
WarningCategory::WarningCategory ( const WarningCategory orig,
PoolBase pool = 0 
)

Definition at line 28 of file WarningCategory.cxx.

   : ParserCategory(rhs, pool),
     mCode(rhs.mCode),
     mHostname(rhs.mHostname),
     mText(rhs.mText)
{}

Member Function Documentation

ParserCategory * WarningCategory::clone ( ) const [virtual]

Implements resip::ParserCategory.

Definition at line 73 of file WarningCategory.cxx.

References WarningCategory().

{
   return new WarningCategory(*this);
}

Here is the call graph for this function:

ParserCategory * WarningCategory::clone ( void *  location) const [virtual]

Implements resip::ParserCategory.

Definition at line 79 of file WarningCategory.cxx.

References WarningCategory().

{
   return new (location) WarningCategory(*this);
}

Here is the call graph for this function:

ParserCategory * WarningCategory::clone ( PoolBase pool) const [virtual]

Implements resip::ParserCategory.

Definition at line 85 of file WarningCategory.cxx.

References WarningCategory().

{
   return new (pool) WarningCategory(*this, pool);
}

Here is the call graph for this function:

int & WarningCategory::code ( )

Definition at line 91 of file WarningCategory.cxx.

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

Referenced by resip::Helper::makeResponse(), resip::TransactionState::processNoDnsResults(), and resip::TransactionState::processTransportFailure().

{
   checkParsed();
   return mCode;
}

Here is the call graph for this function:

int WarningCategory::code ( ) const

Definition at line 98 of file WarningCategory.cxx.

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

{
   checkParsed();
   return mCode;
}

Here is the call graph for this function:

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

Implements resip::LazyParser.

Definition at line 133 of file WarningCategory.cxx.

References resip::Symbols::DOUBLE_QUOTE, mCode, mHostname, mText, and resip::Symbols::SPACE.

{
   str << mCode << Symbols::SPACE[0];
   str << mHostname << Symbols::SPACE[0];
   str << Symbols::DOUBLE_QUOTE[0] << mText << Symbols::DOUBLE_QUOTE[0];

   return str;
}
Data & WarningCategory::hostname ( )
const Data & WarningCategory::hostname ( ) const

Definition at line 112 of file WarningCategory.cxx.

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

{
   checkParsed();
   return mHostname;
}

Here is the call graph for this function:

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

Definition at line 37 of file WarningCategory.cxx.

References mCode, mHostname, and mText.

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

Implements resip::LazyParser.

Definition at line 49 of file WarningCategory.cxx.

References resip::ParseBuffer::assertEof(), resip::ParseBuffer::data(), resip::Symbols::DOUBLE_QUOTE, resip::ParseBuffer::fail(), mCode, mHostname, mText, resip::ParseBuffer::skipChar(), resip::ParseBuffer::skipNonWhitespace(), resip::ParseBuffer::skipToEndQuote(), resip::ParseBuffer::skipWhitespace(), and resip::ParseBuffer::uInt32().

{
   pb.skipWhitespace();
   mCode = pb.uInt32();

   if(mCode >= 1000 || mCode < 100)
   {
      pb.fail(__FILE__,__LINE__,"Warning code does not have exactly three digits.");
   }

   const char* anchor = pb.skipWhitespace();
   pb.skipNonWhitespace();
   pb.data(mHostname, anchor);

   pb.skipWhitespace();
   anchor = pb.skipChar(Symbols::DOUBLE_QUOTE[0]);
   pb.skipToEndQuote(Symbols::DOUBLE_QUOTE[0]);
   pb.data(mText, anchor);
   anchor = pb.skipChar(Symbols::DOUBLE_QUOTE[0]);
   pb.skipWhitespace();
   pb.assertEof();
}

Here is the call graph for this function:

Data & WarningCategory::text ( )
const Data & WarningCategory::text ( ) const

Definition at line 126 of file WarningCategory.cxx.

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

{
   checkParsed();
   return mText;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 44 of file WarningCategory.hxx.

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

Definition at line 45 of file WarningCategory.hxx.

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

Definition at line 46 of file WarningCategory.hxx.

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


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