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 _CC_SIPCC_CALLINFO_H michael@0: #define _CC_SIPCC_CALLINFO_H michael@0: michael@0: #include "CC_CallInfo.h" michael@0: #include "CC_SIPCCCall.h" michael@0: michael@0: michael@0: #include "common/Wrapper.h" michael@0: michael@0: extern "C" { michael@0: void CCAPI_CallListener_onCallEvent(ccapi_call_event_e eventType, cc_call_handle_t handle, cc_callinfo_ref_t info); michael@0: } michael@0: michael@0: namespace CSF michael@0: { michael@0: michael@0: DECLARE_NS_PTR(CC_SIPCCCallInfo); michael@0: class CC_SIPCCCallInfo : public CC_CallInfo michael@0: { michael@0: michael@0: private: michael@0: cc_callinfo_ref_t callinfo_ref; michael@0: michael@0: CC_SIPCCCallInfo (cc_callinfo_ref_t callinfo); michael@0: michael@0: CSF_DECLARE_WRAP(CC_SIPCCCallInfo, cc_callinfo_ref_t); michael@0: michael@0: CC_SIPCCCallMediaDataPtr pMediaData; michael@0: michael@0: public: michael@0: ~CC_SIPCCCallInfo (); michael@0: michael@0: cc_call_state_t getCallState (); michael@0: fsmdef_states_t getFsmState () const; michael@0: bool getRingerState(); michael@0: michael@0: virtual cc_call_attr_t getCallAttr(); michael@0: michael@0: michael@0: virtual CC_LinePtr getline (); michael@0: virtual std::string callStateToString (cc_call_state_t state); michael@0: virtual std::string fsmStateToString (fsmdef_states_t state) const; michael@0: virtual std::string callEventToString (ccapi_call_event_e callEvent); michael@0: virtual cc_call_type_t getCallType(); michael@0: virtual std::string getCalledPartyName(); michael@0: virtual std::string getCalledPartyNumber(); michael@0: virtual std::string getCallingPartyName(); michael@0: virtual std::string getCallingPartyNumber(); michael@0: virtual std::string getAlternateNumber(); michael@0: virtual bool hasCapability (CC_CallCapabilityEnum::CC_CallCapability capability); michael@0: virtual std::set getCapabilitySet(); michael@0: virtual std::string getOriginalCalledPartyName(); michael@0: virtual std::string getOriginalCalledPartyNumber(); michael@0: virtual std::string getLastRedirectingPartyName(); michael@0: virtual std::string getLastRedirectingPartyNumber(); michael@0: virtual std::string getPlacedCallPartyName(); michael@0: virtual std::string getPlacedCallPartyNumber(); michael@0: virtual cc_int32_t getCallInstance(); michael@0: virtual std::string getStatus(); michael@0: virtual cc_call_security_t getSecurity(); michael@0: virtual cc_int32_t getSelectionStatus(); michael@0: virtual std::string getGCID(); michael@0: virtual bool getIsRingOnce(); michael@0: virtual int getRingerMode(); michael@0: virtual cc_int32_t getOnhookReason(); michael@0: virtual bool getIsConference(); michael@0: virtual std::set getStreamStatistics(); michael@0: virtual bool isCallSelected(); michael@0: virtual std::string getINFOPack(); michael@0: virtual std::string getINFOType(); michael@0: virtual std::string getINFOBody(); michael@0: virtual cc_calllog_ref_t getCallLogRef(); michael@0: virtual cc_sdp_direction_t getVideoDirection(); michael@0: virtual int getVolume(); michael@0: virtual bool isMediaStateAvailable(); michael@0: virtual bool isAudioMuted(); michael@0: virtual bool isVideoMuted(); michael@0: virtual std::string getSDP(); michael@0: virtual std::string getCandidate(); michael@0: virtual cc_int32_t getStatusCode(); michael@0: virtual MediaStreamTable* getMediaStreams() const; michael@0: virtual Timecard *takeTimecard(); michael@0: michael@0: virtual void setMediaData(CC_SIPCCCallMediaDataPtr pMediaData); michael@0: michael@0: private: michael@0: // Helper to generate the caps once - then we serve then from this cache. michael@0: // This is fine because the info object is a snapshot, and there's no use generating this michael@0: // multiple times if the client makes successive calls to hasCapability(). michael@0: void generateCapabilities(); michael@0: std::set caps; michael@0: bool hasFeature(ccapi_call_capability_e cap); michael@0: }; michael@0: }; michael@0: michael@0: michael@0: #endif