1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package [email protected];
18
19import IGnssAntennaInfoCallback;
20
21/**
22 * Extended interface for GNSS antenna information support.
23 */
24interface IGnssAntennaInfo {
25    enum GnssAntennaInfoStatus : int32_t {
26        SUCCESS = 0,
27        ERROR_ALREADY_INIT = -100,
28        ERROR_GENERIC = -101,
29    };
30
31    /**
32     * Registers the callback routines with the HAL.
33     *
34     * @param callback Handle to the GnssAntennaInfo callback interface.
35     */
36    setCallback(IGnssAntennaInfoCallback callback) generates (GnssAntennaInfoStatus initRet);
37
38    /**
39     * Stops updates from the HAL, and unregisters the callback routines.
40     * After a call to close(), the previously registered callbacks must be
41     * considered invalid by the HAL.
42     * If close() is invoked without a previous setCallback, this function must perform
43     * no work.
44     */
45    close();
46};
47