本文整理汇总了C++中CC_CallPtr::answerCall方法的典型用法代码示例。如果您正苦于以下问题:C++ CC_CallPtr::answerCall方法的具体用法?C++ CC_CallPtr::answerCall怎么用?C++ CC_CallPtr::answerCall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CC_CallPtr
的用法示例。
在下文中一共展示了CC_CallPtr::answerCall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handlePickUpFirstCallWithAnswerCaps
static void handlePickUpFirstCallWithAnswerCaps (CallControlManagerPtr ccmPtr)
{
CC_CallPtr answerableCall = getFirstCallWithCapability(ccmPtr, CC_CallCapabilityEnum::canAnswerCall);
if (answerableCall != NULL)
{
CSFLogDebugS(logTag, "Answering incoming call...");
// CC_SDP_DIRECTION_SENDRECV means 2 way video. We could use CC_SDP_DIRECTION_INACTIVE to answer with no video
// Note that we are attempting to negotiate video on every call, even tough
// some calls might not have video capability - so maybe we need to check the call first.
cc_sdp_direction_t videoPref = getActiveVideoPref();
#ifndef NOVIDEO
videoPref = (showVideoAutomatically) ? videoPref : CC_SDP_DIRECTION_INACTIVE;
#endif
if (!answerableCall->answerCall(videoPref))
{
CSFLogDebugS(logTag, "Attempt to answer incoming call failed.");
}
#ifndef NOVIDEO
if(videoPref != CC_SDP_DIRECTION_INACTIVE)
{
answerableCall->setRemoteWindow((VideoWindowHandle)hVideoWindow);
}
#endif
}
else
{
CSFLogDebugS(logTag, "No calls exist that can be answered.");
}
}