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_ORGANIZATION_DATA_H
17 #define OHOS_VCARD_ORGANIZATION_DATA_H
18 
19 #include "vcard_contact_data.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 class VCardOrganizationData : public VCardContactData {
24 public:
VCardOrganizationData()25     VCardOrganizationData()
26     {
27         organization_ = "";
28         departmentName_ = "";
29         title_ = "";
30         phoneticName_ = "";
31         type_ = 0;
32         company_ = "";
33     };
~VCardOrganizationData()34     ~VCardOrganizationData() {}
35     virtual int32_t BuildValuesBucket(OHOS::DataShare::DataShareValuesBucket &valuesBucket);
36     virtual int32_t BuildData(std::shared_ptr<DataShare::DataShareResultSet> resultSet);
37     void InitOrganizationData(std::string &organization, std::string &departmentName, std::string &company,
38         std::string &title, std::string &phoneticName, int32_t type);
39     void SetOrganization(const std::string &organization);
40     void SetDepartmentName(const std::string &departmentName);
41     void SetTitle(const std::string &title);
42     void SetPhoneticName(const std::string &phoneticName);
43     void SetType(int32_t type);
44     std::string GetOrganization();
45     std::string GetDepartmentName();
46     std::string GetTitle();
47     std::string GetPhoneticName();
48     int32_t GetType();
49     void SetCompany(const std::string &company);
50     std::string GetCompany();
51 
52 private:
53     std::string organization_;
54     std::string departmentName_;
55     std::string title_;
56     std::string phoneticName_;
57     int32_t type_;
58     std::string company_;
59 };
60 } // namespace Telephony
61 } // namespace OHOS
62 #endif // OHOS_VCARD_ORGANIZATION_DATA_H
63