public class CstaLogicalDevice
extends java.lang.Object
Constructor and Description |
---|
CstaLogicalDevice(CstaDevice device)
Create a CstaLogicalDevice object from CstaDevice.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
GetDoNotDisturb()
Get DoNotDisturb status.
|
CstaDoNotDisturbData |
getDoNotDisturbData()
Get current DoNotDisturb data.
|
CstaDoNotDisturbData |
GetDoNotDisturbData()
Get DoNotDisturb status and the remaining DND Snooze Duration.
|
boolean |
getDoNotDisturbStatus()
Get current DoNotDisturb status.
|
java.util.List<CstaForwardingData> |
GetForwarding()
Get the Forwarding status.
|
CstaForwardingData |
getForwardingDataByType(CstaForwardingType type)
Get the Forwarding Data of one forwarding type.
|
java.util.List<CstaForwardingData> |
getForwardingDataList()
Get the Forwarding Data of the Device.
|
boolean |
SetDoNotDisturb(boolean doNotDisturbOn)
Set DoNotDisturb status.
|
boolean |
SetDoNotDisturb(boolean doNotDisturbOn,
int DNDResume)
Set DoNotDisturb status with DND Snooze Duration.
|
boolean |
SetForwarding(CstaForwardingType forwardingType,
boolean activateForward,
java.lang.String forwardDN)
Set Forwarding status.
|
boolean |
SetForwarding(CstaForwardingType forwardingType,
boolean activateForward,
java.lang.String forwardDN,
int ringCount,
int ringDuration)
Set Forwarding status.
|
public CstaLogicalDevice(CstaDevice device)
device
- public boolean SetForwarding(CstaForwardingType forwardingType, boolean activateForward, java.lang.String forwardDN) throws CstaException
The Device must have at least one forwarding feature(e.g. CFB, CFV, CFDA, etc) provisioned, and it must allow update by the Application. The ring count and ring duration are not in use in this request, it is helpful when the application does not want to set them, for CFV/CFB type.
forwardingType
- the type of forwarding.activateForward
- active the forwarding or not.forwardDN
- the forward destination, must be dialable digits.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public boolean SetForwarding(CstaForwardingType forwardingType, boolean activateForward, java.lang.String forwardDN, int ringCount, int ringDuration) throws CstaException
The Device must have at least one forwarding feature(e.g. CFB, CFV, CFDA, etc) provisioned, and it must allow update by the Application. There are options to set ring count and ring duration. It is helpful to set CFDA type.
forwardingType
- the type of forwarding.activateForward
- active the forwarding or not.forwardDN
- the forward destination, must be dialable digits.ringCount
- Number of Rings.ringDuration
- Duration of one Ring.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public java.util.List<CstaForwardingData> GetForwarding() throws CstaException
The GetForwardingResponse contains a list of Forwarding data on this Device. If none of the forwarding feature is provisioned, a empty list is returned. SDK also saves the forwarding data internally if the Device is monitored.
CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public boolean SetDoNotDisturb(boolean doNotDisturbOn) throws CstaException
The Device must have DND feature provisioned.
doNotDisturbOn
- set DoNotDisturb to true or false.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public boolean SetDoNotDisturb(boolean doNotDisturbOn, int DNDResume) throws CstaException
The Device must have DND feature provisioned.
doNotDisturbOn
- set DoNotDisturb to true or false.DNDResume
- is the DND Snooze Duration that the feature shall remain active.CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public java.lang.Boolean GetDoNotDisturb() throws CstaException
CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public CstaDoNotDisturbData GetDoNotDisturbData() throws CstaException
CstaException
- An CstaException is thrown if 1) a negative response(e.g. CSTAErrorCode) is received, 2) no response is received within 9 seconds.public boolean getDoNotDisturbStatus()
public CstaDoNotDisturbData getDoNotDisturbData()
public java.util.List<CstaForwardingData> getForwardingDataList()
The forwarding data is stored in CstaDevice and is updated when a ForwardingEvent is received. Application may get the forwarding status directly from Device without sending GetForwarding request again. To use this function, Application must monitor the Device first in order to receive ForwardingEvent.
public CstaForwardingData getForwardingDataByType(CstaForwardingType type)
The forwarding data is stored in CstaDevice and is updated when a ForwardingEvent is received. Application may get the forwarding status directly from Device without sending GetForwarding request again. To use this function, Application must monitor the Device first in order to receive ForwardingEvent.
type
- the forwarding type.