1
2package com.android.quicksearchbox;
3
4import android.content.ComponentName;
5
6import java.util.Collection;
7
8/**
9 * Search source set.
10 */
11public interface Sources {
12
13    /**
14     * Gets all sources.
15     */
16    Collection<Source> getSources();
17
18    /**
19     * Gets a source by name.
20     *
21     * @return A source, or {@code null} if no source with the given name exists.
22     */
23    Source getSource(String name);
24
25    /**
26     * Gets the web search source.
27     */
28    Source getWebSearchSource();
29
30    /**
31     * Creates a new source for a specific component.
32     * @param component Name of the component to search
33     * @return a new {@code Source} corresponding to {@code component}.
34     */
35    Source createSourceFor(ComponentName component);
36
37    /**
38     * Updates the list of sources.
39     */
40    void update();
41
42}
43