1
#if defined(HAVE_CONFIG_H)
5
#include "resip/stack/UnknownParameter.hxx"
6
#include "rutil/ParseBuffer.hxx"
7
#include "resip/stack/Symbols.hxx"
8
#include "rutil/WinLeakCheck.hxx"
10
using namespace resip;
13
UnknownParameter::UnknownParameter(const char* startName,
14
unsigned int nameSize,
16
const std::bitset<256>& terminators)
17
: Parameter(ParameterTypes::UNKNOWN),
18
mName(startName, nameSize),
23
if (!pb.eof() && *pb.position() == Symbols::EQUALS[0])
25
pb.skipChar(Symbols::EQUALS[0]);
27
if (*pb.position() == Symbols::DOUBLE_QUOTE[0])
31
const char* pos = pb.position();
38
const char* pos = pb.position();
39
pb.skipToOneOf(terminators);
46
// must be a terminator -- exists style
50
UnknownParameter::UnknownParameter(const Data& name)
51
: Parameter(ParameterTypes::UNKNOWN),
58
UnknownParameter::getName() const
65
UnknownParameter::clone() const
67
return new UnknownParameter(*this);
71
UnknownParameter::encode(EncodeStream& stream) const
75
return stream << getName() << Symbols::EQUALS
76
<< Symbols::DOUBLE_QUOTE << mValue << Symbols::DOUBLE_QUOTE;
78
else if (!mValue.empty())
80
return stream << getName() << Symbols::EQUALS << mValue;
84
return stream << getName();
88
EncodeStream& operator<<(EncodeStream& stream, UnknownParameter& comp)
90
return stream << comp.getName() << "=" << comp.value();
94
/* ====================================================================
95
* The Vovida Software License, Version 1.0
97
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
99
* Redistribution and use in source and binary forms, with or without
100
* modification, are permitted provided that the following conditions
103
* 1. Redistributions of source code must retain the above copyright
104
* notice, this list of conditions and the following disclaimer.
106
* 2. Redistributions in binary form must reproduce the above copyright
107
* notice, this list of conditions and the following disclaimer in
108
* the documentation and/or other materials provided with the
111
* 3. The names "VOCAL", "Vovida Open Communication Application Library",
112
* and "Vovida Open Communication Application Library (VOCAL)" must
113
* not be used to endorse or promote products derived from this
114
* software without prior written permission. For written
115
* permission, please contact vocal@vovida.org.
117
* 4. Products derived from this software may not be called "VOCAL", nor
118
* may "VOCAL" appear in their name, without prior written
119
* permission of Vovida Networks, Inc.
121
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
122
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
123
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
124
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
125
* NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
126
* IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
127
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
128
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
129
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
130
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
131
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
132
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
135
* ====================================================================
137
* This software consists of voluntary contributions made by Vovida
138
* Networks, Inc. and many individuals on behalf of Vovida Networks,
139
* Inc. For more information on Vovida Networks, Inc., please see
140
* <http://www.vovida.org/>.