/talkback_preics/src/com/google/android/marvin/talkback/ITalkBackNotificationState.aidl

http://eyes-free.googlecode.com/ · Android Interface Definition Language · 72 lines · 12 code · 7 blank · 53 comment · 0 complexity · 8537e7f1dc5e9604c9fe91fa9d0a3dd7 MD5 · raw file

  1. /*
  2. * Copyright (C) 2009 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.google.android.marvin.talkback;
  17. import java.util.List;
  18. import com.google.android.marvin.talkback.ITalkBackServiceStateChangedCallback;
  19. import com.google.android.marvin.talkback.NotificationType;
  20. /**
  21. * Provides information about the state of the cached notifications.
  22. */
  23. interface ITalkBackNotificationState {
  24. /**
  25. * Returns all notifications.
  26. *
  27. * @return All notifications.
  28. */
  29. List<String> getNotificationsAll();
  30. /**
  31. * Returns all notifications formatted for presentation.
  32. *
  33. * @param type The {@link NotificationType}.
  34. * @return The formatted string.
  35. */
  36. String getFormattedForType(in NotificationType type);
  37. /**
  38. * Returns all notifications formatted for presentation.
  39. *
  40. * @return The formatted string.
  41. */
  42. String getFormattedAll();
  43. /**
  44. * returns a summary of the notifications.
  45. *
  46. * @return The summary.
  47. */
  48. String getFormattedSummary();
  49. /**
  50. * Registers a callback to notify clients that the {@link TalkBackService} state
  51. * has changed. Clients are responsible for polling for specific data upon notification.
  52. *
  53. * @param callback The {@link ITalkBackServiceStateChangedCallback}.
  54. * @return True if the callback is added, false otherwise.
  55. */
  56. boolean registerStateChangedCallback(ITalkBackServiceStateChangedCallback callback);
  57. /**
  58. * Unregisters a callback to notify clients that the {@link TalkBackService} state
  59. * has changed.
  60. *
  61. * @param callback The {@link ITalkBackServiceStateChangedCallback}.
  62. * @return True if the callback is removed, false otherwise.
  63. */
  64. boolean unregisterStateChangedCallback(ITalkBackServiceStateChangedCallback callback);
  65. }