1 /* 2 * Copyright (c) 2021-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_DISTRIBUTED_HARDWARE_CONSTANTS_H 17 #define OHOS_DISTRIBUTED_HARDWARE_CONSTANTS_H 18 19 #include <string> 20 #include <unistd.h> 21 22 namespace OHOS { 23 namespace DistributedHardware { 24 constexpr uint32_t MAX_DB_RECORD_SIZE = 10000; 25 constexpr uint32_t MAX_ONLINE_DEVICE_SIZE = 10000; 26 constexpr uint32_t MAX_DH_DESCRIPTOR_ARRAY_SIZE = 4096; 27 constexpr uint32_t EVENT_VERSION_INFO_DB_RECOVER = 101; 28 constexpr uint32_t EVENT_CAPABILITY_INFO_DB_RECOVER = 201; 29 constexpr uint32_t EVENT_DATA_SYNC_MANUAL = 301; 30 constexpr uint32_t EVENT_META_INFO_DB_RECOVER = 401; 31 32 const std::string RESOURCE_SEPARATOR = "###"; 33 const std::string DH_FWK_PKG_NAME = "ohos.dhardware"; 34 35 constexpr const char *APP_ID = "dtbhardware_manager_service"; 36 constexpr const char *DH_ID = "dh_id"; 37 constexpr const char *DEV_ID = "dev_id"; 38 constexpr const char *DEV_NAME = "dev_name"; 39 constexpr const char *DEV_TYPE = "dev_type"; 40 constexpr const char *DH_TYPE = "dh_type"; 41 constexpr const char *DH_ATTRS = "dh_attrs"; 42 constexpr const char *DH_SUBTYPE = "dh_subtype"; 43 constexpr const char *DEV_UDID_HASH = "udid_hash"; 44 constexpr const char *DH_VER = "dh_ver"; 45 constexpr const char *COMP_VER = "comp_ver"; 46 constexpr const char *NAME = "name"; 47 constexpr const char *TYPE = "type"; 48 constexpr const char *HANDLER = "handler"; 49 constexpr const char *SOURCE_VER = "source_ver"; 50 constexpr const char *SINK_VER = "sink_ver"; 51 constexpr const char *SOURCE_FEATURE_FILTER = "source_feature_filter"; 52 constexpr const char *SINK_SUPPORTED_FEATURE = "sink_supported_feature"; 53 constexpr const char *LOW_LATENCY_ENABLE = "low_latency_enable"; 54 constexpr const char *DO_RECOVER = "DoRecover"; 55 constexpr const char *SEND_ONLINE = "SendOnLine"; 56 constexpr const char *COMPONENTSLOAD_PROFILE_PATH = 57 "etc/distributedhardware/distributed_hardware_components_cfg.json"; 58 } // namespace DistributedHardware 59 } // namespace OHOS 60 #endif 61