1/*
2 * Copyright 2016 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
17package android.hardware.ir@1.0;
18
19interface IConsumerIr {
20    /**
21     * transmit() sends an IR pattern at a given carrierFreq.
22     *
23     * The pattern is alternating series of carrier on and off periods measured in
24     * microseconds. The carrier should be turned off at the end of a transmit
25     * even if there are and odd number of entries in the pattern array.
26     *
27     * This call must return when the transmit is complete or encounters an error.
28     *
29     * returns: true on success, false on error.
30     */
31    transmit(int32_t carrierFreq, vec<int32_t> pattern) generates (bool success);
32
33    /**
34     * getCarrierFreqs() enumerates which frequencies the IR transmitter supports.
35     *
36     * returns: On success, true and a vector of all supported frequency
37     * ranges. On error, returns false.
38     */
39    getCarrierFreqs() generates (bool success, vec<ConsumerIrFreqRange> ranges);
40};
41