com.avaya.deskphoneservices

## Interface DeskPhoneService

-     public interface DeskPhoneService

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.avaya.clientservices.media.AudioInterface` | `getAudioInterface()` Get a reference to an object that wraps `AudioInterface` and handles Transducer LED buttons
    `HandsetManager` | `getHandsetManager()` Get a reference to the object that keeps track of off-hook handsets.
    `boolean` | `isActiveSdkPhoneApp()` Returns if executing app is running as active sdk phone app on platform.
    `boolean` | `isSpacesCallActive()` Get spaces call status
    `void` | `onReloadConfiguration()` Sends reload configuration event to Desk phone platform.
    `void` | `onRemoteReboot()` Sends reboot event to Desk phone platform.
    `void` | `pauseConfigurationEvents()` Pause the configuration event notifications.
    `void` | `resumeConfigurationEvents()` Resume the configuration event notifications.
    `void` | `sendServiceStateChange(DeskPhoneServiceType service, ServiceStatus status, com.avaya.clientservices.user.RegistrationError reason, boolean retry)` Provides service registration status to Desk phone platform.
    `void` | `sendServiceStateChange(DeskPhoneServiceType service, ServiceStatus status, java.lang.String reason, boolean retry)`
    `void` | `setSpacesCallActive(boolean isActive)` Set spaces call status
    `void` | `supportVisualAlerting4Features(boolean supportVisualAlerting4Features)` Set or unset support for visual alerting of calls received via ATS features LED buttons
    `void` | `updateCommunicationsClient(com.avaya.clientservices.client.Client client)` Update the communications client reference in case if client is recreated at run time by the application after DeskPhoneService is initialized.

- - ### Method Detail

    - #### updateCommunicationsClient

          void updateCommunicationsClient(com.avaya.clientservices.client.Client client)

      Update the communications client reference in case if client is recreated at run time by the application after DeskPhoneService is initialized. DeskPhoneService internally relies on Communications package and uses Client reference to subscribe to Communications package.
      Parameters:
        `client` - Client SDK's `Client`

    - #### sendServiceStateChange

          void sendServiceStateChange(@NonNull
                                      DeskPhoneServiceType service,
                                      @NonNull
                                      ServiceStatus status,
                                      @NonNull
                                      com.avaya.clientservices.user.RegistrationError reason,
                                      boolean retry)

      Provides service registration status to Desk phone platform. By default Desk phone services processes service status and no app work required. If default behaviour is disabled in
      Parameters:
        `service` - Service = SIP, UL (For non-VoIP services using Unified Login)
        `status` - SUCCESS / FAIL
        `reason` - Detailed reason `ServiceReasonCode`
        `retry` - If service continues to retry. true / false;

    - #### sendServiceStateChange

          void sendServiceStateChange(@NonNull
                                      DeskPhoneServiceType service,
                                      @NonNull
                                      ServiceStatus status,
                                      @NonNull
                                      java.lang.String reason,
                                      boolean retry)

    - #### pauseConfigurationEvents

          void pauseConfigurationEvents()
                                 throws java.lang.IllegalStateException

      Pause the configuration event notifications. Configuration events are service impacting. Application can pause the configuration events during important use case flows like calls, amm recording etc. Desk phone services will not forward configuration events to app in paused state. Application to resume configuration events at the end of use case flow. Desk phone services ensures configuration events are notified to application after resume.
      Throws:
        `java.lang.IllegalStateException` - If configuration events can not be paused in current state.

    - #### resumeConfigurationEvents

          void resumeConfigurationEvents()
                                  throws java.lang.IllegalStateException

      Resume the configuration event notifications. Configuration events are service impacting. Application can pause the configuration events during important use case flows like calls, amm recording etc. Desk phone services will not forward configuration events to app in paused state. Application to resume configuration events at the end of use case flow. Desk phone services ensures configuration events are notified to application after resume.
      Throws:
        `java.lang.IllegalStateException` - If configuration events can not be paused in current state.

    - #### onRemoteReboot

          void onRemoteReboot()

      Sends reboot event to Desk phone platform. Application to invoke this method after processing Avaya CCS Profile admin event - reboot. By default Desk phone services handles remote reboot event from communications package. If default processing is disabled in initialise method then only this method is invoked by apps.

    - #### onReloadConfiguration

          void onReloadConfiguration()

      Sends reload configuration event to Desk phone platform. Application to invoke this method after processing Avaya CCS Profile admin event - reload. By default Desk phone services handles reload config from communications package. If default processing is disabled in initialise method then only this method is invoked by apps.

    - #### isActiveSdkPhoneApp

          boolean isActiveSdkPhoneApp()

      Returns if executing app is running as active sdk phone app on platform.
      Returns:
        Whether the executing application is the active ClientSDK phone application or not.

    - #### getHandsetManager

          @NonNull
          HandsetManager getHandsetManager()

      Get a reference to the object that keeps track of off-hook handsets.
      Returns:
        The `HandsetManager` instance.

    - #### getAudioInterface

          @NonNull
          com.avaya.clientservices.media.AudioInterface getAudioInterface()

      Get a reference to an object that wraps `AudioInterface` and handles Transducer LED buttons
      Returns:
        The `AudioInterface` instance

    - #### supportVisualAlerting4Features

          void supportVisualAlerting4Features(boolean supportVisualAlerting4Features)

      Set or unset support for visual alerting of calls received via ATS features LED buttons
      Parameters:
        `supportVisualAlerting4Features` - - inidcates whether isual alerting of calls received via ATS features is supported or not

    - #### isSpacesCallActive

          boolean isSpacesCallActive()

      Get spaces call status
      Returns:
        true if spaces call is active else false

    - #### setSpacesCallActive

          void setSpacesCallActive(boolean isActive)

      Set spaces call status
      Parameters:
        `isActive` - = true if spaces call is active else false