reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
RelatedConversationSet.cxx
Go to the documentation of this file.
1#include "Conversation.hxx"
2#include "ReconSubsystem.hxx"
4#include "Participant.hxx"
7#include "UserAgent.hxx"
8
9#include <rutil/Log.hxx>
10#include <rutil/Logger.hxx>
11
12using namespace recon;
13using namespace resip;
14
15#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
16
18 ConversationHandle initialConversationHandle,
19 Conversation* initialConversation)
20: mConversationManager(conversationManager),
21 mInitialConversationHandle(initialConversationHandle)
22{
23 mRelatedConversationMap[mInitialConversationHandle] = initialConversation;
24
25 DebugLog(<< "RelatedConversationSet created, initialConversationHandle=" << mInitialConversationHandle);
26}
27
29{
30 //InfoLog(<< "RelatedConversationSet destroyed, initialConversationHandle=" << mInitialConversationHandle);
31}
32
33void
35{
36 mRelatedConversationMap[relatedConversationHandle] = relatedConversation;
37}
38
39void
41{
42 mRelatedConversationMap.erase(conversationHandle);
43 if(mRelatedConversationMap.size() == 0)
44 {
45 // No more conversations - destroy self
46 delete this;
47 }
48}
49
50
51/* ====================================================================
52
53 Copyright (c) 2021, SIP Spectrum, Inc. www.sipspectrum.com
54 Copyright (c) 2007-2008, Plantronics, Inc.
55 All rights reserved.
56
57 Redistribution and use in source and binary forms, with or without
58 modification, are permitted provided that the following conditions are
59 met:
60
61 1. Redistributions of source code must retain the above copyright
62 notice, this list of conditions and the following disclaimer.
63
64 2. Redistributions in binary form must reproduce the above copyright
65 notice, this list of conditions and the following disclaimer in the
66 documentation and/or other materials provided with the distribution.
67
68 3. Neither the name of Plantronics nor the names of its contributors
69 may be used to endorse or promote products derived from this
70 software without specific prior written permission.
71
72 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
73 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
74 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
75 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
76 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
77 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
78 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
79 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
80 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
81 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
82 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
84 ==================================================================== */
#define DebugLog(args_)
Definition Logger.hxx:128
This class is one of two main classes of concern to an application using the UserAgent library.
This class is used to manage membership of participants.
RelatedConversationSet(ConversationManager &conversationManager, ConversationHandle initialConversationHandle, Conversation *initialConversation)
void removeConversation(ConversationHandle conversationHandle)
void addRelatedConversation(ConversationHandle relatedConversationHandle, Conversation *relatedConversation)
unsigned int ConversationHandle
dcm! – add UnusedChecking(_enum) below;