1 /* 2 * Copyright (c) 2023-2025 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_DP_DISTRIBUTED_DEVICE_PROFILE_CONSTANTS_H 17 #define OHOS_DP_DISTRIBUTED_DEVICE_PROFILE_CONSTANTS_H 18 19 #include <unordered_set> 20 #include <string> 21 #include <unistd.h> 22 23 #ifdef __LP64__ 24 constexpr const char* LIB_LOAD_PATH = "/system/lib64/"; 25 constexpr const char* DMS_LIB_LOAD_PATH = "/system/lib64/platformsdk/"; 26 #else 27 constexpr const char* LIB_LOAD_PATH = "/system/lib/"; 28 constexpr const char* DMS_LIB_LOAD_PATH = "/system/lib/platformsdk/"; 29 #endif 30 31 namespace OHOS { 32 namespace DistributedDeviceProfile { 33 /* DeviceProfile Attribute */ 34 extern const std::string DEVICE_ID; 35 extern const std::string DEVICE_TYPE_ID; 36 extern const std::string DEVICE_TYPE_NAME; 37 extern const std::string DEVICE_NAME; 38 extern const std::string MANUFACTURE_NAME; 39 extern const std::string DEVICE_MODEL; 40 extern const std::string STORAGE_CAPACITY; 41 extern const std::string OS_SYS_CAPACITY; 42 extern const std::string OS_API_LEVEL; 43 extern const std::string OS_VERSION; 44 extern const std::string OS_TYPE; 45 extern const std::string TYPE; 46 extern const std::string OH_PROFILE_SUFFIX; 47 extern const std::string ID; 48 extern const std::string DEV_TYPE; 49 extern const std::string MANU; 50 extern const std::string SN; 51 extern const std::string PRODUCT_ID; 52 extern const std::string PRODUCT_NAME; 53 extern const std::string SUB_PRODUCT_ID; 54 extern const std::string HIV; 55 extern const std::string MAC; 56 extern const std::string BLE_MAC; 57 extern const std::string BR_MAC; 58 extern const std::string SLE_MAC; 59 extern const std::string FWV; 60 extern const std::string HWV; 61 extern const std::string SWV; 62 extern const std::string PROT_TYPE; 63 extern const std::string SETUP_TYPE; 64 extern const std::string WISE_USER_ID; 65 extern const std::string WISE_DEVICE_ID; 66 extern const std::string ROOM_NAME; 67 extern const std::string REGISTER_TIME; 68 extern const std::string MODIFY_TIME; 69 extern const std::string SHARE_TIME; 70 extern const std::string PRODUCTOR_INFO_VERSION; 71 extern const std::string INTERNAL_MODEL; 72 extern const std::string DEVICE_PROFILE_TABLE; 73 extern const std::string DEVICE_ICON_INFO_TABLE; 74 extern const std::string PRODUCT_INFO_TABLE; 75 extern const std::string SYSTEM; 76 extern const std::string RDB_TYPE_TEXT; 77 extern const std::string RESULT; 78 /* ServiceProfile Attribute */ 79 extern const std::string SERVICE_NAME; 80 extern const std::string SERVICE_PROFILE_SERVICE_ID; 81 extern const std::string SERVICE_TYPE; 82 extern const std::string SERVICE_PROFILE_TABLE; 83 extern const std::string RDB_USER_ID; 84 extern const std::string SERVICE_PROFILE_DEVICE_PROFILE_ID; 85 extern const std::string SERVICE_PROFILE_SERVICE_TYPE; 86 /* CharacteristicProfile Attribute */ 87 extern const std::string SERVICE_PROFILE_ID; 88 extern const std::string CHARACTERISTIC_PROFILE_TABLE; 89 extern const std::string CHARACTERISTIC_KEY; 90 extern const std::string CHARACTERISTIC_VALUE; 91 /* ProductInfo Attribute */ 92 extern const std::string PRODUCT_NAME; 93 extern const std::string PRODUCT_SHORT_NAME; 94 extern const std::string IMAGE_VERSION; 95 /* DeviceIconInfo Attribute */ 96 extern const std::string IMAGE_TYPE; 97 extern const std::string SPEC_NAME; 98 extern const std::string DEVICE_ICON; 99 extern const std::string DEVICE_ICON_VERSION; 100 extern const std::string DEVICE_ICON_URL; 101 /* ServiceInfoProfile Attribute */ 102 extern const std::string SRNETWORK_ID; 103 extern const std::string SISERVICE_ID; 104 extern const std::string SERVICE_DISPLAY_NAME; 105 extern const std::string CUSTOM_DATA; 106 extern const std::string CUSTOM_DATA_LEN; 107 extern const std::string BUNDLE_NAME; 108 extern const std::string MODULE_NAME; 109 extern const std::string ABILITY_NAME; 110 extern const std::string AUTH_BOX_TYPE; 111 extern const std::string AUTH_TYPE; 112 extern const std::string PIN_EXCHANGE_TYPE; 113 extern const std::string PINCODE; 114 extern const std::string DESCRIPTION; 115 extern const std::string SERVICE_DISCOVERY_SCOPE; 116 extern const std::string EXTRAINFO; 117 extern const std::string PUT_SERVICE_INFO_PROFILE; 118 extern const std::string DELETE_SERVICE_INFO_PROFILE; 119 extern const std::string UPDATE_SERVICE_INFO_PROFILE; 120 extern const std::string GET_SERVICE_INFO_PROFILE_BY_UNIQUE_KEY; 121 extern const std::string GET_SERVICE_INFO_PROFILE_LIST_BY_TOKEN_ID; 122 extern const std::string GET_ALL_SERVICE_INFO_PROFILE_LIST; 123 extern const std::string GET_SERVICE_INFO_PROFILE_LIST_BY_BUNDLE_NAME; 124 /* LocalServiceInfo Attribute */ 125 extern const std::string PUT_LOCAL_SERVICE_INFO; 126 extern const std::string UPDATE_LOCAL_SERVICE_INFO; 127 extern const std::string GET_LOCAL_SERVICE_INFO_BY_BINDLE_AND_PINTYPE; 128 extern const std::string DELETE_LOCAL_SERVICE_INFO; 129 /* TrustDeviceProfile Attribute */ 130 extern const std::string SUBSCRIBE_TRUST_DEVICE_PROFILE; 131 extern const std::string DEVICE_ID_TYPE; 132 extern const std::string DEVICE_ID_HASH; 133 extern const std::string PEER_USER_ID; 134 extern const std::string LOCAL_USER_ID; 135 /* AccessControlProfile Attribute */ 136 extern const std::string ACCESS_CONTROL_ID; 137 extern const std::string ACCESSER_ID; 138 extern const std::string ACCESSEE_ID; 139 extern const std::string TRUST_DEVICE_ID; 140 extern const std::string SESSION_KEY; 141 extern const std::string BIND_TYPE; 142 extern const std::string AUTHENTICATION_TYPE; 143 extern const std::string BIND_LEVEL; 144 extern const std::string STATUS; 145 extern const std::string VALID_PERIOD; 146 extern const std::string LAST_AUTH_TIME; 147 extern const std::string EXTRA_DATA; 148 /* Accesser Attribute */ 149 extern const std::string ACCESSER_DEVICE_ID; 150 extern const std::string ACCESSER_USER_ID; 151 extern const std::string ACCESSER_ACCOUNT_ID; 152 extern const std::string ACCESSER_TOKEN_ID; 153 extern const std::string ACCESSER_BUNDLE_NAME; 154 extern const std::string ACCESSER_HAP_SIGNATURE; 155 extern const std::string ACCESSER_BIND_LEVEL; 156 extern const std::string ACCESSER_DEVICE_NAME; 157 extern const std::string ACCESSER_SERVICE_NAME; 158 extern const std::string ACCESSER_CREDENTIAL_ID; 159 extern const std::string ACCESSER_CREDENTIAL_ID_STR; 160 extern const std::string ACCESSER_STATUS; 161 extern const std::string ACCESSER_SESSION_KEY_ID; 162 extern const std::string ACCESSER_SESSION_KEY_TIMESTAMP; 163 extern const std::string ACCESSER_EXTRA_DATA; 164 /* Accessee Attribute */ 165 extern const std::string ACCESSEE_DEVICE_ID; 166 extern const std::string ACCESSEE_USER_ID; 167 extern const std::string ACCESSEE_ACCOUNT_ID; 168 extern const std::string ACCESSEE_TOKEN_ID; 169 extern const std::string ACCESSEE_BUNDLE_NAME; 170 extern const std::string ACCESSEE_HAP_SIGNATURE; 171 extern const std::string ACCESSEE_BIND_LEVEL; 172 extern const std::string ACCESSEE_DEVICE_NAME; 173 extern const std::string ACCESSEE_SERVICE_NAME; 174 extern const std::string ACCESSEE_CREDENTIAL_ID; 175 extern const std::string ACCESSEE_CREDENTIAL_ID_STR; 176 extern const std::string ACCESSEE_STATUS; 177 extern const std::string ACCESSEE_SESSION_KEY_ID; 178 extern const std::string ACCESSEE_SESSION_KEY_TIMESTAMP; 179 extern const std::string ACCESSEE_EXTRA_DATA; 180 /* subscribe info */ 181 extern const std::string SA_ID; 182 extern const std::string SUBSCRIBE_KEY; 183 extern const std::string SUBSCRIBE_CHANGE_TYPES; 184 /* syncOptions */ 185 extern const std::string SYNC_MODE; 186 extern const std::string SYNC_DEVICE_IDS; 187 /* Interface Name */ 188 extern const std::string PUT_SESSION_KEY; 189 extern const std::string GET_SESSION_KEY; 190 extern const std::string UPDATE_SESSION_KEY; 191 extern const std::string DELETE_SESSION_KEY; 192 extern const std::string PUT_ACCESS_CONTROL_PROFILE; 193 extern const std::string UPDATE_ACCESS_CONTROL_PROFILE; 194 extern const std::string GET_ACCESS_CONTROL_PROFILE; 195 extern const std::string DELETE_ACCESS_CONTROL_PROFILE; 196 extern const std::string GET_TRUST_DEVICE_PROFILE; 197 extern const std::string GET_ALL_TRUST_DEVICE_PROFILE; 198 extern const std::string GET_ALL_ACCESS_CONTROL_PROFILE; 199 extern const std::string GET_ALL_ACL_INCLUDE_LNN_ACL; 200 extern const std::string PUT_SERVICE_PROFILE; 201 extern const std::string PUT_SERVICE_PROFILE_BATCH; 202 extern const std::string PUT_CHARACTERISTIC_PROFILE; 203 extern const std::string PUT_CHARACTERISTIC_PROFILE_BATCH; 204 extern const std::string GET_DEVICE_PROFILE; 205 extern const std::string GET_SERVICE_PROFILE; 206 extern const std::string GET_CHARACTERISTIC_PROFILE; 207 extern const std::string DELETE_SERVICE_PROFILE; 208 extern const std::string DELETE_CHARACTERISTIC_PROFILE; 209 extern const std::string SUBSCRIBE_DEVICE_PROFILE; 210 extern const std::string UNSUBSCRIBE_DEVICE_PROFILE; 211 extern const std::string SYNC_DEVICE_PROFILE; 212 extern const std::string PUT_ALL_TRUSTED_DEVICES; 213 extern const std::string PUT_DEVICE_PROFILE_BATCH; 214 extern const std::string DELETE_DEVICE_PROFILE_BATCH; 215 extern const std::string GET_DEVICE_PROFILES; 216 extern const std::string PUT_PRODUCT_INFO_BATCH; 217 extern const std::string PUT_DEVICE_ICON_INFO_BATCH; 218 extern const std::string GET_DEVICE_ICON_INFOS; 219 /* Common constants */ 220 constexpr int32_t MIN_STRING_LEN = 0; 221 constexpr int32_t MAX_STRING_LEN = 4096; 222 constexpr int64_t MIN_STORAGE_KB = 0; 223 constexpr int64_t MAX_STORAGE_KB = 5368709120; 224 constexpr int32_t MIN_OS_API_LEVEL = 0; 225 constexpr int32_t MAX_OS_API_LEVEL = 10000; 226 constexpr int32_t MIN_OS_TYPE = 0; 227 constexpr int32_t MAX_OS_TYPE = 10000; 228 constexpr int32_t MAX_PARAM_SIZE = 20; 229 constexpr int32_t MAX_PROFILE_SIZE = 10000; 230 constexpr int32_t MAX_DEVICE_SIZE = 1000; 231 constexpr int32_t MAX_SERVICE_SIZE = 1000; 232 constexpr int32_t MAX_CHAR_SIZE = 1000; 233 constexpr int32_t MAX_DB_SIZE = 1000; 234 constexpr int32_t MAX_DUMP_ARGS_SIZE = 1000; 235 constexpr int32_t MAX_LISTENER_SIZE = 100; 236 constexpr int32_t MAX_EVENT_HANDLER_SIZE = 50; 237 constexpr int32_t MAX_DB_RECORD_SIZE = 10000; 238 constexpr int32_t MAX_SUBSCRIBE_CHANGE_SIZE = 6; 239 constexpr int32_t MAX_INTERFACE_SIZE = 60; 240 constexpr int32_t MAX_SUBSCRIBE_INFO_SIZE = 500; 241 constexpr int32_t MAX_SYNC_RESULTS_SIZE = 50; 242 constexpr int32_t MAX_STATIC_CAPABILITY_SIZE = 100; 243 constexpr int32_t MAX_ID_SIZE = 1000; 244 constexpr int32_t MAX_ICON_SIZE = 4*1024*1024; 245 constexpr int32_t MIN_USER_ID = 0; 246 constexpr int32_t MAX_USER_ID = 100000; 247 constexpr uint32_t MAX_TRUSTED_DEVICE_SIZE = 1000; 248 constexpr int32_t MAX_SESSIONKEY_SIZE = 8*1024; 249 constexpr int32_t US_100000 = 100000; 250 constexpr int32_t US_200000 = 200000; 251 constexpr int32_t US_300000 = 300000; 252 constexpr int32_t US_400000 = 400000; 253 constexpr int32_t US_500000 = 500000; 254 extern const std::string IS_MULTI_USER; 255 extern const std::string SEPARATOR; 256 extern const std::string SLASHES; 257 extern const std::string DEV_PREFIX; 258 extern const std::string SVR_PREFIX; 259 extern const std::string CHAR_PREFIX; 260 extern const std::string USER_ID; 261 extern const std::string TOKEN_ID; 262 extern const std::string DEVICE_PROFILE_ID; 263 extern const std::string ALL_PROC; 264 extern const std::string TYPE_UNKNOWN; 265 extern const std::string TYPE_PHONE; 266 extern const std::string TYPE_PAD; 267 extern const std::string TYPE_TV; 268 extern const std::string TYPE_CAR; 269 extern const std::string TYPE_WATCH; 270 extern const std::string TYPE_PC; 271 extern const std::string TYPE_2IN1; 272 extern const std::string HIV_VERSION; 273 extern const std::string INVALID_PINCODE; 274 constexpr int32_t NUM_1 = 1; 275 constexpr int32_t NUM_2 = 2; 276 constexpr int32_t NUM_3 = 3; 277 constexpr int32_t NUM_4 = 4; 278 constexpr int32_t NUM_5 = 5; 279 constexpr int32_t NUM_6 = 6; 280 constexpr int32_t NUM_16 = 16; 281 constexpr int32_t DEFAULT_USER_ID = -1; 282 constexpr int32_t DEFAULT_USER_ID_EXTRA = 0; 283 constexpr int32_t U_100 = 100; 284 constexpr int64_t DEFAULT_SERVICE_ID = -1; 285 constexpr int32_t DEFAULT_ID = -1; 286 constexpr int32_t DEFAULT_SERVICE_PROFILE_ID = -1; 287 constexpr int32_t DEFAULT_DEVICE_PROFILE_ID = -1; 288 constexpr int32_t DEFAULT_AUTH_BOX_TYPE = -1; 289 constexpr int32_t DEFAULT_AUTH_TYPE = -1; 290 constexpr int32_t DEFAULT_PIN_EXCHANGE_TYPE = -1; 291 constexpr uint32_t NUM_1U = 1; 292 constexpr uint32_t NUM_8U = 8; 293 constexpr uint16_t CUR_SWITCH_LEN = 5; 294 extern const std::string DP_PKG_NAME; 295 extern const std::string IS_NUMSTRING_RULES; 296 constexpr int32_t OHOS_TYPE = 10; 297 constexpr int32_t OHOS_TYPE_UNKNOWN = -1; 298 /* rdb constants */ 299 extern const std::string RDB_PATH; 300 extern const std::string DATABASE_NAME; 301 constexpr int32_t RDB_VERSION = 1; 302 constexpr int32_t RDB_VERSION_5_1 = 2; 303 constexpr int32_t RDB_VERSION_5_1_2 = 3; 304 constexpr int32_t RDB_INIT_MAX_TIMES = 30; 305 constexpr int32_t RDB_INIT_INTERVAL_TIME = 100000; 306 /* TrustProfile Manager */ 307 extern const std::string USERID; 308 extern const std::string BUNDLENAME; 309 extern const std::string TOKENID; 310 extern const std::string ACCOUNTID; 311 extern const std::string PRODUCTID; 312 extern const std::string DEVICEID_EQUAL_CONDITION; 313 extern const std::string ACCESSCONTROLID_EQUAL_CONDITION; 314 extern const std::string ACCESSERID_EQUAL_CONDITION; 315 extern const std::string ACCESSEEID_EQUAL_CONDITION; 316 extern const std::string IS_LNN_ACL; 317 extern const std::string LNN_ACL_TRUE; 318 extern const std::string BUSINESS_KEY; 319 extern const std::string BUSINESS_VALUE; 320 321 constexpr int32_t ROWCNT_INIT = -1; 322 constexpr int32_t RET_INIT = -1; 323 constexpr int32_t ROWCOUNT_INIT = -1; 324 constexpr int32_t CHANGEROWCNT_INIT = -1; 325 constexpr int32_t CHANGEROWCNT_INIT_ID = -1; 326 constexpr int32_t COLUMNINDEX_INIT = -1; 327 constexpr int32_t STATUS_INIT = 0; 328 constexpr int32_t STATUS_ACTIVE = 1; 329 constexpr int32_t STATUS_INACTIVE = 0; 330 constexpr int32_t BINDTYPE_INIT = -1; 331 constexpr int32_t BINDLEVEL_INIT = -1; 332 constexpr int32_t DELETEROWS_INIT = -1; 333 constexpr int32_t DELETE_ACCESSER_CONDITION = 1; 334 constexpr int32_t DELETE_ACCESSEE_CONDITION = 1; 335 constexpr int32_t DELETE_TRUST_CONDITION = 0; 336 constexpr int32_t MAX_SAID = 16777215; 337 constexpr int64_t ROWID_INIT = -1; 338 constexpr int64_t DEVICE_PROFILE_ID_INIT = -1; 339 constexpr int64_t ACCESSERID_INIT = -1; 340 constexpr int64_t ACCESSEEID_INIT = -1; 341 constexpr int64_t ACCESSCONTROLID_INIT = -1; 342 extern const std::string CREATE_TURST_DEVICE_TABLE_SQL; 343 extern const std::string CREATE_ACCESS_CONTROL_TABLE_SQL; 344 extern const std::string CREATE_ACCESSER_TABLE_SQL; 345 extern const std::string CREATE_ACCESSEE_TABLE_SQL; 346 extern const std::string CREATE_TURST_DEVICE_TABLE_UNIQUE_INDEX_SQL; 347 extern const std::string CREATE_ACCESS_CONTROL_TABLE_UNIQUE_INDEX_SQL; 348 extern const std::string CREATE_ACCESSER_TABLE_UNIQUE_INDEX_SQL; 349 extern const std::string CREATE_ACCESSEE_TABLE_UNIQUE_INDEX_SQL; 350 extern const std::string PRAGMA_ACCESSEE_TABLE; 351 extern const std::string DROP_OLD_UNIQUE_INDEX_ON_ACER; 352 extern const std::string DROP_OLD_UNIQUE_INDEX_ON_ACEE; 353 extern const std::string ALTER_TABLE_ACCESS_CONTROL_ADD_COLUMN_EXTRA_DATA; 354 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_DEVICE_NAME; 355 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_SERVICE_NAME; 356 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_CREDENTIAL_ID; 357 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_CREDENTIAL_ID_STR; 358 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_STATUS; 359 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_SESSION_KEY_ID; 360 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_SESSION_KEY_TIMESTAMP; 361 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_EXTRA_DATA; 362 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_DEVICE_NAME; 363 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_SERVICE_NAME; 364 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_CREDENTIAL_ID; 365 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_CREDENTIAL_ID_STR; 366 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_STATUS; 367 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_SESSION_KEY_ID; 368 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_SESSION_KEY_TIMESTAMP; 369 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_EXTRA_DATA; 370 extern const std::string TRUST_DEVICE_TABLE; 371 extern const std::string ACCESS_CONTROL_TABLE; 372 extern const std::string ACCESSER_TABLE; 373 extern const std::string ACCESSEE_TABLE; 374 extern const std::string SELECT_TRUST_DEVICE_TABLE; 375 extern const std::string SELECT_TRUST_DEVICE_TABLE_WHERE_DEVICEID; 376 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSCONTROLID; 377 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSEEID; 378 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSERID; 379 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_BINDTYPE_AND_STATUS; 380 extern const std::string SELECT_ACCESS_CONTROL_TABLE; 381 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID; 382 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID_AND_STATUS; 383 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_STATUS; 384 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID; 385 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID; 386 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERTOKENID; 387 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEETOKENID; 388 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERBUNDLENAME; 389 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEEBUNDLENAME; 390 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERACCOUNTID; 391 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEEACCOUNTID; 392 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID; 393 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSERID; 394 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERTOKENID; 395 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEETOKENID; 396 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_DEVICEID_AND_ACCESSERTOKENID; 397 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_DEVICEID_AND_ACCESSEETOKENID; 398 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_DEVICEID_AND_USERID; 399 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_DEVICEID_AND_USERID; 400 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERDEVICEID; 401 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEDEVICEID; 402 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERBUNDLENAME; 403 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEBUNDLENAME; 404 extern const std::string SELECT_ACCESSEE_TABLE; 405 extern const std::string SELECT_ACCESSER_TABLE; 406 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ALL_EXCEPT_STATUS; 407 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ALL; 408 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ALL; 409 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERDEVICEID_AND_ACCESSERUSERID; 410 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEDEVICEID_AND_ACCESSEEUSERID; 411 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSERID_AND_ACCESSEEID; 412 extern const std::string TABLE_EXIST_COLUMN_SQL; 413 /* SubscribeTrustInfoManager */ 414 extern const std::string SUBSCRIBE_TRUST_INFO_TABLE; 415 extern const std::string CREATE_SUBSCRIBE_TRUST_INFO_TABLE_SQL; 416 extern const std::string CREATE_SUBSCRIBE_TRUST_INFO_TABLE_UNIQUE_INDEX_SQL; 417 extern const std::string TRUST_DEVICE_DELETE; 418 extern const std::string TRUST_DEVICE_ADD; 419 extern const std::string TRUST_DEVICE_UPDATE; 420 /* event handler factory */ 421 extern const std::string DP_HANDLER; 422 extern const std::string EMPTY_STRING; 423 /* switch attribute */ 424 extern const std::string SWITCH_CAPABILITY_PATH; 425 extern const std::string SWITCH_CALLERS; 426 extern const std::string SWITCH_SERVICE_NAMES; 427 extern const std::string SWITCH_STATUS; 428 extern const std::string SWITCH_ON; 429 extern const std::string SWITCH_OFF; 430 extern const std::string SWITCH_OPERATE_PUT; 431 extern const std::string SWITCH_OPERATE_GET; 432 /* static attribute */ 433 extern const std::string STATIC_CAPABILITY_SVR_ID; 434 extern const std::string STATIC_CAPABILITY_CHAR_ID; 435 extern const std::string STATIC_CAPABILITY_PATH; 436 extern const std::string STATIC_INFO_PATH; 437 extern const std::string STATIC_CAPABILITY_ATTRIBUTE; 438 extern const std::string STATIC_INFO; 439 extern const std::string DEFAULT_STATIC_VAL; 440 extern const std::string STATIC_CHARACTERISTIC_KEY; 441 extern const std::string STATIC_CAPABILITY_VERSION; 442 extern const std::string STATIC_CAPABILITY_VALUE; 443 extern const std::string DP_VERSION; 444 extern const std::string ABILITIES; 445 extern const std::string ABILITY_KEY; 446 extern const std::string ABILITY_VALUE; 447 constexpr char NOT_SUPPORT_STATIC_VAL = '0'; 448 constexpr char SUPPORT_STATIC_VAL = '1'; 449 extern const std::string STATIC_CAP_HANDLER_NAME; 450 extern const std::string STATIC_CAP_HANDLER_LOC; 451 extern const std::string DMS_HANDLER_LOC; 452 extern const std::string STATIC_VERSION_RULES; 453 constexpr uint32_t SWITCH_LENGTH_MAX = 24; 454 } // namespace DistributedDeviceProfile 455 } // namespace OHOS 456 #endif // OHOS_DP_DISTRIBUTED_DEVICE_PROFILE_CONSTANTS_H 457