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