1#if !defined(RESIP_URI_HXX)
160 std::vector<Data>
getEnumLookups(
const std::vector<Data>& suffixes)
const;
251 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
253 "-_.!~*\\()&=+$,;?/").flip());
254 return userEncodingTable;
261 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
263 "-_.!~*\\()&=+$").flip());
264 return passwordEncodingTable;
277 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
284 return urnEncodingTable;
293 return localNumberTable;
300 return globalNumberTable;
313#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
314 const _enum##_Param::DType& param(const _enum##_Param& paramType) const; \
315 _enum##_Param::DType& param(const _enum##_Param& paramType); \
316 friend class _enum##_Param
355 std::unique_ptr<Data> mEmbeddedHeadersText;
356 std::unique_ptr<SipMessage> mEmbeddedHeaders;
359 std::unique_ptr<Data> mUserRaw;
373 static const bool tablesMightBeInitialized;
Wraps your platform's implementation of hash_map, hash_multimap, and hash_set.
Generically represents miscellaneous parameter data.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
static std::bitset< 256 > toBitset(const resip::Data &chars)
Creates a bitset reflecting the contents of this data (as a set) ie.
Represents various parameters that are indicated to be in effect merely by being present,...
Parameter *(* Factory)(ParameterTypes::Type, ParseBuffer &, const std::bitset< 256 > &terminators, PoolBase *pool)
Provides string-parsing functionality with protection from buffer overflow.
Base class for all SIP grammar elements that can have parameters.
void remove(const ParamBase ¶mType)
Removes a natively supported parameter, if the parameter is present.
bool exists(const ParamBase ¶mType) const
Checks for the existence of a natively supported parameter.
const Data & param(const ExtensionParameter ¶m) const
Const accessor for non-natively-supported parameter types.
Generically represents miscellaneous parameter data that is encoded using double quotes.
Represents a SIP message.
Represents the "token" element in the RFC 3261 grammar.
Generically represents unsigned 32-bit integer values conveyed by SIP parameters.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
static EncodingTable & getGlobalNumberTable()
virtual EncodeStream & encodeParsed(EncodeStream &str) const
static bool compareUriParametersEqual(Parameter *param1, Parameter *param2)
Compares two known URI parameters for equality.
static const size_t uriEncodingTableSize
const Data & user() const
defineParam(ttl, "ttl", UInt32Parameter, "RFC 3261")
bool aorEqual(const Uri &rhs) const
const Data & password() const
Token getUserAsTelephoneSubscriber() const
Returns the user-part as a 'telephone-subscriber' grammar element (in other words,...
static void setUriUrnEncoding(unsigned char c, bool encode)
const Data & userParameters() const
bool isEnumSearchable() const
Returns true if the uri can be converted into a string that can be used as an enum lookup.
void parseEmbeddedHeaders(ParseBuffer &pb)
virtual void parse(ParseBuffer &pb)
defineParam(duration, "duration", UInt32Parameter, "RFC 4240")
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
void setIsBareAddrSpec(bool value)
Tells the parser this URI is being parsed as a bare (unbracketed) addr-spec inside a header value (e....
bool isUserRelevant() const
Checks if this URI's scheme has sip:/sips:/tel: user-part semantics, i.e.
void setIsBetweenAngleQuotes(bool value)
defineParam(addTransport, "addTransport", ExistsParameter, "RESIP INTERNAL")
defineParam(method, "method", DataParameter, "RFC 3261")
defineParam(gr, "gr", ExistsOrDataParameter, "RFC 5627")
defineParam(comp, "comp", DataParameter, "RFC 3486")
std::vector< Data > getEnumLookups(const std::vector< Data > &suffixes) const
Return a vector of domains to do a NAPTR lookup for enum.
defineParam(user, "user", DataParameter, "RFC 3261, 4967")
const Data & scheme() const
bool mIsBetweenAngleQuotes
static EncodingTable & getPasswordEncodingTable()
Data getAorNoPort() const
bool operator<(const Uri &other) const
defineParam(wsSrcPort, "ws-src-port", UInt32Parameter, "RESIP INTERNAL (WebSocket)")
Data getAOR(bool addPort) const
Data mCanonicalHost
cache for IPv6 host comparison
bool exists(const Param< Uri > ¶mType) const
EncodeStream & encodeEmbeddedHeaders(EncodeStream &str) const
Data mNetNs
Net namespace name scoping host and port.
Data getAorNoReally() const
const Data & host() const
static void setUriPasswordEncoding(unsigned char c, bool encode)
static bool compareUriParametersLessThan(Parameter *param1, Parameter *param2)
Compares two URI parameters to determine if the first is less than the second.
std::bitset< Uri::uriEncodingTableSize > EncodingTable
Uri & operator=(const Uri &rhs)
static EncodingTable & getUserEncodingTable()
static EncodingTable & getUrnEncodingTable()
Encoding table for the NID:NSS (plus optional rq-components/fragment) of a urn: URI (RFC 8141: namest...
defineParam(rinstance, "rinstance", DataParameter, "proprietary (resip)")
defineParam(ob,"ob", ExistsParameter,"RFC 5626")
void getAorInternal(bool dropScheme, bool addPort, Data &aor) const
static Uri fromTel(const Uri &, const Uri &hostUri)
defineParam(extension, "ext", DataParameter, "RFC 3966")
const Data & netNs() const
void remove(const Param< Uri > ¶mType)
bool userIsTelephoneSubscriber() const
Returns true if the user appears to fit the BNF for the 'telephone-subscriber' element in the RFC 326...
const Data & path() const
static EncodingTable & getLocalNumberTable()
virtual ParserCategory * clone() const
static void setUriUserEncoding(unsigned char c, bool encode)
Modifies the default URI encoding character sets.
bool operator==(const Uri &other) const
defineParam(wsSrcIp, "ws-src-ip", DataParameter, "RESIP INTERNAL (WebSocket)")
defineParam(maddr, "maddr", DataParameter, "RFC 3261")
Uri getAorAsUri(TransportType transportTypeToRemoveDefaultPort=UNKNOWN_TRANSPORT) const
static bool isSignificantUriParameter(const ParameterTypes::Type type) noexcept
Checks if the URI-parameter appearing in only one URI must not be ignored when comparing the URIs.
defineParam(lr, "lr", ExistsParameter, "RFC 3261")
void setUserAsTelephoneSubscriber(const Token &telephoneSubscriber)
Sets the user-part of this URI using the dial-string and parameters stored in telephoneSubscriber.
defineParam(sigcompId, "sigcomp-id", QuotedDataParameter, "RFC 5049")
bool operator!=(const Uri &other) const
const Data & opaque() const
defineParam(transport, "transport", DataParameter, "RFC 3261")
dcm! – add UnusedChecking(_enum) below;
TransportType
An enumeration of transport protocols.
static char * encode(char *buf, const char *data, unsigned int length)