reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
DialogEventHandler.hxx
Go to the documentation of this file.
1#if !defined(RESIP_DialogEventHandler_HXX)
2#define RESIP_DialogEventHandler_HXX
3
6
7namespace resip
8{
9
32
34{
35public:
36 TryingDialogEvent(const DialogEventInfo& info, const SipMessage& initialInvite)
37 : mEventInfo(info), mInitialInvite(initialInvite)
38 {}
40 : mEventInfo(rhs.mEventInfo), mInitialInvite(rhs.mInitialInvite)
41 {}
42
43 const DialogEventInfo& getEventInfo() const noexcept { return mEventInfo; }
44 const SipMessage& getInitialInvite() const noexcept { return mInitialInvite; }
46
47private:
48 DialogEventInfo mEventInfo;
49 SipMessage mInitialInvite;
50};
51
53{
54public:
56 : mEventInfo(info)
57 {}
59 : mEventInfo(rhs.mEventInfo)
60 {}
61
62 const DialogEventInfo& getEventInfo() const noexcept { return mEventInfo; }
64
65private:
66 DialogEventInfo mEventInfo;
67};
68
70{
71public:
72 explicit EarlyDialogEvent(const DialogEventInfo& info)
73 : mEventInfo(info)
74 {}
76 : mEventInfo(rhs.mEventInfo)
77 {
78 }
79
80 const DialogEventInfo& getEventInfo() const noexcept { return mEventInfo; }
82
83private:
84 DialogEventInfo mEventInfo;
85};
86
88{
89public:
91 : mEventInfo(info)
92 {}
94 : mEventInfo(rhs.mEventInfo)
95 {}
96
97 const DialogEventInfo& getEventInfo() const noexcept { return mEventInfo; }
99
100private:
101 DialogEventInfo mEventInfo;
102};
103
105{
106public:
108 : mEventInfo(info), mReason(reason), mCode(code)
109 {}
111 : mEventInfo(rhs.mEventInfo), mReason(rhs.mReason), mCode(rhs.mCode)
112 {}
113
114 const DialogEventInfo& getEventInfo() const noexcept { return mEventInfo; }
116 int getResponseCode() const noexcept { return mCode; }
118
119private:
120 DialogEventInfo mEventInfo;
122 int mCode;
123};
124
126{
127public:
128 typedef std::vector<std::shared_ptr<DialogEvent>> EventVector;
130 : mEvents(events)
131 {}
133 : mEvents(rhs.mEvents)
134 {}
135
136 const EventVector& getEvents() const noexcept { return mEvents; }
138
139private:
140 EventVector mEvents;
141};
142
144{
145 public:
146 virtual ~DialogEventHandler() = default;
147 virtual void onTrying(const TryingDialogEvent& evt)=0;
148 virtual void onProceeding(const ProceedingDialogEvent& evt)=0;
149 virtual void onEarly(const EarlyDialogEvent& evt)=0;
150 virtual void onConfirmed(const ConfirmedDialogEvent& evt)=0;
151 virtual void onTerminated(const TerminatedDialogEvent& evt)=0;
152 virtual void onMultipleEvents(const MultipleEventDialogEvent& evt)=0;
153};
154
155
156}
157
158#endif
159
160/* ====================================================================
161 * The Vovida Software License, Version 1.0
162 *
163 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
164 *
165 * Redistribution and use in source and binary forms, with or without
166 * modification, are permitted provided that the following conditions
167 * are met:
168 *
169 * 1. Redistributions of source code must retain the above copyright
170 * notice, this list of conditions and the following disclaimer.
171 *
172 * 2. Redistributions in binary form must reproduce the above copyright
173 * notice, this list of conditions and the following disclaimer in
174 * the documentation and/or other materials provided with the
175 * distribution.
176 *
177 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
178 * and "Vovida Open Communication Application Library (VOCAL)" must
179 * not be used to endorse or promote products derived from this
180 * software without prior written permission. For written
181 * permission, please contact vocal@vovida.org.
182 *
183 * 4. Products derived from this software may not be called "VOCAL", nor
184 * may "VOCAL" appear in their name, without prior written
185 * permission of Vovida Networks, Inc.
186 *
187 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
188 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
189 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
190 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
191 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
192 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
193 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
194 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
195 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
196 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
197 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
198 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
199 * DAMAGE.
200 *
201 * ====================================================================
202 *
203 * This software consists of voluntary contributions made by Vovida
204 * Networks, Inc. and many individuals on behalf of Vovida Networks,
205 * Inc. For more information on Vovida Networks, Inc., please see
206 * <http://www.vovida.org/>.
207 *
208 */
ConfirmedDialogEvent(const ConfirmedDialogEvent &rhs)
ConfirmedDialogEvent(const DialogEventInfo &info)
DialogEventType getType() const override
const DialogEventInfo & getEventInfo() const noexcept
virtual void onProceeding(const ProceedingDialogEvent &evt)=0
virtual void onConfirmed(const ConfirmedDialogEvent &evt)=0
virtual void onTerminated(const TerminatedDialogEvent &evt)=0
virtual void onEarly(const EarlyDialogEvent &evt)=0
virtual void onTrying(const TryingDialogEvent &evt)=0
virtual ~DialogEventHandler()=default
virtual void onMultipleEvents(const MultipleEventDialogEvent &evt)=0
virtual DialogEventType getType() const =0
DialogEvent & operator=(const DialogEvent &)=delete
DialogEvent & operator=(DialogEvent &&)=delete
DialogEvent(const DialogEvent &)=default
DialogEvent()=default
virtual ~DialogEvent()=default
DialogEvent(DialogEvent &&)=default
EarlyDialogEvent(const DialogEventInfo &info)
const DialogEventInfo & getEventInfo() const noexcept
DialogEventType getType() const override
EarlyDialogEvent(const EarlyDialogEvent &rhs)
TerminatedReason
called when an dialog enters the terminated state - this can happen after getting a BYE,...
const EventVector & getEvents() const noexcept
MultipleEventDialogEvent(const MultipleEventDialogEvent &rhs)
MultipleEventDialogEvent(EventVector &events)
std::vector< std::shared_ptr< DialogEvent > > EventVector
DialogEventType getType() const override
DialogEventType getType() const override
ProceedingDialogEvent(const DialogEventInfo &info)
const DialogEventInfo & getEventInfo() const noexcept
ProceedingDialogEvent(const ProceedingDialogEvent &rhs)
Represents a SIP message.
TerminatedDialogEvent(const DialogEventInfo &info, InviteSessionHandler::TerminatedReason reason, int code)
const DialogEventInfo & getEventInfo() const noexcept
InviteSessionHandler::TerminatedReason getTerminatedReason() const noexcept
TerminatedDialogEvent(const TerminatedDialogEvent &rhs)
DialogEventType getType() const override
TryingDialogEvent(const TryingDialogEvent &rhs)
DialogEventType getType() const override
const SipMessage & getInitialInvite() const noexcept
const DialogEventInfo & getEventInfo() const noexcept
TryingDialogEvent(const DialogEventInfo &info, const SipMessage &initialInvite)
dcm! – add UnusedChecking(_enum) below;