media/webrtc/signaling/include/CC_CallInfo.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/webrtc/signaling/include/CC_CallInfo.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,371 @@
     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 +#pragma once
     1.9 +
    1.10 +#include <set>
    1.11 +
    1.12 +extern "C"
    1.13 +{
    1.14 +#include "ccapi_types.h"
    1.15 +#include "fsmdef_states.h"
    1.16 +}
    1.17 +
    1.18 +
    1.19 +#include "CC_Common.h"
    1.20 +#include "CC_CallTypes.h"
    1.21 +#include "peer_connection_types.h"
    1.22 +
    1.23 +#if defined(__cplusplus) && __cplusplus >= 201103L
    1.24 +typedef struct Timecard Timecard;
    1.25 +#else
    1.26 +#include "timecard.h"
    1.27 +#endif
    1.28 +
    1.29 +namespace CSF
    1.30 +{
    1.31 +
    1.32 +	class ECC_API CC_CallInfo
    1.33 +    {
    1.34 +    public:
    1.35 +        NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CC_CallInfo)
    1.36 +    protected:
    1.37 +        CC_CallInfo() { }
    1.38 +
    1.39 +    public:
    1.40 +        //Base class needs dtor to be declared as virtual
    1.41 +        virtual ~CC_CallInfo() {};
    1.42 +
    1.43 +        /**
    1.44 +           Get the line object associated with this call.
    1.45 +
    1.46 +           @return CC_LinePtr - line ID
    1.47 +         */
    1.48 +        virtual CC_LinePtr getline () = 0;
    1.49 +
    1.50 +        /**
    1.51 +           get Call state
    1.52 +           @param [in] handle - call info handle
    1.53 +           @return call state
    1.54 +         */
    1.55 +        virtual cc_call_state_t getCallState () = 0;
    1.56 +
    1.57 +        /**
    1.58 +           get FSM state
    1.59 +           @param [in] handle - call info handle
    1.60 +           @return FSM state
    1.61 +         */
    1.62 +        virtual fsmdef_states_t getFsmState () const = 0;
    1.63 +
    1.64 +        /**
    1.65 +           print Call state
    1.66 +           @param [in] handle - call info handle
    1.67 +           @return call state as string
    1.68 +         */
    1.69 +        virtual std::string callStateToString (cc_call_state_t state) = 0;
    1.70 +
    1.71 +        /**
    1.72 +           print FSM state
    1.73 +           @param [in] handle - call info handle
    1.74 +           @return call state as string
    1.75 +         */
    1.76 +        virtual std::string fsmStateToString (fsmdef_states_t state) const = 0;
    1.77 +
    1.78 +        /**
    1.79 +           print Call event
    1.80 +           @param [in] call event
    1.81 +           @return call event as string
    1.82 +         */
    1.83 +        virtual std::string callEventToString (ccapi_call_event_e callEvent) = 0;
    1.84 +
    1.85 +        /**
    1.86 +           Get ringer state.
    1.87 +
    1.88 +           @return bool ringer state.
    1.89 +         */
    1.90 +        virtual bool getRingerState() = 0;
    1.91 +
    1.92 +        /**
    1.93 +           Get call attributes
    1.94 +
    1.95 +           @return cc_call_attr_t.
    1.96 +         */
    1.97 +        virtual cc_call_attr_t getCallAttr() = 0;
    1.98 +
    1.99 +        /**
   1.100 +           Get the call type
   1.101 +
   1.102 +           @return cc_call_type_t for this call. Supported values inlude:
   1.103 +                   CC_CALL_TYPE_INCOMING, CC_CALL_TYPE_OUTGOING and CC_CALL_TYPE_FORWARDED.
   1.104 +         */
   1.105 +        virtual cc_call_type_t getCallType() = 0;
   1.106 +
   1.107 +        /**
   1.108 +           Get called party name
   1.109 +
   1.110 +           @return called party name
   1.111 +         */
   1.112 +        virtual std::string getCalledPartyName() = 0;
   1.113 +
   1.114 +        /**
   1.115 +           Get called party number
   1.116 +
   1.117 +           @return called party number as a string.
   1.118 +         */
   1.119 +        virtual std::string getCalledPartyNumber() = 0;
   1.120 +
   1.121 +        /**
   1.122 +           Get calling party name
   1.123 +
   1.124 +           @return calling party name
   1.125 +         */
   1.126 +        virtual std::string getCallingPartyName() = 0;
   1.127 +
   1.128 +        /**
   1.129 +           Get calling party number
   1.130 +           @return calling party number as a string
   1.131 +                   Note: this is a const reference to a string that's owned by the
   1.132 +          */
   1.133 +        virtual std::string getCallingPartyNumber() = 0;
   1.134 +
   1.135 +        /**
   1.136 +           Get alternate number
   1.137 +
   1.138 +           @return calling party number as a string.
   1.139 +         */
   1.140 +        virtual std::string getAlternateNumber() = 0;
   1.141 +
   1.142 +        /**
   1.143 +           This function is used to check if a given capability is supported
   1.144 +           based on the information in this CC_CallInfo object.
   1.145 +
   1.146 +           @param [in] capability - the capability that is to be checked for availability.
   1.147 +           @return boolean - returns true if the given capability is available, false otherwise.
   1.148 +         */
   1.149 +        virtual bool hasCapability (CC_CallCapabilityEnum::CC_CallCapability capability) = 0;
   1.150 +
   1.151 +        /**
   1.152 +           If you need the complete set of capabilities
   1.153 +
   1.154 +           @return cc_return_t - set of Call Capabilities.
   1.155 +         */
   1.156 +        virtual std::set<CC_CallCapabilityEnum::CC_CallCapability> getCapabilitySet() = 0;
   1.157 +
   1.158 +        /**
   1.159 +           get Original Called party name
   1.160 +           @param [in] handle - call info handle
   1.161 +           @return original called party name
   1.162 +         */
   1.163 +        virtual std::string getOriginalCalledPartyName() = 0;
   1.164 +
   1.165 +        /**
   1.166 +           get Original Called party number
   1.167 +           @param [in] handle - call info handle
   1.168 +           @return original called party number
   1.169 +         */
   1.170 +        virtual std::string getOriginalCalledPartyNumber() = 0;
   1.171 +
   1.172 +        /**
   1.173 +           get last redirecting party name
   1.174 +           @param [in] handle - call info handle
   1.175 +           @return last redirecting party name
   1.176 +         */
   1.177 +        virtual std::string getLastRedirectingPartyName() = 0;
   1.178 +
   1.179 +        /**
   1.180 +           get past redirecting party number
   1.181 +           @param [in] handle - call info handle
   1.182 +           @return last redirecting party number
   1.183 +         */
   1.184 +        virtual std::string getLastRedirectingPartyNumber() = 0;
   1.185 +
   1.186 +        /**
   1.187 +           get placed call party name
   1.188 +           @param [in] handle - call info handle
   1.189 +           @return placed party name
   1.190 +         */
   1.191 +        virtual std::string getPlacedCallPartyName() = 0;
   1.192 +
   1.193 +        /**
   1.194 +           get placed call party number
   1.195 +           @param [in] handle - call info handle
   1.196 +           @return placed party number
   1.197 +         */
   1.198 +        virtual std::string getPlacedCallPartyNumber() = 0;
   1.199 +
   1.200 +        /**
   1.201 +           get call instance number
   1.202 +           @param [in] handle - call info handle
   1.203 +           @return
   1.204 +         */
   1.205 +        virtual cc_int32_t getCallInstance() = 0;
   1.206 +
   1.207 +        /**
   1.208 +           get call status prompt
   1.209 +           @param [in] handle - call info handle
   1.210 +           @return call status
   1.211 +         */
   1.212 +        virtual std::string getStatus() = 0;
   1.213 +
   1.214 +        /**
   1.215 +           get call security   // TODO XLS has callagent security and endtoend security on call?
   1.216 +           @param [in] handle - call info handle
   1.217 +           @return call security status
   1.218 +         */
   1.219 +        virtual cc_call_security_t getSecurity() = 0;
   1.220 +
   1.221 +        /**
   1.222 +           get Call Selection Status
   1.223 +           @param [in] handle - call info handle
   1.224 +           @return bool - TRUE => selected
   1.225 +         */
   1.226 +        virtual cc_int32_t getSelectionStatus() = 0;
   1.227 +
   1.228 +        /**
   1.229 +           get GCID
   1.230 +           @param [in] handle - call info handle
   1.231 +           @return GCID
   1.232 +         */
   1.233 +        virtual std::string getGCID() = 0;
   1.234 +
   1.235 +        /**
   1.236 +           get ringer loop count
   1.237 +           @param handle - call handle
   1.238 +           @return once Vs continuous
   1.239 +         */
   1.240 +        virtual bool getIsRingOnce() = 0;
   1.241 +
   1.242 +        /**
   1.243 +           get ringer mode
   1.244 +           @param handle - call handle
   1.245 +           @return ringer mode
   1.246 +         */
   1.247 +        virtual int getRingerMode() = 0;
   1.248 +
   1.249 +        /**
   1.250 +           get onhook reason
   1.251 +           @param [in] handle - call info handle
   1.252 +           @return onhook reason
   1.253 +         */
   1.254 +        virtual cc_int32_t getOnhookReason() = 0;
   1.255 +
   1.256 +        /**
   1.257 +           is Conference Call?
   1.258 +           @param [in] handle - call info handle
   1.259 +           @return boolean - is Conference
   1.260 +         */
   1.261 +        virtual bool getIsConference() = 0;
   1.262 +
   1.263 +        /**
   1.264 +           getStream Statistics
   1.265 +           @param [in] handle - call info handle
   1.266 +           @param [in,out] stats - Array to get the stats
   1.267 +           @param [in,out] count - in len of stats arraysize of stats / out stats copied
   1.268 +           @return cc_return_t - CC_SUCCESS or CC_FAILURE
   1.269 +         */
   1.270 +        virtual std::set<cc_int32_t> getStreamStatistics() = 0;
   1.271 +
   1.272 +        /**
   1.273 +           Call selection status
   1.274 +           @param [in] handle - call info handle
   1.275 +           @return bool - selection status
   1.276 +         */
   1.277 +        virtual bool isCallSelected() = 0;
   1.278 +
   1.279 +        /**
   1.280 +           INFO Package for RECEIVED_INFO event
   1.281 +           @param [in] handle - call info handle
   1.282 +           @return string - Info package header
   1.283 +         */
   1.284 +        virtual std::string getINFOPack() = 0;
   1.285 +
   1.286 +        /**
   1.287 +           INFO type for RECEIVED_INFO event
   1.288 +
   1.289 +           @return string - content-type  header
   1.290 +         */
   1.291 +        virtual std::string getINFOType() = 0;
   1.292 +
   1.293 +        /**
   1.294 +           INFO body for RECEIVED_INFO event
   1.295 +
   1.296 +           @return string - INFO body
   1.297 +         */
   1.298 +        virtual std::string getINFOBody() = 0;
   1.299 +
   1.300 +        /**
   1.301 +           Get the call log reference
   1.302 +
   1.303 +           //TODO NEED TO DO SOMETHING WRAP CALL LOG REF.
   1.304 +           @return string - INFO body
   1.305 +           NOTE: Memory associated with the call log is tied to the
   1.306 +           this would be freed when the callinfo ref is freed.
   1.307 +         */
   1.308 +        virtual cc_calllog_ref_t  getCallLogRef() = 0;
   1.309 +
   1.310 +        /**
   1.311 +           returns the negotiated video direction for this call
   1.312 +
   1.313 +           @return cc_sdp_direction_t - video direction
   1.314 +         */
   1.315 +        virtual cc_sdp_direction_t getVideoDirection() = 0;
   1.316 +
   1.317 +         /**
   1.318 +           Find out if this call is capable of querying the media state, which includes mute state and video direction
   1.319 +           @return  bool
   1.320 +          */
   1.321 +        virtual bool isMediaStateAvailable() = 0;
   1.322 +
   1.323 +        /**
   1.324 +           Get the audio mute state if available (check availability with isMediaStateAvailable())
   1.325 +           @return  bool  - the current audio state of the call
   1.326 +          */
   1.327 +        virtual bool isAudioMuted(void) = 0;
   1.328 +
   1.329 +         /**
   1.330 +           Get the video mute state if available (check availability with isMediaStateAvailable())
   1.331 +           @return  bool  - the current video state of the call
   1.332 +          */
   1.333 +        virtual bool isVideoMuted(void) = 0;
   1.334 +
   1.335 +        /**
   1.336 +          Get the current call volume level
   1.337 +          @return int - the current call volume level, or -1 if it cannot be determined
   1.338 +        */
   1.339 +        virtual int getVolume() = 0;
   1.340 +
   1.341 +        /**
   1.342 +           get SDP from info object returned from JSEP functions
   1.343 +           @param [in] handle - call info handle
   1.344 +           @return SDP string
   1.345 +         */
   1.346 +        virtual std::string getSDP() = 0;
   1.347 +
   1.348 +        /**
   1.349 +           get status code
   1.350 +           @param [in] handle - call info handle
   1.351 +           @return code
   1.352 +         */
   1.353 +        virtual cc_int32_t getStatusCode() = 0;
   1.354 +
   1.355 +        /**
   1.356 +           get media streams
   1.357 +           @return media stream table
   1.358 +           Note:Ownership of the MediaStreamTable is responsibiliy of
   1.359 +           the caller.
   1.360 +         */
   1.361 +        virtual MediaStreamTable* getMediaStreams() const = 0;
   1.362 +
   1.363 +        /**
   1.364 +          Get the current operation's timecard (if any), and assume ownership
   1.365 +          of its memory.
   1.366 +         */
   1.367 +        virtual Timecard *takeTimecard() = 0;
   1.368 +
   1.369 +	/**
   1.370 +          Get the latest candidate.
   1.371 +	*/
   1.372 +	virtual std::string getCandidate() = 0;
   1.373 +    };
   1.374 +};

mercurial