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_NAME_DATA_H
17 #define OHOS_VCARD_NAME_DATA_H
18 
19 #include "vcard_contact_data.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 class VCardNameData : public VCardContactData {
24 public:
VCardNameData()25     VCardNameData() {}
~VCardNameData()26     ~VCardNameData() {}
27     virtual int32_t BuildValuesBucket(OHOS::DataShare::DataShareValuesBucket &valuesBucket);
28     virtual int32_t BuildData(std::shared_ptr<DataShare::DataShareResultSet> resultSet);
29     void SetFamily(const std::string &family);
30     void SetGiven(const std::string &given);
31     void SetMiddle(const std::string &middle);
32     void SetPrefix(const std::string &prefix);
33     void SetSuffix(const std::string &suffix);
34     void SetFormatted(const std::string &famformatted);
35     void SetPhoneticFamily(const std::string &phoneticFamily);
36     void SetPhoneticGiven(const std::string &phoneticGiven);
37     void SetPhoneticMiddle(const std::string &phoneticMiddle);
38     void setSort(const std::string &sort);
39     void setDispalyName(const std::string &displayName);
40     std::string GetFamily();
41     std::string GetGiven();
42     std::string GetMiddle();
43     std::string GetPrefix();
44     std::string GetSuffix();
45     std::string GetFormatted();
46     std::string GetPhoneticFamily();
47     std::string GetPhoneticGiven();
48     std::string GetPhoneticMiddle();
49     std::string GetSort();
50     std::string GetDisplayName();
51 
52 private:
53     std::string family_ = "";
54     std::string given_ = "";
55     std::string middle_ = "";
56     std::string prefix_ = "";
57     std::string suffix_ = "";
58     std::string formatted_ = "";
59     std::string phoneticFamily_ = "";
60     std::string phoneticGiven_ = "";
61     std::string phoneticMiddle_ = "";
62     std::string sort_ = "";
63     std::string displayName_ = "";
64 };
65 } // namespace Telephony
66 } // namespace OHOS
67 #endif // OHOS_VCARD_NAME_DATA_H
68