|
reSIProcate/stack
9694
|
Represents the "warning-value" element in the RFC 3261 grammar. More...
#include <WarningCategory.hxx>


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) | |
| WarningCategory & | operator= (const WarningCategory &) |
| virtual void | parse (ParseBuffer &pb) |
| virtual ParserCategory * | clone () const |
| virtual ParserCategory * | clone (void *location) const |
| virtual ParserCategory * | clone (PoolBase *pool) const |
| virtual EncodeStream & | encodeParsed (EncodeStream &str) const |
| int & | code () |
| int | code () const |
| Data & | hostname () |
| const Data & | hostname () const |
| Data & | text () |
| const Data & | text () const |
Private Attributes | |
| int | mCode |
| Data | mHostname |
| Data | mText |
Represents the "warning-value" element in the RFC 3261 grammar.
Definition at line 17 of file WarningCategory.hxx.
| anonymous enum |
Definition at line 20 of file WarningCategory.hxx.
| WarningCategory::WarningCategory | ( | ) |
| 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) {}
| ParserCategory * WarningCategory::clone | ( | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 73 of file WarningCategory.cxx.
References WarningCategory().
{
return new WarningCategory(*this);
}

| 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);
}

| 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);
}

| 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;
}

| int WarningCategory::code | ( | ) | const |
Definition at line 98 of file WarningCategory.cxx.
References resip::LazyParser::checkParsed(), and mCode.
{
checkParsed();
return mCode;
}

| 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 | ( | ) |
Definition at line 105 of file WarningCategory.cxx.
References resip::LazyParser::checkParsed(), and mHostname.
Referenced by resip::Helper::makeResponse(), resip::TransactionState::processNoDnsResults(), and resip::TransactionState::processTransportFailure().
{
checkParsed();
return mHostname;
}

| const Data & WarningCategory::hostname | ( | ) | const |
Definition at line 112 of file WarningCategory.cxx.
References resip::LazyParser::checkParsed(), and mHostname.
{
checkParsed();
return mHostname;
}

| WarningCategory & WarningCategory::operator= | ( | const WarningCategory & | rhs | ) |
| 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();
}

| Data & WarningCategory::text | ( | ) |
Definition at line 119 of file WarningCategory.cxx.
References resip::LazyParser::checkParsed(), and mText.
Referenced by main(), resip::Helper::makeResponse(), resip::TransactionState::processNoDnsResults(), and resip::TransactionState::processTransportFailure().
{
checkParsed();
return mText;
}

| const Data & WarningCategory::text | ( | ) | const |
Definition at line 126 of file WarningCategory.cxx.
References resip::LazyParser::checkParsed(), and mText.
{
checkParsed();
return mText;
}

int resip::WarningCategory::mCode [private] |
Definition at line 44 of file WarningCategory.hxx.
Referenced by code(), encodeParsed(), operator=(), and parse().
Data resip::WarningCategory::mHostname [private] |
Definition at line 45 of file WarningCategory.hxx.
Referenced by encodeParsed(), hostname(), operator=(), and parse().
Data resip::WarningCategory::mText [private] |
Definition at line 46 of file WarningCategory.hxx.
Referenced by encodeParsed(), operator=(), parse(), and text().
1.7.5.1