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