reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
GenericUri.hxx
Go to the documentation of this file.
1#if !defined(RESIP_GENERIC_URI_HXX)
2#define RESIP_GENERIC_URI_HXX
3
4#include <iosfwd>
5#include "rutil/Data.hxx"
8
9namespace resip
10{
11
17{
18 public:
20
22 GenericUri(const Data& uri);
23 GenericUri(const HeaderFieldValue& hfv,
24 Headers::Type type,
25 PoolBase* pool=0);
26 GenericUri(const GenericUri& orig,
27 PoolBase* pool=0);
29
30 virtual void parse(ParseBuffer& pb);
31 virtual ParserCategory* clone() const;
32 virtual ParserCategory* clone(void* location) const;
33 virtual ParserCategory* clone(PoolBase* pool) const;
34 virtual EncodeStream& encodeParsed(EncodeStream& str) const;
35
36 Data& uri();
37 const Data& uri() const;
38
39 // Inform the compiler that overloads of these may be found in
40 // ParserCategory, too.
44
45 virtual Parameter* createParam(ParameterTypes::Type type, ParseBuffer& pb, const std::bitset<256>& terminators, PoolBase* pool);
46 // .bwc, This is an awful lot for one lousy param type.
47 bool exists(const Param<GenericUri>& paramType) const;
48 void remove(const Param<GenericUri>& paramType);
49
50#define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
51 const _enum##_Param::DType& param(const _enum##_Param& paramType) const; \
52 _enum##_Param::DType& param(const _enum##_Param& paramType); \
53 friend class _enum##_Param
54
55defineParam(purpose, "purpose", DataParameter, "RFC 3261");
56defineParam(alg, "alg", DataParameter, "RFC 8224");
57defineParam(ppt, "ppt", DataParameter, "RFC 8224");
58
59#undef defineParam
60
61 private:
62 Data mUri;
63
65};
67typedef GenericUri GenericURI; //.dcm. deprecated, should be removed soon
68}
69
70
71#endif
72/* ====================================================================
73 * The Vovida Software License, Version 1.0
74 *
75 * Copyright (c) 2026 SIP Spectrum, Inc. https://www.sipspectrum.com
76 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
77 *
78 * Redistribution and use in source and binary forms, with or without
79 * modification, are permitted provided that the following conditions
80 * are met:
81 *
82 * 1. Redistributions of source code must retain the above copyright
83 * notice, this list of conditions and the following disclaimer.
84 *
85 * 2. Redistributions in binary form must reproduce the above copyright
86 * notice, this list of conditions and the following disclaimer in
87 * the documentation and/or other materials provided with the
88 * distribution.
89 *
90 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
91 * and "Vovida Open Communication Application Library (VOCAL)" must
92 * not be used to endorse or promote products derived from this
93 * software without prior written permission. For written
94 * permission, please contact vocal@vovida.org.
95 *
96 * 4. Products derived from this software may not be called "VOCAL", nor
97 * may "VOCAL" appear in their name, without prior written
98 * permission of Vovida Networks, Inc.
99 *
100 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
101 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
102 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
103 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
104 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
105 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
106 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
107 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
108 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
109 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
110 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
111 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
112 * DAMAGE.
113 *
114 * ====================================================================
115 *
116 * This software consists of voluntary contributions made by Vovida
117 * Networks, Inc. and many individuals on behalf of Vovida Networks,
118 * Inc. For more information on Vovida Networks, Inc., please see
119 * <http://www.vovida.org/>.
120 *
121 */
Generically represents miscellaneous parameter data.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents the "absoluteURI" element in the RFC 3261 grammar.
GenericUri & operator=(const GenericUri &)
virtual ParserCategory * clone() const
void remove(const Param< GenericUri > &paramType)
defineParam(ppt, "ppt", DataParameter, "RFC 8224")
virtual Parameter * createParam(ParameterTypes::Type type, ParseBuffer &pb, const std::bitset< 256 > &terminators, PoolBase *pool)
static constexpr CommaHandlingMode commaHandling
defineParam(alg, "alg", DataParameter, "RFC 8224")
virtual void parse(ParseBuffer &pb)
bool exists(const Param< GenericUri > &paramType) const
defineParam(purpose, "purpose", DataParameter, "RFC 3261")
virtual EncodeStream & encodeParsed(EncodeStream &str) const
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 &paramType)
Removes a natively supported parameter, if the parameter is present.
bool exists(const ParamBase &paramType) const
Checks for the existence of a natively supported parameter.
const Data & param(const ExtensionParameter &param) const
Const accessor for non-natively-supported parameter types.
Container class for ParserCategory, used by SipMessage to represent multi-valued headers (Contact,...
dcm! – add UnusedChecking(_enum) below;
ParserContainer< GenericUri > GenericUris
GenericUri GenericURI
#define EncodeStream