reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
DateCategory.hxx
Go to the documentation of this file.
1#if !defined(RESIP_DATE_CATEGORY_HXX)
2#define RESIP_DATE_CATEGORY_HXX
3
4#include <iosfwd>
5#include "rutil/Data.hxx"
7
8namespace resip
9{
10
11//====================
12// DateCategory:
13//====================
14
25
26extern Data DayOfWeekData[];
27extern Data MonthData[];
28
43
49{
50 public:
52
54 DateCategory(time_t datetime);
56 Headers::Type type,
57 PoolBase* pool=0);
58 DateCategory(const DateCategory& orig,
59 PoolBase* pool=0);
61
62 virtual bool setDatetime(time_t datetime);
63
64 virtual void parse(ParseBuffer& pb);
65 virtual ParserCategory* clone() const;
66 virtual ParserCategory* clone(void* location) const;
67 virtual ParserCategory* clone(PoolBase* pool) const;
68
69 virtual EncodeStream& encodeParsed(EncodeStream& str) const;
70
71 static DayOfWeek DayOfWeekFromData(const Data&);
72 static Month MonthFromData(const Data&);
73
74 const DayOfWeek& dayOfWeek() const;
75 int& dayOfMonth();
76 int dayOfMonth() const;
77 Month& month();
78 Month month() const;
79 int& year();
80 int year() const;
81 int& hour();
82 int hour() const;
83 int& minute();
84 int minute() const;
85 int& second();
86 int second() const;
87
88 private:
89 enum DayOfWeek mDayOfWeek;
90 int mDayOfMonth;
91 enum Month mMonth;
92 int mYear;
93 int mHour;
94 int mMin;
95 int mSec;
96};
97
98}
99
100#endif
101
102/* ====================================================================
103 * The Vovida Software License, Version 1.0
104 *
105 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
106 *
107 * Redistribution and use in source and binary forms, with or without
108 * modification, are permitted provided that the following conditions
109 * are met:
110 *
111 * 1. Redistributions of source code must retain the above copyright
112 * notice, this list of conditions and the following disclaimer.
113 *
114 * 2. Redistributions in binary form must reproduce the above copyright
115 * notice, this list of conditions and the following disclaimer in
116 * the documentation and/or other materials provided with the
117 * distribution.
118 *
119 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
120 * and "Vovida Open Communication Application Library (VOCAL)" must
121 * not be used to endorse or promote products derived from this
122 * software without prior written permission. For written
123 * permission, please contact vocal@vovida.org.
124 *
125 * 4. Products derived from this software may not be called "VOCAL", nor
126 * may "VOCAL" appear in their name, without prior written
127 * permission of Vovida Networks, Inc.
128 *
129 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
130 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
131 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
132 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
133 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
134 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
135 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
136 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
137 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
138 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
139 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
140 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
141 * DAMAGE.
142 *
143 * ====================================================================
144 *
145 * This software consists of voluntary contributions made by Vovida
146 * Networks, Inc. and many individuals on behalf of Vovida Networks,
147 * Inc. For more information on Vovida Networks, Inc., please see
148 * <http://www.vovida.org/>.
149 *
150 */
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents the "SIP-date" element in the RFC 3261 grammar.
virtual EncodeStream & encodeParsed(EncodeStream &str) const
virtual void parse(ParseBuffer &pb)
static DayOfWeek DayOfWeekFromData(const Data &)
static constexpr CommaHandlingMode commaHandling
const DayOfWeek & dayOfWeek() const
DateCategory & operator=(const DateCategory &)
virtual ParserCategory * clone() const
virtual bool setDatetime(time_t datetime)
static Month MonthFromData(const Data &)
Provides string-parsing functionality with protection from buffer overflow.
Base class for all SIP grammar elements that can have parameters.
dcm! – add UnusedChecking(_enum) below;
Data DayOfWeekData[]
Data MonthData[]
#define EncodeStream