19762338dSopenharmony_ci/* 29762338dSopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 39762338dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 49762338dSopenharmony_ci * you may not use this file except in compliance with the License. 59762338dSopenharmony_ci * You may obtain a copy of the License at 69762338dSopenharmony_ci * 79762338dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 89762338dSopenharmony_ci * 99762338dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 109762338dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 119762338dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 129762338dSopenharmony_ci * See the License for the specific language governing permissions and 139762338dSopenharmony_ci * limitations under the License. 149762338dSopenharmony_ci */ 159762338dSopenharmony_ci 169762338dSopenharmony_ci#include "UsbSubscriberTest.h" 179762338dSopenharmony_ci#include "hdf_log.h" 189762338dSopenharmony_ci 199762338dSopenharmony_cinamespace OHOS { 209762338dSopenharmony_cinamespace USB { 219762338dSopenharmony_ciint32_t UsbSubscriberTest::DeviceEvent(const USBDeviceInfo &info) 229762338dSopenharmony_ci{ 239762338dSopenharmony_ci if (info.status == ACT_UPDEVICE || info.status == ACT_DOWNDEVICE) { 249762338dSopenharmony_ci return 0; 259762338dSopenharmony_ci } 269762338dSopenharmony_ci busNum_ = info.busNum; 279762338dSopenharmony_ci devAddr_ = info.devNum; 289762338dSopenharmony_ci HDF_LOGI("%{public}s: busNum is %{public}d, devAddr is %{public}d", __func__, busNum_, devAddr_); 299762338dSopenharmony_ci return 0; 309762338dSopenharmony_ci} 319762338dSopenharmony_ci} // namespace USB 329762338dSopenharmony_ci} // namespace OHOS