1 /* 2 * Copyright (C) 2017 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.usb@1.1; 18 19 import android.hardware.usb@1.0; 20 21 /** 22 * Callback object used for all the IUsb async methods which expects a result. 23 * Caller is expected to register the callback object using setCallback method 24 * to receive updates on the PortStatus. 25 */ 26 interface IUsbCallback extends @1.0::IUsbCallback { 27 /** 28 * Used to convey the current port status to the caller. 29 * Must be called either when PortState changes due to the port partner or 30 * when caller requested for the PortStatus update through queryPortStatus. 31 * 32 * @param currentPortStatus vector object of current status(PortStatus_1_1 33 * of all the typeC ports in the device. 34 * @param retval SUCCESS when the required information was enquired form 35 * kernel and the PortStatus_1_1 object was built. 36 * ERROR otherwise. 37 */ 38 oneway notifyPortStatusChange_1_1(vec<PortStatus_1_1> currentPortStatus, 39 Status retval); 40 }; 41