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 CONTRACT_BUNDLE_NAME: "com.ohos.contacts", 109 // contact AbilityName 110 CONTRACT_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 // Querying SMs 172 URI_MESSAGE_INFO_TABLE: "/sms_mms/sms_mms_info", 173 // Statistic 174 URI_MESSAGE_UNREAD_COUNT: "/sms_mms/sms_mms_info/unread_total", 175 // Get the largest groupID 176 URI_MESSAGE_MAX_GROUP: "/sms_mms/sms_mms_info/max_group", 177 // Querying MMS Messages 178 URI_MESSAGE_MMS_PART: "/sms_mms/mms_part", 179 AUDIO_NAME: "recording2021111512454545.amr", 180 // MMSC 181 MMS_URL: "http://mmsc.monternet.com" 182 }, 183 DELIVERY_REPORTS: { 184 // Closed 185 DISABLED: "0", 186 // SMS 187 SMS: "1", 188 // MMS 189 MMS: "2", 190 // SMS and MMS 191 SMS_AND_MMS: "3" 192 }, 193 AUTO_RETRIEVE_MMS: { 194 // OFF 195 OFF: "0", 196 // Non-roaming 197 NOT_WHEN_ROAMING: "1", 198 // All networks 199 ALWAYS: "2" 200 }, 201 SPN_CHINA: { 202 // TELECOM 203 TELECOM: "中国电信", 204 // MOBILE 205 MOBILE: "CMCC", 206 // UNICOM 207 UNICOM: "China Unicom", 208 }, 209 contractPage: { 210 // Go to New Contact 211 PAGE_FLAG_SAVE_CONTACT: "page_flag_save_contact", 212 // Edit Before Call 213 PAGE_FLAG_EDIT_BEFORE_CALLING: "page_flag_edit_before_calling", 214 // Save to Existing Contacts 215 PAGE_FLAG_SAVE_EXIST_CONTACT: "page_flag_save_exist_contact", 216 // The page for selecting a contact is displayed after an SMS message is sent. 217 PAGE_FLAG_SINGLE_CHOOSE: "page_flag_single_choose", 218 // Select Contact List Page 219 PAGE_FLAG_CHOOSE_CONTACTS: "page_flag_choose_contacts", 220 // Contact details page 221 PAGE_FLAG_CONTACT_DETAILS: "page_flag_contact_details", 222 // The My Business Card page is displayed. 223 PAGE_FLAG_CALLING_CARD: "page_flag_card_details", 224 // Querying MMS Data 225 URI_MESSAGE_MMS_PART: "/sms_mms/mms_part" 226 }, 227 MESSAGE_TAB_INDEX: { 228 TAB_CAMERA: 0, 229 TAB_PICTURE: 1, 230 TAB_AUDIO: 2, 231 TAB_MORE: 3 232 }, 233 HIGHLIGHT_TYPE: { 234 // Common data 235 NORMAL: 0, 236 // email 237 EMAIL: 1, 238 // Website 239 URL: 2, 240 // Telephone 241 TEL: 3, 242 // Time 243 DATE: 4, 244 // Verification Code 245 NUM: 5 246 }, 247 MESSAGE_TYPE: { 248 // General Information 249 NORMAL: 0, 250 // theme 251 THEME: 1, 252 // slideshow 253 PPT: 2, 254 // Themes and Slides 255 THEME_AND_PPT: 3, 256 }, 257 MESSAGE_SHOW_TYPE: { 258 // Common SM style 259 NORMAL: 0, 260 // Does not contain the picture theme style 261 THEME_NO_IMAGE: 1, 262 // Does not include picture slide styles 263 PPT_NO_IMAGE: 2, 264 // Slideshow Styles with Pictures 265 PPT_IMAGE: 3, 266 // Include Image Theme Styles 267 THEME_IMAGE: 4 268 }, 269 MSG_ITEM_TYPE: { 270 THEME: 0, 271 IMAGE: 1, 272 VIDEO: 2, 273 AUDIO: 3, 274 TEXT: 4, 275 CARD: 5 276 }, 277 TRANSMIT_ITEM_HEIGHT: { 278 TEXT_HEIGHT: 150, 279 THEME_HEIGHT: 200, 280 THEME_IMAGE_HEIGHT: 300, 281 PPT_IMAGE_HEIGHT: 220, 282 DISTANCE: 20, 283 TOTAL_HEIGHT: 650 284 } 285}