|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISearchEngine
Performs the search.
| Method Summary | |
|---|---|
boolean |
canPerformSearch()
Checks if this engine can currently perform the search. |
boolean |
canSearchOffline()
Checks if this engine can perform an offline search. |
SearchType |
getType()
Returns the type of this engine. |
void |
init(SearchActivity owner,
int listViewId)
Sets the owner activity and initializes the engine. |
void |
passivate()
Passivates this engine. |
List<? extends Object> |
performSearch(String query)
Performs a search for tracks contained words in given query. |
void |
update(List<? extends Object> model)
Updates the list view with given model. |
| Method Detail |
|---|
SearchType getType()
void init(SearchActivity owner,
int listViewId)
owner - owner view.listViewId - the ID of the list view. Note that the list view is always
configured to layout items using the
playlist_item.xml layout.boolean canSearchOffline()
true if search can be performed offline,
false otherwise.boolean canPerformSearch()
true if search can be performed, false
otherwise.
List<? extends Object> performSearch(String query)
throws Exception
null list which will serve as a model for
GesturesListView. The method always executes in a new thread. The
method should periodically check for Thread.isInterrupted() and
terminate ASAP when interrupted.
query - the query to search for
null if interrupted. Given list must contain
thread-safe objects.
Exception - if search failed.void update(List<? extends Object> model)
GesturesListView.listener and must be able to correctly display
items returned by the performSearch(String) method.
model - the model as returned by performSearch(String).void passivate()
GesturesListView etc. Executed in handler thread.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||