IHdmiControlService.aidl revision bdf27fbf746bee11430c4db2ea6dfd026bae77fe
1/*
2 * Copyright (C) 2014 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.hdmi;
18
19import android.hardware.hdmi.HdmiDeviceInfo;
20import android.hardware.hdmi.HdmiPortInfo;
21import android.hardware.hdmi.IHdmiControlCallback;
22import android.hardware.hdmi.IHdmiDeviceEventListener;
23import android.hardware.hdmi.IHdmiHotplugEventListener;
24import android.hardware.hdmi.IHdmiInputChangeListener;
25import android.hardware.hdmi.IHdmiMhlVendorCommandListener;
26import android.hardware.hdmi.IHdmiRecordListener;
27import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener;
28import android.hardware.hdmi.IHdmiVendorCommandListener;
29
30import java.util.List;
31
32/**
33 * Binder interface that clients running in the application process
34 * will use to perform HDMI-CEC features by communicating with other devices
35 * on the bus.
36 *
37 * @hide
38 */
39interface IHdmiControlService {
40    int[] getSupportedTypes();
41    HdmiDeviceInfo getActiveSource();
42    void oneTouchPlay(IHdmiControlCallback callback);
43    void queryDisplayStatus(IHdmiControlCallback callback);
44    void addHotplugEventListener(IHdmiHotplugEventListener listener);
45    void removeHotplugEventListener(IHdmiHotplugEventListener listener);
46    void addDeviceEventListener(IHdmiDeviceEventListener listener);
47    void deviceSelect(int deviceId, IHdmiControlCallback callback);
48    void portSelect(int portId, IHdmiControlCallback callback);
49    void sendKeyEvent(int deviceType, int keyCode, boolean isPressed);
50    List<HdmiPortInfo> getPortInfo();
51    boolean canChangeSystemAudioMode();
52    boolean getSystemAudioMode();
53    void setSystemAudioMode(boolean enabled, IHdmiControlCallback callback);
54    void addSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener);
55    void removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener);
56    void setArcMode(boolean enabled);
57    void setProhibitMode(boolean enabled);
58    void setSystemAudioVolume(int oldIndex, int newIndex, int maxIndex);
59    void setSystemAudioMute(boolean mute);
60    void setInputChangeListener(IHdmiInputChangeListener listener);
61    List<HdmiDeviceInfo> getInputDevices();
62    List<HdmiDeviceInfo> getDeviceList();
63    void sendVendorCommand(int deviceType, int targetAddress, in byte[] params,
64            boolean hasVendorId);
65    void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType);
66    void sendStandby(int deviceType, int deviceId);
67    void setHdmiRecordListener(IHdmiRecordListener callback);
68    void startOneTouchRecord(int recorderAddress, in byte[] recordSource);
69    void stopOneTouchRecord(int recorderAddress);
70    void startTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource);
71    void clearTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource);
72    void sendMhlVendorCommand(int portId, int offset, int length, in byte[] data);
73    void addHdmiMhlVendorCommandListener(IHdmiMhlVendorCommandListener listener);
74}
75