1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef GNSS_EVENT_CALLBACK_H 17 #define GNSS_EVENT_CALLBACK_H 18 #ifdef FEATURE_GNSS_SUPPORT 19 20 #include <v1_0/ignss_callback.h> 21 22 namespace OHOS { 23 namespace Location { 24 using HDI::Location::Gnss::V1_0::IGnssCallback; 25 using HDI::Location::Gnss::V1_0::LocationInfo; 26 using HDI::Location::Gnss::V1_0::GnssWorkingStatus; 27 using HDI::Location::Gnss::V1_0::GnssCapabilities; 28 using HDI::Location::Gnss::V1_0::SatelliteStatusInfo; 29 using HDI::Location::Gnss::V1_0::GnssRefInfoType; 30 31 class GnssEventCallback : public IGnssCallback { 32 public: ~GnssEventCallback()33 ~GnssEventCallback() override {} 34 int32_t ReportLocation(const LocationInfo& location) override; 35 int32_t ReportGnssWorkingStatus(GnssWorkingStatus status) override; 36 int32_t ReportNmea(int64_t timestamp, const std::string& nmea, int32_t length) override; 37 int32_t ReportGnssCapabilities(GnssCapabilities capabilities) override; 38 int32_t ReportSatelliteStatusInfo(const SatelliteStatusInfo& info) override; 39 int32_t RequestGnssReferenceInfo(GnssRefInfoType type) override; 40 int32_t RequestPredictGnssData() override; 41 int32_t ReportCachedLocation(const std::vector<LocationInfo>& gnssLocations) override; 42 }; 43 } // namespace Location 44 } // namespace OHOS 45 #endif // FEATURE_GNSS_SUPPORT 46 #endif // GNSS_EVENT_CALLBACK_H 47