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