|
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/. */ |
|
4 |
|
5 #pragma once |
|
6 |
|
7 #include "CC_Common.h" |
|
8 #include <bitset> |
|
9 #include <set> |
|
10 #include <vector> |
|
11 |
|
12 extern "C" |
|
13 { |
|
14 #include "ccapi_types.h" |
|
15 } |
|
16 |
|
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() { } |
|
25 |
|
26 public: |
|
27 //Base class needs dtor to be declared as virtual |
|
28 virtual ~CC_LineInfo() {}; |
|
29 |
|
30 /** |
|
31 Get the line Name |
|
32 |
|
33 @return string - line Name |
|
34 */ |
|
35 virtual std::string getName() = 0; |
|
36 |
|
37 /** |
|
38 Get the line DN Number |
|
39 @return string - line DN |
|
40 */ |
|
41 virtual std::string getNumber() = 0; |
|
42 |
|
43 /** |
|
44 Get the physical button number on which this line is configured |
|
45 |
|
46 @return cc_uint32_t - button number |
|
47 */ |
|
48 virtual cc_uint32_t getButton() = 0; |
|
49 |
|
50 /** |
|
51 Get the Line Type |
|
52 |
|
53 @return cc_line_feature_t - line featureID ( Line ) |
|
54 */ |
|
55 virtual cc_line_feature_t getLineType() = 0; |
|
56 |
|
57 /** |
|
58 |
|
59 @return bool - true if phone is currently registered with CM. |
|
60 */ |
|
61 virtual bool getRegState() = 0; |
|
62 |
|
63 /** |
|
64 Get the CFWDAll status for the line |
|
65 |
|
66 @return bool - isForwarded |
|
67 */ |
|
68 virtual bool isCFWDActive() = 0; |
|
69 |
|
70 /** |
|
71 Get the CFWDAll destination |
|
72 |
|
73 @return string - cfwd target |
|
74 */ |
|
75 virtual std::string getCFWDName() = 0; |
|
76 |
|
77 /** |
|
78 Get calls on line |
|
79 |
|
80 @param [in] line - line |
|
81 @return vector<CC_CallPtr> |
|
82 */ |
|
83 virtual std::vector<CC_CallPtr> getCalls (CC_LinePtr linePtr) = 0; |
|
84 |
|
85 /** |
|
86 Get calls on line by state |
|
87 |
|
88 @param [in] line - line |
|
89 @param [in] state - state |
|
90 |
|
91 @return vector<CC_CallPtr> |
|
92 */ |
|
93 virtual std::vector<CC_CallPtr> getCallsByState (CC_LinePtr linePtr, cc_call_state_t state) = 0; |
|
94 |
|
95 /** |
|
96 Get the MWI Status |
|
97 |
|
98 @return cc_uint32_t - MWI status (boolean 0 => no MWI) |
|
99 */ |
|
100 virtual bool getMWIStatus() = 0; |
|
101 |
|
102 /** |
|
103 Get the MWI Type |
|
104 |
|
105 @return cc_uint32_t - MWI Type |
|
106 */ |
|
107 virtual cc_uint32_t getMWIType() = 0; |
|
108 |
|
109 /** |
|
110 Get the MWI new msg count |
|
111 |
|
112 @return cc_uint32_t - MWI new msg count |
|
113 */ |
|
114 virtual cc_uint32_t getMWINewMsgCount() = 0; |
|
115 |
|
116 /** |
|
117 Get the MWI old msg count |
|
118 |
|
119 @return cc_uint32_t - MWI old msg count |
|
120 */ |
|
121 virtual cc_uint32_t getMWIOldMsgCount() = 0; |
|
122 |
|
123 /** |
|
124 Get the MWI high priority new msg count |
|
125 |
|
126 @return cc_uint32_t - MWI new msg count |
|
127 */ |
|
128 virtual cc_uint32_t getMWIPrioNewMsgCount() = 0; |
|
129 |
|
130 /** |
|
131 Get the MWI high priority old msg count |
|
132 |
|
133 @return cc_uint32_t - MWI old msg count |
|
134 */ |
|
135 virtual cc_uint32_t getMWIPrioOldMsgCount() = 0; |
|
136 |
|
137 /** |
|
138 has capability - is the feature allowed |
|
139 |
|
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; |
|
144 |
|
145 /** |
|
146 get Allowed Feature set |
|
147 |
|
148 @return cc_return_t - bitset of Line Capabilities. |
|
149 */ |
|
150 virtual std::bitset<CCAPI_CALL_CAP_MAX> getCapabilitySet() = 0; |
|
151 }; |
|
152 }; |