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 AGNSS_EVENT_CALLBACK_H 17 #define AGNSS_EVENT_CALLBACK_H 18 19 #include <v1_0/ia_gnss_callback.h> 20 #include "core_service_client.h" 21 #include "cell_information.h" 22 23 namespace OHOS { 24 namespace Location { 25 using HDI::Location::Agnss::V1_0::IAGnssCallback; 26 using HDI::Location::Agnss::V1_0::AGnssDataLinkRequest; 27 using HDI::Location::Agnss::V1_0::SubscriberSetId; 28 using HDI::Location::Agnss::V1_0::SubscriberSetIdType; 29 using HDI::Location::Agnss::V1_0::AGnssRefInfo; 30 using HDI::Location::Agnss::V1_0::AGnssUserPlaneProtocol; 31 using OHOS::Telephony::CellInformation; 32 33 class AGnssEventCallback : public IAGnssCallback { 34 public: ~AGnssEventCallback()35 ~AGnssEventCallback() override {} 36 int32_t RequestSetUpAgnssDataLink(const AGnssDataLinkRequest& request) override; 37 int32_t RequestSubscriberSetId(SubscriberSetIdType type) override; 38 int32_t RequestAgnssRefInfo() override; 39 private: 40 void JudgmentDataGsm(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 41 void JudgmentDataUmts(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 42 void JudgmentDataLte(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 43 void JudgmentDataNr(AGnssRefInfo& refInfo, sptr<CellInformation> infoItem); 44 }; 45 } // namespace Location 46 } // namespace OHOS 47 #endif // AGNSS_EVENT_CALLBACK_H 48