• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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.extension.scan;
18 
19 import android.os.Bundle;
20 
21 /**
22  * @hide
23  */
24 interface IScanSession {
25     // Start a service scan.
startScan(int broadcastType, String countryCode, String operator, in int[] frequency, String scanType, String languageCode, in Bundle optionalScanParams)26     int startScan(int broadcastType, String countryCode, String operator, in int[] frequency,
27         String scanType, String languageCode, in Bundle optionalScanParams);
28     // Reset the scan information held in TIS.
resetScan()29     int resetScan();
30     // Cancel scan.
cancelScan()31     int cancelScan();
32 
33     // Get available interface for created ScanExtension interface.
getAvailableExtensionInterfaceNames()34     String[] getAvailableExtensionInterfaceNames();
35     // Get extension interface for Scan.
getExtensionInterface(String name)36     IBinder getExtensionInterface(String name);
37 
38     // Clear the results of the service scan from the service database.
clearServiceList(in Bundle optionalClearParams)39     int clearServiceList(in Bundle optionalClearParams);
40     // Store the results of the service scan from the service database.
storeServiceList()41     int storeServiceList();
42     // Get a service information specified by the service information ID.
getServiceInfo(String serviceInfoId, in String[] keys)43     Bundle getServiceInfo(String serviceInfoId, in String[] keys);
44     // Get a service information ID list.
getServiceInfoIdList()45     String[] getServiceInfoIdList();
46     // Get a list of service info by the filter.
getServiceInfoList(in Bundle filterInfo, in String[] keys)47     Bundle getServiceInfoList(in Bundle filterInfo, in String[] keys);
48     // Update the service information.
updateServiceInfo(in Bundle serviceInfo)49     int updateServiceInfo(in Bundle serviceInfo);
50     // Updates the service information for the specified service information ID in array list.
updateServiceInfoByList(in Bundle[] serviceInfo)51     int updateServiceInfoByList(in Bundle[] serviceInfo);
52 
53     /* DVBI specific functions */
54     // Get all of the serviceLists, parsed from Local TV storage, Broadcast, USB file discovery.
getServiceLists()55     Bundle getServiceLists();
56     // Users choose one serviceList from the serviceLists, and install the services.
setServiceList(int serviceListRecId)57     int setServiceList(int serviceListRecId);
58     // Get all of the packageData, parsed from the selected serviceList XML.
getPackageData()59     Bundle getPackageData();
60     // Choose the package using package id and install the corresponding services.
setPackage(String packageId)61     int setPackage(String packageId);
62     // Get all of the countryRegionData, parsed from the selected serviceList XML.
getCountryRegionData()63     Bundle getCountryRegionData();
64     // Choose the countryRegion using countryRegion id, and install the corresponding services.
setCountryRegion(String regionId)65     int setCountryRegion(String regionId);
66     // Get all of the regionData, parsed from the selected serviceList XML.
getRegionData()67     Bundle getRegionData();
68     // Choose the region using the regionData id, and install the corresponding services.
setRegion(String regionId)69     int setRegion(String regionId);
70 
71     // Get unique session token for the scan.
getSessionToken()72     String getSessionToken();
73     // Release scan resource, the register listener will be released.
release()74     int release();
75 }
76