1
#if !defined(Conversation_hxx)
2
#define Conversation_hxx
4
#include "ConversationManager.hxx"
5
#include "ConversationParticipantAssignment.hxx"
10
class LocalParticipant;
11
class RemoteParticipant;
12
class RelatedConversationSet;
16
This class is used to manage membership of participants.
18
Conversations are used to designate the audio properties
19
between a number of managed participants. By default all
20
participants in a Conversation can talk to and hear all
21
other participants. A modified participants contribution
22
setting to a conversation can change this.
24
If a remote participant is a sole member in a conversation,
25
then he/she will be put on hold.
27
Author: Scott Godin (sgodin AT SipSpectrum DOT com)
33
Conversation(ConversationHandle handle,
34
ConversationManager& conversationManager,
35
RelatedConversationSet* relatedConversationSet=0, // Pass NULL to create new RelatedConversationSet
36
bool broadcastOnly = false);
39
void addParticipant(Participant* participant, unsigned int inputGain = 100, unsigned int outputGain = 100);
40
void removeParticipant(Participant* participant);
41
void modifyParticipantContribution(Participant* participant, unsigned int inputGain, unsigned int outputGain);
43
unsigned int getNumLocalParticipants() { return mNumLocalParticipants; }
44
unsigned int getNumRemoteParticipants() { return mNumRemoteParticipants; }
47
void notifyRemoteParticipantsOfHoldChange();
49
void createRelatedConversation(RemoteParticipant* newForkedParticipant, ParticipantHandle origParticipantHandle);
50
void join(Conversation* conversation); // move all non-duplicate participants from this conversation to passed in conversation and destroy this one
54
ConversationHandle getHandle() { return mHandle; }
56
void notifyMediaEvent(int mediaConnectionId, MediaEvent::MediaEventType eventType);
57
void notifyDtmfEvent(int mediaConnectionId, int dtmf, int duration, bool up);
60
friend class Participant;
61
friend class LocalParticipant;
62
friend class RemoteParticipant;
63
friend class MediaResourceParticipant;
64
void registerParticipant(Participant *, unsigned int inputGain=100, unsigned int outputGain=100);
65
void unregisterParticipant(Participant *);
67
friend class BridgeMixer;
68
typedef std::map<ParticipantHandle, ConversationParticipantAssignment> ParticipantMap;
69
ParticipantMap& getParticipants() { return mParticipants; }
71
resip::SharedPtr<MediaInterface> getMediaInterface() const { assert(mMediaInterface); return mMediaInterface; }
74
ConversationHandle mHandle;
75
ConversationManager& mConversationManager;
76
RelatedConversationSet *mRelatedConversationSet;
78
ParticipantMap mParticipants;
79
Participant* getParticipant(ParticipantHandle partHandle);
81
unsigned int mNumLocalParticipants;
82
unsigned int mNumRemoteParticipants;
83
unsigned int mNumMediaParticipants;
86
// sipX Media related members
87
BridgeMixer* getBridgeMixer() { return mBridgeMixer; }
88
resip::SharedPtr<MediaInterface> mMediaInterface;
89
BridgeMixer* mBridgeMixer;
97
/* ====================================================================
99
Copyright (c) 2007-2008, Plantronics, Inc.
102
Redistribution and use in source and binary forms, with or without
103
modification, are permitted provided that the following conditions are
106
1. Redistributions of source code must retain the above copyright
107
notice, this list of conditions and the following disclaimer.
109
2. Redistributions in binary form must reproduce the above copyright
110
notice, this list of conditions and the following disclaimer in the
111
documentation and/or other materials provided with the distribution.
113
3. Neither the name of Plantronics nor the names of its contributors
114
may be used to endorse or promote products derived from this
115
software without specific prior written permission.
117
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
118
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
119
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
120
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
121
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
122
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
123
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
124
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
125
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
126
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
127
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
129
==================================================================== */