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 GNSS_INTERFACE_TEST_H
17 #define GNSS_INTERFACE_TEST_H
18 #ifdef FEATURE_GNSS_SUPPORT
19 
20 #include <gtest/gtest.h>
21 
22 #include <v2_0/ia_gnss_interface.h>
23 #include <v2_0/ignss_interface.h>
24 
25 namespace OHOS {
26 namespace Location {
27 using HDI::Location::Gnss::V2_0::IGnssInterface;
28 using HDI::Location::Gnss::V2_0::IGnssCallback;
29 using HDI::Location::Gnss::V2_0::GnssConfigPara;
30 using HDI::Location::Gnss::V2_0::GnssRefInfo;
31 
32 class GnssInterfaceTest : public IGnssInterface {
33 public:
34     GnssInterfaceTest();
35     ~GnssInterfaceTest() override;
36 
37     int32_t SetGnssConfigPara(const GnssConfigPara &para) override;
38 
39     int32_t EnableGnss(const sptr<IGnssCallback> &callbackObj) override;
40 
41     int32_t DisableGnss() override;
42 
43     int32_t StartGnss(HDI::Location::Gnss::V2_0::GnssStartType type) override;
44 
45     int32_t StopGnss(HDI::Location::Gnss::V2_0::GnssStartType type) override;
46 
47     int32_t SetGnssReferenceInfo(const GnssRefInfo &refInfo) override;
48 
49     int32_t DeleteAuxiliaryData(unsigned short data) override;
50 
51     int32_t SetPredictGnssData(const std::string &data) override;
52 
53     int32_t GetCachedGnssLocationsSize(int32_t &size) override;
54 
55     int32_t GetCachedGnssLocations() override;
56 
57     int32_t SendNiUserResponse(int32_t gnssNiNotificationId,
58                                HDI::Location::Gnss::V2_0::GnssNiResponseCmd userResponse) override;
59 
60     int32_t SendNetworkInitiatedMsg(const std::string &msg, int32_t length) override;
61 
62     int32_t EnableGnssMeasurement(
63         const sptr<HDI::Location::Gnss::V2_0::IGnssMeasurementCallback> &callbackObj) override;
64 
65     int32_t DisableGnssMeasurement() override;
66 };
67 }  // namespace Location
68 }  // namespace OHOS
69 #endif  // FEATURE_GNSS_SUPPORT
70 #endif  // GNSS_INTERFACE_TEST_H
71