1/* 2 * Copyright (c) 2021-2023 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#ifndef USBD_FUNCTION_TEST_H 16#define USBD_FUNCTION_TEST_H 17 18#include <gtest/gtest.h> 19 20#define DEFAULT_PORT_ID 1 21 22#define POWER_ROLE_NONE 0 23#define POWER_ROLE_SOURCE 1 24#define POWER_ROLE_SINK 2 25 26#define DATA_ROLE_NONE 0 27#define DATA_ROLE_HOST 1 28#define DATA_ROLE_DEVICE 2 29 30#define PORT_MODE_NONE 0 31 32#define USB_FUNCTION_NONE 0 33#define USB_FUNCTION_ACM (1 << 0) 34#define USB_FUNCTION_ECM (1 << 1) 35#define USB_FUNCTION_HDC (1 << 2) 36#define USB_FUNCTION_MTP (1 << 3) 37#define USB_FUNCTION_PTP (1 << 4) 38#define USB_FUNCTION_RNDIS (1 << 5) 39#define USB_FUNCTION_STORAGE (1 << 9) 40 41namespace { 42class UsbdFunctionTest : public testing::Test { 43public: 44 static void SetUpTestCase(); 45 static void TearDownTestCase(); 46 void SetUp(); 47 void TearDown(); 48}; 49} 50#endif // USBD_FUNCTION_TEST_H