1#if defined(HAVE_CONFIG_H)
17#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
26 mUnknownUriParametersBuffer(0)
36 mUnknownUriParametersBuffer(0)
42 mAllContacts(rhs.mAllContacts),
44 mDisplayName(rhs.mDisplayName),
45 mUnknownUriParametersBuffer(0)
53 mUnknownUriParametersBuffer(0)
71 mUnknownUriParametersBuffer(0)
120 return new (location)
NameAddr(*
this);
126 return new (pool)
NameAddr(*
this, pool);
176 bool laQuote =
false;
177 bool starContact =
false;
302#ifdef OMIT_DISPLAY_NAME_QUOTES_IF_NOT_REQUIRED
322#ifdef OMIT_DISPLAY_NAME_QUOTES_IF_NOT_REQUIRED
357 bool escaped =
false;
409 for (
const char* c = start; c < end; c++)
411 if ( (*c >=
'a' && *c <=
'z') ||
412 (*c >=
'A' && *c <=
'Z') ||
413 (*c >=
'0' && *c <=
'9'))
444 Data adjustedDisplayName;
471 return ParameterFactories[type](type, pb, terminators, pool);
491#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
492_enum##_Param::DType& \
493NameAddr::param(const _enum##_Param& paramType) \
496 _enum##_Param::Type* p = \
497 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
500 p = new _enum##_Param::Type(paramType.getTypeNum()); \
501 mParameters.push_back(p); \
506const _enum##_Param::DType& \
507NameAddr::param(const _enum##_Param& paramType) const \
510 _enum##_Param::Type* p = \
511 static_cast<_enum##_Param::Type*>(getParameterByEnum(paramType.getTypeNum())); \
514 InfoLog(<< "Missing parameter " _name " " << ParameterTypes::ParameterNames[paramType.getTypeNum()]); \
515 DebugLog(<< *this); \
516 throw Exception("Missing parameter " _name, __FILE__, __LINE__); \
#define defineParam(_enum, _name, _type, _RFC_ref_ignored)
#define resip_assert(x)
This file needs to work for both C and C++ code.
#define resip_assert_not_null(x)
Generically represents miscellaneous parameter data.
An iostream that operates on an existing Data.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool empty() const noexcept
Checks whether the Data is empty.
size_type size() const noexcept
Returns the number of bytes in this Data.
size_type find(const Data &match, size_type start=0) const
Finds a specified sequence of bytes in this Data.
static const size_type npos
Represents an impossible position; returned to indicate failure to find.
const char * data() const noexcept
Returns a pointer to the contents of this Data.
Represents various parameters that are indicated to be in effect merely by being present,...
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
bool operator<(const NameAddr &other) const
NameAddr & operator=(const NameAddr &)
bool operator==(const NameAddr &other) const
bool mustQuoteDisplayName() const
void remove(const Param< NameAddr > ¶mType)
virtual ParserCategory * clone() const
virtual EncodeStream & encodeParsed(EncodeStream &str) const
void adjustDisplayNameIfNeeded()
virtual void parse(ParseBuffer &pb)
bool isAllContacts() const
Data * mUnknownUriParametersBuffer
bool exists(const Param< NameAddr > ¶mType) const
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
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 skipNonWhitespace()
CurrentPosition skipWhitespace()
CurrentPosition skipToChar(char c)
CurrentPosition position() const
void reset(const char *pos)
void assertNotEof() const
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)
const char * skipToEndQuote(char quote='"')
const char * skipBackWhitespace()
BaseException used to indicate parse failures.
Base class for all SIP grammar elements that can have parameters.
void clearUnknownParameters()
Parameter * getParameterByEnum(ParameterTypes::Type type) const
ParameterList mUnknownParameters
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 * SEMI_COLON
static const char * LA_QUOTE
static const char * RA_QUOTE
static const char * DOUBLE_QUOTE
Generically represents unsigned 32-bit integer values conveyed by SIP parameters.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
virtual EncodeStream & encodeParsed(EncodeStream &str) const
virtual void parse(ParseBuffer &pb)
void setIsBareAddrSpec(bool value)
Tells the parser this URI is being parsed as a bare (unbracketed) addr-spec inside a header value (e....
void setIsBetweenAngleQuotes(bool value)
An ostream that operates on an existing Data.
dcm! – add UnusedChecking(_enum) below;
static const Data parseContext("PrivacyCategory constructor")