aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tv/data/epg/EpgReader.java
diff options
context:
space:
mode:
authorNick Chalko <nchalko@google.com>2017-05-09 14:07:44 -0700
committerNick Chalko <nchalko@google.com>2017-05-10 09:49:18 -0700
commit0550a7221be0581b0bd421a9d70400ff8699a6e7 (patch)
tree14d9836ff9283690321c166560ee3450792236ad /src/com/android/tv/data/epg/EpgReader.java
parent430c2be3b91676005fdd243553e38acff8dfc3de (diff)
downloadTV-0550a7221be0581b0bd421a9d70400ff8699a6e7.tar.gz
hash 550cbec17259717c5453f6be1eb05736ba10ef1d Bug: 37849928 Test: tested on vendor branch Change-Id: I82190481d2bcef2b89e78414b6b92ed97720749d Merged-In: I4199ec04cacb4a78be58b85302a39d917658dc28
Diffstat (limited to 'src/com/android/tv/data/epg/EpgReader.java')
-rw-r--r--src/com/android/tv/data/epg/EpgReader.java29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/com/android/tv/data/epg/EpgReader.java b/src/com/android/tv/data/epg/EpgReader.java
index 4f3b6f52..95cd933e 100644
--- a/src/com/android/tv/data/epg/EpgReader.java
+++ b/src/com/android/tv/data/epg/EpgReader.java
@@ -22,9 +22,10 @@ import android.support.annotation.WorkerThread;
import com.android.tv.data.Channel;
import com.android.tv.data.Lineup;
import com.android.tv.data.Program;
-import com.android.tv.dvr.SeriesInfo;
+import com.android.tv.dvr.data.SeriesInfo;
import java.util.List;
+import java.util.Map;
/**
* An interface used to retrieve the EPG data. This class should be used in worker thread.
@@ -43,21 +44,37 @@ public interface EpgReader {
long getEpgTimestamp();
/**
- * Returns the channels list.
+ * Returns the lineups list.
+ */
+ List<Lineup> getLineups(@NonNull String postalCode);
+
+ /**
+ * Returns the list of channel numbers (unsorted) for the given lineup. The result is used to
+ * choose the most appropriate lineup among others by comparing the channel numbers of the
+ * existing channels on the device.
+ */
+ List<String> getChannelNumbers(@NonNull String lineupId);
+
+ /**
+ * Returns the list of channels for the given lineup. The returned channels should map into the
+ * existing channels on the device. This method is usually called after selecting the lineup.
*/
List<Channel> getChannels(@NonNull String lineupId);
/**
- * Returns the lineups list.
+ * Returns the programs for the given channel. Must call {@link #getChannels(String)}
+ * beforehand. Note that the {@code Program} doesn't have valid program ID because it's not
+ * retrieved from TvProvider.
*/
- List<Lineup> getLineups(@NonNull String postalCode);
+ List<Program> getPrograms(long channelId);
/**
- * Returns the programs for the given channel. The result is sorted by the start time.
+ * Returns the programs for the given channels.
* Note that the {@code Program} doesn't have valid program ID because it's not retrieved from
* TvProvider.
+ * This method is only used to get programs for a short duration typically.
*/
- List<Program> getPrograms(long channelId);
+ Map<Long, List<Program>> getPrograms(List<Long> channelIds, long duration);
/**
* Returns the series information for the given series ID.