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 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 int32_t LOG_MAX_LEN = 4096; 25 constexpr int32_t ENABLE_TIMEOUT_MS = 1000; 26 constexpr int32_t DISABLE_TIMEOUT_MS = 500; 27 const std::u16string DHMS_STUB_INTERFACE_TOKEN = u"ohos.distributedhardware.accessToken"; 28 const std::string COMPONENTSLOAD_PROFILE_PATH = R"(/etc/distributed_hardware_components_cfg.json)"; 29 const std::string APP_ID = "dtbhardware_manager_service"; 30 const std::string GLOBAL_CAPABILITY_ID = "global_capability_info"; 31 const std::string RESOURCE_SEPARATOR = "###"; 32 const std::string DH_ID = "dh_id"; 33 const std::string DEV_ID = "dev_id"; 34 const std::string DEV_NAME = "dev_name"; 35 const std::string DEV_TYPE = "dev_type"; 36 const std::string DH_TYPE = "dh_type"; 37 const std::string DH_ATTRS = "dh_attrs"; 38 const std::string DH_LOG_TITLE_TAG = "DHFWK"; 39 const std::string DH_TASK_NAME_PREFIX = "Task_"; 40 const std::string DH_FWK_PKG_NAME = "ohos.dhardware"; 41 const std::string DH_COMPONENT_VERSIONS = "componentVersions"; 42 const std::string DH_COMPONENT_TYPE = "dhType"; 43 const std::string DH_COMPONENT_SINK_VER = "version"; 44 const std::string DH_COMPONENT_DEFAULT_VERSION = "1.0"; 45 } 46 } 47 #endif