Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef _CC_SIPCC_CALLINFO_H |
michael@0 | 6 | #define _CC_SIPCC_CALLINFO_H |
michael@0 | 7 | |
michael@0 | 8 | #include "CC_CallInfo.h" |
michael@0 | 9 | #include "CC_SIPCCCall.h" |
michael@0 | 10 | |
michael@0 | 11 | |
michael@0 | 12 | #include "common/Wrapper.h" |
michael@0 | 13 | |
michael@0 | 14 | extern "C" { |
michael@0 | 15 | void CCAPI_CallListener_onCallEvent(ccapi_call_event_e eventType, cc_call_handle_t handle, cc_callinfo_ref_t info); |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | namespace CSF |
michael@0 | 19 | { |
michael@0 | 20 | |
michael@0 | 21 | DECLARE_NS_PTR(CC_SIPCCCallInfo); |
michael@0 | 22 | class CC_SIPCCCallInfo : public CC_CallInfo |
michael@0 | 23 | { |
michael@0 | 24 | |
michael@0 | 25 | private: |
michael@0 | 26 | cc_callinfo_ref_t callinfo_ref; |
michael@0 | 27 | |
michael@0 | 28 | CC_SIPCCCallInfo (cc_callinfo_ref_t callinfo); |
michael@0 | 29 | |
michael@0 | 30 | CSF_DECLARE_WRAP(CC_SIPCCCallInfo, cc_callinfo_ref_t); |
michael@0 | 31 | |
michael@0 | 32 | CC_SIPCCCallMediaDataPtr pMediaData; |
michael@0 | 33 | |
michael@0 | 34 | public: |
michael@0 | 35 | ~CC_SIPCCCallInfo (); |
michael@0 | 36 | |
michael@0 | 37 | cc_call_state_t getCallState (); |
michael@0 | 38 | fsmdef_states_t getFsmState () const; |
michael@0 | 39 | bool getRingerState(); |
michael@0 | 40 | |
michael@0 | 41 | virtual cc_call_attr_t getCallAttr(); |
michael@0 | 42 | |
michael@0 | 43 | |
michael@0 | 44 | virtual CC_LinePtr getline (); |
michael@0 | 45 | virtual std::string callStateToString (cc_call_state_t state); |
michael@0 | 46 | virtual std::string fsmStateToString (fsmdef_states_t state) const; |
michael@0 | 47 | virtual std::string callEventToString (ccapi_call_event_e callEvent); |
michael@0 | 48 | virtual cc_call_type_t getCallType(); |
michael@0 | 49 | virtual std::string getCalledPartyName(); |
michael@0 | 50 | virtual std::string getCalledPartyNumber(); |
michael@0 | 51 | virtual std::string getCallingPartyName(); |
michael@0 | 52 | virtual std::string getCallingPartyNumber(); |
michael@0 | 53 | virtual std::string getAlternateNumber(); |
michael@0 | 54 | virtual bool hasCapability (CC_CallCapabilityEnum::CC_CallCapability capability); |
michael@0 | 55 | virtual std::set<CC_CallCapabilityEnum::CC_CallCapability> getCapabilitySet(); |
michael@0 | 56 | virtual std::string getOriginalCalledPartyName(); |
michael@0 | 57 | virtual std::string getOriginalCalledPartyNumber(); |
michael@0 | 58 | virtual std::string getLastRedirectingPartyName(); |
michael@0 | 59 | virtual std::string getLastRedirectingPartyNumber(); |
michael@0 | 60 | virtual std::string getPlacedCallPartyName(); |
michael@0 | 61 | virtual std::string getPlacedCallPartyNumber(); |
michael@0 | 62 | virtual cc_int32_t getCallInstance(); |
michael@0 | 63 | virtual std::string getStatus(); |
michael@0 | 64 | virtual cc_call_security_t getSecurity(); |
michael@0 | 65 | virtual cc_int32_t getSelectionStatus(); |
michael@0 | 66 | virtual std::string getGCID(); |
michael@0 | 67 | virtual bool getIsRingOnce(); |
michael@0 | 68 | virtual int getRingerMode(); |
michael@0 | 69 | virtual cc_int32_t getOnhookReason(); |
michael@0 | 70 | virtual bool getIsConference(); |
michael@0 | 71 | virtual std::set<cc_int32_t> getStreamStatistics(); |
michael@0 | 72 | virtual bool isCallSelected(); |
michael@0 | 73 | virtual std::string getINFOPack(); |
michael@0 | 74 | virtual std::string getINFOType(); |
michael@0 | 75 | virtual std::string getINFOBody(); |
michael@0 | 76 | virtual cc_calllog_ref_t getCallLogRef(); |
michael@0 | 77 | virtual cc_sdp_direction_t getVideoDirection(); |
michael@0 | 78 | virtual int getVolume(); |
michael@0 | 79 | virtual bool isMediaStateAvailable(); |
michael@0 | 80 | virtual bool isAudioMuted(); |
michael@0 | 81 | virtual bool isVideoMuted(); |
michael@0 | 82 | virtual std::string getSDP(); |
michael@0 | 83 | virtual std::string getCandidate(); |
michael@0 | 84 | virtual cc_int32_t getStatusCode(); |
michael@0 | 85 | virtual MediaStreamTable* getMediaStreams() const; |
michael@0 | 86 | virtual Timecard *takeTimecard(); |
michael@0 | 87 | |
michael@0 | 88 | virtual void setMediaData(CC_SIPCCCallMediaDataPtr pMediaData); |
michael@0 | 89 | |
michael@0 | 90 | private: |
michael@0 | 91 | // Helper to generate the caps once - then we serve then from this cache. |
michael@0 | 92 | // This is fine because the info object is a snapshot, and there's no use generating this |
michael@0 | 93 | // multiple times if the client makes successive calls to hasCapability(). |
michael@0 | 94 | void generateCapabilities(); |
michael@0 | 95 | std::set<CC_CallCapabilityEnum::CC_CallCapability> caps; |
michael@0 | 96 | bool hasFeature(ccapi_call_capability_e cap); |
michael@0 | 97 | }; |
michael@0 | 98 | }; |
michael@0 | 99 | |
michael@0 | 100 | |
michael@0 | 101 | #endif |