• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
19 #include <v1_0/ignss_callback.h>
20 
21 namespace OHOS {
22 namespace Location {
23 using HDI::Location::Gnss::V1_0::IGnssCallback;
24 using HDI::Location::Gnss::V1_0::LocationInfo;
25 using HDI::Location::Gnss::V1_0::GnssWorkingStatus;
26 using HDI::Location::Gnss::V1_0::GnssCapabilities;
27 using HDI::Location::Gnss::V1_0::SatelliteStatusInfo;
28 using HDI::Location::Gnss::V1_0::GnssRefInfoType;
29 
30 class GnssEventCallback : public IGnssCallback {
31 public:
~GnssEventCallback()32     ~GnssEventCallback() override {}
33     int32_t ReportLocation(const LocationInfo& location) override;
34     int32_t ReportGnssWorkingStatus(GnssWorkingStatus status) override;
35     int32_t ReportNmea(int64_t timestamp, const std::string& nmea, int32_t length) override;
36     int32_t ReportGnssCapabilities(GnssCapabilities capabilities) override;
37     int32_t ReportSatelliteStatusInfo(const SatelliteStatusInfo& info) override;
38     int32_t RequestGnssReferenceInfo(GnssRefInfoType type) override;
39     int32_t RequestPredictGnssData() override;
40     int32_t ReportCachedLocation(const std::vector<LocationInfo>& gnssLocations) override;
41 };
42 }  // namespace Location
43 }  // namespace OHOS
44 #endif // GNSS_EVENT_CALLBACK_H
45