15c735df2Sopenharmony_ci/* 25c735df2Sopenharmony_ci * Copyright (c) 2022 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 AGNSS_EVENT_CALLBACK_H 175c735df2Sopenharmony_ci#define AGNSS_EVENT_CALLBACK_H 185c735df2Sopenharmony_ci#ifdef FEATURE_GNSS_SUPPORT 195c735df2Sopenharmony_ci#ifdef HDF_DRIVERS_INTERFACE_AGNSS_ENABLE 205c735df2Sopenharmony_ci 215c735df2Sopenharmony_ci#include <v2_0/ia_gnss_callback.h> 225c735df2Sopenharmony_ci#ifdef TEL_CORE_SERVICE_ENABLE 235c735df2Sopenharmony_ci#include "core_service_client.h" 245c735df2Sopenharmony_ci#include "cell_information.h" 255c735df2Sopenharmony_ci#endif 265c735df2Sopenharmony_ci 275c735df2Sopenharmony_cinamespace OHOS { 285c735df2Sopenharmony_cinamespace Location { 295c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::IAGnssCallback; 305c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::AGnssDataLinkRequest; 315c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::SubscriberSetId; 325c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::SubscriberSetIdType; 335c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::AGnssRefInfo; 345c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::AGnssRefInfoType; 355c735df2Sopenharmony_ciusing HDI::Location::Agnss::V2_0::AGnssUserPlaneProtocol; 365c735df2Sopenharmony_ci 375c735df2Sopenharmony_ci#ifdef TEL_CORE_SERVICE_ENABLE 385c735df2Sopenharmony_ciusing OHOS::Telephony::CellInformation; 395c735df2Sopenharmony_ci#endif 405c735df2Sopenharmony_ci 415c735df2Sopenharmony_ciclass AGnssEventCallback : public IAGnssCallback { 425c735df2Sopenharmony_cipublic: 435c735df2Sopenharmony_ci ~AGnssEventCallback() override {} 445c735df2Sopenharmony_ci int32_t RequestSetUpAgnssDataLink(const AGnssDataLinkRequest& request) override; 455c735df2Sopenharmony_ci int32_t RequestSubscriberSetId(SubscriberSetIdType type) override; 465c735df2Sopenharmony_ci int32_t RequestAgnssRefInfo(AGnssRefInfoType type) override; 475c735df2Sopenharmony_ciprivate: 485c735df2Sopenharmony_ci#ifdef TEL_CORE_SERVICE_ENABLE 495c735df2Sopenharmony_ci void JudgmentDataGsm(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 505c735df2Sopenharmony_ci void JudgmentDataUmts(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 515c735df2Sopenharmony_ci void JudgmentDataLte(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 525c735df2Sopenharmony_ci void JudgmentDataNr(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 535c735df2Sopenharmony_ci#endif 545c735df2Sopenharmony_ci __attribute__((no_sanitize("cfi"))) void GetWiFiRefInfo(AGnssRefInfo& refInfo); 555c735df2Sopenharmony_ci void GetCellRefInfo(AGnssRefInfo& refInfo); 565c735df2Sopenharmony_ci}; 575c735df2Sopenharmony_ci} // namespace Location 585c735df2Sopenharmony_ci} // namespace OHOS 595c735df2Sopenharmony_ci#endif // HDF_DRIVERS_INTERFACE_AGNSS_ENABLE 605c735df2Sopenharmony_ci#endif // FEATURE_GNSS_SUPPORT 615c735df2Sopenharmony_ci#endif // AGNSS_EVENT_CALLBACK_H 62