Added methods for searching descriptions to feedmanager

This commit is contained in:
daniel oeh 2012-10-28 14:15:14 +01:00
parent 50b02ff77e
commit 0ffc18be1a
1 changed files with 34 additions and 2 deletions

View File

@ -1344,6 +1344,38 @@ public class FeedManager {
}); });
} }
public void searchFeedItemDescription(final Context context,
final Feed feed, final String query,
FeedManager.TaskCallback callback) {
dbExec.execute(new FeedManager.Task(new Handler(), callback) {
@Override
public void execute() {
PodDBAdapter adapter = new PodDBAdapter(context);
adapter.open();
Cursor searchResult = adapter.searchItemDescriptions(feed, query);
setResult(searchResult);
adapter.close();
}
});
}
public void searchFeedItemContentEncoded(final Context context,
final Feed feed, final String query,
FeedManager.TaskCallback callback) {
dbExec.execute(new FeedManager.Task(new Handler(), callback) {
@Override
public void execute() {
PodDBAdapter adapter = new PodDBAdapter(context);
adapter.open();
Cursor searchResult = adapter.searchItemContentEncoded(feed, query);
setResult(searchResult);
adapter.close();
}
});
}
public List<Feed> getFeeds() { public List<Feed> getFeeds() {
return feeds; return feeds;
} }