reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SipXParticipant.cxx
Go to the documentation of this file.
1#include "ReconSubsystem.hxx"
2#include "SipXParticipant.hxx"
4#include "UserAgent.hxx"
5
6#include <rutil/Log.hxx>
7#include <rutil/Logger.hxx>
8
9using namespace recon;
10using namespace resip;
11using namespace std;
12
13#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
14
17 ConversationManager& conversationManager,
18 SipXMediaStackAdapter& sipXMediaStackAdapter)
19: Participant(partHandle, partType, conversationManager),
20 mSipXMediaStackAdapter(sipXMediaStackAdapter)
21{
22}
23
25 ConversationManager& conversationManager,
26 SipXMediaStackAdapter& sipXMediaStackAdapter)
27: Participant(partType, conversationManager),
28 mSipXMediaStackAdapter(sipXMediaStackAdapter)
29{
30}
31
35
36std::shared_ptr<SipXMediaInterface>
38{
40 {
42 resip_assert(mSipXMediaStackAdapter.getMediaInterface() != 0);
43 return mSipXMediaStackAdapter.getMediaInterface();
45 {
46 // Note: For this mode, the recon code ensures that all conversations a participant
47 // is added to will share the same media interface, so using the first
48 // conversation is sufficient.
49 SipXConversation *firstConversation = dynamic_cast<SipXConversation*>(mConversations.begin()->second);
50 resip_assert(firstConversation->getMediaInterface() != 0);
51 return firstConversation->getMediaInterface();
52 }
53 default:
54 resip_assert(false);
55 return nullptr;
56 }
57}
58
59/* ====================================================================
60
61 Copyright (c) 2021, SIP Spectrum, Inc. www.sipspectrum.com
62 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
63 Copyright (c) 2007-2008, Plantronics, Inc.
64 All rights reserved.
65
66 Redistribution and use in source and binary forms, with or without
67 modification, are permitted provided that the following conditions are
68 met:
69
70 1. Redistributions of source code must retain the above copyright
71 notice, this list of conditions and the following disclaimer.
72
73 2. Redistributions in binary form must reproduce the above copyright
74 notice, this list of conditions and the following disclaimer in the
75 documentation and/or other materials provided with the distribution.
76
77 3. Neither the name of Plantronics nor the names of its contributors
78 may be used to endorse or promote products derived from this
79 software without specific prior written permission.
80
81 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
82 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
83 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
84 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
85 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
86 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
87 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
88 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
89 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
90 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
91 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92
93 ==================================================================== */
#define resip_assert(x)
This file needs to work for both C and C++ code.
This class is one of two main classes of concern to an application using the UserAgent library.
This is the base class for a RemoteParticipant, LocalParticipant and a MediaResourceParticipant.
ConversationMap mConversations
This class is used to manage membership of participants.
std::shared_ptr< SipXMediaInterface > getMediaInterface() const
This class is one of two main classes of concern to an application using the UserAgent library.
MediaInterfaceMode getMediaInterfaceMode() const
SipXMediaStackAdapter & mSipXMediaStackAdapter
SipXParticipant(ParticipantHandle partHandle, ConversationManager::ParticipantType partType, ConversationManager &conversationManager, SipXMediaStackAdapter &sipXMediaStackAdapter)
virtual std::shared_ptr< SipXMediaInterface > getMediaInterface()
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;