• 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_COMMON_H
16 #define HDC_COMMON_H
17 
18 #include <algorithm>
19 #include <atomic>
20 #include <condition_variable>
21 #include <functional>
22 #include <list>
23 #include <map>
24 #include <mutex>
25 #include <queue>
26 #include <string>
27 #include <vector>
28 
29 #include <assert.h>
30 #include <fcntl.h>
31 #include <inttypes.h>
32 #include <stdarg.h>
33 #include <stdio.h>
34 #include <sys/types.h>
35 #include <time.h>
36 #include <unistd.h>
37 
38 using std::condition_variable;
39 using std::list;
40 using std::map;
41 using std::mutex;
42 using std::string;
43 using std::vector;
44 
45 // clang-format off
46 #include <uv.h>  // libuv 1.35
47 #ifdef HDC_HOST
48 
49 #ifdef HARMONY_PROJECT
50 #include <libusb/libusb.h>
51 #else  // NOT HARMONY_PROJECT
52 #include <libusb-1.0/libusb.h>
53 #endif // END HARMONY_PROJECT
54 
55 #else // NOT HDC_HOST
56 #endif // HDC_HOST
57 
58 #ifndef _WIN32
59 #include <sys/socket.h>
60 #include <sys/un.h>
61 #endif
62 
63 #include <securec.h>
64 #include <limits.h>
65 
66 #include "define.h"
67 #include "debug.h"
68 #include "base.h"
69 #include "task.h"
70 #include "channel.h"
71 #include "session.h"
72 #include "auth.h"
73 
74 #include "tcp.h"
75 #include "usb.h"
76 #ifdef HDC_SUPPORT_UART
77 #include "uart.h"
78 #endif
79 #include "file_descriptor.h"
80 
81 // clang-format on
82 
83 #endif  // !defined(COMMON_H_INCLUDED)
84