xref: /developtools/hdc/src/test/ut_command.h (revision cc290419)
1/*
2 * Copyright (C) 2021 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 HDC_UT_COMMAND_H
16#define HDC_UT_COMMAND_H
17#include "ut_common.h"
18
19namespace HdcTest {
20enum UtType {
21    UT_HELP,
22    UT_DISCOVER,
23    UT_LIST_TARGETS,
24    UT_CONNECT_ANY,
25    UT_KILL_SERVER,
26    UT_KILL_DAEMON,
27    UT_SHELL_BASIC,
28    UT_SHELL_LIGHT,
29    UT_SHELL_HEAVY,
30    UT_SHELL_INTERACTIVE,
31    UT_FILE_SEND,
32    UT_FILE_RECV,
33    UT_FORWARD_TCP2TCP,
34    UT_FORWARD_TCP2FILE,
35    UT_FORWARD_TCP2DEV,
36    UT_FORWARD_TCP2JDWP,
37    UT_APP_INSTALL,
38    UT_TEST_TMP,
39};
40
41const string DEBUG_ADDRESS = Hdc::DEFAULT_SERVER_ADDR;
42const string DEBUG_TCP_CONNECT_KEY = "127.0.0.1:10178";
43const string DEBUG_USB_CONNECT_KEY = "any";
44
45int TestRuntimeCommand(const int method, const string &debugServerPort, const string &debugConnectKey);
46int TestRuntimeCommandSimple(bool bTCPorUSB, int method, bool bNeedConnectDaemon);
47void TestRunClient(const string &debugServerPort, const string &debugConnectKey, const string &cmd);
48void PreConnectDaemon(const string &debugServerPort, const string &debugConnectKey);
49void *TestBackgroundServerForClient(void *param);
50void *DdmcallThreadEntry(void *param);
51int DdmCallCommandEntry(int argc, const char *argv[]);
52}  // namespace HdcTest
53#endif