/*
 * Copyright (C) 2020 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.tetheroffload.control@1.1;

import @1.0::ITetheringOffloadCallback;
import OffloadCallbackEvent;

/**
 * Callback providing information about status of hardware management process
 * as well as providing a way to keep offloaded connections from timing out.
 */
interface ITetheringOffloadCallback extends @1.0::ITetheringOffloadCallback {
    /**
     * Called when an asynchronous event is generated by the hardware
     * management process. Implementations that report events via this callback
     * should not invoke onEvent of 1.0 HAL.
     */
    oneway onEvent_1_1(OffloadCallbackEvent event);
};
