/*
 * Copyright (C) 2016 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.gnss@1.0;
import IGnssNiCallback;

/**
 * Extended interface for Network-initiated (NI) support. This interface is used
 * to respond to NI notifications originating from the HAL.
 */
interface IGnssNi {
    /**
     * Registers the callbacks for HAL to use.
     *
     * @param callback handle to IGnssNiCallback interface.
     */
    setCallback(IGnssNiCallback callback);

    /**
     * Sends a response to HAL.
     *
     * @param notifId An ID generated by HAL to associate NI notifications and
     * framework responses.
     * @param userResponse A GNSS Ni response indicating if the notification was
     * accepted, denied or not responded to.
     */
    respond(int32_t notifId, GnssUserResponseType userResponse);
};
