/[resiprocate]/main/resip/dum/ChallengeInfo.cxx
ViewVC logotype

Contents of /main/resip/dum/ChallengeInfo.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8925 - (show annotations) (download)
Thu Dec 23 20:51:34 2010 UTC (8 years, 10 months ago) by kwhite
File MIME type: text/plain
File size: 3592 byte(s)
dum static code analysis fixes

minor clean up and comments
Fix FSM constants for subscriptions
1
2 #include <cassert>
3
4 #include "resip/dum/ChallengeInfo.hxx"
5 #include "rutil/Data.hxx"
6 #include "rutil/Logger.hxx"
7
8 using namespace resip;
9 using namespace std;
10
11 #define RESIPROCATE_SUBSYSTEM Subsystem::DUM
12
13
14 ChallengeInfo::ChallengeInfo( bool failed,
15 bool challengeRequired,
16 const Data& transactionId ):
17 DumFeatureMessage(transactionId),
18 mFailed(failed),
19 mChallengeRequired(challengeRequired)
20 {
21 }
22
23 ChallengeInfo::~ChallengeInfo()
24 {
25 }
26
27 bool
28 ChallengeInfo::isFailed() const
29 {
30 return mFailed;
31 }
32
33 bool
34 ChallengeInfo::isChallengeRequired() const
35 {
36 return mChallengeRequired;
37 }
38
39 Data
40 ChallengeInfo::brief() const
41 {
42 Data buffer;
43 DataStream strm(buffer);
44 strm << "ChallengeInfo " << mFailed << " : " << mChallengeRequired;
45 strm.flush();
46 return buffer;
47 }
48
49 resip::Message*
50 ChallengeInfo::clone() const
51 {
52 assert(false); return NULL;
53 }
54
55 std::ostream&
56 ChallengeInfo::encode(std::ostream& strm) const
57 {
58 strm << brief();
59 return strm;
60 }
61
62 std::ostream&
63 ChallengeInfo::encodeBrief(std::ostream& strm) const
64 {
65 return encode(strm);
66 }
67
68 std::ostream&
69 resip::operator<<(std::ostream& strm, const ChallengeInfo& msg)
70 {
71 return msg.encode(strm);
72 }
73
74 /* ====================================================================
75 * The Vovida Software License, Version 1.0
76 *
77 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
78 *
79 * Redistribution and use in source and binary forms, with or without
80 * modification, are permitted provided that the following conditions
81 * are met:
82 *
83 * 1. Redistributions of source code must retain the above copyright
84 * notice, this list of conditions and the following disclaimer.
85 *
86 * 2. Redistributions in binary form must reproduce the above copyright
87 * notice, this list of conditions and the following disclaimer in
88 * the documentation and/or other materials provided with the
89 * distribution.
90 *
91 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
92 * and "Vovida Open Communication Application Library (VOCAL)" must
93 * not be used to endorse or promote products derived from this
94 * software without prior written permission. For written
95 * permission, please contact vocal@vovida.org.
96 *
97 * 4. Products derived from this software may not be called "VOCAL", nor
98 * may "VOCAL" appear in their name, without prior written
99 * permission of Vovida Networks, Inc.
100 *
101 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
102 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
103 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
104 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
105 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
106 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
107 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
108 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
109 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
110 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
111 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
112 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
113 * DAMAGE.
114 *
115 * ====================================================================
116 *
117 * This software consists of voluntary contributions made by Vovida
118 * Networks, Inc. and many individuals on behalf of Vovida Networks,
119 * Inc. For more information on Vovida Networks, Inc., please see
120 * <http://www.vovida.org/>.
121 *
122 */
123

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27