|
reSIProcate/stack
9694
|
00001 #if !defined(RESIP_EXPIRES_CATEGORY_HXX) 00002 #define RESIP_EXPIRES_CATEGORY_HXX 00003 00004 #include <iosfwd> 00005 #include "rutil/Data.hxx" 00006 #include "resip/stack/ParserCategory.hxx" 00007 00008 namespace resip 00009 { 00010 00019 class ExpiresCategory : public ParserCategory 00020 { 00021 public: 00022 enum {commaHandling = NoCommaTokenizing}; 00023 00024 ExpiresCategory(); 00025 ExpiresCategory(const HeaderFieldValue& hfv, 00026 Headers::Type type, 00027 PoolBase* pool=0); 00028 ExpiresCategory(const ExpiresCategory& orig, 00029 PoolBase* pool=0); 00030 ExpiresCategory& operator=(const ExpiresCategory&); 00031 00032 virtual void parse(ParseBuffer& pb); 00033 virtual EncodeStream& encodeParsed(EncodeStream& str) const; 00034 virtual ParserCategory* clone() const; 00035 virtual ParserCategory* clone(void* location) const; 00036 virtual ParserCategory* clone(PoolBase* pool) const; 00037 00038 UInt32& value(); 00039 UInt32 value() const; 00040 00041 // Inform the compiler that overloads of these may be found in 00042 // ParserCategory, too. 00043 using ParserCategory::exists; 00044 using ParserCategory::remove; 00045 using ParserCategory::param; 00046 00047 virtual Parameter* createParam(ParameterTypes::Type type, ParseBuffer& pb, const std::bitset<256>& terminators, PoolBase* pool); 00048 // .bwc, This is an awful lot for one lousy param type. 00049 bool exists(const Param<ExpiresCategory>& paramType) const; 00050 void remove(const Param<ExpiresCategory>& paramType); 00051 00052 #define defineParam(_enum, _name, _type, _RFC_ref_ignored) \ 00053 const _enum##_Param::DType& param(const _enum##_Param& paramType) const; \ 00054 _enum##_Param::DType& param(const _enum##_Param& paramType); \ 00055 friend class _enum##_Param 00056 00057 defineParam(refresher, "refresher", DataParameter, "RFC 4028"); 00058 00059 #undef defineParam 00060 00061 private: 00062 UInt32 mValue; 00063 00064 static ParameterTypes::Factory ParameterFactories[ParameterTypes::MAX_PARAMETER]; 00065 }; 00066 00067 } 00068 00069 #endif 00070 /* ==================================================================== 00071 * The Vovida Software License, Version 1.0 00072 * 00073 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. 00074 * 00075 * Redistribution and use in source and binary forms, with or without 00076 * modification, are permitted provided that the following conditions 00077 * are met: 00078 * 00079 * 1. Redistributions of source code must retain the above copyright 00080 * notice, this list of conditions and the following disclaimer. 00081 * 00082 * 2. Redistributions in binary form must reproduce the above copyright 00083 * notice, this list of conditions and the following disclaimer in 00084 * the documentation and/or other materials provided with the 00085 * distribution. 00086 * 00087 * 3. The names "VOCAL", "Vovida Open Communication Application Library", 00088 * and "Vovida Open Communication Application Library (VOCAL)" must 00089 * not be used to endorse or promote products derived from this 00090 * software without prior written permission. For written 00091 * permission, please contact vocal@vovida.org. 00092 * 00093 * 4. Products derived from this software may not be called "VOCAL", nor 00094 * may "VOCAL" appear in their name, without prior written 00095 * permission of Vovida Networks, Inc. 00096 * 00097 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 00098 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00099 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND 00100 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA 00101 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES 00102 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, 00103 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00104 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00105 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 00106 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00107 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00108 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00109 * DAMAGE. 00110 * 00111 * ==================================================================== 00112 * 00113 * This software consists of voluntary contributions made by Vovida 00114 * Networks, Inc. and many individuals on behalf of Vovida Networks, 00115 * Inc. For more information on Vovida Networks, Inc., please see 00116 * <http://www.vovida.org/>. 00117 * 00118 */
1.7.5.1