PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/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 */
16package com.google.android.marvin.talkback;
17
18import java.util.List;
19import com.google.android.marvin.talkback.ITalkBackServiceStateChangedCallback;
20import com.google.android.marvin.talkback.NotificationType;
21
22/**
23 * Provides information about the state of the cached notifications.
24 */
25interface ITalkBackNotificationState {
26    /**
27     * Returns all notifications.
28     *
29     * @return All notifications.
30     */
31    List<String> getNotificationsAll();
32
33    /**
34     * Returns all notifications formatted for presentation.
35     *
36     * @param type The {@link NotificationType}.
37     * @return The formatted string.
38     */
39    String getFormattedForType(in NotificationType type);
40
41    /**
42     * Returns all notifications formatted for presentation.
43     *
44     * @return The formatted string.
45     */
46    String getFormattedAll();
47
48    /**
49     * returns a summary of the notifications.
50     *
51     * @return The summary.
52     */
53    String getFormattedSummary();
54
55    /**
56     * Registers a callback to notify clients that the {@link TalkBackService} state
57     * has changed. Clients are responsible for polling for specific data upon notification.
58     *
59     * @param callback The {@link ITalkBackServiceStateChangedCallback}.
60     * @return True if the callback is added, false otherwise.
61     */
62    boolean registerStateChangedCallback(ITalkBackServiceStateChangedCallback callback);
63
64    /**
65     * Unregisters a callback to notify clients that the {@link TalkBackService} state
66     * has changed.
67     *
68     * @param callback The {@link ITalkBackServiceStateChangedCallback}.
69     * @return True if the callback is removed, false otherwise.
70     */
71    boolean unregisterStateChangedCallback(ITalkBackServiceStateChangedCallback callback);
72}