/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * 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.
 */

/*
 * @addtogroup HdiAGnss
 * @{
 *
 * @brief Provides unified APIs for the AGNSS service.
 *
 * The upper layer can use the interfaces provided by this module to set the AGNSS callback, AGNSS server address,
 * AGNSS reference information, and setId.
 *
 * @since 5.0
 */

/*
 * @file IAGnssInterface.idl
 *
 * @brief Defines the agnss interfaces to set the AGNSS callback, AGNSS server address, AGNSS reference information,
 * and setId.
 *
 * @since 5.0
 * @version 2.0
 */

package ohos.hdi.location.agnss.v2_0;

import ohos.hdi.location.agnss.v2_0.IAGnssCallback;
import ohos.hdi.location.agnss.v2_0.AGnssTypes;

/*
 * @brief Defines the agnss interfaces to set the AGNSS callback, AGNSS server address, AGNSS reference information,
 * and setId.
 *
 * @since 5.0
 */
interface IAGnssInterface {
    /*
     * @brief Set the agnss callback function.
     *
     * @param callback Indicates the agnss callback to request the upper layer to establish or release data services,
     * request the upper layer to deliver setId, and request the upper layer to deliver the agnss reference information.
     * For details, see {@link IAGnssCallback}.
     * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 2.0
     */
    SetAgnssCallback([in] IAGnssCallback callbackObj);

    /*
     * @brief Set the Agnss Server Information.
     *
     * @param server Indicates the AGNSS server information.
     * For details, see {@link AGnssServerInfo}.
     * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 2.0
     */
    SetAgnssServer([in] struct AGnssServerInfo server);

    /*
     * @brief Ingesting Reference Information.
     *
     * @param refInfo Indicates the AGNSS reference information structure.
     * For details, see {@link AGnssRefInfo}.
     * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 2.0
     */
    SetAgnssRefInfo([in] struct AGnssRefInfo refInfo);

    /*
     * @brief Set Subscriber Identity.
     *
     * @param id Indicates the AGNSS setid information.
     * For details, see {@link SubscriberSetId}.
     * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 2.0
     */
    SetSubscriberSetId([in] struct SubscriberSetId id);

    /*
     * @brief Send network state to AGNSS module.
     *
     * @param state Indicates the network state. For details, see {@link NetworkState}.
     * @return Returns <b>0</b> if send successed; returns a negative value otherwise.
     *
     * @since 5.0
     * @version 2.0
     */
    SendNetworkState([in] struct NetworkState state);
}
/** @} */