blob: 9a17dde7744b1c15948475090f3f209d96714212 [file] [log] [blame]
Arne Coucheron08f00002020-05-18 06:18:45 +02001/*
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
17#ifndef android_hardware_gnss_V1_0_GnssDebug_H_
18#define android_hardware_gnss_V1_0_GnssDebug_H_
19
20#include <android/hardware/gnss/1.0/IGnssDebug.h>
21#include <hidl/Status.h>
22#include <hardware/gps.h>
23
24namespace android {
25namespace hardware {
26namespace gnss {
27namespace V1_0 {
28namespace implementation {
29
30using ::android::hardware::gnss::V1_0::IGnssDebug;
31using ::android::hardware::Return;
32using ::android::hardware::Void;
33using ::android::hardware::hidl_vec;
34using ::android::hardware::hidl_string;
35using ::android::sp;
36
37/* Interface for GNSS Debug support. */
38struct GnssDebug : public IGnssDebug {
39 GnssDebug(const GpsDebugInterface* gpsDebugIface);
40
41 /*
42 * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow.
43 * These declarations were generated from IGnssDebug.hal.
44 */
45 Return<void> getDebugData(getDebugData_cb _hidl_cb) override;
46
47 private:
48 /*
49 * Constant added for backward compatibility to conventional GPS Hals which
50 * returned a debug string.
51 */
52 const size_t kMaxDebugStrLen = 2047;
53 const GpsDebugInterface* mGnssDebugIface = nullptr;
54};
55
56} // namespace implementation
57} // namespace V1_0
58} // namespace gnss
59} // namespace hardware
60} // namespace android
61
62#endif // android_hardware_gnss_V1_0_GnssDebug_H_