• 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 GEO_CONVERT_PROXY_H
17 #define GEO_CONVERT_PROXY_H
18 
19 #include "iremote_object.h"
20 #include "iremote_proxy.h"
21 
22 #include "common_utils.h"
23 #include "constant_definition.h"
24 #include "geo_coding_mock_info.h"
25 #include "geo_convert_skeleton.h"
26 
27 namespace OHOS {
28 namespace Location {
29 class GeoConvertProxy : public IRemoteProxy<IGeoConvert> {
30 public:
31     explicit GeoConvertProxy(const sptr<IRemoteObject> &impl);
32     ~GeoConvertProxy() = default;
33     int IsGeoConvertAvailable(MessageParcel &reply) override;
34     int GetAddressByCoordinate(MessageParcel &data, MessageParcel &reply) override;
35     int GetAddressByLocationName(MessageParcel &data, MessageParcel &reply) override;
36     bool EnableReverseGeocodingMock() override;
37     bool DisableReverseGeocodingMock() override;
38     LocationErrCode SetReverseGeocodingMockInfo(std::vector<std::shared_ptr<GeocodingMockInfo>>& mockInfo) override;
39     bool SendSimpleMsgAndParseResult(const int msgId);
40     int SendSimpleMsg(const int msgId, MessageParcel& reply);
41     int SendMsgWithDataReply(const int msgId, MessageParcel& data, MessageParcel& reply);
42 private:
43     static inline BrokerDelegator<GeoConvertProxy> delegator_;
44 };
45 } // namespace Location
46 } // namespace OHOS
47 #endif // GEO_CONVERT_PROXY_H
48