1 /*
2 * Copyright (c) 2024 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 #include "usb_ddk_service_mock.h"
16
17 namespace OHOS {
18 namespace USB {
19 using namespace OHOS;
20 using namespace OHOS::HDI;
21 using namespace OHOS::HDI::Usb::Ddk::V1_0;
22 std::vector<uint8_t> g_configDescBuf {
23 9, 2, 59, 0, 2, 1, 0, 160, 250, 9, 4, 0, 0, 1, 3, 1, 1, 0, 9, 33, 17, 1, 0, 1, 34, 67, 0, 7, 5, 129, 3, 8, 0, 1, 9,
24 4, 1, 0, 1, 3, 0, 0, 0, 9, 33, 17, 1, 0, 1, 34, 102, 0, 7, 5, 130, 3, 16, 0, 1
25 };
26
GetConfigDescriptor(uint64_t deviceId,uint8_t configIndex,std::vector<uint8_t> & configDesc)27 int32_t UsbDdkServiceMock::GetConfigDescriptor(uint64_t deviceId, uint8_t configIndex, std::vector<uint8_t> &configDesc)
28 {
29 configDesc = g_configDescBuf;
30 return HDF_SUCCESS;
31 }
32 }
33 }
34