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