1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.tv.data; 18 19 import android.support.annotation.IntDef; 20 21 import java.lang.annotation.Retention; 22 import java.lang.annotation.RetentionPolicy; 23 24 /** 25 * A class that represents a lineup. 26 */ 27 public class Lineup { 28 /** 29 * The ID of this lineup. 30 */ 31 public final String id; 32 33 /** 34 * The type associated with this lineup. 35 */ 36 public final int type; 37 38 /** 39 * The human readable name associated with this lineup. 40 */ 41 public final String name; 42 43 /** 44 * Location this lineup can be found. 45 * This is a human readable description of a geographic location. 46 */ 47 public final String location; 48 49 @Retention(RetentionPolicy.SOURCE) 50 @IntDef({LINEUP_CABLE, LINEUP_SATELLITE, LINEUP_BROADCAST_DIGITAL, LINEUP_BROADCAST_ANALOG, 51 LINEUP_IPTV, LINEUP_MVPD}) 52 public @interface LineupType {} 53 54 /** 55 * Lineup type for cable. 56 */ 57 public static final int LINEUP_CABLE = 0; 58 59 /** 60 * Lineup type for satelite. 61 */ 62 public static final int LINEUP_SATELLITE = 1; 63 64 /** 65 * Lineup type for broadcast digital. 66 */ 67 public static final int LINEUP_BROADCAST_DIGITAL = 2; 68 69 /** 70 * Lineup type for broadcast analog. 71 */ 72 public static final int LINEUP_BROADCAST_ANALOG = 3; 73 74 /** 75 * Lineup type for IPTV. 76 */ 77 public static final int LINEUP_IPTV = 4; 78 79 /** 80 * Indicates the lineup is either satelite, cable or IPTV but we are not sure which specific 81 * type. 82 */ 83 public static final int LINEUP_MVPD = 5; 84 85 /** 86 * Creates a lineup. 87 */ 88 public Lineup(String id, int type, String name, String location) { 89 this.id = id; 90 this.type = type; 91 this.name = name; 92 this.location = location; 93 } 94 } 95