1 /*
2  * Copyright 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 
17 #ifndef __vts_libdatatype_hal_gps_h__
18 #define __vts_libdatatype_hal_gps_h__
19 
20 #include <hardware/gps.h>
21 
22 namespace android {
23 namespace vts {
24 
25 typedef double vts_gps_longitude;
26 typedef double vts_gps_latitude;
27 typedef float vts_gps_accuracy;
28 typedef uint16_t vts_gps_flags_uint16;
29 
30 typedef uint32_t min_interval;
31 typedef uint32_t preferred_accuracy;
32 typedef uint32_t preferred_time;
33 
34 // Generates a GpsCallback instance used for GPS HAL v1 init().
35 extern GpsCallbacks* GenerateGpsCallbacks();
36 
37 // Generates a GpsUtcTime value which is int64_t.
38 extern GpsUtcTime GenerateGpsUtcTime();
39 
40 // Generates a GPS latitude value.
41 extern double GenerateLatitude();
42 
43 // Generates a GPS longitude value.
44 extern double GenerateLongitude();
45 
46 // Generates a GPS accuracy value.
47 extern float GenerateGpsAccuracy();
48 
49 // Generates a uint16_t flag value.
50 extern uint16_t GenerateGpsFlagsUint16();
51 
52 // Generates a GpsPositionMode value which is uint32_t.
53 extern GpsPositionMode GenerateGpsPositionMode();
54 
55 // Generates a GpsPositionRecurrence value which is uint32_t.
56 extern GpsPositionRecurrence GenerateGpsPositionRecurrence();
57 
58 }  // namespace vts
59 }  // namespace android
60 
61 #endif
62