1 /* 2 * Copyright (c) 2021-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 OHOS_HDI_LOCATION_AGNSS_V2_0_AGNSSCALLBACKIMPL_H 17 #define OHOS_HDI_LOCATION_AGNSS_V2_0_AGNSSCALLBACKIMPL_H 18 19 #ifdef FEATURE_GNSS_SUPPORT 20 #ifdef HDF_DRIVERS_INTERFACE_AGNSS_ENABLE 21 #include <hdf_base.h> 22 #include <v2_0/ia_gnss_callback.h> 23 #include "core_service_client.h" 24 #include "cell_information.h" 25 26 namespace OHOS { 27 namespace HDI { 28 namespace Location { 29 namespace Agnss { 30 namespace V2_0 { 31 class AgnssCallbackImpl : public IAGnssCallback { 32 public: AgnssCallbackImpl()33 AgnssCallbackImpl() 34 {} ~AgnssCallbackImpl()35 virtual ~AgnssCallbackImpl() 36 {} 37 int32_t RequestSetUpAgnssDataLink(const AGnssDataLinkRequest& request) override; 38 int32_t RequestSubscriberSetId(SubscriberSetIdType type) override; 39 int32_t RequestAgnssRefInfo(AGnssRefInfoType type) override; 40 private: 41 void JudgmentDataGsm(AGnssRefInfo& refInfo, sptr<Telephony::CellInformation> infoItem); 42 void JudgmentDataUmts(AGnssRefInfo& refInfo, sptr<Telephony::CellInformation> infoItem); 43 void JudgmentDataLte(AGnssRefInfo& refInfo, sptr<Telephony::CellInformation> infoItem); 44 void JudgmentDataNr(AGnssRefInfo& refInfo, sptr<Telephony::CellInformation> infoItem); 45 std::string Str16ToStr8(std::u16string str); 46 }; 47 } // V2_0 48 } // Agnss 49 } // Location 50 } // HDI 51 } // OHOS 52 53 #endif 54 #endif 55 #endif // OHOS_HDI_LOCATION_AGNSS_V2_0_AGNSSCALLBACKIMPL_H 56 57