Roman Kiryanov | ba02f72 | 2020-03-30 12:26:49 -0700 | [diff] [blame] | 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 | |
| 17 | #pragma once |
| 18 | #include <android/hardware/gnss/1.0/IAGnss.h> |
| 19 | #include <android/hardware/gnss/2.0/IAGnss.h> |
| 20 | |
| 21 | namespace goldfish { |
| 22 | namespace ahg = ::android::hardware::gnss; |
| 23 | namespace ahg10 = ahg::V1_0; |
| 24 | namespace ahg20 = ahg::V2_0; |
| 25 | |
| 26 | using ::android::sp; |
| 27 | using ::android::hardware::hidl_string; |
| 28 | using ::android::hardware::Return; |
| 29 | |
| 30 | struct AGnss20 : public ahg20::IAGnss { |
| 31 | Return<void> setCallback(const sp<ahg20::IAGnssCallback>& callback) override; |
| 32 | Return<bool> dataConnClosed() override; |
| 33 | Return<bool> dataConnFailed() override; |
| 34 | Return<bool> setServer(ahg20::IAGnssCallback::AGnssType type, |
| 35 | const hidl_string& hostname, |
| 36 | int32_t port) override; |
| 37 | Return<bool> dataConnOpen(uint64_t networkHandle, const hidl_string& apn, |
| 38 | ahg20::IAGnss::ApnIpType apnIpType) override; |
| 39 | }; |
| 40 | |
| 41 | } // namespace goldfish |