1#if defined(HAVE_CONFIG_H)
15#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
71 pb.
data(mValue, startMark);
109 return ParameterFactories[type](type, pb, terminators, pool);
129#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
130_enum##_Param::DType& \
131IdentityCategory::param(const _enum##_Param& paramType) \
134 _enum##_Param::Type* p = \
135 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
138 p = new _enum##_Param::Type(paramType.getTypeNum()); \
139 mParameters.push_back(p); \
144const _enum##_Param::DType& \
145IdentityCategory::param(const _enum##_Param& paramType) const \
148 _enum##_Param::Type* p = \
149 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
152 InfoLog(<< "Missing parameter " _name " " << ParameterTypes::ParameterNames[paramType.getTypeNum()]); \
153 DebugLog(<< *this); \
154 throw Exception("Missing parameter " _name, __FILE__, __LINE__); \
#define defineParam(_enum, _name, _type, _RFC_ref_ignored)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Represents an Identity header from RFC8824.
IdentityCategory & operator=(const IdentityCategory &)
const Data & value() const
Gets the value (ie; no parameters) of this IdentityCategory as a Data&.
bool exists(const Param< IdentityCategory > ¶mType) const
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
virtual void parse(ParseBuffer &pb)
virtual EncodeStream & encodeParsed(EncodeStream &str) const
void remove(const Param< IdentityCategory > ¶mType)
virtual ParserCategory * clone() 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 skipToChar(char c)
CurrentPosition skipToOneOf(const char *cs)
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
static const char * Whitespace
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.
static const char * SEMI_COLON
Represents a URI enclosed in angle brackets, used in Identity headers for RFC8224.
dcm! – add UnusedChecking(_enum) below;