|
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 <string> |
|
8 |
|
9 #include "CC_Common.h" |
|
10 #include "ECC_Types.h" |
|
11 |
|
12 namespace CSF |
|
13 { |
|
14 DECLARE_NS_PTR_VECTOR(PhoneDetails); |
|
15 class ECC_API PhoneDetails |
|
16 { |
|
17 public: |
|
18 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PhoneDetails) |
|
19 virtual ~PhoneDetails() {} |
|
20 /** |
|
21 * Get the device name (the CUCM device name) and the free text description. |
|
22 */ |
|
23 virtual std::string getName() const = 0; |
|
24 virtual std::string getDescription() const = 0; |
|
25 |
|
26 /** |
|
27 * Get the model number (the internal CUCM number, not the number printed on the phone) |
|
28 * and the corresponding description (which normally does include the number printed on the phone). |
|
29 * Returns -1, "" if unknown |
|
30 */ |
|
31 virtual int getModel() const = 0; |
|
32 virtual std::string getModelDescription() const = 0; |
|
33 |
|
34 virtual bool isSoftPhone() = 0; |
|
35 |
|
36 /** |
|
37 * List the known directory numbers of lines associated with the device. |
|
38 * Empty list if unknown. |
|
39 */ |
|
40 virtual std::vector<std::string> getLineDNs() const = 0; |
|
41 |
|
42 /** |
|
43 * Current status of the device, if known. |
|
44 */ |
|
45 virtual ServiceStateType::ServiceState getServiceState() const = 0; |
|
46 |
|
47 /** |
|
48 * TFTP config of device, and freshness of the config. |
|
49 */ |
|
50 virtual std::string getConfig() const = 0; |
|
51 |
|
52 protected: |
|
53 PhoneDetails() {} |
|
54 |
|
55 private: |
|
56 PhoneDetails(const PhoneDetails&); |
|
57 PhoneDetails& operator=(const PhoneDetails&); |
|
58 }; |
|
59 }; |