reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
UserAgentDialogSetFactory.cxx
Go to the documentation of this file.
1
#include "
ConversationManager.hxx
"
2
#include "
ReconSubsystem.hxx
"
3
#include "
UserAgentDialogSetFactory.hxx
"
4
#include "
RemoteParticipant.hxx
"
5
#include "
RemoteIMSessionParticipantDialogSet.hxx
"
6
#include "
DefaultDialogSet.hxx
"
7
#include "
MediaStackAdapter.hxx
"
8
9
#include <
rutil/Log.hxx
>
10
#include <
rutil/Logger.hxx
>
11
#include <
resip/stack/SipMessage.hxx
>
12
#include <
resip/dum/AppDialogSet.hxx
>
13
#include <
rutil/WinLeakCheck.hxx
>
14
15
#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
16
17
using namespace
recon
;
18
using namespace
resip
;
19
using namespace
std;
20
21
22
UserAgentDialogSetFactory::UserAgentDialogSetFactory
(
ConversationManager
& conversationManager) :
23
mConversationManager(conversationManager)
24
{
25
}
26
27
AppDialogSet
*
28
UserAgentDialogSetFactory::createAppDialogSet
(
DialogUsageManager
& dum,
29
const
SipMessage
& msg)
30
{
31
switch
(msg.
method
())
32
{
33
case
INVITE:
34
{
35
SdpContents
* sdp =
dynamic_cast<
SdpContents
*
>
(msg.
getContents
());
36
if
(sdp)
37
{
38
for
(
auto
it = sdp->
session
().
media
().begin(); it != sdp->
session
().
media
().end(); it++)
39
{
40
if
(it->name() ==
"message"
)
41
{
42
// If there is a message media line, then we assume no audio/video are present and we create an RemoteIMSessionParticipantDialogSet
43
return
mConversationManager.
createRemoteIMSessionParticipantDialogSetInstance
();
44
}
45
}
46
}
47
return
mConversationManager.
getMediaStackAdapter
().
createRemoteParticipantDialogSetInstance
();
48
break
;
49
}
50
default
:
51
return
new
DefaultDialogSet
(mConversationManager);
52
break
;
53
}
54
}
55
56
57
/* ====================================================================
58
59
Copyright (c) 2021-2022, SIP Spectrum, Inc. http://www.sipspectrum.com
60
Copyright (c) 2007-2008, Plantronics, Inc.
61
All rights reserved.
62
63
Redistribution and use in source and binary forms, with or without
64
modification, are permitted provided that the following conditions are
65
met:
66
67
1. Redistributions of source code must retain the above copyright
68
notice, this list of conditions and the following disclaimer.
69
70
2. Redistributions in binary form must reproduce the above copyright
71
notice, this list of conditions and the following disclaimer in the
72
documentation and/or other materials provided with the distribution.
73
74
3. Neither the name of Plantronics nor the names of its contributors
75
may be used to endorse or promote products derived from this
76
software without specific prior written permission.
77
78
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
79
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
80
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
81
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
82
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
83
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
84
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
85
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
86
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
87
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
88
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
89
90
==================================================================== */
AppDialogSet.hxx
ConversationManager.hxx
DefaultDialogSet.hxx
Log.hxx
Logger.hxx
MediaStackAdapter.hxx
ReconSubsystem.hxx
RemoteIMSessionParticipantDialogSet.hxx
RemoteParticipant.hxx
SipMessage.hxx
UserAgentDialogSetFactory.hxx
WinLeakCheck.hxx
recon::ConversationManager
This class is one of two main classes of concern to an application using the UserAgent library.
Definition
ConversationManager.hxx:71
recon::ConversationManager::getMediaStackAdapter
MediaStackAdapter & getMediaStackAdapter()
Definition
ConversationManager.hxx:761
recon::ConversationManager::createRemoteIMSessionParticipantDialogSetInstance
virtual RemoteParticipantDialogSet * createRemoteIMSessionParticipantDialogSetInstance(ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr)
Definition
ConversationManager.cxx:570
recon::DefaultDialogSet
This class is used by non-Invite DialogSets.
Definition
DefaultDialogSet.hxx:27
recon::MediaStackAdapter::createRemoteParticipantDialogSetInstance
virtual RemoteParticipantDialogSet * createRemoteParticipantDialogSetInstance(ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr)=0
recon::UserAgentDialogSetFactory::createAppDialogSet
resip::AppDialogSet * createAppDialogSet(resip::DialogUsageManager &, const resip::SipMessage &)
Definition
UserAgentDialogSetFactory.cxx:28
recon::UserAgentDialogSetFactory::UserAgentDialogSetFactory
UserAgentDialogSetFactory(ConversationManager &conversationManager)
Definition
UserAgentDialogSetFactory.cxx:22
resip::AppDialogSet
Definition
AppDialogSet.hxx:20
resip::DialogUsageManager
Definition
DialogUsageManager.hxx:79
resip::SdpContents::Session::media
const MediumContainer & media() const
return session Media lines
Definition
SdpContents.hxx:1010
resip::SdpContents
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
Definition
SdpContents.hxx:59
resip::SdpContents::session
Session & session()
get the parsed SDP
Definition
SdpContents.hxx:1178
resip::SipMessage
Represents a SIP message.
Definition
SipMessage.hxx:175
resip::SipMessage::getContents
Contents * getContents() const
Retrieves the body of a SIP message.
Definition
SipMessage.cxx:1148
resip::SipMessage::method
resip::MethodTypes method() const
returns the method type of the message
Definition
SipMessage.cxx:670
recon
Definition
BridgeMixer.hxx:10
resip
dcm! – add UnusedChecking(_enum) below;
Definition
AbstractFifo.hxx:16
resip
recon
UserAgentDialogSetFactory.cxx
Generated by
1.9.8