1 /*
2  * Copyright 2019 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 android.media.tv.tuner.frontend;
18 
19 import android.annotation.SystemApi;
20 
21 /**
22  * DVBT Capabilities.
23  *
24  * @hide
25  */
26 @SystemApi
27 public class DvbtFrontendCapabilities extends FrontendCapabilities {
28     private final int mTransmissionModeCap;
29     private final int mBandwidthCap;
30     private final int mConstellationCap;
31     private final int mCodeRateCap;
32     private final int mHierarchyCap;
33     private final int mGuardIntervalCap;
34     private final boolean mIsT2Supported;
35     private final boolean mIsMisoSupported;
36 
DvbtFrontendCapabilities(int transmissionModeCap, int bandwidthCap, int constellationCap, int codeRateCap, int hierarchyCap, int guardIntervalCap, boolean isT2Supported, boolean isMisoSupported)37     private DvbtFrontendCapabilities(int transmissionModeCap, int bandwidthCap,
38             int constellationCap, int codeRateCap, int hierarchyCap, int guardIntervalCap,
39             boolean isT2Supported, boolean isMisoSupported) {
40         mTransmissionModeCap = transmissionModeCap;
41         mBandwidthCap = bandwidthCap;
42         mConstellationCap = constellationCap;
43         mCodeRateCap = codeRateCap;
44         mHierarchyCap = hierarchyCap;
45         mGuardIntervalCap = guardIntervalCap;
46         mIsT2Supported = isT2Supported;
47         mIsMisoSupported = isMisoSupported;
48     }
49 
50     /**
51      * Gets transmission mode capability.
52      */
53     @DvbtFrontendSettings.TransmissionMode
getTransmissionModeCapability()54     public int getTransmissionModeCapability() {
55         return mTransmissionModeCap;
56     }
57     /**
58      * Gets bandwidth capability.
59      */
60     @DvbtFrontendSettings.Bandwidth
getBandwidthCapability()61     public int getBandwidthCapability() {
62         return mBandwidthCap;
63     }
64     /**
65      * Gets constellation capability.
66      */
67     @DvbtFrontendSettings.Constellation
getConstellationCapability()68     public int getConstellationCapability() {
69         return mConstellationCap;
70     }
71     /**
72      * Gets code rate capability.
73      */
74     @DvbtFrontendSettings.CodeRate
getCodeRateCapability()75     public int getCodeRateCapability() {
76         return mCodeRateCap;
77     }
78     /**
79      * Gets hierarchy capability.
80      */
81     @DvbtFrontendSettings.Hierarchy
getHierarchyCapability()82     public int getHierarchyCapability() {
83         return mHierarchyCap;
84     }
85     /**
86      * Gets guard interval capability.
87      */
88     @DvbtFrontendSettings.GuardInterval
getGuardIntervalCapability()89     public int getGuardIntervalCapability() {
90         return mGuardIntervalCap;
91     }
92     /**
93      * Returns whether T2 is supported.
94      */
isT2Supported()95     public boolean isT2Supported() {
96         return mIsT2Supported;
97     }
98     /**
99      * Returns whether MISO is supported.
100      */
isMisoSupported()101     public boolean isMisoSupported() {
102         return mIsMisoSupported;
103     }
104 }
105