/[resiprocate]/branches/b-directory-reorg/sip/resiprocate/ParameterTypes.cxx
ViewVC logotype

Contents of /branches/b-directory-reorg/sip/resiprocate/ParameterTypes.cxx

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27