• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 #include "input_device_cooperate_util.h"
17 
18 #include "softbus_bus_center.h"
19 
20 #include "config_multimodal.h"
21 #include "define_multimodal.h"
22 namespace OHOS {
23 namespace MMI {
24 namespace {
25 constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, MMI_LOG_DOMAIN, "InputDeviceCooperateUtil" };
26 } // namespace
GetLocalDeviceId()27 std::string GetLocalDeviceId()
28 {
29     auto localNode = std::make_unique<NodeBasicInfo>();
30     int32_t ret = GetLocalNodeDeviceInfo(MMI_DINPUT_PKG_NAME, localNode.get());
31     if (ret != RET_OK) {
32         MMI_HILOGE("GetLocalNodeDeviceInfo ret:%{public}d", ret);
33         return {};
34     }
35     return localNode->networkId;
36 }
37 } // namespace MMI
38 } // namespace OHOS
39