1/**
2 * Copyright (c) 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
16export default {
17    bool: {
18        TRUE: '1',
19        FALSE: '0',
20    },
21    route: {
22        // Update the value of the delivery report switch.
23        MESSAGE_CODE_UPDATE_DELIVERY_REPORTS_VALUE: 32001,
24        // Update the value of the function of automatically downloading MMS messages.
25        MESSAGE_CODE_UPDATE_AUTO_RETRIEVE_MMS_VALUE: 32002,
26        // Update the value of the send cancel switch.
27        MESSAGE_CODE_UPDATE_RECALL_MESSAGES_VALUE: 32003,
28        // Update the value of the switch for automatically deleting notification information.
29        MESSAGE_CODE_UPDATE_AUTO_DELETE_INFO_MESSAGES_VALUE: 32004,
30        // Update the value of the notification integration switch.
31        MESSAGE_CODE_UPDATE_ARCHIVE_INFO_MESSAGES_VALUE: 30002,
32        // Update the value of the malicious URL identification switch.
33        MESSAGE_CODE_UPDATE_MALICIOUS_WEBSITE_IDENTIFICATION_VALUE: 30003,
34        // Updates the value of the switch for displaying contact avatars.
35        MESSAGE_CODE_UPDATE_SHOW_CONTACT_PROFILE_PICS_VALUE: 30004,
36        // Restore the value of the advanced page switch.
37        MESSAGE_CODE_RESTORE_ADVANCED_PAGE_SWITCH_VALUE: 30005
38    },
39    int: {
40        // status code
41        SUCCESS: 0,
42        FAILURE: -1,
43        // CheckBox select status code   1. Select all. 2. Do not select all. 3. Unknown.
44        CHECKBOX_SELECT_ALL: 1,
45        // None
46        CHECKBOX_SELECT_NONE: 2,
47        // Unknown
48        CHECKBOX_SELECT_UNKNOWN: 3,
49        MESSAGE_CODE_TWENTY_FIVE: 60,
50        MESSAGE_CODE_THREE_FOUR_ZERO: 660,
51        // Text
52        TYPE_TEXT: 0,
53        // Pictures
54        TYPE_IMAGE: 1,
55        // Audio
56        TYPE_AUDIO: 2,
57        // Video
58        TYPE_VIDEO: 3,
59        // 0
60        MESSAGE_CODE_ZERO: 0,
61        // 1
62        MESSAGE_CODE_ONE: 1,
63        // 2
64        MESSAGE_CODE_TWO: 2,
65        // 300
66        MESSAGE_CODE_THREE_ZERO_ZERO: 300,
67        // 1000
68        MESSAGE_CODE_THOUSAND: 1000,
69        // The SMS message is sent successfully.
70        SEND_MESSAGE_SUCCESS: 0,
71        // Sending
72        SEND_MESSAGE_SENDING: 1,
73        // Failed to send the SMS message.
74        SEND_MESSAGE_FAILED: 2,
75        // Draft Data Type
76        SEND_DRAFT: 3,
77        // Width of the left slide control of the list
78        OPERATE_DELETE_WIDTH: 80,
79        OPERATE_UNREAD_WIDTH: 128,
80        // Number of SIM cards
81        SIM_COUNT: 2,
82        // sim card 1
83        SIM_ONE: 0,
84        // sim card2
85        SIM_TWO: 1,
86        // 550 Default Height
87        TAB_HEIGHT: 550,
88        // 550+720tab Full screen height
89        FULL_HEIGHT: 550 + 720,
90        // Cancel SMS Countdown
91        CANCEL_TIME_COUNT: 6,
92        // Number of words in full screen
93        FULL_SCREEN_SEND_LENGTH: 38,
94        EVENT_SIM_STATE_CHANGE: 1,
95        EVENT_SLOTID_CHANGE: 2,
96    },
97    string: {
98        SMS_TYPE: '0',
99        // Empty String
100        EMPTY_STR: '',
101        // comma
102        COMMA: ',',
103        // bundleName
104        BUNDLE_NAME: 'com.ohos.mms',
105        // abilityName
106        ABILITY_NAME: 'com.ohos.mms.MainAbility',
107        // BundleName of a contact.
108        CONTACT_BUNDLE_NAME: 'com.ohos.contacts',
109        // contact AbilityName
110        CONTACT_ABILITY_NAME: 'com.ohos.contacts.MainAbility',
111        // Public entity
112        COMMON_ENTITIES: 'entity.system.home',
113        // Processing succeeded.
114        SUCCESS: 'success',
115        // Storage path of the lightweight preference database
116        PATH_OF_PREFERENCES: '/PREFERENCES_FOR_MMS',
117        // Notification information integration
118        KEY_OF_INTEGRATION_SWITCH: 'integrationSwitch',
119        // Malicious Website Identification
120        KEY_OF_MALICIOUS_WEB_SWITCH: 'maliciousWebSwitch',
121        // Display contact avatar
122        KEY_OF_SHOW_CONTACT_SWITCH: 'showContactSwitch',
123        // Delivery Report
124        KEY_OF_DELIVERY_REPORT_SWITCH: 'deliveryReportSwitch',
125        // Automatically downloading MMs
126        KEY_OF_AUTO_RETRIEVE_SWITCH: 'autoRetrieveMmsSwitch',
127        // Cancel Sending
128        KEY_OF_RECALL_MESSAGE_SWITCH: 'recallMessageSwitch',
129        // Automatically delete notification information
130        KEY_OF_AUTO_DELETE_INFO_SWITCH: 'autoDeleteInfoSwitch',
131        // Number of SIM cards
132        KEY_OF_SIM_COUNT: 'simCount',
133        // Carrier name of SIM card 1
134        KEY_OF_SIM_0_SPN: 'simSpn0',
135        // Carrier name of SIM card 2
136        KEY_OF_SIM_1_SPN: 'simSpn1',
137        // Whether SIM card 1 exists
138        KEY_OF_SIM_0_EXIST_FLAG: 'simExistFlag0',
139        // Whether SIM card 2 exists
140        KEY_OF_SIM_1_EXIST_FLAG: 'simExistFlag1',
141        // If the SMSC number of SIM card 1 is changed, the new SMSC number is changed.
142        KEY_OF_NEW_SIM_0_SMSC: 'newSimSmsc0',
143        // If the SMSC number of SIM card 2 is changed, the new SMSC number is changed.
144        KEY_OF_NEW_SIM_1_SMSC: 'newSimSmsc1',
145        // Mobile number of the SIM card
146        KEY_OF_SIM_0_NUMBER: 'sim_0_number',
147        KEY_OF_SIM_1_NUMBER: 'sim_1_number',
148        KEY_OF_SELECTED_SLOTID: 'selected_slotId',
149        KEY_OF_MAX_SIM_COUNT: 'maxSimCount',
150        KEY_OF_HAVE_MULTI_SIM_CARD_READY: 'haveMultiSimCardReady',
151        KEY_OF_HAVE_SIM_CARD_READY: 'haveSimCardReady',
152        KEY_OF_DEFAULT_SLOT: 'defaultSlot',
153        // Events for Subscribing to Notifications     usual.event.SMS_RECEIVE_COMPLETED
154        SUBSCRIBER_EVENT: 'usual.event.SMS_RECEIVE_COMPLETED',
155        // Receiving and forwarding
156        RECEIVE_TRANSMIT_EVENT: 'usual.event.RECEIVE_COMPLETED_TRANSMIT',
157        // MMS message receiving event
158        MMS_SUBSCRIBER_EVENT: 'usual.event.MMS_RECEIVE_COMPLETED',
159        // Contact database
160        URI_ROW_CONTACTS: 'datashare:///com.ohos.contactsdataability',
161        // Contact Information
162        CONTACT_DATA_URI: '/contacts/contact_data',
163        // Business Card Contact
164        PROFILE_DATA_URI: '/profile/raw_contact',
165        // Querying Contacts
166        CONTACT_SEARCHE: '/contacts/search_contact',
167        // Contact Information
168        CONTACT_URI: '/contacts/contact',
169        // SMS database
170        URI_MESSAGE_LOG: 'datashare:///com.ohos.smsmmsability',
171        // sms_mms_info table
172        URI_MESSAGE_INFO_TABLE: '/sms_mms/sms_mms_info',
173        // session table
174        URI_MESSAGE_SESSION_TABLE: '/sms_mms/session',
175        // Statistic
176        URI_MESSAGE_UNREAD_COUNT: '/sms_mms/sms_mms_info/unread_total',
177        // Get the largest groupID
178        URI_MESSAGE_MAX_GROUP: '/sms_mms/sms_mms_info/max_group',
179        // Querying MMS Messages
180        URI_MESSAGE_MMS_PART: '/sms_mms/mms_part',
181        AUDIO_NAME: 'recording2021111512454545.amr',
182        // MMSC
183        MMS_URL: 'http://mmsc.monternet.com'
184    },
185    DELIVERY_REPORTS: {
186        // Closed
187        DISABLED: '0',
188        // SMS
189        SMS: '1',
190        // MMS
191        MMS: '2',
192        // SMS and MMS
193        SMS_AND_MMS: '3'
194    },
195    AUTO_RETRIEVE_MMS: {
196        // OFF
197        OFF: '0',
198        // Non-roaming
199        NOT_WHEN_ROAMING: '1',
200        // All networks
201        ALWAYS: '2'
202    },
203    SPN_CHINA: {
204        // TELECOM
205        TELECOM: '中国电信',
206        // MOBILE
207        MOBILE: 'CMCC',
208        // UNICOM
209        UNICOM: 'China Unicom',
210    },
211    contactPage: {
212        // Go to New Contact
213        PAGE_FLAG_SAVE_CONTACT: 'page_flag_save_contact',
214        // Edit Before Call
215        PAGE_FLAG_EDIT_BEFORE_CALLING: 'page_flag_edit_before_calling',
216        // Save to Existing Contacts
217        PAGE_FLAG_SAVE_EXIST_CONTACT: 'page_flag_save_exist_contact',
218        // The page for selecting a contact is displayed after an SMS message is sent.
219        PAGE_FLAG_SINGLE_CHOOSE: 'page_flag_single_choose',
220        // Select Contact List Page
221        PAGE_FLAG_CHOOSE_CONTACTS: 'page_flag_choose_contacts',
222        // Contact details page
223        PAGE_FLAG_CONTACT_DETAILS: 'page_flag_contact_details',
224        // The My Business Card page is displayed.
225        PAGE_FLAG_CALLING_CARD: 'page_flag_card_details',
226        // Querying MMS Data
227        URI_MESSAGE_MMS_PART: '/sms_mms/mms_part'
228    },
229    MESSAGE_TAB_INDEX: {
230        TAB_CAMERA: 0,
231        TAB_PICTURE: 1,
232        TAB_AUDIO: 2,
233        TAB_MORE: 3
234    },
235    HIGHLIGHT_TYPE: {
236        // Common data
237        NORMAL: 0,
238        // email
239        EMAIL: 1,
240        // Website
241        URL: 2,
242        // Telephone
243        TEL: 3,
244        // Time
245        DATE: 4,
246        // Verification Code
247        NUM: 5
248    },
249    MESSAGE_TYPE: {
250        // General Information
251        NORMAL: 0,
252        // theme
253        THEME: 1,
254        // slideshow
255        PPT: 2,
256        // Themes and Slides
257        THEME_AND_PPT: 3,
258    },
259    MESSAGE_SHOW_TYPE: {
260        // Common SM style
261        NORMAL: 0,
262        // Does not contain the picture theme style
263        THEME_NO_IMAGE: 1,
264        // Does not include picture slide styles
265        PPT_NO_IMAGE: 2,
266        // Slideshow Styles with Pictures
267        PPT_IMAGE: 3,
268        // Include Image Theme Styles
269        THEME_IMAGE: 4
270    },
271    MSG_ITEM_TYPE: {
272        THEME: 0,
273        IMAGE: 1,
274        VIDEO: 2,
275        AUDIO: 3,
276        TEXT: 4,
277        CARD: 5
278    },
279    TRANSMIT_ITEM_HEIGHT: {
280        TEXT_HEIGHT: 150,
281        THEME_HEIGHT: 200,
282        THEME_IMAGE_HEIGHT: 300,
283        PPT_IMAGE_HEIGHT: 220,
284        DISTANCE: 20,
285        TOTAL_HEIGHT: 650
286    },
287    RUN_IN_WORKER_METHOD: {
288        // Contacts
289        queryContactDataByCondition: 'queryContactDataByCondition',
290        queryContactDataSizeByCondition: 'queryContactDataSizeByCondition',
291        queryContactByCondition: 'queryContactByCondition',
292        queryContactSizeByCondition: 'queryContactSizeByCondition',
293        queryRawContactSizeByCondition: 'queryRawContactSizeByCondition',
294        queryContactViewByCondition: 'queryContactViewByCondition',
295        // detail
296        insertSmsMmsInfo: 'insertSmsMmsInfo',
297        deleteSmsMmsInfoByCondition: 'deleteSmsMmsInfoByCondition',
298        updateSmsMmsInfoByCondition: 'updateSmsMmsInfoByCondition',
299        querySmsMmsInfoByCondition: 'querySmsMmsInfoByCondition',
300        querySmsMmsInfoSizeByCondition: 'querySmsMmsInfoSizeByCondition',
301        queryMaxGroupId: 'queryMaxGroupId',
302        statisticalData: 'statisticalData',
303        // list
304        insertSession: 'insertSession',
305        deleteSessionByCondition: 'deleteSessionByCondition',
306        updateSessionByCondition: 'updateSessionByCondition',
307        querySessionByCondition: 'querySessionByCondition',
308        querySessionSizeByCondition: 'querySessionSizeByCondition'
309    },
310    sms_type: {
311        COMMON: 0,
312        NOTICE: 1
313    },
314    is_read: {
315        UN_READ: 0,
316        READ: 1
317    },
318    session_type: {
319        COMMON: 0,
320        BROADCAST: 1,
321        GROUP_SEND: 2
322    },
323    is_lock: {
324        NO: 0,
325        YES: 1
326    },
327    is_collect: {
328        NOT_FAVORITE: 0,
329        FAVORITE: 1
330    },
331    is_send_report: {
332        NO: 0,
333        YES: 1
334    },
335    is_sender: {
336        NO: 0,
337        YES: 1
338    },
339    has_draft: {
340        NO: 0,
341        HAVE: 1
342    },
343    has_mms: {
344        NO: 0,
345        HAVE: 1
346    },
347    has_attachment: {
348        NO: 0,
349        HAVE: 1
350    },
351}