15c735df2Sopenharmony_ci/* 25c735df2Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 35c735df2Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 45c735df2Sopenharmony_ci * you may not use this file except in compliance with the License. 55c735df2Sopenharmony_ci * You may obtain a copy of the License at 65c735df2Sopenharmony_ci * 75c735df2Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 85c735df2Sopenharmony_ci * 95c735df2Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 105c735df2Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 115c735df2Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 125c735df2Sopenharmony_ci * See the License for the specific language governing permissions and 135c735df2Sopenharmony_ci * limitations under the License. 145c735df2Sopenharmony_ci */ 155c735df2Sopenharmony_ci 165c735df2Sopenharmony_ci#ifndef GEOLOCATIONMANAGER_IMPL_H 175c735df2Sopenharmony_ci#define GEOLOCATIONMANAGER_IMPL_H 185c735df2Sopenharmony_ci 195c735df2Sopenharmony_ci#include <cstdint> 205c735df2Sopenharmony_ci#include <functional> 215c735df2Sopenharmony_ci#include <string> 225c735df2Sopenharmony_ci#include <vector> 235c735df2Sopenharmony_ci#include "locator.h" 245c735df2Sopenharmony_ci#include "location_napi_event.h" 255c735df2Sopenharmony_ci#include "geolocationmanager_utils.h" 265c735df2Sopenharmony_ci 275c735df2Sopenharmony_cinamespace OHOS { 285c735df2Sopenharmony_cinamespace GeoLocationManager { 295c735df2Sopenharmony_ciCJLocation GetLastLocation(int32_t& errCode); 305c735df2Sopenharmony_ci 315c735df2Sopenharmony_cibool IsLocationEnabled(int32_t& errCode); 325c735df2Sopenharmony_ci 335c735df2Sopenharmony_cibool IsGeocoderAvailable(int32_t& errCode); 345c735df2Sopenharmony_ci 355c735df2Sopenharmony_ciint32_t GetCachedGnssLocationsSize(int32_t& errCode); 365c735df2Sopenharmony_ci 375c735df2Sopenharmony_ciCJLocation GetCurrentLocation(int32_t& errCode); 385c735df2Sopenharmony_ci 395c735df2Sopenharmony_ciCJLocation GetCurrentLocationCurrent(CJCurrentLocationRequest request, int32_t& errCode); 405c735df2Sopenharmony_ci 415c735df2Sopenharmony_ciCJLocation GetCurrentLocationSingle(CJSingleLocationRequest request, int32_t& errCode); 425c735df2Sopenharmony_ci 435c735df2Sopenharmony_ciCJLocation GetCurrentLocation(std::unique_ptr<Location::RequestConfig>& requestConfig, int32_t& errCode); 445c735df2Sopenharmony_ci 455c735df2Sopenharmony_civoid FlushCachedGnssLocations(int32_t& errCode); 465c735df2Sopenharmony_ci 475c735df2Sopenharmony_civoid SendCommand(CJLocationCommand command, int32_t& errCode); 485c735df2Sopenharmony_ci 495c735df2Sopenharmony_ciCJCountryCode GetCountryCode(int32_t& errCode); 505c735df2Sopenharmony_ci 515c735df2Sopenharmony_ciCJGeoAddressArr GetAddressesFromLocation(CJReverseGeoCodeRequest request, int32_t& errCode); 525c735df2Sopenharmony_ci 535c735df2Sopenharmony_ciCJGeoAddressArr GetAddressesFromLocationName(CJGeoCodeRequest request, int32_t& errCode); 545c735df2Sopenharmony_ci 555c735df2Sopenharmony_ciint32_t OnLocationRequest(CJLocationRequest request, int64_t callbackId); 565c735df2Sopenharmony_ci 575c735df2Sopenharmony_ciint32_t OnContinuousLocationRequest(CJContinuousLocationRequest request, int64_t callbackId); 585c735df2Sopenharmony_ci 595c735df2Sopenharmony_ciint32_t OffLocationChange(int64_t callbackId); 605c735df2Sopenharmony_ci 615c735df2Sopenharmony_ciint32_t OffLocationChangeAll(); 625c735df2Sopenharmony_ci 635c735df2Sopenharmony_ciint32_t OnLocationError(int64_t callbackId); 645c735df2Sopenharmony_ci 655c735df2Sopenharmony_ciint32_t OffLocationError(int64_t callbackId); 665c735df2Sopenharmony_ci 675c735df2Sopenharmony_ciint32_t OffLocationErrorAll(); 685c735df2Sopenharmony_ci 695c735df2Sopenharmony_ciint32_t OnLocationEnabledChange(int64_t callbackId); 705c735df2Sopenharmony_ci 715c735df2Sopenharmony_ciint32_t OffLocationEnabledChange(int64_t callbackId); 725c735df2Sopenharmony_ci 735c735df2Sopenharmony_ciint32_t OffLocationEnabledChangeAll(); 745c735df2Sopenharmony_ci 755c735df2Sopenharmony_ciint32_t OnCachedGnssLocationsChange(CJCachedGnssLocationsRequest request, 765c735df2Sopenharmony_ci int64_t callbackId); 775c735df2Sopenharmony_ci 785c735df2Sopenharmony_ciint32_t OffCachedGnssLocationsChange(int64_t callbackId); 795c735df2Sopenharmony_ci 805c735df2Sopenharmony_ciint32_t OffCachedGnssLocationsChangeAll(); 815c735df2Sopenharmony_ci 825c735df2Sopenharmony_ciint32_t OnSatelliteStatusChange(int64_t callbackId); 835c735df2Sopenharmony_ci 845c735df2Sopenharmony_ciint32_t OffSatelliteStatusChange(int64_t callbackId); 855c735df2Sopenharmony_ci 865c735df2Sopenharmony_ciint32_t OffSatelliteStatusChangeAll(); 875c735df2Sopenharmony_ci 885c735df2Sopenharmony_ciint32_t OnNmeaMessage(int64_t callbackId); 895c735df2Sopenharmony_ci 905c735df2Sopenharmony_ciint32_t OffNmeaMessage(int64_t callbackId); 915c735df2Sopenharmony_ci 925c735df2Sopenharmony_ciint32_t OffNmeaMessageAll(); 935c735df2Sopenharmony_ci 945c735df2Sopenharmony_ciint32_t OnCountryCodeChange(int64_t callbackId); 955c735df2Sopenharmony_ci 965c735df2Sopenharmony_ciint32_t OffCountryCodeChange(int64_t callbackId); 975c735df2Sopenharmony_ci 985c735df2Sopenharmony_ciint32_t OffCountryCodeChangeAll(); 995c735df2Sopenharmony_ci 1005c735df2Sopenharmony_ciCArrI32 GetGeofenceSupportedCoordTypes(int32_t& errCode); 1015c735df2Sopenharmony_ci} 1025c735df2Sopenharmony_ci} 1035c735df2Sopenharmony_ci 1045c735df2Sopenharmony_ci#endif // GEOLOCATIONMANAGER_IMPL_H