• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
19 namespace HdcTest {
20 enum 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 
41 const string DEBUG_ADDRESS = Hdc::DEFAULT_SERVER_ADDR;
42 const string DEBUG_TCP_CONNECT_KEY = "127.0.0.1:10178";
43 const string DEBUG_USB_CONNECT_KEY = "any";
44 
45 int TestRuntimeCommand(const int method, const string &debugServerPort, const string &debugConnectKey);
46 int TestRuntimeCommandSimple(bool bTCPorUSB, int method, bool bNeedConnectDaemon);
47 void TestRunClient(const string &debugServerPort, const string &debugConnectKey, const string &cmd);
48 void PreConnectDaemon(const string &debugServerPort, const string &debugConnectKey);
49 void *TestBackgroundServerForClient(void *param);
50 void *DdmcallThreadEntry(void *param);
51 int DdmCallCommandEntry(int argc, const char *argv[]);
52 }  // namespace HdcTest
53 #endif