diff options
Diffstat (limited to 'src/de/danoeh/antennapod/storage/DBReader.java')
-rw-r--r-- | src/de/danoeh/antennapod/storage/DBReader.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/storage/DBReader.java b/src/de/danoeh/antennapod/storage/DBReader.java index 28ab3d939..a5a4c8cd4 100644 --- a/src/de/danoeh/antennapod/storage/DBReader.java +++ b/src/de/danoeh/antennapod/storage/DBReader.java @@ -76,6 +76,27 @@ public final class DBReader { } /** + * Returns a list with the download URLs of all feeds. + * @param context A context that is used for opening the database connection. + * @return A list of Strings with the download URLs of all feeds. + * */ + public static List<String> getFeedListDownloadUrls(final Context context) { + PodDBAdapter adapter = new PodDBAdapter(context); + List<String> result = new ArrayList<String>(); + adapter.open(); + Cursor feeds = adapter.getFeedCursorDownloadUrls(); + if (feeds.moveToFirst()) { + do { + result.add(feeds.getString(1)); + } while (feeds.moveToNext()); + } + feeds.close(); + adapter.close(); + + return result; + } + + /** * Returns a list of 'expired Feeds', i.e. Feeds that have not been updated for a certain amount of time. * * @param context A context that is used for opening a database connection. |