• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 CONTACT_COLUMNS_H
17 #define CONTACT_COLUMNS_H
18 
19 namespace OHOS {
20 namespace Contacts {
21 class ContactTableName {
22 public:
23     ~ContactTableName();
24     static constexpr const char *ACCOUNT = "account";
25     static constexpr const char *CONTACT_TYPE = "contact_type";
26     static constexpr const char *DELETE_RAW_CONTACT = "deleted_raw_contact";
27     static constexpr const char *GROUPS = "groups";
28     static constexpr const char *CONTACT = "contact";
29     static constexpr const char *CONTACT_BLOCKLIST = "contact_blocklist";
30     static constexpr const char *CONTACT_DATA = "contact_data";
31     static constexpr const char *LOCAL_LANG = "local_lang";
32     static constexpr const char *PHOTO_FILES = "photo_files";
33     static constexpr const char *RAW_CONTACT = "raw_contact";
34     static constexpr const char *SEARCH_CONTACT = "search_contact";
35     static constexpr const char *DATABASE_BACKUP_TASK = "database_backup_task";
36     static constexpr const char *MERGE_INFO = "merge_info";
37 };
38 
39 class CallLogColumns {
40 public:
41     ~CallLogColumns();
42     static constexpr const char *DISPLAY_NAME = "display_name";
43     static constexpr const char *QUICK_SEARCH_KEY = "quicksearch_key";
44     static constexpr const char *PHONE_NUMBER = "phone_number";
45     static constexpr const char *BEGIN_TIME = "begin_time";
46 };
47 
48 class DatabaseBackupColumns {
49 public:
50     ~DatabaseBackupColumns();
51     static constexpr const char *ID = "id";
52     static constexpr const char *BACKUP_TIME = "backup_time";
53     static constexpr const char *BACKUP_PATH = "backup_path";
54     static constexpr const char *REMARKS = "remarks";
55 };
56 
57 class CallsTableName {
58 public:
59     ~CallsTableName();
60     static constexpr const char *CALLLOG = "calllog";
61     static constexpr const char *VOICEMAIL = "voicemail";
62     static constexpr const char *REPLYING = "replying";
63 };
64 
65 class ViewName {
66 public:
67     ~ViewName();
68     static constexpr const char *SEARCH_CONTACT_VIEW = "search_contact_view";
69     static constexpr const char *VIEW_CONTACT_DATA = "view_contact_data";
70     static constexpr const char *VIEW_CONTACT = "view_contact";
71     static constexpr const char *VIEW_RAW_CONTACT = "view_raw_contact";
72     static constexpr const char *VIEW_GROUPS = "view_groups";
73     static constexpr const char *VIEW_DELETED = "view_deleted";
74 };
75 
76 class AliasName {
77 public:
78     ~AliasName();
79     static constexpr const char *ACCOUNT_DEFAULT = "accountDefault";
80     static constexpr const char *NAME_RAW_CONTACT = "name_raw_contact";
81     static constexpr const char *DATA_ID = "data_id";
82     static constexpr const char *CONTACT = "contact";
83     static constexpr const char *DATA = "data";
84 };
85 
86 class ContactPublicColumns {
87 public:
88     ~ContactPublicColumns();
89     static constexpr const char *ID = "id";
90     static constexpr const char *COUNT = "count";
91 };
92 
93 class AccountColumns {
94 public:
95     ~AccountColumns();
96     static constexpr const char *ID = "id";
97     static constexpr const char *ACCOUNT_NAME = "account_name";
98     static constexpr const char *ACCOUNT_TYPE = "account_type";
99     static constexpr const char *DATA_INFO = "data_info";
100 };
101 
102 class ContentTypeColumns {
103 public:
104     ~ContentTypeColumns();
105     static constexpr const char *ID = "id";
106     static constexpr const char *CONTENT_TYPE = "content_type";
107 };
108 
109 class DeleteRawContactColumns {
110 public:
111     ~DeleteRawContactColumns();
112     static constexpr const char *ID = "id";
113     static constexpr const char *CONTACT_ID = "contact_id";
114     static constexpr const char *RAW_CONTACT_ID = "raw_contact_id";
115     static constexpr const char *DELETE_SOURCE = "delete_source";
116     static constexpr const char *DELETE_TIME = "delete_time";
117     static constexpr const char *DISPLAY_NAME = "display_name";
118     static constexpr const char *DELETE_ACCOUNT = "delete_account";
119     static constexpr const char *BACKUP_DATA = "backup_data";
120     static constexpr const char *DELETE_DATE = "delete_date";
121     static constexpr const char *IS_DELETED = "is_deleted";
122 };
123 
124 class GroupsColumns {
125 public:
126     ~GroupsColumns();
127     static constexpr const char *ID = "id";
128     static constexpr const char *ACCOUNT_ID = "account_id";
129     static constexpr const char *GROUP_NAME = "group_name";
130     static constexpr const char *GROUP_NOTES = "group_notes";
131     static constexpr const char *IS_DELETED = "is_deleted";
132     static constexpr const char *GROUP_RINGTONE = "group_ringtone";
133     static constexpr const char *RINGTONE_MODIFY_TIME = "ringtone_modify_time";
134     static constexpr const char *LASTEST_MODIFY_TIME = "lastest_modify_time";
135 };
136 
137 class ContactColumns {
138 public:
139     ~ContactColumns();
140     static constexpr const char *ID = "id";
141     static constexpr const char *NAME_RAW_CONTACT_ID = "name_raw_contact_id";
142     static constexpr const char *PHOTO_FILE_ID = "photo_file_id";
143     static constexpr const char *PHOTO_ID = "photo_id";
144     static constexpr const char *PERSONAL_RINGTONE = "personal_ringtone";
145     static constexpr const char *IS_TRANSFER_VOICEMAIL = "is_transfer_voicemail";
146     static constexpr const char *COMPANY = "company";
147     static constexpr const char *POSITION = "position";
148     static constexpr const char *QUICK_SEARCH_KEY = "quick_search_key";
149     static constexpr const char *CONTACTED_COUNT = "contacted_count";
150     static constexpr const char *LASTEST_CONTACTED_TIME = "lastest_contacted_time";
151     static constexpr const char *FAVORITE = "favorite";
152     static constexpr const char *FAVORITE_ORDER = "favorite_order";
153     static constexpr const char *READ_ONLY = "read_only";
154     static constexpr const char *PERSONAL_NOTIFICATION_RINGTONE = "personal_notification_ringtone";
155     static constexpr const char *HAS_PHONE_NUMBER = "has_phone_number";
156     static constexpr const char *HAS_DISPLAY_NAME = "has_display_name";
157     static constexpr const char *HAS_EMAIL = "has_email";
158     static constexpr const char *HAS_GROUP = "has_group";
159 };
160 
161 class ContactBlockListColumns {
162 public:
163     ~ContactBlockListColumns();
164     static constexpr const char *ID = "id";
165     static constexpr const char *TYPES = "types";
166     static constexpr const char *PHONE_NUMBER = "phone_number";
167     static constexpr const char *CONTENT = "content";
168     static constexpr const char *TIME_STAMP = "time_stamp";
169 };
170 
171 class ContactDataColumns {
172 public:
173     ~ContactDataColumns();
174     static constexpr const char *TYPE_ID = "type_id";
175     static constexpr const char *RAW_CONTACT_ID = "raw_contact_id";
176     static constexpr const char *READ_ONLY = "read_only";
177     static constexpr const char *VERSION = "version";
178     static constexpr const char *IS_PERFERRED_NUMBER = "is_preferred_number";
179     static constexpr const char *DETAIL_INFO = "detail_info";
180     static constexpr const char *POSITION = "position";
181     static constexpr const char *EXTEND1 = "extend1";
182     static constexpr const char *EXTEND2 = "extend2";
183     static constexpr const char *EXTEND3 = "extend3";
184     static constexpr const char *EXTEND4 = "extend4";
185     static constexpr const char *ALPHA_NAME = "alpha_name";
186     static constexpr const char *OTHER_LAN_LAST_NAME = "other_lan_last_name";
187     static constexpr const char *OTHER_LAN_FIRST_NAME = "other_lan_first_name";
188     static constexpr const char *EXTEND5 = "extend5";
189     static constexpr const char *PHONETIC_NAME = "phonetic_name";
190     static constexpr const char *LAN_STYLE = "lan_style";
191     static constexpr const char *CUSTOM_DATA = "custom_data";
192     static constexpr const char *EXTEND6 = "extend6";
193     static constexpr const char *EXTEND7 = "extend7";
194     static constexpr const char *BLOB_DATA = "blob_data";
195     static constexpr const char *SYNC_1 = "sync_1";
196     static constexpr const char *SYNC_2 = "sync_2";
197     static constexpr const char *SYNC_3 = "sync_3";
198 };
199 
200 class LocalLanguageColumns {
201 public:
202     ~LocalLanguageColumns();
203     static constexpr const char *LOCAL = "local";
204 };
205 
206 class PhotoFilesColumns {
207 public:
208     ~PhotoFilesColumns();
209     static constexpr const char *ID = "id";
210     static constexpr const char *FILE_WIDTH = "file_width";
211     static constexpr const char *FILE_HEIGHT = "file_height";
212     static constexpr const char *FILE_SIZE = "file_size";
213 };
214 
215 class RawContactColumns {
216 public:
217     ~RawContactColumns();
218     static constexpr const char *ID = "id";
219     static constexpr const char *CONTACT_ID = "contact_id";
220     static constexpr const char *PHOTO_ID = "photo_id";
221     static constexpr const char *PHOTO_FILE_ID = "photo_file_id";
222     static constexpr const char *IS_TRANSFER_VOICEMAIL = "is_transfer_voicemail";
223     static constexpr const char *PERSONAL_RINGTONE = "personal_ringtone";
224     static constexpr const char *IS_DELETED = "is_deleted";
225     static constexpr const char *PHOTO_FIRST_NAME = "photo_first_name";
226     static constexpr const char *ACCOUNT_ID = "account_id";
227     static constexpr const char *VERSION = "version";
228     static constexpr const char *DISPLAY_NAME = "display_name";
229     static constexpr const char *SORT = "sort";
230     static constexpr const char *CONTACTED_COUNT = "contacted_count";
231     static constexpr const char *LASTEST_CONTACTED_TIME = "lastest_contacted_time";
232     static constexpr const char *FAVORITE = "favorite";
233     static constexpr const char *FAVORITE_ORDER = "favorite_order";
234     static constexpr const char *PHONETIC_NAME = "phonetic_name";
235     static constexpr const char *PHONETIC_NAME_TYPE = "phonetic_name_type";
236     static constexpr const char *COMPANY = "company";
237     static constexpr const char *POSITION = "position";
238     static constexpr const char *READ_ONLY = "read_only";
239     static constexpr const char *SORT_FIRST_LETTER = "sort_first_letter";
240     static constexpr const char *MERGE_MODE = "merge_mode";
241     static constexpr const char *IS_NEED_MERGE = "is_need_merge";
242     static constexpr const char *MERGE_STATUS = "merge_status";
243     static constexpr const char *IS_MERGE_TARGET = "is_merge_target";
244     static constexpr const char *VIBRATION_SETTING = "vibration_setting";
245     static constexpr const char *SYNC_ID = "sync_id";
246     static constexpr const char *SYNC_1 = "sync_1";
247     static constexpr const char *SYNC_2 = "sync_2";
248     static constexpr const char *SYNC_3 = "sync_3";
249 };
250 
251 class SearchContactColumns {
252 public:
253     ~SearchContactColumns();
254     static constexpr const char *ID = "id";
255     static constexpr const char *ACCOUNT_ID = "account_id";
256     static constexpr const char *CONTACT_ID = "contact_id";
257     static constexpr const char *RAW_CONTACT_ID = "raw_contact_id";
258     static constexpr const char *SEARCH_NAME = "search_name";
259     static constexpr const char *DISPLAY_NAME = "display_name";
260     static constexpr const char *PHONETIC_NAME = "phonetic_name";
261     static constexpr const char *FAVORITE = "favorite";
262     static constexpr const char *PHOTO_ID = "photo_id";
263     static constexpr const char *PHOTO_FILE_ID = "photo_file_id";
264 };
265 
266 class AccountData {
267 public:
268     ~AccountData();
269     static constexpr const char *ACCOUNT_NAME = "phone";
270     static constexpr const char *ACCOUNT_TYPE = "com.ohos.contacts";
271 };
272 
273 class ContentTypeData {
274 public:
275     ~ContentTypeData();
276     static constexpr const char *EMAIL = "email";
277     static constexpr const char *IM = "im";
278     static constexpr const char *NICKNAME = "nickname";
279     static constexpr const char *ORGANIZATION = "organization";
280     static constexpr const char *PHONE = "phone";
281     static constexpr const char *NAME = "name";
282     static constexpr const char *ADDRESS = "postal_address";
283     static constexpr const char *PHOTO = "photo";
284     static constexpr const char *GROUP_MEMBERSHIP = "group_membership";
285     static constexpr const char *NOTE = "note";
286     static constexpr const char *CONTACT_EVENT = "contact_event";
287     static constexpr const char *WEBSITE = "website";
288     static constexpr const char *RELATION = "relation";
289     static constexpr const char *CONTACT_MISC = "contact_misc";
290     static constexpr const char *HICALL_DEVICE = "hicall_device";
291     static constexpr const char *CAMCARD = "camcard";
292     static constexpr const char *SIP_ADDRESS = "sip_address";
293 };
294 class MergeInfo {
295 public:
296     ~MergeInfo();
297     static constexpr const char *RAW_CONTACT_ID = "raw_contact_id";
298 };
299 } // namespace Contacts
300 } // namespace OHOS
301 #endif // CONTACT_COLUMNS_H
302