xref: /aosp_15_r20/hardware/interfaces/gnss/1.1/IGnssCallback.hal (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1*4d7e907cSAndroid Build Coastguard Worker/*
2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2017 The Android Open Source Project
3*4d7e907cSAndroid Build Coastguard Worker *
4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at
7*4d7e907cSAndroid Build Coastguard Worker *
8*4d7e907cSAndroid Build Coastguard Worker *      http://www.apache.org/licenses/LICENSE-2.0
9*4d7e907cSAndroid Build Coastguard Worker *
10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License.
15*4d7e907cSAndroid Build Coastguard Worker */
16*4d7e907cSAndroid Build Coastguard Worker
17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected];
18*4d7e907cSAndroid Build Coastguard Worker
19*4d7e907cSAndroid Build Coastguard Workerimport @1.0::IGnssCallback;
20*4d7e907cSAndroid Build Coastguard Worker
21*4d7e907cSAndroid Build Coastguard Worker/**
22*4d7e907cSAndroid Build Coastguard Worker * The interface is required for the HAL to communicate certain information
23*4d7e907cSAndroid Build Coastguard Worker * like status and location info back to the platform, the platform implements
24*4d7e907cSAndroid Build Coastguard Worker * the interfaces and passes a handle to the HAL.
25*4d7e907cSAndroid Build Coastguard Worker */
26*4d7e907cSAndroid Build Coastguard Workerinterface IGnssCallback extends @1.0::IGnssCallback {
27*4d7e907cSAndroid Build Coastguard Worker    /**
28*4d7e907cSAndroid Build Coastguard Worker     * Callback to inform framework of the GNSS HAL implementation model & version name.
29*4d7e907cSAndroid Build Coastguard Worker     *
30*4d7e907cSAndroid Build Coastguard Worker     * This is a user-visible string that identifies the model and version of the GNSS HAL.
31*4d7e907cSAndroid Build Coastguard Worker     * For example "ABC Co., Baseband Part 1234, RF Part 567, Software version 3.14.159"
32*4d7e907cSAndroid Build Coastguard Worker     *
33*4d7e907cSAndroid Build Coastguard Worker     * For privacy reasons, this string must not contain any device-specific serial number or other
34*4d7e907cSAndroid Build Coastguard Worker     * identifier that uniquely identifies an individual device.
35*4d7e907cSAndroid Build Coastguard Worker     *
36*4d7e907cSAndroid Build Coastguard Worker     * This must be called in response to IGnss::setCallback
37*4d7e907cSAndroid Build Coastguard Worker     *
38*4d7e907cSAndroid Build Coastguard Worker     * @param name String providing the name of the GNSS HAL implementation
39*4d7e907cSAndroid Build Coastguard Worker     */
40*4d7e907cSAndroid Build Coastguard Worker    gnssNameCb(string name);
41*4d7e907cSAndroid Build Coastguard Worker
42*4d7e907cSAndroid Build Coastguard Worker    /**
43*4d7e907cSAndroid Build Coastguard Worker     * Callback for requesting Location.
44*4d7e907cSAndroid Build Coastguard Worker     *
45*4d7e907cSAndroid Build Coastguard Worker     * HAL implementation must call this when it wants the framework to provide locations to assist
46*4d7e907cSAndroid Build Coastguard Worker     * with GNSS HAL operation, for example, to assist with time to first fix, error recovery, or to
47*4d7e907cSAndroid Build Coastguard Worker     * supplement GNSS location for other clients of the GNSS HAL.
48*4d7e907cSAndroid Build Coastguard Worker     *
49*4d7e907cSAndroid Build Coastguard Worker     * If a request is made with independentFromGnss set to true, the framework must avoid
50*4d7e907cSAndroid Build Coastguard Worker     * providing locations derived from GNSS locations (such as "fused" location), to help improve
51*4d7e907cSAndroid Build Coastguard Worker     * information independence for situations such as error recovery.
52*4d7e907cSAndroid Build Coastguard Worker     *
53*4d7e907cSAndroid Build Coastguard Worker     * In response to this method call, GNSS HAL can expect zero, one, or more calls to
54*4d7e907cSAndroid Build Coastguard Worker     * IGnss::injectLocation or IGnss::injectBestLocation, dependent on availability of location
55*4d7e907cSAndroid Build Coastguard Worker     * from other sources, which may happen at some arbitrary delay. Generally speaking, HAL
56*4d7e907cSAndroid Build Coastguard Worker     * implementations must be able to handle calls to IGnss::injectLocation or
57*4d7e907cSAndroid Build Coastguard Worker     * IGnss::injectBestLocation at any time.
58*4d7e907cSAndroid Build Coastguard Worker     *
59*4d7e907cSAndroid Build Coastguard Worker     * @param independentFromGnss True if requesting a location that is independent from GNSS.
60*4d7e907cSAndroid Build Coastguard Worker     */
61*4d7e907cSAndroid Build Coastguard Worker    gnssRequestLocationCb(bool independentFromGnss);
62*4d7e907cSAndroid Build Coastguard Worker};