1 /* 2 * Copyright (C) 2025 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 GEOCODE_CONVERT_ADDRESS_REQUEST_H 17 #define GEOCODE_CONVERT_ADDRESS_REQUEST_H 18 19 #include <singleton.h> 20 #include <string> 21 #include <vector> 22 23 #include "iremote_object.h" 24 #include "message_parcel.h" 25 #include "message_option.h" 26 #include "common_utils.h" 27 28 namespace OHOS { 29 namespace Location { 30 class GeocodeConvertAddressRequest : public Parcelable { 31 public: 32 GeocodeConvertAddressRequest(); 33 ~GeocodeConvertAddressRequest(); 34 std::string GetLocale(); 35 void SetLocale(std::string locale); 36 int32_t GetMaxItems(); 37 void SetMaxItems(int32_t maxItems); 38 std::string GetDescription(); 39 void SetDescription(std::string description); 40 double GetMaxLatitude(); 41 void SetMaxLatitude(double maxLatitude); 42 double GetMaxLongitude(); 43 void SetMaxLongitude(double maxLongitude); 44 double GetMinLatitude(); 45 void SetMinLatitude(double minLatitude); 46 double GetMinLongitude(); 47 void SetMinLongitude(double minLongitude); 48 std::string GetTransId(); 49 void SetTransId(std::string transId); 50 std::string GetCountry(); 51 void SetCountry(std::string country); 52 53 bool Marshalling(Parcel& parcel) const; 54 static GeocodeConvertAddressRequest* Unmarshalling(Parcel& parcel); 55 void ReadFromParcel(Parcel& parcel); 56 static std::unique_ptr<GeocodeConvertAddressRequest> UnmarshallingMessageParcel(MessageParcel& parcel); 57 void ReadFromMessageParcel(MessageParcel& parcel); 58 private: 59 std::string locale_; 60 int64_t maxItems_; 61 std::string description_; 62 double maxLatitude_; 63 double maxLongitude_; 64 double minLatitude_; 65 double minLongitude_; 66 std::string transId_; 67 std::string country_; 68 }; 69 } // namespace OHOS 70 } // namespace Location 71 #endif // GEOCODE_CONVERT_ADDRESS_REQUEST_H 72