Package com.avaya.clientservices.visualvoicemail

## Interface VisualVoiceMailService

-     public interface VisualVoiceMailService

  Service interface for visual voicemail, providing visual voicemail service to retrieve and delete voicemail messages, add and remove listener, return whether the user has unread voice messages.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addListener​(VisualVoiceMailServiceListener listener)` | Adds a listener.
    `void` | `deleteMessage​(VisualVoiceMailMessage visualVoicemailMessage, VisualVoiceMailCompletionHandler completionHandler)` | Delete visual voicemail message.
    `Capability` | `getDeleteMessagesCapability()` | Returns a `Capability` object that indicates if the visual voicemail messages can be deleted.
    `Capability` | `getRetrieveMessagesCapability()` | Returns a `Capability` object that indicates if visual voicemail messages can be retrieved from the server.
    `int` | `getUnreadMessageCount()` | How many unread visual voicemail messages does the user have?
    `boolean` | `hasUnreadMessages()` | Does the user have any unread voicemail messages?
    `boolean` | `isServiceAvailable()` | Is the visual voicemail service available? This return value is closely connected with capabilities - if the service is not running, usually all of the capabilities related to the service won't be allowed.
    `void` | `removeListener​(VisualVoiceMailServiceListener listener)` | Removes a listener.
    `void` | `retrieveAllMessages​(DataRetrievalWatcher<VisualVoiceMailMessage> dataRetrievalWatcher)` | Retrieve visual voicemail messages for the currently logged in user and watches for changes to this collection.

- - ### Method Detail

    - #### addListener

          void addListener​(VisualVoiceMailServiceListener listener)

      Adds a listener.
      Parameters:
        `listener` - Listener instance to be added.

    - #### removeListener

          void removeListener​(VisualVoiceMailServiceListener listener)

      Removes a listener.
      Parameters:
        `listener` - Listener instance to be removed.

    - #### isServiceAvailable

          boolean isServiceAvailable()

      Is the visual voicemail service available? This return value is closely connected with capabilities - if the service is not running, usually all of the capabilities related to the service won't be allowed.
      Returns:
        True if the visual voicemail service is available.

    - #### retrieveAllMessages

          void retrieveAllMessages​(DataRetrievalWatcher<VisualVoiceMailMessage> dataRetrievalWatcher)

      Retrieve visual voicemail messages for the currently logged in user and watches for changes to this collection.

      This method retrieves the dynamically-updated collection of visual voicemail messages that are associated with the currently logged in user. Normally the client application will only need to call this method once to install a watcher object to monitor the initial download of visual voicemail messages and then continue to watch for updates to the collection.

      Parameters:
        `dataRetrievalWatcher` - A `DataRetrievalWatcher` object, created by the application, to track the progress of the requested operation.

    - #### deleteMessage

          void deleteMessage​(VisualVoiceMailMessage visualVoicemailMessage,
                             VisualVoiceMailCompletionHandler completionHandler)

      Delete visual voicemail message.
      Parameters:
        `visualVoicemailMessage` - The `VisualVoiceMailMessage` to be deleted.
        `completionHandler` - `VisualVoiceMailCompletionHandler` for this operation.

    - #### hasUnreadMessages

          boolean hasUnreadMessages()

      Does the user have any unread voicemail messages?
      Returns:
        True if user has unread voice messages.

    - #### getUnreadMessageCount

          int getUnreadMessageCount()

      How many unread visual voicemail messages does the user have?
      Returns:
        The unread message count.

    - #### getRetrieveMessagesCapability

          Capability getRetrieveMessagesCapability()

      Returns a `Capability` object that indicates if visual voicemail messages can be retrieved from the server. This capability is allowed when the visual voicemail service is online (has an active connection to the server).
      Returns:
        A `Capability` object that indicates if visual voicemail messages can be retrieved from the server.

    - #### getDeleteMessagesCapability

          Capability getDeleteMessagesCapability()

      Returns a `Capability` object that indicates if the visual voicemail messages can be deleted.
      Returns:
        A `Capability` object that indicates if the visual voicemail messages can be deleted.