/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.input.classifier@1.0;

import android.hardware.input.common@1.0::Classification;
import android.hardware.input.common@1.0::MotionEvent;

interface IInputClassifier {

  /**
   * Returns the classification for the current sequence of input events.
   */
  classify(MotionEvent event) generates (Classification classification);

  /**
   * Called by the framework to reset the HAL internal state. The reset may be called
   * to prevent an inconsistent stream of events to be sent to the HAL.
   */
  reset();

  /**
   * Called by the framework to reset the HAL internal state for a specific device.
   * The reset may be called once device reset is received by the framework.
   */
  resetDevice(int32_t deviceId);

};
