-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurl.scala
4424 lines (4222 loc) · 189 KB
/
curl.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package curl
import _root_.scala.scalanative.unsafe.*
import _root_.scala.scalanative.unsigned.*
import _root_.scala.scalanative.libc.*
import _root_.scala.scalanative.*
object predef:
private[curl] trait CEnum[T](using eq: T =:= Int):
given Tag[T] = Tag.Int.asInstanceOf[Tag[T]]
extension (inline t: T)
inline def int: CInt = eq.apply(t)
inline def value: CInt = eq.apply(t)
end CEnum
private[curl] trait CEnumU[T](using eq: T =:= UInt):
given Tag[T] = Tag.UInt.asInstanceOf[Tag[T]]
extension (inline t: T)
inline def int: CInt = eq.apply(t).toInt
inline def uint: CUnsignedInt = eq.apply(t)
inline def value: CUnsignedInt = eq.apply(t)
end CEnumU
end predef
object enumerations:
import predef.*
/** */
opaque type CURLFORMcode = CUnsignedInt
object CURLFORMcode extends CEnumU[CURLFORMcode]:
given _tag: Tag[CURLFORMcode] = Tag.UInt
inline def define(inline a: Long): CURLFORMcode = a.toUInt
val CURL_FORMADD_OK = define(0)
val CURL_FORMADD_MEMORY = define(1)
val CURL_FORMADD_OPTION_TWICE = define(2)
val CURL_FORMADD_NULL = define(3)
val CURL_FORMADD_UNKNOWN_OPTION = define(4)
val CURL_FORMADD_INCOMPLETE = define(5)
val CURL_FORMADD_ILLEGAL_ARRAY = define(6)
val CURL_FORMADD_DISABLED = define(7)
val CURL_FORMADD_LAST = define(8)
inline def getName(inline value: CURLFORMcode): Option[String] =
value match
case CURL_FORMADD_OK => Some("CURL_FORMADD_OK")
case CURL_FORMADD_MEMORY => Some("CURL_FORMADD_MEMORY")
case CURL_FORMADD_OPTION_TWICE => Some("CURL_FORMADD_OPTION_TWICE")
case CURL_FORMADD_NULL => Some("CURL_FORMADD_NULL")
case CURL_FORMADD_UNKNOWN_OPTION => Some("CURL_FORMADD_UNKNOWN_OPTION")
case CURL_FORMADD_INCOMPLETE => Some("CURL_FORMADD_INCOMPLETE")
case CURL_FORMADD_ILLEGAL_ARRAY => Some("CURL_FORMADD_ILLEGAL_ARRAY")
case CURL_FORMADD_DISABLED => Some("CURL_FORMADD_DISABLED")
case CURL_FORMADD_LAST => Some("CURL_FORMADD_LAST")
case _ => None
extension (a: CURLFORMcode)
inline def &(b: CURLFORMcode): CURLFORMcode = a & b
inline def |(b: CURLFORMcode): CURLFORMcode = a | b
inline def is(b: CURLFORMcode): Boolean = (a & b) == b
end CURLFORMcode
/** */
opaque type CURLHcode = CUnsignedInt
object CURLHcode extends CEnumU[CURLHcode]:
given _tag: Tag[CURLHcode] = Tag.UInt
inline def define(inline a: Long): CURLHcode = a.toUInt
val CURLHE_OK = define(0)
val CURLHE_BADINDEX = define(1)
val CURLHE_MISSING = define(2)
val CURLHE_NOHEADERS = define(3)
val CURLHE_NOREQUEST = define(4)
val CURLHE_OUT_OF_MEMORY = define(5)
val CURLHE_BAD_ARGUMENT = define(6)
val CURLHE_NOT_BUILT_IN = define(7)
inline def getName(inline value: CURLHcode): Option[String] =
value match
case CURLHE_OK => Some("CURLHE_OK")
case CURLHE_BADINDEX => Some("CURLHE_BADINDEX")
case CURLHE_MISSING => Some("CURLHE_MISSING")
case CURLHE_NOHEADERS => Some("CURLHE_NOHEADERS")
case CURLHE_NOREQUEST => Some("CURLHE_NOREQUEST")
case CURLHE_OUT_OF_MEMORY => Some("CURLHE_OUT_OF_MEMORY")
case CURLHE_BAD_ARGUMENT => Some("CURLHE_BAD_ARGUMENT")
case CURLHE_NOT_BUILT_IN => Some("CURLHE_NOT_BUILT_IN")
case _ => None
extension (a: CURLHcode)
inline def &(b: CURLHcode): CURLHcode = a & b
inline def |(b: CURLHcode): CURLHcode = a | b
inline def is(b: CURLHcode): Boolean = (a & b) == b
end CURLHcode
/** */
opaque type CURLINFO = CUnsignedInt
object CURLINFO extends CEnumU[CURLINFO]:
given _tag: Tag[CURLINFO] = Tag.UInt
inline def define(inline a: Long): CURLINFO = a.toUInt
val CURLINFO_NONE = define(0)
val CURLINFO_EFFECTIVE_URL = define(1048577)
val CURLINFO_RESPONSE_CODE = define(2097154)
val CURLINFO_TOTAL_TIME = define(3145731)
val CURLINFO_NAMELOOKUP_TIME = define(3145732)
val CURLINFO_CONNECT_TIME = define(3145733)
val CURLINFO_PRETRANSFER_TIME = define(3145734)
val CURLINFO_SIZE_UPLOAD = define(3145735)
val CURLINFO_SIZE_UPLOAD_T = define(6291463)
val CURLINFO_SIZE_DOWNLOAD = define(3145736)
val CURLINFO_SIZE_DOWNLOAD_T = define(6291464)
val CURLINFO_SPEED_DOWNLOAD = define(3145737)
val CURLINFO_SPEED_DOWNLOAD_T = define(6291465)
val CURLINFO_SPEED_UPLOAD = define(3145738)
val CURLINFO_SPEED_UPLOAD_T = define(6291466)
val CURLINFO_HEADER_SIZE = define(2097163)
val CURLINFO_REQUEST_SIZE = define(2097164)
val CURLINFO_SSL_VERIFYRESULT = define(2097165)
val CURLINFO_FILETIME = define(2097166)
val CURLINFO_FILETIME_T = define(6291470)
val CURLINFO_CONTENT_LENGTH_DOWNLOAD = define(3145743)
val CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = define(6291471)
val CURLINFO_CONTENT_LENGTH_UPLOAD = define(3145744)
val CURLINFO_CONTENT_LENGTH_UPLOAD_T = define(6291472)
val CURLINFO_STARTTRANSFER_TIME = define(3145745)
val CURLINFO_CONTENT_TYPE = define(1048594)
val CURLINFO_REDIRECT_TIME = define(3145747)
val CURLINFO_REDIRECT_COUNT = define(2097172)
val CURLINFO_PRIVATE = define(1048597)
val CURLINFO_HTTP_CONNECTCODE = define(2097174)
val CURLINFO_HTTPAUTH_AVAIL = define(2097175)
val CURLINFO_PROXYAUTH_AVAIL = define(2097176)
val CURLINFO_OS_ERRNO = define(2097177)
val CURLINFO_NUM_CONNECTS = define(2097178)
val CURLINFO_SSL_ENGINES = define(4194331)
val CURLINFO_COOKIELIST = define(4194332)
val CURLINFO_LASTSOCKET = define(2097181)
val CURLINFO_FTP_ENTRY_PATH = define(1048606)
val CURLINFO_REDIRECT_URL = define(1048607)
val CURLINFO_PRIMARY_IP = define(1048608)
val CURLINFO_APPCONNECT_TIME = define(3145761)
val CURLINFO_CERTINFO = define(4194338)
val CURLINFO_CONDITION_UNMET = define(2097187)
val CURLINFO_RTSP_SESSION_ID = define(1048612)
val CURLINFO_RTSP_CLIENT_CSEQ = define(2097189)
val CURLINFO_RTSP_SERVER_CSEQ = define(2097190)
val CURLINFO_RTSP_CSEQ_RECV = define(2097191)
val CURLINFO_PRIMARY_PORT = define(2097192)
val CURLINFO_LOCAL_IP = define(1048617)
val CURLINFO_LOCAL_PORT = define(2097194)
val CURLINFO_TLS_SESSION = define(4194347)
val CURLINFO_ACTIVESOCKET = define(5242924)
val CURLINFO_TLS_SSL_PTR = define(4194349)
val CURLINFO_HTTP_VERSION = define(2097198)
val CURLINFO_PROXY_SSL_VERIFYRESULT = define(2097199)
val CURLINFO_PROTOCOL = define(2097200)
val CURLINFO_SCHEME = define(1048625)
val CURLINFO_TOTAL_TIME_T = define(6291506)
val CURLINFO_NAMELOOKUP_TIME_T = define(6291507)
val CURLINFO_CONNECT_TIME_T = define(6291508)
val CURLINFO_PRETRANSFER_TIME_T = define(6291509)
val CURLINFO_STARTTRANSFER_TIME_T = define(6291510)
val CURLINFO_REDIRECT_TIME_T = define(6291511)
val CURLINFO_APPCONNECT_TIME_T = define(6291512)
val CURLINFO_RETRY_AFTER = define(6291513)
val CURLINFO_EFFECTIVE_METHOD = define(1048634)
val CURLINFO_PROXY_ERROR = define(2097211)
val CURLINFO_REFERER = define(1048636)
val CURLINFO_CAINFO = define(1048637)
val CURLINFO_CAPATH = define(1048638)
val CURLINFO_XFER_ID = define(6291519)
val CURLINFO_CONN_ID = define(6291520)
val CURLINFO_LASTONE = define(64)
inline def getName(inline value: CURLINFO): Option[String] =
value match
case CURLINFO_NONE => Some("CURLINFO_NONE")
case CURLINFO_EFFECTIVE_URL => Some("CURLINFO_EFFECTIVE_URL")
case CURLINFO_RESPONSE_CODE => Some("CURLINFO_RESPONSE_CODE")
case CURLINFO_TOTAL_TIME => Some("CURLINFO_TOTAL_TIME")
case CURLINFO_NAMELOOKUP_TIME => Some("CURLINFO_NAMELOOKUP_TIME")
case CURLINFO_CONNECT_TIME => Some("CURLINFO_CONNECT_TIME")
case CURLINFO_PRETRANSFER_TIME => Some("CURLINFO_PRETRANSFER_TIME")
case CURLINFO_SIZE_UPLOAD => Some("CURLINFO_SIZE_UPLOAD")
case CURLINFO_SIZE_UPLOAD_T => Some("CURLINFO_SIZE_UPLOAD_T")
case CURLINFO_SIZE_DOWNLOAD => Some("CURLINFO_SIZE_DOWNLOAD")
case CURLINFO_SIZE_DOWNLOAD_T => Some("CURLINFO_SIZE_DOWNLOAD_T")
case CURLINFO_SPEED_DOWNLOAD => Some("CURLINFO_SPEED_DOWNLOAD")
case CURLINFO_SPEED_DOWNLOAD_T => Some("CURLINFO_SPEED_DOWNLOAD_T")
case CURLINFO_SPEED_UPLOAD => Some("CURLINFO_SPEED_UPLOAD")
case CURLINFO_SPEED_UPLOAD_T => Some("CURLINFO_SPEED_UPLOAD_T")
case CURLINFO_HEADER_SIZE => Some("CURLINFO_HEADER_SIZE")
case CURLINFO_REQUEST_SIZE => Some("CURLINFO_REQUEST_SIZE")
case CURLINFO_SSL_VERIFYRESULT => Some("CURLINFO_SSL_VERIFYRESULT")
case CURLINFO_FILETIME => Some("CURLINFO_FILETIME")
case CURLINFO_FILETIME_T => Some("CURLINFO_FILETIME_T")
case CURLINFO_CONTENT_LENGTH_DOWNLOAD =>
Some("CURLINFO_CONTENT_LENGTH_DOWNLOAD")
case CURLINFO_CONTENT_LENGTH_DOWNLOAD_T =>
Some("CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
case CURLINFO_CONTENT_LENGTH_UPLOAD =>
Some("CURLINFO_CONTENT_LENGTH_UPLOAD")
case CURLINFO_CONTENT_LENGTH_UPLOAD_T =>
Some("CURLINFO_CONTENT_LENGTH_UPLOAD_T")
case CURLINFO_STARTTRANSFER_TIME => Some("CURLINFO_STARTTRANSFER_TIME")
case CURLINFO_CONTENT_TYPE => Some("CURLINFO_CONTENT_TYPE")
case CURLINFO_REDIRECT_TIME => Some("CURLINFO_REDIRECT_TIME")
case CURLINFO_REDIRECT_COUNT => Some("CURLINFO_REDIRECT_COUNT")
case CURLINFO_PRIVATE => Some("CURLINFO_PRIVATE")
case CURLINFO_HTTP_CONNECTCODE => Some("CURLINFO_HTTP_CONNECTCODE")
case CURLINFO_HTTPAUTH_AVAIL => Some("CURLINFO_HTTPAUTH_AVAIL")
case CURLINFO_PROXYAUTH_AVAIL => Some("CURLINFO_PROXYAUTH_AVAIL")
case CURLINFO_OS_ERRNO => Some("CURLINFO_OS_ERRNO")
case CURLINFO_NUM_CONNECTS => Some("CURLINFO_NUM_CONNECTS")
case CURLINFO_SSL_ENGINES => Some("CURLINFO_SSL_ENGINES")
case CURLINFO_COOKIELIST => Some("CURLINFO_COOKIELIST")
case CURLINFO_LASTSOCKET => Some("CURLINFO_LASTSOCKET")
case CURLINFO_FTP_ENTRY_PATH => Some("CURLINFO_FTP_ENTRY_PATH")
case CURLINFO_REDIRECT_URL => Some("CURLINFO_REDIRECT_URL")
case CURLINFO_PRIMARY_IP => Some("CURLINFO_PRIMARY_IP")
case CURLINFO_APPCONNECT_TIME => Some("CURLINFO_APPCONNECT_TIME")
case CURLINFO_CERTINFO => Some("CURLINFO_CERTINFO")
case CURLINFO_CONDITION_UNMET => Some("CURLINFO_CONDITION_UNMET")
case CURLINFO_RTSP_SESSION_ID => Some("CURLINFO_RTSP_SESSION_ID")
case CURLINFO_RTSP_CLIENT_CSEQ => Some("CURLINFO_RTSP_CLIENT_CSEQ")
case CURLINFO_RTSP_SERVER_CSEQ => Some("CURLINFO_RTSP_SERVER_CSEQ")
case CURLINFO_RTSP_CSEQ_RECV => Some("CURLINFO_RTSP_CSEQ_RECV")
case CURLINFO_PRIMARY_PORT => Some("CURLINFO_PRIMARY_PORT")
case CURLINFO_LOCAL_IP => Some("CURLINFO_LOCAL_IP")
case CURLINFO_LOCAL_PORT => Some("CURLINFO_LOCAL_PORT")
case CURLINFO_TLS_SESSION => Some("CURLINFO_TLS_SESSION")
case CURLINFO_ACTIVESOCKET => Some("CURLINFO_ACTIVESOCKET")
case CURLINFO_TLS_SSL_PTR => Some("CURLINFO_TLS_SSL_PTR")
case CURLINFO_HTTP_VERSION => Some("CURLINFO_HTTP_VERSION")
case CURLINFO_PROXY_SSL_VERIFYRESULT =>
Some("CURLINFO_PROXY_SSL_VERIFYRESULT")
case CURLINFO_PROTOCOL => Some("CURLINFO_PROTOCOL")
case CURLINFO_SCHEME => Some("CURLINFO_SCHEME")
case CURLINFO_TOTAL_TIME_T => Some("CURLINFO_TOTAL_TIME_T")
case CURLINFO_NAMELOOKUP_TIME_T => Some("CURLINFO_NAMELOOKUP_TIME_T")
case CURLINFO_CONNECT_TIME_T => Some("CURLINFO_CONNECT_TIME_T")
case CURLINFO_PRETRANSFER_TIME_T => Some("CURLINFO_PRETRANSFER_TIME_T")
case CURLINFO_STARTTRANSFER_TIME_T =>
Some("CURLINFO_STARTTRANSFER_TIME_T")
case CURLINFO_REDIRECT_TIME_T => Some("CURLINFO_REDIRECT_TIME_T")
case CURLINFO_APPCONNECT_TIME_T => Some("CURLINFO_APPCONNECT_TIME_T")
case CURLINFO_RETRY_AFTER => Some("CURLINFO_RETRY_AFTER")
case CURLINFO_EFFECTIVE_METHOD => Some("CURLINFO_EFFECTIVE_METHOD")
case CURLINFO_PROXY_ERROR => Some("CURLINFO_PROXY_ERROR")
case CURLINFO_REFERER => Some("CURLINFO_REFERER")
case CURLINFO_CAINFO => Some("CURLINFO_CAINFO")
case CURLINFO_CAPATH => Some("CURLINFO_CAPATH")
case CURLINFO_XFER_ID => Some("CURLINFO_XFER_ID")
case CURLINFO_CONN_ID => Some("CURLINFO_CONN_ID")
case CURLINFO_LASTONE => Some("CURLINFO_LASTONE")
case _ => None
extension (a: CURLINFO)
inline def &(b: CURLINFO): CURLINFO = a & b
inline def |(b: CURLINFO): CURLINFO = a | b
inline def is(b: CURLINFO): Boolean = (a & b) == b
end CURLINFO
/** */
opaque type CURLMSG = CUnsignedInt
object CURLMSG extends CEnumU[CURLMSG]:
given _tag: Tag[CURLMSG] = Tag.UInt
inline def define(inline a: Long): CURLMSG = a.toUInt
val CURLMSG_NONE = define(0)
val CURLMSG_DONE = define(1)
val CURLMSG_LAST = define(2)
inline def getName(inline value: CURLMSG): Option[String] =
value match
case CURLMSG_NONE => Some("CURLMSG_NONE")
case CURLMSG_DONE => Some("CURLMSG_DONE")
case CURLMSG_LAST => Some("CURLMSG_LAST")
case _ => None
extension (a: CURLMSG)
inline def &(b: CURLMSG): CURLMSG = a & b
inline def |(b: CURLMSG): CURLMSG = a | b
inline def is(b: CURLMSG): Boolean = (a & b) == b
end CURLMSG
/** */
opaque type CURLMcode = CInt
object CURLMcode extends CEnum[CURLMcode]:
given _tag: Tag[CURLMcode] = Tag.Int
inline def define(inline a: CInt): CURLMcode = a
val CURLM_CALL_MULTI_PERFORM = define(-1)
val CURLM_OK = define(0)
val CURLM_BAD_HANDLE = define(1)
val CURLM_BAD_EASY_HANDLE = define(2)
val CURLM_OUT_OF_MEMORY = define(3)
val CURLM_INTERNAL_ERROR = define(4)
val CURLM_BAD_SOCKET = define(5)
val CURLM_UNKNOWN_OPTION = define(6)
val CURLM_ADDED_ALREADY = define(7)
val CURLM_RECURSIVE_API_CALL = define(8)
val CURLM_WAKEUP_FAILURE = define(9)
val CURLM_BAD_FUNCTION_ARGUMENT = define(10)
val CURLM_ABORTED_BY_CALLBACK = define(11)
val CURLM_UNRECOVERABLE_POLL = define(12)
val CURLM_LAST = define(13)
inline def getName(inline value: CURLMcode): Option[String] =
value match
case CURLM_CALL_MULTI_PERFORM => Some("CURLM_CALL_MULTI_PERFORM")
case CURLM_OK => Some("CURLM_OK")
case CURLM_BAD_HANDLE => Some("CURLM_BAD_HANDLE")
case CURLM_BAD_EASY_HANDLE => Some("CURLM_BAD_EASY_HANDLE")
case CURLM_OUT_OF_MEMORY => Some("CURLM_OUT_OF_MEMORY")
case CURLM_INTERNAL_ERROR => Some("CURLM_INTERNAL_ERROR")
case CURLM_BAD_SOCKET => Some("CURLM_BAD_SOCKET")
case CURLM_UNKNOWN_OPTION => Some("CURLM_UNKNOWN_OPTION")
case CURLM_ADDED_ALREADY => Some("CURLM_ADDED_ALREADY")
case CURLM_RECURSIVE_API_CALL => Some("CURLM_RECURSIVE_API_CALL")
case CURLM_WAKEUP_FAILURE => Some("CURLM_WAKEUP_FAILURE")
case CURLM_BAD_FUNCTION_ARGUMENT => Some("CURLM_BAD_FUNCTION_ARGUMENT")
case CURLM_ABORTED_BY_CALLBACK => Some("CURLM_ABORTED_BY_CALLBACK")
case CURLM_UNRECOVERABLE_POLL => Some("CURLM_UNRECOVERABLE_POLL")
case CURLM_LAST => Some("CURLM_LAST")
case _ => None
extension (a: CURLMcode)
inline def &(b: CURLMcode): CURLMcode = a & b
inline def |(b: CURLMcode): CURLMcode = a | b
inline def is(b: CURLMcode): Boolean = (a & b) == b
end CURLMcode
/** */
opaque type CURLMoption = CUnsignedInt
object CURLMoption extends CEnumU[CURLMoption]:
given _tag: Tag[CURLMoption] = Tag.UInt
inline def define(inline a: Long): CURLMoption = a.toUInt
val CURLMOPT_SOCKETFUNCTION = define(20001)
val CURLMOPT_SOCKETDATA = define(10002)
val CURLMOPT_PIPELINING = define(3)
val CURLMOPT_TIMERFUNCTION = define(20004)
val CURLMOPT_TIMERDATA = define(10005)
val CURLMOPT_MAXCONNECTS = define(6)
val CURLMOPT_MAX_HOST_CONNECTIONS = define(7)
val CURLMOPT_MAX_PIPELINE_LENGTH = define(8)
val CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = define(30009)
val CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = define(30010)
val CURLMOPT_PIPELINING_SITE_BL = define(10011)
val CURLMOPT_PIPELINING_SERVER_BL = define(10012)
val CURLMOPT_MAX_TOTAL_CONNECTIONS = define(13)
val CURLMOPT_PUSHFUNCTION = define(20014)
val CURLMOPT_PUSHDATA = define(10015)
val CURLMOPT_MAX_CONCURRENT_STREAMS = define(16)
val CURLMOPT_LASTENTRY = define(17)
inline def getName(inline value: CURLMoption): Option[String] =
value match
case CURLMOPT_SOCKETFUNCTION => Some("CURLMOPT_SOCKETFUNCTION")
case CURLMOPT_SOCKETDATA => Some("CURLMOPT_SOCKETDATA")
case CURLMOPT_PIPELINING => Some("CURLMOPT_PIPELINING")
case CURLMOPT_TIMERFUNCTION => Some("CURLMOPT_TIMERFUNCTION")
case CURLMOPT_TIMERDATA => Some("CURLMOPT_TIMERDATA")
case CURLMOPT_MAXCONNECTS => Some("CURLMOPT_MAXCONNECTS")
case CURLMOPT_MAX_HOST_CONNECTIONS =>
Some("CURLMOPT_MAX_HOST_CONNECTIONS")
case CURLMOPT_MAX_PIPELINE_LENGTH =>
Some("CURLMOPT_MAX_PIPELINE_LENGTH")
case CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE =>
Some("CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE")
case CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE =>
Some("CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE")
case CURLMOPT_PIPELINING_SITE_BL => Some("CURLMOPT_PIPELINING_SITE_BL")
case CURLMOPT_PIPELINING_SERVER_BL =>
Some("CURLMOPT_PIPELINING_SERVER_BL")
case CURLMOPT_MAX_TOTAL_CONNECTIONS =>
Some("CURLMOPT_MAX_TOTAL_CONNECTIONS")
case CURLMOPT_PUSHFUNCTION => Some("CURLMOPT_PUSHFUNCTION")
case CURLMOPT_PUSHDATA => Some("CURLMOPT_PUSHDATA")
case CURLMOPT_MAX_CONCURRENT_STREAMS =>
Some("CURLMOPT_MAX_CONCURRENT_STREAMS")
case CURLMOPT_LASTENTRY => Some("CURLMOPT_LASTENTRY")
case _ => None
extension (a: CURLMoption)
inline def &(b: CURLMoption): CURLMoption = a & b
inline def |(b: CURLMoption): CURLMoption = a | b
inline def is(b: CURLMoption): Boolean = (a & b) == b
end CURLMoption
/** */
opaque type CURLSHcode = CUnsignedInt
object CURLSHcode extends CEnumU[CURLSHcode]:
given _tag: Tag[CURLSHcode] = Tag.UInt
inline def define(inline a: Long): CURLSHcode = a.toUInt
val CURLSHE_OK = define(0)
val CURLSHE_BAD_OPTION = define(1)
val CURLSHE_IN_USE = define(2)
val CURLSHE_INVALID = define(3)
val CURLSHE_NOMEM = define(4)
val CURLSHE_NOT_BUILT_IN = define(5)
val CURLSHE_LAST = define(6)
inline def getName(inline value: CURLSHcode): Option[String] =
value match
case CURLSHE_OK => Some("CURLSHE_OK")
case CURLSHE_BAD_OPTION => Some("CURLSHE_BAD_OPTION")
case CURLSHE_IN_USE => Some("CURLSHE_IN_USE")
case CURLSHE_INVALID => Some("CURLSHE_INVALID")
case CURLSHE_NOMEM => Some("CURLSHE_NOMEM")
case CURLSHE_NOT_BUILT_IN => Some("CURLSHE_NOT_BUILT_IN")
case CURLSHE_LAST => Some("CURLSHE_LAST")
case _ => None
extension (a: CURLSHcode)
inline def &(b: CURLSHcode): CURLSHcode = a & b
inline def |(b: CURLSHcode): CURLSHcode = a | b
inline def is(b: CURLSHcode): Boolean = (a & b) == b
end CURLSHcode
/** */
opaque type CURLSHoption = CUnsignedInt
object CURLSHoption extends CEnumU[CURLSHoption]:
given _tag: Tag[CURLSHoption] = Tag.UInt
inline def define(inline a: Long): CURLSHoption = a.toUInt
val CURLSHOPT_NONE = define(0)
val CURLSHOPT_SHARE = define(1)
val CURLSHOPT_UNSHARE = define(2)
val CURLSHOPT_LOCKFUNC = define(3)
val CURLSHOPT_UNLOCKFUNC = define(4)
val CURLSHOPT_USERDATA = define(5)
val CURLSHOPT_LAST = define(6)
inline def getName(inline value: CURLSHoption): Option[String] =
value match
case CURLSHOPT_NONE => Some("CURLSHOPT_NONE")
case CURLSHOPT_SHARE => Some("CURLSHOPT_SHARE")
case CURLSHOPT_UNSHARE => Some("CURLSHOPT_UNSHARE")
case CURLSHOPT_LOCKFUNC => Some("CURLSHOPT_LOCKFUNC")
case CURLSHOPT_UNLOCKFUNC => Some("CURLSHOPT_UNLOCKFUNC")
case CURLSHOPT_USERDATA => Some("CURLSHOPT_USERDATA")
case CURLSHOPT_LAST => Some("CURLSHOPT_LAST")
case _ => None
extension (a: CURLSHoption)
inline def &(b: CURLSHoption): CURLSHoption = a & b
inline def |(b: CURLSHoption): CURLSHoption = a | b
inline def is(b: CURLSHoption): Boolean = (a & b) == b
end CURLSHoption
/** */
opaque type CURLSTScode = CUnsignedInt
object CURLSTScode extends CEnumU[CURLSTScode]:
given _tag: Tag[CURLSTScode] = Tag.UInt
inline def define(inline a: Long): CURLSTScode = a.toUInt
val CURLSTS_OK = define(0)
val CURLSTS_DONE = define(1)
val CURLSTS_FAIL = define(2)
inline def getName(inline value: CURLSTScode): Option[String] =
value match
case CURLSTS_OK => Some("CURLSTS_OK")
case CURLSTS_DONE => Some("CURLSTS_DONE")
case CURLSTS_FAIL => Some("CURLSTS_FAIL")
case _ => None
extension (a: CURLSTScode)
inline def &(b: CURLSTScode): CURLSTScode = a & b
inline def |(b: CURLSTScode): CURLSTScode = a | b
inline def is(b: CURLSTScode): Boolean = (a & b) == b
end CURLSTScode
/** */
opaque type CURLUPart = CUnsignedInt
object CURLUPart extends CEnumU[CURLUPart]:
given _tag: Tag[CURLUPart] = Tag.UInt
inline def define(inline a: Long): CURLUPart = a.toUInt
val CURLUPART_URL = define(0)
val CURLUPART_SCHEME = define(1)
val CURLUPART_USER = define(2)
val CURLUPART_PASSWORD = define(3)
val CURLUPART_OPTIONS = define(4)
val CURLUPART_HOST = define(5)
val CURLUPART_PORT = define(6)
val CURLUPART_PATH = define(7)
val CURLUPART_QUERY = define(8)
val CURLUPART_FRAGMENT = define(9)
val CURLUPART_ZONEID = define(10)
inline def getName(inline value: CURLUPart): Option[String] =
value match
case CURLUPART_URL => Some("CURLUPART_URL")
case CURLUPART_SCHEME => Some("CURLUPART_SCHEME")
case CURLUPART_USER => Some("CURLUPART_USER")
case CURLUPART_PASSWORD => Some("CURLUPART_PASSWORD")
case CURLUPART_OPTIONS => Some("CURLUPART_OPTIONS")
case CURLUPART_HOST => Some("CURLUPART_HOST")
case CURLUPART_PORT => Some("CURLUPART_PORT")
case CURLUPART_PATH => Some("CURLUPART_PATH")
case CURLUPART_QUERY => Some("CURLUPART_QUERY")
case CURLUPART_FRAGMENT => Some("CURLUPART_FRAGMENT")
case CURLUPART_ZONEID => Some("CURLUPART_ZONEID")
case _ => None
extension (a: CURLUPart)
inline def &(b: CURLUPart): CURLUPart = a & b
inline def |(b: CURLUPart): CURLUPart = a | b
inline def is(b: CURLUPart): Boolean = (a & b) == b
end CURLUPart
/** */
opaque type CURLUcode = CUnsignedInt
object CURLUcode extends CEnumU[CURLUcode]:
given _tag: Tag[CURLUcode] = Tag.UInt
inline def define(inline a: Long): CURLUcode = a.toUInt
val CURLUE_OK = define(0)
val CURLUE_BAD_HANDLE = define(1)
val CURLUE_BAD_PARTPOINTER = define(2)
val CURLUE_MALFORMED_INPUT = define(3)
val CURLUE_BAD_PORT_NUMBER = define(4)
val CURLUE_UNSUPPORTED_SCHEME = define(5)
val CURLUE_URLDECODE = define(6)
val CURLUE_OUT_OF_MEMORY = define(7)
val CURLUE_USER_NOT_ALLOWED = define(8)
val CURLUE_UNKNOWN_PART = define(9)
val CURLUE_NO_SCHEME = define(10)
val CURLUE_NO_USER = define(11)
val CURLUE_NO_PASSWORD = define(12)
val CURLUE_NO_OPTIONS = define(13)
val CURLUE_NO_HOST = define(14)
val CURLUE_NO_PORT = define(15)
val CURLUE_NO_QUERY = define(16)
val CURLUE_NO_FRAGMENT = define(17)
val CURLUE_NO_ZONEID = define(18)
val CURLUE_BAD_FILE_URL = define(19)
val CURLUE_BAD_FRAGMENT = define(20)
val CURLUE_BAD_HOSTNAME = define(21)
val CURLUE_BAD_IPV6 = define(22)
val CURLUE_BAD_LOGIN = define(23)
val CURLUE_BAD_PASSWORD = define(24)
val CURLUE_BAD_PATH = define(25)
val CURLUE_BAD_QUERY = define(26)
val CURLUE_BAD_SCHEME = define(27)
val CURLUE_BAD_SLASHES = define(28)
val CURLUE_BAD_USER = define(29)
val CURLUE_LACKS_IDN = define(30)
val CURLUE_LAST = define(31)
inline def getName(inline value: CURLUcode): Option[String] =
value match
case CURLUE_OK => Some("CURLUE_OK")
case CURLUE_BAD_HANDLE => Some("CURLUE_BAD_HANDLE")
case CURLUE_BAD_PARTPOINTER => Some("CURLUE_BAD_PARTPOINTER")
case CURLUE_MALFORMED_INPUT => Some("CURLUE_MALFORMED_INPUT")
case CURLUE_BAD_PORT_NUMBER => Some("CURLUE_BAD_PORT_NUMBER")
case CURLUE_UNSUPPORTED_SCHEME => Some("CURLUE_UNSUPPORTED_SCHEME")
case CURLUE_URLDECODE => Some("CURLUE_URLDECODE")
case CURLUE_OUT_OF_MEMORY => Some("CURLUE_OUT_OF_MEMORY")
case CURLUE_USER_NOT_ALLOWED => Some("CURLUE_USER_NOT_ALLOWED")
case CURLUE_UNKNOWN_PART => Some("CURLUE_UNKNOWN_PART")
case CURLUE_NO_SCHEME => Some("CURLUE_NO_SCHEME")
case CURLUE_NO_USER => Some("CURLUE_NO_USER")
case CURLUE_NO_PASSWORD => Some("CURLUE_NO_PASSWORD")
case CURLUE_NO_OPTIONS => Some("CURLUE_NO_OPTIONS")
case CURLUE_NO_HOST => Some("CURLUE_NO_HOST")
case CURLUE_NO_PORT => Some("CURLUE_NO_PORT")
case CURLUE_NO_QUERY => Some("CURLUE_NO_QUERY")
case CURLUE_NO_FRAGMENT => Some("CURLUE_NO_FRAGMENT")
case CURLUE_NO_ZONEID => Some("CURLUE_NO_ZONEID")
case CURLUE_BAD_FILE_URL => Some("CURLUE_BAD_FILE_URL")
case CURLUE_BAD_FRAGMENT => Some("CURLUE_BAD_FRAGMENT")
case CURLUE_BAD_HOSTNAME => Some("CURLUE_BAD_HOSTNAME")
case CURLUE_BAD_IPV6 => Some("CURLUE_BAD_IPV6")
case CURLUE_BAD_LOGIN => Some("CURLUE_BAD_LOGIN")
case CURLUE_BAD_PASSWORD => Some("CURLUE_BAD_PASSWORD")
case CURLUE_BAD_PATH => Some("CURLUE_BAD_PATH")
case CURLUE_BAD_QUERY => Some("CURLUE_BAD_QUERY")
case CURLUE_BAD_SCHEME => Some("CURLUE_BAD_SCHEME")
case CURLUE_BAD_SLASHES => Some("CURLUE_BAD_SLASHES")
case CURLUE_BAD_USER => Some("CURLUE_BAD_USER")
case CURLUE_LACKS_IDN => Some("CURLUE_LACKS_IDN")
case CURLUE_LAST => Some("CURLUE_LAST")
case _ => None
extension (a: CURLUcode)
inline def &(b: CURLUcode): CURLUcode = a & b
inline def |(b: CURLUcode): CURLUcode = a | b
inline def is(b: CURLUcode): Boolean = (a & b) == b
end CURLUcode
/** */
opaque type CURL_NETRC_OPTION = CUnsignedInt
object CURL_NETRC_OPTION extends CEnumU[CURL_NETRC_OPTION]:
given _tag: Tag[CURL_NETRC_OPTION] = Tag.UInt
inline def define(inline a: Long): CURL_NETRC_OPTION = a.toUInt
val CURL_NETRC_IGNORED = define(0)
val CURL_NETRC_OPTIONAL = define(1)
val CURL_NETRC_REQUIRED = define(2)
val CURL_NETRC_LAST = define(3)
inline def getName(inline value: CURL_NETRC_OPTION): Option[String] =
value match
case CURL_NETRC_IGNORED => Some("CURL_NETRC_IGNORED")
case CURL_NETRC_OPTIONAL => Some("CURL_NETRC_OPTIONAL")
case CURL_NETRC_REQUIRED => Some("CURL_NETRC_REQUIRED")
case CURL_NETRC_LAST => Some("CURL_NETRC_LAST")
case _ => None
extension (a: CURL_NETRC_OPTION)
inline def &(b: CURL_NETRC_OPTION): CURL_NETRC_OPTION = a & b
inline def |(b: CURL_NETRC_OPTION): CURL_NETRC_OPTION = a | b
inline def is(b: CURL_NETRC_OPTION): Boolean = (a & b) == b
end CURL_NETRC_OPTION
/** */
opaque type CURL_TLSAUTH = CUnsignedInt
object CURL_TLSAUTH extends CEnumU[CURL_TLSAUTH]:
given _tag: Tag[CURL_TLSAUTH] = Tag.UInt
inline def define(inline a: Long): CURL_TLSAUTH = a.toUInt
val CURL_TLSAUTH_NONE = define(0)
val CURL_TLSAUTH_SRP = define(1)
val CURL_TLSAUTH_LAST = define(2)
inline def getName(inline value: CURL_TLSAUTH): Option[String] =
value match
case CURL_TLSAUTH_NONE => Some("CURL_TLSAUTH_NONE")
case CURL_TLSAUTH_SRP => Some("CURL_TLSAUTH_SRP")
case CURL_TLSAUTH_LAST => Some("CURL_TLSAUTH_LAST")
case _ => None
extension (a: CURL_TLSAUTH)
inline def &(b: CURL_TLSAUTH): CURL_TLSAUTH = a & b
inline def |(b: CURL_TLSAUTH): CURL_TLSAUTH = a | b
inline def is(b: CURL_TLSAUTH): Boolean = (a & b) == b
end CURL_TLSAUTH
/** */
opaque type CURLcode = CUnsignedInt
object CURLcode extends CEnumU[CURLcode]:
given _tag: Tag[CURLcode] = Tag.UInt
inline def define(inline a: Long): CURLcode = a.toUInt
val CURLE_OK = define(0)
val CURLE_UNSUPPORTED_PROTOCOL = define(1)
val CURLE_FAILED_INIT = define(2)
val CURLE_URL_MALFORMAT = define(3)
val CURLE_NOT_BUILT_IN = define(4)
val CURLE_COULDNT_RESOLVE_PROXY = define(5)
val CURLE_COULDNT_RESOLVE_HOST = define(6)
val CURLE_COULDNT_CONNECT = define(7)
val CURLE_WEIRD_SERVER_REPLY = define(8)
val CURLE_REMOTE_ACCESS_DENIED = define(9)
val CURLE_FTP_ACCEPT_FAILED = define(10)
val CURLE_FTP_WEIRD_PASS_REPLY = define(11)
val CURLE_FTP_ACCEPT_TIMEOUT = define(12)
val CURLE_FTP_WEIRD_PASV_REPLY = define(13)
val CURLE_FTP_WEIRD_227_FORMAT = define(14)
val CURLE_FTP_CANT_GET_HOST = define(15)
val CURLE_HTTP2 = define(16)
val CURLE_FTP_COULDNT_SET_TYPE = define(17)
val CURLE_PARTIAL_FILE = define(18)
val CURLE_FTP_COULDNT_RETR_FILE = define(19)
val CURLE_OBSOLETE20 = define(20)
val CURLE_QUOTE_ERROR = define(21)
val CURLE_HTTP_RETURNED_ERROR = define(22)
val CURLE_WRITE_ERROR = define(23)
val CURLE_OBSOLETE24 = define(24)
val CURLE_UPLOAD_FAILED = define(25)
val CURLE_READ_ERROR = define(26)
val CURLE_OUT_OF_MEMORY = define(27)
val CURLE_OPERATION_TIMEDOUT = define(28)
val CURLE_OBSOLETE29 = define(29)
val CURLE_FTP_PORT_FAILED = define(30)
val CURLE_FTP_COULDNT_USE_REST = define(31)
val CURLE_OBSOLETE32 = define(32)
val CURLE_RANGE_ERROR = define(33)
val CURLE_HTTP_POST_ERROR = define(34)
val CURLE_SSL_CONNECT_ERROR = define(35)
val CURLE_BAD_DOWNLOAD_RESUME = define(36)
val CURLE_FILE_COULDNT_READ_FILE = define(37)
val CURLE_LDAP_CANNOT_BIND = define(38)
val CURLE_LDAP_SEARCH_FAILED = define(39)
val CURLE_OBSOLETE40 = define(40)
val CURLE_FUNCTION_NOT_FOUND = define(41)
val CURLE_ABORTED_BY_CALLBACK = define(42)
val CURLE_BAD_FUNCTION_ARGUMENT = define(43)
val CURLE_OBSOLETE44 = define(44)
val CURLE_INTERFACE_FAILED = define(45)
val CURLE_OBSOLETE46 = define(46)
val CURLE_TOO_MANY_REDIRECTS = define(47)
val CURLE_UNKNOWN_OPTION = define(48)
val CURLE_SETOPT_OPTION_SYNTAX = define(49)
val CURLE_OBSOLETE50 = define(50)
val CURLE_OBSOLETE51 = define(51)
val CURLE_GOT_NOTHING = define(52)
val CURLE_SSL_ENGINE_NOTFOUND = define(53)
val CURLE_SSL_ENGINE_SETFAILED = define(54)
val CURLE_SEND_ERROR = define(55)
val CURLE_RECV_ERROR = define(56)
val CURLE_OBSOLETE57 = define(57)
val CURLE_SSL_CERTPROBLEM = define(58)
val CURLE_SSL_CIPHER = define(59)
val CURLE_PEER_FAILED_VERIFICATION = define(60)
val CURLE_BAD_CONTENT_ENCODING = define(61)
val CURLE_OBSOLETE62 = define(62)
val CURLE_FILESIZE_EXCEEDED = define(63)
val CURLE_USE_SSL_FAILED = define(64)
val CURLE_SEND_FAIL_REWIND = define(65)
val CURLE_SSL_ENGINE_INITFAILED = define(66)
val CURLE_LOGIN_DENIED = define(67)
val CURLE_TFTP_NOTFOUND = define(68)
val CURLE_TFTP_PERM = define(69)
val CURLE_REMOTE_DISK_FULL = define(70)
val CURLE_TFTP_ILLEGAL = define(71)
val CURLE_TFTP_UNKNOWNID = define(72)
val CURLE_REMOTE_FILE_EXISTS = define(73)
val CURLE_TFTP_NOSUCHUSER = define(74)
val CURLE_OBSOLETE75 = define(75)
val CURLE_OBSOLETE76 = define(76)
val CURLE_SSL_CACERT_BADFILE = define(77)
val CURLE_REMOTE_FILE_NOT_FOUND = define(78)
val CURLE_SSH = define(79)
val CURLE_SSL_SHUTDOWN_FAILED = define(80)
val CURLE_AGAIN = define(81)
val CURLE_SSL_CRL_BADFILE = define(82)
val CURLE_SSL_ISSUER_ERROR = define(83)
val CURLE_FTP_PRET_FAILED = define(84)
val CURLE_RTSP_CSEQ_ERROR = define(85)
val CURLE_RTSP_SESSION_ERROR = define(86)
val CURLE_FTP_BAD_FILE_LIST = define(87)
val CURLE_CHUNK_FAILED = define(88)
val CURLE_NO_CONNECTION_AVAILABLE = define(89)
val CURLE_SSL_PINNEDPUBKEYNOTMATCH = define(90)
val CURLE_SSL_INVALIDCERTSTATUS = define(91)
val CURLE_HTTP2_STREAM = define(92)
val CURLE_RECURSIVE_API_CALL = define(93)
val CURLE_AUTH_ERROR = define(94)
val CURLE_HTTP3 = define(95)
val CURLE_QUIC_CONNECT_ERROR = define(96)
val CURLE_PROXY = define(97)
val CURLE_SSL_CLIENTCERT = define(98)
val CURLE_UNRECOVERABLE_POLL = define(99)
val CURL_LAST = define(100)
def getName(value: CURLcode): Option[String] =
value match
case CURLE_OK => Some("CURLE_OK")
case CURLE_UNSUPPORTED_PROTOCOL => Some("CURLE_UNSUPPORTED_PROTOCOL")
case CURLE_FAILED_INIT => Some("CURLE_FAILED_INIT")
case CURLE_URL_MALFORMAT => Some("CURLE_URL_MALFORMAT")
case CURLE_NOT_BUILT_IN => Some("CURLE_NOT_BUILT_IN")
case CURLE_COULDNT_RESOLVE_PROXY => Some("CURLE_COULDNT_RESOLVE_PROXY")
case CURLE_COULDNT_RESOLVE_HOST => Some("CURLE_COULDNT_RESOLVE_HOST")
case CURLE_COULDNT_CONNECT => Some("CURLE_COULDNT_CONNECT")
case CURLE_WEIRD_SERVER_REPLY => Some("CURLE_WEIRD_SERVER_REPLY")
case CURLE_REMOTE_ACCESS_DENIED => Some("CURLE_REMOTE_ACCESS_DENIED")
case CURLE_FTP_ACCEPT_FAILED => Some("CURLE_FTP_ACCEPT_FAILED")
case CURLE_FTP_WEIRD_PASS_REPLY => Some("CURLE_FTP_WEIRD_PASS_REPLY")
case CURLE_FTP_ACCEPT_TIMEOUT => Some("CURLE_FTP_ACCEPT_TIMEOUT")
case CURLE_FTP_WEIRD_PASV_REPLY => Some("CURLE_FTP_WEIRD_PASV_REPLY")
case CURLE_FTP_WEIRD_227_FORMAT => Some("CURLE_FTP_WEIRD_227_FORMAT")
case CURLE_FTP_CANT_GET_HOST => Some("CURLE_FTP_CANT_GET_HOST")
case CURLE_HTTP2 => Some("CURLE_HTTP2")
case CURLE_FTP_COULDNT_SET_TYPE => Some("CURLE_FTP_COULDNT_SET_TYPE")
case CURLE_PARTIAL_FILE => Some("CURLE_PARTIAL_FILE")
case CURLE_FTP_COULDNT_RETR_FILE => Some("CURLE_FTP_COULDNT_RETR_FILE")
case CURLE_OBSOLETE20 => Some("CURLE_OBSOLETE20")
case CURLE_QUOTE_ERROR => Some("CURLE_QUOTE_ERROR")
case CURLE_HTTP_RETURNED_ERROR => Some("CURLE_HTTP_RETURNED_ERROR")
case CURLE_WRITE_ERROR => Some("CURLE_WRITE_ERROR")
case CURLE_OBSOLETE24 => Some("CURLE_OBSOLETE24")
case CURLE_UPLOAD_FAILED => Some("CURLE_UPLOAD_FAILED")
case CURLE_READ_ERROR => Some("CURLE_READ_ERROR")
case CURLE_OUT_OF_MEMORY => Some("CURLE_OUT_OF_MEMORY")
case CURLE_OPERATION_TIMEDOUT => Some("CURLE_OPERATION_TIMEDOUT")
case CURLE_OBSOLETE29 => Some("CURLE_OBSOLETE29")
case CURLE_FTP_PORT_FAILED => Some("CURLE_FTP_PORT_FAILED")
case CURLE_FTP_COULDNT_USE_REST => Some("CURLE_FTP_COULDNT_USE_REST")
case CURLE_OBSOLETE32 => Some("CURLE_OBSOLETE32")
case CURLE_RANGE_ERROR => Some("CURLE_RANGE_ERROR")
case CURLE_HTTP_POST_ERROR => Some("CURLE_HTTP_POST_ERROR")
case CURLE_SSL_CONNECT_ERROR => Some("CURLE_SSL_CONNECT_ERROR")
case CURLE_BAD_DOWNLOAD_RESUME => Some("CURLE_BAD_DOWNLOAD_RESUME")
case CURLE_FILE_COULDNT_READ_FILE =>
Some("CURLE_FILE_COULDNT_READ_FILE")
case CURLE_LDAP_CANNOT_BIND => Some("CURLE_LDAP_CANNOT_BIND")
case CURLE_LDAP_SEARCH_FAILED => Some("CURLE_LDAP_SEARCH_FAILED")
case CURLE_OBSOLETE40 => Some("CURLE_OBSOLETE40")
case CURLE_FUNCTION_NOT_FOUND => Some("CURLE_FUNCTION_NOT_FOUND")
case CURLE_ABORTED_BY_CALLBACK => Some("CURLE_ABORTED_BY_CALLBACK")
case CURLE_BAD_FUNCTION_ARGUMENT => Some("CURLE_BAD_FUNCTION_ARGUMENT")
case CURLE_OBSOLETE44 => Some("CURLE_OBSOLETE44")
case CURLE_INTERFACE_FAILED => Some("CURLE_INTERFACE_FAILED")
case CURLE_OBSOLETE46 => Some("CURLE_OBSOLETE46")
case CURLE_TOO_MANY_REDIRECTS => Some("CURLE_TOO_MANY_REDIRECTS")
case CURLE_UNKNOWN_OPTION => Some("CURLE_UNKNOWN_OPTION")
case CURLE_SETOPT_OPTION_SYNTAX => Some("CURLE_SETOPT_OPTION_SYNTAX")
case CURLE_OBSOLETE50 => Some("CURLE_OBSOLETE50")
case CURLE_OBSOLETE51 => Some("CURLE_OBSOLETE51")
case CURLE_GOT_NOTHING => Some("CURLE_GOT_NOTHING")
case CURLE_SSL_ENGINE_NOTFOUND => Some("CURLE_SSL_ENGINE_NOTFOUND")
case CURLE_SSL_ENGINE_SETFAILED => Some("CURLE_SSL_ENGINE_SETFAILED")
case CURLE_SEND_ERROR => Some("CURLE_SEND_ERROR")
case CURLE_RECV_ERROR => Some("CURLE_RECV_ERROR")
case CURLE_OBSOLETE57 => Some("CURLE_OBSOLETE57")
case CURLE_SSL_CERTPROBLEM => Some("CURLE_SSL_CERTPROBLEM")
case CURLE_SSL_CIPHER => Some("CURLE_SSL_CIPHER")
case CURLE_PEER_FAILED_VERIFICATION =>
Some("CURLE_PEER_FAILED_VERIFICATION")
case CURLE_BAD_CONTENT_ENCODING => Some("CURLE_BAD_CONTENT_ENCODING")
case CURLE_OBSOLETE62 => Some("CURLE_OBSOLETE62")
case CURLE_FILESIZE_EXCEEDED => Some("CURLE_FILESIZE_EXCEEDED")
case CURLE_USE_SSL_FAILED => Some("CURLE_USE_SSL_FAILED")
case CURLE_SEND_FAIL_REWIND => Some("CURLE_SEND_FAIL_REWIND")
case CURLE_SSL_ENGINE_INITFAILED => Some("CURLE_SSL_ENGINE_INITFAILED")
case CURLE_LOGIN_DENIED => Some("CURLE_LOGIN_DENIED")
case CURLE_TFTP_NOTFOUND => Some("CURLE_TFTP_NOTFOUND")
case CURLE_TFTP_PERM => Some("CURLE_TFTP_PERM")
case CURLE_REMOTE_DISK_FULL => Some("CURLE_REMOTE_DISK_FULL")
case CURLE_TFTP_ILLEGAL => Some("CURLE_TFTP_ILLEGAL")
case CURLE_TFTP_UNKNOWNID => Some("CURLE_TFTP_UNKNOWNID")
case CURLE_REMOTE_FILE_EXISTS => Some("CURLE_REMOTE_FILE_EXISTS")
case CURLE_TFTP_NOSUCHUSER => Some("CURLE_TFTP_NOSUCHUSER")
case CURLE_OBSOLETE75 => Some("CURLE_OBSOLETE75")
case CURLE_OBSOLETE76 => Some("CURLE_OBSOLETE76")
case CURLE_SSL_CACERT_BADFILE => Some("CURLE_SSL_CACERT_BADFILE")
case CURLE_REMOTE_FILE_NOT_FOUND => Some("CURLE_REMOTE_FILE_NOT_FOUND")
case CURLE_SSH => Some("CURLE_SSH")
case CURLE_SSL_SHUTDOWN_FAILED => Some("CURLE_SSL_SHUTDOWN_FAILED")
case CURLE_AGAIN => Some("CURLE_AGAIN")
case CURLE_SSL_CRL_BADFILE => Some("CURLE_SSL_CRL_BADFILE")
case CURLE_SSL_ISSUER_ERROR => Some("CURLE_SSL_ISSUER_ERROR")
case CURLE_FTP_PRET_FAILED => Some("CURLE_FTP_PRET_FAILED")
case CURLE_RTSP_CSEQ_ERROR => Some("CURLE_RTSP_CSEQ_ERROR")
case CURLE_RTSP_SESSION_ERROR => Some("CURLE_RTSP_SESSION_ERROR")
case CURLE_FTP_BAD_FILE_LIST => Some("CURLE_FTP_BAD_FILE_LIST")
case CURLE_CHUNK_FAILED => Some("CURLE_CHUNK_FAILED")
case CURLE_NO_CONNECTION_AVAILABLE =>
Some("CURLE_NO_CONNECTION_AVAILABLE")
case CURLE_SSL_PINNEDPUBKEYNOTMATCH =>
Some("CURLE_SSL_PINNEDPUBKEYNOTMATCH")
case CURLE_SSL_INVALIDCERTSTATUS => Some("CURLE_SSL_INVALIDCERTSTATUS")
case CURLE_HTTP2_STREAM => Some("CURLE_HTTP2_STREAM")
case CURLE_RECURSIVE_API_CALL => Some("CURLE_RECURSIVE_API_CALL")
case CURLE_AUTH_ERROR => Some("CURLE_AUTH_ERROR")
case CURLE_HTTP3 => Some("CURLE_HTTP3")
case CURLE_QUIC_CONNECT_ERROR => Some("CURLE_QUIC_CONNECT_ERROR")
case CURLE_PROXY => Some("CURLE_PROXY")
case CURLE_SSL_CLIENTCERT => Some("CURLE_SSL_CLIENTCERT")
case CURLE_UNRECOVERABLE_POLL => Some("CURLE_UNRECOVERABLE_POLL")
case CURL_LAST => Some("CURL_LAST")
case _ => None
extension (a: CURLcode)
inline def &(b: CURLcode): CURLcode = a & b
inline def |(b: CURLcode): CURLcode = a | b
inline def is(b: CURLcode): Boolean = (a & b) == b
end CURLcode
/** */
opaque type CURLformoption = CUnsignedInt
object CURLformoption extends CEnumU[CURLformoption]:
given _tag: Tag[CURLformoption] = Tag.UInt
inline def define(inline a: Long): CURLformoption = a.toUInt
val CURLFORM_NOTHING = define(0)
val CURLFORM_COPYNAME = define(1)
val CURLFORM_PTRNAME = define(2)
val CURLFORM_NAMELENGTH = define(3)
val CURLFORM_COPYCONTENTS = define(4)
val CURLFORM_PTRCONTENTS = define(5)
val CURLFORM_CONTENTSLENGTH = define(6)
val CURLFORM_FILECONTENT = define(7)
val CURLFORM_ARRAY = define(8)
val CURLFORM_OBSOLETE = define(9)
val CURLFORM_FILE = define(10)
val CURLFORM_BUFFER = define(11)
val CURLFORM_BUFFERPTR = define(12)
val CURLFORM_BUFFERLENGTH = define(13)
val CURLFORM_CONTENTTYPE = define(14)
val CURLFORM_CONTENTHEADER = define(15)
val CURLFORM_FILENAME = define(16)
val CURLFORM_END = define(17)
val CURLFORM_OBSOLETE2 = define(18)
val CURLFORM_STREAM = define(19)
val CURLFORM_CONTENTLEN = define(20)
val CURLFORM_LASTENTRY = define(21)
inline def getName(inline value: CURLformoption): Option[String] =
value match
case CURLFORM_NOTHING => Some("CURLFORM_NOTHING")
case CURLFORM_COPYNAME => Some("CURLFORM_COPYNAME")
case CURLFORM_PTRNAME => Some("CURLFORM_PTRNAME")
case CURLFORM_NAMELENGTH => Some("CURLFORM_NAMELENGTH")
case CURLFORM_COPYCONTENTS => Some("CURLFORM_COPYCONTENTS")
case CURLFORM_PTRCONTENTS => Some("CURLFORM_PTRCONTENTS")
case CURLFORM_CONTENTSLENGTH => Some("CURLFORM_CONTENTSLENGTH")
case CURLFORM_FILECONTENT => Some("CURLFORM_FILECONTENT")
case CURLFORM_ARRAY => Some("CURLFORM_ARRAY")
case CURLFORM_OBSOLETE => Some("CURLFORM_OBSOLETE")
case CURLFORM_FILE => Some("CURLFORM_FILE")
case CURLFORM_BUFFER => Some("CURLFORM_BUFFER")
case CURLFORM_BUFFERPTR => Some("CURLFORM_BUFFERPTR")
case CURLFORM_BUFFERLENGTH => Some("CURLFORM_BUFFERLENGTH")
case CURLFORM_CONTENTTYPE => Some("CURLFORM_CONTENTTYPE")
case CURLFORM_CONTENTHEADER => Some("CURLFORM_CONTENTHEADER")
case CURLFORM_FILENAME => Some("CURLFORM_FILENAME")
case CURLFORM_END => Some("CURLFORM_END")
case CURLFORM_OBSOLETE2 => Some("CURLFORM_OBSOLETE2")
case CURLFORM_STREAM => Some("CURLFORM_STREAM")
case CURLFORM_CONTENTLEN => Some("CURLFORM_CONTENTLEN")
case CURLFORM_LASTENTRY => Some("CURLFORM_LASTENTRY")
case _ => None
extension (a: CURLformoption)
inline def &(b: CURLformoption): CURLformoption = a & b
inline def |(b: CURLformoption): CURLformoption = a | b
inline def is(b: CURLformoption): Boolean = (a & b) == b
end CURLformoption
/** */
opaque type CURLoption = CUnsignedInt
object CURLoption extends CEnumU[CURLoption]:
given _tag: Tag[CURLoption] = Tag.UInt
inline def define(inline a: Long): CURLoption = a.toUInt
val CURLOPT_WRITEDATA = define(10001)
val CURLOPT_URL = define(10002)
val CURLOPT_PORT = define(3)
val CURLOPT_PROXY = define(10004)
val CURLOPT_USERPWD = define(10005)
val CURLOPT_PROXYUSERPWD = define(10006)
val CURLOPT_RANGE = define(10007)
val CURLOPT_READDATA = define(10009)
val CURLOPT_ERRORBUFFER = define(10010)
val CURLOPT_WRITEFUNCTION = define(20011)
val CURLOPT_READFUNCTION = define(20012)
val CURLOPT_TIMEOUT = define(13)
val CURLOPT_INFILESIZE = define(14)
val CURLOPT_POSTFIELDS = define(10015)
val CURLOPT_REFERER = define(10016)
val CURLOPT_FTPPORT = define(10017)
val CURLOPT_USERAGENT = define(10018)
val CURLOPT_LOW_SPEED_LIMIT = define(19)
val CURLOPT_LOW_SPEED_TIME = define(20)
val CURLOPT_RESUME_FROM = define(21)
val CURLOPT_COOKIE = define(10022)
val CURLOPT_HTTPHEADER = define(10023)
val CURLOPT_HTTPPOST = define(10024)
val CURLOPT_SSLCERT = define(10025)
val CURLOPT_KEYPASSWD = define(10026)
val CURLOPT_CRLF = define(27)
val CURLOPT_QUOTE = define(10028)
val CURLOPT_HEADERDATA = define(10029)
val CURLOPT_COOKIEFILE = define(10031)
val CURLOPT_SSLVERSION = define(32)
val CURLOPT_TIMECONDITION = define(33)
val CURLOPT_TIMEVALUE = define(34)
val CURLOPT_CUSTOMREQUEST = define(10036)
val CURLOPT_STDERR = define(10037)
val CURLOPT_POSTQUOTE = define(10039)
val CURLOPT_OBSOLETE40 = define(10040)
val CURLOPT_VERBOSE = define(41)
val CURLOPT_HEADER = define(42)
val CURLOPT_NOPROGRESS = define(43)
val CURLOPT_NOBODY = define(44)
val CURLOPT_FAILONERROR = define(45)
val CURLOPT_UPLOAD = define(46)
val CURLOPT_POST = define(47)
val CURLOPT_DIRLISTONLY = define(48)
val CURLOPT_APPEND = define(50)
val CURLOPT_NETRC = define(51)
val CURLOPT_FOLLOWLOCATION = define(52)
val CURLOPT_TRANSFERTEXT = define(53)
val CURLOPT_PUT = define(54)
val CURLOPT_PROGRESSFUNCTION = define(20056)
val CURLOPT_XFERINFODATA = define(10057)
val CURLOPT_AUTOREFERER = define(58)
val CURLOPT_PROXYPORT = define(59)
val CURLOPT_POSTFIELDSIZE = define(60)
val CURLOPT_HTTPPROXYTUNNEL = define(61)
val CURLOPT_INTERFACE = define(10062)
val CURLOPT_KRBLEVEL = define(10063)
val CURLOPT_SSL_VERIFYPEER = define(64)
val CURLOPT_CAINFO = define(10065)
val CURLOPT_MAXREDIRS = define(68)
val CURLOPT_FILETIME = define(69)
val CURLOPT_TELNETOPTIONS = define(10070)
val CURLOPT_MAXCONNECTS = define(71)
val CURLOPT_OBSOLETE72 = define(72)
val CURLOPT_FRESH_CONNECT = define(74)
val CURLOPT_FORBID_REUSE = define(75)
val CURLOPT_RANDOM_FILE = define(10076)
val CURLOPT_EGDSOCKET = define(10077)
val CURLOPT_CONNECTTIMEOUT = define(78)
val CURLOPT_HEADERFUNCTION = define(20079)
val CURLOPT_HTTPGET = define(80)
val CURLOPT_SSL_VERIFYHOST = define(81)
val CURLOPT_COOKIEJAR = define(10082)
val CURLOPT_SSL_CIPHER_LIST = define(10083)
val CURLOPT_HTTP_VERSION = define(84)
val CURLOPT_FTP_USE_EPSV = define(85)
val CURLOPT_SSLCERTTYPE = define(10086)
val CURLOPT_SSLKEY = define(10087)
val CURLOPT_SSLKEYTYPE = define(10088)
val CURLOPT_SSLENGINE = define(10089)
val CURLOPT_SSLENGINE_DEFAULT = define(90)
val CURLOPT_DNS_USE_GLOBAL_CACHE = define(91)
val CURLOPT_DNS_CACHE_TIMEOUT = define(92)
val CURLOPT_PREQUOTE = define(10093)
val CURLOPT_DEBUGFUNCTION = define(20094)
val CURLOPT_DEBUGDATA = define(10095)
val CURLOPT_COOKIESESSION = define(96)
val CURLOPT_CAPATH = define(10097)
val CURLOPT_BUFFERSIZE = define(98)
val CURLOPT_NOSIGNAL = define(99)
val CURLOPT_SHARE = define(10100)
val CURLOPT_PROXYTYPE = define(101)
val CURLOPT_ACCEPT_ENCODING = define(10102)
val CURLOPT_PRIVATE = define(10103)
val CURLOPT_HTTP200ALIASES = define(10104)
val CURLOPT_UNRESTRICTED_AUTH = define(105)
val CURLOPT_FTP_USE_EPRT = define(106)
val CURLOPT_HTTPAUTH = define(107)
val CURLOPT_SSL_CTX_FUNCTION = define(20108)
val CURLOPT_SSL_CTX_DATA = define(10109)
val CURLOPT_FTP_CREATE_MISSING_DIRS = define(110)
val CURLOPT_PROXYAUTH = define(111)
val CURLOPT_SERVER_RESPONSE_TIMEOUT = define(112)
val CURLOPT_IPRESOLVE = define(113)
val CURLOPT_MAXFILESIZE = define(114)
val CURLOPT_INFILESIZE_LARGE = define(30115)
val CURLOPT_RESUME_FROM_LARGE = define(30116)
val CURLOPT_MAXFILESIZE_LARGE = define(30117)
val CURLOPT_NETRC_FILE = define(10118)
val CURLOPT_USE_SSL = define(119)
val CURLOPT_POSTFIELDSIZE_LARGE = define(30120)
val CURLOPT_TCP_NODELAY = define(121)