@crossbind/port-curl-ios 2.0.0-beta.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +12 -0
  3. package/crossbind-port-curl.podspec +15 -0
  4. package/crossbind.build.js +1 -0
  5. package/crossbind.config.js +7 -0
  6. package/curl.xcframework/Info.plist +47 -0
  7. package/curl.xcframework/ios-arm64/Headers/curl/curl.h +3347 -0
  8. package/curl.xcframework/ios-arm64/Headers/curl/curlver.h +78 -0
  9. package/curl.xcframework/ios-arm64/Headers/curl/easy.h +123 -0
  10. package/curl.xcframework/ios-arm64/Headers/curl/header.h +74 -0
  11. package/curl.xcframework/ios-arm64/Headers/curl/mprintf.h +85 -0
  12. package/curl.xcframework/ios-arm64/Headers/curl/multi.h +560 -0
  13. package/curl.xcframework/ios-arm64/Headers/curl/options.h +70 -0
  14. package/curl.xcframework/ios-arm64/Headers/curl/stdcheaders.h +35 -0
  15. package/curl.xcframework/ios-arm64/Headers/curl/system.h +399 -0
  16. package/curl.xcframework/ios-arm64/Headers/curl/typecheck-gcc.h +960 -0
  17. package/curl.xcframework/ios-arm64/Headers/curl/urlapi.h +155 -0
  18. package/curl.xcframework/ios-arm64/Headers/curl/websockets.h +98 -0
  19. package/curl.xcframework/ios-arm64/libcurl.a +0 -0
  20. package/curl.xcframework/ios-arm64-simulator/Headers/curl/curl.h +3347 -0
  21. package/curl.xcframework/ios-arm64-simulator/Headers/curl/curlver.h +78 -0
  22. package/curl.xcframework/ios-arm64-simulator/Headers/curl/easy.h +123 -0
  23. package/curl.xcframework/ios-arm64-simulator/Headers/curl/header.h +74 -0
  24. package/curl.xcframework/ios-arm64-simulator/Headers/curl/mprintf.h +85 -0
  25. package/curl.xcframework/ios-arm64-simulator/Headers/curl/multi.h +560 -0
  26. package/curl.xcframework/ios-arm64-simulator/Headers/curl/options.h +70 -0
  27. package/curl.xcframework/ios-arm64-simulator/Headers/curl/stdcheaders.h +35 -0
  28. package/curl.xcframework/ios-arm64-simulator/Headers/curl/system.h +399 -0
  29. package/curl.xcframework/ios-arm64-simulator/Headers/curl/typecheck-gcc.h +960 -0
  30. package/curl.xcframework/ios-arm64-simulator/Headers/curl/urlapi.h +155 -0
  31. package/curl.xcframework/ios-arm64-simulator/Headers/curl/websockets.h +98 -0
  32. package/curl.xcframework/ios-arm64-simulator/libcurl.a +0 -0
  33. package/dist/prebuilt/CMakeLists.txt +57 -0
  34. package/dist/prebuilt/ios-iphoneos-mt-release/crossbind-emccflags.fingerprint +1 -0
  35. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/curl.h +3347 -0
  36. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/curlver.h +78 -0
  37. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/easy.h +123 -0
  38. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/header.h +74 -0
  39. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/mprintf.h +85 -0
  40. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/multi.h +560 -0
  41. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/options.h +70 -0
  42. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/stdcheaders.h +35 -0
  43. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/system.h +399 -0
  44. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/typecheck-gcc.h +960 -0
  45. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/urlapi.h +155 -0
  46. package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/websockets.h +98 -0
  47. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLConfig.cmake +220 -0
  48. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLConfigVersion.cmake +71 -0
  49. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLTargets-release.cmake +19 -0
  50. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLTargets.cmake +108 -0
  51. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindBrotli.cmake +96 -0
  52. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindCares.cmake +132 -0
  53. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindGSS.cmake +264 -0
  54. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindGnuTLS.cmake +92 -0
  55. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLDAP.cmake +115 -0
  56. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibbacktrace.cmake +61 -0
  57. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibgsasl.cmake +91 -0
  58. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibidn2.cmake +92 -0
  59. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibpsl.cmake +92 -0
  60. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibssh.cmake +118 -0
  61. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibssh2.cmake +117 -0
  62. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibuv.cmake +102 -0
  63. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindMbedTLS.cmake +137 -0
  64. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGHTTP2.cmake +116 -0
  65. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGHTTP3.cmake +116 -0
  66. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGTCP2.cmake +187 -0
  67. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNettle.cmake +97 -0
  68. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindQuiche.cmake +80 -0
  69. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindRustls.cmake +116 -0
  70. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindWolfSSL.cmake +135 -0
  71. package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindZstd.cmake +144 -0
  72. package/dist/prebuilt/ios-iphoneos-mt-release/lib/libcurl.a +0 -0
  73. package/dist/prebuilt/ios-iphoneos-mt-release/lib/pkgconfig/libcurl.pc +41 -0
  74. package/dist/prebuilt/ios-iphoneos-mt-release/share/man/man1/curl-config.1 +90 -0
  75. package/dist/prebuilt/ios-iphonesimulator-mt-release/crossbind-emccflags.fingerprint +1 -0
  76. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/curl.h +3347 -0
  77. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/curlver.h +78 -0
  78. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/easy.h +123 -0
  79. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/header.h +74 -0
  80. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/mprintf.h +85 -0
  81. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/multi.h +560 -0
  82. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/options.h +70 -0
  83. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/stdcheaders.h +35 -0
  84. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/system.h +399 -0
  85. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/typecheck-gcc.h +960 -0
  86. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/urlapi.h +155 -0
  87. package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/websockets.h +98 -0
  88. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLConfig.cmake +220 -0
  89. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLConfigVersion.cmake +71 -0
  90. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLTargets-release.cmake +19 -0
  91. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLTargets.cmake +108 -0
  92. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindBrotli.cmake +96 -0
  93. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindCares.cmake +132 -0
  94. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindGSS.cmake +264 -0
  95. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindGnuTLS.cmake +92 -0
  96. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLDAP.cmake +115 -0
  97. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibbacktrace.cmake +61 -0
  98. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibgsasl.cmake +91 -0
  99. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibidn2.cmake +92 -0
  100. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibpsl.cmake +92 -0
  101. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibssh.cmake +118 -0
  102. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibssh2.cmake +117 -0
  103. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibuv.cmake +102 -0
  104. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindMbedTLS.cmake +137 -0
  105. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGHTTP2.cmake +116 -0
  106. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGHTTP3.cmake +116 -0
  107. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGTCP2.cmake +187 -0
  108. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNettle.cmake +97 -0
  109. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindQuiche.cmake +80 -0
  110. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindRustls.cmake +116 -0
  111. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindWolfSSL.cmake +135 -0
  112. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindZstd.cmake +144 -0
  113. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/libcurl.a +0 -0
  114. package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/pkgconfig/libcurl.pc +41 -0
  115. package/dist/prebuilt/ios-iphonesimulator-mt-release/share/man/man1/curl-config.1 +90 -0
  116. package/package.json +34 -0
@@ -0,0 +1,155 @@
1
+ #ifndef CURLINC_URLAPI_H
2
+ #define CURLINC_URLAPI_H
3
+ /***************************************************************************
4
+ * _ _ ____ _
5
+ * Project ___| | | | _ \| |
6
+ * / __| | | | |_) | |
7
+ * | (__| |_| | _ <| |___
8
+ * \___|\___/|_| \_\_____|
9
+ *
10
+ * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
11
+ *
12
+ * This software is licensed as described in the file COPYING, which
13
+ * you should have received as part of this distribution. The terms
14
+ * are also available at https://curl.se/docs/copyright.html.
15
+ *
16
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17
+ * copies of the Software, and permit persons to whom the Software is
18
+ * furnished to do so, under the terms of the COPYING file.
19
+ *
20
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
+ * KIND, either express or implied.
22
+ *
23
+ * SPDX-License-Identifier: curl
24
+ *
25
+ ***************************************************************************/
26
+
27
+ #include "curl.h"
28
+
29
+ #ifdef __cplusplus
30
+ extern "C" {
31
+ #endif
32
+
33
+ /* the error codes for the URL API */
34
+ typedef enum {
35
+ CURLUE_OK,
36
+ CURLUE_BAD_HANDLE, /* 1 */
37
+ CURLUE_BAD_PARTPOINTER, /* 2 */
38
+ CURLUE_MALFORMED_INPUT, /* 3 */
39
+ CURLUE_BAD_PORT_NUMBER, /* 4 */
40
+ CURLUE_UNSUPPORTED_SCHEME, /* 5 */
41
+ CURLUE_URLDECODE, /* 6 */
42
+ CURLUE_OUT_OF_MEMORY, /* 7 */
43
+ CURLUE_USER_NOT_ALLOWED, /* 8 */
44
+ CURLUE_UNKNOWN_PART, /* 9 */
45
+ CURLUE_NO_SCHEME, /* 10 */
46
+ CURLUE_NO_USER, /* 11 */
47
+ CURLUE_NO_PASSWORD, /* 12 */
48
+ CURLUE_NO_OPTIONS, /* 13 */
49
+ CURLUE_NO_HOST, /* 14 */
50
+ CURLUE_NO_PORT, /* 15 */
51
+ CURLUE_NO_QUERY, /* 16 */
52
+ CURLUE_NO_FRAGMENT, /* 17 */
53
+ CURLUE_NO_ZONEID, /* 18 */
54
+ CURLUE_BAD_FILE_URL, /* 19 */
55
+ CURLUE_BAD_FRAGMENT, /* 20 */
56
+ CURLUE_BAD_HOSTNAME, /* 21 */
57
+ CURLUE_BAD_IPV6, /* 22 */
58
+ CURLUE_BAD_LOGIN, /* 23 */
59
+ CURLUE_BAD_PASSWORD, /* 24 */
60
+ CURLUE_BAD_PATH, /* 25 */
61
+ CURLUE_BAD_QUERY, /* 26 */
62
+ CURLUE_BAD_SCHEME, /* 27 */
63
+ CURLUE_BAD_SLASHES, /* 28 */
64
+ CURLUE_BAD_USER, /* 29 */
65
+ CURLUE_LACKS_IDN, /* 30 */
66
+ CURLUE_TOO_LARGE, /* 31 */
67
+ CURLUE_LAST
68
+ } CURLUcode;
69
+
70
+ typedef enum {
71
+ CURLUPART_URL,
72
+ CURLUPART_SCHEME,
73
+ CURLUPART_USER,
74
+ CURLUPART_PASSWORD,
75
+ CURLUPART_OPTIONS,
76
+ CURLUPART_HOST,
77
+ CURLUPART_PORT,
78
+ CURLUPART_PATH,
79
+ CURLUPART_QUERY,
80
+ CURLUPART_FRAGMENT,
81
+ CURLUPART_ZONEID /* added in 7.65.0 */
82
+ } CURLUPart;
83
+
84
+ #define CURLU_DEFAULT_PORT (1 << 0) /* return default port number */
85
+ #define CURLU_NO_DEFAULT_PORT (1 << 1) /* act as if no port number was set,
86
+ if the port number matches the
87
+ default for the scheme */
88
+ #define CURLU_DEFAULT_SCHEME (1 << 2) /* return default scheme if
89
+ missing */
90
+ #define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
91
+ #define CURLU_PATH_AS_IS (1 << 4) /* leave dot sequences */
92
+ #define CURLU_DISALLOW_USER (1 << 5) /* no user+password allowed */
93
+ #define CURLU_URLDECODE (1 << 6) /* URL decode on get */
94
+ #define CURLU_URLENCODE (1 << 7) /* URL encode on set */
95
+ #define CURLU_APPENDQUERY (1 << 8) /* append a form style part */
96
+ #define CURLU_GUESS_SCHEME (1 << 9) /* legacy curl-style guessing */
97
+ #define CURLU_NO_AUTHORITY (1 << 10) /* Allow empty authority when the
98
+ scheme is unknown. */
99
+ #define CURLU_ALLOW_SPACE (1 << 11) /* Allow spaces in the URL */
100
+ #define CURLU_PUNYCODE (1 << 12) /* get the hostname in punycode */
101
+ #define CURLU_PUNY2IDN (1 << 13) /* punycode => IDN conversion */
102
+ #define CURLU_GET_EMPTY (1 << 14) /* allow empty queries and fragments
103
+ when extracting the URL or the
104
+ components */
105
+ #define CURLU_NO_GUESS_SCHEME (1 << 15) /* for get, do not accept a guess */
106
+
107
+ typedef struct Curl_URL CURLU;
108
+
109
+ /*
110
+ * curl_url() creates a new CURLU handle and returns a pointer to it.
111
+ * Must be freed with curl_url_cleanup().
112
+ */
113
+ CURL_EXTERN CURLU *curl_url(void);
114
+
115
+ /*
116
+ * curl_url_cleanup() frees the CURLU handle and related resources used for
117
+ * the URL parsing. It does not free strings previously returned with the URL
118
+ * API.
119
+ */
120
+ CURL_EXTERN void curl_url_cleanup(CURLU *u);
121
+
122
+ /*
123
+ * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new
124
+ * handle must also be freed with curl_url_cleanup().
125
+ */
126
+ CURL_EXTERN CURLU *curl_url_dup(const CURLU *in);
127
+
128
+ /*
129
+ * curl_url_get() extracts a specific part of the URL from a CURLU
130
+ * handle. Returns error code. The returned pointer MUST be freed with
131
+ * curl_free() afterwards.
132
+ */
133
+ CURL_EXTERN CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
134
+ char **part, unsigned int flags);
135
+
136
+ /*
137
+ * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns
138
+ * error code. The passed in string is copied. Passing a NULL instead of
139
+ * a part string, clears that part.
140
+ */
141
+ CURL_EXTERN CURLUcode curl_url_set(CURLU *u, CURLUPart what,
142
+ const char *part, unsigned int flags);
143
+
144
+ /*
145
+ * curl_url_strerror() turns a CURLUcode value into the equivalent human
146
+ * readable error string. This is useful for printing meaningful error
147
+ * messages.
148
+ */
149
+ CURL_EXTERN const char *curl_url_strerror(CURLUcode error);
150
+
151
+ #ifdef __cplusplus
152
+ } /* end of extern "C" */
153
+ #endif
154
+
155
+ #endif /* CURLINC_URLAPI_H */
@@ -0,0 +1,98 @@
1
+ #ifndef CURLINC_WEBSOCKETS_H
2
+ #define CURLINC_WEBSOCKETS_H
3
+ /***************************************************************************
4
+ * _ _ ____ _
5
+ * Project ___| | | | _ \| |
6
+ * / __| | | | |_) | |
7
+ * | (__| |_| | _ <| |___
8
+ * \___|\___/|_| \_\_____|
9
+ *
10
+ * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
11
+ *
12
+ * This software is licensed as described in the file COPYING, which
13
+ * you should have received as part of this distribution. The terms
14
+ * are also available at https://curl.se/docs/copyright.html.
15
+ *
16
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17
+ * copies of the Software, and permit persons to whom the Software is
18
+ * furnished to do so, under the terms of the COPYING file.
19
+ *
20
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
+ * KIND, either express or implied.
22
+ *
23
+ * SPDX-License-Identifier: curl
24
+ *
25
+ ***************************************************************************/
26
+
27
+ #ifdef __cplusplus
28
+ extern "C" {
29
+ #endif
30
+
31
+ struct curl_ws_frame {
32
+ int age; /* zero */
33
+ int flags; /* See the CURLWS_* defines */
34
+ curl_off_t offset; /* the offset of this data into the frame */
35
+ curl_off_t bytesleft; /* number of pending bytes left of the payload */
36
+ size_t len; /* size of the current data chunk */
37
+ };
38
+
39
+ /* flag bits */
40
+ #define CURLWS_TEXT (1 << 0)
41
+ #define CURLWS_BINARY (1 << 1)
42
+ #define CURLWS_CONT (1 << 2)
43
+ #define CURLWS_CLOSE (1 << 3)
44
+ #define CURLWS_PING (1 << 4)
45
+ #define CURLWS_OFFSET (1 << 5)
46
+
47
+ /*
48
+ * NAME curl_ws_recv()
49
+ *
50
+ * DESCRIPTION
51
+ *
52
+ * Receives data from the websocket connection. Use after successful
53
+ * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
54
+ */
55
+ CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
56
+ size_t *recv,
57
+ const struct curl_ws_frame **metap);
58
+
59
+ /* flags for curl_ws_send() */
60
+ #define CURLWS_PONG (1 << 6)
61
+
62
+ /*
63
+ * NAME curl_ws_send()
64
+ *
65
+ * DESCRIPTION
66
+ *
67
+ * Sends data over the websocket connection. Use after successful
68
+ * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
69
+ */
70
+ CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer_arg,
71
+ size_t buflen, size_t *sent,
72
+ curl_off_t fragsize,
73
+ unsigned int flags);
74
+
75
+ /*
76
+ * NAME curl_ws_start_frame()
77
+ *
78
+ * DESCRIPTION
79
+ *
80
+ * Buffers a websocket frame header with the given flags and length.
81
+ * Errors when a previous frame is not complete, e.g. not all its
82
+ * payload has been added.
83
+ */
84
+ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
85
+ unsigned int flags,
86
+ curl_off_t frame_len);
87
+
88
+ /* bits for the CURLOPT_WS_OPTIONS bitmask: */
89
+ #define CURLWS_RAW_MODE (1L << 0)
90
+ #define CURLWS_NOAUTOPONG (1L << 1)
91
+
92
+ CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl);
93
+
94
+ #ifdef __cplusplus
95
+ }
96
+ #endif
97
+
98
+ #endif /* CURLINC_WEBSOCKETS_H */
@@ -0,0 +1,220 @@
1
+ #***************************************************************************
2
+ # _ _ ____ _
3
+ # Project ___| | | | _ \| |
4
+ # / __| | | | |_) | |
5
+ # | (__| |_| | _ <| |___
6
+ # \___|\___/|_| \_\_____|
7
+ #
8
+ # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9
+ #
10
+ # This software is licensed as described in the file COPYING, which
11
+ # you should have received as part of this distribution. The terms
12
+ # are also available at https://curl.se/docs/copyright.html.
13
+ #
14
+ # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15
+ # copies of the Software, and permit persons to whom the Software is
16
+ # furnished to do so, under the terms of the COPYING file.
17
+ #
18
+ # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
+ # KIND, either express or implied.
20
+ #
21
+ # SPDX-License-Identifier: curl
22
+ #
23
+ ###########################################################################
24
+
25
+ ####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
26
+ ####### Any changes to this file will be overwritten by the next CMake run ####
27
+ ####### The input file was curl-config.in.cmake ########
28
+
29
+ get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
30
+
31
+ macro(set_and_check _var _file)
32
+ set(${_var} "${_file}")
33
+ if(NOT EXISTS "${_file}")
34
+ message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
35
+ endif()
36
+ endmacro()
37
+
38
+ macro(check_required_components _NAME)
39
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
40
+ if(NOT ${_NAME}_${comp}_FOUND)
41
+ if(${_NAME}_FIND_REQUIRED_${comp})
42
+ set(${_NAME}_FOUND FALSE)
43
+ endif()
44
+ endif()
45
+ endforeach()
46
+ endmacro()
47
+
48
+ ####################################################################################
49
+
50
+ option(CURL_USE_CMAKECONFIG "Enable detecting CURL dependencies via CMake Config. Default: OFF"
51
+ "OFF")
52
+ option(CURL_USE_PKGCONFIG "Enable pkg-config to detect CURL dependencies. Default: OFF"
53
+ "OFF")
54
+
55
+ if(CMAKE_VERSION VERSION_LESS 3.18)
56
+ message(STATUS "CURL: CURL-specific Find modules require "
57
+ "CMake 3.18 or upper, found: ${CMAKE_VERSION}.")
58
+ endif()
59
+
60
+ include(CMakeFindDependencyMacro)
61
+
62
+ if("1" OR "")
63
+ find_dependency(Threads) # for Threads::Threads
64
+ endif()
65
+
66
+ if("ON")
67
+ if("4")
68
+ find_dependency(OpenSSL "4")
69
+ else()
70
+ find_dependency(OpenSSL)
71
+ endif()
72
+ # Define lib duplicate to fixup lib order for GCC binutils ld in static builds
73
+ if(TARGET OpenSSL::Crypto AND NOT TARGET CURL::OpenSSL_Crypto)
74
+ add_library(CURL::OpenSSL_Crypto INTERFACE IMPORTED)
75
+ set_target_properties(CURL::OpenSSL_Crypto PROPERTIES INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
76
+ endif()
77
+ endif()
78
+ if("ON")
79
+ find_dependency(ZLIB "1")
80
+ # Define lib duplicate to fixup lib order for GCC binutils ld in static builds
81
+ if(TARGET ZLIB::ZLIB AND NOT TARGET CURL::ZLIB)
82
+ add_library(CURL::ZLIB INTERFACE IMPORTED)
83
+ set_target_properties(CURL::ZLIB PROPERTIES INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
84
+ endif()
85
+ endif()
86
+
87
+ set(_curl_cmake_module_path_save ${CMAKE_MODULE_PATH})
88
+ list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
89
+
90
+ set(_curl_libs "")
91
+
92
+ if("OFF")
93
+ find_dependency(Brotli MODULE)
94
+ list(APPEND _curl_libs CURL::brotli)
95
+ endif()
96
+ if("")
97
+ find_dependency(Cares MODULE)
98
+ list(APPEND _curl_libs CURL::cares)
99
+ endif()
100
+ if("")
101
+ find_dependency(GSS MODULE)
102
+ list(APPEND _curl_libs CURL::gss)
103
+ endif()
104
+ if("")
105
+ find_dependency(Libbacktrace MODULE)
106
+ list(APPEND _curl_libs CURL::libbacktrace)
107
+ endif()
108
+ if("")
109
+ find_dependency(Libgsasl MODULE)
110
+ list(APPEND _curl_libs CURL::libgsasl)
111
+ endif()
112
+ if(NOT "" AND NOT "ON")
113
+ find_dependency(LDAP MODULE)
114
+ list(APPEND _curl_libs CURL::ldap)
115
+ endif()
116
+ if("OFF")
117
+ find_dependency(Libidn2 MODULE)
118
+ list(APPEND _curl_libs CURL::libidn2)
119
+ endif()
120
+ if("OFF")
121
+ find_dependency(Libpsl MODULE)
122
+ list(APPEND _curl_libs CURL::libpsl)
123
+ endif()
124
+ if("")
125
+ find_dependency(Libssh MODULE)
126
+ list(APPEND _curl_libs CURL::libssh)
127
+ endif()
128
+ if("OFF")
129
+ find_dependency(Libssh2 MODULE)
130
+ list(APPEND _curl_libs CURL::libssh2)
131
+ endif()
132
+ if("")
133
+ find_dependency(Libuv MODULE)
134
+ list(APPEND _curl_libs CURL::libuv)
135
+ endif()
136
+ if("")
137
+ find_dependency(MbedTLS MODULE)
138
+ list(APPEND _curl_libs CURL::mbedtls)
139
+ endif()
140
+ if("OFF")
141
+ find_dependency(NGHTTP2 MODULE)
142
+ list(APPEND _curl_libs CURL::nghttp2)
143
+ endif()
144
+ if("")
145
+ find_dependency(NGHTTP3 MODULE)
146
+ list(APPEND _curl_libs CURL::nghttp3)
147
+ endif()
148
+ if("OFF")
149
+ find_dependency(NGTCP2 MODULE COMPONENTS "")
150
+ list(APPEND _curl_libs CURL::ngtcp2)
151
+ endif()
152
+ if("")
153
+ find_dependency(GnuTLS MODULE)
154
+ list(APPEND _curl_libs CURL::gnutls)
155
+ find_dependency(Nettle MODULE)
156
+ list(APPEND _curl_libs CURL::nettle)
157
+ endif()
158
+ if("OFF")
159
+ find_dependency(Quiche MODULE)
160
+ list(APPEND _curl_libs CURL::quiche)
161
+ endif()
162
+ if("")
163
+ find_dependency(Rustls MODULE)
164
+ list(APPEND _curl_libs CURL::rustls)
165
+ endif()
166
+ if("")
167
+ find_dependency(WolfSSL MODULE)
168
+ list(APPEND _curl_libs CURL::wolfssl)
169
+ endif()
170
+ if("OFF")
171
+ find_dependency(Zstd MODULE)
172
+ list(APPEND _curl_libs CURL::zstd)
173
+ endif()
174
+
175
+ set(CMAKE_MODULE_PATH ${_curl_cmake_module_path_save})
176
+
177
+ # Define lib duplicate to fixup lib order for GCC binutils ld in static builds
178
+ if(WIN32 AND NOT TARGET CURL::win32_winsock)
179
+ add_library(CURL::win32_winsock INTERFACE IMPORTED)
180
+ set_target_properties(CURL::win32_winsock PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32")
181
+ endif()
182
+
183
+ include("${CMAKE_CURRENT_LIST_DIR}/CURLTargets.cmake")
184
+
185
+ # Alias for either shared or static library
186
+ if(NOT TARGET CURL::libcurl)
187
+ add_library(CURL::libcurl ALIAS CURL::libcurl_static)
188
+ endif()
189
+
190
+ # For compatibility with CMake's FindCURL.cmake
191
+ set(CURL_VERSION_STRING "8.21.0")
192
+ set(CURL_LIBRARIES CURL::libcurl)
193
+ set(CURL_LIBRARIES_PRIVATE "/Users/bugra/Documents/cpp.js/ports/openssl/ios/ssl.xcframework/ios-arm64-simulator/libssl.a;/Users/bugra/Documents/cpp.js/ports/openssl/ios/crypto.xcframework/ios-arm64-simulator/libcrypto.a;/Users/bugra/Documents/cpp.js/ports/openssl/ios/crypto.xcframework/ios-arm64-simulator/libcrypto.a;/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libz.tbd")
194
+ set_and_check(CURL_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include")
195
+
196
+ set(CURL_SUPPORTED_PROTOCOLS "DICT;FILE;FTP;FTPS;GOPHER;GOPHERS;HTTP;HTTPS;IMAP;IMAPS;IPFS;IPNS;MQTT;MQTTS;POP3;POP3S;RTSP;SMTP;SMTPS;TELNET;TFTP;WS;WSS")
197
+ set(CURL_SUPPORTED_FEATURES "alt-svc;AsynchDNS;HSTS;HTTPS-proxy;Largefile;libz;SSL;threadsafe;TLS-SRP;UnixSockets")
198
+
199
+ foreach(_curl_item IN LISTS CURL_SUPPORTED_PROTOCOLS CURL_SUPPORTED_FEATURES)
200
+ set(CURL_SUPPORTS_${_curl_item} TRUE)
201
+ endforeach()
202
+
203
+ set(_curl_missing_req "")
204
+ foreach(_curl_item IN LISTS CURL_FIND_COMPONENTS)
205
+ if(CURL_SUPPORTS_${_curl_item})
206
+ set(CURL_${_curl_item}_FOUND TRUE)
207
+ elseif(CURL_FIND_REQUIRED_${_curl_item})
208
+ list(APPEND _curl_missing_req ${_curl_item})
209
+ endif()
210
+ endforeach()
211
+
212
+ if(_curl_missing_req)
213
+ string(REPLACE ";" " " _curl_missing_req "${_curl_missing_req}")
214
+ if(CURL_FIND_REQUIRED)
215
+ message(FATAL_ERROR "CURL: missing required components: ${_curl_missing_req}")
216
+ endif()
217
+ unset(_curl_missing_req)
218
+ endif()
219
+
220
+ check_required_components("CURL")
@@ -0,0 +1,71 @@
1
+
2
+ if(NOT PACKAGE_FIND_VERSION_RANGE AND PACKAGE_FIND_VERSION_MAJOR STREQUAL "7")
3
+ # Version 8 satisfies version 7... requirements
4
+ set(PACKAGE_FIND_VERSION_MAJOR 8)
5
+ set(PACKAGE_FIND_VERSION_COUNT 1)
6
+ endif()
7
+ # This is a basic version file for the Config-mode of find_package().
8
+ # It is used by write_basic_package_version_file() as input file for configure_file()
9
+ # to create a version-file which can be installed along a config.cmake file.
10
+ #
11
+ # The created file sets PACKAGE_VERSION_EXACT if the current version string and
12
+ # the requested version string are exactly the same and it sets
13
+ # PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
14
+ # but only if the requested major version is the same as the current one.
15
+ # The variable CVF_VERSION must be set before calling configure_file().
16
+
17
+
18
+ set(PACKAGE_VERSION "8.21.0")
19
+
20
+ if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
21
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
22
+ else()
23
+
24
+ if("8.21.0" MATCHES "^([0-9]+)\\.")
25
+ set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
26
+ if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
27
+ string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
28
+ endif()
29
+ else()
30
+ set(CVF_VERSION_MAJOR "8.21.0")
31
+ endif()
32
+
33
+ if(PACKAGE_FIND_VERSION_RANGE)
34
+ # both endpoints of the range must have the expected major version
35
+ math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
36
+ if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
37
+ OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
38
+ OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
39
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
40
+ elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
41
+ AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
42
+ OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
43
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
44
+ else()
45
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
46
+ endif()
47
+ else()
48
+ if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
49
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
50
+ else()
51
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
52
+ endif()
53
+
54
+ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
55
+ set(PACKAGE_VERSION_EXACT TRUE)
56
+ endif()
57
+ endif()
58
+ endif()
59
+
60
+
61
+ # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
62
+ if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
63
+ return()
64
+ endif()
65
+
66
+ # check that the installed version has the same 32/64bit-ness as the one which is currently searching:
67
+ if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
68
+ math(EXPR installedBits "8 * 8")
69
+ set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
70
+ set(PACKAGE_VERSION_UNSUITABLE TRUE)
71
+ endif()
@@ -0,0 +1,19 @@
1
+ #----------------------------------------------------------------
2
+ # Generated CMake target import file for configuration "Release".
3
+ #----------------------------------------------------------------
4
+
5
+ # Commands may need to know the format version.
6
+ set(CMAKE_IMPORT_FILE_VERSION 1)
7
+
8
+ # Import target "CURL::libcurl_static" for configuration "Release"
9
+ set_property(TARGET CURL::libcurl_static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
10
+ set_target_properties(CURL::libcurl_static PROPERTIES
11
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
12
+ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libcurl.a"
13
+ )
14
+
15
+ list(APPEND _cmake_import_check_targets CURL::libcurl_static )
16
+ list(APPEND _cmake_import_check_files_for_CURL::libcurl_static "${_IMPORT_PREFIX}/lib/libcurl.a" )
17
+
18
+ # Commands beyond this point should not need to know the version.
19
+ set(CMAKE_IMPORT_FILE_VERSION)
@@ -0,0 +1,108 @@
1
+ # Generated by CMake
2
+
3
+ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
4
+ message(FATAL_ERROR "CMake >= 2.8.12 required")
5
+ endif()
6
+ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
+ message(FATAL_ERROR "CMake >= 2.8.12 required")
8
+ endif()
9
+ cmake_policy(PUSH)
10
+ cmake_policy(VERSION 2.8.12...3.30)
11
+ #----------------------------------------------------------------
12
+ # Generated CMake target import file.
13
+ #----------------------------------------------------------------
14
+
15
+ # Commands may need to know the format version.
16
+ set(CMAKE_IMPORT_FILE_VERSION 1)
17
+
18
+ # Protect against multiple inclusion, which would fail when already imported targets are added once more.
19
+ set(_cmake_targets_defined "")
20
+ set(_cmake_targets_not_defined "")
21
+ set(_cmake_expected_targets "")
22
+ foreach(_cmake_expected_target IN ITEMS CURL::libcurl_static)
23
+ list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
24
+ if(TARGET "${_cmake_expected_target}")
25
+ list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
26
+ else()
27
+ list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
28
+ endif()
29
+ endforeach()
30
+ unset(_cmake_expected_target)
31
+ if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
32
+ unset(_cmake_targets_defined)
33
+ unset(_cmake_targets_not_defined)
34
+ unset(_cmake_expected_targets)
35
+ unset(CMAKE_IMPORT_FILE_VERSION)
36
+ cmake_policy(POP)
37
+ return()
38
+ endif()
39
+ if(NOT _cmake_targets_defined STREQUAL "")
40
+ string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
41
+ string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
42
+ message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
43
+ endif()
44
+ unset(_cmake_targets_defined)
45
+ unset(_cmake_targets_not_defined)
46
+ unset(_cmake_expected_targets)
47
+
48
+
49
+ # Compute the installation prefix relative to this file.
50
+ get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
51
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
52
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
53
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
54
+ if(_IMPORT_PREFIX STREQUAL "/")
55
+ set(_IMPORT_PREFIX "")
56
+ endif()
57
+
58
+ # Create imported target CURL::libcurl_static
59
+ add_library(CURL::libcurl_static STATIC IMPORTED)
60
+
61
+ set_target_properties(CURL::libcurl_static PROPERTIES
62
+ INTERFACE_COMPILE_DEFINITIONS "CURL_STATICLIB"
63
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
64
+ INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:OpenSSL::SSL>;\$<LINK_ONLY:OpenSSL::Crypto>;\$<LINK_ONLY:ZLIB::ZLIB>;\$<LINK_ONLY:Threads::Threads>"
65
+ )
66
+
67
+ # Load information for each installed configuration.
68
+ file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/CURLTargets-*.cmake")
69
+ foreach(_cmake_config_file IN LISTS _cmake_config_files)
70
+ include("${_cmake_config_file}")
71
+ endforeach()
72
+ unset(_cmake_config_file)
73
+ unset(_cmake_config_files)
74
+
75
+ # Cleanup temporary variables.
76
+ set(_IMPORT_PREFIX)
77
+
78
+ # Loop over all imported files and verify that they actually exist
79
+ foreach(_cmake_target IN LISTS _cmake_import_check_targets)
80
+ if(CMAKE_VERSION VERSION_LESS "3.28"
81
+ OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
82
+ OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}")
83
+ foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
84
+ if(NOT EXISTS "${_cmake_file}")
85
+ message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
86
+ \"${_cmake_file}\"
87
+ but this file does not exist. Possible reasons include:
88
+ * The file was deleted, renamed, or moved to another location.
89
+ * An install or uninstall procedure did not complete successfully.
90
+ * The installation package was faulty and contained
91
+ \"${CMAKE_CURRENT_LIST_FILE}\"
92
+ but not all the files it references.
93
+ ")
94
+ endif()
95
+ endforeach()
96
+ endif()
97
+ unset(_cmake_file)
98
+ unset("_cmake_import_check_files_for_${_cmake_target}")
99
+ endforeach()
100
+ unset(_cmake_target)
101
+ unset(_cmake_import_check_targets)
102
+
103
+ # This file does not depend on other imported targets which have
104
+ # been exported from the same project but in a separate export set.
105
+
106
+ # Commands beyond this point should not need to know the version.
107
+ set(CMAKE_IMPORT_FILE_VERSION)
108
+ cmake_policy(POP)