1*4d7e907cSAndroid Build Coastguard Worker/* 2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2018 The Android Open Source Project 3*4d7e907cSAndroid Build Coastguard Worker * 4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*4d7e907cSAndroid Build Coastguard Worker * 8*4d7e907cSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*4d7e907cSAndroid Build Coastguard Worker * 10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License. 15*4d7e907cSAndroid Build Coastguard Worker */ 16*4d7e907cSAndroid Build Coastguard Worker 17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected]; 18*4d7e907cSAndroid Build Coastguard Worker 19*4d7e907cSAndroid Build Coastguard Workerimport [email protected]::IUsb; 20*4d7e907cSAndroid Build Coastguard Worker 21*4d7e907cSAndroid Build Coastguard Worker/** 22*4d7e907cSAndroid Build Coastguard Worker * The setCallback function in V1_0 is used to register the V1_2 23*4d7e907cSAndroid Build Coastguard Worker * IUsbCallback object as well. The implementation can use the 24*4d7e907cSAndroid Build Coastguard Worker * castFrom method to cast the IUsbCallback object. 25*4d7e907cSAndroid Build Coastguard Worker */ 26*4d7e907cSAndroid Build Coastguard Workerinterface IUsb extends @1.1::IUsb { 27*4d7e907cSAndroid Build Coastguard Worker /** 28*4d7e907cSAndroid Build Coastguard Worker * When supportsEnableContaminantPresenceDetection is true, 29*4d7e907cSAndroid Build Coastguard Worker * enableContaminantPresenceDetection enables/disables contaminant 30*4d7e907cSAndroid Build Coastguard Worker * presence detection algorithm. Calling enableContaminantPresenceDetection 31*4d7e907cSAndroid Build Coastguard Worker * when supportsEnableContaminantPresenceDetection is false does 32*4d7e907cSAndroid Build Coastguard Worker * not have any effect. 33*4d7e907cSAndroid Build Coastguard Worker * Change in contantaminant presence status should notify should 34*4d7e907cSAndroid Build Coastguard Worker * be notified to the client via notifyPortStatusChange_1_2 through 35*4d7e907cSAndroid Build Coastguard Worker * PortStatus. 36*4d7e907cSAndroid Build Coastguard Worker * 37*4d7e907cSAndroid Build Coastguard Worker * @param portName name of the port. 38*4d7e907cSAndroid Build Coastguard Worker * @param enable true Enable contaminant presence detection algorithm. 39*4d7e907cSAndroid Build Coastguard Worker * false Disable contaminant presence detection algorithm. 40*4d7e907cSAndroid Build Coastguard Worker */ 41*4d7e907cSAndroid Build Coastguard Worker oneway enableContaminantPresenceDetection(string portName, bool enable); 42*4d7e907cSAndroid Build Coastguard Worker 43*4d7e907cSAndroid Build Coastguard Worker /** 44*4d7e907cSAndroid Build Coastguard Worker * When supportsEnableContaminantPresenceProtection is true, 45*4d7e907cSAndroid Build Coastguard Worker * enableContaminantPresenceProtection enables/disables contaminant 46*4d7e907cSAndroid Build Coastguard Worker * presence protection algorithm. Calling 47*4d7e907cSAndroid Build Coastguard Worker * enableContaminantPresenceProtection 48*4d7e907cSAndroid Build Coastguard Worker * when supportsEnableContaminantPresenceProtection is false does 49*4d7e907cSAndroid Build Coastguard Worker * not have any effect. 50*4d7e907cSAndroid Build Coastguard Worker * Used to enable/disable contaminant presence protection algorithm. 51*4d7e907cSAndroid Build Coastguard Worker * Enabling port protection algoritm must make the lower layers to autonomously 52*4d7e907cSAndroid Build Coastguard Worker * act on taking the corresponding preventive measure mentioned at 53*4d7e907cSAndroid Build Coastguard Worker * ContaminantProtectionModes when contaminant is detected on the USB Port. 54*4d7e907cSAndroid Build Coastguard Worker * Calling this method with enable set to true must set to contaminantProtectionEnabled 55*4d7e907cSAndroid Build Coastguard Worker * to true upon success and vice versa. 56*4d7e907cSAndroid Build Coastguard Worker * currentContaminantProtectionMode should be updated whenever there is a 57*4d7e907cSAndroid Build Coastguard Worker * change in the status of contaminant presence protection algorithm. 58*4d7e907cSAndroid Build Coastguard Worker * 59*4d7e907cSAndroid Build Coastguard Worker * @param portName name of the port. 60*4d7e907cSAndroid Build Coastguard Worker * @param enable true Reduce capabilities of the port to protect port 61*4d7e907cSAndroid Build Coastguard Worker * from damage due to contaminant presence. 62*4d7e907cSAndroid Build Coastguard Worker * false No action is taken upon contaminant presence. 63*4d7e907cSAndroid Build Coastguard Worker */ 64*4d7e907cSAndroid Build Coastguard Worker oneway enableContaminantPresenceProtection(string portName, bool enable); 65*4d7e907cSAndroid Build Coastguard Worker}; 66