|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.ambient.activity.search.ShoutcastEngine
public final class ShoutcastEngine
Search in Shoutcast genres.
Constructor Summary | |
---|---|
ShoutcastEngine()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShoutcastEngine()
Method Detail |
---|
public boolean canSearchOffline()
ISearchEngine
canSearchOffline
in interface ISearchEngine
true
if search can be performed offline,
false
otherwise.public SearchType getType()
ISearchEngine
getType
in interface ISearchEngine
public void init(SearchActivity owner, int listViewId)
ISearchEngine
init
in interface ISearchEngine
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.public void passivate()
ISearchEngine
GesturesListView
etc. Executed in handler thread.
passivate
in interface ISearchEngine
public List<? extends Object> performSearch(String query) throws Exception
ISearchEngine
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.
performSearch
in interface ISearchEngine
query
- the query to search for
null
if interrupted. Given list must contain
thread-safe objects.
Exception
- if search failed.public void update(List<? extends Object> model)
ISearchEngine
GesturesListView.listener
and must be able to correctly display
items returned by the ISearchEngine.performSearch(String)
method.
update
in interface ISearchEngine
model
- the model as returned by ISearchEngine.performSearch(String)
.public boolean canPerformSearch()
ISearchEngine
canPerformSearch
in interface ISearchEngine
true
if search can be performed, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |