1 /*
2  * Copyright (C) 2023 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 OHOS_VCARD_POSTAL_DATA_H
17 #define OHOS_VCARD_POSTAL_DATA_H
18 
19 #include "vcard_contact_data.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 class VCardPostalData : public VCardContactData {
24 public:
VCardPostalData()25     VCardPostalData() {}
~VCardPostalData()26     ~VCardPostalData() {}
27     virtual int32_t BuildValuesBucket(OHOS::DataShare::DataShareValuesBucket &valuesBucket);
28     virtual int32_t BuildData(std::shared_ptr<DataShare::DataShareResultSet> resultSet);
29     void InitPostalData(std::vector<std::string> propValueList, int32_t type, std::string label);
30     std::string GetPOBox();
31     void SetPOBox(const std::string &pobox);
32     std::string GetPostCode();
33     void SetPostCode(const std::string &postCode);
34     std::string GetRegion();
35     void SetRegion(const std::string &region);
36     std::string GetCountry();
37     void SetCountry(const std::string &country);
38     std::string GetCity();
39     void SetCity(const std::string &city);
40     std::string GetStreet();
41     void SetStreet(const std::string &street);
42     std::string GetNeighborhood();
43     void SetNeighborhood(const std::string &neighborhood);
44     std::string GetPostalAddress();
45     void SetPostalAddress(const std::string &postalAddress);
46     std::string GetLabelId();
47     void SetLabelId(const std::string &labelId);
48     std::string GetLabelName();
49     void SetLabelName(const std::string &labelName);
50 
51 private:
52     const int32_t POBOX_VALUE_INDEX = 0;
53     const int32_t POSTAL_ADDRESS_VALUE_INDEX = 1;
54     const int32_t STREET_VALUE_INDEX = 2;
55     const int32_t CITY_VALUE_INDEX = 3;
56     const int32_t REGION_VALUE_INDEX = 4;
57     const int32_t POSTCODE_VALUE_INDEX = 5;
58     const int32_t COUNTRY_VALUE_INDEX = 6;
59     std::string pobox_ = "";
60     std::string extendedAddress_ = "";
61     std::string street_ = "";
62     std::string localty_ = "";
63     std::string region_ = "";
64     std::string postalCode_ = "";
65     std::string country_ = "";
66     std::string city_ = "";
67     std::string label_ = "";
68     std::string postCode_ = "";
69     std::string neighborhood_ = "";
70     std::string postalAddress_ = "";
71     std::string labelId_ = "";
72     std::string labelName_ = "";
73 };
74 } // namespace Telephony
75 } // namespace OHOS
76 #endif // OHOS_VCARD_POSTAL_DATA_H
77