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