1c5e268c6Sopenharmony_ci/* 2c5e268c6Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License. 5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at 6c5e268c6Sopenharmony_ci * 7c5e268c6Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8c5e268c6Sopenharmony_ci * 9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and 13c5e268c6Sopenharmony_ci * limitations under the License. 14c5e268c6Sopenharmony_ci */ 15c5e268c6Sopenharmony_ci 16c5e268c6Sopenharmony_ci/* 17c5e268c6Sopenharmony_ci * @addtogroup HdiAGnss 18c5e268c6Sopenharmony_ci * @{ 19c5e268c6Sopenharmony_ci * 20c5e268c6Sopenharmony_ci * @brief Provides unified APIs for the AGNSS service. 21c5e268c6Sopenharmony_ci * 22c5e268c6Sopenharmony_ci * The upper layer can use the interfaces provided by this module to set the AGNSS callback, AGNSS server address, 23c5e268c6Sopenharmony_ci * AGNSS reference information, and setId. 24c5e268c6Sopenharmony_ci * 25c5e268c6Sopenharmony_ci * @since 5.0 26c5e268c6Sopenharmony_ci */ 27c5e268c6Sopenharmony_ci 28c5e268c6Sopenharmony_ci/* 29c5e268c6Sopenharmony_ci * @file IAGnssInterface.idl 30c5e268c6Sopenharmony_ci * 31c5e268c6Sopenharmony_ci * @brief Defines the agnss interfaces to set the AGNSS callback, AGNSS server address, AGNSS reference information, 32c5e268c6Sopenharmony_ci * and setId. 33c5e268c6Sopenharmony_ci * 34c5e268c6Sopenharmony_ci * @since 5.0 35c5e268c6Sopenharmony_ci * @version 2.0 36c5e268c6Sopenharmony_ci */ 37c5e268c6Sopenharmony_ci 38c5e268c6Sopenharmony_cipackage ohos.hdi.location.agnss.v2_0; 39c5e268c6Sopenharmony_ci 40c5e268c6Sopenharmony_ciimport ohos.hdi.location.agnss.v2_0.IAGnssCallback; 41c5e268c6Sopenharmony_ciimport ohos.hdi.location.agnss.v2_0.AGnssTypes; 42c5e268c6Sopenharmony_ci 43c5e268c6Sopenharmony_ci/* 44c5e268c6Sopenharmony_ci * @brief Defines the agnss interfaces to set the AGNSS callback, AGNSS server address, AGNSS reference information, 45c5e268c6Sopenharmony_ci * and setId. 46c5e268c6Sopenharmony_ci * 47c5e268c6Sopenharmony_ci * @since 5.0 48c5e268c6Sopenharmony_ci */ 49c5e268c6Sopenharmony_ciinterface IAGnssInterface { 50c5e268c6Sopenharmony_ci /* 51c5e268c6Sopenharmony_ci * @brief Set the agnss callback function. 52c5e268c6Sopenharmony_ci * 53c5e268c6Sopenharmony_ci * @param callback Indicates the agnss callback to request the upper layer to establish or release data services, 54c5e268c6Sopenharmony_ci * request the upper layer to deliver setId, and request the upper layer to deliver the agnss reference information. 55c5e268c6Sopenharmony_ci * For details, see {@link IAGnssCallback}. 56c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise. 57c5e268c6Sopenharmony_ci * 58c5e268c6Sopenharmony_ci * @since 5.0 59c5e268c6Sopenharmony_ci * @version 2.0 60c5e268c6Sopenharmony_ci */ 61c5e268c6Sopenharmony_ci SetAgnssCallback([in] IAGnssCallback callbackObj); 62c5e268c6Sopenharmony_ci 63c5e268c6Sopenharmony_ci /* 64c5e268c6Sopenharmony_ci * @brief Set the Agnss Server Information. 65c5e268c6Sopenharmony_ci * 66c5e268c6Sopenharmony_ci * @param server Indicates the AGNSS server information. 67c5e268c6Sopenharmony_ci * For details, see {@link AGnssServerInfo}. 68c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise. 69c5e268c6Sopenharmony_ci * 70c5e268c6Sopenharmony_ci * @since 5.0 71c5e268c6Sopenharmony_ci * @version 2.0 72c5e268c6Sopenharmony_ci */ 73c5e268c6Sopenharmony_ci SetAgnssServer([in] struct AGnssServerInfo server); 74c5e268c6Sopenharmony_ci 75c5e268c6Sopenharmony_ci /* 76c5e268c6Sopenharmony_ci * @brief Ingesting Reference Information. 77c5e268c6Sopenharmony_ci * 78c5e268c6Sopenharmony_ci * @param refInfo Indicates the AGNSS reference information structure. 79c5e268c6Sopenharmony_ci * For details, see {@link AGnssRefInfo}. 80c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise. 81c5e268c6Sopenharmony_ci * 82c5e268c6Sopenharmony_ci * @since 5.0 83c5e268c6Sopenharmony_ci * @version 2.0 84c5e268c6Sopenharmony_ci */ 85c5e268c6Sopenharmony_ci SetAgnssRefInfo([in] struct AGnssRefInfo refInfo); 86c5e268c6Sopenharmony_ci 87c5e268c6Sopenharmony_ci /* 88c5e268c6Sopenharmony_ci * @brief Set Subscriber Identity. 89c5e268c6Sopenharmony_ci * 90c5e268c6Sopenharmony_ci * @param id Indicates the AGNSS setid information. 91c5e268c6Sopenharmony_ci * For details, see {@link SubscriberSetId}. 92c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if setup callback successed; returns a negative value otherwise. 93c5e268c6Sopenharmony_ci * 94c5e268c6Sopenharmony_ci * @since 5.0 95c5e268c6Sopenharmony_ci * @version 2.0 96c5e268c6Sopenharmony_ci */ 97c5e268c6Sopenharmony_ci SetSubscriberSetId([in] struct SubscriberSetId id); 98c5e268c6Sopenharmony_ci 99c5e268c6Sopenharmony_ci /* 100c5e268c6Sopenharmony_ci * @brief Send network state to AGNSS module. 101c5e268c6Sopenharmony_ci * 102c5e268c6Sopenharmony_ci * @param state Indicates the network state. For details, see {@link NetworkState}. 103c5e268c6Sopenharmony_ci * @return Returns <b>0</b> if send successed; returns a negative value otherwise. 104c5e268c6Sopenharmony_ci * 105c5e268c6Sopenharmony_ci * @since 5.0 106c5e268c6Sopenharmony_ci * @version 2.0 107c5e268c6Sopenharmony_ci */ 108c5e268c6Sopenharmony_ci SendNetworkState([in] struct NetworkState state); 109c5e268c6Sopenharmony_ci} 110c5e268c6Sopenharmony_ci/** @} */