/[resiprocate]/main/sip/resiprocate/ParameterTypes.cxx
ViewVC logotype

Contents of /main/sip/resiprocate/ParameterTypes.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4683 - (show annotations) (download)
Wed May 18 19:30:24 2005 UTC (14 years, 6 months ago) by sgodin
File size: 9744 byte(s)
Updated Session Timer references from "Session Timer Draft" to "RFC 4028"
1 #if defined(HAVE_CONFIG_H)
2 #include "resiprocate/config.hxx"
3 #endif
4
5 #include "resiprocate/ParameterTypes.hxx"
6 #include "resiprocate/os/compat.hxx"
7 #include <iostream>
8
9 #define defineParam(_enum, _name, _type, _RFC_ref_ignored) \
10 ParameterTypes::Type \
11 _enum##_Param::getTypeNum() const {return ParameterTypes::_enum;} \
12 _enum##_Param::_enum##_Param() \
13 { \
14 ParameterTypes::ParameterFactories[ParameterTypes::_enum] = Type::decode; \
15 ParameterTypes::ParameterNames[ParameterTypes::_enum] = _name; \
16 } \
17 _enum##_Param resip::p_##_enum
18
19 int strncasecmp(char*,char*,int);
20
21 using namespace std;
22
23 using namespace resip;
24
25 ParameterTypes::Factory ParameterTypes::ParameterFactories[ParameterTypes::MAX_PARAMETER] = {0};
26 Data ParameterTypes::ParameterNames[ParameterTypes::MAX_PARAMETER] = {"PARAMETER?"};
27
28 defineParam(data, "data", ExistsParameter, "callee-caps");
29 defineParam(control, "control", ExistsParameter, "callee-caps");
30 defineParam(mobility, "mobility", QuotedDataParameter, "callee-caps"); // mobile|fixed
31 defineParam(description, "description", QuotedDataParameter, "callee-caps"); // <> quoted
32 defineParam(events, "events", QuotedDataParameter, "callee-caps"); // list
33 defineParam(priority, "priority", QuotedDataParameter, "callee-caps"); // non-urgent|normal|urgent|emergency
34 defineParam(methods, "methods", QuotedDataParameter, "callee-caps"); // list
35 defineParam(schemes, "schemes", QuotedDataParameter, "callee-caps"); // list
36 defineParam(application, "application", ExistsParameter, "callee-caps");
37 defineParam(video, "video", ExistsParameter, "callee-caps");
38 defineParam(language, "language", QuotedDataParameter, "callee-caps"); // list
39 defineParam(type, "type", QuotedDataParameter, "callee-caps"); // list
40 defineParam(isFocus, "isfocus", ExistsParameter, "callee-caps");
41 defineParam(actor, "actor", QuotedDataParameter, "callee-caps"); // principal|msg-taker|attendant|information
42 defineParam(text, "text", ExistsParameter, "callee-caps");
43 defineParam(extensions, "extensions", QuotedDataParameter, "callee-caps"); //list
44 defineParam(Instance, "+sip.instance", QuotedDataParameter, "gruu"); // <> quoted
45 defineParam(gruu, "gruu", QuotedDataParameter, "gruu");
46
47 defineParam(accessType, "access-type", DataParameter, "RFC 2046");
48 defineParam(algorithm, "algorithm", DataParameter, "RFC ????");
49 defineParam(boundary, "boundary", DataParameter, "RFC 2046");
50 defineParam(branch, "branch", BranchParameter, "RFC ????");
51 defineParam(charset, "charset", DataParameter, "RFC 2045");
52 defineParam(cnonce, "cnonce", QuotedDataParameter, "RFC ????");
53 defineParam(comp, "comp", DataParameter, "RFC ????");
54 defineParam(dAlg, "d-alg", DataParameter, "RFC 3329");
55 defineParam(dQop, "d-qop", DataParameter, "RFC ????");
56 defineParam(dVer, "d-ver", QuotedDataParameter, "RFC ????");
57 defineParam(directory, "directory", DataParameter, "RFC 2046");
58 defineParam(domain, "domain", QuotedDataParameter, "RFC ????");
59 defineParam(duration, "duration", IntegerParameter, "RFC ????");
60 defineParam(expiration, "expiration", IntegerParameter, "RFC 2046");
61 defineParam(expires, "expires", IntegerParameter, "RFC ????");
62 defineParam(filename, "filename", DataParameter, "RFC ????");
63 defineParam(fromTag, "from-tag", DataParameter, "RFC ????");
64 defineParam(handling, "handling", DataParameter, "RFC ????");
65 defineParam(id, "id", DataParameter, "RFC ????");
66 defineParam(lr, "lr", ExistsParameter, "RFC ????");
67 defineParam(maddr, "maddr", DataParameter, "RFC ????");
68 defineParam(method, "method", DataParameter, "RFC ????");
69 defineParam(micalg, "micalg", DataParameter, "RFC 1847");
70 defineParam(mode, "mode", DataParameter, "RFC 2046");
71 defineParam(name, "name", DataParameter, "RFC 2046");
72 defineParam(nc, "nc", DataParameter, "RFC ????");
73 defineParam(nonce, "nonce", QuotedDataParameter, "RFC ????");
74 defineParam(opaque, "opaque", QuotedDataParameter, "RFC ????");
75 defineParam(permission, "permission", DataParameter, "RFC 2046");
76 defineParam(protocol, "protocol", DataParameter, "RFC 1847");
77 defineParam(purpose, "purpose", DataParameter, "RFC ????");
78 defineParam(q, "q", FloatParameter, "RFC ????");
79 defineParam(realm, "realm", QuotedDataParameter, "RFC ????");
80 defineParam(reason, "reason", DataParameter, "RFC ????");
81 defineParam(received, "received", DataParameter, "RFC ????");
82 defineParam(response, "response", QuotedDataParameter, "RFC ????");
83 defineParam(retryAfter, "retry-after", IntegerParameter, "RFC ????");
84 defineParam(rport, "rport", RportParameter, "RFC ????");
85 defineParam(server, "server", DataParameter, "RFC 2046");
86 defineParam(site, "site", DataParameter, "RFC 2046");
87 defineParam(size, "size", DataParameter, "RFC 2046");
88 defineParam(smimeType, "smime-type", DataParameter, "RFC 2633");
89 defineParam(stale, "stale", DataParameter, "RFC ????");
90 defineParam(tag, "tag", DataParameter, "RFC ????");
91 defineParam(toTag, "to-tag", DataParameter, "RFC ????");
92 defineParam(transport, "transport", DataParameter, "RFC ????");
93 defineParam(ttl, "ttl", IntegerParameter, "RFC ????");
94 defineParam(uri, "uri", QuotedDataParameter, "RFC ????");
95 defineParam(user, "user", DataParameter, "RFC ????");
96 defineParam(username, "username", QuotedDataParameter, "RFC 3261");
97 defineParam(earlyOnly, "early-only", ExistsParameter, "RFC 3891");
98 defineParam(refresher, "refresher", DataParameter, "RFC 4028");
99
100 defineParam(profileType, "profile-type", DataParameter, "draft-ietf-sipping-config-framework");
101 defineParam(vendor, "vendor", DataParameter, "draft-ietf-sipping-config-framework");
102 defineParam(model, "model", DataParameter, "draft-ietf-sipping-config-framework");
103 defineParam(version, "version", DataParameter, "draft-ietf-sipping-config-framework");
104 defineParam(effectiveBy, "effective-by", IntegerParameter, "draft-ietf-sipping-config-framework");
105 defineParam(document, "document", DataParameter, "draft-ietf-sipping-config-framework");
106 defineParam(appId, "app-id", DataParameter, "draft-ietf-sipping-config-framework");
107 defineParam(networkUser, "network-user", DataParameter, "draft-ietf-sipping-config-framework");
108
109 defineParam(url, "url", QuotedDataParameter, "draft-ietf-sip-content-indirect-mech-05");
110
111 // SPECIAL-CASE
112 ParameterTypes::Type
113 Qop_Options_Param::getTypeNum() const {return ParameterTypes::qopOptions;}
114 Qop_Options_Param::Qop_Options_Param()
115 {
116 ParameterTypes::ParameterNames[ParameterTypes::qopOptions] = "qop";
117 }
118 Qop_Options_Param resip::p_qopOptions;
119
120 ParameterTypes::Type
121 qop_Param::getTypeNum() const {return ParameterTypes::qop;}
122 qop_Param:: qop_Param()
123 {
124 ParameterTypes::ParameterNames[ParameterTypes::qop] = "qop";
125 }
126 qop_Param resip::p_qop;
127
128 Qop_Factory_Param::Qop_Factory_Param()
129 {
130 ParameterTypes::ParameterFactories[ParameterTypes::qopFactory] = Type::decode;
131 ParameterTypes::ParameterNames[ParameterTypes::qopFactory] = "qop";
132 }
133 Qop_Factory_Param resip::p_qopFactory;
134
135 #include "resiprocate/ParameterHash.hxx"
136
137 ParameterTypes::Type
138 ParameterTypes::getType(const char* pname, unsigned int len)
139 {
140 struct params* p;
141 p = ParameterHash::in_word_set(pname, len);
142 return p ? p->type : ParameterTypes::UNKNOWN;
143
144 }
145
146 /* ====================================================================
147 * The Vovida Software License, Version 1.0
148 *
149 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
150 *
151 * Redistribution and use in source and binary forms, with or without
152 * modification, are permitted provided that the following conditions
153 * are met:
154 *
155 * 1. Redistributions of source code must retain the above copyright
156 * notice, this list of conditions and the following disclaimer.
157 *
158 * 2. Redistributions in binary form must reproduce the above copyright
159 * notice, this list of conditions and the following disclaimer in
160 * the documentation and/or other materials provided with the
161 * distribution.
162 *
163 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
164 * and "Vovida Open Communication Application Library (VOCAL)" must
165 * not be used to endorse or promote products derived from this
166 * software without prior written permission. For written
167 * permission, please contact vocal@vovida.org.
168 *
169 * 4. Products derived from this software may not be called "VOCAL", nor
170 * may "VOCAL" appear in their name, without prior written
171 * permission of Vovida Networks, Inc.
172 *
173 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
174 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
175 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
176 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
177 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
178 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
179 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
180 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
181 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
182 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
183 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
184 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
185 * DAMAGE.
186 *
187 * ====================================================================
188 *
189 * This software consists of voluntary contributions made by Vovida
190 * Networks, Inc. and many individuals on behalf of Vovida Networks,
191 * Inc. For more information on Vovida Networks, Inc., please see
192 * <http://www.vovida.org/>.
193 *
194 */

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27