capacitor-freerasp 1.0.0

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 (80) hide show
  1. package/CapacitorFreerasp.podspec +19 -0
  2. package/LICENSE +20 -0
  3. package/README.md +431 -0
  4. package/android/build.gradle +75 -0
  5. package/android/consumer-rules.pro +1 -0
  6. package/android/gradle.properties +22 -0
  7. package/android/proguard-rules.pro +21 -0
  8. package/android/settings.gradle +2 -0
  9. package/android/src/main/AndroidManifest.xml +2 -0
  10. package/android/src/main/java/com/aheaditec/freerasp/FreeraspPlugin.kt +120 -0
  11. package/android/src/main/res/.gitkeep +0 -0
  12. package/dist/esm/definitions.d.ts +36 -0
  13. package/dist/esm/definitions.js +2 -0
  14. package/dist/esm/definitions.js.map +1 -0
  15. package/dist/esm/index.d.ts +7 -0
  16. package/dist/esm/index.js +25 -0
  17. package/dist/esm/index.js.map +1 -0
  18. package/dist/esm/web.d.ts +9 -0
  19. package/dist/esm/web.js +8 -0
  20. package/dist/esm/web.js.map +1 -0
  21. package/dist/plugin.cjs.js +45 -0
  22. package/dist/plugin.cjs.js.map +1 -0
  23. package/dist/plugin.js +48 -0
  24. package/dist/plugin.js.map +1 -0
  25. package/ios/Plugin/Freerasp.swift +8 -0
  26. package/ios/Plugin/FreeraspPlugin.h +10 -0
  27. package/ios/Plugin/FreeraspPlugin.m +9 -0
  28. package/ios/Plugin/FreeraspPlugin.swift +66 -0
  29. package/ios/Plugin/Info.plist +24 -0
  30. package/ios/Plugin/TalsecRuntime.xcframework/Info.plist +40 -0
  31. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  32. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  33. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +297 -0
  34. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  35. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -0
  36. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -0
  37. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +123 -0
  38. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  39. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -0
  40. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -0
  41. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  42. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -0
  43. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  44. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  45. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +5255 -0
  46. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +54 -0
  47. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  48. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +54 -0
  49. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  50. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  51. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -0
  52. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -0
  53. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  54. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  55. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +590 -0
  56. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  57. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +3029 -0
  58. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -0
  59. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +123 -0
  60. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  61. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +456 -0
  62. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -0
  63. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  64. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +504 -0
  65. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  66. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  67. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +5220 -0
  68. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +54 -0
  69. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  70. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +54 -0
  71. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +5220 -0
  72. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +54 -0
  73. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  74. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +54 -0
  75. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  76. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  77. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +388 -0
  78. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +3154 -0
  79. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -0
  80. package/package.json +92 -0
@@ -0,0 +1,504 @@
1
+ #ifndef CURLINC_SYSTEM_H
2
+ #define CURLINC_SYSTEM_H
3
+ /***************************************************************************
4
+ * _ _ ____ _
5
+ * Project ___| | | | _ \| |
6
+ * / __| | | | |_) | |
7
+ * | (__| |_| | _ <| |___
8
+ * \___|\___/|_| \_\_____|
9
+ *
10
+ * Copyright (C) 1998 - 2020, 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
+ ***************************************************************************/
24
+
25
+ /*
26
+ * Try to keep one section per platform, compiler and architecture, otherwise,
27
+ * if an existing section is reused for a different one and later on the
28
+ * original is adjusted, probably the piggybacking one can be adversely
29
+ * changed.
30
+ *
31
+ * In order to differentiate between platforms/compilers/architectures use
32
+ * only compiler built in predefined preprocessor symbols.
33
+ *
34
+ * curl_off_t
35
+ * ----------
36
+ *
37
+ * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
38
+ * wide signed integral data type. The width of this data type must remain
39
+ * constant and independent of any possible large file support settings.
40
+ *
41
+ * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
42
+ * wide signed integral data type if there is no 64-bit type.
43
+ *
44
+ * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
45
+ * only be violated if off_t is the only 64-bit data type available and the
46
+ * size of off_t is independent of large file support settings. Keep your
47
+ * build on the safe side avoiding an off_t gating. If you have a 64-bit
48
+ * off_t then take for sure that another 64-bit data type exists, dig deeper
49
+ * and you will find it.
50
+ *
51
+ */
52
+
53
+ #if defined(__DJGPP__) || defined(__GO32__)
54
+ # if defined(__DJGPP__) && (__DJGPP__ > 1)
55
+ # define CURL_TYPEOF_CURL_OFF_T long long
56
+ # define CURL_FORMAT_CURL_OFF_T "lld"
57
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
58
+ # define CURL_SUFFIX_CURL_OFF_T LL
59
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
60
+ # else
61
+ # define CURL_TYPEOF_CURL_OFF_T long
62
+ # define CURL_FORMAT_CURL_OFF_T "ld"
63
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
64
+ # define CURL_SUFFIX_CURL_OFF_T L
65
+ # define CURL_SUFFIX_CURL_OFF_TU UL
66
+ # endif
67
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
68
+
69
+ #elif defined(__SALFORDC__)
70
+ # define CURL_TYPEOF_CURL_OFF_T long
71
+ # define CURL_FORMAT_CURL_OFF_T "ld"
72
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
73
+ # define CURL_SUFFIX_CURL_OFF_T L
74
+ # define CURL_SUFFIX_CURL_OFF_TU UL
75
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
76
+
77
+ #elif defined(__BORLANDC__)
78
+ # if (__BORLANDC__ < 0x520)
79
+ # define CURL_TYPEOF_CURL_OFF_T long
80
+ # define CURL_FORMAT_CURL_OFF_T "ld"
81
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
82
+ # define CURL_SUFFIX_CURL_OFF_T L
83
+ # define CURL_SUFFIX_CURL_OFF_TU UL
84
+ # else
85
+ # define CURL_TYPEOF_CURL_OFF_T __int64
86
+ # define CURL_FORMAT_CURL_OFF_T "I64d"
87
+ # define CURL_FORMAT_CURL_OFF_TU "I64u"
88
+ # define CURL_SUFFIX_CURL_OFF_T i64
89
+ # define CURL_SUFFIX_CURL_OFF_TU ui64
90
+ # endif
91
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
92
+
93
+ #elif defined(__TURBOC__)
94
+ # define CURL_TYPEOF_CURL_OFF_T long
95
+ # define CURL_FORMAT_CURL_OFF_T "ld"
96
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
97
+ # define CURL_SUFFIX_CURL_OFF_T L
98
+ # define CURL_SUFFIX_CURL_OFF_TU UL
99
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
100
+
101
+ #elif defined(__WATCOMC__)
102
+ # if defined(__386__)
103
+ # define CURL_TYPEOF_CURL_OFF_T __int64
104
+ # define CURL_FORMAT_CURL_OFF_T "I64d"
105
+ # define CURL_FORMAT_CURL_OFF_TU "I64u"
106
+ # define CURL_SUFFIX_CURL_OFF_T i64
107
+ # define CURL_SUFFIX_CURL_OFF_TU ui64
108
+ # else
109
+ # define CURL_TYPEOF_CURL_OFF_T long
110
+ # define CURL_FORMAT_CURL_OFF_T "ld"
111
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
112
+ # define CURL_SUFFIX_CURL_OFF_T L
113
+ # define CURL_SUFFIX_CURL_OFF_TU UL
114
+ # endif
115
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
116
+
117
+ #elif defined(__POCC__)
118
+ # if (__POCC__ < 280)
119
+ # define CURL_TYPEOF_CURL_OFF_T long
120
+ # define CURL_FORMAT_CURL_OFF_T "ld"
121
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
122
+ # define CURL_SUFFIX_CURL_OFF_T L
123
+ # define CURL_SUFFIX_CURL_OFF_TU UL
124
+ # elif defined(_MSC_VER)
125
+ # define CURL_TYPEOF_CURL_OFF_T __int64
126
+ # define CURL_FORMAT_CURL_OFF_T "I64d"
127
+ # define CURL_FORMAT_CURL_OFF_TU "I64u"
128
+ # define CURL_SUFFIX_CURL_OFF_T i64
129
+ # define CURL_SUFFIX_CURL_OFF_TU ui64
130
+ # else
131
+ # define CURL_TYPEOF_CURL_OFF_T long long
132
+ # define CURL_FORMAT_CURL_OFF_T "lld"
133
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
134
+ # define CURL_SUFFIX_CURL_OFF_T LL
135
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
136
+ # endif
137
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
138
+
139
+ #elif defined(__LCC__)
140
+ # if defined(__e2k__) /* MCST eLbrus C Compiler */
141
+ # define CURL_TYPEOF_CURL_OFF_T long
142
+ # define CURL_FORMAT_CURL_OFF_T "ld"
143
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
144
+ # define CURL_SUFFIX_CURL_OFF_T L
145
+ # define CURL_SUFFIX_CURL_OFF_TU UL
146
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
147
+ # define CURL_PULL_SYS_TYPES_H 1
148
+ # define CURL_PULL_SYS_SOCKET_H 1
149
+ # else /* Local (or Little) C Compiler */
150
+ # define CURL_TYPEOF_CURL_OFF_T long
151
+ # define CURL_FORMAT_CURL_OFF_T "ld"
152
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
153
+ # define CURL_SUFFIX_CURL_OFF_T L
154
+ # define CURL_SUFFIX_CURL_OFF_TU UL
155
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
156
+ # endif
157
+
158
+ #elif defined(__SYMBIAN32__)
159
+ # if defined(__EABI__) /* Treat all ARM compilers equally */
160
+ # define CURL_TYPEOF_CURL_OFF_T long long
161
+ # define CURL_FORMAT_CURL_OFF_T "lld"
162
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
163
+ # define CURL_SUFFIX_CURL_OFF_T LL
164
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
165
+ # elif defined(__CW32__)
166
+ # pragma longlong on
167
+ # define CURL_TYPEOF_CURL_OFF_T long long
168
+ # define CURL_FORMAT_CURL_OFF_T "lld"
169
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
170
+ # define CURL_SUFFIX_CURL_OFF_T LL
171
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
172
+ # elif defined(__VC32__)
173
+ # define CURL_TYPEOF_CURL_OFF_T __int64
174
+ # define CURL_FORMAT_CURL_OFF_T "lld"
175
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
176
+ # define CURL_SUFFIX_CURL_OFF_T LL
177
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
178
+ # endif
179
+ # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
180
+
181
+ #elif defined(__MWERKS__)
182
+ # define CURL_TYPEOF_CURL_OFF_T long long
183
+ # define CURL_FORMAT_CURL_OFF_T "lld"
184
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
185
+ # define CURL_SUFFIX_CURL_OFF_T LL
186
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
187
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
188
+
189
+ #elif defined(_WIN32_WCE)
190
+ # define CURL_TYPEOF_CURL_OFF_T __int64
191
+ # define CURL_FORMAT_CURL_OFF_T "I64d"
192
+ # define CURL_FORMAT_CURL_OFF_TU "I64u"
193
+ # define CURL_SUFFIX_CURL_OFF_T i64
194
+ # define CURL_SUFFIX_CURL_OFF_TU ui64
195
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
196
+
197
+ #elif defined(__MINGW32__)
198
+ # define CURL_TYPEOF_CURL_OFF_T long long
199
+ # define CURL_FORMAT_CURL_OFF_T "I64d"
200
+ # define CURL_FORMAT_CURL_OFF_TU "I64u"
201
+ # define CURL_SUFFIX_CURL_OFF_T LL
202
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
203
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
204
+ # define CURL_PULL_SYS_TYPES_H 1
205
+ # define CURL_PULL_WS2TCPIP_H 1
206
+
207
+ #elif defined(__VMS)
208
+ # if defined(__VAX)
209
+ # define CURL_TYPEOF_CURL_OFF_T long
210
+ # define CURL_FORMAT_CURL_OFF_T "ld"
211
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
212
+ # define CURL_SUFFIX_CURL_OFF_T L
213
+ # define CURL_SUFFIX_CURL_OFF_TU UL
214
+ # else
215
+ # define CURL_TYPEOF_CURL_OFF_T long long
216
+ # define CURL_FORMAT_CURL_OFF_T "lld"
217
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
218
+ # define CURL_SUFFIX_CURL_OFF_T LL
219
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
220
+ # endif
221
+ # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
222
+
223
+ #elif defined(__OS400__)
224
+ # if defined(__ILEC400__)
225
+ # define CURL_TYPEOF_CURL_OFF_T long long
226
+ # define CURL_FORMAT_CURL_OFF_T "lld"
227
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
228
+ # define CURL_SUFFIX_CURL_OFF_T LL
229
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
230
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
231
+ # define CURL_PULL_SYS_TYPES_H 1
232
+ # define CURL_PULL_SYS_SOCKET_H 1
233
+ # endif
234
+
235
+ #elif defined(__MVS__)
236
+ # if defined(__IBMC__) || defined(__IBMCPP__)
237
+ # if defined(_ILP32)
238
+ # elif defined(_LP64)
239
+ # endif
240
+ # if defined(_LONG_LONG)
241
+ # define CURL_TYPEOF_CURL_OFF_T long long
242
+ # define CURL_FORMAT_CURL_OFF_T "lld"
243
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
244
+ # define CURL_SUFFIX_CURL_OFF_T LL
245
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
246
+ # elif defined(_LP64)
247
+ # define CURL_TYPEOF_CURL_OFF_T long
248
+ # define CURL_FORMAT_CURL_OFF_T "ld"
249
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
250
+ # define CURL_SUFFIX_CURL_OFF_T L
251
+ # define CURL_SUFFIX_CURL_OFF_TU UL
252
+ # else
253
+ # define CURL_TYPEOF_CURL_OFF_T long
254
+ # define CURL_FORMAT_CURL_OFF_T "ld"
255
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
256
+ # define CURL_SUFFIX_CURL_OFF_T L
257
+ # define CURL_SUFFIX_CURL_OFF_TU UL
258
+ # endif
259
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
260
+ # define CURL_PULL_SYS_TYPES_H 1
261
+ # define CURL_PULL_SYS_SOCKET_H 1
262
+ # endif
263
+
264
+ #elif defined(__370__)
265
+ # if defined(__IBMC__) || defined(__IBMCPP__)
266
+ # if defined(_ILP32)
267
+ # elif defined(_LP64)
268
+ # endif
269
+ # if defined(_LONG_LONG)
270
+ # define CURL_TYPEOF_CURL_OFF_T long long
271
+ # define CURL_FORMAT_CURL_OFF_T "lld"
272
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
273
+ # define CURL_SUFFIX_CURL_OFF_T LL
274
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
275
+ # elif defined(_LP64)
276
+ # define CURL_TYPEOF_CURL_OFF_T long
277
+ # define CURL_FORMAT_CURL_OFF_T "ld"
278
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
279
+ # define CURL_SUFFIX_CURL_OFF_T L
280
+ # define CURL_SUFFIX_CURL_OFF_TU UL
281
+ # else
282
+ # define CURL_TYPEOF_CURL_OFF_T long
283
+ # define CURL_FORMAT_CURL_OFF_T "ld"
284
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
285
+ # define CURL_SUFFIX_CURL_OFF_T L
286
+ # define CURL_SUFFIX_CURL_OFF_TU UL
287
+ # endif
288
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
289
+ # define CURL_PULL_SYS_TYPES_H 1
290
+ # define CURL_PULL_SYS_SOCKET_H 1
291
+ # endif
292
+
293
+ #elif defined(TPF)
294
+ # define CURL_TYPEOF_CURL_OFF_T long
295
+ # define CURL_FORMAT_CURL_OFF_T "ld"
296
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
297
+ # define CURL_SUFFIX_CURL_OFF_T L
298
+ # define CURL_SUFFIX_CURL_OFF_TU UL
299
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
300
+
301
+ #elif defined(__TINYC__) /* also known as tcc */
302
+ # define CURL_TYPEOF_CURL_OFF_T long long
303
+ # define CURL_FORMAT_CURL_OFF_T "lld"
304
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
305
+ # define CURL_SUFFIX_CURL_OFF_T LL
306
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
307
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
308
+ # define CURL_PULL_SYS_TYPES_H 1
309
+ # define CURL_PULL_SYS_SOCKET_H 1
310
+
311
+ #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Oracle Solaris Studio */
312
+ # if !defined(__LP64) && (defined(__ILP32) || \
313
+ defined(__i386) || \
314
+ defined(__sparcv8) || \
315
+ defined(__sparcv8plus))
316
+ # define CURL_TYPEOF_CURL_OFF_T long long
317
+ # define CURL_FORMAT_CURL_OFF_T "lld"
318
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
319
+ # define CURL_SUFFIX_CURL_OFF_T LL
320
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
321
+ # elif defined(__LP64) || \
322
+ defined(__amd64) || defined(__sparcv9)
323
+ # define CURL_TYPEOF_CURL_OFF_T long
324
+ # define CURL_FORMAT_CURL_OFF_T "ld"
325
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
326
+ # define CURL_SUFFIX_CURL_OFF_T L
327
+ # define CURL_SUFFIX_CURL_OFF_TU UL
328
+ # endif
329
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
330
+ # define CURL_PULL_SYS_TYPES_H 1
331
+ # define CURL_PULL_SYS_SOCKET_H 1
332
+
333
+ #elif defined(__xlc__) /* IBM xlc compiler */
334
+ # if !defined(_LP64)
335
+ # define CURL_TYPEOF_CURL_OFF_T long long
336
+ # define CURL_FORMAT_CURL_OFF_T "lld"
337
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
338
+ # define CURL_SUFFIX_CURL_OFF_T LL
339
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
340
+ # else
341
+ # define CURL_TYPEOF_CURL_OFF_T long
342
+ # define CURL_FORMAT_CURL_OFF_T "ld"
343
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
344
+ # define CURL_SUFFIX_CURL_OFF_T L
345
+ # define CURL_SUFFIX_CURL_OFF_TU UL
346
+ # endif
347
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
348
+ # define CURL_PULL_SYS_TYPES_H 1
349
+ # define CURL_PULL_SYS_SOCKET_H 1
350
+
351
+ /* ===================================== */
352
+ /* KEEP MSVC THE PENULTIMATE ENTRY */
353
+ /* ===================================== */
354
+
355
+ #elif defined(_MSC_VER)
356
+ # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
357
+ # define CURL_TYPEOF_CURL_OFF_T __int64
358
+ # define CURL_FORMAT_CURL_OFF_T "I64d"
359
+ # define CURL_FORMAT_CURL_OFF_TU "I64u"
360
+ # define CURL_SUFFIX_CURL_OFF_T i64
361
+ # define CURL_SUFFIX_CURL_OFF_TU ui64
362
+ # else
363
+ # define CURL_TYPEOF_CURL_OFF_T long
364
+ # define CURL_FORMAT_CURL_OFF_T "ld"
365
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
366
+ # define CURL_SUFFIX_CURL_OFF_T L
367
+ # define CURL_SUFFIX_CURL_OFF_TU UL
368
+ # endif
369
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
370
+
371
+ /* ===================================== */
372
+ /* KEEP GENERIC GCC THE LAST ENTRY */
373
+ /* ===================================== */
374
+
375
+ #elif defined(__GNUC__) && !defined(_SCO_DS)
376
+ # if !defined(__LP64__) && \
377
+ (defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \
378
+ defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \
379
+ defined(__sparc__) || defined(__mips__) || defined(__sh__) || \
380
+ defined(__XTENSA__) || \
381
+ (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \
382
+ (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L))
383
+ # define CURL_TYPEOF_CURL_OFF_T long long
384
+ # define CURL_FORMAT_CURL_OFF_T "lld"
385
+ # define CURL_FORMAT_CURL_OFF_TU "llu"
386
+ # define CURL_SUFFIX_CURL_OFF_T LL
387
+ # define CURL_SUFFIX_CURL_OFF_TU ULL
388
+ # elif defined(__LP64__) || \
389
+ defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \
390
+ defined(__e2k__) || \
391
+ (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \
392
+ (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L)
393
+ # define CURL_TYPEOF_CURL_OFF_T long
394
+ # define CURL_FORMAT_CURL_OFF_T "ld"
395
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
396
+ # define CURL_SUFFIX_CURL_OFF_T L
397
+ # define CURL_SUFFIX_CURL_OFF_TU UL
398
+ # endif
399
+ # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
400
+ # define CURL_PULL_SYS_TYPES_H 1
401
+ # define CURL_PULL_SYS_SOCKET_H 1
402
+
403
+ #else
404
+ /* generic "safe guess" on old 32 bit style */
405
+ # define CURL_TYPEOF_CURL_OFF_T long
406
+ # define CURL_FORMAT_CURL_OFF_T "ld"
407
+ # define CURL_FORMAT_CURL_OFF_TU "lu"
408
+ # define CURL_SUFFIX_CURL_OFF_T L
409
+ # define CURL_SUFFIX_CURL_OFF_TU UL
410
+ # define CURL_TYPEOF_CURL_SOCKLEN_T int
411
+ #endif
412
+
413
+ #ifdef _AIX
414
+ /* AIX needs <sys/poll.h> */
415
+ #define CURL_PULL_SYS_POLL_H
416
+ #endif
417
+
418
+
419
+ /* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file */
420
+ /* ws2tcpip.h is required here to properly make type definitions below. */
421
+ #ifdef CURL_PULL_WS2TCPIP_H
422
+ # include <winsock2.h>
423
+ # include <windows.h>
424
+ # include <ws2tcpip.h>
425
+ #endif
426
+
427
+ /* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
428
+ /* sys/types.h is required here to properly make type definitions below. */
429
+ #ifdef CURL_PULL_SYS_TYPES_H
430
+ # include <sys/types.h>
431
+ #endif
432
+
433
+ /* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
434
+ /* sys/socket.h is required here to properly make type definitions below. */
435
+ #ifdef CURL_PULL_SYS_SOCKET_H
436
+ # include <sys/socket.h>
437
+ #endif
438
+
439
+ /* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */
440
+ /* sys/poll.h is required here to properly make type definitions below. */
441
+ #ifdef CURL_PULL_SYS_POLL_H
442
+ # include <sys/poll.h>
443
+ #endif
444
+
445
+ /* Data type definition of curl_socklen_t. */
446
+ #ifdef CURL_TYPEOF_CURL_SOCKLEN_T
447
+ typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
448
+ #endif
449
+
450
+ /* Data type definition of curl_off_t. */
451
+
452
+ #ifdef CURL_TYPEOF_CURL_OFF_T
453
+ typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
454
+ #endif
455
+
456
+ /*
457
+ * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
458
+ * these to be visible and exported by the external libcurl interface API,
459
+ * while also making them visible to the library internals, simply including
460
+ * curl_setup.h, without actually needing to include curl.h internally.
461
+ * If some day this section would grow big enough, all this should be moved
462
+ * to its own header file.
463
+ */
464
+
465
+ /*
466
+ * Figure out if we can use the ## preprocessor operator, which is supported
467
+ * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
468
+ * or __cplusplus so we need to carefully check for them too.
469
+ */
470
+
471
+ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
472
+ defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
473
+ defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
474
+ defined(__ILEC400__)
475
+ /* This compiler is believed to have an ISO compatible preprocessor */
476
+ #define CURL_ISOCPP
477
+ #else
478
+ /* This compiler is believed NOT to have an ISO compatible preprocessor */
479
+ #undef CURL_ISOCPP
480
+ #endif
481
+
482
+ /*
483
+ * Macros for minimum-width signed and unsigned curl_off_t integer constants.
484
+ */
485
+
486
+ #if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
487
+ # define CURLINC_OFF_T_C_HLPR2(x) x
488
+ # define CURLINC_OFF_T_C_HLPR1(x) CURLINC_OFF_T_C_HLPR2(x)
489
+ # define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \
490
+ CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
491
+ # define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \
492
+ CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
493
+ #else
494
+ # ifdef CURL_ISOCPP
495
+ # define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
496
+ # else
497
+ # define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
498
+ # endif
499
+ # define CURLINC_OFF_T_C_HLPR1(Val,Suffix) CURLINC_OFF_T_C_HLPR2(Val,Suffix)
500
+ # define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
501
+ # define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
502
+ #endif
503
+
504
+ #endif /* CURLINC_SYSTEM_H */
@@ -0,0 +1,125 @@
1
+ #ifndef CURLINC_URLAPI_H
2
+ #define CURLINC_URLAPI_H
3
+ /***************************************************************************
4
+ * _ _ ____ _
5
+ * Project ___| | | | _ \| |
6
+ * / __| | | | |_) | |
7
+ * | (__| |_| | _ <| |___
8
+ * \___|\___/|_| \_\_____|
9
+ *
10
+ * Copyright (C) 2018 - 2020, 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
+ ***************************************************************************/
24
+
25
+ #include "curl.h"
26
+
27
+ #ifdef __cplusplus
28
+ extern "C" {
29
+ #endif
30
+
31
+ /* the error codes for the URL API */
32
+ typedef enum {
33
+ CURLUE_OK,
34
+ CURLUE_BAD_HANDLE, /* 1 */
35
+ CURLUE_BAD_PARTPOINTER, /* 2 */
36
+ CURLUE_MALFORMED_INPUT, /* 3 */
37
+ CURLUE_BAD_PORT_NUMBER, /* 4 */
38
+ CURLUE_UNSUPPORTED_SCHEME, /* 5 */
39
+ CURLUE_URLDECODE, /* 6 */
40
+ CURLUE_OUT_OF_MEMORY, /* 7 */
41
+ CURLUE_USER_NOT_ALLOWED, /* 8 */
42
+ CURLUE_UNKNOWN_PART, /* 9 */
43
+ CURLUE_NO_SCHEME, /* 10 */
44
+ CURLUE_NO_USER, /* 11 */
45
+ CURLUE_NO_PASSWORD, /* 12 */
46
+ CURLUE_NO_OPTIONS, /* 13 */
47
+ CURLUE_NO_HOST, /* 14 */
48
+ CURLUE_NO_PORT, /* 15 */
49
+ CURLUE_NO_QUERY, /* 16 */
50
+ CURLUE_NO_FRAGMENT /* 17 */
51
+ } CURLUcode;
52
+
53
+ typedef enum {
54
+ CURLUPART_URL,
55
+ CURLUPART_SCHEME,
56
+ CURLUPART_USER,
57
+ CURLUPART_PASSWORD,
58
+ CURLUPART_OPTIONS,
59
+ CURLUPART_HOST,
60
+ CURLUPART_PORT,
61
+ CURLUPART_PATH,
62
+ CURLUPART_QUERY,
63
+ CURLUPART_FRAGMENT,
64
+ CURLUPART_ZONEID /* added in 7.65.0 */
65
+ } CURLUPart;
66
+
67
+ #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */
68
+ #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set,
69
+ if the port number matches the
70
+ default for the scheme */
71
+ #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if
72
+ missing */
73
+ #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */
74
+ #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */
75
+ #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */
76
+ #define CURLU_URLDECODE (1<<6) /* URL decode on get */
77
+ #define CURLU_URLENCODE (1<<7) /* URL encode on set */
78
+ #define CURLU_APPENDQUERY (1<<8) /* append a form style part */
79
+ #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */
80
+ #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the
81
+ scheme is unknown. */
82
+
83
+ typedef struct Curl_URL CURLU;
84
+
85
+ /*
86
+ * curl_url() creates a new CURLU handle and returns a pointer to it.
87
+ * Must be freed with curl_url_cleanup().
88
+ */
89
+ CURL_EXTERN CURLU *curl_url(void);
90
+
91
+ /*
92
+ * curl_url_cleanup() frees the CURLU handle and related resources used for
93
+ * the URL parsing. It will not free strings previously returned with the URL
94
+ * API.
95
+ */
96
+ CURL_EXTERN void curl_url_cleanup(CURLU *handle);
97
+
98
+ /*
99
+ * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new
100
+ * handle must also be freed with curl_url_cleanup().
101
+ */
102
+ CURL_EXTERN CURLU *curl_url_dup(CURLU *in);
103
+
104
+ /*
105
+ * curl_url_get() extracts a specific part of the URL from a CURLU
106
+ * handle. Returns error code. The returned pointer MUST be freed with
107
+ * curl_free() afterwards.
108
+ */
109
+ CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what,
110
+ char **part, unsigned int flags);
111
+
112
+ /*
113
+ * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns
114
+ * error code. The passed in string will be copied. Passing a NULL instead of
115
+ * a part string, clears that part.
116
+ */
117
+ CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what,
118
+ const char *part, unsigned int flags);
119
+
120
+
121
+ #ifdef __cplusplus
122
+ } /* end of extern "C" */
123
+ #endif
124
+
125
+ #endif /* CURLINC_URLAPI_H */