| 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 |
|
| 17 |
package android.hardware.hdmi; |
| 18 |
|
| 19 |
import android.hardware.hdmi.HdmiDeviceInfo; |
| 20 |
import android.hardware.hdmi.HdmiPortInfo; |
| 21 |
import android.hardware.hdmi.IHdmiCecSettingChangeListener; |
| 22 |
import android.hardware.hdmi.IHdmiCecVolumeControlFeatureListener; |
| 23 |
import android.hardware.hdmi.IHdmiControlCallback; |
| 24 |
import android.hardware.hdmi.IHdmiControlStatusChangeListener; |
| 25 |
import android.hardware.hdmi.IHdmiDeviceEventListener; |
| 26 |
import android.hardware.hdmi.IHdmiHotplugEventListener; |
| 27 |
import android.hardware.hdmi.IHdmiInputChangeListener; |
| 28 |
import android.hardware.hdmi.IHdmiMhlVendorCommandListener; |
| 29 |
import android.hardware.hdmi.IHdmiRecordListener; |
| 30 |
import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener; |
| 31 |
import android.hardware.hdmi.IHdmiVendorCommandListener; |
| 32 |
|
| 33 |
import java.util.List; |
| 34 |
|
| 35 |
/** |
| 36 |
* Binder interface that clients running in the application process |
| 37 |
* will use to perform HDMI-CEC features by communicating with other devices |
| 38 |
* on the bus. |
| 39 |
* |
| 40 |
* @hide |
| 41 |
*/ |
| 42 |
interface IHdmiControlService { |
| 43 |
int[] getSupportedTypes(); |
| 44 |
HdmiDeviceInfo getActiveSource(); |
| 45 |
void oneTouchPlay(IHdmiControlCallback callback); |
| 46 |
void toggleAndFollowTvPower(); |
| 47 |
boolean shouldHandleTvPowerKey(); |
| 48 |
void queryDisplayStatus(IHdmiControlCallback callback); |
| 49 |
void addHdmiControlStatusChangeListener(IHdmiControlStatusChangeListener listener); |
| 50 |
void removeHdmiControlStatusChangeListener(IHdmiControlStatusChangeListener listener); |
| 51 |
void addHdmiCecVolumeControlFeatureListener(IHdmiCecVolumeControlFeatureListener listener); |
| 52 |
void removeHdmiCecVolumeControlFeatureListener(IHdmiCecVolumeControlFeatureListener listener); |
| 53 |
void addHotplugEventListener(IHdmiHotplugEventListener listener); |
| 54 |
void removeHotplugEventListener(IHdmiHotplugEventListener listener); |
| 55 |
void addDeviceEventListener(IHdmiDeviceEventListener listener); |
| 56 |
void deviceSelect(int deviceId, IHdmiControlCallback callback); |
| 57 |
void portSelect(int portId, IHdmiControlCallback callback); |
| 58 |
void sendKeyEvent(int deviceType, int keyCode, boolean isPressed); |
| 59 |
void sendVolumeKeyEvent(int deviceType, int keyCode, boolean isPressed); |
| 60 |
List<HdmiPortInfo> getPortInfo(); |
| 61 |
boolean canChangeSystemAudioMode(); |
| 62 |
boolean getSystemAudioMode(); |
| 63 |
int getPhysicalAddress(); |
| 64 |
void setSystemAudioMode(boolean enabled, IHdmiControlCallback callback); |
| 65 |
void addSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener); |
| 66 |
void removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener); |
| 67 |
void setArcMode(boolean enabled); |
| 68 |
void setProhibitMode(boolean enabled); |
| 69 |
void setSystemAudioVolume(int oldIndex, int newIndex, int maxIndex); |
| 70 |
void setSystemAudioMute(boolean mute); |
| 71 |
void setInputChangeListener(IHdmiInputChangeListener listener); |
| 72 |
List<HdmiDeviceInfo> getInputDevices(); |
| 73 |
List<HdmiDeviceInfo> getDeviceList(); |
| 74 |
void powerOffRemoteDevice(int logicalAddress, int powerStatus); |
| 75 |
void powerOnRemoteDevice(int logicalAddress, int powerStatus); |
| 76 |
void askRemoteDeviceToBecomeActiveSource(int physicalAddress); |
| 77 |
void sendVendorCommand(int deviceType, int targetAddress, in byte[] params, |
| 78 |
boolean hasVendorId); |
| 79 |
void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId); |
| 80 |
void sendStandby(int deviceType, int deviceId); |
| 81 |
void setHdmiRecordListener(IHdmiRecordListener callback); |
| 82 |
void startOneTouchRecord(int recorderAddress, in byte[] recordSource); |
| 83 |
void stopOneTouchRecord(int recorderAddress); |
| 84 |
void startTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource); |
| 85 |
void clearTimerRecording(int recorderAddress, int sourceType, in byte[] recordSource); |
| 86 |
void sendMhlVendorCommand(int portId, int offset, int length, in byte[] data); |
| 87 |
void addHdmiMhlVendorCommandListener(IHdmiMhlVendorCommandListener listener); |
| 88 |
void setStandbyMode(boolean isStandbyModeOn); |
| 89 |
void reportAudioStatus(int deviceType, int volume, int maxVolume, boolean isMute); |
| 90 |
void setSystemAudioModeOnForAudioOnlySource(); |
| 91 |
boolean setMessageHistorySize(int newSize); |
| 92 |
int getMessageHistorySize(); |
| 93 |
void addCecSettingChangeListener(String name, IHdmiCecSettingChangeListener listener); |
| 94 |
void removeCecSettingChangeListener(String name, IHdmiCecSettingChangeListener listener); |
| 95 |
List<String> getUserCecSettings(); |
| 96 |
List<String> getAllowedCecSettingStringValues(String name); |
| 97 |
int[] getAllowedCecSettingIntValues(String name); |
| 98 |
String getCecSettingStringValue(String name); |
| 99 |
void setCecSettingStringValue(String name, String value); |
| 100 |
int getCecSettingIntValue(String name); |
| 101 |
void setCecSettingIntValue(String name, int value); |
| 102 |
} |