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 #ifndef _CCAPI_LINE_INFO_H_
6 #define _CCAPI_LINE_INFO_H_
8 #include "ccapi_types.h"
10 /**
11 * Get the line ID
12 * @param [in] line - line reference handle
13 * @return cc_call_handle_t - handle of the call created
14 */
15 cc_uint32_t CCAPI_lineInfo_getID(cc_lineinfo_ref_t line);
17 /**
18 * Get the line Name
19 * @param [in] line - line reference handle
20 * @return cc_string_t - line Name
21 * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
22 */
23 cc_string_t CCAPI_lineInfo_getName(cc_lineinfo_ref_t line);
25 /**
26 * Get the line Label
27 * @param [in] line - line reference handle
28 * @return cc_string_t - line Label
29 * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
30 */
31 cc_string_t CCAPI_lineInfo_getLabel(cc_lineinfo_ref_t line);
33 /**
34 * Get the line DN Number
35 * @param [in] line - line reference handle
36 * @return cc_string_t - line DN
37 * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
38 */
39 cc_string_t CCAPI_lineInfo_getNumber(cc_lineinfo_ref_t line);
41 /**
42 * Get the line External Number
43 * @param [in] line - line reference handle
44 * @return cc_string_t - line DN
45 * NOTE: The memory for return string doesn't need to be freed it will be freedwhen the info reference is freed
46 */
47 cc_string_t CCAPI_lineInfo_getExternalNumber(cc_lineinfo_ref_t line);
49 /**
50 * Get the physical button number on which this line is configured
51 * @param [in] line - line reference handle
52 * @return cc_uint32_t - button number
53 * NOTE: This API is deprecated please don't use this. the CCAPI_lineInfo_getID() returns the button number
54 * as we use the button as line id
55 */
56 cc_uint32_t CCAPI_lineInfo_getButton(cc_lineinfo_ref_t line);
58 /**
59 * Get the Line Type
60 * @param [in] line - line reference handle
61 * @return cc_uint32_t - line featureID ( Line )
62 */
63 cc_line_feature_t CCAPI_lineInfo_getLineType(cc_lineinfo_ref_t line);
65 /**
66 * Get the physical button number on which this line is configured
67 * @param [in] line - line reference handle
68 * @return cc_uint32_t - button number
69 */
70 cc_boolean CCAPI_lineInfo_getRegState(cc_lineinfo_ref_t line);
72 /**
73 * Get the CFWDAll status for the line
74 * @param [in] line - line reference handle
75 * @return cc_boolean - isForwarded
76 */
77 cc_boolean CCAPI_lineInfo_isCFWDActive(cc_lineinfo_ref_t line);
79 /**
80 * Get the CFWDAll destination
81 * @param [in] line - line reference handle
82 * @return cc_string_t - cfwd target
83 * NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
84 */
85 cc_string_t CCAPI_lineInfo_getCFWDName(cc_lineinfo_ref_t line);
87 /**
88 * Get calls on line
89 * @param [in] line - lineID
90 * @param [in, out] handles[] - Array of callinfo references
91 * @param [in,out] count - count of call references populated
92 * @return void
93 */
94 void CCAPI_LineInfo_getCalls(cc_lineid_t line, cc_call_handle_t handles[], int *count);
96 /**
97 * Get calls on line by state
98 * @param [in] line - lineID
99 * @param [in] state - state
100 * @param [in, out] handles[] - Array of callinfo references
101 * @param [in,out] count - count of call references populated
102 * @return void
103 */
104 void CCAPI_LineInfo_getCallsByState(cc_lineid_t line, cc_call_state_t state,
105 cc_call_handle_t handles[], int *count);
107 /**
108 * Get the MWI Status
109 * @param line - line reference handle
110 * @return cc_uint32_t - MWI status (boolean 0 => no MWI)
111 */
112 cc_uint32_t CCAPI_lineInfo_getMWIStatus(cc_lineinfo_ref_t line);
114 /**
115 * Get the MWI Type
116 * @param line - line reference handle
117 * @return cc_uint32_t - MWI Type
118 */
119 cc_uint32_t CCAPI_lineInfo_getMWIType(cc_lineinfo_ref_t line);
121 /**
122 * Get the MWI new msg count
123 * @param line - line reference handle
124 * @return cc_uint32_t - MWI new msg count
125 */
126 cc_uint32_t CCAPI_lineInfo_getMWINewMsgCount(cc_lineinfo_ref_t line);
128 /**
129 * Get the MWI old msg count
130 * @param line - line reference handle
131 * @return cc_uint32_t - MWI old msg count
132 */
133 cc_uint32_t CCAPI_lineInfo_getMWIOldMsgCount(cc_lineinfo_ref_t line);
135 /**
136 * Get the MWI high priority new msg count
137 * @param line - line reference handle
138 * @return cc_uint32_t - MWI new msg count
139 */
140 cc_uint32_t CCAPI_lineInfo_getMWIPrioNewMsgCount(cc_lineinfo_ref_t line);
142 /**
143 * Get the MWI high priority old msg count
144 * @param line - line reference handle
145 * @return cc_uint32_t - MWI old msg count
146 */
147 cc_uint32_t CCAPI_lineInfo_getMWIPrioOldMsgCount(cc_lineinfo_ref_t line);
149 /**
150 * has capability - is the feature allowed
151 * @param [in] handle - call info handle
152 * @param [in] feat_id - feature id
153 * @return boolean - is Allowed
154 */
155 cc_boolean CCAPI_LineInfo_hasCapability(cc_lineinfo_ref_t line, cc_int32_t feat_id);
157 /**
158 * get Allowed Feature set
159 * @param [in] handle - call info handle
160 * @param [in,out] feat_set - array of len CC_CALL_CAP_MAX
161 * @return cc_return_t - CC_SUCCESS or CC_FAILURE
162 */
163 cc_return_t CCAPI_LineInfo_getCapabilitySet(cc_lineinfo_ref_t line, cc_int32_t feat_set[]);
165 #endif /* _CCAPIAPI_LINE_INFO_H_ */