blob: 11f209620c242f6b582a9b266494a75b7271eb23 [file] [log] [blame]
Hridya Valsarajue596a712016-09-22 14:07:22 -07001/*
2 * Copyright (C) 2016 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 android.hardware.gnss@1.0;
18
19import IGnssNavigationMessageCallback;
20
21/*
22 * Extended interface for GNSS navigation message reporting support.
23 */
24interface IGnssNavigationMessage {
25 enum GnssNavigationMessageStatus : int32_t {
26 SUCCESS = 0,
27 ERROR_ALREADY_INIT = -100,
28 ERROR_GENERIC = -101
29 };
30
31 /*
32 * Initializes the interface and registers the callback routines with the HAL.
33 * After a successful call to 'setCallback' the HAL must begin to provide updates as
34 * they become available.
35 * @param callback handle to IGnssNavigationMessageCallack interface.
36 *
37 * @return initRet Returns SUCCESS if the operation
38 * is successful.
39 * Returns ERROR_ALREADY_INIT if a callback has
40 * already been registered without a corresponding call to close().
41 * Returns ERROR_GENERIC if any other error occurred. It is
42 * expected that the HAL will not generate any updates upon returning
43 * this error code.
44 */
Hridya Valsaraju97ecaa02016-11-02 10:20:07 -070045 setCallback(IGnssNavigationMessageCallback callback) generates (GnssNavigationMessageStatus initRet);
Hridya Valsarajue596a712016-09-22 14:07:22 -070046
47 /*
48 * Stops updates from the HAL, and unregisters the callback routines.
49 * After a call to close(), the previously registered callbacks must be
50 * considered invalid by the HAL.
51 * If close() is invoked without a previous setCallback, this function must perform
52 * no work.
53 */
54 close();
55};