• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.filter;
18 
19 import android.annotation.SystemApi;
20 
21 /**
22  * Filter event sent from {@link Filter} objects with section type.
23  *
24  * @hide
25  */
26 @SystemApi
27 public class SectionEvent extends FilterEvent {
28     private final int mTableId;
29     private final int mVersion;
30     private final int mSectionNum;
31     private final int mDataLength;
32 
33     // This constructor is used by JNI code only
SectionEvent(int tableId, int version, int sectionNum, int dataLength)34     private SectionEvent(int tableId, int version, int sectionNum, int dataLength) {
35         mTableId = tableId;
36         mVersion = version;
37         mSectionNum = sectionNum;
38         mDataLength = dataLength;
39     }
40 
41     /**
42      * Gets table ID of filtered data.
43      */
getTableId()44     public int getTableId() {
45         return mTableId;
46     }
47 
48     /**
49      * Gets version number of filtered data.
50      */
getVersion()51     public int getVersion() {
52         return mVersion;
53     }
54 
55     /**
56      * Gets section number of filtered data.
57      */
getSectionNumber()58     public int getSectionNumber() {
59         return mSectionNum;
60     }
61 
62     /**
63      * Gets data size in bytes of filtered data.
64      */
getDataLength()65     public int getDataLength() {
66         return mDataLength;
67     }
68 }
69