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: #ifndef _CCAPI_CALL_INFO_H_ michael@0: #define _CCAPI_CALL_INFO_H_ michael@0: michael@0: #if defined(__cplusplus) && __cplusplus >= 201103L michael@0: typedef struct Timecard Timecard; michael@0: #else michael@0: #include "timecard.h" michael@0: #endif michael@0: michael@0: #include "ccapi_types.h" michael@0: #include "peer_connection_types.h" michael@0: #include "fsmdef_states.h" michael@0: michael@0: /** michael@0: * get Line on which this call is michael@0: * @param [in] handle - call info handle michael@0: * @return cc_line_id_t - line ID michael@0: */ michael@0: cc_lineid_t CCAPI_CallInfo_getLine(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Call state michael@0: * @param [in] handle - call info handle michael@0: * @return call state michael@0: */ michael@0: cc_call_state_t CCAPI_CallInfo_getCallState(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get FSM state michael@0: * @param [in] handle - call info handle michael@0: * @return fsm state michael@0: */ michael@0: fsmdef_states_t CCAPI_CallInfo_getFsmState(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get call attributes michael@0: * @param [in] handle - call info handle michael@0: * @return call attributes michael@0: */ michael@0: cc_call_attr_t CCAPI_CallInfo_getCallAttr(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Call Type michael@0: * @param [in] handle - call info handle michael@0: * @return call type michael@0: */ michael@0: cc_call_type_t CCAPI_CallInfo_getCallType(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Called party name michael@0: * @param [in] handle - call info handle michael@0: * @return called party name michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getCalledPartyName(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Called party number michael@0: * @param [in] handle - call info handle michael@0: * @return called party number michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getCalledPartyNumber(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Calling party name michael@0: * @param [in] handle - call info handle michael@0: * @return calling party name michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getCallingPartyName(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Calling party number michael@0: * @param [in] handle - call info handle michael@0: * @return calling party number michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getCallingPartyNumber(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Calling party number michael@0: * @param [in] handle - call info handle michael@0: * @return calling party number michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getAlternateNumber(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Original Called party name michael@0: * @param [in] handle - call info handle michael@0: * @return original called party name michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getOriginalCalledPartyName(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Original Called party number michael@0: * @param [in] handle - call info handle michael@0: * @return original called party number michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getOriginalCalledPartyNumber(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get last redirecting party name michael@0: * @param [in] handle - call info handle michael@0: * @return last redirecting party name michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getLastRedirectingPartyName(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get past redirecting party number michael@0: * @param [in] handle - call info handle michael@0: * @return last redirecting party number michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getLastRedirectingPartyNumber(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get placed call party name michael@0: * @param [in] handle - call info handle michael@0: * @return placed party name michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getPlacedCallPartyName(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get placed call party number michael@0: * @param [in] handle - call info handle michael@0: * @return placed party number michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getPlacedCallPartyNumber(cc_callinfo_ref_t handle); michael@0: michael@0: michael@0: /** michael@0: * get call instance number michael@0: * @param [in] handle - call info handle michael@0: * @return michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_int32_t CCAPI_CallInfo_getCallInstance(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get call status prompt michael@0: * @param [in] handle - call info handle michael@0: * @return call status michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getStatus(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get call security // TODO XLS has callagent security and endtoend security on call? michael@0: * @param [in] handle - call info handle michael@0: * @return call security status michael@0: */ michael@0: cc_call_security_t CCAPI_CallInfo_getSecurity(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get Call Selection Status michael@0: * @param [in] handle - call info handle michael@0: * @return cc_boolean - TRUE => selected michael@0: */ michael@0: cc_int32_t CCAPI_CallInfo_getSelectionStatus(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get GCID michael@0: * @param [in] handle - call info handle michael@0: * @return GCID michael@0: * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getGCID(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get ringer loop count michael@0: * @param handle - call handle michael@0: * @return once Vs continuous michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_getIsRingOnce(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get ringer state. michael@0: * @param handle - call handle michael@0: * @return ringer state. michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_getRingerState(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get ringer mode michael@0: * @param handle - call handle michael@0: * @return ringer mode michael@0: */ michael@0: int CCAPI_CallInfo_getRingerMode(cc_callinfo_ref_t handle); michael@0: michael@0: michael@0: /** michael@0: * get onhook reason michael@0: * @param [in] handle - call info handle michael@0: * @return onhook reason michael@0: */ michael@0: cc_int32_t CCAPI_CallInfo_getOnhookReason(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * is Conference Call? michael@0: * @param [in] handle - call info handle michael@0: * @return boolean - is Conference michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_getIsConference(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * getStream Statistics michael@0: * @param [in] handle - call info handle michael@0: * @param [in,out] stats - Array to get the stats michael@0: * @param [in,out] count - in len of stats arraysize of stats / out stats copied michael@0: * @return cc_return_t - CC_SUCCESS or CC_FAILURE michael@0: */ michael@0: cc_return_t CCAPI_CallInfo_getStreamStatistics(cc_callinfo_ref_t handle, cc_int32_t stats[], cc_int32_t *count); michael@0: michael@0: michael@0: /** michael@0: * has capability - is the feature allowed michael@0: * @param [in] handle - call info handle michael@0: * @param [in] feat_id - feature id michael@0: * @return boolean - is Allowed michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_hasCapability(cc_callinfo_ref_t handle, cc_int32_t feat_id); michael@0: michael@0: /** michael@0: * get Allowed Feature set michael@0: * @param [in] handle - call info handle michael@0: * @param [in,out] feat_set - array of len CC_CALL_CAP_MAX michael@0: * @return cc_return_t - CC_SUCCESS or CC_FAILURE michael@0: */ michael@0: cc_return_t CCAPI_CallInfo_getCapabilitySet(cc_callinfo_ref_t handle, cc_int32_t feat_set[]); michael@0: michael@0: /** michael@0: * Call selection status michael@0: * @param [in] handle - call info handle michael@0: * @return cc_boolean - selection status michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_isCallSelected(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * INFO Package for RECEIVED_INFO event michael@0: * @param [in] handle - call info handle michael@0: * @return cc_string_t - Info package header michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getINFOPack(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * INFO type for RECEIVED_INFO event michael@0: * @param [in] handle - call info handle michael@0: * @return cc_string_t - content-type header michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getINFOType(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * INFO body for RECEIVED_INFO event michael@0: * @param [in] handle - call info handle michael@0: * @return cc_string_t - INFO body michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getINFOBody(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * Get the call log reference michael@0: * @param [in] handle - call info handle michael@0: * @return cc_string_t - INFO body michael@0: * NOTE: Memory associated with the call log is tied to the cc_callinfo_ref_t handle michael@0: * this would be freed when the callinfo ref is freed. michael@0: */ michael@0: cc_calllog_ref_t CCAPI_CallInfo_getCallLogRef(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * returns the negotiated video direction for this call michael@0: * @param [in] handle - call handle michael@0: * @return cc_sdp_direction_t - video direction michael@0: */ michael@0: cc_sdp_direction_t CCAPI_CallInfo_getVideoDirection(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * Returns the Audio mute state for this call michael@0: * @return boolean true=muted false=not muted michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_isAudioMuted(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * Returns the Video mute state for this call michael@0: * @return boolean true=muted false=not muted michael@0: */ michael@0: cc_boolean CCAPI_CallInfo_isVideoMuted(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get SDP string CreateOffer and CreateAnswer callback michael@0: * @param [in] handle - call info handle michael@0: * @return sdp michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getSDP(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get trickle candidate michael@0: * @param [in] handle - call info handle michael@0: * @return sdp michael@0: */ michael@0: cc_string_t CCAPI_CallInfo_getCandidate(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get status code from internal JSEP functions michael@0: * @param [in] handle - call info handle michael@0: * @return status code michael@0: */ michael@0: cc_int32_t CCAPI_CallInfo_getStatusCode(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * get media stream table michael@0: * @param [in] handle - call info handle michael@0: * @return media track table michael@0: */ michael@0: MediaStreamTable* CCAPI_CallInfo_getMediaStreams(cc_callinfo_ref_t handle); michael@0: michael@0: /** michael@0: * Take posession of timecard michael@0: * @param [in] handle - call info handle michael@0: * @return timecard pointer michael@0: */ michael@0: Timecard* CCAPI_CallInfo_takeTimecard(cc_callinfo_ref_t handle); michael@0: michael@0: #endif /* _CCAPIAPI_CALL_INFO_H_ */