Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
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 #pragma once
7 #include "CC_Common.h"
8 #include <bitset>
9 #include <set>
10 #include <vector>
12 extern "C"
13 {
14 #include "ccapi_types.h"
15 }
17 namespace CSF
18 {
19 class ECC_API CC_LineInfo
20 {
21 public:
22 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CC_LineInfo)
23 protected:
24 CC_LineInfo() { }
26 public:
27 //Base class needs dtor to be declared as virtual
28 virtual ~CC_LineInfo() {};
30 /**
31 Get the line Name
33 @return string - line Name
34 */
35 virtual std::string getName() = 0;
37 /**
38 Get the line DN Number
39 @return string - line DN
40 */
41 virtual std::string getNumber() = 0;
43 /**
44 Get the physical button number on which this line is configured
46 @return cc_uint32_t - button number
47 */
48 virtual cc_uint32_t getButton() = 0;
50 /**
51 Get the Line Type
53 @return cc_line_feature_t - line featureID ( Line )
54 */
55 virtual cc_line_feature_t getLineType() = 0;
57 /**
59 @return bool - true if phone is currently registered with CM.
60 */
61 virtual bool getRegState() = 0;
63 /**
64 Get the CFWDAll status for the line
66 @return bool - isForwarded
67 */
68 virtual bool isCFWDActive() = 0;
70 /**
71 Get the CFWDAll destination
73 @return string - cfwd target
74 */
75 virtual std::string getCFWDName() = 0;
77 /**
78 Get calls on line
80 @param [in] line - line
81 @return vector<CC_CallPtr>
82 */
83 virtual std::vector<CC_CallPtr> getCalls (CC_LinePtr linePtr) = 0;
85 /**
86 Get calls on line by state
88 @param [in] line - line
89 @param [in] state - state
91 @return vector<CC_CallPtr>
92 */
93 virtual std::vector<CC_CallPtr> getCallsByState (CC_LinePtr linePtr, cc_call_state_t state) = 0;
95 /**
96 Get the MWI Status
98 @return cc_uint32_t - MWI status (boolean 0 => no MWI)
99 */
100 virtual bool getMWIStatus() = 0;
102 /**
103 Get the MWI Type
105 @return cc_uint32_t - MWI Type
106 */
107 virtual cc_uint32_t getMWIType() = 0;
109 /**
110 Get the MWI new msg count
112 @return cc_uint32_t - MWI new msg count
113 */
114 virtual cc_uint32_t getMWINewMsgCount() = 0;
116 /**
117 Get the MWI old msg count
119 @return cc_uint32_t - MWI old msg count
120 */
121 virtual cc_uint32_t getMWIOldMsgCount() = 0;
123 /**
124 Get the MWI high priority new msg count
126 @return cc_uint32_t - MWI new msg count
127 */
128 virtual cc_uint32_t getMWIPrioNewMsgCount() = 0;
130 /**
131 Get the MWI high priority old msg count
133 @return cc_uint32_t - MWI old msg count
134 */
135 virtual cc_uint32_t getMWIPrioOldMsgCount() = 0;
137 /**
138 has capability - is the feature allowed
140 @param [in] capability - capability being queried to see if it's available
141 @return bool - is Allowed
142 */
143 virtual bool hasCapability(ccapi_call_capability_e capability) = 0;
145 /**
146 get Allowed Feature set
148 @return cc_return_t - bitset of Line Capabilities.
149 */
150 virtual std::bitset<CCAPI_CALL_CAP_MAX> getCapabilitySet() = 0;
151 };
152 };