1#if !defined(ConversationManagerCmds_hxx)
2#define ConversationManagerCmds_hxx
24#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
112 WarningLog(<<
"JoinConversationCmd: not supported for sourceConv=" << mSourceConvHandle <<
", and destConv=" << mDestConvHandle);
124 WarningLog(<<
"JoinConversationCmd: invalid source conversation handle: " << mSourceConvHandle);
128 WarningLog(<<
"JoinConversationCmd: invalid destination conversation handle: " << mDestConvHandle);
147 std::shared_ptr<ConversationProfile>
callerProfile =
nullptr,
148 const std::multimap<resip::Data,resip::Data>&
extraHeaders = (std::multimap<resip::Data,resip::Data>()))
152 mDestination(destination),
170 WarningLog(<<
"CreateRemoteParticipantCmd: error creating UACOriginalRemoteParticipant.");
176 WarningLog(<<
"CreateRemoteParticipantCmd: invalid conversation handle: " << mConvHandle);
187 std::shared_ptr<ConversationProfile> mCallerProfile;
188 std::multimap<resip::Data,resip::Data> mExtraHeaders;
200 mDestination(destination),
211 std::shared_ptr<ConversationProfile> mConversationProfile;
221 std::shared_ptr<ConversationProfile>
callerProfile =
nullptr,
222 const std::multimap<resip::Data, resip::Data>&
extraHeaders = (std::multimap<resip::Data, resip::Data>()))
225 mDestination(destination),
239 WarningLog(<<
"CreateRemoteIMSessionParticipantCmd: error creating UACOriginalRemoteParticipant.");
249 std::shared_ptr<ConversationProfile> mCallerProfile;
250 std::multimap<resip::Data, resip::Data> mExtraHeaders;
281 WarningLog(<<
"CreateMediaResourceParticipantCmd: error creating MediaResourceParticipant.");
287 WarningLog(<<
"CreateMediaResourceParticipantCmd: invalid conversation handle: " << mConvHandle);
297 std::shared_ptr<resip::Data> mAudioBuffer;
298 void* mRecordingCircularBuffer;
325 : mConversationManager(
rhs.mConversationManager), mPartHandle(
rhs.mPartHandle) {}
365 WarningLog(<<
"AddParticipantCmd: participants cannot belong to multiple conversations that don't share a media interface in sipXConversationMediaInterfaceMode.");
375 WarningLog(<<
"AddParticipantCmd: invalid participant handle: " << mPartHandle);
379 WarningLog(<<
"AddParticipantCmd: invalid conversation handle: " << mConvHandle);
412 WarningLog(<<
"RemoveParticipantCmd: you cannot remove non-local participants from all conversations when in sipXConversationMediaInterfaceMode.");
451 if (
participant->getConnectionPortOnBridge() != -1)
457 WarningLog(<<
"MoveParticipantCmd: failed, both conversations must be using the same media interface.");
470 WarningLog(<<
"MoveParticipantCmd: invalid participant handle: " << mPartHandle);
474 WarningLog(<<
"MoveParticipantCmd: invalid source conversation handle: " << mSourceConvHandle);
478 WarningLog(<<
"MoveParticipantCmd: invalid destination conversation handle: " << mDestConvHandle);
515 WarningLog(<<
"ModifyParticipantContributionCmd: invalid participant handle: " << mPartHandle);
519 WarningLog(<<
"ModifyParticipantContributionCmd: invalid conversation handle: " << mConvHandle);
528 unsigned int mInputGain;
529 unsigned int mOutputGain;
541 if (mChannelNum >= 1 && mChannelNum <= 2)
550 WarningLog(<<
"ModifyParticipantRecordChannelCmd: invalid participant handle: " << mPartHandle);
555 WarningLog(<<
"ModifyParticipantRecordChannelCmd: partHandle=" << mPartHandle <<
", invalid channelNum=" << mChannelNum <<
", expecting either 1 or 2.");
562 unsigned int mChannelNum;
592 if(remoteParticipant)
600 WarningLog(<<
"AlertParticipantCmd: remote participants must be added to a conversation before alert with early flag can be used when in sipXConversationMediaInterfaceMode.");
604 remoteParticipant->
alert(mEarlyFlag);
608 WarningLog(<<
"AlertParticipantCmd: invalid remote participant handle: " << mPartHandle);
629 if(remoteParticipant)
636 WarningLog(<<
"AnswerParticipantCmd: remote participant must be added to a conversation before calling answer in sipXConversationMediaInterfaceMode.");
640 remoteParticipant->
accept();
651 WarningLog(<<
"AnswerParticipantCmd: invalid remote participant handle: " << mPartHandle);
672 if(remoteParticipant)
674 remoteParticipant->
reject(mRejectCode);
685 WarningLog(<<
"RejectParticipantCmd: invalid remote participant handle: " << mPartHandle);
691 unsigned int mRejectCode;
704 mDestination(destination),
710 if(remoteParticipant)
712 remoteParticipant->
redirect(mDestination, mRedirectCode, mSuccessCondition);
716 WarningLog(<<
"RedirectParticipantCmd: invalid remote participant handle: " << mPartHandle);
724 unsigned int mRedirectCode;
749 if(!remoteParticipant)
751 WarningLog(<<
"RedirectToParticipantCmd: invalid remote participant handle: " << mPartHandle);
755 WarningLog(<<
"RedirectToParticipantCmd: invalid destination remote participant handle: " << mDestPartHandle);
779 if(remoteParticipant)
787 WarningLog(<<
"HoldParticipantCmd: remote participants must be added to a conversation before hold can be used when in sipXConversationMediaInterfaceMode.");
795 WarningLog(<<
"HoldParticipantCmd: invalid remote participant handle: " << mPartHandle);
810 std::unique_ptr<resip::Contents> contents)
813 mContents(std::
move(contents)) {}
824 WarningLog(<<
"SendIMToParticipantCmd: invalid remote participant handle: " << mPartHandle);
830 std::unique_ptr<resip::Contents> mContents;
844 if(remoteParticipant)
850 WarningLog(<<
"RequestKeyframeCmd: invalid remote participant handle: " << mPartHandle);
870 if(remoteParticipant)
876 WarningLog(<<
"RequestKeyframeFromPeerCmd: invalid remote participant handle: " << mPartHandle);
890 std::chrono::duration<double>
interval)
898 if(remoteParticipant)
905 WarningLog(<<
"RequestKeyframeFromPeerRecurringCmd: invalid remote participant handle.");
912 std::chrono::duration<double> mInterval;
933 unsigned int mTimerId;
934 unsigned int mTimerData1;
935 unsigned int mTimerData2;
940#undef RESIPROCATE_SUBSYSTEM
#define WarningLog(args_)
#define resip_assert(x)
This file needs to work for both C and C++ code.
AddParticipantCmd(ConversationManager *conversationManager, ConversationHandle convHandle, ParticipantHandle partHandle)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
AlertParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, bool earlyFlag)
virtual void executeCommand()
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
AnswerParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle)
ApplicationTimerCmd(ConversationManager *conversationManager, unsigned int timerId, unsigned int timerData1, unsigned int timerData2)
EncodeStream & encode(EncodeStream &strm) const
output the entire message to stream
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual void executeCommand()
resip::Message * clone() const
This class is one of two main classes of concern to an application using the UserAgent library.
virtual void onApplicationTimer(unsigned int timerId, unsigned int timerData1, unsigned int timerData2)
MediaStackAdapter & getMediaStackAdapter()
Conversation * getConversation(ConversationHandle convHandle)
virtual void requestKeyframeFromPeerRecurring(ParticipantHandle partHandle, std::chrono::duration< double > interval)
@ ParticipantType_MediaResource
@ ParticipantType_RemoteIMSession
ParticipantForkSelectMode
virtual void onParticipantDestroyed(ParticipantHandle partHandle)=0
Notifies an application when a Participant has been destroyed.
virtual RemoteParticipantDialogSet * createRemoteIMSessionParticipantDialogSetInstance(ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr)
This class is used to manage membership of participants.
void modifyParticipantContribution(Participant *participant, unsigned int inputGain, unsigned int outputGain)
The classes defined here are used to pass commands from the application thread to the UserAgent threa...
CreateConversationCmd(ConversationManager *conversationManager, ConversationHandle convHandle, ConversationManager::AutoHoldMode autoHoldMode, ConversationHandle sharedMediaInterfaceConvHandle)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
CreateLocalParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle)
CreateRemoteIMSessionParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, const resip::NameAddr &destination, ConversationManager::ParticipantForkSelectMode forkSelectMode, std::shared_ptr< ConversationProfile > callerProfile=nullptr, const std::multimap< resip::Data, resip::Data > &extraHeaders=(std::multimap< resip::Data, resip::Data >()))
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual void executeCommand()
CreateRemoteParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, ConversationHandle convHandle, const resip::NameAddr &destination, ConversationManager::ParticipantForkSelectMode forkSelectMode, std::shared_ptr< ConversationProfile > callerProfile=nullptr, const std::multimap< resip::Data, resip::Data > &extraHeaders=(std::multimap< resip::Data, resip::Data >()))
DestroyConversationCmd(ConversationManager *conversationManager, ConversationHandle convHandle)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
DestroyParticipantCmd(const DestroyParticipantCmd &rhs)
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual resip::Message * clone() const
virtual void executeCommand()
DestroyParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle)
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
HoldParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, bool hold)
virtual void executeCommand()
This class represents base functionality for a participant that supports IMs.
virtual void sendInstantMessage(std::unique_ptr< resip::Contents > contents)=0
JoinConversationCmd(ConversationManager *conversationManager, ConversationHandle sourceConvHandle, ConversationHandle destConvHandle)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
This class represents a local participant.
ModifyParticipantContributionCmd(ConversationManager *conversationManager, ConversationHandle convHandle, ParticipantHandle partHandle, unsigned int inputGain, unsigned int outputGain)
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual void executeCommand()
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
ModifyParticipantRecordChannelCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, unsigned int channelNum)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
MoveParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, ConversationHandle sourceConvHandle, ConversationHandle destConvHandle)
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
OutputBridgeMixWeightsCmd(ConversationManager *conversationManager, ConversationHandle convHandle)
virtual void executeCommand()
This is the base class for a RemoteParticipant, LocalParticipant and a MediaResourceParticipant.
virtual void setRecordChannelNum(unsigned int channelNum)
virtual void destroyParticipant()=0
const ConversationMap & getConversations()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual void executeCommand()
RedirectParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, const resip::NameAddr &destination, unsigned int redirectCode, ConversationManager::RedirectSuccessCondition successCondition)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
RedirectToParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, ParticipantHandle destPartHandle, ConversationManager::RedirectSuccessCondition successCondition)
RejectParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, unsigned int rejectCode)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
This class is used by Invite DialogSets.
This class represent a remote participant.
virtual void requestKeyframeFromPeerTimeout(bool reset)
virtual void redirectToParticipant(resip::InviteSessionHandle &destParticipantInviteSessionHandle, ConversationManager::RedirectSuccessCondition successCondition=ConversationManager::RedirectSuccessOnConnected)
virtual void redirect(resip::NameAddr &destination, unsigned int redirectCode=302, ConversationManager::RedirectSuccessCondition successCondition=ConversationManager::RedirectSuccessOnConnected)
virtual void initiateRemoteCall(const resip::NameAddr &destination)
virtual void setLocalHold(bool hold)
virtual void reject(unsigned int rejectCode)
virtual void requestKeyframeFromPeer()
virtual void alert(bool earlyFlag)
virtual void requestKeyframe()=0
RemoveParticipantCmd(ConversationManager *conversationManager, ConversationHandle convHandle, ParticipantHandle partHandle)
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
RequestKeyframeCmd(ConversationManager *conversationManager, ParticipantHandle partHandle)
virtual Message * clone() const
virtual void executeCommand()
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual Message * clone() const
virtual void executeCommand()
RequestKeyframeFromPeerCmd(ConversationManager *conversationManager, ParticipantHandle partHandle)
virtual void executeCommand()
virtual Message * clone() const
RequestKeyframeFromPeerRecurringCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, std::chrono::duration< double > interval)
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
SendIMToParticipantCmd(ConversationManager *conversationManager, ParticipantHandle partHandle, std::unique_ptr< resip::Contents > contents)
EncodeStream & encodeBrief(EncodeStream &strm) const
output a brief description to stream
virtual void executeCommand()
The base-class used for message-passing.
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
unsigned int ConversationHandle
unsigned int ParticipantHandle