• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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.IntRange;
20 import android.annotation.NonNull;
21 import android.annotation.SystemApi;
22 
23 /**
24  * Scan callback.
25  *
26  * @hide
27  */
28 @SystemApi
29 public interface ScanCallback {
30 
31     /** Scan locked the signal. */
onLocked()32     void onLocked();
33 
34     /** Scan stopped. */
onScanStopped()35     void onScanStopped();
36 
37     /** scan progress percent (0..100) */
onProgress(@ntRangefrom = 0, to = 100) int percent)38     void onProgress(@IntRange(from = 0, to = 100) int percent);
39 
40     /** Signal frequencies in Hertz */
onFrequenciesReported(@onNull int[] frequency)41     void onFrequenciesReported(@NonNull int[] frequency);
42 
43     /** Symbols per second */
onSymbolRatesReported(@onNull int[] rate)44     void onSymbolRatesReported(@NonNull int[] rate);
45 
46     /** Locked Plp Ids for DVBT2 frontend. */
onPlpIdsReported(@onNull int[] plpIds)47     void onPlpIdsReported(@NonNull int[] plpIds);
48 
49     /** Locked group Ids for DVBT2 frontend. */
onGroupIdsReported(@onNull int[] groupIds)50     void onGroupIdsReported(@NonNull int[] groupIds);
51 
52     /** Stream Ids. */
onInputStreamIdsReported(@onNull int[] inputStreamIds)53     void onInputStreamIdsReported(@NonNull int[] inputStreamIds);
54 
55     /** Locked signal standard for DVBS. */
onDvbsStandardReported(@vbsFrontendSettings.Standard int dvbsStandard)56     void onDvbsStandardReported(@DvbsFrontendSettings.Standard int dvbsStandard);
57 
58     /** Locked signal standard. for DVBT */
onDvbtStandardReported(@vbtFrontendSettings.Standard int dvbtStandard)59     void onDvbtStandardReported(@DvbtFrontendSettings.Standard int dvbtStandard);
60 
61     /** Locked signal SIF standard for Analog. */
onAnalogSifStandardReported(@nalogFrontendSettings.SifStandard int sif)62     void onAnalogSifStandardReported(@AnalogFrontendSettings.SifStandard int sif);
63 
64     /** PLP status in a tuned frequency band for ATSC3 frontend. */
onAtsc3PlpInfosReported(@onNull Atsc3PlpInfo[] atsc3PlpInfos)65     void onAtsc3PlpInfosReported(@NonNull Atsc3PlpInfo[] atsc3PlpInfos);
66 
67     /** Frontend hierarchy. */
onHierarchyReported(@vbtFrontendSettings.Hierarchy int hierarchy)68     void onHierarchyReported(@DvbtFrontendSettings.Hierarchy int hierarchy);
69 
70     /** Frontend signal type. */
onSignalTypeReported(@nalogFrontendSettings.SignalType int signalType)71     void onSignalTypeReported(@AnalogFrontendSettings.SignalType int signalType);
72 
73     /** Frontend modulation reported. */
onModulationReported(@rontendStatus.FrontendModulation int modulation)74     default void onModulationReported(@FrontendStatus.FrontendModulation int modulation) {}
75 
76     /** Frontend scan message priority reported. */
onPriorityReported(boolean isHighPriority)77     default void onPriorityReported(boolean isHighPriority) {}
78 
79     /** DVBC Frontend Annex reported. */
onDvbcAnnexReported(@vbcFrontendSettings.Annex int dvbcAnnex)80     default void onDvbcAnnexReported(@DvbcFrontendSettings.Annex int dvbcAnnex) {}
81 }
82