reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
DumTimeout.cxx
Go to the documentation of this file.
1#include "rutil/ResipAssert.h"
2#include "DumTimeout.hxx"
5
6using namespace resip;
7
9 unsigned long duration,
10 BaseUsageHandle targetBu,
11 unsigned int seq,
12 unsigned int altSeq,
13 const Data &transactionId)
14 : mType(type),
15 mDuration(duration),
16 mUsageHandle(targetBu),
17 mSeq(seq),
18 mSecondarySeq(altSeq),
19 mTransactionId(transactionId)
20{}
21
23 : mType(source.mType),
24 mDuration(source.mDuration),
25 mUsageHandle(source.mUsageHandle),
26 mSeq(source.mSeq),
27 mSecondarySeq(source.mSecondarySeq),
28 mTransactionId(source.mTransactionId)
29{}
30
33
36{
37 return new DumTimeout(*this);
38}
39
42{
43 return mType;
44}
45
46unsigned long
48{
49 return mDuration;
50}
51
52unsigned int
54{
55 return mSeq;
56}
57
58unsigned int
60{
61 return mSecondarySeq;
62}
63
65{
66 return mTransactionId;
67}
68
69bool
71{
72 resip_assert(0);
73 return false;
74}
75
77DumTimeout::encodeBrief(EncodeStream& strm) const
78{
79 return encode(strm);
80}
81
83DumTimeout::encode(EncodeStream& strm) const
84{
85 strm << "DumTimeout::";
86 switch (mType)
87 {
89 strm <<"SessionExpiration";
90 break;
91 case SessionRefresh:
92 strm <<"SessionRefresh";
93 break;
94 case Registration:
95 strm <<"Registration";
96 break;
98 strm <<"RegistrationRetry";
99 break;
100 case Publication:
101 strm <<"Publication";
102 break;
103 case Retransmit200:
104 strm <<"Retransmit200";
105 break;
106 case Retransmit1xx:
107 strm <<"Retransmit1xx";
108 break;
109 case Retransmit1xxRel:
110 strm <<"Retransmit1xxRel";
111 break;
112 case Resubmit1xxRel:
113 strm <<"Resubmit1xxRel";
114 break;
115 case WaitForAck:
116 strm <<"WaitForAck";
117 break;
118 case CanDiscardAck:
119 strm <<"CanDiscardAck";
120 break;
121 case StaleCall:
122 strm <<"StaleCall";
123 break;
124 case Subscription:
125 strm <<"Subscription";
126 break;
128 strm <<"SubscriptionRetry";
129 break;
130 case WaitForNotify:
131 strm <<"WaitForNotify";
132 break;
133 case StaleReInvite:
134 strm <<"StaleReInvite";
135 break;
136 case Glare:
137 strm <<"Glare";
138 break;
139 case Cancelled:
140 strm <<"Cancelled";
141 break;
143 strm <<"WaitingForForked2xx";
144 break;
145 case SendNextNotify:
146 strm <<"SendNextNotify";
147 break;
148 }
149 // Accessing mUsageHandle is not threadsafe, and this encode method is used outside
150 // the dum thread, in the stack thread via the TuSelector::add method for logging.
151 //if (mUsageHandle.isValid())
152 //{
153 // strm << " " << *mUsageHandle;
154 //}
155 //else
156 //{
157 // strm << " defunct";
158 //}
159
160 strm << ": duration=" << mDuration << " seq=" << mSeq;
161 return strm;
162}
163
166{
167 return mUsageHandle;
168}
169
170
171/* ====================================================================
172 * The Vovida Software License, Version 1.0
173 *
174 * Copyright (c) 2026 SIP Spectrum, Inc. https://www.sipspectrum.com
175 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
176 *
177 * Redistribution and use in source and binary forms, with or without
178 * modification, are permitted provided that the following conditions
179 * are met:
180 *
181 * 1. Redistributions of source code must retain the above copyright
182 * notice, this list of conditions and the following disclaimer.
183 *
184 * 2. Redistributions in binary form must reproduce the above copyright
185 * notice, this list of conditions and the following disclaimer in
186 * the documentation and/or other materials provided with the
187 * distribution.
188 *
189 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
190 * and "Vovida Open Communication Application Library (VOCAL)" must
191 * not be used to endorse or promote products derived from this
192 * software without prior written permission. For written
193 * permission, please contact vocal@vovida.org.
194 *
195 * 4. Products derived from this software may not be called "VOCAL", nor
196 * may "VOCAL" appear in their name, without prior written
197 * permission of Vovida Networks, Inc.
198 *
199 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
200 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
201 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
202 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
203 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
204 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
205 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
206 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
207 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
208 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
209 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
210 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
211 * DAMAGE.
212 *
213 * ====================================================================
214 *
215 * This software consists of voluntary contributions made by Vovida
216 * Networks, Inc. and many individuals on behalf of Vovida Networks,
217 * Inc. For more information on Vovida Networks, Inc., please see
218 * <http://www.vovida.org/>.
219 *
220 */
#define resip_assert(x)
This file needs to work for both C and C++ code.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Type type() const
virtual EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
BaseUsageHandle getBaseUsage() const
virtual bool isClientTransaction() const
const Data & transactionId() const
unsigned long duration() const
virtual EncodeStream & encode(EncodeStream &strm) const
output the entire message to stream
unsigned int seq() const
Message * clone() const
DumTimeout(Type type, unsigned long duration, BaseUsageHandle target, unsigned int seq, unsigned int aseq=0, const Data &transactionId=Data::Empty)
Definition DumTimeout.cxx:8
unsigned int secondarySeq() const
The base-class used for message-passing.
Definition Message.hxx:21
dcm! – add UnusedChecking(_enum) below;
#define EncodeStream