libwebsockets.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. /*
  2. * libwebsockets - small server side websockets and web server implementation
  3. *
  4. * Copyright (C) 2010 - 2019 Andy Green <[email protected]>
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to
  8. * deal in the Software without restriction, including without limitation the
  9. * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  10. * sell copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  21. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  22. * IN THE SOFTWARE.
  23. */
  24. /** @file */
  25. #ifndef LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
  26. #define LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
  27. #ifdef __cplusplus
  28. #include <cstddef>
  29. #include <cstdarg>
  30. extern "C" {
  31. #else
  32. #include <stdarg.h>
  33. #endif
  34. #include <string.h>
  35. #include <stdlib.h>
  36. #include "lws_config.h"
  37. /* place for one-shot opaque forward references */
  38. struct lws_sequencer;
  39. struct lws_dsh;
  40. /*
  41. * CARE: everything using cmake defines needs to be below here
  42. */
  43. #define LWS_US_PER_SEC ((lws_usec_t)1000000)
  44. #define LWS_MS_PER_SEC ((lws_usec_t)1000)
  45. #define LWS_US_PER_MS ((lws_usec_t)1000)
  46. #define LWS_NS_PER_US ((lws_usec_t)1000)
  47. #define LWS_KI (1024)
  48. #define LWS_MI (LWS_KI * 1024)
  49. #define LWS_GI (LWS_MI * 1024)
  50. #define LWS_TI ((uint64_t)LWS_GI * 1024)
  51. #define LWS_PI ((uint64_t)LWS_TI * 1024)
  52. #define LWS_US_TO_MS(x) ((x + (LWS_US_PER_MS / 2)) / LWS_US_PER_MS)
  53. #if defined(LWS_HAS_INTPTR_T)
  54. #include <stdint.h>
  55. #define lws_intptr_t intptr_t
  56. #else
  57. typedef unsigned long long lws_intptr_t;
  58. #endif
  59. #if defined(WIN32) || defined(_WIN32)
  60. #ifndef WIN32_LEAN_AND_MEAN
  61. #define WIN32_LEAN_AND_MEAN
  62. #endif
  63. #include <winsock2.h>
  64. #include <ws2tcpip.h>
  65. #include <stddef.h>
  66. #include <basetsd.h>
  67. #include <io.h>
  68. #ifndef _WIN32_WCE
  69. #include <fcntl.h>
  70. #else
  71. #define _O_RDONLY 0x0000
  72. #define O_RDONLY _O_RDONLY
  73. #endif
  74. #define LWS_INLINE __inline
  75. #define LWS_VISIBLE
  76. #define LWS_WARN_UNUSED_RESULT
  77. #define LWS_WARN_DEPRECATED
  78. #define LWS_FORMAT(string_index)
  79. #if !defined(LWS_EXTERN)
  80. #ifdef LWS_DLL
  81. #ifdef LWS_INTERNAL
  82. #define LWS_EXTERN extern __declspec(dllexport)
  83. #else
  84. #define LWS_EXTERN extern __declspec(dllimport)
  85. #endif
  86. #endif
  87. #endif
  88. #define LWS_INVALID_FILE INVALID_HANDLE_VALUE
  89. #define LWS_SOCK_INVALID (INVALID_SOCKET)
  90. #define LWS_O_RDONLY _O_RDONLY
  91. #define LWS_O_WRONLY _O_WRONLY
  92. #define LWS_O_CREAT _O_CREAT
  93. #define LWS_O_TRUNC _O_TRUNC
  94. #ifndef __func__
  95. #define __func__ __FUNCTION__
  96. #endif
  97. #else /* NOT WIN32 */
  98. #include <unistd.h>
  99. #if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
  100. #include <sys/capability.h>
  101. #endif
  102. #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__QNX__) || defined(__OpenBSD__)
  103. #include <sys/socket.h>
  104. #include <netinet/in.h>
  105. #endif
  106. #define LWS_INLINE inline
  107. #define LWS_O_RDONLY O_RDONLY
  108. #define LWS_O_WRONLY O_WRONLY
  109. #define LWS_O_CREAT O_CREAT
  110. #define LWS_O_TRUNC O_TRUNC
  111. #if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_TA) && !defined(LWS_PLAT_FREERTOS)
  112. #include <poll.h>
  113. #include <netdb.h>
  114. #define LWS_INVALID_FILE -1
  115. #define LWS_SOCK_INVALID (-1)
  116. #else
  117. #define getdtablesize() (30)
  118. #if defined(LWS_PLAT_FREERTOS)
  119. #define LWS_INVALID_FILE NULL
  120. #define LWS_SOCK_INVALID (-1)
  121. #else
  122. #define LWS_INVALID_FILE NULL
  123. #define LWS_SOCK_INVALID (-1)
  124. #endif
  125. #endif
  126. #if defined(__FreeBSD__)
  127. #include <sys/signal.h>
  128. #endif
  129. #if defined(__GNUC__)
  130. /* warn_unused_result attribute only supported by GCC 3.4 or later */
  131. #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  132. #define LWS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
  133. #else
  134. #define LWS_WARN_UNUSED_RESULT
  135. #endif
  136. #define LWS_VISIBLE __attribute__((visibility("default")))
  137. #define LWS_WARN_DEPRECATED __attribute__ ((deprecated))
  138. #define LWS_FORMAT(string_index) __attribute__ ((format(printf, string_index, string_index+1)))
  139. #else
  140. #define LWS_VISIBLE
  141. #define LWS_WARN_UNUSED_RESULT
  142. #define LWS_WARN_DEPRECATED
  143. #define LWS_FORMAT(string_index)
  144. #endif
  145. #if defined(__ANDROID__)
  146. #include <netinet/in.h>
  147. #include <unistd.h>
  148. #endif
  149. #endif
  150. #ifndef LWS_EXTERN
  151. #define LWS_EXTERN extern
  152. #endif
  153. #ifdef _WIN32
  154. #define random rand
  155. #else
  156. #if !defined(LWS_PLAT_OPTEE)
  157. #include <sys/time.h>
  158. #include <unistd.h>
  159. #endif
  160. #endif
  161. #if defined(LWS_WITH_LIBUV_INTERNAL)
  162. #include <uv.h>
  163. #ifdef LWS_HAVE_UV_VERSION_H
  164. #include <uv-version.h>
  165. #endif
  166. #ifdef LWS_HAVE_NEW_UV_VERSION_H
  167. #include <uv/version.h>
  168. #endif
  169. #endif
  170. #if defined(LWS_WITH_TLS)
  171. #ifdef USE_WOLFSSL
  172. #ifdef USE_OLD_CYASSL
  173. #ifdef _WIN32
  174. /*
  175. * Include user-controlled settings for windows from
  176. * <wolfssl-root>/IDE/WIN/user_settings.h
  177. */
  178. #include <IDE/WIN/user_settings.h>
  179. #include <cyassl/ctaocrypt/settings.h>
  180. #else
  181. #include <cyassl/options.h>
  182. #endif
  183. #include <cyassl/openssl/ssl.h>
  184. #include <cyassl/error-ssl.h>
  185. #else
  186. #ifdef _WIN32
  187. /*
  188. * Include user-controlled settings for windows from
  189. * <wolfssl-root>/IDE/WIN/user_settings.h
  190. */
  191. #include <IDE/WIN/user_settings.h>
  192. #include <wolfssl/wolfcrypt/settings.h>
  193. #else
  194. #include <wolfssl/options.h>
  195. #endif
  196. #include <wolfssl/openssl/ssl.h>
  197. #include <wolfssl/error-ssl.h>
  198. #endif /* not USE_OLD_CYASSL */
  199. #else
  200. #if defined(LWS_WITH_MBEDTLS)
  201. #if defined(LWS_PLAT_FREERTOS)
  202. /* this filepath is passed to us but without quotes or <> */
  203. #if !defined(LWS_AMAZON_RTOS)
  204. /* AMAZON RTOS has its own setting via MTK_MBEDTLS_CONFIG_FILE */
  205. #undef MBEDTLS_CONFIG_FILE
  206. #define MBEDTLS_CONFIG_FILE <mbedtls/esp_config.h>
  207. #endif
  208. #endif
  209. #if defined(LWS_WITH_TLS)
  210. #include <mbedtls/ssl.h>
  211. #include <mbedtls/entropy.h>
  212. #include <mbedtls/ctr_drbg.h>
  213. #endif
  214. #else
  215. #include <openssl/ssl.h>
  216. #if !defined(LWS_WITH_MBEDTLS)
  217. #include <openssl/err.h>
  218. #endif
  219. #endif
  220. #endif /* not USE_WOLFSSL */
  221. #endif
  222. /*
  223. * Helpers for pthread mutex in user code... if lws is built for
  224. * multiple service threads, these resolve to pthread mutex
  225. * operations. In the case LWS_MAX_SMP is 1 (the default), they
  226. * are all NOPs and no pthread type or api is referenced.
  227. */
  228. #if LWS_MAX_SMP > 1
  229. #include <pthread.h>
  230. #define lws_pthread_mutex(name) pthread_mutex_t name;
  231. static LWS_INLINE void
  232. lws_pthread_mutex_init(pthread_mutex_t *lock)
  233. {
  234. pthread_mutex_init(lock, NULL);
  235. }
  236. static LWS_INLINE void
  237. lws_pthread_mutex_destroy(pthread_mutex_t *lock)
  238. {
  239. pthread_mutex_destroy(lock);
  240. }
  241. static LWS_INLINE void
  242. lws_pthread_mutex_lock(pthread_mutex_t *lock)
  243. {
  244. pthread_mutex_lock(lock);
  245. }
  246. static LWS_INLINE void
  247. lws_pthread_mutex_unlock(pthread_mutex_t *lock)
  248. {
  249. pthread_mutex_unlock(lock);
  250. }
  251. #else
  252. #define lws_pthread_mutex(name)
  253. #define lws_pthread_mutex_init(_a)
  254. #define lws_pthread_mutex_destroy(_a)
  255. #define lws_pthread_mutex_lock(_a)
  256. #define lws_pthread_mutex_unlock(_a)
  257. #endif
  258. #define CONTEXT_PORT_NO_LISTEN -1
  259. #define CONTEXT_PORT_NO_LISTEN_SERVER -2
  260. #include <libwebsockets/lws-logs.h>
  261. #include <stddef.h>
  262. #ifndef lws_container_of
  263. #define lws_container_of(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
  264. #endif
  265. #define LWS_ALIGN_TO(x, bou) x += ((bou) - ((x) % (bou))) % (bou)
  266. struct lws;
  267. /* api change list for user code to test against */
  268. #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
  269. /* the struct lws_protocols has the id field present */
  270. #define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
  271. /* you can call lws_get_peer_write_allowance */
  272. #define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
  273. /* extra parameter introduced in 917f43ab821 */
  274. #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
  275. /* File operations stuff exists */
  276. #define LWS_FEATURE_FOPS
  277. #if defined(_WIN32)
  278. #if !defined(LWS_WIN32_HANDLE_TYPES)
  279. typedef SOCKET lws_sockfd_type;
  280. typedef HANDLE lws_filefd_type;
  281. #endif
  282. struct lws_pollfd {
  283. lws_sockfd_type fd; /**< file descriptor */
  284. SHORT events; /**< which events to respond to */
  285. SHORT revents; /**< which events happened */
  286. uint8_t write_blocked;
  287. };
  288. #define LWS_POLLHUP (FD_CLOSE)
  289. #define LWS_POLLIN (FD_READ | FD_ACCEPT)
  290. #define LWS_POLLOUT (FD_WRITE)
  291. #else
  292. #if defined(LWS_PLAT_FREERTOS)
  293. #include <libwebsockets/lws-freertos.h>
  294. #else
  295. typedef int lws_sockfd_type;
  296. typedef int lws_filefd_type;
  297. #endif
  298. #if defined(LWS_PLAT_OPTEE)
  299. #include <time.h>
  300. struct timeval {
  301. time_t tv_sec;
  302. unsigned int tv_usec;
  303. };
  304. #if defined(LWS_WITH_NETWORK)
  305. // #include <poll.h>
  306. #define lws_pollfd pollfd
  307. struct timezone;
  308. int gettimeofday(struct timeval *tv, struct timezone *tz);
  309. /* Internet address. */
  310. struct in_addr {
  311. uint32_t s_addr; /* address in network byte order */
  312. };
  313. typedef unsigned short sa_family_t;
  314. typedef unsigned short in_port_t;
  315. typedef uint32_t socklen_t;
  316. #include <libwebsockets/lws-optee.h>
  317. #if !defined(TEE_SE_READER_NAME_MAX)
  318. struct addrinfo {
  319. int ai_flags;
  320. int ai_family;
  321. int ai_socktype;
  322. int ai_protocol;
  323. socklen_t ai_addrlen;
  324. struct sockaddr *ai_addr;
  325. char *ai_canonname;
  326. struct addrinfo *ai_next;
  327. };
  328. #endif
  329. ssize_t recv(int sockfd, void *buf, size_t len, int flags);
  330. ssize_t send(int sockfd, const void *buf, size_t len, int flags);
  331. ssize_t read(int fd, void *buf, size_t count);
  332. int getsockopt(int sockfd, int level, int optname,
  333. void *optval, socklen_t *optlen);
  334. int setsockopt(int sockfd, int level, int optname,
  335. const void *optval, socklen_t optlen);
  336. int connect(int sockfd, const struct sockaddr *addr,
  337. socklen_t addrlen);
  338. extern int errno;
  339. uint16_t ntohs(uint16_t netshort);
  340. uint16_t htons(uint16_t hostshort);
  341. int bind(int sockfd, const struct sockaddr *addr,
  342. socklen_t addrlen);
  343. #define MSG_NOSIGNAL 0x4000
  344. #define EAGAIN 11
  345. #define EINTR 4
  346. #define EWOULDBLOCK EAGAIN
  347. #define EADDRINUSE 98
  348. #define INADDR_ANY 0
  349. #define AF_INET 2
  350. #define SHUT_WR 1
  351. #define AF_UNSPEC 0
  352. #define PF_UNSPEC 0
  353. #define SOCK_STREAM 1
  354. #define SOCK_DGRAM 2
  355. # define AI_PASSIVE 0x0001
  356. #define IPPROTO_UDP 17
  357. #define SOL_SOCKET 1
  358. #define SO_SNDBUF 7
  359. #define EISCONN 106
  360. #define EALREADY 114
  361. #define EINPROGRESS 115
  362. int shutdown(int sockfd, int how);
  363. int close(int fd);
  364. int atoi(const char *nptr);
  365. long long atoll(const char *nptr);
  366. int socket(int domain, int type, int protocol);
  367. int getaddrinfo(const char *node, const char *service,
  368. const struct addrinfo *hints,
  369. struct addrinfo **res);
  370. void freeaddrinfo(struct addrinfo *res);
  371. #if !defined(TEE_SE_READER_NAME_MAX)
  372. struct lws_pollfd
  373. {
  374. int fd; /* File descriptor to poll. */
  375. short int events; /* Types of events poller cares about. */
  376. short int revents; /* Types of events that actually occurred. */
  377. };
  378. #endif
  379. int poll(struct pollfd *fds, int nfds, int timeout);
  380. #define LWS_POLLHUP (0x18)
  381. #define LWS_POLLIN (1)
  382. #define LWS_POLLOUT (4)
  383. #else
  384. struct lws_pollfd;
  385. struct sockaddr_in;
  386. #endif
  387. #else
  388. #define lws_pollfd pollfd
  389. #define LWS_POLLHUP (POLLHUP | POLLERR)
  390. #define LWS_POLLIN (POLLIN)
  391. #define LWS_POLLOUT (POLLOUT)
  392. #endif
  393. #endif
  394. #if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
  395. /* ... */
  396. #define ssize_t SSIZE_T
  397. #endif
  398. #if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
  399. #include <sys/types.h>
  400. #include <sys/stat.h>
  401. #endif
  402. #if defined(LWS_HAVE_STDINT_H)
  403. #include <stdint.h>
  404. #else
  405. #if defined(WIN32) || defined(_WIN32)
  406. /* !!! >:-[ */
  407. typedef __int64 int64_t;
  408. typedef unsigned __int64 uint64_t;
  409. typedef __int32 int32_t;
  410. typedef unsigned __int32 uint32_t;
  411. typedef __int16 int16_t;
  412. typedef unsigned __int16 uint16_t;
  413. typedef unsigned __int8 uint8_t;
  414. #else
  415. typedef unsigned int uint32_t;
  416. typedef unsigned short uint16_t;
  417. typedef unsigned char uint8_t;
  418. #endif
  419. #endif
  420. typedef int64_t lws_usec_t;
  421. typedef unsigned long long lws_filepos_t;
  422. typedef long long lws_fileofs_t;
  423. typedef uint32_t lws_fop_flags_t;
  424. #define lws_concat_temp(_t, _l) (_t + sizeof(_t) - _l)
  425. #define lws_concat_used(_t, _l) (sizeof(_t) - _l)
  426. /** struct lws_pollargs - argument structure for all external poll related calls
  427. * passed in via 'in' */
  428. struct lws_pollargs {
  429. lws_sockfd_type fd; /**< applicable socket descriptor */
  430. int events; /**< the new event mask */
  431. int prev_events; /**< the previous event mask */
  432. };
  433. struct lws_extension; /* needed even with ws exts disabled for create context */
  434. struct lws_token_limits;
  435. struct lws_protocols;
  436. struct lws_context;
  437. struct lws_tokens;
  438. struct lws_vhost;
  439. struct lws;
  440. #include <libwebsockets/lws-dll2.h>
  441. #include <libwebsockets/lws-timeout-timer.h>
  442. #if defined(LWS_WITH_SYS_SMD)
  443. #include <libwebsockets/lws-smd.h>
  444. #endif
  445. #include <libwebsockets/lws-state.h>
  446. #include <libwebsockets/lws-retry.h>
  447. #include <libwebsockets/lws-adopt.h>
  448. #include <libwebsockets/lws-network-helper.h>
  449. #include <libwebsockets/lws-system.h>
  450. #include <libwebsockets/lws-detailed-latency.h>
  451. #include <libwebsockets/lws-ws-close.h>
  452. #include <libwebsockets/lws-callbacks.h>
  453. #include <libwebsockets/lws-ws-state.h>
  454. #include <libwebsockets/lws-ws-ext.h>
  455. #include <libwebsockets/lws-protocols-plugins.h>
  456. #include <libwebsockets/lws-context-vhost.h>
  457. #if defined(LWS_ROLE_MQTT)
  458. #include <libwebsockets/lws-mqtt.h>
  459. #endif
  460. #include <libwebsockets/lws-client.h>
  461. #include <libwebsockets/lws-http.h>
  462. #include <libwebsockets/lws-spa.h>
  463. #include <libwebsockets/lws-purify.h>
  464. #include <libwebsockets/lws-misc.h>
  465. #include <libwebsockets/lws-dsh.h>
  466. #include <libwebsockets/lws-service.h>
  467. #include <libwebsockets/lws-write.h>
  468. #include <libwebsockets/lws-writeable.h>
  469. #include <libwebsockets/lws-ring.h>
  470. #include <libwebsockets/lws-sha1-base64.h>
  471. #include <libwebsockets/lws-x509.h>
  472. #include <libwebsockets/lws-cgi.h>
  473. #if defined(LWS_WITH_FILE_OPS)
  474. #include <libwebsockets/lws-vfs.h>
  475. #endif
  476. #include <libwebsockets/lws-lejp.h>
  477. #include <libwebsockets/lws-stats.h>
  478. #include <libwebsockets/lws-struct.h>
  479. #include <libwebsockets/lws-threadpool.h>
  480. #include <libwebsockets/lws-tokenize.h>
  481. #include <libwebsockets/lws-lwsac.h>
  482. #include <libwebsockets/lws-fts.h>
  483. #include <libwebsockets/lws-diskcache.h>
  484. #include <libwebsockets/lws-sequencer.h>
  485. #include <libwebsockets/lws-secure-streams.h>
  486. #include <libwebsockets/lws-secure-streams-policy.h>
  487. #include <libwebsockets/lws-secure-streams-client.h>
  488. #if !defined(LWS_PLAT_FREERTOS)
  489. #include <libwebsockets/abstract/abstract.h>
  490. #include <libwebsockets/lws-test-sequencer.h>
  491. #endif
  492. #include <libwebsockets/lws-async-dns.h>
  493. #if defined(LWS_WITH_TLS)
  494. #if defined(LWS_WITH_MBEDTLS)
  495. #include <mbedtls/md5.h>
  496. #include <mbedtls/sha1.h>
  497. #include <mbedtls/sha256.h>
  498. #include <mbedtls/sha512.h>
  499. #endif
  500. #include <libwebsockets/lws-gencrypto.h>
  501. #include <libwebsockets/lws-genhash.h>
  502. #include <libwebsockets/lws-genrsa.h>
  503. #include <libwebsockets/lws-genaes.h>
  504. #include <libwebsockets/lws-genec.h>
  505. #include <libwebsockets/lws-jwk.h>
  506. #include <libwebsockets/lws-jose.h>
  507. #include <libwebsockets/lws-jws.h>
  508. #include <libwebsockets/lws-jwe.h>
  509. #endif
  510. #include <libwebsockets/lws-eventlib-exports.h>
  511. #include <libwebsockets/lws-i2c.h>
  512. #include <libwebsockets/lws-spi.h>
  513. #include <libwebsockets/lws-gpio.h>
  514. #include <libwebsockets/lws-bb-i2c.h>
  515. #include <libwebsockets/lws-bb-spi.h>
  516. #include <libwebsockets/lws-button.h>
  517. #include <libwebsockets/lws-led.h>
  518. #include <libwebsockets/lws-pwm.h>
  519. #include <libwebsockets/lws-display.h>
  520. #include <libwebsockets/lws-ssd1306-i2c.h>
  521. #include <libwebsockets/lws-ili9341-spi.h>
  522. #include <libwebsockets/lws-settings.h>
  523. #include <libwebsockets/lws-netdev.h>
  524. #ifdef __cplusplus
  525. }
  526. #endif
  527. #endif