|
reSIProcate/stack
9694
|
Represents the "callid" element in the SIP grammar. More...
#include <CallId.hxx>


Public Types | |
| enum | { commaHandling = NoCommaTokenizing } |
Public Member Functions | |
| CallID () | |
| CallID (const HeaderFieldValue &hfv, Headers::Type type, PoolBase *pool=0) | |
| CallID (const CallID &orig, PoolBase *pool=0) | |
| CallID & | operator= (const CallID &) |
| bool | operator== (const CallID &) const |
| Data & | value () |
| const Data & | value () const |
| 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 |
| virtual Parameter * | createParam (ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool) |
| bool | exists (const Param< CallID > ¶mType) const |
| void | remove (const Param< CallID > ¶mType) |
| defineParam (fromTag,"from-tag", DataParameter,"RFC 3891 (not in IANA, apparently)") | |
| defineParam (toTag,"to-tag", DataParameter,"RFC 3891 (not in IANA, apparently)") | |
| defineParam (earlyOnly,"early-only", ExistsParameter,"RFC 3891 (not in IANA, apparently)") | |
Private Attributes | |
| Data | mValue |
Static Private Attributes | |
| static ParameterTypes::Factory | ParameterFactories [ParameterTypes::MAX_PARAMETER] = {0} |
Represents the "callid" element in the SIP grammar.
Definition at line 17 of file CallId.hxx.
| anonymous enum |
Definition at line 20 of file CallId.hxx.
| CallID::CallID | ( | ) |
| CallID::CallID | ( | const HeaderFieldValue & | hfv, |
| Headers::Type | type, | ||
| PoolBase * | pool = 0 |
||
| ) |
Definition at line 27 of file CallId.cxx.
: ParserCategory(hfv, type, pool), mValue() {}
Definition at line 33 of file CallId.cxx.
: ParserCategory(rhs, pool), mValue(rhs.mValue) {}
| ParserCategory * CallID::clone | ( | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 57 of file CallId.cxx.
References CallID().
{
return new CallID(*this);
}

| ParserCategory * CallID::clone | ( | void * | location | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 63 of file CallId.cxx.
References CallID().
{
return new (location) CallID(*this);
}

| ParserCategory * CallID::clone | ( | PoolBase * | pool | ) | const [virtual] |
Implements resip::ParserCategory.
Definition at line 69 of file CallId.cxx.
References CallID().
{
return new (pool) CallID(*this, pool);
}

| Parameter * CallID::createParam | ( | ParameterTypes::Type | type, |
| ParseBuffer & | pb, | ||
| const std::bitset< 256 > & | terminators, | ||
| PoolBase * | pool | ||
| ) | [virtual] |
Reimplemented from resip::ParserCategory.
Definition at line 110 of file CallId.cxx.
References resip::ParameterTypes::MAX_PARAMETER, ParameterFactories, type, and resip::ParameterTypes::UNKNOWN.
{
if(type > ParameterTypes::UNKNOWN && type < ParameterTypes::MAX_PARAMETER && ParameterFactories[type])
{
return ParameterFactories[type](type, pb, terminators, pool);
}
return 0;
}
| resip::CallID::defineParam | ( | fromTag | , |
| "from-tag" | , | ||
| DataParameter | , | ||
| "RFC 3891 (not in IANA, apparently)" | |||
| ) |
| resip::CallID::defineParam | ( | toTag | , |
| "to-tag" | , | ||
| DataParameter | , | ||
| "RFC 3891 (not in IANA, apparently)" | |||
| ) |
| resip::CallID::defineParam | ( | earlyOnly | , |
| "early-only" | , | ||
| ExistsParameter | , | ||
| "RFC 3891 (not in IANA, apparently)" | |||
| ) |
| EncodeStream & CallID::encodeParsed | ( | EncodeStream & | str | ) | const [virtual] |
Implements resip::LazyParser.
Definition at line 100 of file CallId.cxx.
References resip::ParserCategory::encodeParameters(), and mValue.
{
str << mValue;
encodeParameters(str);
return str;
}

Definition at line 120 of file CallId.cxx.
References resip::LazyParser::checkParsed(), resip::ParserCategory::getParameterByEnum(), and resip::ParamBase::getTypeNum().
{
checkParsed();
bool ret = getParameterByEnum(paramType.getTypeNum()) != NULL;
return ret;
}

Definition at line 40 of file CallId.cxx.
References mValue.
{
if (this != &rhs)
{
ParserCategory::operator=(rhs);
mValue = rhs.mValue;
}
return *this;
}
| bool CallID::operator== | ( | const CallID & | rhs | ) | const |
Definition at line 51 of file CallId.cxx.
References value().

| void CallID::parse | ( | ParseBuffer & | pb | ) | [virtual] |
Implements resip::LazyParser.
Definition at line 89 of file CallId.cxx.
References resip::ParseBuffer::data(), mValue, resip::ParserCategory::parseParameters(), resip::Symbols::SEMI_COLON, resip::ParseBuffer::skipToOneOf(), resip::ParseBuffer::skipWhitespace(), resip::Data::toBitset(), and resip::ParseBuffer::Whitespace.
{
const char* start = pb.skipWhitespace();
static const std::bitset<256> wsOrSemi(Data::toBitset(ParseBuffer::Whitespace).set(Symbols::SEMI_COLON[0]));
pb.skipToOneOf(wsOrSemi);
pb.data(mValue, start);
parseParameters(pb);
}

Definition at line 128 of file CallId.cxx.
References resip::LazyParser::checkParsed(), resip::ParamBase::getTypeNum(), and resip::ParserCategory::removeParameterByEnum().
{
checkParsed();
removeParameterByEnum(paramType.getTypeNum());
}

| Data & CallID::value | ( | ) |
Definition at line 75 of file CallId.cxx.
References resip::LazyParser::checkParsed(), and mValue.
Referenced by resip::DeprecatedDialog::clear(), operator==(), and resip::TuIM::processResponse().
{
checkParsed();
return mValue;
}

| const Data & CallID::value | ( | ) | const |
Definition at line 82 of file CallId.cxx.
References resip::LazyParser::checkParsed(), and mValue.
{
checkParsed();
return mValue;
}

Data resip::CallID::mValue [private] |
Definition at line 65 of file CallId.hxx.
Referenced by encodeParsed(), operator=(), parse(), and value().
ParameterTypes::Factory CallID::ParameterFactories = {0} [static, private] |
Definition at line 67 of file CallId.hxx.
Referenced by createParam().
1.7.5.1