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