/*
 * 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.gnss@2.0;

import @1.0::IGnssBatching;
import IGnssBatchingCallback;

/**
 * Extended interface for GNSS Batching support.
 *
 * If this interface is supported, this batching request must be able to run in
 * parallel with, or without, non-batched location requested by the
 * IGnss start() & stop() - i.e. both requests must be handled independently,
 * and not interfere with each other.
 *
 * For example, if a 1Hz continuous output is underway on the IGnssCallback,
 * due to an IGnss start() operation,
 * and then a IGnssBatching start() is called for a location every 10
 * seconds, the newly added batching request must not disrupt the 1Hz
 * continuous location output on the IGnssCallback.
 *
 * As with GNSS Location outputs, source of location must be GNSS satellite
 * measurements, optionally using interial and baro sensors to improve
 * relative motion filtering. No additional absolute positioning information,
 * such as WiFi derived location, may be mixed with the GNSS information.
 */
interface IGnssBatching extends @1.0::IGnssBatching {
    /**
     * Opens the interface and provides the callback routines
     * to the implementation of this interface.
     *
     * @param callback Callback interface for IGnssBatching.
     *
     * @return success Returns true on success.
     */
    init_2_0(IGnssBatchingCallback callback) generates (bool success);
};