2019-08-02 01:28:33 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package android.hardware.tv.tuner@1.0;
|
|
|
|
|
2019-08-16 03:57:08 +02:00
|
|
|
import IDemux;
|
|
|
|
import IDescrambler;
|
2019-08-02 01:28:33 +02:00
|
|
|
import IFrontend;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Top level interface to manage Frontend, Demux and Decrambler hardware
|
|
|
|
* resouces which are needed for Android TV.
|
|
|
|
*/
|
|
|
|
interface ITuner {
|
|
|
|
/**
|
|
|
|
* Get Frontend IDs
|
|
|
|
*
|
|
|
|
* It is used by the client to get all available frontends' IDs.
|
|
|
|
*
|
|
|
|
* @return result Result status of the operation.
|
|
|
|
* SUCCESS if successful,
|
|
|
|
* UNKNOWN_ERROR if tuning failed for other reasons.
|
|
|
|
* @return frontendIds an array of FrontendId for the available frontends.
|
|
|
|
*/
|
|
|
|
getFrontendIds() generates (Result result, vec<FrontendId> frontendIds);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new instance of Frontend given a frontendId.
|
|
|
|
*
|
|
|
|
* It is used by the client to create a frontend instance.
|
|
|
|
*
|
2019-08-23 19:31:21 +02:00
|
|
|
* @param frontendId the id of the frontend to be opened.
|
2019-08-02 01:28:33 +02:00
|
|
|
* @return result Result status of the operation.
|
|
|
|
* SUCCESS if successful,
|
|
|
|
* UNKNOWN_ERROR if creation failed for other reasons.
|
|
|
|
* @return frontend the newly created frontend interface.
|
|
|
|
*/
|
|
|
|
openFrontendById(FrontendId frontendId)
|
|
|
|
generates (Result result, IFrontend frontend);
|
|
|
|
|
2019-08-16 03:57:08 +02:00
|
|
|
/**
|
|
|
|
* Create a new instance of Demux.
|
|
|
|
*
|
|
|
|
* It is used by the client to create a Demux instance.
|
|
|
|
*
|
|
|
|
* @return result Result status of the operation.
|
|
|
|
* SUCCESS if successful,
|
|
|
|
* UNKNOWN_ERROR if creation failed for other reasons.
|
|
|
|
* @return demuxId newly created demux id.
|
|
|
|
* @return demux the newly created demux interface.
|
|
|
|
*/
|
|
|
|
openDemux()
|
|
|
|
generates (Result result, DemuxId demuxId, IDemux demux);
|
2019-08-02 01:28:33 +02:00
|
|
|
|
2019-08-16 03:57:08 +02:00
|
|
|
/**
|
|
|
|
* Create a new instance of Descrambler.
|
|
|
|
*
|
|
|
|
* It is used by the client to create a Descrambler instance.
|
|
|
|
*
|
|
|
|
* @return result Result status of the operation.
|
|
|
|
* SUCCESS if successful,
|
|
|
|
* UNKNOWN_ERROR if creation failed for other reasons.
|
|
|
|
* @return descrambler the newly created descrambler interface.
|
|
|
|
*/
|
|
|
|
openDescrambler()
|
|
|
|
generates (Result result, IDescrambler descrambler);
|
|
|
|
};
|