michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "CSFLog.h" michael@0: michael@0: #include "CC_Common.h" michael@0: michael@0: #include "CC_SIPCCCallInfo.h" michael@0: #include "CC_SIPCCLine.h" michael@0: michael@0: extern "C" michael@0: { michael@0: #include "ccapi_call.h" michael@0: #include "ccapi_call_info.h" michael@0: #include "fsmdef_states.h" michael@0: } michael@0: michael@0: static const char* logTag = "CC_SIPCCCallInfo"; michael@0: michael@0: using namespace std; michael@0: using namespace CSF; michael@0: michael@0: CC_SIPCCCallInfo::CC_SIPCCCallInfo (cc_callinfo_ref_t callinfo) : callinfo_ref(callinfo) michael@0: { michael@0: CCAPI_Call_retainCallInfo(callinfo); michael@0: } michael@0: michael@0: CSF_IMPLEMENT_WRAP(CC_SIPCCCallInfo, cc_callinfo_ref_t); michael@0: michael@0: CC_SIPCCCallInfo::~CC_SIPCCCallInfo() michael@0: { michael@0: CCAPI_Call_releaseCallInfo(callinfo_ref); michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::hasCapability (CC_CallCapabilityEnum::CC_CallCapability capability) michael@0: { michael@0: generateCapabilities(); michael@0: return (caps.find(capability) != caps.end()); michael@0: } michael@0: michael@0: set CC_SIPCCCallInfo::getCapabilitySet() michael@0: { michael@0: generateCapabilities(); michael@0: set callCaps(caps); michael@0: return callCaps; michael@0: } michael@0: michael@0: /* michael@0: CC_LinePtr CC_SIPCCCallInfo::getLine () michael@0: { michael@0: } michael@0: */ michael@0: michael@0: cc_call_state_t CC_SIPCCCallInfo::getCallState() michael@0: { michael@0: return CCAPI_CallInfo_getCallState(callinfo_ref); michael@0: } michael@0: michael@0: fsmdef_states_t CC_SIPCCCallInfo::getFsmState() const michael@0: { michael@0: return CCAPI_CallInfo_getFsmState(callinfo_ref); michael@0: } michael@0: michael@0: std::string CC_SIPCCCallInfo::fsmStateToString (fsmdef_states_t state) const michael@0: { michael@0: return fsmdef_state_name(state); michael@0: } michael@0: michael@0: std::string CC_SIPCCCallInfo::callStateToString (cc_call_state_t state) michael@0: { michael@0: std::string statestr = ""; michael@0: michael@0: switch(state) { michael@0: case OFFHOOK: michael@0: statestr = "OFFHOOK"; michael@0: break; michael@0: case ONHOOK: michael@0: statestr = "ONHOOK"; michael@0: break; michael@0: case RINGOUT: michael@0: statestr = "RINGOUT"; michael@0: break; michael@0: case RINGIN: michael@0: statestr = "RINGIN"; michael@0: break; michael@0: case PROCEED: michael@0: statestr = "PROCEED"; michael@0: break; michael@0: case CONNECTED: michael@0: statestr = "CONNECTED"; michael@0: break; michael@0: case HOLD: michael@0: statestr = "ONHOOK"; michael@0: break; michael@0: case REMHOLD: michael@0: statestr = "REMHOLD"; michael@0: break; michael@0: case RESUME: michael@0: statestr = "RESUME"; michael@0: break; michael@0: case BUSY: michael@0: statestr = "BUSY"; michael@0: break; michael@0: case REORDER: michael@0: statestr = "REORDER"; michael@0: break; michael@0: case CONFERENCE: michael@0: statestr = "CONFERENCE"; michael@0: break; michael@0: case DIALING: michael@0: statestr = "DIALING"; michael@0: break; michael@0: case REMINUSE: michael@0: statestr = "REMINUSE"; michael@0: break; michael@0: case HOLDREVERT: michael@0: statestr = "HOLDREVERT"; michael@0: break; michael@0: case WHISPER: michael@0: statestr = "WHISPER"; michael@0: break; michael@0: case PRESERVATION: michael@0: statestr = "PRESERVATION"; michael@0: break; michael@0: case WAITINGFORDIGITS: michael@0: statestr = "WAITINGFORDIGITS"; michael@0: break; michael@0: case CREATEOFFERSUCCESS: michael@0: statestr = "CREATEOFFERSUCCESS"; michael@0: break; michael@0: case CREATEANSWERSUCCESS: michael@0: statestr = "CREATEANSWERSUCCESS"; michael@0: break; michael@0: case CREATEOFFERERROR: michael@0: statestr = "CREATEOFFERERROR"; michael@0: break; michael@0: case CREATEANSWERERROR: michael@0: statestr = "CREATEANSWERERROR"; michael@0: break; michael@0: case SETLOCALDESCSUCCESS: michael@0: statestr = "SETLOCALDESCSUCCESS"; michael@0: break; michael@0: case SETREMOTEDESCSUCCESS: michael@0: statestr = "SETREMOTEDESCSUCCESS"; michael@0: break; michael@0: case UPDATELOCALDESC: michael@0: statestr = "UPDATELOCALDESC"; michael@0: break; michael@0: case SETLOCALDESCERROR: michael@0: statestr = "SETLOCALDESCERROR"; michael@0: break; michael@0: case SETREMOTEDESCERROR: michael@0: statestr = "SETREMOTEDESCERROR"; michael@0: break; michael@0: case REMOTESTREAMADD: michael@0: statestr = "REMOTESTREAMADD"; michael@0: break; michael@0: case ADDICECANDIDATE: michael@0: statestr = "ADDICECANDIDATE"; michael@0: break; michael@0: case ADDICECANDIDATEERROR: michael@0: statestr = "ADDICECANDIDATEERROR"; michael@0: break; michael@0: default: michael@0: break; michael@0: } michael@0: michael@0: return statestr; michael@0: } michael@0: michael@0: std::string CC_SIPCCCallInfo::callEventToString (ccapi_call_event_e callEvent) michael@0: { michael@0: std::string statestr = ""; michael@0: michael@0: switch(callEvent) { michael@0: case CCAPI_CALL_EV_CREATED: michael@0: statestr = "CCAPI_CALL_EV_CREATED"; michael@0: break; michael@0: case CCAPI_CALL_EV_STATE: michael@0: statestr = "CCAPI_CALL_EV_STATE"; michael@0: break; michael@0: case CCAPI_CALL_EV_CALLINFO: michael@0: statestr = "CCAPI_CALL_EV_CALLINFO"; michael@0: break; michael@0: case CCAPI_CALL_EV_ATTR: michael@0: statestr = "CCAPI_CALL_EV_ATTR"; michael@0: break; michael@0: case CCAPI_CALL_EV_SECURITY: michael@0: statestr = "CCAPI_CALL_EV_SECURITY"; michael@0: break; michael@0: case CCAPI_CALL_EV_LOG_DISP: michael@0: statestr = "CCAPI_CALL_EV_LOG_DISP"; michael@0: break; michael@0: case CCAPI_CALL_EV_PLACED_CALLINFO: michael@0: statestr = "CCAPI_CALL_EV_PLACED_CALLINFO"; michael@0: break; michael@0: case CCAPI_CALL_EV_STATUS: michael@0: statestr = "CCAPI_CALL_EV_STATUS"; michael@0: break; michael@0: case CCAPI_CALL_EV_SELECT: michael@0: statestr = "CCAPI_CALL_EV_SELECT"; michael@0: break; michael@0: case CCAPI_CALL_EV_LAST_DIGIT_DELETED: michael@0: statestr = "CCAPI_CALL_EV_LAST_DIGIT_DELETED"; michael@0: break; michael@0: case CCAPI_CALL_EV_GCID: michael@0: statestr = "CCAPI_CALL_EV_GCID"; michael@0: break; michael@0: case CCAPI_CALL_EV_XFR_OR_CNF_CANCELLED: michael@0: statestr = "CCAPI_CALL_EV_XFR_OR_CNF_CANCELLED"; michael@0: break; michael@0: case CCAPI_CALL_EV_PRESERVATION: michael@0: statestr = "CCAPI_CALL_EV_PRESERVATION"; michael@0: break; michael@0: case CCAPI_CALL_EV_CAPABILITY: michael@0: statestr = "CCAPI_CALL_EV_CAPABILITY"; michael@0: break; michael@0: case CCAPI_CALL_EV_VIDEO_AVAIL: michael@0: statestr = "CCAPI_CALL_EV_VIDEO_AVAIL"; michael@0: break; michael@0: case CCAPI_CALL_EV_VIDEO_OFFERED: michael@0: statestr = "CCAPI_CALL_EV_VIDEO_OFFERED"; michael@0: break; michael@0: case CCAPI_CALL_EV_RECEIVED_INFO: michael@0: statestr = "CCAPI_CALL_EV_RECEIVED_INFO"; michael@0: break; michael@0: case CCAPI_CALL_EV_RINGER_STATE: michael@0: statestr = "CCAPI_CALL_EV_RINGER_STATE"; michael@0: break; michael@0: case CCAPI_CALL_EV_CONF_PARTICIPANT_INFO: michael@0: statestr = "CCAPI_CALL_EV_CONF_PARTICIPANT_INFO"; michael@0: break; michael@0: case CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_BEGIN: michael@0: statestr = "CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_BEGIN"; michael@0: break; michael@0: case CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_SUCCESSFUL: michael@0: statestr = "CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_SUCCESSFUL"; michael@0: break; michael@0: case CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_FAIL: michael@0: statestr = "CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_FAIL"; michael@0: break; michael@0: default: michael@0: break; michael@0: } michael@0: michael@0: return statestr; michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::getRingerState() michael@0: { michael@0: if (CCAPI_CallInfo_getRingerState(callinfo_ref)) michael@0: { michael@0: return true; michael@0: } michael@0: else michael@0: { michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: cc_call_attr_t CC_SIPCCCallInfo::getCallAttr() michael@0: { michael@0: return CCAPI_CallInfo_getCallAttr(callinfo_ref); michael@0: } michael@0: michael@0: cc_call_type_t CC_SIPCCCallInfo::getCallType() michael@0: { michael@0: return CCAPI_CallInfo_getCallType(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getCalledPartyName() michael@0: { michael@0: return CCAPI_CallInfo_getCalledPartyName(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getCalledPartyNumber() michael@0: { michael@0: return CCAPI_CallInfo_getCalledPartyNumber(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getCallingPartyName() michael@0: { michael@0: return CCAPI_CallInfo_getCallingPartyName(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getCallingPartyNumber() michael@0: { michael@0: return CCAPI_CallInfo_getCallingPartyNumber(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getAlternateNumber() michael@0: { michael@0: return CCAPI_CallInfo_getAlternateNumber(callinfo_ref); michael@0: } michael@0: michael@0: CC_LinePtr CC_SIPCCCallInfo::getline () michael@0: { michael@0: cc_lineid_t lineId = CCAPI_CallInfo_getLine(callinfo_ref); michael@0: return CC_SIPCCLine::wrap(lineId).get(); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getOriginalCalledPartyName() michael@0: { michael@0: return CCAPI_CallInfo_getOriginalCalledPartyName(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getOriginalCalledPartyNumber() michael@0: { michael@0: return CCAPI_CallInfo_getOriginalCalledPartyNumber(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getLastRedirectingPartyName() michael@0: { michael@0: return CCAPI_CallInfo_getLastRedirectingPartyName(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getLastRedirectingPartyNumber() michael@0: { michael@0: return CCAPI_CallInfo_getLastRedirectingPartyNumber(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getPlacedCallPartyName() michael@0: { michael@0: return CCAPI_CallInfo_getPlacedCallPartyName(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getPlacedCallPartyNumber() michael@0: { michael@0: return CCAPI_CallInfo_getPlacedCallPartyNumber(callinfo_ref); michael@0: } michael@0: michael@0: cc_int32_t CC_SIPCCCallInfo::getCallInstance() michael@0: { michael@0: return CCAPI_CallInfo_getCallInstance(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getStatus() michael@0: { michael@0: return CCAPI_CallInfo_getStatus(callinfo_ref); michael@0: } michael@0: michael@0: cc_call_security_t CC_SIPCCCallInfo::getSecurity() michael@0: { michael@0: return CCAPI_CallInfo_getSecurity(callinfo_ref); michael@0: } michael@0: michael@0: cc_int32_t CC_SIPCCCallInfo::getSelectionStatus() michael@0: { michael@0: return CCAPI_CallInfo_getSelectionStatus(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getGCID() michael@0: { michael@0: return CCAPI_CallInfo_getGCID(callinfo_ref); michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::getIsRingOnce() michael@0: { michael@0: return (CCAPI_CallInfo_getIsRingOnce(callinfo_ref) != 0); michael@0: } michael@0: michael@0: int CC_SIPCCCallInfo::getRingerMode() michael@0: { michael@0: return CCAPI_CallInfo_getRingerMode(callinfo_ref); michael@0: } michael@0: michael@0: cc_int32_t CC_SIPCCCallInfo::getOnhookReason() michael@0: { michael@0: return CCAPI_CallInfo_getOnhookReason(callinfo_ref); michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::getIsConference() michael@0: { michael@0: return (CCAPI_CallInfo_getIsConference(callinfo_ref) != 0); michael@0: } michael@0: michael@0: set CC_SIPCCCallInfo::getStreamStatistics() michael@0: { michael@0: CSFLogError(logTag, "CCAPI_CallInfo_getCapabilitySet() NOT IMPLEMENTED IN PSIPCC."); michael@0: set stats; michael@0: return stats; michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::isCallSelected() michael@0: { michael@0: return (CCAPI_CallInfo_isCallSelected(callinfo_ref) != 0); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getINFOPack() michael@0: { michael@0: return CCAPI_CallInfo_getINFOPack(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getINFOType() michael@0: { michael@0: return CCAPI_CallInfo_getINFOType(callinfo_ref); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getINFOBody() michael@0: { michael@0: return CCAPI_CallInfo_getINFOBody(callinfo_ref); michael@0: } michael@0: michael@0: cc_calllog_ref_t CC_SIPCCCallInfo::getCallLogRef() michael@0: { michael@0: return CCAPI_CallInfo_getCallLogRef(callinfo_ref); michael@0: } michael@0: michael@0: cc_sdp_direction_t CC_SIPCCCallInfo::getVideoDirection() michael@0: { michael@0: return CCAPI_CallInfo_getVideoDirection(callinfo_ref); michael@0: } michael@0: michael@0: int CC_SIPCCCallInfo::getVolume() michael@0: { michael@0: if( pMediaData != nullptr) michael@0: { michael@0: return pMediaData->volume; michael@0: } michael@0: else michael@0: { michael@0: return -1; michael@0: } michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::isAudioMuted() michael@0: { michael@0: return (CCAPI_CallInfo_isAudioMuted(callinfo_ref) != 0); michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::isVideoMuted() michael@0: { michael@0: return (CCAPI_CallInfo_isVideoMuted(callinfo_ref) != 0); michael@0: } michael@0: michael@0: string CC_SIPCCCallInfo::getSDP() michael@0: { michael@0: return CCAPI_CallInfo_getSDP(callinfo_ref); michael@0: } michael@0: michael@0: cc_int32_t CC_SIPCCCallInfo::getStatusCode() michael@0: { michael@0: return CCAPI_CallInfo_getStatusCode(callinfo_ref); michael@0: } michael@0: michael@0: MediaStreamTable* CC_SIPCCCallInfo::getMediaStreams() const michael@0: { michael@0: return CCAPI_CallInfo_getMediaStreams(callinfo_ref); michael@0: } michael@0: michael@0: Timecard *CC_SIPCCCallInfo::takeTimecard() michael@0: { michael@0: return CCAPI_CallInfo_takeTimecard(callinfo_ref); michael@0: } michael@0: michael@0: std::string CC_SIPCCCallInfo::getCandidate() michael@0: { michael@0: return CCAPI_CallInfo_getCandidate(callinfo_ref); michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::isMediaStateAvailable() michael@0: { michael@0: // for softphone it will always be possible to query the mute state and video direction michael@0: return true; michael@0: } michael@0: michael@0: michael@0: #define PRINT_IF_CC_CAP_TRUE(cap) ((hasFeature(cap)) ? string(#cap) + ",": "") michael@0: void CC_SIPCCCallInfo::generateCapabilities() michael@0: { michael@0: // If caps are already generated, no need to repeat the exercise. michael@0: if(!caps.empty()) michael@0: return; michael@0: /* michael@0: CSFLogDebugS( logTag, "generateCapabilities() state=" << getCallState() << michael@0: " underlyingCaps=" << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_NEWCALL) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_ANSWER) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_ENDCALL) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_HOLD) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_RESUME) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_CALLFWD) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_DIAL) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_BACKSPACE) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_SENDDIGIT) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_TRANSFER) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_CONFERENCE) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_SWAP) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_REDIAL) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_JOIN) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_SELECT) << michael@0: PRINT_IF_CC_CAP_TRUE(CCAPI_CALL_CAP_RMVLASTPARTICIPANT) ); michael@0: */ michael@0: switch(getCallState()) michael@0: { michael@0: case OFFHOOK: michael@0: if(hasFeature(CCAPI_CALL_CAP_NEWCALL)) { michael@0: caps.insert(CC_CallCapabilityEnum::canOriginateCall); michael@0: } michael@0: if(hasFeature(CCAPI_CALL_CAP_ENDCALL)) { michael@0: caps.insert(CC_CallCapabilityEnum::canEndCall); michael@0: } michael@0: break; michael@0: case ONHOOK: michael@0: break; michael@0: case DIALING: michael@0: case PROCEED: michael@0: case RINGOUT: michael@0: if(hasFeature(CCAPI_CALL_CAP_ENDCALL)) { michael@0: caps.insert(CC_CallCapabilityEnum::canEndCall); michael@0: } michael@0: if(hasFeature(CCAPI_CALL_CAP_SENDDIGIT)) caps.insert(CC_CallCapabilityEnum::canSendDigit); michael@0: break; michael@0: case RINGIN: michael@0: if(hasFeature(CCAPI_CALL_CAP_ANSWER)) caps.insert(CC_CallCapabilityEnum::canAnswerCall); michael@0: break; michael@0: case CONNECTED: michael@0: if(hasFeature(CCAPI_CALL_CAP_ENDCALL)) { michael@0: caps.insert(CC_CallCapabilityEnum::canEndCall); michael@0: } michael@0: caps.insert(CC_CallCapabilityEnum::canSendDigit); michael@0: if(hasFeature(CCAPI_CALL_CAP_HOLD)) caps.insert(CC_CallCapabilityEnum::canHold); michael@0: michael@0: caps.insert(CC_CallCapabilityEnum::canSetVolume); michael@0: if(isAudioMuted()) michael@0: { michael@0: caps.insert(CC_CallCapabilityEnum::canUnmuteAudio); michael@0: } michael@0: else michael@0: { michael@0: caps.insert(CC_CallCapabilityEnum::canMuteAudio); michael@0: } michael@0: michael@0: if ((CCAPI_CallInfo_getVideoDirection(callinfo_ref) == CC_SDP_DIRECTION_SENDRECV) || michael@0: (CCAPI_CallInfo_getVideoDirection(callinfo_ref) == CC_SDP_DIRECTION_SENDONLY)) michael@0: { michael@0: // sending video so video mute is possible michael@0: if (isVideoMuted()) michael@0: { michael@0: caps.insert(CC_CallCapabilityEnum::canUnmuteVideo); michael@0: } michael@0: else michael@0: { michael@0: caps.insert(CC_CallCapabilityEnum::canMuteVideo); michael@0: } michael@0: } michael@0: caps.insert(CC_CallCapabilityEnum::canUpdateVideoMediaCap); michael@0: break; michael@0: case HOLD: michael@0: case REMHOLD: michael@0: caps.insert(CC_CallCapabilityEnum::canResume); michael@0: break; michael@0: michael@0: case BUSY: michael@0: case REORDER: michael@0: if(hasFeature(CCAPI_CALL_CAP_ENDCALL)) { michael@0: caps.insert(CC_CallCapabilityEnum::canEndCall); michael@0: } michael@0: break; michael@0: case PRESERVATION: michael@0: if(hasFeature(CCAPI_CALL_CAP_ENDCALL)) { michael@0: caps.insert(CC_CallCapabilityEnum::canEndCall); michael@0: } michael@0: break; michael@0: michael@0: // Not worrying about these states yet. michael@0: case RESUME: michael@0: case CONFERENCE: michael@0: case REMINUSE: michael@0: case HOLDREVERT: michael@0: case WHISPER: michael@0: case WAITINGFORDIGITS: michael@0: default: michael@0: CSFLogError( logTag, "State %d not handled in generateCapabilities()", michael@0: getCallState()); michael@0: break; michael@0: } michael@0: } michael@0: michael@0: bool CC_SIPCCCallInfo::hasFeature(ccapi_call_capability_e cap) michael@0: { michael@0: return (CCAPI_CallInfo_hasCapability(callinfo_ref, (cc_int32_t) cap) != 0); michael@0: } michael@0: michael@0: void CC_SIPCCCallInfo::setMediaData(CC_SIPCCCallMediaDataPtr pMediaData) michael@0: { michael@0: this-> pMediaData = pMediaData; michael@0: } michael@0: