1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/signaling/src/sipcc/include/ccapi_call_info.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,333 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef _CCAPI_CALL_INFO_H_ 1.9 +#define _CCAPI_CALL_INFO_H_ 1.10 + 1.11 +#if defined(__cplusplus) && __cplusplus >= 201103L 1.12 +typedef struct Timecard Timecard; 1.13 +#else 1.14 +#include "timecard.h" 1.15 +#endif 1.16 + 1.17 +#include "ccapi_types.h" 1.18 +#include "peer_connection_types.h" 1.19 +#include "fsmdef_states.h" 1.20 + 1.21 +/** 1.22 + * get Line on which this call is 1.23 + * @param [in] handle - call info handle 1.24 + * @return cc_line_id_t - line ID 1.25 + */ 1.26 +cc_lineid_t CCAPI_CallInfo_getLine(cc_callinfo_ref_t handle); 1.27 + 1.28 +/** 1.29 + * get Call state 1.30 + * @param [in] handle - call info handle 1.31 + * @return call state 1.32 + */ 1.33 +cc_call_state_t CCAPI_CallInfo_getCallState(cc_callinfo_ref_t handle); 1.34 + 1.35 +/** 1.36 + * get FSM state 1.37 + * @param [in] handle - call info handle 1.38 + * @return fsm state 1.39 + */ 1.40 +fsmdef_states_t CCAPI_CallInfo_getFsmState(cc_callinfo_ref_t handle); 1.41 + 1.42 +/** 1.43 + * get call attributes 1.44 + * @param [in] handle - call info handle 1.45 + * @return call attributes 1.46 + */ 1.47 +cc_call_attr_t CCAPI_CallInfo_getCallAttr(cc_callinfo_ref_t handle); 1.48 + 1.49 +/** 1.50 + * get Call Type 1.51 + * @param [in] handle - call info handle 1.52 + * @return call type 1.53 + */ 1.54 +cc_call_type_t CCAPI_CallInfo_getCallType(cc_callinfo_ref_t handle); 1.55 + 1.56 +/** 1.57 + * get Called party name 1.58 + * @param [in] handle - call info handle 1.59 + * @return called party name 1.60 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.61 + */ 1.62 +cc_string_t CCAPI_CallInfo_getCalledPartyName(cc_callinfo_ref_t handle); 1.63 + 1.64 +/** 1.65 + * get Called party number 1.66 + * @param [in] handle - call info handle 1.67 + * @return called party number 1.68 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.69 + */ 1.70 +cc_string_t CCAPI_CallInfo_getCalledPartyNumber(cc_callinfo_ref_t handle); 1.71 + 1.72 +/** 1.73 + * get Calling party name 1.74 + * @param [in] handle - call info handle 1.75 + * @return calling party name 1.76 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.77 + */ 1.78 +cc_string_t CCAPI_CallInfo_getCallingPartyName(cc_callinfo_ref_t handle); 1.79 + 1.80 +/** 1.81 + * get Calling party number 1.82 + * @param [in] handle - call info handle 1.83 + * @return calling party number 1.84 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.85 + */ 1.86 +cc_string_t CCAPI_CallInfo_getCallingPartyNumber(cc_callinfo_ref_t handle); 1.87 + 1.88 +/** 1.89 + * get Calling party number 1.90 + * @param [in] handle - call info handle 1.91 + * @return calling party number 1.92 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.93 + */ 1.94 +cc_string_t CCAPI_CallInfo_getAlternateNumber(cc_callinfo_ref_t handle); 1.95 + 1.96 +/** 1.97 + * get Original Called party name 1.98 + * @param [in] handle - call info handle 1.99 + * @return original called party name 1.100 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.101 + */ 1.102 +cc_string_t CCAPI_CallInfo_getOriginalCalledPartyName(cc_callinfo_ref_t handle); 1.103 + 1.104 +/** 1.105 + * get Original Called party number 1.106 + * @param [in] handle - call info handle 1.107 + * @return original called party number 1.108 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.109 + */ 1.110 +cc_string_t CCAPI_CallInfo_getOriginalCalledPartyNumber(cc_callinfo_ref_t handle); 1.111 + 1.112 +/** 1.113 + * get last redirecting party name 1.114 + * @param [in] handle - call info handle 1.115 + * @return last redirecting party name 1.116 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.117 + */ 1.118 +cc_string_t CCAPI_CallInfo_getLastRedirectingPartyName(cc_callinfo_ref_t handle); 1.119 + 1.120 +/** 1.121 + * get past redirecting party number 1.122 + * @param [in] handle - call info handle 1.123 + * @return last redirecting party number 1.124 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.125 + */ 1.126 +cc_string_t CCAPI_CallInfo_getLastRedirectingPartyNumber(cc_callinfo_ref_t handle); 1.127 + 1.128 +/** 1.129 + * get placed call party name 1.130 + * @param [in] handle - call info handle 1.131 + * @return placed party name 1.132 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.133 + */ 1.134 +cc_string_t CCAPI_CallInfo_getPlacedCallPartyName(cc_callinfo_ref_t handle); 1.135 + 1.136 +/** 1.137 + * get placed call party number 1.138 + * @param [in] handle - call info handle 1.139 + * @return placed party number 1.140 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.141 + */ 1.142 +cc_string_t CCAPI_CallInfo_getPlacedCallPartyNumber(cc_callinfo_ref_t handle); 1.143 + 1.144 + 1.145 +/** 1.146 + * get call instance number 1.147 + * @param [in] handle - call info handle 1.148 + * @return 1.149 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.150 + */ 1.151 +cc_int32_t CCAPI_CallInfo_getCallInstance(cc_callinfo_ref_t handle); 1.152 + 1.153 +/** 1.154 + * get call status prompt 1.155 + * @param [in] handle - call info handle 1.156 + * @return call status 1.157 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.158 + */ 1.159 +cc_string_t CCAPI_CallInfo_getStatus(cc_callinfo_ref_t handle); 1.160 + 1.161 +/** 1.162 + * get call security // TODO XLS has callagent security and endtoend security on call? 1.163 + * @param [in] handle - call info handle 1.164 + * @return call security status 1.165 + */ 1.166 +cc_call_security_t CCAPI_CallInfo_getSecurity(cc_callinfo_ref_t handle); 1.167 + 1.168 +/** 1.169 + * get Call Selection Status 1.170 + * @param [in] handle - call info handle 1.171 + * @return cc_boolean - TRUE => selected 1.172 + */ 1.173 +cc_int32_t CCAPI_CallInfo_getSelectionStatus(cc_callinfo_ref_t handle); 1.174 + 1.175 +/** 1.176 + * get GCID 1.177 + * @param [in] handle - call info handle 1.178 + * @return GCID 1.179 + * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed 1.180 + */ 1.181 +cc_string_t CCAPI_CallInfo_getGCID(cc_callinfo_ref_t handle); 1.182 + 1.183 +/** 1.184 + * get ringer loop count 1.185 + * @param handle - call handle 1.186 + * @return once Vs continuous 1.187 + */ 1.188 +cc_boolean CCAPI_CallInfo_getIsRingOnce(cc_callinfo_ref_t handle); 1.189 + 1.190 +/** 1.191 + * get ringer state. 1.192 + * @param handle - call handle 1.193 + * @return ringer state. 1.194 + */ 1.195 +cc_boolean CCAPI_CallInfo_getRingerState(cc_callinfo_ref_t handle); 1.196 + 1.197 +/** 1.198 + * get ringer mode 1.199 + * @param handle - call handle 1.200 + * @return ringer mode 1.201 + */ 1.202 +int CCAPI_CallInfo_getRingerMode(cc_callinfo_ref_t handle); 1.203 + 1.204 + 1.205 +/** 1.206 + * get onhook reason 1.207 + * @param [in] handle - call info handle 1.208 + * @return onhook reason 1.209 + */ 1.210 +cc_int32_t CCAPI_CallInfo_getOnhookReason(cc_callinfo_ref_t handle); 1.211 + 1.212 +/** 1.213 + * is Conference Call? 1.214 + * @param [in] handle - call info handle 1.215 + * @return boolean - is Conference 1.216 + */ 1.217 +cc_boolean CCAPI_CallInfo_getIsConference(cc_callinfo_ref_t handle); 1.218 + 1.219 +/** 1.220 + * getStream Statistics 1.221 + * @param [in] handle - call info handle 1.222 + * @param [in,out] stats - Array to get the stats 1.223 + * @param [in,out] count - in len of stats arraysize of stats / out stats copied 1.224 + * @return cc_return_t - CC_SUCCESS or CC_FAILURE 1.225 + */ 1.226 +cc_return_t CCAPI_CallInfo_getStreamStatistics(cc_callinfo_ref_t handle, cc_int32_t stats[], cc_int32_t *count); 1.227 + 1.228 + 1.229 +/** 1.230 + * has capability - is the feature allowed 1.231 + * @param [in] handle - call info handle 1.232 + * @param [in] feat_id - feature id 1.233 + * @return boolean - is Allowed 1.234 + */ 1.235 +cc_boolean CCAPI_CallInfo_hasCapability(cc_callinfo_ref_t handle, cc_int32_t feat_id); 1.236 + 1.237 +/** 1.238 + * get Allowed Feature set 1.239 + * @param [in] handle - call info handle 1.240 + * @param [in,out] feat_set - array of len CC_CALL_CAP_MAX 1.241 + * @return cc_return_t - CC_SUCCESS or CC_FAILURE 1.242 + */ 1.243 +cc_return_t CCAPI_CallInfo_getCapabilitySet(cc_callinfo_ref_t handle, cc_int32_t feat_set[]); 1.244 + 1.245 +/** 1.246 + * Call selection status 1.247 + * @param [in] handle - call info handle 1.248 + * @return cc_boolean - selection status 1.249 + */ 1.250 +cc_boolean CCAPI_CallInfo_isCallSelected(cc_callinfo_ref_t handle); 1.251 + 1.252 +/** 1.253 + * INFO Package for RECEIVED_INFO event 1.254 + * @param [in] handle - call info handle 1.255 + * @return cc_string_t - Info package header 1.256 + */ 1.257 +cc_string_t CCAPI_CallInfo_getINFOPack(cc_callinfo_ref_t handle); 1.258 + 1.259 +/** 1.260 + * INFO type for RECEIVED_INFO event 1.261 + * @param [in] handle - call info handle 1.262 + * @return cc_string_t - content-type header 1.263 + */ 1.264 +cc_string_t CCAPI_CallInfo_getINFOType(cc_callinfo_ref_t handle); 1.265 + 1.266 +/** 1.267 + * INFO body for RECEIVED_INFO event 1.268 + * @param [in] handle - call info handle 1.269 + * @return cc_string_t - INFO body 1.270 + */ 1.271 +cc_string_t CCAPI_CallInfo_getINFOBody(cc_callinfo_ref_t handle); 1.272 + 1.273 +/** 1.274 + * Get the call log reference 1.275 + * @param [in] handle - call info handle 1.276 + * @return cc_string_t - INFO body 1.277 + * NOTE: Memory associated with the call log is tied to the cc_callinfo_ref_t handle 1.278 + * this would be freed when the callinfo ref is freed. 1.279 + */ 1.280 +cc_calllog_ref_t CCAPI_CallInfo_getCallLogRef(cc_callinfo_ref_t handle); 1.281 + 1.282 +/** 1.283 + * returns the negotiated video direction for this call 1.284 + * @param [in] handle - call handle 1.285 + * @return cc_sdp_direction_t - video direction 1.286 + */ 1.287 +cc_sdp_direction_t CCAPI_CallInfo_getVideoDirection(cc_callinfo_ref_t handle); 1.288 + 1.289 +/** 1.290 + * Returns the Audio mute state for this call 1.291 + * @return boolean true=muted false=not muted 1.292 + */ 1.293 +cc_boolean CCAPI_CallInfo_isAudioMuted(cc_callinfo_ref_t handle); 1.294 + 1.295 +/** 1.296 + * Returns the Video mute state for this call 1.297 + * @return boolean true=muted false=not muted 1.298 + */ 1.299 +cc_boolean CCAPI_CallInfo_isVideoMuted(cc_callinfo_ref_t handle); 1.300 + 1.301 +/** 1.302 + * get SDP string CreateOffer and CreateAnswer callback 1.303 + * @param [in] handle - call info handle 1.304 + * @return sdp 1.305 + */ 1.306 +cc_string_t CCAPI_CallInfo_getSDP(cc_callinfo_ref_t handle); 1.307 + 1.308 +/** 1.309 + * get trickle candidate 1.310 + * @param [in] handle - call info handle 1.311 + * @return sdp 1.312 + */ 1.313 +cc_string_t CCAPI_CallInfo_getCandidate(cc_callinfo_ref_t handle); 1.314 + 1.315 +/** 1.316 + * get status code from internal JSEP functions 1.317 + * @param [in] handle - call info handle 1.318 + * @return status code 1.319 + */ 1.320 +cc_int32_t CCAPI_CallInfo_getStatusCode(cc_callinfo_ref_t handle); 1.321 + 1.322 +/** 1.323 + * get media stream table 1.324 + * @param [in] handle - call info handle 1.325 + * @return media track table 1.326 + */ 1.327 +MediaStreamTable* CCAPI_CallInfo_getMediaStreams(cc_callinfo_ref_t handle); 1.328 + 1.329 +/** 1.330 + * Take posession of timecard 1.331 + * @param [in] handle - call info handle 1.332 + * @return timecard pointer 1.333 + */ 1.334 +Timecard* CCAPI_CallInfo_takeTimecard(cc_callinfo_ref_t handle); 1.335 + 1.336 +#endif /* _CCAPIAPI_CALL_INFO_H_ */