1#if defined(HAVE_CONFIG_H)
15#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
44 mSubType(rhs.mSubType)
54 mSubType = rhs.mSubType;
90 return !(*
this == rhs);
125 pb.
data(mType, anchor);
133 pb.
data(mSubType, anchor);
142 return new Mime(*
this);
148 return new (location)
Mime(*
this);
154 return new (pool)
Mime(*
this, pool);
172 return ParameterFactories[
type](
type, pb, terminators, pool);
192#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
193_enum##_Param::DType& \
194Mime::param(const _enum##_Param& paramType) \
197 _enum##_Param::Type* p = \
198 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
201 p = new _enum##_Param::Type(paramType.getTypeNum()); \
202 mParameters.push_back(p); \
207const _enum##_Param::DType& \
208Mime::param(const _enum##_Param& paramType) const \
211 _enum##_Param::Type* p = \
212 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
215 InfoLog(<< "Missing parameter " _name " " << ParameterTypes::ParameterNames[paramType.getTypeNum()]); \
216 DebugLog(<< *this); \
217 throw Exception("Missing parameter " _name, __FILE__, __LINE__); \
#define defineParam(_enum, _name, _type, _RFC_ref_ignored)
#define HashValueImp(type, ret)
Generically represents miscellaneous parameter data.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
size_t caseInsensitiveTokenHash() const
A faster version of caseInsensitiveHash that has the same collision properties if this Data is made u...
static std::bitset< 256 > toBitset(const resip::Data &chars)
Creates a bitset reflecting the contents of this data (as a set) ie.
Represents the "media-type" element in the RFC 3261 grammar.
virtual void parse(ParseBuffer &pb)
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
virtual ParserCategory * clone() const
const Data & subType() const
bool isEqual(const Mime &rhs) const
bool exists(const Param< Mime > ¶mType) const
bool operator!=(const Mime &rhs) const
Mime & operator=(const Mime &)
bool operator==(const Mime &rhs) const
bool operator<(const Mime &rhs) const
void remove(const Param< Mime > ¶mType)
const Data & type() const
virtual EncodeStream & encodeParsed(EncodeStream &str) const
virtual ParameterTypes::Type getTypeNum() const =0
Parameter *(* Factory)(ParameterTypes::Type, ParseBuffer &, const std::bitset< 256 > &terminators, PoolBase *pool)
Provides string-parsing functionality with protection from buffer overflow.
CurrentPosition skipWhitespace()
CurrentPosition skipToOneOf(const char *cs)
CurrentPosition skipChar()
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
Base class for all SIP grammar elements that can have parameters.
Parameter * getParameterByEnum(ParameterTypes::Type type) const
ParserCategory & operator=(const ParserCategory &rhs)
void removeParameterByEnum(ParameterTypes::Type type)
void parseParameters(ParseBuffer &pb)
EncodeStream & encodeParameters(EncodeStream &str) const
Encodes parameters as they should appear on the wire.
Represents the "q" parameter value of the RFC 3261 grammar.
Generically represents miscellaneous parameter data that is encoded using double quotes.
static const char * SLASH
dcm! – add UnusedChecking(_enum) below;
bool isEqualNoCase(const Data &left, const Data &right)
bool isLessThanNoCase(const Data &left, const Data &right)