• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_LOCATION_REQUEST_H
17 #define GEOCODE_CONVERT_LOCATION_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 GeocodeConvertLocationRequest : public Parcelable {
31 public:
32     GeocodeConvertLocationRequest();
33     ~GeocodeConvertLocationRequest();
34     std::string GetLocale();
35     void SetLocale(std::string locale);
36     double GetLatitude();
37     void SetLatitude(double latitude);
38     double GetLongitude();
39     void SetLongitude(double longitude);
40     int32_t GetMaxItems();
41     void SetMaxItems(int32_t maxItems);
42     std::string GetTransId();
43     void SetTransId(std::string transId);
44     std::string GetCountry();
45     void SetCountry(std::string country);
46 
47     bool Marshalling(Parcel& parcel) const;
48     static GeocodeConvertLocationRequest* Unmarshalling(Parcel& parcel);
49     void ReadFromParcel(Parcel& parcel);
50     static std::unique_ptr<GeocodeConvertLocationRequest> UnmarshallingMessageParcel(MessageParcel& parcel);
51     void ReadFromMessageParcel(MessageParcel& parcel);
52 private:
53     std::string locale_;
54     double latitude_;
55     double longitude_;
56     int64_t maxItems_;
57     std::string transId_;
58     std::string country_;
59 };
60 } // namespace OHOS
61 } // namespace Location
62 #endif // GEOCODE_CONVERT_LOCATION_REQUEST_H
63