/**
 * Copyright (C) 2017 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.radio.deprecated@1.0;

import IOemHookResponse;
import IOemHookIndication;

/**
 * This interface has APIs for OEM-specific use-cases.
 * USE OF THIS INTERFACE IS DISCOURATED. IT IS PRESENT ONLY FOR BACKWARD COMPATIBILITY AND WILL BE
 * REMOVED IN O (ATTEMPTING TO REMOVE IT IN O, BUT IF NOT IN O WILL BE REMOVED IN P).
 * ALSO NOTE THAT FRAMEWORK EXPECTS THE SERVICE IMPLEMENTING THIS INTERFACE TO RESIDE
 * IN THE SAME PROCESS AS IRADIO SERVICE.
 */
interface IOemHook {
    /**
     * Set response functions for oem hook requests & oem hook indications.
     *
     * @param oemHookResponse Object containing response functions
     * @param oemHookIndication Object containing oem hook indications
     */
    setResponseFunctions(IOemHookResponse oemHookResponse, IOemHookIndication oemHookIndication);

    /**
     * This request passes raw byte arrays between framework and vendor code.
     *
     * @param serial Serial number of request.
     * @param data data passed as raw bytes
     *
     * Response function is IOemHookResponse.sendRequestRawResponse()
     */
    oneway sendRequestRaw(int32_t serial, vec<uint8_t> data);

    /**
     * This request passes strings between framework and vendor code.
     *
     * @param serial Serial number of request.
     * @param data data passed as strings
     *
     * Response function is IOemHookResponse.sendRequestStringsResponse()
     */
    oneway sendRequestStrings(int32_t serial, vec<string> data);
};