@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.
- package/LICENSE +22 -0
- package/README.md +12 -0
- package/crossbind-port-curl.podspec +15 -0
- package/crossbind.build.js +1 -0
- package/crossbind.config.js +7 -0
- package/curl.xcframework/Info.plist +47 -0
- package/curl.xcframework/ios-arm64/Headers/curl/curl.h +3347 -0
- package/curl.xcframework/ios-arm64/Headers/curl/curlver.h +78 -0
- package/curl.xcframework/ios-arm64/Headers/curl/easy.h +123 -0
- package/curl.xcframework/ios-arm64/Headers/curl/header.h +74 -0
- package/curl.xcframework/ios-arm64/Headers/curl/mprintf.h +85 -0
- package/curl.xcframework/ios-arm64/Headers/curl/multi.h +560 -0
- package/curl.xcframework/ios-arm64/Headers/curl/options.h +70 -0
- package/curl.xcframework/ios-arm64/Headers/curl/stdcheaders.h +35 -0
- package/curl.xcframework/ios-arm64/Headers/curl/system.h +399 -0
- package/curl.xcframework/ios-arm64/Headers/curl/typecheck-gcc.h +960 -0
- package/curl.xcframework/ios-arm64/Headers/curl/urlapi.h +155 -0
- package/curl.xcframework/ios-arm64/Headers/curl/websockets.h +98 -0
- package/curl.xcframework/ios-arm64/libcurl.a +0 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/curl.h +3347 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/curlver.h +78 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/easy.h +123 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/header.h +74 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/mprintf.h +85 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/multi.h +560 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/options.h +70 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/stdcheaders.h +35 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/system.h +399 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/typecheck-gcc.h +960 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/urlapi.h +155 -0
- package/curl.xcframework/ios-arm64-simulator/Headers/curl/websockets.h +98 -0
- package/curl.xcframework/ios-arm64-simulator/libcurl.a +0 -0
- package/dist/prebuilt/CMakeLists.txt +57 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/crossbind-emccflags.fingerprint +1 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/curl.h +3347 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/curlver.h +78 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/easy.h +123 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/header.h +74 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/mprintf.h +85 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/multi.h +560 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/options.h +70 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/stdcheaders.h +35 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/system.h +399 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/typecheck-gcc.h +960 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/urlapi.h +155 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/include/curl/websockets.h +98 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLConfig.cmake +220 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLConfigVersion.cmake +71 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLTargets-release.cmake +19 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/CURLTargets.cmake +108 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindBrotli.cmake +96 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindCares.cmake +132 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindGSS.cmake +264 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindGnuTLS.cmake +92 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLDAP.cmake +115 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibbacktrace.cmake +61 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibgsasl.cmake +91 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibidn2.cmake +92 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibpsl.cmake +92 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibssh.cmake +118 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibssh2.cmake +117 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindLibuv.cmake +102 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindMbedTLS.cmake +137 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGHTTP2.cmake +116 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGHTTP3.cmake +116 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNGTCP2.cmake +187 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindNettle.cmake +97 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindQuiche.cmake +80 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindRustls.cmake +116 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindWolfSSL.cmake +135 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/cmake/CURL/FindZstd.cmake +144 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/libcurl.a +0 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/lib/pkgconfig/libcurl.pc +41 -0
- package/dist/prebuilt/ios-iphoneos-mt-release/share/man/man1/curl-config.1 +90 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/crossbind-emccflags.fingerprint +1 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/curl.h +3347 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/curlver.h +78 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/easy.h +123 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/header.h +74 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/mprintf.h +85 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/multi.h +560 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/options.h +70 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/stdcheaders.h +35 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/system.h +399 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/typecheck-gcc.h +960 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/urlapi.h +155 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/include/curl/websockets.h +98 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLConfig.cmake +220 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLConfigVersion.cmake +71 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLTargets-release.cmake +19 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/CURLTargets.cmake +108 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindBrotli.cmake +96 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindCares.cmake +132 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindGSS.cmake +264 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindGnuTLS.cmake +92 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLDAP.cmake +115 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibbacktrace.cmake +61 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibgsasl.cmake +91 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibidn2.cmake +92 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibpsl.cmake +92 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibssh.cmake +118 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibssh2.cmake +117 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindLibuv.cmake +102 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindMbedTLS.cmake +137 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGHTTP2.cmake +116 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGHTTP3.cmake +116 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNGTCP2.cmake +187 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindNettle.cmake +97 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindQuiche.cmake +80 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindRustls.cmake +116 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindWolfSSL.cmake +135 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/cmake/CURL/FindZstd.cmake +144 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/libcurl.a +0 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/lib/pkgconfig/libcurl.pc +41 -0
- package/dist/prebuilt/ios-iphonesimulator-mt-release/share/man/man1/curl-config.1 +90 -0
- 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 */
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
set(MY_LIST "ios-iphoneos-mt-release;ios-iphonesimulator-mt-release")
|
|
2
|
+
LIST(FIND MY_LIST "${PROJECT_TARGET_HOST}" PACKAGE_HOST_INDEX)
|
|
3
|
+
if(PACKAGE_HOST_INDEX EQUAL -1)
|
|
4
|
+
set(PROJECT_TARGET_HOST "${PROJECT_TARGET_HOST_RELEASE}")
|
|
5
|
+
endif()
|
|
6
|
+
LIST(FIND MY_LIST "${PROJECT_TARGET_HOST}" PACKAGE_HOST_INDEX)
|
|
7
|
+
|
|
8
|
+
if(NOT PACKAGE_HOST_INDEX EQUAL -1)
|
|
9
|
+
cmake_minimum_required(VERSION 3.28)
|
|
10
|
+
set(CMAKE_CXX_STANDARD 11)
|
|
11
|
+
set(PROJECT_NAME "curl")
|
|
12
|
+
set(PROJECT_LIBS "curl")
|
|
13
|
+
project("${PROJECT_NAME}")
|
|
14
|
+
|
|
15
|
+
if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|
16
|
+
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/../..")
|
|
17
|
+
else()
|
|
18
|
+
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PROJECT_TARGET_HOST}/lib")
|
|
19
|
+
endif()
|
|
20
|
+
|
|
21
|
+
set(PROJECT_LIBS_DIR)
|
|
22
|
+
foreach(L IN LISTS PROJECT_LIBS)
|
|
23
|
+
SET(FOUND_LIB "FOUND_LIB-NOTFOUND")
|
|
24
|
+
find_library(FOUND_LIB
|
|
25
|
+
NAMES "${L}"
|
|
26
|
+
PATHS "${PACKAGE_DIR}"
|
|
27
|
+
NO_CACHE
|
|
28
|
+
NO_DEFAULT_PATH
|
|
29
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
30
|
+
REQUIRED
|
|
31
|
+
)
|
|
32
|
+
LIST(APPEND PROJECT_LIBS_DIR ${FOUND_LIB})
|
|
33
|
+
endforeach()
|
|
34
|
+
|
|
35
|
+
add_library("${PROJECT_NAME}" INTERFACE)
|
|
36
|
+
# Cargo producers register through an init-array constructor nothing references. KEEP pins the
|
|
37
|
+
# generated keep symbol (--undefined) so only the registration object is pulled - never the
|
|
38
|
+
# whole archive, because each Rust staticlib bundles libstd and fully loading two of them
|
|
39
|
+
# duplicates thousands of std symbols. FORCE (manual-bindings crates, no keep symbol) falls
|
|
40
|
+
# back to whole-archive - safe only as the app's single loaded Rust archive. (Apple consumers
|
|
41
|
+
# get the equivalent flags from the generated podspec instead.)
|
|
42
|
+
set(PROJECT_RUST_LINK "")
|
|
43
|
+
if(PROJECT_RUST_LINK STREQUAL "KEEP" AND NOT APPLE)
|
|
44
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
45
|
+
foreach(L IN LISTS PROJECT_LIBS)
|
|
46
|
+
target_link_options("${PROJECT_NAME}" INTERFACE "-Wl,--undefined=crossbind_keep_${L}")
|
|
47
|
+
endforeach()
|
|
48
|
+
elseif(PROJECT_RUST_LINK STREQUAL "FORCE" AND NOT APPLE)
|
|
49
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "$<LINK_LIBRARY:WHOLE_ARCHIVE,${PROJECT_LIBS_DIR}>")
|
|
50
|
+
else()
|
|
51
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
52
|
+
endif()
|
|
53
|
+
|
|
54
|
+
if(NOT APPLE)
|
|
55
|
+
target_include_directories("${PROJECT_NAME}" INTERFACE "${PROJECT_SOURCE_DIR}/${PROJECT_TARGET_HOST}/include")
|
|
56
|
+
endif()
|
|
57
|
+
endif()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|