rusty_libimobiledevice 0.1.9

An ergonomic library to communicate with iOS devices
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
// jkcoxson
// Danger: this file was NOT generated at run time and could be out of date
// Choke on this, rust-analyzer (https://github.com/rust-analyzer/rust-analyzer/issues/9720)

pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 1;
pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1;
pub const __DARWIN_ONLY_VERS_1050: u32 = 1;
pub const __DARWIN_UNIX03: u32 = 1;
pub const __DARWIN_64_BIT_INO_T: u32 = 1;
pub const __DARWIN_VERS_1050: u32 = 1;
pub const __DARWIN_NON_CANCELABLE: u32 = 0;
pub const __DARWIN_SUF_EXTSN: &'static [u8; 14usize] = b"$DARWIN_EXTSN\0";
pub const __DARWIN_C_ANSI: u32 = 4096;
pub const __DARWIN_C_FULL: u32 = 900000;
pub const __DARWIN_C_LEVEL: u32 = 900000;
pub const __STDC_WANT_LIB_EXT1__: u32 = 1;
pub const __DARWIN_NO_LONG_LONG: u32 = 0;
pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1;
pub const _DARWIN_FEATURE_ONLY_64_BIT_INODE: u32 = 1;
pub const _DARWIN_FEATURE_ONLY_VERS_1050: u32 = 1;
pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1;
pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3;
pub const __PTHREAD_SIZE__: u32 = 8176;
pub const __PTHREAD_ATTR_SIZE__: u32 = 56;
pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8;
pub const __PTHREAD_MUTEX_SIZE__: u32 = 56;
pub const __PTHREAD_CONDATTR_SIZE__: u32 = 8;
pub const __PTHREAD_COND_SIZE__: u32 = 40;
pub const __PTHREAD_ONCE_SIZE__: u32 = 8;
pub const __PTHREAD_RWLOCK_SIZE__: u32 = 192;
pub const __PTHREAD_RWLOCKATTR_SIZE__: u32 = 16;
pub const _QUAD_HIGHWORD: u32 = 1;
pub const _QUAD_LOWWORD: u32 = 0;
pub const __DARWIN_LITTLE_ENDIAN: u32 = 1234;
pub const __DARWIN_BIG_ENDIAN: u32 = 4321;
pub const __DARWIN_PDP_ENDIAN: u32 = 3412;
pub const __DARWIN_BYTE_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const __WORDSIZE: u32 = 64;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const INT64_MAX: u64 = 9223372036854775807;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT64_MIN: i64 = -9223372036854775808;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const UINT64_MAX: i32 = -1;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST64_MIN: i64 = -9223372036854775808;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const INT_LEAST64_MAX: u64 = 9223372036854775807;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const UINT_LEAST64_MAX: i32 = -1;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i32 = -32768;
pub const INT_FAST32_MIN: i32 = -2147483648;
pub const INT_FAST64_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u32 = 32767;
pub const INT_FAST32_MAX: u32 = 2147483647;
pub const INT_FAST64_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: u32 = 65535;
pub const UINT_FAST32_MAX: u32 = 4294967295;
pub const UINT_FAST64_MAX: i32 = -1;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const UINTPTR_MAX: i32 = -1;
pub const SIZE_MAX: i32 = -1;
pub const RSIZE_MAX: i32 = -1;
pub const WINT_MIN: i32 = -2147483648;
pub const WINT_MAX: u32 = 2147483647;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const __API_TO_BE_DEPRECATED: u32 = 100000;
pub const __MAC_10_0: u32 = 1000;
pub const __MAC_10_1: u32 = 1010;
pub const __MAC_10_2: u32 = 1020;
pub const __MAC_10_3: u32 = 1030;
pub const __MAC_10_4: u32 = 1040;
pub const __MAC_10_5: u32 = 1050;
pub const __MAC_10_6: u32 = 1060;
pub const __MAC_10_7: u32 = 1070;
pub const __MAC_10_8: u32 = 1080;
pub const __MAC_10_9: u32 = 1090;
pub const __MAC_10_10: u32 = 101000;
pub const __MAC_10_10_2: u32 = 101002;
pub const __MAC_10_10_3: u32 = 101003;
pub const __MAC_10_11: u32 = 101100;
pub const __MAC_10_11_2: u32 = 101102;
pub const __MAC_10_11_3: u32 = 101103;
pub const __MAC_10_11_4: u32 = 101104;
pub const __MAC_10_12: u32 = 101200;
pub const __MAC_10_12_1: u32 = 101201;
pub const __MAC_10_12_2: u32 = 101202;
pub const __MAC_10_12_4: u32 = 101204;
pub const __MAC_10_13: u32 = 101300;
pub const __MAC_10_13_1: u32 = 101301;
pub const __MAC_10_13_2: u32 = 101302;
pub const __MAC_10_13_4: u32 = 101304;
pub const __MAC_10_14: u32 = 101400;
pub const __MAC_10_14_1: u32 = 101401;
pub const __MAC_10_14_4: u32 = 101404;
pub const __MAC_10_14_6: u32 = 101406;
pub const __MAC_10_15: u32 = 101500;
pub const __MAC_10_15_1: u32 = 101501;
pub const __MAC_10_15_4: u32 = 101504;
pub const __MAC_10_16: u32 = 101600;
pub const __MAC_11_0: u32 = 110000;
pub const __MAC_11_1: u32 = 110100;
pub const __MAC_11_3: u32 = 110300;
pub const __MAC_11_4: u32 = 110400;
pub const __MAC_11_5: u32 = 110500;
pub const __MAC_11_6: u32 = 110600;
pub const __MAC_12_0: u32 = 120000;
pub const __MAC_12_1: u32 = 120100;
pub const __IPHONE_2_0: u32 = 20000;
pub const __IPHONE_2_1: u32 = 20100;
pub const __IPHONE_2_2: u32 = 20200;
pub const __IPHONE_3_0: u32 = 30000;
pub const __IPHONE_3_1: u32 = 30100;
pub const __IPHONE_3_2: u32 = 30200;
pub const __IPHONE_4_0: u32 = 40000;
pub const __IPHONE_4_1: u32 = 40100;
pub const __IPHONE_4_2: u32 = 40200;
pub const __IPHONE_4_3: u32 = 40300;
pub const __IPHONE_5_0: u32 = 50000;
pub const __IPHONE_5_1: u32 = 50100;
pub const __IPHONE_6_0: u32 = 60000;
pub const __IPHONE_6_1: u32 = 60100;
pub const __IPHONE_7_0: u32 = 70000;
pub const __IPHONE_7_1: u32 = 70100;
pub const __IPHONE_8_0: u32 = 80000;
pub const __IPHONE_8_1: u32 = 80100;
pub const __IPHONE_8_2: u32 = 80200;
pub const __IPHONE_8_3: u32 = 80300;
pub const __IPHONE_8_4: u32 = 80400;
pub const __IPHONE_9_0: u32 = 90000;
pub const __IPHONE_9_1: u32 = 90100;
pub const __IPHONE_9_2: u32 = 90200;
pub const __IPHONE_9_3: u32 = 90300;
pub const __IPHONE_10_0: u32 = 100000;
pub const __IPHONE_10_1: u32 = 100100;
pub const __IPHONE_10_2: u32 = 100200;
pub const __IPHONE_10_3: u32 = 100300;
pub const __IPHONE_11_0: u32 = 110000;
pub const __IPHONE_11_1: u32 = 110100;
pub const __IPHONE_11_2: u32 = 110200;
pub const __IPHONE_11_3: u32 = 110300;
pub const __IPHONE_11_4: u32 = 110400;
pub const __IPHONE_12_0: u32 = 120000;
pub const __IPHONE_12_1: u32 = 120100;
pub const __IPHONE_12_2: u32 = 120200;
pub const __IPHONE_12_3: u32 = 120300;
pub const __IPHONE_12_4: u32 = 120400;
pub const __IPHONE_13_0: u32 = 130000;
pub const __IPHONE_13_1: u32 = 130100;
pub const __IPHONE_13_2: u32 = 130200;
pub const __IPHONE_13_3: u32 = 130300;
pub const __IPHONE_13_4: u32 = 130400;
pub const __IPHONE_13_5: u32 = 130500;
pub const __IPHONE_13_6: u32 = 130600;
pub const __IPHONE_13_7: u32 = 130700;
pub const __IPHONE_14_0: u32 = 140000;
pub const __IPHONE_14_1: u32 = 140100;
pub const __IPHONE_14_2: u32 = 140200;
pub const __IPHONE_14_3: u32 = 140300;
pub const __IPHONE_14_5: u32 = 140500;
pub const __IPHONE_14_6: u32 = 140600;
pub const __IPHONE_14_7: u32 = 140700;
pub const __IPHONE_14_8: u32 = 140800;
pub const __IPHONE_15_0: u32 = 150000;
pub const __IPHONE_15_1: u32 = 150100;
pub const __IPHONE_15_2: u32 = 150200;
pub const __TVOS_9_0: u32 = 90000;
pub const __TVOS_9_1: u32 = 90100;
pub const __TVOS_9_2: u32 = 90200;
pub const __TVOS_10_0: u32 = 100000;
pub const __TVOS_10_0_1: u32 = 100001;
pub const __TVOS_10_1: u32 = 100100;
pub const __TVOS_10_2: u32 = 100200;
pub const __TVOS_11_0: u32 = 110000;
pub const __TVOS_11_1: u32 = 110100;
pub const __TVOS_11_2: u32 = 110200;
pub const __TVOS_11_3: u32 = 110300;
pub const __TVOS_11_4: u32 = 110400;
pub const __TVOS_12_0: u32 = 120000;
pub const __TVOS_12_1: u32 = 120100;
pub const __TVOS_12_2: u32 = 120200;
pub const __TVOS_12_3: u32 = 120300;
pub const __TVOS_12_4: u32 = 120400;
pub const __TVOS_13_0: u32 = 130000;
pub const __TVOS_13_2: u32 = 130200;
pub const __TVOS_13_3: u32 = 130300;
pub const __TVOS_13_4: u32 = 130400;
pub const __TVOS_14_0: u32 = 140000;
pub const __TVOS_14_1: u32 = 140100;
pub const __TVOS_14_2: u32 = 140200;
pub const __TVOS_14_3: u32 = 140300;
pub const __TVOS_14_5: u32 = 140500;
pub const __TVOS_14_6: u32 = 140600;
pub const __TVOS_14_7: u32 = 140700;
pub const __TVOS_15_0: u32 = 150000;
pub const __TVOS_15_1: u32 = 150100;
pub const __TVOS_15_2: u32 = 150200;
pub const __WATCHOS_1_0: u32 = 10000;
pub const __WATCHOS_2_0: u32 = 20000;
pub const __WATCHOS_2_1: u32 = 20100;
pub const __WATCHOS_2_2: u32 = 20200;
pub const __WATCHOS_3_0: u32 = 30000;
pub const __WATCHOS_3_1: u32 = 30100;
pub const __WATCHOS_3_1_1: u32 = 30101;
pub const __WATCHOS_3_2: u32 = 30200;
pub const __WATCHOS_4_0: u32 = 40000;
pub const __WATCHOS_4_1: u32 = 40100;
pub const __WATCHOS_4_2: u32 = 40200;
pub const __WATCHOS_4_3: u32 = 40300;
pub const __WATCHOS_5_0: u32 = 50000;
pub const __WATCHOS_5_1: u32 = 50100;
pub const __WATCHOS_5_2: u32 = 50200;
pub const __WATCHOS_5_3: u32 = 50300;
pub const __WATCHOS_6_0: u32 = 60000;
pub const __WATCHOS_6_1: u32 = 60100;
pub const __WATCHOS_6_2: u32 = 60200;
pub const __WATCHOS_7_0: u32 = 70000;
pub const __WATCHOS_7_1: u32 = 70100;
pub const __WATCHOS_7_2: u32 = 70200;
pub const __WATCHOS_7_3: u32 = 70300;
pub const __WATCHOS_7_4: u32 = 70400;
pub const __WATCHOS_7_5: u32 = 70500;
pub const __WATCHOS_7_6: u32 = 70600;
pub const __WATCHOS_8_0: u32 = 80000;
pub const __WATCHOS_8_1: u32 = 80100;
pub const __WATCHOS_8_3: u32 = 80300;
pub const MAC_OS_X_VERSION_10_0: u32 = 1000;
pub const MAC_OS_X_VERSION_10_1: u32 = 1010;
pub const MAC_OS_X_VERSION_10_2: u32 = 1020;
pub const MAC_OS_X_VERSION_10_3: u32 = 1030;
pub const MAC_OS_X_VERSION_10_4: u32 = 1040;
pub const MAC_OS_X_VERSION_10_5: u32 = 1050;
pub const MAC_OS_X_VERSION_10_6: u32 = 1060;
pub const MAC_OS_X_VERSION_10_7: u32 = 1070;
pub const MAC_OS_X_VERSION_10_8: u32 = 1080;
pub const MAC_OS_X_VERSION_10_9: u32 = 1090;
pub const MAC_OS_X_VERSION_10_10: u32 = 101000;
pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002;
pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003;
pub const MAC_OS_X_VERSION_10_11: u32 = 101100;
pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102;
pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103;
pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104;
pub const MAC_OS_X_VERSION_10_12: u32 = 101200;
pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201;
pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202;
pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204;
pub const MAC_OS_X_VERSION_10_13: u32 = 101300;
pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301;
pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302;
pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304;
pub const MAC_OS_X_VERSION_10_14: u32 = 101400;
pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401;
pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404;
pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406;
pub const MAC_OS_X_VERSION_10_15: u32 = 101500;
pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501;
pub const MAC_OS_X_VERSION_10_16: u32 = 101600;
pub const MAC_OS_VERSION_11_0: u32 = 110000;
pub const MAC_OS_VERSION_12_0: u32 = 120000;
pub const __DRIVERKIT_19_0: u32 = 190000;
pub const __DRIVERKIT_20_0: u32 = 200000;
pub const __DRIVERKIT_21_0: u32 = 210000;
pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 120100;
pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1;
pub const __DARWIN_FD_SETSIZE: u32 = 1024;
pub const __DARWIN_NBBY: u32 = 8;
pub const NBBY: u32 = 8;
pub const FD_SETSIZE: u32 = 1024;
pub const __DARWIN_WCHAR_MIN: i32 = -2147483648;
pub const _FORTIFY_SOURCE: u32 = 2;
pub const CLOCKS_PER_SEC: u32 = 1000000;
pub const TIME_UTC: u32 = 1;
pub const GNUTLS_VERSION: &'static [u8; 6usize] = b"3.7.3\0";
pub const GNUTLS_VERSION_MAJOR: u32 = 3;
pub const GNUTLS_VERSION_MINOR: u32 = 7;
pub const GNUTLS_VERSION_PATCH: u32 = 3;
pub const GNUTLS_VERSION_NUMBER: u32 = 198403;
pub const GNUTLS_MAX_ALGORITHM_NUM: u32 = 64;
pub const GNUTLS_MAX_SESSION_ID_SIZE: u32 = 32;
pub const GNUTLS_SERVER: u32 = 1;
pub const GNUTLS_CLIENT: u32 = 2;
pub const GNUTLS_DATAGRAM: u32 = 4;
pub const GNUTLS_NONBLOCK: u32 = 8;
pub const GNUTLS_NO_EXTENSIONS: u32 = 16;
pub const GNUTLS_NO_REPLAY_PROTECTION: u32 = 32;
pub const GNUTLS_NO_SIGNAL: u32 = 64;
pub const GNUTLS_ALLOW_ID_CHANGE: u32 = 128;
pub const GNUTLS_ENABLE_FALSE_START: u32 = 256;
pub const GNUTLS_FORCE_CLIENT_CERT: u32 = 512;
pub const GNUTLS_NO_TICKETS: u32 = 1024;
pub const GNUTLS_ENABLE_CERT_TYPE_NEG: u32 = 0;
pub const GNUTLS_KU_PEER: u32 = 1;
pub const GNUTLS_SIGN_FLAG_SECURE_FOR_CERTS: u32 = 1;
pub const GNUTLS_HEARTBEAT_WAIT: u32 = 1;
pub const GNUTLS_RECORD_WAIT: u32 = 1;
pub const GNUTLS_HB_PEER_ALLOWED_TO_SEND: u32 = 1;
pub const GNUTLS_HB_PEER_NOT_ALLOWED_TO_SEND: u32 = 2;
pub const GNUTLS_HB_LOCAL_ALLOWED_TO_SEND: u32 = 4;
pub const GNUTLS_PRIORITY_INIT_DEF_APPEND: u32 = 1;
pub const GNUTLS_PRIORITY_LIST_INIT_KEYWORDS: u32 = 1;
pub const GNUTLS_PRIORITY_LIST_SPECIAL: u32 = 2;
pub const GNUTLS_MAX_SESSION_ID: u32 = 32;
pub const GNUTLS_HOOK_POST: u32 = 1;
pub const GNUTLS_HOOK_PRE: u32 = 0;
pub const GNUTLS_HOOK_BOTH: i32 = -1;
pub const GNUTLS_OCSP_SR_IS_AVAIL: u32 = 1;
pub const GNUTLS_IDNA_FORCE_2008: u32 = 2;
pub const GNUTLS_KEY_DIGITAL_SIGNATURE: u32 = 128;
pub const GNUTLS_KEY_NON_REPUDIATION: u32 = 64;
pub const GNUTLS_KEY_KEY_ENCIPHERMENT: u32 = 32;
pub const GNUTLS_KEY_DATA_ENCIPHERMENT: u32 = 16;
pub const GNUTLS_KEY_KEY_AGREEMENT: u32 = 8;
pub const GNUTLS_KEY_KEY_CERT_SIGN: u32 = 4;
pub const GNUTLS_KEY_CRL_SIGN: u32 = 2;
pub const GNUTLS_KEY_ENCIPHER_ONLY: u32 = 1;
pub const GNUTLS_KEY_DECIPHER_ONLY: u32 = 32768;
pub const GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN: u32 = 1;
pub const GNUTLS_UTF8_IGNORE_ERRS: u32 = 1;
pub const GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO: u32 = 1;
pub const GNUTLS_EXT_RAW_FLAG_DTLS_CLIENT_HELLO: u32 = 2;
pub const GNUTLS_FIPS140_SET_MODE_THREAD: u32 = 1;
pub const GNUTLS_E_SUCCESS: u32 = 0;
pub const GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM: i32 = -3;
pub const GNUTLS_E_UNKNOWN_CIPHER_TYPE: i32 = -6;
pub const GNUTLS_E_LARGE_PACKET: i32 = -7;
pub const GNUTLS_E_UNSUPPORTED_VERSION_PACKET: i32 = -8;
pub const GNUTLS_E_UNEXPECTED_PACKET_LENGTH: i32 = -9;
pub const GNUTLS_E_INVALID_SESSION: i32 = -10;
pub const GNUTLS_E_FATAL_ALERT_RECEIVED: i32 = -12;
pub const GNUTLS_E_UNEXPECTED_PACKET: i32 = -15;
pub const GNUTLS_E_WARNING_ALERT_RECEIVED: i32 = -16;
pub const GNUTLS_E_ERROR_IN_FINISHED_PACKET: i32 = -18;
pub const GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET: i32 = -19;
pub const GNUTLS_E_UNKNOWN_CIPHER_SUITE: i32 = -21;
pub const GNUTLS_E_UNWANTED_ALGORITHM: i32 = -22;
pub const GNUTLS_E_MPI_SCAN_FAILED: i32 = -23;
pub const GNUTLS_E_DECRYPTION_FAILED: i32 = -24;
pub const GNUTLS_E_MEMORY_ERROR: i32 = -25;
pub const GNUTLS_E_DECOMPRESSION_FAILED: i32 = -26;
pub const GNUTLS_E_COMPRESSION_FAILED: i32 = -27;
pub const GNUTLS_E_AGAIN: i32 = -28;
pub const GNUTLS_E_EXPIRED: i32 = -29;
pub const GNUTLS_E_DB_ERROR: i32 = -30;
pub const GNUTLS_E_KEYFILE_ERROR: i32 = -31;
pub const GNUTLS_E_INSUFFICIENT_CREDENTIALS: i32 = -32;
pub const GNUTLS_E_INSUFICIENT_CREDENTIALS: i32 = -32;
pub const GNUTLS_E_INSUFFICIENT_CRED: i32 = -32;
pub const GNUTLS_E_INSUFICIENT_CRED: i32 = -32;
pub const GNUTLS_E_HASH_FAILED: i32 = -33;
pub const GNUTLS_E_BASE64_DECODING_ERROR: i32 = -34;
pub const GNUTLS_E_MPI_PRINT_FAILED: i32 = -35;
pub const GNUTLS_E_REHANDSHAKE: i32 = -37;
pub const GNUTLS_E_GOT_APPLICATION_DATA: i32 = -38;
pub const GNUTLS_E_RECORD_LIMIT_REACHED: i32 = -39;
pub const GNUTLS_E_ENCRYPTION_FAILED: i32 = -40;
pub const GNUTLS_E_PK_ENCRYPTION_FAILED: i32 = -44;
pub const GNUTLS_E_PK_DECRYPTION_FAILED: i32 = -45;
pub const GNUTLS_E_PK_SIGN_FAILED: i32 = -46;
pub const GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION: i32 = -47;
pub const GNUTLS_E_KEY_USAGE_VIOLATION: i32 = -48;
pub const GNUTLS_E_NO_CERTIFICATE_FOUND: i32 = -49;
pub const GNUTLS_E_INVALID_REQUEST: i32 = -50;
pub const GNUTLS_E_SHORT_MEMORY_BUFFER: i32 = -51;
pub const GNUTLS_E_INTERRUPTED: i32 = -52;
pub const GNUTLS_E_PUSH_ERROR: i32 = -53;
pub const GNUTLS_E_PULL_ERROR: i32 = -54;
pub const GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER: i32 = -55;
pub const GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE: i32 = -56;
pub const GNUTLS_E_PKCS1_WRONG_PAD: i32 = -57;
pub const GNUTLS_E_RECEIVED_ILLEGAL_EXTENSION: i32 = -58;
pub const GNUTLS_E_INTERNAL_ERROR: i32 = -59;
pub const GNUTLS_E_DH_PRIME_UNACCEPTABLE: i32 = -63;
pub const GNUTLS_E_FILE_ERROR: i32 = -64;
pub const GNUTLS_E_TOO_MANY_EMPTY_PACKETS: i32 = -78;
pub const GNUTLS_E_UNKNOWN_PK_ALGORITHM: i32 = -80;
pub const GNUTLS_E_TOO_MANY_HANDSHAKE_PACKETS: i32 = -81;
pub const GNUTLS_E_RECEIVED_DISALLOWED_NAME: i32 = -82;
pub const GNUTLS_E_CERTIFICATE_REQUIRED: i32 = -112;
pub const GNUTLS_E_NO_TEMPORARY_RSA_PARAMS: i32 = -84;
pub const GNUTLS_E_NO_COMPRESSION_ALGORITHMS: i32 = -86;
pub const GNUTLS_E_NO_CIPHER_SUITES: i32 = -87;
pub const GNUTLS_E_OPENPGP_GETKEY_FAILED: i32 = -88;
pub const GNUTLS_E_PK_SIG_VERIFY_FAILED: i32 = -89;
pub const GNUTLS_E_ILLEGAL_SRP_USERNAME: i32 = -90;
pub const GNUTLS_E_KEYFILE_PARSING_ERROR: i32 = -91;
pub const GNUTLS_E_NO_TEMPORARY_DH_PARAMS: i32 = -93;
pub const GNUTLS_E_ASN1_ELEMENT_NOT_FOUND: i32 = -67;
pub const GNUTLS_E_ASN1_IDENTIFIER_NOT_FOUND: i32 = -68;
pub const GNUTLS_E_ASN1_DER_ERROR: i32 = -69;
pub const GNUTLS_E_ASN1_VALUE_NOT_FOUND: i32 = -70;
pub const GNUTLS_E_ASN1_GENERIC_ERROR: i32 = -71;
pub const GNUTLS_E_ASN1_VALUE_NOT_VALID: i32 = -72;
pub const GNUTLS_E_ASN1_TAG_ERROR: i32 = -73;
pub const GNUTLS_E_ASN1_TAG_IMPLICIT: i32 = -74;
pub const GNUTLS_E_ASN1_TYPE_ANY_ERROR: i32 = -75;
pub const GNUTLS_E_ASN1_SYNTAX_ERROR: i32 = -76;
pub const GNUTLS_E_ASN1_DER_OVERFLOW: i32 = -77;
pub const GNUTLS_E_OPENPGP_UID_REVOKED: i32 = -79;
pub const GNUTLS_E_CERTIFICATE_ERROR: i32 = -43;
pub const GNUTLS_E_X509_CERTIFICATE_ERROR: i32 = -43;
pub const GNUTLS_E_CERTIFICATE_KEY_MISMATCH: i32 = -60;
pub const GNUTLS_E_UNSUPPORTED_CERTIFICATE_TYPE: i32 = -61;
pub const GNUTLS_E_X509_UNKNOWN_SAN: i32 = -62;
pub const GNUTLS_E_OPENPGP_FINGERPRINT_UNSUPPORTED: i32 = -94;
pub const GNUTLS_E_X509_UNSUPPORTED_ATTRIBUTE: i32 = -95;
pub const GNUTLS_E_UNKNOWN_HASH_ALGORITHM: i32 = -96;
pub const GNUTLS_E_UNKNOWN_PKCS_CONTENT_TYPE: i32 = -97;
pub const GNUTLS_E_UNKNOWN_PKCS_BAG_TYPE: i32 = -98;
pub const GNUTLS_E_INVALID_PASSWORD: i32 = -99;
pub const GNUTLS_E_MAC_VERIFY_FAILED: i32 = -100;
pub const GNUTLS_E_CONSTRAINT_ERROR: i32 = -101;
pub const GNUTLS_E_WARNING_IA_IPHF_RECEIVED: i32 = -102;
pub const GNUTLS_E_WARNING_IA_FPHF_RECEIVED: i32 = -103;
pub const GNUTLS_E_IA_VERIFY_FAILED: i32 = -104;
pub const GNUTLS_E_UNKNOWN_ALGORITHM: i32 = -105;
pub const GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM: i32 = -106;
pub const GNUTLS_E_SAFE_RENEGOTIATION_FAILED: i32 = -107;
pub const GNUTLS_E_UNSAFE_RENEGOTIATION_DENIED: i32 = -108;
pub const GNUTLS_E_UNKNOWN_SRP_USERNAME: i32 = -109;
pub const GNUTLS_E_PREMATURE_TERMINATION: i32 = -110;
pub const GNUTLS_E_MALFORMED_CIDR: i32 = -111;
pub const GNUTLS_E_BASE64_ENCODING_ERROR: i32 = -201;
pub const GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY: i32 = -202;
pub const GNUTLS_E_INCOMPATIBLE_CRYPTO_LIBRARY: i32 = -202;
pub const GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY: i32 = -203;
pub const GNUTLS_E_OPENPGP_KEYRING_ERROR: i32 = -204;
pub const GNUTLS_E_X509_UNSUPPORTED_OID: i32 = -205;
pub const GNUTLS_E_RANDOM_FAILED: i32 = -206;
pub const GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR: i32 = -207;
pub const GNUTLS_E_OPENPGP_SUBKEY_ERROR: i32 = -208;
pub const GNUTLS_E_ALREADY_REGISTERED: i32 = -209;
pub const GNUTLS_E_HANDSHAKE_TOO_LARGE: i32 = -210;
pub const GNUTLS_E_CRYPTODEV_IOCTL_ERROR: i32 = -211;
pub const GNUTLS_E_CRYPTODEV_DEVICE_ERROR: i32 = -212;
pub const GNUTLS_E_CHANNEL_BINDING_NOT_AVAILABLE: i32 = -213;
pub const GNUTLS_E_BAD_COOKIE: i32 = -214;
pub const GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR: i32 = -215;
pub const GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL: i32 = -216;
pub const GNUTLS_E_INSUFFICIENT_SECURITY: i32 = -217;
pub const GNUTLS_E_HEARTBEAT_PONG_RECEIVED: i32 = -292;
pub const GNUTLS_E_HEARTBEAT_PING_RECEIVED: i32 = -293;
pub const GNUTLS_E_UNRECOGNIZED_NAME: i32 = -294;
pub const GNUTLS_E_PKCS11_ERROR: i32 = -300;
pub const GNUTLS_E_PKCS11_LOAD_ERROR: i32 = -301;
pub const GNUTLS_E_PARSING_ERROR: i32 = -302;
pub const GNUTLS_E_PKCS11_PIN_ERROR: i32 = -303;
pub const GNUTLS_E_PKCS11_SLOT_ERROR: i32 = -305;
pub const GNUTLS_E_LOCKING_ERROR: i32 = -306;
pub const GNUTLS_E_PKCS11_ATTRIBUTE_ERROR: i32 = -307;
pub const GNUTLS_E_PKCS11_DEVICE_ERROR: i32 = -308;
pub const GNUTLS_E_PKCS11_DATA_ERROR: i32 = -309;
pub const GNUTLS_E_PKCS11_UNSUPPORTED_FEATURE_ERROR: i32 = -310;
pub const GNUTLS_E_PKCS11_KEY_ERROR: i32 = -311;
pub const GNUTLS_E_PKCS11_PIN_EXPIRED: i32 = -312;
pub const GNUTLS_E_PKCS11_PIN_LOCKED: i32 = -313;
pub const GNUTLS_E_PKCS11_SESSION_ERROR: i32 = -314;
pub const GNUTLS_E_PKCS11_SIGNATURE_ERROR: i32 = -315;
pub const GNUTLS_E_PKCS11_TOKEN_ERROR: i32 = -316;
pub const GNUTLS_E_PKCS11_USER_ERROR: i32 = -317;
pub const GNUTLS_E_CRYPTO_INIT_FAILED: i32 = -318;
pub const GNUTLS_E_TIMEDOUT: i32 = -319;
pub const GNUTLS_E_USER_ERROR: i32 = -320;
pub const GNUTLS_E_ECC_NO_SUPPORTED_CURVES: i32 = -321;
pub const GNUTLS_E_ECC_UNSUPPORTED_CURVE: i32 = -322;
pub const GNUTLS_E_PKCS11_REQUESTED_OBJECT_NOT_AVAILBLE: i32 = -323;
pub const GNUTLS_E_CERTIFICATE_LIST_UNSORTED: i32 = -324;
pub const GNUTLS_E_ILLEGAL_PARAMETER: i32 = -325;
pub const GNUTLS_E_NO_PRIORITIES_WERE_SET: i32 = -326;
pub const GNUTLS_E_X509_UNSUPPORTED_EXTENSION: i32 = -327;
pub const GNUTLS_E_SESSION_EOF: i32 = -328;
pub const GNUTLS_E_TPM_ERROR: i32 = -329;
pub const GNUTLS_E_TPM_KEY_PASSWORD_ERROR: i32 = -330;
pub const GNUTLS_E_TPM_SRK_PASSWORD_ERROR: i32 = -331;
pub const GNUTLS_E_TPM_SESSION_ERROR: i32 = -332;
pub const GNUTLS_E_TPM_KEY_NOT_FOUND: i32 = -333;
pub const GNUTLS_E_TPM_UNINITIALIZED: i32 = -334;
pub const GNUTLS_E_TPM_NO_LIB: i32 = -335;
pub const GNUTLS_E_NO_CERTIFICATE_STATUS: i32 = -340;
pub const GNUTLS_E_OCSP_RESPONSE_ERROR: i32 = -341;
pub const GNUTLS_E_RANDOM_DEVICE_ERROR: i32 = -342;
pub const GNUTLS_E_AUTH_ERROR: i32 = -343;
pub const GNUTLS_E_NO_APPLICATION_PROTOCOL: i32 = -344;
pub const GNUTLS_E_SOCKETS_INIT_ERROR: i32 = -345;
pub const GNUTLS_E_KEY_IMPORT_FAILED: i32 = -346;
pub const GNUTLS_E_INAPPROPRIATE_FALLBACK: i32 = -347;
pub const GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR: i32 = -348;
pub const GNUTLS_E_PRIVKEY_VERIFICATION_ERROR: i32 = -349;
pub const GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH: i32 = -350;
pub const GNUTLS_E_ASN1_EMBEDDED_NULL_IN_STRING: i32 = -351;
pub const GNUTLS_E_SELF_TEST_ERROR: i32 = -400;
pub const GNUTLS_E_NO_SELF_TEST: i32 = -401;
pub const GNUTLS_E_LIB_IN_ERROR_STATE: i32 = -402;
pub const GNUTLS_E_PK_GENERATION_ERROR: i32 = -403;
pub const GNUTLS_E_IDNA_ERROR: i32 = -404;
pub const GNUTLS_E_NEED_FALLBACK: i32 = -405;
pub const GNUTLS_E_SESSION_USER_ID_CHANGED: i32 = -406;
pub const GNUTLS_E_HANDSHAKE_DURING_FALSE_START: i32 = -407;
pub const GNUTLS_E_UNAVAILABLE_DURING_HANDSHAKE: i32 = -408;
pub const GNUTLS_E_PK_INVALID_PUBKEY: i32 = -409;
pub const GNUTLS_E_PK_INVALID_PRIVKEY: i32 = -410;
pub const GNUTLS_E_NOT_YET_ACTIVATED: i32 = -411;
pub const GNUTLS_E_INVALID_UTF8_STRING: i32 = -412;
pub const GNUTLS_E_NO_EMBEDDED_DATA: i32 = -413;
pub const GNUTLS_E_INVALID_UTF8_EMAIL: i32 = -414;
pub const GNUTLS_E_INVALID_PASSWORD_STRING: i32 = -415;
pub const GNUTLS_E_CERTIFICATE_TIME_ERROR: i32 = -416;
pub const GNUTLS_E_RECORD_OVERFLOW: i32 = -417;
pub const GNUTLS_E_ASN1_TIME_ERROR: i32 = -418;
pub const GNUTLS_E_INCOMPATIBLE_SIG_WITH_KEY: i32 = -419;
pub const GNUTLS_E_PK_INVALID_PUBKEY_PARAMS: i32 = -420;
pub const GNUTLS_E_PK_NO_VALIDATION_PARAMS: i32 = -421;
pub const GNUTLS_E_OCSP_MISMATCH_WITH_CERTS: i32 = -422;
pub const GNUTLS_E_NO_COMMON_KEY_SHARE: i32 = -423;
pub const GNUTLS_E_REAUTH_REQUEST: i32 = -424;
pub const GNUTLS_E_TOO_MANY_MATCHES: i32 = -425;
pub const GNUTLS_E_CRL_VERIFICATION_ERROR: i32 = -426;
pub const GNUTLS_E_MISSING_EXTENSION: i32 = -427;
pub const GNUTLS_E_DB_ENTRY_EXISTS: i32 = -428;
pub const GNUTLS_E_EARLY_DATA_REJECTED: i32 = -429;
pub const GNUTLS_E_X509_DUPLICATE_EXTENSION: i32 = -430;
pub const GNUTLS_E_UNIMPLEMENTED_FEATURE: i32 = -1250;
pub const GNUTLS_E_INT_RET_0: i32 = -1251;
pub const GNUTLS_E_INT_CHECK_AGAIN: i32 = -1252;
pub const GNUTLS_E_APPLICATION_ERROR_MAX: i32 = -65000;
pub const GNUTLS_E_APPLICATION_ERROR_MIN: i32 = -65500;
pub const GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT: u32 = 0;
pub const LIBGNUTLS_VERSION: &'static [u8; 6usize] = b"3.7.3\0";
pub const LIBGNUTLS_VERSION_MAJOR: u32 = 3;
pub const LIBGNUTLS_VERSION_MINOR: u32 = 7;
pub const LIBGNUTLS_VERSION_PATCH: u32 = 3;
pub const LIBGNUTLS_VERSION_NUMBER: u32 = 198403;
pub const LIBGNUTLS_EXTRA_VERSION: &'static [u8; 6usize] = b"3.7.3\0";
pub const GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA: u32 = 0;
pub const __GNUC_VA_LIST: u32 = 1;
pub const USERPREF_DEVICE_CERTIFICATE_KEY: &'static [u8; 18usize] = b"DeviceCertificate\0";
pub const USERPREF_ESCROW_BAG_KEY: &'static [u8; 10usize] = b"EscrowBag\0";
pub const USERPREF_HOST_CERTIFICATE_KEY: &'static [u8; 16usize] = b"HostCertificate\0";
pub const USERPREF_ROOT_CERTIFICATE_KEY: &'static [u8; 16usize] = b"RootCertificate\0";
pub const USERPREF_HOST_PRIVATE_KEY_KEY: &'static [u8; 15usize] = b"HostPrivateKey\0";
pub const USERPREF_ROOT_PRIVATE_KEY_KEY: &'static [u8; 15usize] = b"RootPrivateKey\0";
pub const USERPREF_HOST_ID_KEY: &'static [u8; 7usize] = b"HostID\0";
pub const USERPREF_SYSTEM_BUID_KEY: &'static [u8; 11usize] = b"SystemBUID\0";
pub const USERPREF_WIFI_MAC_ADDRESS_KEY: &'static [u8; 15usize] = b"WiFiMACAddress\0";
pub const S_IFMT: u32 = 61440;
pub const S_IFIFO: u32 = 4096;
pub const S_IFCHR: u32 = 8192;
pub const S_IFDIR: u32 = 16384;
pub const S_IFBLK: u32 = 24576;
pub const S_IFREG: u32 = 32768;
pub const S_IFLNK: u32 = 40960;
pub const S_IFSOCK: u32 = 49152;
pub const S_IFWHT: u32 = 57344;
pub const S_IRWXU: u32 = 448;
pub const S_IRUSR: u32 = 256;
pub const S_IWUSR: u32 = 128;
pub const S_IXUSR: u32 = 64;
pub const S_IRWXG: u32 = 56;
pub const S_IRGRP: u32 = 32;
pub const S_IWGRP: u32 = 16;
pub const S_IXGRP: u32 = 8;
pub const S_IRWXO: u32 = 7;
pub const S_IROTH: u32 = 4;
pub const S_IWOTH: u32 = 2;
pub const S_IXOTH: u32 = 1;
pub const S_ISUID: u32 = 2048;
pub const S_ISGID: u32 = 1024;
pub const S_ISVTX: u32 = 512;
pub const S_ISTXT: u32 = 512;
pub const S_IREAD: u32 = 256;
pub const S_IWRITE: u32 = 128;
pub const S_IEXEC: u32 = 64;
pub const ACCESSPERMS: u32 = 511;
pub const ALLPERMS: u32 = 4095;
pub const DEFFILEMODE: u32 = 438;
pub const S_BLKSIZE: u32 = 512;
pub const UF_SETTABLE: u32 = 65535;
pub const UF_NODUMP: u32 = 1;
pub const UF_IMMUTABLE: u32 = 2;
pub const UF_APPEND: u32 = 4;
pub const UF_OPAQUE: u32 = 8;
pub const UF_COMPRESSED: u32 = 32;
pub const UF_TRACKED: u32 = 64;
pub const UF_DATAVAULT: u32 = 128;
pub const UF_HIDDEN: u32 = 32768;
pub const SF_SUPPORTED: u32 = 10420224;
pub const SF_SETTABLE: u32 = 1073676288;
pub const SF_SYNTHETIC: u32 = 3221225472;
pub const SF_ARCHIVED: u32 = 65536;
pub const SF_IMMUTABLE: u32 = 131072;
pub const SF_APPEND: u32 = 262144;
pub const SF_RESTRICTED: u32 = 524288;
pub const SF_NOUNLINK: u32 = 1048576;
pub const SF_FIRMLINK: u32 = 8388608;
pub const SF_DATALESS: u32 = 1073741824;
pub const EF_MAY_SHARE_BLOCKS: u32 = 1;
pub const EF_NO_XATTRS: u32 = 2;
pub const EF_IS_SYNC_ROOT: u32 = 4;
pub const EF_IS_PURGEABLE: u32 = 8;
pub const EF_IS_SPARSE: u32 = 16;
pub const EF_IS_SYNTHETIC: u32 = 32;
pub const UTIME_NOW: i32 = -1;
pub const UTIME_OMIT: i32 = -2;
pub const AFC_SERVICE_NAME: &'static [u8; 14usize] = b"com.apple.afc\0";
pub const COMPANION_PROXY_SERVICE_NAME: &'static [u8; 26usize] = b"com.apple.companion_proxy\0";
pub const DEBUGSERVER_SERVICE_NAME: &'static [u8; 22usize] = b"com.apple.debugserver\0";
pub const DEBUGSERVER_SECURE_SERVICE_NAME: &'static [u8; 43usize] =
    b"com.apple.debugserver.DVTSecureSocketProxy\0";
pub const DIAGNOSTICS_RELAY_SERVICE_NAME: &'static [u8; 35usize] =
    b"com.apple.mobile.diagnostics_relay\0";
pub const DIAGNOSTICS_RELAY_REQUEST_TYPE_ALL: &'static [u8; 4usize] = b"All\0";
pub const DIAGNOSTICS_RELAY_REQUEST_TYPE_WIFI: &'static [u8; 5usize] = b"WiFi\0";
pub const DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE: &'static [u8; 9usize] = b"GasGauge\0";
pub const DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND: &'static [u8; 5usize] = b"NAND\0";
pub const FILE_RELAY_SERVICE_NAME: &'static [u8; 28usize] = b"com.apple.mobile.file_relay\0";
pub const HEARTBEAT_SERVICE_NAME: &'static [u8; 27usize] = b"com.apple.mobile.heartbeat\0";
pub const HOUSE_ARREST_SERVICE_NAME: &'static [u8; 30usize] = b"com.apple.mobile.house_arrest\0";
pub const INSTPROXY_SERVICE_NAME: &'static [u8; 36usize] = b"com.apple.mobile.installation_proxy\0";
pub const MISAGENT_SERVICE_NAME: &'static [u8; 19usize] = b"com.apple.misagent\0";
pub const MOBILE_IMAGE_MOUNTER_SERVICE_NAME: &'static [u8; 38usize] =
    b"com.apple.mobile.mobile_image_mounter\0";
pub const MOBILEACTIVATION_SERVICE_NAME: &'static [u8; 28usize] = b"com.apple.mobileactivationd\0";
pub const MOBILEBACKUP_SERVICE_NAME: &'static [u8; 23usize] = b"com.apple.mobilebackup\0";
pub const MOBILEBACKUP2_SERVICE_NAME: &'static [u8; 24usize] = b"com.apple.mobilebackup2\0";
pub const MOBILESYNC_SERVICE_NAME: &'static [u8; 21usize] = b"com.apple.mobilesync\0";
pub const NP_SERVICE_NAME: &'static [u8; 36usize] = b"com.apple.mobile.notification_proxy\0";
pub const NP_SYNC_WILL_START: &'static [u8; 38usize] = b"com.apple.itunes-mobdev.syncWillStart\0";
pub const NP_SYNC_DID_START: &'static [u8; 37usize] = b"com.apple.itunes-mobdev.syncDidStart\0";
pub const NP_SYNC_DID_FINISH: &'static [u8; 38usize] = b"com.apple.itunes-mobdev.syncDidFinish\0";
pub const NP_SYNC_LOCK_REQUEST: &'static [u8; 40usize] =
    b"com.apple.itunes-mobdev.syncLockRequest\0";
pub const NP_SYNC_CANCEL_REQUEST: &'static [u8; 42usize] =
    b"com.apple.itunes-client.syncCancelRequest\0";
pub const NP_SYNC_SUSPEND_REQUEST: &'static [u8; 43usize] =
    b"com.apple.itunes-client.syncSuspendRequest\0";
pub const NP_SYNC_RESUME_REQUEST: &'static [u8; 42usize] =
    b"com.apple.itunes-client.syncResumeRequest\0";
pub const NP_PHONE_NUMBER_CHANGED: &'static [u8; 47usize] =
    b"com.apple.mobile.lockdown.phone_number_changed\0";
pub const NP_DEVICE_NAME_CHANGED: &'static [u8; 46usize] =
    b"com.apple.mobile.lockdown.device_name_changed\0";
pub const NP_TIMEZONE_CHANGED: &'static [u8; 43usize] =
    b"com.apple.mobile.lockdown.timezone_changed\0";
pub const NP_TRUSTED_HOST_ATTACHED: &'static [u8; 48usize] =
    b"com.apple.mobile.lockdown.trusted_host_attached\0";
pub const NP_HOST_DETACHED: &'static [u8; 40usize] = b"com.apple.mobile.lockdown.host_detached\0";
pub const NP_HOST_ATTACHED: &'static [u8; 40usize] = b"com.apple.mobile.lockdown.host_attached\0";
pub const NP_REGISTRATION_FAILED: &'static [u8; 46usize] =
    b"com.apple.mobile.lockdown.registration_failed\0";
pub const NP_ACTIVATION_STATE: &'static [u8; 43usize] =
    b"com.apple.mobile.lockdown.activation_state\0";
pub const NP_BRICK_STATE: &'static [u8; 38usize] = b"com.apple.mobile.lockdown.brick_state\0";
pub const NP_DISK_USAGE_CHANGED: &'static [u8; 45usize] =
    b"com.apple.mobile.lockdown.disk_usage_changed\0";
pub const NP_DS_DOMAIN_CHANGED: &'static [u8; 42usize] =
    b"com.apple.mobile.data_sync.domain_changed\0";
pub const NP_BACKUP_DOMAIN_CHANGED: &'static [u8; 39usize] =
    b"com.apple.mobile.backup.domain_changed\0";
pub const NP_APP_INSTALLED: &'static [u8; 39usize] = b"com.apple.mobile.application_installed\0";
pub const NP_APP_UNINSTALLED: &'static [u8; 41usize] =
    b"com.apple.mobile.application_uninstalled\0";
pub const NP_DEV_IMAGE_MOUNTED: &'static [u8; 41usize] =
    b"com.apple.mobile.developer_image_mounted\0";
pub const NP_ATTEMPTACTIVATION: &'static [u8; 40usize] =
    b"com.apple.springboard.attemptactivation\0";
pub const NP_ITDBPREP_DID_END: &'static [u8; 39usize] = b"com.apple.itdbprep.notification.didEnd\0";
pub const NP_LANGUAGE_CHANGED: &'static [u8; 27usize] = b"com.apple.language.changed\0";
pub const NP_ADDRESS_BOOK_PREF_CHANGED: &'static [u8; 40usize] =
    b"com.apple.AddressBook.PreferenceChanged\0";
pub const PREBOARD_SERVICE_NAME: &'static [u8; 29usize] = b"com.apple.preboardservice_v2\0";
pub const REVERSE_PROXY_DEFAULT_PORT: u32 = 1082;
pub const SBSERVICES_SERVICE_NAME: &'static [u8; 30usize] = b"com.apple.springboardservices\0";
pub const SCREENSHOTR_SERVICE_NAME: &'static [u8; 29usize] = b"com.apple.mobile.screenshotr\0";
pub const SYSLOG_RELAY_SERVICE_NAME: &'static [u8; 23usize] = b"com.apple.syslog_relay\0";
pub const WEBINSPECTOR_SERVICE_NAME: &'static [u8; 23usize] = b"com.apple.webinspector\0";
pub const DEVICE_CLASS_IPHONE: u32 = 1;
pub const DEVICE_CLASS_IPAD: u32 = 2;
pub const DEVICE_CLASS_IPOD: u32 = 3;
pub const DEVICE_CLASS_APPLETV: u32 = 4;
pub const DEVICE_CLASS_WATCH: u32 = 5;
pub const DEVICE_CLASS_UNKNOWN: u32 = 255;
pub const LOCKDOWN_PROTOCOL_VERSION: &'static [u8; 2usize] = b"2\0";
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_longlong;
pub type __uint64_t = ::std::os::raw::c_ulonglong;
pub type __darwin_intptr_t = ::std::os::raw::c_long;
pub type __darwin_natural_t = ::std::os::raw::c_uint;
pub type __darwin_ct_rune_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __mbstate_t {
    pub __mbstate8: [::std::os::raw::c_char; 128usize],
    pub _mbstateL: ::std::os::raw::c_longlong,
}
#[test]
fn bindgen_test_layout___mbstate_t() {
    assert_eq!(
        ::std::mem::size_of::<__mbstate_t>(),
        128usize,
        concat!("Size of: ", stringify!(__mbstate_t))
    );
    assert_eq!(
        ::std::mem::align_of::<__mbstate_t>(),
        8usize,
        concat!("Alignment of ", stringify!(__mbstate_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__mbstate_t),
            "::",
            stringify!(__mbstate8)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__mbstate_t),
            "::",
            stringify!(_mbstateL)
        )
    );
}
pub type __darwin_mbstate_t = __mbstate_t;
pub type __darwin_ptrdiff_t = ::std::os::raw::c_long;
pub type __darwin_size_t = ::std::os::raw::c_ulong;
pub type __darwin_va_list = __builtin_va_list;
pub type __darwin_wchar_t = ::std::os::raw::c_int;
pub type __darwin_rune_t = __darwin_wchar_t;
pub type __darwin_wint_t = ::std::os::raw::c_int;
pub type __darwin_clock_t = ::std::os::raw::c_ulong;
pub type __darwin_socklen_t = __uint32_t;
pub type __darwin_ssize_t = ::std::os::raw::c_long;
pub type __darwin_time_t = ::std::os::raw::c_long;
pub type u_int8_t = ::std::os::raw::c_uchar;
pub type u_int16_t = ::std::os::raw::c_ushort;
pub type u_int32_t = ::std::os::raw::c_uint;
pub type u_int64_t = ::std::os::raw::c_ulonglong;
pub type register_t = i64;
pub type user_addr_t = u_int64_t;
pub type user_size_t = u_int64_t;
pub type user_ssize_t = i64;
pub type user_long_t = i64;
pub type user_ulong_t = u_int64_t;
pub type user_time_t = i64;
pub type user_off_t = i64;
pub type syscall_arg_t = u_int64_t;
pub type __darwin_blkcnt_t = __int64_t;
pub type __darwin_blksize_t = __int32_t;
pub type __darwin_dev_t = __int32_t;
pub type __darwin_fsblkcnt_t = ::std::os::raw::c_uint;
pub type __darwin_fsfilcnt_t = ::std::os::raw::c_uint;
pub type __darwin_gid_t = __uint32_t;
pub type __darwin_id_t = __uint32_t;
pub type __darwin_ino64_t = __uint64_t;
pub type __darwin_ino_t = __darwin_ino64_t;
pub type __darwin_mach_port_name_t = __darwin_natural_t;
pub type __darwin_mach_port_t = __darwin_mach_port_name_t;
pub type __darwin_mode_t = __uint16_t;
pub type __darwin_off_t = __int64_t;
pub type __darwin_pid_t = __int32_t;
pub type __darwin_sigset_t = __uint32_t;
pub type __darwin_suseconds_t = __int32_t;
pub type __darwin_uid_t = __uint32_t;
pub type __darwin_useconds_t = __uint32_t;
pub type __darwin_uuid_t = [::std::os::raw::c_uchar; 16usize];
pub type __darwin_uuid_string_t = [::std::os::raw::c_char; 37usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_pthread_handler_rec {
    pub __routine: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
    pub __arg: *mut ::std::os::raw::c_void,
    pub __next: *mut __darwin_pthread_handler_rec,
}
#[test]
fn bindgen_test_layout___darwin_pthread_handler_rec() {
    assert_eq!(
        ::std::mem::size_of::<__darwin_pthread_handler_rec>(),
        24usize,
        concat!("Size of: ", stringify!(__darwin_pthread_handler_rec))
    );
    assert_eq!(
        ::std::mem::align_of::<__darwin_pthread_handler_rec>(),
        8usize,
        concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__darwin_pthread_handler_rec),
            "::",
            stringify!(__routine)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(__darwin_pthread_handler_rec),
            "::",
            stringify!(__arg)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(__darwin_pthread_handler_rec),
            "::",
            stringify!(__next)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_attr_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 56usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_attr_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_attr_t>(),
        64usize,
        concat!("Size of: ", stringify!(_opaque_pthread_attr_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_attr_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_attr_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_attr_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_attr_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_cond_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 40usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_cond_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_cond_t>(),
        48usize,
        concat!("Size of: ", stringify!(_opaque_pthread_cond_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_cond_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_cond_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_cond_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_cond_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_condattr_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_condattr_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_condattr_t>(),
        16usize,
        concat!("Size of: ", stringify!(_opaque_pthread_condattr_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_condattr_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_condattr_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_condattr_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_mutex_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 56usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_mutex_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_mutex_t>(),
        64usize,
        concat!("Size of: ", stringify!(_opaque_pthread_mutex_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_mutex_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_mutex_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_mutex_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_mutexattr_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_mutexattr_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(),
        16usize,
        concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_mutexattr_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_mutexattr_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_mutexattr_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_once_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_once_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_once_t>(),
        16usize,
        concat!("Size of: ", stringify!(_opaque_pthread_once_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_once_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_once_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_once_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_once_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_rwlock_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 192usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_rwlock_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_rwlock_t>(),
        200usize,
        concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_rwlock_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_rwlock_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_rwlock_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_rwlockattr_t {
    pub __sig: ::std::os::raw::c_long,
    pub __opaque: [::std::os::raw::c_char; 16usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_rwlockattr_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(),
        24usize,
        concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_rwlockattr_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_rwlockattr_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_rwlockattr_t),
            "::",
            stringify!(__opaque)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_t {
    pub __sig: ::std::os::raw::c_long,
    pub __cleanup_stack: *mut __darwin_pthread_handler_rec,
    pub __opaque: [::std::os::raw::c_char; 8176usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_t() {
    assert_eq!(
        ::std::mem::size_of::<_opaque_pthread_t>(),
        8192usize,
        concat!("Size of: ", stringify!(_opaque_pthread_t))
    );
    assert_eq!(
        ::std::mem::align_of::<_opaque_pthread_t>(),
        8usize,
        concat!("Alignment of ", stringify!(_opaque_pthread_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_t),
            "::",
            stringify!(__sig)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_t),
            "::",
            stringify!(__cleanup_stack)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(_opaque_pthread_t),
            "::",
            stringify!(__opaque)
        )
    );
}
pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t;
pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t;
pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t;
pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong;
pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t;
pub type __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t;
pub type __darwin_pthread_once_t = _opaque_pthread_once_t;
pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t;
pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t;
pub type __darwin_pthread_t = *mut _opaque_pthread_t;
pub type int_least8_t = i8;
pub type int_least16_t = i16;
pub type int_least32_t = i32;
pub type int_least64_t = i64;
pub type uint_least8_t = u8;
pub type uint_least16_t = u16;
pub type uint_least32_t = u32;
pub type uint_least64_t = u64;
pub type int_fast8_t = i8;
pub type int_fast16_t = i16;
pub type int_fast32_t = i32;
pub type int_fast64_t = i64;
pub type uint_fast8_t = u8;
pub type uint_fast16_t = u16;
pub type uint_fast32_t = u32;
pub type uint_fast64_t = u64;
pub type intmax_t = ::std::os::raw::c_long;
pub type uintmax_t = ::std::os::raw::c_ulong;
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _OSUnalignedU16 {
    pub __val: u16,
}
#[test]
fn bindgen_test_layout__OSUnalignedU16() {
    assert_eq!(
        ::std::mem::size_of::<_OSUnalignedU16>(),
        2usize,
        concat!("Size of: ", stringify!(_OSUnalignedU16))
    );
    assert_eq!(
        ::std::mem::align_of::<_OSUnalignedU16>(),
        1usize,
        concat!("Alignment of ", stringify!(_OSUnalignedU16))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_OSUnalignedU16>())).__val as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_OSUnalignedU16),
            "::",
            stringify!(__val)
        )
    );
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _OSUnalignedU32 {
    pub __val: u32,
}
#[test]
fn bindgen_test_layout__OSUnalignedU32() {
    assert_eq!(
        ::std::mem::size_of::<_OSUnalignedU32>(),
        4usize,
        concat!("Size of: ", stringify!(_OSUnalignedU32))
    );
    assert_eq!(
        ::std::mem::align_of::<_OSUnalignedU32>(),
        1usize,
        concat!("Alignment of ", stringify!(_OSUnalignedU32))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_OSUnalignedU32>())).__val as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_OSUnalignedU32),
            "::",
            stringify!(__val)
        )
    );
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _OSUnalignedU64 {
    pub __val: u64,
}
#[test]
fn bindgen_test_layout__OSUnalignedU64() {
    assert_eq!(
        ::std::mem::size_of::<_OSUnalignedU64>(),
        8usize,
        concat!("Size of: ", stringify!(_OSUnalignedU64))
    );
    assert_eq!(
        ::std::mem::align_of::<_OSUnalignedU64>(),
        1usize,
        concat!("Alignment of ", stringify!(_OSUnalignedU64))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_OSUnalignedU64>())).__val as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_OSUnalignedU64),
            "::",
            stringify!(__val)
        )
    );
}
pub type u_char = ::std::os::raw::c_uchar;
pub type u_short = ::std::os::raw::c_ushort;
pub type u_int = ::std::os::raw::c_uint;
pub type u_long = ::std::os::raw::c_ulong;
pub type ushort = ::std::os::raw::c_ushort;
pub type uint = ::std::os::raw::c_uint;
pub type u_quad_t = u_int64_t;
pub type quad_t = i64;
pub type qaddr_t = *mut quad_t;
pub type caddr_t = *mut ::std::os::raw::c_char;
pub type daddr_t = i32;
pub type dev_t = __darwin_dev_t;
pub type fixpt_t = u_int32_t;
pub type blkcnt_t = __darwin_blkcnt_t;
pub type blksize_t = __darwin_blksize_t;
pub type gid_t = __darwin_gid_t;
pub type in_addr_t = __uint32_t;
pub type in_port_t = __uint16_t;
pub type ino_t = __darwin_ino_t;
pub type ino64_t = __darwin_ino64_t;
pub type key_t = __int32_t;
pub type mode_t = __darwin_mode_t;
pub type nlink_t = __uint16_t;
pub type id_t = __darwin_id_t;
pub type pid_t = __darwin_pid_t;
pub type off_t = __darwin_off_t;
pub type segsz_t = i32;
pub type swblk_t = i32;
pub type uid_t = __darwin_uid_t;
pub type clock_t = __darwin_clock_t;
pub type size_t = __darwin_size_t;
pub type ssize_t = __darwin_ssize_t;
pub type time_t = __darwin_time_t;
pub type useconds_t = __darwin_useconds_t;
pub type suseconds_t = __darwin_suseconds_t;
pub type rsize_t = __darwin_size_t;
pub type errno_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
    pub fds_bits: [__int32_t; 32usize],
}
#[test]
fn bindgen_test_layout_fd_set() {
    assert_eq!(
        ::std::mem::size_of::<fd_set>(),
        128usize,
        concat!("Size of: ", stringify!(fd_set))
    );
    assert_eq!(
        ::std::mem::align_of::<fd_set>(),
        4usize,
        concat!("Alignment of ", stringify!(fd_set))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<fd_set>())).fds_bits as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(fd_set),
            "::",
            stringify!(fds_bits)
        )
    );
}
extern "C" {
    pub fn __darwin_check_fd_set_overflow(
        arg1: ::std::os::raw::c_int,
        arg2: *const ::std::os::raw::c_void,
        arg3: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
pub type fd_mask = __int32_t;
pub type pthread_attr_t = __darwin_pthread_attr_t;
pub type pthread_cond_t = __darwin_pthread_cond_t;
pub type pthread_condattr_t = __darwin_pthread_condattr_t;
pub type pthread_mutex_t = __darwin_pthread_mutex_t;
pub type pthread_mutexattr_t = __darwin_pthread_mutexattr_t;
pub type pthread_once_t = __darwin_pthread_once_t;
pub type pthread_rwlock_t = __darwin_pthread_rwlock_t;
pub type pthread_rwlockattr_t = __darwin_pthread_rwlockattr_t;
pub type pthread_t = __darwin_pthread_t;
pub type pthread_key_t = __darwin_pthread_key_t;
pub type fsblkcnt_t = __darwin_fsblkcnt_t;
pub type fsfilcnt_t = __darwin_fsfilcnt_t;
pub type wchar_t = ::std::os::raw::c_int;
pub type max_align_t = f64;
pub type __darwin_nl_item = ::std::os::raw::c_int;
pub type __darwin_wctrans_t = ::std::os::raw::c_int;
pub type __darwin_wctype_t = __uint32_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
    pub tv_sec: __darwin_time_t,
    pub tv_nsec: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_timespec() {
    assert_eq!(
        ::std::mem::size_of::<timespec>(),
        16usize,
        concat!("Size of: ", stringify!(timespec))
    );
    assert_eq!(
        ::std::mem::align_of::<timespec>(),
        8usize,
        concat!("Alignment of ", stringify!(timespec))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<timespec>())).tv_sec as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(timespec),
            "::",
            stringify!(tv_sec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<timespec>())).tv_nsec as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(timespec),
            "::",
            stringify!(tv_nsec)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tm {
    pub tm_sec: ::std::os::raw::c_int,
    pub tm_min: ::std::os::raw::c_int,
    pub tm_hour: ::std::os::raw::c_int,
    pub tm_mday: ::std::os::raw::c_int,
    pub tm_mon: ::std::os::raw::c_int,
    pub tm_year: ::std::os::raw::c_int,
    pub tm_wday: ::std::os::raw::c_int,
    pub tm_yday: ::std::os::raw::c_int,
    pub tm_isdst: ::std::os::raw::c_int,
    pub tm_gmtoff: ::std::os::raw::c_long,
    pub tm_zone: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_tm() {
    assert_eq!(
        ::std::mem::size_of::<tm>(),
        56usize,
        concat!("Size of: ", stringify!(tm))
    );
    assert_eq!(
        ::std::mem::align_of::<tm>(),
        8usize,
        concat!("Alignment of ", stringify!(tm))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_sec as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_sec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_min as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_min)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_hour as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_hour)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_mday as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_mday)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_mon as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_mon)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_year as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_year)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_wday as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_wday)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_yday as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_yday)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_isdst as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_isdst)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_gmtoff as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_gmtoff)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<tm>())).tm_zone as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(tm),
            "::",
            stringify!(tm_zone)
        )
    );
}
extern "C" {
    pub static mut tzname: [*mut ::std::os::raw::c_char; 0usize];
}
extern "C" {
    pub static mut getdate_err: ::std::os::raw::c_int;
}
extern "C" {
    pub static mut timezone: ::std::os::raw::c_long;
}
extern "C" {
    pub static mut daylight: ::std::os::raw::c_int;
}
extern "C" {
    pub fn asctime(arg1: *const tm) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn clock() -> clock_t;
}
extern "C" {
    pub fn ctime(arg1: *const time_t) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn difftime(arg1: time_t, arg2: time_t) -> f64;
}
extern "C" {
    pub fn getdate(arg1: *const ::std::os::raw::c_char) -> *mut tm;
}
extern "C" {
    pub fn gmtime(arg1: *const time_t) -> *mut tm;
}
extern "C" {
    pub fn localtime(arg1: *const time_t) -> *mut tm;
}
extern "C" {
    pub fn mktime(arg1: *mut tm) -> time_t;
}
extern "C" {
    pub fn strftime(
        arg1: *mut ::std::os::raw::c_char,
        arg2: size_t,
        arg3: *const ::std::os::raw::c_char,
        arg4: *const tm,
    ) -> size_t;
}
extern "C" {
    pub fn strptime(
        arg1: *const ::std::os::raw::c_char,
        arg2: *const ::std::os::raw::c_char,
        arg3: *mut tm,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn time(arg1: *mut time_t) -> time_t;
}
extern "C" {
    pub fn tzset();
}
extern "C" {
    pub fn asctime_r(
        arg1: *const tm,
        arg2: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn ctime_r(
        arg1: *const time_t,
        arg2: *mut ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn gmtime_r(arg1: *const time_t, arg2: *mut tm) -> *mut tm;
}
extern "C" {
    pub fn localtime_r(arg1: *const time_t, arg2: *mut tm) -> *mut tm;
}
extern "C" {
    pub fn posix2time(arg1: time_t) -> time_t;
}
extern "C" {
    pub fn tzsetwall();
}
extern "C" {
    pub fn time2posix(arg1: time_t) -> time_t;
}
extern "C" {
    pub fn timelocal(arg1: *mut tm) -> time_t;
}
extern "C" {
    pub fn timegm(arg1: *mut tm) -> time_t;
}
extern "C" {
    pub fn nanosleep(__rqtp: *const timespec, __rmtp: *mut timespec) -> ::std::os::raw::c_int;
}
pub const clockid_t__CLOCK_REALTIME: clockid_t = 0;
pub const clockid_t__CLOCK_MONOTONIC: clockid_t = 6;
pub const clockid_t__CLOCK_MONOTONIC_RAW: clockid_t = 4;
pub const clockid_t__CLOCK_MONOTONIC_RAW_APPROX: clockid_t = 5;
pub const clockid_t__CLOCK_UPTIME_RAW: clockid_t = 8;
pub const clockid_t__CLOCK_UPTIME_RAW_APPROX: clockid_t = 9;
pub const clockid_t__CLOCK_PROCESS_CPUTIME_ID: clockid_t = 12;
pub const clockid_t__CLOCK_THREAD_CPUTIME_ID: clockid_t = 16;
pub type clockid_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn clock_gettime_nsec_np(__clock_id: clockid_t) -> __uint64_t;
}
extern "C" {
    pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn timespec_get(ts: *mut timespec, base: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_UNKNOWN: gnutls_cipher_algorithm = 0;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_NULL: gnutls_cipher_algorithm = 1;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_ARCFOUR_128: gnutls_cipher_algorithm = 2;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_3DES_CBC: gnutls_cipher_algorithm = 3;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_CBC: gnutls_cipher_algorithm = 4;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_CBC: gnutls_cipher_algorithm = 5;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_ARCFOUR_40: gnutls_cipher_algorithm = 6;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CAMELLIA_128_CBC: gnutls_cipher_algorithm = 7;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CAMELLIA_256_CBC: gnutls_cipher_algorithm = 8;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_192_CBC: gnutls_cipher_algorithm = 9;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_GCM: gnutls_cipher_algorithm = 10;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_GCM: gnutls_cipher_algorithm = 11;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CAMELLIA_192_CBC: gnutls_cipher_algorithm = 12;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_SALSA20_256: gnutls_cipher_algorithm = 13;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_ESTREAM_SALSA20_256: gnutls_cipher_algorithm = 14;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CAMELLIA_128_GCM: gnutls_cipher_algorithm = 15;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CAMELLIA_256_GCM: gnutls_cipher_algorithm = 16;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_RC2_40_CBC: gnutls_cipher_algorithm = 17;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_DES_CBC: gnutls_cipher_algorithm = 18;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_CCM: gnutls_cipher_algorithm = 19;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_CCM: gnutls_cipher_algorithm = 20;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_CCM_8: gnutls_cipher_algorithm = 21;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_CCM_8: gnutls_cipher_algorithm = 22;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CHACHA20_POLY1305: gnutls_cipher_algorithm = 23;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_GOST28147_TC26Z_CFB: gnutls_cipher_algorithm = 24;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_GOST28147_CPA_CFB: gnutls_cipher_algorithm = 25;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_GOST28147_CPB_CFB: gnutls_cipher_algorithm = 26;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_GOST28147_CPC_CFB: gnutls_cipher_algorithm = 27;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_GOST28147_CPD_CFB: gnutls_cipher_algorithm = 28;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_CFB8: gnutls_cipher_algorithm = 29;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_192_CFB8: gnutls_cipher_algorithm = 30;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_CFB8: gnutls_cipher_algorithm = 31;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_XTS: gnutls_cipher_algorithm = 32;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_XTS: gnutls_cipher_algorithm = 33;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_GOST28147_TC26Z_CNT: gnutls_cipher_algorithm = 34;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CHACHA20_64: gnutls_cipher_algorithm = 35;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CHACHA20_32: gnutls_cipher_algorithm = 36;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_128_SIV: gnutls_cipher_algorithm = 37;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_256_SIV: gnutls_cipher_algorithm = 38;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES_192_GCM: gnutls_cipher_algorithm = 39;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_MAGMA_CTR_ACPKM: gnutls_cipher_algorithm = 40;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_KUZNYECHIK_CTR_ACPKM: gnutls_cipher_algorithm = 41;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_IDEA_PGP_CFB: gnutls_cipher_algorithm = 200;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_3DES_PGP_CFB: gnutls_cipher_algorithm = 201;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_CAST5_PGP_CFB: gnutls_cipher_algorithm = 202;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_BLOWFISH_PGP_CFB: gnutls_cipher_algorithm = 203;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_SAFER_SK128_PGP_CFB: gnutls_cipher_algorithm = 204;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES128_PGP_CFB: gnutls_cipher_algorithm = 205;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES192_PGP_CFB: gnutls_cipher_algorithm = 206;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_AES256_PGP_CFB: gnutls_cipher_algorithm = 207;
pub const gnutls_cipher_algorithm_GNUTLS_CIPHER_TWOFISH_PGP_CFB: gnutls_cipher_algorithm = 208;
#[doc = " gnutls_cipher_algorithm_t:"]
#[doc = " @GNUTLS_CIPHER_UNKNOWN: Value to identify an unknown/unsupported algorithm."]
#[doc = " @GNUTLS_CIPHER_NULL: The NULL (identity) encryption algorithm."]
#[doc = " @GNUTLS_CIPHER_ARCFOUR_128: ARCFOUR stream cipher with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_3DES_CBC: 3DES in CBC mode."]
#[doc = " @GNUTLS_CIPHER_AES_128_CBC: AES in CBC mode with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_192_CBC: AES in CBC mode with 192-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_256_CBC: AES in CBC mode with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_128_CFB8: AES in CFB8 mode with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_192_CFB8: AES in CFB8 mode with 192-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_256_CFB8: AES in CFB8 mode with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_ARCFOUR_40: ARCFOUR stream cipher with 40-bit keys."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_128_CBC: Camellia in CBC mode with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_192_CBC: Camellia in CBC mode with 192-bit keys."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_256_CBC: Camellia in CBC mode with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_RC2_40_CBC: RC2 in CBC mode with 40-bit keys."]
#[doc = " @GNUTLS_CIPHER_DES_CBC: DES in CBC mode (56-bit keys)."]
#[doc = " @GNUTLS_CIPHER_AES_128_GCM: AES in GCM mode with 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_256_GCM: AES in GCM mode with 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_128_CCM: AES in CCM mode with 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_256_CCM: AES in CCM mode with 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_128_CCM_8: AES in CCM mode with 64-bit tag and 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_256_CCM_8: AES in CCM mode with 64-bit tag and 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_128_GCM: CAMELLIA in GCM mode with 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_256_GCM: CAMELLIA in GCM mode with 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_SALSA20_256: Salsa20 with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_ESTREAM_SALSA20_256: Estream's Salsa20 variant with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_CHACHA20_32: Chacha20 cipher with 96-bit nonces and 32-bit block counters."]
#[doc = " @GNUTLS_CIPHER_CHACHA20_64: Chacha20 cipher with 64-bit nonces and 64-bit block counters."]
#[doc = " @GNUTLS_CIPHER_CHACHA20_POLY1305: The Chacha20 cipher with the Poly1305 authenticator (AEAD)."]
#[doc = " @GNUTLS_CIPHER_GOST28147_TC26Z_CFB: GOST 28147-89 (Magma) cipher in CFB mode with TC26 Z S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPA_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro A S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPB_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro B S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPC_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro C S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPD_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro D S-box."]
#[doc = " @GNUTLS_CIPHER_AES_128_XTS: AES in XTS mode with 128-bit key + 128bit tweak key."]
#[doc = " @GNUTLS_CIPHER_AES_256_XTS: AES in XTS mode with 256-bit key + 256bit tweak key."]
#[doc = "                             Note that the XTS ciphers are message oriented."]
#[doc = "                             The whole message needs to be provided with a single call, because"]
#[doc = "                             cipher-stealing requires to know where the message actually terminates"]
#[doc = "                             in order to be able to compute where the stealing occurs."]
#[doc = " @GNUTLS_CIPHER_GOST28147_TC26Z_CNT: GOST 28147-89 (Magma) cipher in CNT mode with TC26 Z S-box."]
#[doc = " @GNUTLS_CIPHER_MAGMA_CTR_ACPKM: GOST R 34.12-2015 (Magma) cipher in CTR-ACPKM mode."]
#[doc = " @GNUTLS_CIPHER_KUZNYECHIK_CTR_ACPKM: GOST R 34.12-2015 (Kuznyechik) cipher in CTR-ACPKM mode."]
#[doc = " @GNUTLS_CIPHER_IDEA_PGP_CFB: IDEA in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_3DES_PGP_CFB: 3DES in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_CAST5_PGP_CFB: CAST5 in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_BLOWFISH_PGP_CFB: Blowfish in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_SAFER_SK128_PGP_CFB: Safer-SK in CFB mode with 128-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES128_PGP_CFB: AES in CFB mode with 128-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES192_PGP_CFB: AES in CFB mode with 192-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES256_PGP_CFB: AES in CFB mode with 256-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_TWOFISH_PGP_CFB: Twofish in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES_128_SIV: AES in SIV mode with 128-bit key."]
#[doc = " @GNUTLS_CIPHER_AES_256_SIV: AES in SIV mode with 256-bit key."]
#[doc = "                             Note that the SIV ciphers can only be used with"]
#[doc = "                             the AEAD interface, and the IV plays a role as"]
#[doc = "                             the authentication tag while it is prepended to"]
#[doc = "                             the cipher text."]
#[doc = " @GNUTLS_CIPHER_AES_192_GCM: AES in GCM mode with 192-bit keys (AEAD)."]
#[doc = ""]
#[doc = " Enumeration of different symmetric encryption algorithms."]
pub type gnutls_cipher_algorithm = ::std::os::raw::c_uint;
#[doc = " gnutls_cipher_algorithm_t:"]
#[doc = " @GNUTLS_CIPHER_UNKNOWN: Value to identify an unknown/unsupported algorithm."]
#[doc = " @GNUTLS_CIPHER_NULL: The NULL (identity) encryption algorithm."]
#[doc = " @GNUTLS_CIPHER_ARCFOUR_128: ARCFOUR stream cipher with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_3DES_CBC: 3DES in CBC mode."]
#[doc = " @GNUTLS_CIPHER_AES_128_CBC: AES in CBC mode with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_192_CBC: AES in CBC mode with 192-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_256_CBC: AES in CBC mode with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_128_CFB8: AES in CFB8 mode with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_192_CFB8: AES in CFB8 mode with 192-bit keys."]
#[doc = " @GNUTLS_CIPHER_AES_256_CFB8: AES in CFB8 mode with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_ARCFOUR_40: ARCFOUR stream cipher with 40-bit keys."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_128_CBC: Camellia in CBC mode with 128-bit keys."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_192_CBC: Camellia in CBC mode with 192-bit keys."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_256_CBC: Camellia in CBC mode with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_RC2_40_CBC: RC2 in CBC mode with 40-bit keys."]
#[doc = " @GNUTLS_CIPHER_DES_CBC: DES in CBC mode (56-bit keys)."]
#[doc = " @GNUTLS_CIPHER_AES_128_GCM: AES in GCM mode with 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_256_GCM: AES in GCM mode with 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_128_CCM: AES in CCM mode with 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_256_CCM: AES in CCM mode with 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_128_CCM_8: AES in CCM mode with 64-bit tag and 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_AES_256_CCM_8: AES in CCM mode with 64-bit tag and 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_128_GCM: CAMELLIA in GCM mode with 128-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_CAMELLIA_256_GCM: CAMELLIA in GCM mode with 256-bit keys (AEAD)."]
#[doc = " @GNUTLS_CIPHER_SALSA20_256: Salsa20 with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_ESTREAM_SALSA20_256: Estream's Salsa20 variant with 256-bit keys."]
#[doc = " @GNUTLS_CIPHER_CHACHA20_32: Chacha20 cipher with 96-bit nonces and 32-bit block counters."]
#[doc = " @GNUTLS_CIPHER_CHACHA20_64: Chacha20 cipher with 64-bit nonces and 64-bit block counters."]
#[doc = " @GNUTLS_CIPHER_CHACHA20_POLY1305: The Chacha20 cipher with the Poly1305 authenticator (AEAD)."]
#[doc = " @GNUTLS_CIPHER_GOST28147_TC26Z_CFB: GOST 28147-89 (Magma) cipher in CFB mode with TC26 Z S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPA_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro A S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPB_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro B S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPC_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro C S-box."]
#[doc = " @GNUTLS_CIPHER_GOST28147_CPD_CFB: GOST 28147-89 (Magma) cipher in CFB mode with CryptoPro D S-box."]
#[doc = " @GNUTLS_CIPHER_AES_128_XTS: AES in XTS mode with 128-bit key + 128bit tweak key."]
#[doc = " @GNUTLS_CIPHER_AES_256_XTS: AES in XTS mode with 256-bit key + 256bit tweak key."]
#[doc = "                             Note that the XTS ciphers are message oriented."]
#[doc = "                             The whole message needs to be provided with a single call, because"]
#[doc = "                             cipher-stealing requires to know where the message actually terminates"]
#[doc = "                             in order to be able to compute where the stealing occurs."]
#[doc = " @GNUTLS_CIPHER_GOST28147_TC26Z_CNT: GOST 28147-89 (Magma) cipher in CNT mode with TC26 Z S-box."]
#[doc = " @GNUTLS_CIPHER_MAGMA_CTR_ACPKM: GOST R 34.12-2015 (Magma) cipher in CTR-ACPKM mode."]
#[doc = " @GNUTLS_CIPHER_KUZNYECHIK_CTR_ACPKM: GOST R 34.12-2015 (Kuznyechik) cipher in CTR-ACPKM mode."]
#[doc = " @GNUTLS_CIPHER_IDEA_PGP_CFB: IDEA in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_3DES_PGP_CFB: 3DES in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_CAST5_PGP_CFB: CAST5 in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_BLOWFISH_PGP_CFB: Blowfish in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_SAFER_SK128_PGP_CFB: Safer-SK in CFB mode with 128-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES128_PGP_CFB: AES in CFB mode with 128-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES192_PGP_CFB: AES in CFB mode with 192-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES256_PGP_CFB: AES in CFB mode with 256-bit keys (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_TWOFISH_PGP_CFB: Twofish in CFB mode (placeholder - unsupported)."]
#[doc = " @GNUTLS_CIPHER_AES_128_SIV: AES in SIV mode with 128-bit key."]
#[doc = " @GNUTLS_CIPHER_AES_256_SIV: AES in SIV mode with 256-bit key."]
#[doc = "                             Note that the SIV ciphers can only be used with"]
#[doc = "                             the AEAD interface, and the IV plays a role as"]
#[doc = "                             the authentication tag while it is prepended to"]
#[doc = "                             the cipher text."]
#[doc = " @GNUTLS_CIPHER_AES_192_GCM: AES in GCM mode with 192-bit keys (AEAD)."]
#[doc = ""]
#[doc = " Enumeration of different symmetric encryption algorithms."]
pub use self::gnutls_cipher_algorithm as gnutls_cipher_algorithm_t;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_UNKNOWN: gnutls_kx_algorithm_t = 0;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_RSA: gnutls_kx_algorithm_t = 1;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_DHE_DSS: gnutls_kx_algorithm_t = 2;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_DHE_RSA: gnutls_kx_algorithm_t = 3;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_ANON_DH: gnutls_kx_algorithm_t = 4;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_SRP: gnutls_kx_algorithm_t = 5;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_RSA_EXPORT: gnutls_kx_algorithm_t = 6;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_SRP_RSA: gnutls_kx_algorithm_t = 7;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_SRP_DSS: gnutls_kx_algorithm_t = 8;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_PSK: gnutls_kx_algorithm_t = 9;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_DHE_PSK: gnutls_kx_algorithm_t = 10;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_ANON_ECDH: gnutls_kx_algorithm_t = 11;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_ECDHE_RSA: gnutls_kx_algorithm_t = 12;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_ECDHE_ECDSA: gnutls_kx_algorithm_t = 13;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_ECDHE_PSK: gnutls_kx_algorithm_t = 14;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_RSA_PSK: gnutls_kx_algorithm_t = 15;
pub const gnutls_kx_algorithm_t_GNUTLS_KX_VKO_GOST_12: gnutls_kx_algorithm_t = 16;
#[doc = " gnutls_kx_algorithm_t:"]
#[doc = " @GNUTLS_KX_UNKNOWN: Unknown key-exchange algorithm."]
#[doc = " @GNUTLS_KX_RSA: RSA key-exchange algorithm."]
#[doc = " @GNUTLS_KX_DHE_DSS: DHE-DSS key-exchange algorithm."]
#[doc = " @GNUTLS_KX_DHE_RSA: DHE-RSA key-exchange algorithm."]
#[doc = " @GNUTLS_KX_ECDHE_RSA: ECDHE-RSA key-exchange algorithm."]
#[doc = " @GNUTLS_KX_ECDHE_ECDSA: ECDHE-ECDSA key-exchange algorithm."]
#[doc = " @GNUTLS_KX_ANON_DH: Anon-DH key-exchange algorithm."]
#[doc = " @GNUTLS_KX_ANON_ECDH: Anon-ECDH key-exchange algorithm."]
#[doc = " @GNUTLS_KX_SRP: SRP key-exchange algorithm."]
#[doc = " @GNUTLS_KX_RSA_EXPORT: RSA-EXPORT key-exchange algorithm (defunc)."]
#[doc = " @GNUTLS_KX_SRP_RSA: SRP-RSA key-exchange algorithm."]
#[doc = " @GNUTLS_KX_SRP_DSS: SRP-DSS key-exchange algorithm."]
#[doc = " @GNUTLS_KX_PSK: PSK key-exchange algorithm."]
#[doc = " @GNUTLS_KX_DHE_PSK: DHE-PSK key-exchange algorithm."]
#[doc = " @GNUTLS_KX_ECDHE_PSK: ECDHE-PSK key-exchange algorithm."]
#[doc = " @GNUTLS_KX_RSA_PSK: RSA-PSK key-exchange algorithm."]
#[doc = " @GNUTLS_KX_VKO_GOST_12: VKO GOST R 34.10-2012 key-exchange algorithm."]
#[doc = ""]
#[doc = " Enumeration of different key exchange algorithms."]
pub type gnutls_kx_algorithm_t = ::std::os::raw::c_uint;
pub const gnutls_params_type_t_GNUTLS_PARAMS_RSA_EXPORT: gnutls_params_type_t = 1;
pub const gnutls_params_type_t_GNUTLS_PARAMS_DH: gnutls_params_type_t = 2;
pub const gnutls_params_type_t_GNUTLS_PARAMS_ECDH: gnutls_params_type_t = 3;
#[doc = " gnutls_params_type_t:"]
#[doc = " @GNUTLS_PARAMS_RSA_EXPORT: Session RSA-EXPORT parameters (defunc)."]
#[doc = " @GNUTLS_PARAMS_DH: Session Diffie-Hellman parameters."]
#[doc = " @GNUTLS_PARAMS_ECDH: Session Elliptic-Curve Diffie-Hellman parameters."]
#[doc = ""]
#[doc = " Enumeration of different TLS session parameter types."]
pub type gnutls_params_type_t = ::std::os::raw::c_uint;
pub const gnutls_credentials_type_t_GNUTLS_CRD_CERTIFICATE: gnutls_credentials_type_t = 1;
pub const gnutls_credentials_type_t_GNUTLS_CRD_ANON: gnutls_credentials_type_t = 2;
pub const gnutls_credentials_type_t_GNUTLS_CRD_SRP: gnutls_credentials_type_t = 3;
pub const gnutls_credentials_type_t_GNUTLS_CRD_PSK: gnutls_credentials_type_t = 4;
pub const gnutls_credentials_type_t_GNUTLS_CRD_IA: gnutls_credentials_type_t = 5;
#[doc = " gnutls_credentials_type_t:"]
#[doc = " @GNUTLS_CRD_CERTIFICATE: Certificate credential."]
#[doc = " @GNUTLS_CRD_ANON: Anonymous credential."]
#[doc = " @GNUTLS_CRD_SRP: SRP credential."]
#[doc = " @GNUTLS_CRD_PSK: PSK credential."]
#[doc = " @GNUTLS_CRD_IA: IA credential."]
#[doc = ""]
#[doc = " Enumeration of different credential types."]
pub type gnutls_credentials_type_t = ::std::os::raw::c_uint;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_UNKNOWN: gnutls_mac_algorithm_t = 0;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_NULL: gnutls_mac_algorithm_t = 1;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_MD5: gnutls_mac_algorithm_t = 2;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA1: gnutls_mac_algorithm_t = 3;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_RMD160: gnutls_mac_algorithm_t = 4;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_MD2: gnutls_mac_algorithm_t = 5;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA256: gnutls_mac_algorithm_t = 6;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA384: gnutls_mac_algorithm_t = 7;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA512: gnutls_mac_algorithm_t = 8;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA224: gnutls_mac_algorithm_t = 9;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA3_224: gnutls_mac_algorithm_t = 10;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA3_256: gnutls_mac_algorithm_t = 11;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA3_384: gnutls_mac_algorithm_t = 12;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHA3_512: gnutls_mac_algorithm_t = 13;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_MD5_SHA1: gnutls_mac_algorithm_t = 14;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_GOSTR_94: gnutls_mac_algorithm_t = 15;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_STREEBOG_256: gnutls_mac_algorithm_t = 16;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_STREEBOG_512: gnutls_mac_algorithm_t = 17;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_AEAD: gnutls_mac_algorithm_t = 200;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_UMAC_96: gnutls_mac_algorithm_t = 201;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_UMAC_128: gnutls_mac_algorithm_t = 202;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_AES_CMAC_128: gnutls_mac_algorithm_t = 203;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_AES_CMAC_256: gnutls_mac_algorithm_t = 204;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_AES_GMAC_128: gnutls_mac_algorithm_t = 205;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_AES_GMAC_192: gnutls_mac_algorithm_t = 206;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_AES_GMAC_256: gnutls_mac_algorithm_t = 207;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_GOST28147_TC26Z_IMIT: gnutls_mac_algorithm_t = 208;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHAKE_128: gnutls_mac_algorithm_t = 209;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_SHAKE_256: gnutls_mac_algorithm_t = 210;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_MAGMA_OMAC: gnutls_mac_algorithm_t = 211;
pub const gnutls_mac_algorithm_t_GNUTLS_MAC_KUZNYECHIK_OMAC: gnutls_mac_algorithm_t = 212;
#[doc = " gnutls_mac_algorithm_t:"]
#[doc = " @GNUTLS_MAC_UNKNOWN: Unknown MAC algorithm."]
#[doc = " @GNUTLS_MAC_NULL: NULL MAC algorithm (empty output)."]
#[doc = " @GNUTLS_MAC_MD5: HMAC-MD5 algorithm."]
#[doc = " @GNUTLS_MAC_SHA1: HMAC-SHA-1 algorithm."]
#[doc = " @GNUTLS_MAC_RMD160: HMAC-RMD160 algorithm."]
#[doc = " @GNUTLS_MAC_MD2: HMAC-MD2 algorithm."]
#[doc = " @GNUTLS_MAC_SHA256: HMAC-SHA-256 algorithm."]
#[doc = " @GNUTLS_MAC_SHA384: HMAC-SHA-384 algorithm."]
#[doc = " @GNUTLS_MAC_SHA512: HMAC-SHA-512 algorithm."]
#[doc = " @GNUTLS_MAC_SHA224: HMAC-SHA-224 algorithm."]
#[doc = " @GNUTLS_MAC_MD5_SHA1: Combined MD5+SHA1 MAC placeholder."]
#[doc = " @GNUTLS_MAC_GOSTR_94: HMAC GOST R 34.11-94 algorithm."]
#[doc = " @GNUTLS_MAC_STREEBOG_256: HMAC GOST R 34.11-2001 (Streebog) algorithm, 256 bit."]
#[doc = " @GNUTLS_MAC_STREEBOG_512: HMAC GOST R 34.11-2001 (Streebog) algorithm, 512 bit."]
#[doc = " @GNUTLS_MAC_AEAD: MAC implicit through AEAD cipher."]
#[doc = " @GNUTLS_MAC_UMAC_96: The UMAC-96 MAC algorithm (requires nonce)."]
#[doc = " @GNUTLS_MAC_UMAC_128: The UMAC-128 MAC algorithm (requires nonce)."]
#[doc = " @GNUTLS_MAC_AES_CMAC_128: The AES-CMAC-128 MAC algorithm."]
#[doc = " @GNUTLS_MAC_AES_CMAC_256: The AES-CMAC-256 MAC algorithm."]
#[doc = " @GNUTLS_MAC_AES_GMAC_128: The AES-GMAC-128 MAC algorithm (requires nonce)."]
#[doc = " @GNUTLS_MAC_AES_GMAC_192: The AES-GMAC-192 MAC algorithm (requires nonce)."]
#[doc = " @GNUTLS_MAC_AES_GMAC_256: The AES-GMAC-256 MAC algorithm (requires nonce)."]
#[doc = " @GNUTLS_MAC_SHA3_224: Reserved; unimplemented."]
#[doc = " @GNUTLS_MAC_SHA3_256: Reserved; unimplemented."]
#[doc = " @GNUTLS_MAC_SHA3_384: Reserved; unimplemented."]
#[doc = " @GNUTLS_MAC_SHA3_512: Reserved; unimplemented."]
#[doc = " @GNUTLS_MAC_GOST28147_TC26Z_IMIT: The GOST 28147-89 working in IMIT mode with TC26 Z S-box."]
#[doc = " @GNUTLS_MAC_SHAKE_128: Reserved; unimplemented."]
#[doc = " @GNUTLS_MAC_SHAKE_256: Reserved; unimplemented."]
#[doc = " @GNUTLS_MAC_MAGMA_OMAC: GOST R 34.12-2015 (Magma) in OMAC (CMAC) mode."]
#[doc = " @GNUTLS_MAC_KUZNYECHIK_OMAC: GOST R 34.12-2015 (Kuznyechik) in OMAC (CMAC) mode."]
#[doc = ""]
#[doc = " Enumeration of different Message Authentication Code (MAC)"]
#[doc = " algorithms."]
pub type gnutls_mac_algorithm_t = ::std::os::raw::c_uint;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_UNKNOWN: gnutls_digest_algorithm_t = 0;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_NULL: gnutls_digest_algorithm_t = 1;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_MD5: gnutls_digest_algorithm_t = 2;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA1: gnutls_digest_algorithm_t = 3;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_RMD160: gnutls_digest_algorithm_t = 4;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_MD2: gnutls_digest_algorithm_t = 5;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA256: gnutls_digest_algorithm_t = 6;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA384: gnutls_digest_algorithm_t = 7;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA512: gnutls_digest_algorithm_t = 8;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA224: gnutls_digest_algorithm_t = 9;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA3_224: gnutls_digest_algorithm_t = 10;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA3_256: gnutls_digest_algorithm_t = 11;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA3_384: gnutls_digest_algorithm_t = 12;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHA3_512: gnutls_digest_algorithm_t = 13;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_MD5_SHA1: gnutls_digest_algorithm_t = 14;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_GOSTR_94: gnutls_digest_algorithm_t = 15;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_STREEBOG_256: gnutls_digest_algorithm_t = 16;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_STREEBOG_512: gnutls_digest_algorithm_t = 17;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHAKE_128: gnutls_digest_algorithm_t = 209;
pub const gnutls_digest_algorithm_t_GNUTLS_DIG_SHAKE_256: gnutls_digest_algorithm_t = 210;
#[doc = " gnutls_digest_algorithm_t:"]
#[doc = " @GNUTLS_DIG_UNKNOWN: Unknown hash algorithm."]
#[doc = " @GNUTLS_DIG_NULL: NULL hash algorithm (empty output)."]
#[doc = " @GNUTLS_DIG_MD5: MD5 algorithm."]
#[doc = " @GNUTLS_DIG_SHA1: SHA-1 algorithm."]
#[doc = " @GNUTLS_DIG_RMD160: RMD160 algorithm."]
#[doc = " @GNUTLS_DIG_MD2: MD2 algorithm."]
#[doc = " @GNUTLS_DIG_SHA256: SHA-256 algorithm."]
#[doc = " @GNUTLS_DIG_SHA384: SHA-384 algorithm."]
#[doc = " @GNUTLS_DIG_SHA512: SHA-512 algorithm."]
#[doc = " @GNUTLS_DIG_SHA224: SHA-224 algorithm."]
#[doc = " @GNUTLS_DIG_SHA3_224: SHA3-224 algorithm."]
#[doc = " @GNUTLS_DIG_SHA3_256: SHA3-256 algorithm."]
#[doc = " @GNUTLS_DIG_SHA3_384: SHA3-384 algorithm."]
#[doc = " @GNUTLS_DIG_SHA3_512: SHA3-512 algorithm."]
#[doc = " @GNUTLS_DIG_MD5_SHA1: Combined MD5+SHA1 algorithm."]
#[doc = " @GNUTLS_DIG_GOSTR_94: GOST R 34.11-94 algorithm."]
#[doc = " @GNUTLS_DIG_STREEBOG_256: GOST R 34.11-2001 (Streebog) algorithm, 256 bit."]
#[doc = " @GNUTLS_DIG_STREEBOG_512: GOST R 34.11-2001 (Streebog) algorithm, 512 bit."]
#[doc = " @GNUTLS_DIG_SHAKE_128: Reserved; unimplemented."]
#[doc = " @GNUTLS_DIG_SHAKE_256: Reserved; unimplemented."]
#[doc = ""]
#[doc = " Enumeration of different digest (hash) algorithms."]
pub type gnutls_digest_algorithm_t = ::std::os::raw::c_uint;
pub const gnutls_compression_method_t_GNUTLS_COMP_UNKNOWN: gnutls_compression_method_t = 0;
pub const gnutls_compression_method_t_GNUTLS_COMP_NULL: gnutls_compression_method_t = 1;
pub const gnutls_compression_method_t_GNUTLS_COMP_DEFLATE: gnutls_compression_method_t = 2;
pub const gnutls_compression_method_t_GNUTLS_COMP_ZLIB: gnutls_compression_method_t = 2;
#[doc = " gnutls_compression_method_t:"]
#[doc = " @GNUTLS_COMP_UNKNOWN: Unknown compression method."]
#[doc = " @GNUTLS_COMP_NULL: The NULL compression method (no compression)."]
#[doc = " @GNUTLS_COMP_DEFLATE: The DEFLATE compression method from zlib."]
#[doc = " @GNUTLS_COMP_ZLIB: Same as %GNUTLS_COMP_DEFLATE."]
#[doc = ""]
#[doc = " Enumeration of different TLS compression methods."]
pub type gnutls_compression_method_t = ::std::os::raw::c_uint;
pub const gnutls_init_flags_t_GNUTLS_SERVER: gnutls_init_flags_t = 1;
pub const gnutls_init_flags_t_GNUTLS_CLIENT: gnutls_init_flags_t = 2;
pub const gnutls_init_flags_t_GNUTLS_DATAGRAM: gnutls_init_flags_t = 4;
pub const gnutls_init_flags_t_GNUTLS_NONBLOCK: gnutls_init_flags_t = 8;
pub const gnutls_init_flags_t_GNUTLS_NO_EXTENSIONS: gnutls_init_flags_t = 16;
pub const gnutls_init_flags_t_GNUTLS_NO_REPLAY_PROTECTION: gnutls_init_flags_t = 32;
pub const gnutls_init_flags_t_GNUTLS_NO_SIGNAL: gnutls_init_flags_t = 64;
pub const gnutls_init_flags_t_GNUTLS_ALLOW_ID_CHANGE: gnutls_init_flags_t = 128;
pub const gnutls_init_flags_t_GNUTLS_ENABLE_FALSE_START: gnutls_init_flags_t = 256;
pub const gnutls_init_flags_t_GNUTLS_FORCE_CLIENT_CERT: gnutls_init_flags_t = 512;
pub const gnutls_init_flags_t_GNUTLS_NO_TICKETS: gnutls_init_flags_t = 1024;
pub const gnutls_init_flags_t_GNUTLS_KEY_SHARE_TOP: gnutls_init_flags_t = 2048;
pub const gnutls_init_flags_t_GNUTLS_KEY_SHARE_TOP2: gnutls_init_flags_t = 4096;
pub const gnutls_init_flags_t_GNUTLS_KEY_SHARE_TOP3: gnutls_init_flags_t = 8192;
pub const gnutls_init_flags_t_GNUTLS_POST_HANDSHAKE_AUTH: gnutls_init_flags_t = 16384;
pub const gnutls_init_flags_t_GNUTLS_NO_AUTO_REKEY: gnutls_init_flags_t = 32768;
pub const gnutls_init_flags_t_GNUTLS_SAFE_PADDING_CHECK: gnutls_init_flags_t = 65536;
pub const gnutls_init_flags_t_GNUTLS_ENABLE_EARLY_START: gnutls_init_flags_t = 131072;
pub const gnutls_init_flags_t_GNUTLS_ENABLE_RAWPK: gnutls_init_flags_t = 262144;
pub const gnutls_init_flags_t_GNUTLS_AUTO_REAUTH: gnutls_init_flags_t = 524288;
pub const gnutls_init_flags_t_GNUTLS_ENABLE_EARLY_DATA: gnutls_init_flags_t = 1048576;
pub const gnutls_init_flags_t_GNUTLS_NO_AUTO_SEND_TICKET: gnutls_init_flags_t = 2097152;
pub const gnutls_init_flags_t_GNUTLS_NO_END_OF_EARLY_DATA: gnutls_init_flags_t = 4194304;
#[doc = " gnutls_init_flags_t:"]
#[doc = ""]
#[doc = " @GNUTLS_SERVER: Connection end is a server."]
#[doc = " @GNUTLS_CLIENT: Connection end is a client."]
#[doc = " @GNUTLS_DATAGRAM: Connection is datagram oriented (DTLS). Since 3.0.0."]
#[doc = " @GNUTLS_NONBLOCK: Connection should not block. Since 3.0.0."]
#[doc = " @GNUTLS_NO_SIGNAL: In systems where SIGPIPE is delivered on send, it will be disabled. That flag has effect in systems which support the MSG_NOSIGNAL sockets flag (since 3.4.2)."]
#[doc = " @GNUTLS_NO_EXTENSIONS: Do not enable any TLS extensions by default (since 3.1.2). As TLS 1.2 and later require extensions this option is considered obsolete and should not be used."]
#[doc = " @GNUTLS_NO_REPLAY_PROTECTION: Disable any replay protection in DTLS. This must only be used if  replay protection is achieved using other means. Since 3.2.2."]
#[doc = " @GNUTLS_ALLOW_ID_CHANGE: Allow the peer to replace its certificate, or change its ID during a rehandshake. This change is often used in attacks and thus prohibited by default. Since 3.5.0."]
#[doc = " @GNUTLS_ENABLE_FALSE_START: Enable the TLS false start on client side if the negotiated ciphersuites allow it. This will enable sending data prior to the handshake being complete, and may introduce a risk of crypto failure when combined with certain key exchanged; for that GnuTLS may not enable that option in ciphersuites that are known to be not safe for false start. Since 3.5.0."]
#[doc = " @GNUTLS_ENABLE_EARLY_START: Under TLS1.3 allow the server to return earlier than the full handshake"]
#[doc = "   finish; similarly to false start the handshake will be completed once data are received by the"]
#[doc = "   client, while the server is able to transmit sooner. This is not enabled by default as it could"]
#[doc = "   break certain existing server assumptions and use-cases. Since 3.6.4."]
#[doc = " @GNUTLS_ENABLE_EARLY_DATA: Under TLS1.3 allow the server to receive early data sent as part of the initial ClientHello (0-RTT)."]
#[doc = "   This can also be used to explicitly indicate that the client will send early data."]
#[doc = "   This is not enabled by default as early data has weaker security properties than other data. Since 3.6.5."]
#[doc = " @GNUTLS_FORCE_CLIENT_CERT: When in client side and only a single cert is specified, send that certificate irrespective of the issuers expected by the server. Since 3.5.0."]
#[doc = " @GNUTLS_NO_TICKETS: Flag to indicate that the session should not use resumption with session tickets."]
#[doc = " @GNUTLS_KEY_SHARE_TOP3: Generate key shares for the top-3 different groups which are enabled."]
#[doc = "   That is, as each group is associated with a key type (EC, finite field, x25519), generate"]
#[doc = "   three keys using %GNUTLS_PK_DH, %GNUTLS_PK_EC, %GNUTLS_PK_ECDH_X25519 if all of them are enabled."]
#[doc = " @GNUTLS_KEY_SHARE_TOP2: Generate key shares for the top-2 different groups which are enabled."]
#[doc = "   For example (ECDH + x25519). This is the default."]
#[doc = " @GNUTLS_KEY_SHARE_TOP: Generate key share for the first group which is enabled."]
#[doc = "   For example x25519. This option is the most performant for client (less CPU spent"]
#[doc = "   generating keys), but if the server doesn't support the advertized option it may"]
#[doc = "   result to more roundtrips needed to discover the server's choice."]
#[doc = " @GNUTLS_NO_AUTO_REKEY: Disable auto-rekeying under TLS1.3. If this option is not specified"]
#[doc = "   gnutls will force a rekey after 2^24 records have been sent."]
#[doc = " @GNUTLS_POST_HANDSHAKE_AUTH: Enable post handshake authentication for server and client. When set and"]
#[doc = "   a server requests authentication after handshake %GNUTLS_E_REAUTH_REQUEST will be returned"]
#[doc = "   by gnutls_record_recv(). A client should then call gnutls_reauth() to re-authenticate."]
#[doc = " @GNUTLS_SAFE_PADDING_CHECK: Flag to indicate that the TLS 1.3 padding check will be done in a"]
#[doc = "   safe way which doesn't leak the pad size based on GnuTLS processing time. This is of use to"]
#[doc = "   applications which hide the length of transferred data via the TLS1.3 padding mechanism and"]
#[doc = "   are already taking steps to hide the data processing time. This comes at a performance"]
#[doc = "   penalty."]
#[doc = " @GNUTLS_AUTO_REAUTH: Enable transparent re-authentication in client side when the server"]
#[doc = "    requests to. That is, reauthentication is handled within gnutls_record_recv(), and"]
#[doc = "    the %GNUTLS_E_REHANDSHAKE or %GNUTLS_E_REAUTH_REQUEST are not returned. This must be"]
#[doc = "    enabled with %GNUTLS_POST_HANDSHAKE_AUTH for TLS1.3. Enabling this flag requires to restore"]
#[doc = "    interrupted calls to gnutls_record_recv() based on the output of gnutls_record_get_direction(),"]
#[doc = "    since gnutls_record_recv() could be interrupted when sending when this flag is enabled."]
#[doc = "    Note this flag may not be used if you are using the same session for sending and receiving"]
#[doc = "    in different threads."]
#[doc = " @GNUTLS_ENABLE_RAWPK: Allows raw public-keys to be negotiated during the handshake. Since 3.6.6."]
#[doc = " @GNUTLS_NO_AUTO_SEND_TICKET: Under TLS1.3 disable auto-sending of"]
#[doc = "    session tickets during the handshake."]
#[doc = " @GNUTLS_NO_END_OF_EARLY_DATA: Under TLS1.3 suppress sending EndOfEarlyData message. Since 3.7.2."]
#[doc = ""]
#[doc = " Enumeration of different flags for gnutls_init() function. All the flags"]
#[doc = " can be combined except @GNUTLS_SERVER and @GNUTLS_CLIENT which are mutually"]
#[doc = " exclusive."]
#[doc = ""]
#[doc = " The key share options relate to the TLS 1.3 key share extension"]
#[doc = " which is a speculative key generation expecting that the server"]
#[doc = " would support the generated key."]
pub type gnutls_init_flags_t = ::std::os::raw::c_uint;
pub const gnutls_alert_level_t_GNUTLS_AL_WARNING: gnutls_alert_level_t = 1;
pub const gnutls_alert_level_t_GNUTLS_AL_FATAL: gnutls_alert_level_t = 2;
#[doc = " gnutls_alert_level_t:"]
#[doc = " @GNUTLS_AL_WARNING: Alert of warning severity."]
#[doc = " @GNUTLS_AL_FATAL: Alert of fatal severity."]
#[doc = ""]
#[doc = " Enumeration of different TLS alert severities."]
pub type gnutls_alert_level_t = ::std::os::raw::c_uint;
pub const gnutls_alert_description_t_GNUTLS_A_CLOSE_NOTIFY: gnutls_alert_description_t = 0;
pub const gnutls_alert_description_t_GNUTLS_A_UNEXPECTED_MESSAGE: gnutls_alert_description_t = 10;
pub const gnutls_alert_description_t_GNUTLS_A_BAD_RECORD_MAC: gnutls_alert_description_t = 20;
pub const gnutls_alert_description_t_GNUTLS_A_DECRYPTION_FAILED: gnutls_alert_description_t = 21;
pub const gnutls_alert_description_t_GNUTLS_A_RECORD_OVERFLOW: gnutls_alert_description_t = 22;
pub const gnutls_alert_description_t_GNUTLS_A_DECOMPRESSION_FAILURE: gnutls_alert_description_t =
    30;
pub const gnutls_alert_description_t_GNUTLS_A_HANDSHAKE_FAILURE: gnutls_alert_description_t = 40;
pub const gnutls_alert_description_t_GNUTLS_A_SSL3_NO_CERTIFICATE: gnutls_alert_description_t = 41;
pub const gnutls_alert_description_t_GNUTLS_A_BAD_CERTIFICATE: gnutls_alert_description_t = 42;
pub const gnutls_alert_description_t_GNUTLS_A_UNSUPPORTED_CERTIFICATE: gnutls_alert_description_t =
    43;
pub const gnutls_alert_description_t_GNUTLS_A_CERTIFICATE_REVOKED: gnutls_alert_description_t = 44;
pub const gnutls_alert_description_t_GNUTLS_A_CERTIFICATE_EXPIRED: gnutls_alert_description_t = 45;
pub const gnutls_alert_description_t_GNUTLS_A_CERTIFICATE_UNKNOWN: gnutls_alert_description_t = 46;
pub const gnutls_alert_description_t_GNUTLS_A_ILLEGAL_PARAMETER: gnutls_alert_description_t = 47;
pub const gnutls_alert_description_t_GNUTLS_A_UNKNOWN_CA: gnutls_alert_description_t = 48;
pub const gnutls_alert_description_t_GNUTLS_A_ACCESS_DENIED: gnutls_alert_description_t = 49;
pub const gnutls_alert_description_t_GNUTLS_A_DECODE_ERROR: gnutls_alert_description_t = 50;
pub const gnutls_alert_description_t_GNUTLS_A_DECRYPT_ERROR: gnutls_alert_description_t = 51;
pub const gnutls_alert_description_t_GNUTLS_A_EXPORT_RESTRICTION: gnutls_alert_description_t = 60;
pub const gnutls_alert_description_t_GNUTLS_A_PROTOCOL_VERSION: gnutls_alert_description_t = 70;
pub const gnutls_alert_description_t_GNUTLS_A_INSUFFICIENT_SECURITY: gnutls_alert_description_t =
    71;
pub const gnutls_alert_description_t_GNUTLS_A_INTERNAL_ERROR: gnutls_alert_description_t = 80;
pub const gnutls_alert_description_t_GNUTLS_A_INAPPROPRIATE_FALLBACK: gnutls_alert_description_t =
    86;
pub const gnutls_alert_description_t_GNUTLS_A_USER_CANCELED: gnutls_alert_description_t = 90;
pub const gnutls_alert_description_t_GNUTLS_A_NO_RENEGOTIATION: gnutls_alert_description_t = 100;
pub const gnutls_alert_description_t_GNUTLS_A_MISSING_EXTENSION: gnutls_alert_description_t = 109;
pub const gnutls_alert_description_t_GNUTLS_A_UNSUPPORTED_EXTENSION: gnutls_alert_description_t =
    110;
pub const gnutls_alert_description_t_GNUTLS_A_CERTIFICATE_UNOBTAINABLE: gnutls_alert_description_t =
    111;
pub const gnutls_alert_description_t_GNUTLS_A_UNRECOGNIZED_NAME: gnutls_alert_description_t = 112;
pub const gnutls_alert_description_t_GNUTLS_A_UNKNOWN_PSK_IDENTITY: gnutls_alert_description_t =
    115;
pub const gnutls_alert_description_t_GNUTLS_A_CERTIFICATE_REQUIRED: gnutls_alert_description_t =
    116;
pub const gnutls_alert_description_t_GNUTLS_A_NO_APPLICATION_PROTOCOL: gnutls_alert_description_t =
    120;
pub const gnutls_alert_description_t_GNUTLS_A_MAX: gnutls_alert_description_t = 120;
#[doc = " gnutls_alert_description_t:"]
#[doc = " @GNUTLS_A_CLOSE_NOTIFY: Close notify."]
#[doc = " @GNUTLS_A_UNEXPECTED_MESSAGE: Unexpected message."]
#[doc = " @GNUTLS_A_BAD_RECORD_MAC: Bad record MAC."]
#[doc = " @GNUTLS_A_DECRYPTION_FAILED: Decryption failed."]
#[doc = " @GNUTLS_A_RECORD_OVERFLOW: Record overflow."]
#[doc = " @GNUTLS_A_DECOMPRESSION_FAILURE: Decompression failed."]
#[doc = " @GNUTLS_A_HANDSHAKE_FAILURE: Handshake failed."]
#[doc = " @GNUTLS_A_SSL3_NO_CERTIFICATE: No certificate."]
#[doc = " @GNUTLS_A_BAD_CERTIFICATE: Certificate is bad."]
#[doc = " @GNUTLS_A_UNSUPPORTED_CERTIFICATE: Certificate is not supported."]
#[doc = " @GNUTLS_A_CERTIFICATE_REVOKED: Certificate was revoked."]
#[doc = " @GNUTLS_A_CERTIFICATE_EXPIRED: Certificate is expired."]
#[doc = " @GNUTLS_A_CERTIFICATE_UNKNOWN: Unknown certificate."]
#[doc = " @GNUTLS_A_ILLEGAL_PARAMETER: Illegal parameter."]
#[doc = " @GNUTLS_A_UNKNOWN_CA: CA is unknown."]
#[doc = " @GNUTLS_A_ACCESS_DENIED: Access was denied."]
#[doc = " @GNUTLS_A_DECODE_ERROR: Decode error."]
#[doc = " @GNUTLS_A_DECRYPT_ERROR: Decrypt error."]
#[doc = " @GNUTLS_A_EXPORT_RESTRICTION: Export restriction."]
#[doc = " @GNUTLS_A_PROTOCOL_VERSION: Error in protocol version."]
#[doc = " @GNUTLS_A_INSUFFICIENT_SECURITY: Insufficient security."]
#[doc = " @GNUTLS_A_INTERNAL_ERROR: Internal error."]
#[doc = " @GNUTLS_A_INAPPROPRIATE_FALLBACK: Inappropriate fallback,"]
#[doc = " @GNUTLS_A_USER_CANCELED: User canceled."]
#[doc = " @GNUTLS_A_NO_RENEGOTIATION: No renegotiation is allowed."]
#[doc = " @GNUTLS_A_MISSING_EXTENSION: An extension was expected but was not seen"]
#[doc = " @GNUTLS_A_UNSUPPORTED_EXTENSION: An unsupported extension was"]
#[doc = "   sent."]
#[doc = " @GNUTLS_A_CERTIFICATE_UNOBTAINABLE: Could not retrieve the"]
#[doc = "   specified certificate."]
#[doc = " @GNUTLS_A_UNRECOGNIZED_NAME: The server name sent was not"]
#[doc = "   recognized."]
#[doc = " @GNUTLS_A_UNKNOWN_PSK_IDENTITY: The SRP/PSK username is missing"]
#[doc = "   or not known."]
#[doc = " @GNUTLS_A_CERTIFICATE_REQUIRED: Certificate is required."]
#[doc = " @GNUTLS_A_NO_APPLICATION_PROTOCOL: The ALPN protocol requested is"]
#[doc = "   not supported by the peer."]
#[doc = ""]
#[doc = " Enumeration of different TLS alerts."]
pub type gnutls_alert_description_t = ::std::os::raw::c_uint;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_HELLO_REQUEST:
    gnutls_handshake_description_t = 0;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CLIENT_HELLO:
    gnutls_handshake_description_t = 1;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_SERVER_HELLO:
    gnutls_handshake_description_t = 2;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_HELLO_VERIFY_REQUEST:
    gnutls_handshake_description_t = 3;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_NEW_SESSION_TICKET:
    gnutls_handshake_description_t = 4;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_END_OF_EARLY_DATA:
    gnutls_handshake_description_t = 5;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_ENCRYPTED_EXTENSIONS:
    gnutls_handshake_description_t = 8;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CERTIFICATE_PKT:
    gnutls_handshake_description_t = 11;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE:
    gnutls_handshake_description_t = 12;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST:
    gnutls_handshake_description_t = 13;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_SERVER_HELLO_DONE:
    gnutls_handshake_description_t = 14;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY:
    gnutls_handshake_description_t = 15;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE:
    gnutls_handshake_description_t = 16;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_FINISHED: gnutls_handshake_description_t =
    20;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CERTIFICATE_STATUS:
    gnutls_handshake_description_t = 22;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_SUPPLEMENTAL:
    gnutls_handshake_description_t = 23;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_KEY_UPDATE:
    gnutls_handshake_description_t = 24;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CHANGE_CIPHER_SPEC:
    gnutls_handshake_description_t = 254;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_CLIENT_HELLO_V2:
    gnutls_handshake_description_t = 1024;
pub const gnutls_handshake_description_t_GNUTLS_HANDSHAKE_HELLO_RETRY_REQUEST:
    gnutls_handshake_description_t = 1025;
#[doc = " gnutls_handshake_description_t:"]
#[doc = " @GNUTLS_HANDSHAKE_HELLO_REQUEST: Hello request."]
#[doc = " @GNUTLS_HANDSHAKE_HELLO_VERIFY_REQUEST: DTLS Hello verify request."]
#[doc = " @GNUTLS_HANDSHAKE_CLIENT_HELLO: Client hello."]
#[doc = " @GNUTLS_HANDSHAKE_SERVER_HELLO: Server hello."]
#[doc = " @GNUTLS_HANDSHAKE_END_OF_EARLY_DATA: End of early data."]
#[doc = " @GNUTLS_HANDSHAKE_HELLO_RETRY_REQUEST: Hello retry request."]
#[doc = " @GNUTLS_HANDSHAKE_NEW_SESSION_TICKET: New session ticket."]
#[doc = " @GNUTLS_HANDSHAKE_CERTIFICATE_PKT: Certificate packet."]
#[doc = " @GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE: Server key exchange."]
#[doc = " @GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST: Certificate request."]
#[doc = " @GNUTLS_HANDSHAKE_SERVER_HELLO_DONE: Server hello done."]
#[doc = " @GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY: Certificate verify."]
#[doc = " @GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE: Client key exchange."]
#[doc = " @GNUTLS_HANDSHAKE_FINISHED: Finished."]
#[doc = " @GNUTLS_HANDSHAKE_CERTIFICATE_STATUS: Certificate status (OCSP)."]
#[doc = " @GNUTLS_HANDSHAKE_KEY_UPDATE: TLS1.3 key update message."]
#[doc = " @GNUTLS_HANDSHAKE_SUPPLEMENTAL: Supplemental."]
#[doc = " @GNUTLS_HANDSHAKE_CHANGE_CIPHER_SPEC: Change Cipher Spec."]
#[doc = " @GNUTLS_HANDSHAKE_CLIENT_HELLO_V2: SSLv2 Client Hello."]
#[doc = " @GNUTLS_HANDSHAKE_ENCRYPTED_EXTENSIONS: Encrypted extensions message."]
#[doc = ""]
#[doc = " Enumeration of different TLS handshake packets."]
pub type gnutls_handshake_description_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_handshake_description_get_name(
        type_: gnutls_handshake_description_t,
    ) -> *const ::std::os::raw::c_char;
}
pub const gnutls_certificate_status_t_GNUTLS_CERT_INVALID: gnutls_certificate_status_t = 2;
pub const gnutls_certificate_status_t_GNUTLS_CERT_REVOKED: gnutls_certificate_status_t = 32;
pub const gnutls_certificate_status_t_GNUTLS_CERT_SIGNER_NOT_FOUND: gnutls_certificate_status_t =
    64;
pub const gnutls_certificate_status_t_GNUTLS_CERT_SIGNER_NOT_CA: gnutls_certificate_status_t = 128;
pub const gnutls_certificate_status_t_GNUTLS_CERT_INSECURE_ALGORITHM: gnutls_certificate_status_t =
    256;
pub const gnutls_certificate_status_t_GNUTLS_CERT_NOT_ACTIVATED: gnutls_certificate_status_t = 512;
pub const gnutls_certificate_status_t_GNUTLS_CERT_EXPIRED: gnutls_certificate_status_t = 1024;
pub const gnutls_certificate_status_t_GNUTLS_CERT_SIGNATURE_FAILURE: gnutls_certificate_status_t =
    2048;
pub const gnutls_certificate_status_t_GNUTLS_CERT_REVOCATION_DATA_SUPERSEDED:
    gnutls_certificate_status_t = 4096;
pub const gnutls_certificate_status_t_GNUTLS_CERT_UNEXPECTED_OWNER: gnutls_certificate_status_t =
    16384;
pub const gnutls_certificate_status_t_GNUTLS_CERT_REVOCATION_DATA_ISSUED_IN_FUTURE:
    gnutls_certificate_status_t = 32768;
pub const gnutls_certificate_status_t_GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE:
    gnutls_certificate_status_t = 65536;
pub const gnutls_certificate_status_t_GNUTLS_CERT_MISMATCH: gnutls_certificate_status_t = 131072;
pub const gnutls_certificate_status_t_GNUTLS_CERT_PURPOSE_MISMATCH: gnutls_certificate_status_t =
    262144;
pub const gnutls_certificate_status_t_GNUTLS_CERT_MISSING_OCSP_STATUS: gnutls_certificate_status_t =
    524288;
pub const gnutls_certificate_status_t_GNUTLS_CERT_INVALID_OCSP_STATUS: gnutls_certificate_status_t =
    1048576;
pub const gnutls_certificate_status_t_GNUTLS_CERT_UNKNOWN_CRIT_EXTENSIONS:
    gnutls_certificate_status_t = 2097152;
#[doc = " gnutls_certificate_status_t:"]
#[doc = " @GNUTLS_CERT_INVALID: The certificate is not signed by one of the"]
#[doc = "   known authorities or the signature is invalid (deprecated by the flags"]
#[doc = "   %GNUTLS_CERT_SIGNATURE_FAILURE and %GNUTLS_CERT_SIGNER_NOT_FOUND)."]
#[doc = " @GNUTLS_CERT_SIGNATURE_FAILURE: The signature verification failed."]
#[doc = " @GNUTLS_CERT_REVOKED: Certificate is revoked by its authority.  In X.509 this will be"]
#[doc = "   set only if CRLs are checked."]
#[doc = " @GNUTLS_CERT_SIGNER_NOT_FOUND: The certificate's issuer is not known."]
#[doc = "   This is the case if the issuer is not included in the trusted certificate list."]
#[doc = " @GNUTLS_CERT_SIGNER_NOT_CA: The certificate's signer was not a CA. This"]
#[doc = "   may happen if this was a version 1 certificate, which is common with"]
#[doc = "   some CAs, or a version 3 certificate without the basic constrains extension."]
#[doc = " @GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE: The certificate's signer constraints were"]
#[doc = "   violated."]
#[doc = " @GNUTLS_CERT_INSECURE_ALGORITHM:  The certificate was signed using an insecure"]
#[doc = "   algorithm such as MD2 or MD5. These algorithms have been broken and"]
#[doc = "   should not be trusted."]
#[doc = " @GNUTLS_CERT_NOT_ACTIVATED: The certificate is not yet activated."]
#[doc = " @GNUTLS_CERT_EXPIRED: The certificate has expired."]
#[doc = " @GNUTLS_CERT_REVOCATION_DATA_SUPERSEDED: The revocation data are old and have been superseded."]
#[doc = " @GNUTLS_CERT_REVOCATION_DATA_ISSUED_IN_FUTURE: The revocation data have a future issue date."]
#[doc = " @GNUTLS_CERT_UNEXPECTED_OWNER: The owner is not the expected one."]
#[doc = " @GNUTLS_CERT_MISMATCH: The certificate presented isn't the expected one (TOFU)"]
#[doc = " @GNUTLS_CERT_PURPOSE_MISMATCH: The certificate or an intermediate does not match the intended purpose (extended key usage)."]
#[doc = " @GNUTLS_CERT_MISSING_OCSP_STATUS: The certificate requires the server to send the certifiate status, but no status was received."]
#[doc = " @GNUTLS_CERT_INVALID_OCSP_STATUS: The received OCSP status response is invalid."]
#[doc = " @GNUTLS_CERT_UNKNOWN_CRIT_EXTENSIONS: The certificate has extensions marked as critical which are not supported."]
#[doc = ""]
#[doc = " Enumeration of certificate status codes.  Note that the status"]
#[doc = " bits may have different meanings in OpenPGP keys and X.509"]
#[doc = " certificate verification."]
pub type gnutls_certificate_status_t = ::std::os::raw::c_uint;
pub const gnutls_certificate_request_t_GNUTLS_CERT_IGNORE: gnutls_certificate_request_t = 0;
pub const gnutls_certificate_request_t_GNUTLS_CERT_REQUEST: gnutls_certificate_request_t = 1;
pub const gnutls_certificate_request_t_GNUTLS_CERT_REQUIRE: gnutls_certificate_request_t = 2;
#[doc = " gnutls_certificate_request_t:"]
#[doc = " @GNUTLS_CERT_IGNORE: Ignore certificate."]
#[doc = " @GNUTLS_CERT_REQUEST: Request certificate."]
#[doc = " @GNUTLS_CERT_REQUIRE: Require certificate."]
#[doc = ""]
#[doc = " Enumeration of certificate request types."]
pub type gnutls_certificate_request_t = ::std::os::raw::c_uint;
pub const gnutls_openpgp_crt_status_t_GNUTLS_OPENPGP_CERT: gnutls_openpgp_crt_status_t = 0;
pub const gnutls_openpgp_crt_status_t_GNUTLS_OPENPGP_CERT_FINGERPRINT: gnutls_openpgp_crt_status_t =
    1;
#[doc = " gnutls_openpgp_crt_status_t:"]
#[doc = " @GNUTLS_OPENPGP_CERT: Send entire certificate."]
#[doc = " @GNUTLS_OPENPGP_CERT_FINGERPRINT: Send only certificate fingerprint."]
#[doc = ""]
#[doc = " Enumeration of ways to send OpenPGP certificate."]
pub type gnutls_openpgp_crt_status_t = ::std::os::raw::c_uint;
pub const gnutls_close_request_t_GNUTLS_SHUT_RDWR: gnutls_close_request_t = 0;
pub const gnutls_close_request_t_GNUTLS_SHUT_WR: gnutls_close_request_t = 1;
#[doc = " gnutls_close_request_t:"]
#[doc = " @GNUTLS_SHUT_RDWR: Disallow further receives/sends."]
#[doc = " @GNUTLS_SHUT_WR: Disallow further sends."]
#[doc = ""]
#[doc = " Enumeration of how TLS session should be terminated.  See gnutls_bye()."]
pub type gnutls_close_request_t = ::std::os::raw::c_uint;
pub const gnutls_protocol_t_GNUTLS_SSL3: gnutls_protocol_t = 1;
pub const gnutls_protocol_t_GNUTLS_TLS1_0: gnutls_protocol_t = 2;
pub const gnutls_protocol_t_GNUTLS_TLS1: gnutls_protocol_t = 2;
pub const gnutls_protocol_t_GNUTLS_TLS1_1: gnutls_protocol_t = 3;
pub const gnutls_protocol_t_GNUTLS_TLS1_2: gnutls_protocol_t = 4;
pub const gnutls_protocol_t_GNUTLS_TLS1_3: gnutls_protocol_t = 5;
pub const gnutls_protocol_t_GNUTLS_DTLS0_9: gnutls_protocol_t = 200;
pub const gnutls_protocol_t_GNUTLS_DTLS1_0: gnutls_protocol_t = 201;
pub const gnutls_protocol_t_GNUTLS_DTLS1_2: gnutls_protocol_t = 202;
pub const gnutls_protocol_t_GNUTLS_DTLS_VERSION_MIN: gnutls_protocol_t = 200;
pub const gnutls_protocol_t_GNUTLS_DTLS_VERSION_MAX: gnutls_protocol_t = 202;
pub const gnutls_protocol_t_GNUTLS_TLS_VERSION_MAX: gnutls_protocol_t = 5;
pub const gnutls_protocol_t_GNUTLS_VERSION_UNKNOWN: gnutls_protocol_t = 255;
#[doc = " gnutls_protocol_t:"]
#[doc = " @GNUTLS_SSL3: SSL version 3.0."]
#[doc = " @GNUTLS_TLS1_0: TLS version 1.0."]
#[doc = " @GNUTLS_TLS1: Same as %GNUTLS_TLS1_0."]
#[doc = " @GNUTLS_TLS1_1: TLS version 1.1."]
#[doc = " @GNUTLS_TLS1_2: TLS version 1.2."]
#[doc = " @GNUTLS_TLS1_3: TLS version 1.3."]
#[doc = " @GNUTLS_DTLS1_0: DTLS version 1.0."]
#[doc = " @GNUTLS_DTLS1_2: DTLS version 1.2."]
#[doc = " @GNUTLS_DTLS0_9: DTLS version 0.9 (Cisco AnyConnect / OpenSSL 0.9.8e)."]
#[doc = " @GNUTLS_TLS_VERSION_MAX: Maps to the highest supported TLS version."]
#[doc = " @GNUTLS_DTLS_VERSION_MAX: Maps to the highest supported DTLS version."]
#[doc = " @GNUTLS_VERSION_UNKNOWN: Unknown SSL/TLS version."]
#[doc = ""]
#[doc = " Enumeration of different SSL/TLS protocol versions."]
pub type gnutls_protocol_t = ::std::os::raw::c_uint;
pub const gnutls_certificate_type_t_GNUTLS_CRT_UNKNOWN: gnutls_certificate_type_t = 0;
pub const gnutls_certificate_type_t_GNUTLS_CRT_X509: gnutls_certificate_type_t = 1;
pub const gnutls_certificate_type_t_GNUTLS_CRT_OPENPGP: gnutls_certificate_type_t = 2;
pub const gnutls_certificate_type_t_GNUTLS_CRT_RAWPK: gnutls_certificate_type_t = 3;
pub const gnutls_certificate_type_t_GNUTLS_CRT_MAX: gnutls_certificate_type_t = 3;
#[doc = " gnutls_certificate_type_t:"]
#[doc = " @GNUTLS_CRT_UNKNOWN: Unknown certificate type."]
#[doc = " @GNUTLS_CRT_X509: X.509 Certificate."]
#[doc = " @GNUTLS_CRT_OPENPGP: OpenPGP certificate."]
#[doc = " @GNUTLS_CRT_RAWPK: Raw public-key (SubjectPublicKeyInfo)"]
#[doc = ""]
#[doc = " Enumeration of different certificate types."]
pub type gnutls_certificate_type_t = ::std::os::raw::c_uint;
pub const gnutls_x509_crt_fmt_t_GNUTLS_X509_FMT_DER: gnutls_x509_crt_fmt_t = 0;
pub const gnutls_x509_crt_fmt_t_GNUTLS_X509_FMT_PEM: gnutls_x509_crt_fmt_t = 1;
#[doc = " gnutls_x509_crt_fmt_t:"]
#[doc = " @GNUTLS_X509_FMT_DER: X.509 certificate in DER format (binary)."]
#[doc = " @GNUTLS_X509_FMT_PEM: X.509 certificate in PEM format (text)."]
#[doc = ""]
#[doc = " Enumeration of different certificate encoding formats."]
pub type gnutls_x509_crt_fmt_t = ::std::os::raw::c_uint;
pub const gnutls_certificate_print_formats_GNUTLS_CRT_PRINT_FULL: gnutls_certificate_print_formats =
    0;
pub const gnutls_certificate_print_formats_GNUTLS_CRT_PRINT_ONELINE:
    gnutls_certificate_print_formats = 1;
pub const gnutls_certificate_print_formats_GNUTLS_CRT_PRINT_UNSIGNED_FULL:
    gnutls_certificate_print_formats = 2;
pub const gnutls_certificate_print_formats_GNUTLS_CRT_PRINT_COMPACT:
    gnutls_certificate_print_formats = 3;
pub const gnutls_certificate_print_formats_GNUTLS_CRT_PRINT_FULL_NUMBERS:
    gnutls_certificate_print_formats = 4;
#[doc = " gnutls_certificate_print_formats_t:"]
#[doc = " @GNUTLS_CRT_PRINT_FULL: Full information about certificate."]
#[doc = " @GNUTLS_CRT_PRINT_FULL_NUMBERS: Full information about certificate and include easy to parse public key parameters."]
#[doc = " @GNUTLS_CRT_PRINT_COMPACT: Information about certificate name in one line, plus identification of the public key."]
#[doc = " @GNUTLS_CRT_PRINT_ONELINE: Information about certificate in one line."]
#[doc = " @GNUTLS_CRT_PRINT_UNSIGNED_FULL: All info for an unsigned certificate."]
#[doc = ""]
#[doc = " Enumeration of different certificate printing variants."]
pub type gnutls_certificate_print_formats = ::std::os::raw::c_uint;
#[doc = " gnutls_certificate_print_formats_t:"]
#[doc = " @GNUTLS_CRT_PRINT_FULL: Full information about certificate."]
#[doc = " @GNUTLS_CRT_PRINT_FULL_NUMBERS: Full information about certificate and include easy to parse public key parameters."]
#[doc = " @GNUTLS_CRT_PRINT_COMPACT: Information about certificate name in one line, plus identification of the public key."]
#[doc = " @GNUTLS_CRT_PRINT_ONELINE: Information about certificate in one line."]
#[doc = " @GNUTLS_CRT_PRINT_UNSIGNED_FULL: All info for an unsigned certificate."]
#[doc = ""]
#[doc = " Enumeration of different certificate printing variants."]
pub use self::gnutls_certificate_print_formats as gnutls_certificate_print_formats_t;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_UNKNOWN: gnutls_pk_algorithm_t = 0;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_RSA: gnutls_pk_algorithm_t = 1;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_DSA: gnutls_pk_algorithm_t = 2;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_DH: gnutls_pk_algorithm_t = 3;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_ECDSA: gnutls_pk_algorithm_t = 4;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_ECDH_X25519: gnutls_pk_algorithm_t = 5;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_RSA_PSS: gnutls_pk_algorithm_t = 6;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_EDDSA_ED25519: gnutls_pk_algorithm_t = 7;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_GOST_01: gnutls_pk_algorithm_t = 8;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_GOST_12_256: gnutls_pk_algorithm_t = 9;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_GOST_12_512: gnutls_pk_algorithm_t = 10;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_ECDH_X448: gnutls_pk_algorithm_t = 11;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_EDDSA_ED448: gnutls_pk_algorithm_t = 12;
pub const gnutls_pk_algorithm_t_GNUTLS_PK_MAX: gnutls_pk_algorithm_t = 12;
#[doc = " gnutls_pk_algorithm_t:"]
#[doc = " @GNUTLS_PK_UNKNOWN: Unknown public-key algorithm."]
#[doc = " @GNUTLS_PK_RSA: RSA public-key algorithm."]
#[doc = " @GNUTLS_PK_RSA_PSS: RSA public-key algorithm, with PSS padding."]
#[doc = " @GNUTLS_PK_DSA: DSA public-key algorithm."]
#[doc = " @GNUTLS_PK_DH: Diffie-Hellman algorithm. Used to generate parameters."]
#[doc = " @GNUTLS_PK_ECDSA: Elliptic curve algorithm. These parameters are compatible with the ECDSA and ECDH algorithm."]
#[doc = " @GNUTLS_PK_ECDH_X25519: Elliptic curve algorithm, restricted to ECDH as per rfc7748."]
#[doc = " @GNUTLS_PK_EDDSA_ED25519: Edwards curve Digital signature algorithm. Used with SHA512 on signatures."]
#[doc = " @GNUTLS_PK_GOST_01: GOST R 34.10-2001 algorithm per rfc5832."]
#[doc = " @GNUTLS_PK_GOST_12_256: GOST R 34.10-2012 algorithm, 256-bit key per rfc7091."]
#[doc = " @GNUTLS_PK_GOST_12_512: GOST R 34.10-2012 algorithm, 512-bit key per rfc7091."]
#[doc = " @GNUTLS_PK_ECDH_X448: Elliptic curve algorithm, restricted to ECDH as per rfc7748."]
#[doc = " @GNUTLS_PK_EDDSA_ED448: Edwards curve Digital signature algorithm. Used with SHAKE256 on signatures."]
#[doc = ""]
#[doc = " Enumeration of different public-key algorithms."]
pub type gnutls_pk_algorithm_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_pk_algorithm_get_name(
        algorithm: gnutls_pk_algorithm_t,
    ) -> *const ::std::os::raw::c_char;
}
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_UNKNOWN: gnutls_sign_algorithm_t = 0;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA1: gnutls_sign_algorithm_t = 1;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA: gnutls_sign_algorithm_t = 1;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA1: gnutls_sign_algorithm_t = 2;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA: gnutls_sign_algorithm_t = 2;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_MD5: gnutls_sign_algorithm_t = 3;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_MD2: gnutls_sign_algorithm_t = 4;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_RMD160: gnutls_sign_algorithm_t = 5;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA256: gnutls_sign_algorithm_t = 6;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA384: gnutls_sign_algorithm_t = 7;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA512: gnutls_sign_algorithm_t = 8;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA224: gnutls_sign_algorithm_t = 9;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA224: gnutls_sign_algorithm_t = 10;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA256: gnutls_sign_algorithm_t = 11;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA1: gnutls_sign_algorithm_t = 12;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA224: gnutls_sign_algorithm_t = 13;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA256: gnutls_sign_algorithm_t = 14;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA384: gnutls_sign_algorithm_t = 15;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA512: gnutls_sign_algorithm_t = 16;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA384: gnutls_sign_algorithm_t = 17;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA512: gnutls_sign_algorithm_t = 18;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA3_224: gnutls_sign_algorithm_t = 20;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA3_256: gnutls_sign_algorithm_t = 21;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA3_384: gnutls_sign_algorithm_t = 22;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SHA3_512: gnutls_sign_algorithm_t = 23;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA3_224: gnutls_sign_algorithm_t = 24;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA3_256: gnutls_sign_algorithm_t = 25;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA3_384: gnutls_sign_algorithm_t = 26;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_DSA_SHA3_512: gnutls_sign_algorithm_t = 27;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA3_224: gnutls_sign_algorithm_t = 28;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA3_256: gnutls_sign_algorithm_t = 29;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA3_384: gnutls_sign_algorithm_t = 30;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_SHA3_512: gnutls_sign_algorithm_t = 31;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_PSS_SHA256: gnutls_sign_algorithm_t = 32;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_PSS_SHA384: gnutls_sign_algorithm_t = 33;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_PSS_SHA512: gnutls_sign_algorithm_t = 34;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_EDDSA_ED25519: gnutls_sign_algorithm_t = 35;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_RAW: gnutls_sign_algorithm_t = 36;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SECP256R1_SHA256: gnutls_sign_algorithm_t = 37;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SECP384R1_SHA384: gnutls_sign_algorithm_t = 38;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_ECDSA_SECP521R1_SHA512: gnutls_sign_algorithm_t = 39;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_PSS_RSAE_SHA256: gnutls_sign_algorithm_t = 40;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_PSS_RSAE_SHA384: gnutls_sign_algorithm_t = 41;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_RSA_PSS_RSAE_SHA512: gnutls_sign_algorithm_t = 42;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_GOST_94: gnutls_sign_algorithm_t = 43;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_GOST_256: gnutls_sign_algorithm_t = 44;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_GOST_512: gnutls_sign_algorithm_t = 45;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_EDDSA_ED448: gnutls_sign_algorithm_t = 46;
pub const gnutls_sign_algorithm_t_GNUTLS_SIGN_MAX: gnutls_sign_algorithm_t = 46;
#[doc = " gnutls_sign_algorithm_t:"]
#[doc = " @GNUTLS_SIGN_UNKNOWN: Unknown signature algorithm."]
#[doc = " @GNUTLS_SIGN_RSA_RAW: Digital signature algorithm RSA with DigestInfo formatted data"]
#[doc = " @GNUTLS_SIGN_RSA_SHA1: Digital signature algorithm RSA with SHA-1"]
#[doc = " @GNUTLS_SIGN_RSA_SHA: Same as %GNUTLS_SIGN_RSA_SHA1."]
#[doc = " @GNUTLS_SIGN_DSA_SHA1: Digital signature algorithm DSA with SHA-1"]
#[doc = " @GNUTLS_SIGN_DSA_SHA224: Digital signature algorithm DSA with SHA-224"]
#[doc = " @GNUTLS_SIGN_DSA_SHA256: Digital signature algorithm DSA with SHA-256"]
#[doc = " @GNUTLS_SIGN_DSA_SHA384: Digital signature algorithm DSA with SHA-384"]
#[doc = " @GNUTLS_SIGN_DSA_SHA512: Digital signature algorithm DSA with SHA-512"]
#[doc = " @GNUTLS_SIGN_DSA_SHA: Same as %GNUTLS_SIGN_DSA_SHA1."]
#[doc = " @GNUTLS_SIGN_RSA_MD5: Digital signature algorithm RSA with MD5."]
#[doc = " @GNUTLS_SIGN_RSA_MD2: Digital signature algorithm RSA with MD2."]
#[doc = " @GNUTLS_SIGN_RSA_RMD160: Digital signature algorithm RSA with RMD-160."]
#[doc = " @GNUTLS_SIGN_RSA_SHA256: Digital signature algorithm RSA with SHA-256."]
#[doc = " @GNUTLS_SIGN_RSA_SHA384: Digital signature algorithm RSA with SHA-384."]
#[doc = " @GNUTLS_SIGN_RSA_SHA512: Digital signature algorithm RSA with SHA-512."]
#[doc = " @GNUTLS_SIGN_RSA_SHA224: Digital signature algorithm RSA with SHA-224."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA1: ECDSA with SHA1."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA224: Digital signature algorithm ECDSA with SHA-224."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA256: Digital signature algorithm ECDSA with SHA-256."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA384: Digital signature algorithm ECDSA with SHA-384."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA512: Digital signature algorithm ECDSA with SHA-512."]
#[doc = " @GNUTLS_SIGN_ECDSA_SECP256R1_SHA256: Digital signature algorithm ECDSA-SECP256R1 with SHA-256 (used in TLS 1.3 but not PKIX)."]
#[doc = " @GNUTLS_SIGN_ECDSA_SECP384R1_SHA384: Digital signature algorithm ECDSA-SECP384R1 with SHA-384 (used in TLS 1.3 but not PKIX)."]
#[doc = " @GNUTLS_SIGN_ECDSA_SECP521R1_SHA512: Digital signature algorithm ECDSA-SECP521R1 with SHA-512 (used in TLS 1.3 but not PKIX)."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA3_224: Digital signature algorithm ECDSA with SHA3-224."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA3_256: Digital signature algorithm ECDSA with SHA3-256."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA3_384: Digital signature algorithm ECDSA with SHA3-384."]
#[doc = " @GNUTLS_SIGN_ECDSA_SHA3_512: Digital signature algorithm ECDSA with SHA3-512."]
#[doc = " @GNUTLS_SIGN_DSA_SHA3_224: Digital signature algorithm DSA with SHA3-224."]
#[doc = " @GNUTLS_SIGN_DSA_SHA3_256: Digital signature algorithm DSA with SHA3-256."]
#[doc = " @GNUTLS_SIGN_DSA_SHA3_384: Digital signature algorithm DSA with SHA3-384."]
#[doc = " @GNUTLS_SIGN_DSA_SHA3_512: Digital signature algorithm DSA with SHA3-512."]
#[doc = " @GNUTLS_SIGN_RSA_SHA3_224: Digital signature algorithm RSA with SHA3-224."]
#[doc = " @GNUTLS_SIGN_RSA_SHA3_256: Digital signature algorithm RSA with SHA3-256."]
#[doc = " @GNUTLS_SIGN_RSA_SHA3_384: Digital signature algorithm RSA with SHA3-384."]
#[doc = " @GNUTLS_SIGN_RSA_SHA3_512: Digital signature algorithm RSA with SHA3-512."]
#[doc = " @GNUTLS_SIGN_RSA_PSS_RSAE_SHA256: Digital signature algorithm RSA with SHA-256,"]
#[doc = "      with PSS padding (RSA PKCS#1 1.5 certificate). This signature is identical"]
#[doc = "      to #GNUTLS_SIGN_RSA_PSS_SHA256, but they are distinct as the TLS1.3 protocol"]
#[doc = "      treats them differently."]
#[doc = " @GNUTLS_SIGN_RSA_PSS_RSAE_SHA384: Digital signature algorithm RSA with SHA-384,"]
#[doc = "      with PSS padding (RSA PKCS#1 1.5 certificate). This signature is identical"]
#[doc = "      to #GNUTLS_SIGN_RSA_PSS_SHA384, but they are distinct as the TLS1.3 protocol"]
#[doc = "      treats them differently."]
#[doc = " @GNUTLS_SIGN_RSA_PSS_RSAE_SHA512: Digital signature algorithm RSA with SHA-512,"]
#[doc = "      with PSS padding (RSA PKCS#1 1.5 certificate). This signature is identical"]
#[doc = "      to #GNUTLS_SIGN_RSA_PSS_SHA512, but they are distinct as the TLS1.3 protocol"]
#[doc = "      treats them differently."]
#[doc = " @GNUTLS_SIGN_RSA_PSS_SHA256: Digital signature algorithm RSA with SHA-256, with PSS padding (RSA-PSS certificate)."]
#[doc = " @GNUTLS_SIGN_RSA_PSS_SHA384: Digital signature algorithm RSA with SHA-384, with PSS padding (RSA-PSS certificate)."]
#[doc = " @GNUTLS_SIGN_RSA_PSS_SHA512: Digital signature algorithm RSA with SHA-512, with PSS padding (RSA-PSS certificate)."]
#[doc = " @GNUTLS_SIGN_EDDSA_ED25519: Digital signature algorithm EdDSA with Ed25519 curve."]
#[doc = " @GNUTLS_SIGN_GOST_94: Digital signature algorithm GOST R 34.10-2001 with GOST R 34.11-94"]
#[doc = " @GNUTLS_SIGN_GOST_256: Digital signature algorithm GOST R 34.10-2012 with GOST R 34.11-2012 256 bit"]
#[doc = " @GNUTLS_SIGN_GOST_512: Digital signature algorithm GOST R 34.10-2012 with GOST R 34.11-2012 512 bit"]
#[doc = " @GNUTLS_SIGN_EDDSA_ED448: Digital signature algorithm EdDSA with Ed448 curve."]
#[doc = ""]
#[doc = " Enumeration of different digital signature algorithms."]
pub type gnutls_sign_algorithm_t = ::std::os::raw::c_uint;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_INVALID: gnutls_ecc_curve_t = 0;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_SECP224R1: gnutls_ecc_curve_t = 1;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_SECP256R1: gnutls_ecc_curve_t = 2;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_SECP384R1: gnutls_ecc_curve_t = 3;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_SECP521R1: gnutls_ecc_curve_t = 4;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_SECP192R1: gnutls_ecc_curve_t = 5;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_X25519: gnutls_ecc_curve_t = 6;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_ED25519: gnutls_ecc_curve_t = 7;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256CPA: gnutls_ecc_curve_t = 8;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256CPB: gnutls_ecc_curve_t = 9;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256CPC: gnutls_ecc_curve_t = 10;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256CPXA: gnutls_ecc_curve_t = 11;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256CPXB: gnutls_ecc_curve_t = 12;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST512A: gnutls_ecc_curve_t = 13;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST512B: gnutls_ecc_curve_t = 14;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST512C: gnutls_ecc_curve_t = 15;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256A: gnutls_ecc_curve_t = 16;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256B: gnutls_ecc_curve_t = 17;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256C: gnutls_ecc_curve_t = 18;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_GOST256D: gnutls_ecc_curve_t = 19;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_X448: gnutls_ecc_curve_t = 20;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_ED448: gnutls_ecc_curve_t = 21;
pub const gnutls_ecc_curve_t_GNUTLS_ECC_CURVE_MAX: gnutls_ecc_curve_t = 21;
#[doc = " gnutls_ecc_curve_t:"]
#[doc = " @GNUTLS_ECC_CURVE_INVALID: Cannot be known"]
#[doc = " @GNUTLS_ECC_CURVE_SECP192R1: the SECP192R1 curve"]
#[doc = " @GNUTLS_ECC_CURVE_SECP224R1: the SECP224R1 curve"]
#[doc = " @GNUTLS_ECC_CURVE_SECP256R1: the SECP256R1 curve"]
#[doc = " @GNUTLS_ECC_CURVE_SECP384R1: the SECP384R1 curve"]
#[doc = " @GNUTLS_ECC_CURVE_SECP521R1: the SECP521R1 curve"]
#[doc = " @GNUTLS_ECC_CURVE_X25519: the X25519 curve (ECDH only)"]
#[doc = " @GNUTLS_ECC_CURVE_ED25519: the Ed25519 curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256CPA: GOST R 34.10 CryptoPro 256 A curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256CPB: GOST R 34.10 CryptoPro 256 B curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256CPC: GOST R 34.10 CryptoPro 256 C curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256CPXA: GOST R 34.10 CryptoPro 256 XchA curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256CPXB: GOST R 34.10 CryptoPro 256 XchB curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST512A: GOST R 34.10 TC26 512 A curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST512B: GOST R 34.10 TC26 512 B curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST512C: GOST R 34.10 TC26 512 C curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256A: GOST R 34.10 TC26 256 A curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256B: GOST R 34.10 TC26 256 B curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256C: GOST R 34.10 TC26 256 C curve"]
#[doc = " @GNUTLS_ECC_CURVE_GOST256D: GOST R 34.10 TC26 256 D curve"]
#[doc = " @GNUTLS_ECC_CURVE_X448: the X448 curve (ECDH only)"]
#[doc = " @GNUTLS_ECC_CURVE_ED448: the Ed448 curve"]
#[doc = ""]
#[doc = " Enumeration of ECC curves."]
pub type gnutls_ecc_curve_t = ::std::os::raw::c_uint;
pub const gnutls_group_t_GNUTLS_GROUP_INVALID: gnutls_group_t = 0;
pub const gnutls_group_t_GNUTLS_GROUP_SECP192R1: gnutls_group_t = 5;
pub const gnutls_group_t_GNUTLS_GROUP_SECP224R1: gnutls_group_t = 1;
pub const gnutls_group_t_GNUTLS_GROUP_SECP256R1: gnutls_group_t = 2;
pub const gnutls_group_t_GNUTLS_GROUP_SECP384R1: gnutls_group_t = 3;
pub const gnutls_group_t_GNUTLS_GROUP_SECP521R1: gnutls_group_t = 4;
pub const gnutls_group_t_GNUTLS_GROUP_X25519: gnutls_group_t = 6;
pub const gnutls_group_t_GNUTLS_GROUP_X448: gnutls_group_t = 20;
pub const gnutls_group_t_GNUTLS_GROUP_GC256A: gnutls_group_t = 16;
pub const gnutls_group_t_GNUTLS_GROUP_GC256B: gnutls_group_t = 17;
pub const gnutls_group_t_GNUTLS_GROUP_GC256C: gnutls_group_t = 18;
pub const gnutls_group_t_GNUTLS_GROUP_GC256D: gnutls_group_t = 19;
pub const gnutls_group_t_GNUTLS_GROUP_GC512A: gnutls_group_t = 13;
pub const gnutls_group_t_GNUTLS_GROUP_GC512B: gnutls_group_t = 14;
pub const gnutls_group_t_GNUTLS_GROUP_GC512C: gnutls_group_t = 15;
pub const gnutls_group_t_GNUTLS_GROUP_FFDHE2048: gnutls_group_t = 256;
pub const gnutls_group_t_GNUTLS_GROUP_FFDHE3072: gnutls_group_t = 257;
pub const gnutls_group_t_GNUTLS_GROUP_FFDHE4096: gnutls_group_t = 258;
pub const gnutls_group_t_GNUTLS_GROUP_FFDHE8192: gnutls_group_t = 259;
pub const gnutls_group_t_GNUTLS_GROUP_FFDHE6144: gnutls_group_t = 260;
pub const gnutls_group_t_GNUTLS_GROUP_MAX: gnutls_group_t = 260;
#[doc = " gnutls_group_t:"]
#[doc = " @GNUTLS_GROUP_INVALID: Indicates unknown/invalid group"]
#[doc = " @GNUTLS_GROUP_SECP192R1: the SECP192R1 curve group (legacy, only for TLS 1.2 compatibility)"]
#[doc = " @GNUTLS_GROUP_SECP224R1: the SECP224R1 curve group (legacy, only for TLS 1.2 compatibility)"]
#[doc = " @GNUTLS_GROUP_SECP256R1: the SECP256R1 curve group"]
#[doc = " @GNUTLS_GROUP_SECP384R1: the SECP384R1 curve group"]
#[doc = " @GNUTLS_GROUP_SECP521R1: the SECP521R1 curve group"]
#[doc = " @GNUTLS_GROUP_X25519: the X25519 curve group"]
#[doc = " @GNUTLS_GROUP_GC256A: the GOST R 34.10 TC26 256 A curve group"]
#[doc = " @GNUTLS_GROUP_GC256B: the GOST R 34.10 TC26 256 B curve group"]
#[doc = " @GNUTLS_GROUP_GC256C: the GOST R 34.10 TC26 256 C curve group"]
#[doc = " @GNUTLS_GROUP_GC256D: the GOST R 34.10 TC26 256 D curve group"]
#[doc = " @GNUTLS_GROUP_GC512A: the GOST R 34.10 TC26 512 A curve group"]
#[doc = " @GNUTLS_GROUP_GC512B: the GOST R 34.10 TC26 512 B curve group"]
#[doc = " @GNUTLS_GROUP_GC512C: the GOST R 34.10 TC26 512 C curve group"]
#[doc = " @GNUTLS_GROUP_FFDHE2048: the FFDHE2048 group"]
#[doc = " @GNUTLS_GROUP_FFDHE3072: the FFDHE3072 group"]
#[doc = " @GNUTLS_GROUP_FFDHE4096: the FFDHE4096 group"]
#[doc = " @GNUTLS_GROUP_FFDHE6144: the FFDHE6144 group"]
#[doc = " @GNUTLS_GROUP_FFDHE8192: the FFDHE8192 group"]
#[doc = " @GNUTLS_GROUP_X448: the X448 curve group"]
#[doc = ""]
#[doc = " Enumeration of supported groups. It is intended to be backwards"]
#[doc = " compatible with the enumerations in %gnutls_ecc_curve_t for the groups"]
#[doc = " which are valid elliptic curves."]
pub type gnutls_group_t = ::std::os::raw::c_uint;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_UNKNOWN: gnutls_sec_param_t = 0;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_INSECURE: gnutls_sec_param_t = 5;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_EXPORT: gnutls_sec_param_t = 10;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_VERY_WEAK: gnutls_sec_param_t = 15;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_WEAK: gnutls_sec_param_t = 20;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_LOW: gnutls_sec_param_t = 25;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_LEGACY: gnutls_sec_param_t = 30;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_MEDIUM: gnutls_sec_param_t = 35;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_HIGH: gnutls_sec_param_t = 40;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_ULTRA: gnutls_sec_param_t = 45;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_FUTURE: gnutls_sec_param_t = 50;
pub const gnutls_sec_param_t_GNUTLS_SEC_PARAM_MAX: gnutls_sec_param_t = 50;
#[doc = " gnutls_sec_param_t:"]
#[doc = " @GNUTLS_SEC_PARAM_UNKNOWN: Cannot be known"]
#[doc = " @GNUTLS_SEC_PARAM_INSECURE: Less than 42 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_EXPORT: 42 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_VERY_WEAK: 64 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_WEAK: 72 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_LOW: 80 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_LEGACY: 96 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_MEDIUM: 112 bits of security (used to be %GNUTLS_SEC_PARAM_NORMAL)"]
#[doc = " @GNUTLS_SEC_PARAM_HIGH: 128 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_ULTRA: 192 bits of security"]
#[doc = " @GNUTLS_SEC_PARAM_FUTURE: 256 bits of security"]
#[doc = ""]
#[doc = " Enumeration of security parameters for passive attacks."]
pub type gnutls_sec_param_t = ::std::os::raw::c_uint;
pub const gnutls_channel_binding_t_GNUTLS_CB_TLS_UNIQUE: gnutls_channel_binding_t = 0;
pub const gnutls_channel_binding_t_GNUTLS_CB_TLS_SERVER_END_POINT: gnutls_channel_binding_t = 1;
pub const gnutls_channel_binding_t_GNUTLS_CB_TLS_EXPORTER: gnutls_channel_binding_t = 2;
#[doc = " gnutls_channel_binding_t:"]
#[doc = " @GNUTLS_CB_TLS_UNIQUE: \"tls-unique\" (RFC 5929) channel binding"]
#[doc = " @GNUTLS_CB_TLS_SERVER_END_POINT: \"tls-server-end-point\" (RFC 5929) channel binding"]
#[doc = " @GNUTLS_CB_TLS_EXPORTER: \"tls-exporter\" (draft-ietf-kitten-tls-channel-bindings-for-tls13-03)"]
#[doc = ""]
#[doc = " Enumeration of supported channel binding types."]
pub type gnutls_channel_binding_t = ::std::os::raw::c_uint;
pub const gnutls_gost_paramset_t_GNUTLS_GOST_PARAMSET_UNKNOWN: gnutls_gost_paramset_t = 0;
pub const gnutls_gost_paramset_t_GNUTLS_GOST_PARAMSET_TC26_Z: gnutls_gost_paramset_t = 1;
pub const gnutls_gost_paramset_t_GNUTLS_GOST_PARAMSET_CP_A: gnutls_gost_paramset_t = 2;
pub const gnutls_gost_paramset_t_GNUTLS_GOST_PARAMSET_CP_B: gnutls_gost_paramset_t = 3;
pub const gnutls_gost_paramset_t_GNUTLS_GOST_PARAMSET_CP_C: gnutls_gost_paramset_t = 4;
pub const gnutls_gost_paramset_t_GNUTLS_GOST_PARAMSET_CP_D: gnutls_gost_paramset_t = 5;
#[doc = " gnutls_gost_paramset_t:"]
#[doc = " @GNUTLS_GOST_PARAMSET_UNKNOWN: Unknown/default parameter set"]
#[doc = " @GNUTLS_GOST_PARAMSET_TC26_Z: Specified by TC26, see rfc7836"]
#[doc = " @GNUTLS_GOST_PARAMSET_CP_A: CryptoPro-A, see rfc4357"]
#[doc = " @GNUTLS_GOST_PARAMSET_CP_B: CryptoPro-B, see rfc4357"]
#[doc = " @GNUTLS_GOST_PARAMSET_CP_C: CryptoPro-C, see rfc4357"]
#[doc = " @GNUTLS_GOST_PARAMSET_CP_D: CryptoPro-D, see rfc4357"]
#[doc = ""]
#[doc = " Enumeration of different GOST 28147 parameter sets."]
pub type gnutls_gost_paramset_t = ::std::os::raw::c_uint;
pub const gnutls_ctype_target_t_GNUTLS_CTYPE_CLIENT: gnutls_ctype_target_t = 0;
pub const gnutls_ctype_target_t_GNUTLS_CTYPE_SERVER: gnutls_ctype_target_t = 1;
pub const gnutls_ctype_target_t_GNUTLS_CTYPE_OURS: gnutls_ctype_target_t = 2;
pub const gnutls_ctype_target_t_GNUTLS_CTYPE_PEERS: gnutls_ctype_target_t = 3;
#[doc = " gnutls_ctype_target_t:"]
#[doc = " @GNUTLS_CTYPE_CLIENT: for requesting client certificate type values."]
#[doc = " @GNUTLS_CTYPE_SERVER: for requesting server certificate type values."]
#[doc = " @GNUTLS_CTYPE_OURS: for requesting our certificate type values."]
#[doc = " @GNUTLS_CTYPE_PEERS: for requesting the peers' certificate type values."]
#[doc = ""]
#[doc = " Enumeration of certificate type targets with respect to asymmetric"]
#[doc = " certificate types as specified in RFC7250 and P2P connection set up"]
#[doc = " as specified in draft-vanrein-tls-symmetry-02."]
pub type gnutls_ctype_target_t = ::std::os::raw::c_uint;
pub type gnutls_transport_ptr_t = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_session_int {
    _unused: [u8; 0],
}
pub type gnutls_session_t = *mut gnutls_session_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_dh_params_int {
    _unused: [u8; 0],
}
pub type gnutls_dh_params_t = *mut gnutls_dh_params_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_x509_privkey_int {
    _unused: [u8; 0],
}
pub type gnutls_rsa_params_t = *mut gnutls_x509_privkey_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_priority_st {
    _unused: [u8; 0],
}
pub type gnutls_priority_t = *mut gnutls_priority_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_datum_t {
    pub data: *mut ::std::os::raw::c_uchar,
    pub size: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_gnutls_datum_t() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_datum_t>(),
        16usize,
        concat!("Size of: ", stringify!(gnutls_datum_t))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_datum_t>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_datum_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_datum_t>())).data as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_datum_t),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_datum_t>())).size as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_datum_t),
            "::",
            stringify!(size)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_library_config_st {
    pub name: *const ::std::os::raw::c_char,
    pub value: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_gnutls_library_config_st() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_library_config_st>(),
        16usize,
        concat!("Size of: ", stringify!(gnutls_library_config_st))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_library_config_st>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_library_config_st))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_library_config_st>())).name as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_library_config_st),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_library_config_st>())).value as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_library_config_st),
            "::",
            stringify!(value)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct gnutls_params_st {
    pub type_: gnutls_params_type_t,
    pub params: gnutls_params_st_params,
    pub deinit: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union gnutls_params_st_params {
    pub dh: gnutls_dh_params_t,
    pub rsa_export: gnutls_rsa_params_t,
}
#[test]
fn bindgen_test_layout_gnutls_params_st_params() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_params_st_params>(),
        8usize,
        concat!("Size of: ", stringify!(gnutls_params_st_params))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_params_st_params>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_params_st_params))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_params_st_params>())).dh as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_params_st_params),
            "::",
            stringify!(dh)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<gnutls_params_st_params>())).rsa_export as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_params_st_params),
            "::",
            stringify!(rsa_export)
        )
    );
}
#[test]
fn bindgen_test_layout_gnutls_params_st() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_params_st>(),
        24usize,
        concat!("Size of: ", stringify!(gnutls_params_st))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_params_st>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_params_st))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_params_st>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_params_st),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_params_st>())).params as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_params_st),
            "::",
            stringify!(params)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_params_st>())).deinit as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_params_st),
            "::",
            stringify!(deinit)
        )
    );
}
pub type gnutls_params_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        arg2: gnutls_params_type_t,
        arg3: *mut gnutls_params_st,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_init(
        session: *mut gnutls_session_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_deinit(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_bye(
        session: gnutls_session_t,
        how: gnutls_close_request_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_handshake(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_reauth(
        session: gnutls_session_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_handshake_set_timeout(session: gnutls_session_t, ms: ::std::os::raw::c_uint);
}
extern "C" {
    pub fn gnutls_rehandshake(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_key_update(
        session: gnutls_session_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_alert_get(session: gnutls_session_t) -> gnutls_alert_description_t;
}
extern "C" {
    pub fn gnutls_alert_send(
        session: gnutls_session_t,
        level: gnutls_alert_level_t,
        desc: gnutls_alert_description_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_alert_send_appropriate(
        session: gnutls_session_t,
        err: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_alert_get_name(
        alert: gnutls_alert_description_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_alert_get_strname(
        alert: gnutls_alert_description_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_pk_bits_to_sec_param(
        algo: gnutls_pk_algorithm_t,
        bits: ::std::os::raw::c_uint,
    ) -> gnutls_sec_param_t;
}
extern "C" {
    pub fn gnutls_sec_param_get_name(param: gnutls_sec_param_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_sec_param_to_pk_bits(
        algo: gnutls_pk_algorithm_t,
        param: gnutls_sec_param_t,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_sec_param_to_symmetric_bits(param: gnutls_sec_param_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_ecc_curve_get_name(curve: gnutls_ecc_curve_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_ecc_curve_get_oid(curve: gnutls_ecc_curve_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_group_get_name(group: gnutls_group_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_ecc_curve_get_size(curve: gnutls_ecc_curve_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_ecc_curve_get(session: gnutls_session_t) -> gnutls_ecc_curve_t;
}
extern "C" {
    pub fn gnutls_group_get(session: gnutls_session_t) -> gnutls_group_t;
}
extern "C" {
    pub fn gnutls_cipher_get(session: gnutls_session_t) -> gnutls_cipher_algorithm_t;
}
extern "C" {
    pub fn gnutls_early_cipher_get(session: gnutls_session_t) -> gnutls_cipher_algorithm_t;
}
extern "C" {
    pub fn gnutls_kx_get(session: gnutls_session_t) -> gnutls_kx_algorithm_t;
}
extern "C" {
    pub fn gnutls_mac_get(session: gnutls_session_t) -> gnutls_mac_algorithm_t;
}
extern "C" {
    pub fn gnutls_prf_hash_get(session: gnutls_session_t) -> gnutls_digest_algorithm_t;
}
extern "C" {
    pub fn gnutls_early_prf_hash_get(session: gnutls_session_t) -> gnutls_digest_algorithm_t;
}
extern "C" {
    pub fn gnutls_certificate_type_get(session: gnutls_session_t) -> gnutls_certificate_type_t;
}
extern "C" {
    pub fn gnutls_certificate_type_get2(
        session: gnutls_session_t,
        target: gnutls_ctype_target_t,
    ) -> gnutls_certificate_type_t;
}
extern "C" {
    pub fn gnutls_sign_algorithm_get(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_sign_algorithm_get_client(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_sign_algorithm_get_requested(
        session: gnutls_session_t,
        indx: size_t,
        algo: *mut gnutls_sign_algorithm_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_cipher_get_name(
        algorithm: gnutls_cipher_algorithm_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_mac_get_name(algorithm: gnutls_mac_algorithm_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_digest_get_name(
        algorithm: gnutls_digest_algorithm_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_digest_get_oid(
        algorithm: gnutls_digest_algorithm_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_kx_get_name(algorithm: gnutls_kx_algorithm_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_certificate_type_get_name(
        type_: gnutls_certificate_type_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_pk_get_name(algorithm: gnutls_pk_algorithm_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_pk_get_oid(algorithm: gnutls_pk_algorithm_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_sign_get_name(
        algorithm: gnutls_sign_algorithm_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_sign_get_oid(sign: gnutls_sign_algorithm_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_gost_paramset_get_name(
        param: gnutls_gost_paramset_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_gost_paramset_get_oid(
        param: gnutls_gost_paramset_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_cipher_get_key_size(algorithm: gnutls_cipher_algorithm_t) -> size_t;
}
extern "C" {
    pub fn gnutls_mac_get_key_size(algorithm: gnutls_mac_algorithm_t) -> size_t;
}
extern "C" {
    pub fn gnutls_sign_is_secure(algorithm: gnutls_sign_algorithm_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_sign_is_secure2(
        algorithm: gnutls_sign_algorithm_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_sign_get_hash_algorithm(
        sign: gnutls_sign_algorithm_t,
    ) -> gnutls_digest_algorithm_t;
}
extern "C" {
    pub fn gnutls_sign_get_pk_algorithm(sign: gnutls_sign_algorithm_t) -> gnutls_pk_algorithm_t;
}
extern "C" {
    pub fn gnutls_pk_to_sign(
        pk: gnutls_pk_algorithm_t,
        hash: gnutls_digest_algorithm_t,
    ) -> gnutls_sign_algorithm_t;
}
extern "C" {
    pub fn gnutls_sign_supports_pk_algorithm(
        sign: gnutls_sign_algorithm_t,
        pk: gnutls_pk_algorithm_t,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_mac_get_id(name: *const ::std::os::raw::c_char) -> gnutls_mac_algorithm_t;
}
extern "C" {
    pub fn gnutls_digest_get_id(name: *const ::std::os::raw::c_char) -> gnutls_digest_algorithm_t;
}
extern "C" {
    pub fn gnutls_cipher_get_id(name: *const ::std::os::raw::c_char) -> gnutls_cipher_algorithm_t;
}
extern "C" {
    pub fn gnutls_kx_get_id(name: *const ::std::os::raw::c_char) -> gnutls_kx_algorithm_t;
}
extern "C" {
    pub fn gnutls_protocol_get_id(name: *const ::std::os::raw::c_char) -> gnutls_protocol_t;
}
extern "C" {
    pub fn gnutls_certificate_type_get_id(
        name: *const ::std::os::raw::c_char,
    ) -> gnutls_certificate_type_t;
}
extern "C" {
    pub fn gnutls_pk_get_id(name: *const ::std::os::raw::c_char) -> gnutls_pk_algorithm_t;
}
extern "C" {
    pub fn gnutls_sign_get_id(name: *const ::std::os::raw::c_char) -> gnutls_sign_algorithm_t;
}
extern "C" {
    pub fn gnutls_ecc_curve_get_id(name: *const ::std::os::raw::c_char) -> gnutls_ecc_curve_t;
}
extern "C" {
    pub fn gnutls_ecc_curve_get_pk(curve: gnutls_ecc_curve_t) -> gnutls_pk_algorithm_t;
}
extern "C" {
    pub fn gnutls_group_get_id(name: *const ::std::os::raw::c_char) -> gnutls_group_t;
}
extern "C" {
    pub fn gnutls_oid_to_digest(oid: *const ::std::os::raw::c_char) -> gnutls_digest_algorithm_t;
}
extern "C" {
    pub fn gnutls_oid_to_mac(oid: *const ::std::os::raw::c_char) -> gnutls_mac_algorithm_t;
}
extern "C" {
    pub fn gnutls_oid_to_pk(oid: *const ::std::os::raw::c_char) -> gnutls_pk_algorithm_t;
}
extern "C" {
    pub fn gnutls_oid_to_sign(oid: *const ::std::os::raw::c_char) -> gnutls_sign_algorithm_t;
}
extern "C" {
    pub fn gnutls_oid_to_ecc_curve(oid: *const ::std::os::raw::c_char) -> gnutls_ecc_curve_t;
}
extern "C" {
    pub fn gnutls_oid_to_gost_paramset(
        oid: *const ::std::os::raw::c_char,
    ) -> gnutls_gost_paramset_t;
}
extern "C" {
    pub fn gnutls_ecc_curve_list() -> *const gnutls_ecc_curve_t;
}
extern "C" {
    pub fn gnutls_group_list() -> *const gnutls_group_t;
}
extern "C" {
    pub fn gnutls_cipher_list() -> *const gnutls_cipher_algorithm_t;
}
extern "C" {
    pub fn gnutls_mac_list() -> *const gnutls_mac_algorithm_t;
}
extern "C" {
    pub fn gnutls_digest_list() -> *const gnutls_digest_algorithm_t;
}
extern "C" {
    pub fn gnutls_protocol_list() -> *const gnutls_protocol_t;
}
extern "C" {
    pub fn gnutls_certificate_type_list() -> *const gnutls_certificate_type_t;
}
extern "C" {
    pub fn gnutls_kx_list() -> *const gnutls_kx_algorithm_t;
}
extern "C" {
    pub fn gnutls_pk_list() -> *const gnutls_pk_algorithm_t;
}
extern "C" {
    pub fn gnutls_sign_list() -> *const gnutls_sign_algorithm_t;
}
extern "C" {
    pub fn gnutls_cipher_suite_info(
        idx: size_t,
        cs_id: *mut ::std::os::raw::c_uchar,
        kx: *mut gnutls_kx_algorithm_t,
        cipher: *mut gnutls_cipher_algorithm_t,
        mac: *mut gnutls_mac_algorithm_t,
        min_version: *mut gnutls_protocol_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_ecc_curve_set_enabled(
        curve: gnutls_ecc_curve_t,
        enabled: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_sign_set_secure(
        sign: gnutls_sign_algorithm_t,
        secure: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_sign_set_secure_for_certs(
        sign: gnutls_sign_algorithm_t,
        secure: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_digest_set_secure(
        dig: gnutls_digest_algorithm_t,
        secure: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_protocol_set_enabled(
        version: gnutls_protocol_t,
        enabled: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_error_is_fatal(error: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_error_to_alert(
        err: ::std::os::raw::c_int,
        level: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_perror(error: ::std::os::raw::c_int);
}
extern "C" {
    pub fn gnutls_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_strerror_name(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_handshake_set_private_extensions(
        session: gnutls_session_t,
        allow: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn gnutls_handshake_set_random(
        session: gnutls_session_t,
        random: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_handshake_get_last_out(
        session: gnutls_session_t,
    ) -> gnutls_handshake_description_t;
}
extern "C" {
    pub fn gnutls_handshake_get_last_in(
        session: gnutls_session_t,
    ) -> gnutls_handshake_description_t;
}
extern "C" {
    pub fn gnutls_heartbeat_ping(
        session: gnutls_session_t,
        data_size: size_t,
        max_tries: ::std::os::raw::c_uint,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_heartbeat_pong(
        session: gnutls_session_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_record_set_timeout(session: gnutls_session_t, ms: ::std::os::raw::c_uint);
}
extern "C" {
    pub fn gnutls_record_disable_padding(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_record_cork(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_record_uncork(
        session: gnutls_session_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_record_discard_queued(session: gnutls_session_t) -> size_t;
}
extern "C" {
    pub fn gnutls_record_get_state(
        session: gnutls_session_t,
        read: ::std::os::raw::c_uint,
        mac_key: *mut gnutls_datum_t,
        IV: *mut gnutls_datum_t,
        cipher_key: *mut gnutls_datum_t,
        seq_number: *mut ::std::os::raw::c_uchar,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_record_set_state(
        session: gnutls_session_t,
        read: ::std::os::raw::c_uint,
        seq_number: *const ::std::os::raw::c_uchar,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_range_st {
    pub low: size_t,
    pub high: size_t,
}
#[test]
fn bindgen_test_layout_gnutls_range_st() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_range_st>(),
        16usize,
        concat!("Size of: ", stringify!(gnutls_range_st))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_range_st>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_range_st))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_range_st>())).low as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_range_st),
            "::",
            stringify!(low)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_range_st>())).high as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_range_st),
            "::",
            stringify!(high)
        )
    );
}
extern "C" {
    pub fn gnutls_range_split(
        session: gnutls_session_t,
        orig: *const gnutls_range_st,
        small_range: *mut gnutls_range_st,
        rem_range: *mut gnutls_range_st,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_record_send(
        session: gnutls_session_t,
        data: *const ::std::os::raw::c_void,
        data_size: size_t,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_send2(
        session: gnutls_session_t,
        data: *const ::std::os::raw::c_void,
        data_size: size_t,
        pad: size_t,
        flags: ::std::os::raw::c_uint,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_send_range(
        session: gnutls_session_t,
        data: *const ::std::os::raw::c_void,
        data_size: size_t,
        range: *const gnutls_range_st,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_recv(
        session: gnutls_session_t,
        data: *mut ::std::os::raw::c_void,
        data_size: size_t,
    ) -> ssize_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mbuffer_st {
    _unused: [u8; 0],
}
pub type gnutls_packet_t = *mut mbuffer_st;
extern "C" {
    pub fn gnutls_record_recv_packet(
        session: gnutls_session_t,
        packet: *mut gnutls_packet_t,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_packet_get(
        packet: gnutls_packet_t,
        data: *mut gnutls_datum_t,
        sequence: *mut ::std::os::raw::c_uchar,
    );
}
extern "C" {
    pub fn gnutls_packet_deinit(packet: gnutls_packet_t);
}
extern "C" {
    pub fn gnutls_record_recv_seq(
        session: gnutls_session_t,
        data: *mut ::std::os::raw::c_void,
        data_size: size_t,
        seq: *mut ::std::os::raw::c_uchar,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_overhead_size(session: gnutls_session_t) -> size_t;
}
extern "C" {
    pub fn gnutls_est_record_overhead_size(
        version: gnutls_protocol_t,
        cipher: gnutls_cipher_algorithm_t,
        mac: gnutls_mac_algorithm_t,
        comp: gnutls_compression_method_t,
        flags: ::std::os::raw::c_uint,
    ) -> size_t;
}
extern "C" {
    pub fn gnutls_session_enable_compatibility_mode(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_record_can_use_length_hiding(session: gnutls_session_t)
        -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_record_get_direction(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_record_get_max_size(session: gnutls_session_t) -> size_t;
}
extern "C" {
    pub fn gnutls_record_set_max_size(session: gnutls_session_t, size: size_t) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_set_max_recv_size(session: gnutls_session_t, size: size_t) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_check_pending(session: gnutls_session_t) -> size_t;
}
extern "C" {
    pub fn gnutls_record_check_corked(session: gnutls_session_t) -> size_t;
}
extern "C" {
    pub fn gnutls_record_get_max_early_data_size(session: gnutls_session_t) -> size_t;
}
extern "C" {
    pub fn gnutls_record_set_max_early_data_size(
        session: gnutls_session_t,
        size: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_record_send_early_data(
        session: gnutls_session_t,
        data: *const ::std::os::raw::c_void,
        length: size_t,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_record_recv_early_data(
        session: gnutls_session_t,
        data: *mut ::std::os::raw::c_void,
        data_size: size_t,
    ) -> ssize_t;
}
extern "C" {
    pub fn gnutls_session_force_valid(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_prf(
        session: gnutls_session_t,
        label_size: size_t,
        label: *const ::std::os::raw::c_char,
        server_random_first: ::std::os::raw::c_int,
        extra_size: size_t,
        extra: *const ::std::os::raw::c_char,
        outsize: size_t,
        out: *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_prf_rfc5705(
        session: gnutls_session_t,
        label_size: size_t,
        label: *const ::std::os::raw::c_char,
        context_size: size_t,
        context: *const ::std::os::raw::c_char,
        outsize: size_t,
        out: *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_prf_early(
        session: gnutls_session_t,
        label_size: size_t,
        label: *const ::std::os::raw::c_char,
        context_size: size_t,
        context: *const ::std::os::raw::c_char,
        outsize: size_t,
        out: *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_prf_raw(
        session: gnutls_session_t,
        label_size: size_t,
        label: *const ::std::os::raw::c_char,
        seed_size: size_t,
        seed: *const ::std::os::raw::c_char,
        outsize: size_t,
        out: *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
pub const gnutls_server_name_type_t_GNUTLS_NAME_DNS: gnutls_server_name_type_t = 1;
#[doc = " gnutls_server_name_type_t:"]
#[doc = " @GNUTLS_NAME_DNS: Domain Name System name type."]
#[doc = ""]
#[doc = " Enumeration of different server name types."]
pub type gnutls_server_name_type_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_server_name_set(
        session: gnutls_session_t,
        type_: gnutls_server_name_type_t,
        name: *const ::std::os::raw::c_void,
        name_length: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_server_name_get(
        session: gnutls_session_t,
        data: *mut ::std::os::raw::c_void,
        data_length: *mut size_t,
        type_: *mut ::std::os::raw::c_uint,
        indx: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_heartbeat_get_timeout(session: gnutls_session_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_heartbeat_set_timeouts(
        session: gnutls_session_t,
        retrans_timeout: ::std::os::raw::c_uint,
        total_timeout: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_heartbeat_enable(session: gnutls_session_t, type_: ::std::os::raw::c_uint);
}
extern "C" {
    pub fn gnutls_heartbeat_allowed(
        session: gnutls_session_t,
        type_: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_safe_renegotiation_status(session: gnutls_session_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_session_ext_master_secret_status(
        session: gnutls_session_t,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_session_etm_status(session: gnutls_session_t) -> ::std::os::raw::c_uint;
}
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_SAFE_RENEGOTIATION: gnutls_session_flags_t = 1;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_EXT_MASTER_SECRET: gnutls_session_flags_t = 2;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_ETM: gnutls_session_flags_t = 4;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_HB_LOCAL_SEND: gnutls_session_flags_t = 8;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_HB_PEER_SEND: gnutls_session_flags_t = 16;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_FALSE_START: gnutls_session_flags_t = 32;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_RFC7919: gnutls_session_flags_t = 64;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_SESSION_TICKET: gnutls_session_flags_t = 128;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_POST_HANDSHAKE_AUTH: gnutls_session_flags_t = 256;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_EARLY_START: gnutls_session_flags_t = 512;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_EARLY_DATA: gnutls_session_flags_t = 1024;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_CLI_REQUESTED_OCSP: gnutls_session_flags_t = 2048;
pub const gnutls_session_flags_t_GNUTLS_SFLAGS_SERV_REQUESTED_OCSP: gnutls_session_flags_t = 4096;
#[doc = " gnutls_session_flags_t:"]
#[doc = " @GNUTLS_SFLAGS_SAFE_RENEGOTIATION: Safe renegotiation (RFC5746) was used"]
#[doc = " @GNUTLS_SFLAGS_EXT_MASTER_SECRET: The extended master secret (RFC7627) extension was used"]
#[doc = " @GNUTLS_SFLAGS_ETM: The encrypt then MAC (RFC7366) extension was used"]
#[doc = " @GNUTLS_SFLAGS_RFC7919: The RFC7919 Diffie-Hellman parameters were negotiated"]
#[doc = " @GNUTLS_SFLAGS_HB_LOCAL_SEND: The heartbeat negotiation allows the local side to send heartbeat messages"]
#[doc = " @GNUTLS_SFLAGS_HB_PEER_SEND: The heartbeat negotiation allows the peer to send heartbeat messages"]
#[doc = " @GNUTLS_SFLAGS_FALSE_START: False start was used in this client session."]
#[doc = " @GNUTLS_SFLAGS_SESSION_TICKET: A session ticket has been received by the server."]
#[doc = " @GNUTLS_SFLAGS_POST_HANDSHAKE_AUTH: Indicates client capability for post-handshake auth; set only on server side."]
#[doc = " @GNUTLS_SFLAGS_EARLY_START: The TLS1.3 server session returned early."]
#[doc = " @GNUTLS_SFLAGS_EARLY_DATA: The TLS1.3 early data has been received by the server."]
#[doc = " @GNUTLS_SFLAGS_CLI_REQUESTED_OCSP: Set when the client has requested OCSP staple during handshake."]
#[doc = " @GNUTLS_SFLAGS_SERV_REQUESTED_OCSP: Set when the server has requested OCSP staple during handshake."]
#[doc = ""]
#[doc = " Enumeration of different session parameters."]
pub type gnutls_session_flags_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_session_get_flags(session: gnutls_session_t) -> ::std::os::raw::c_uint;
}
pub const gnutls_supplemental_data_format_type_t_GNUTLS_SUPPLEMENTAL_UNKNOWN:
    gnutls_supplemental_data_format_type_t = 0;
#[doc = " gnutls_supplemental_data_format_type_t:"]
#[doc = " @GNUTLS_SUPPLEMENTAL_UNKNOWN: Unknown data format"]
#[doc = ""]
#[doc = " Enumeration of different supplemental data types (RFC 4680)."]
pub type gnutls_supplemental_data_format_type_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_supplemental_get_name(
        type_: gnutls_supplemental_data_format_type_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_session_ticket_key_generate(key: *mut gnutls_datum_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_ticket_enable_client(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_ticket_enable_server(
        session: gnutls_session_t,
        key: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_ticket_send(
        session: gnutls_session_t,
        nr: ::std::os::raw::c_uint,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
pub const gnutls_srtp_profile_t_GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80: gnutls_srtp_profile_t = 1;
pub const gnutls_srtp_profile_t_GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32: gnutls_srtp_profile_t = 2;
pub const gnutls_srtp_profile_t_GNUTLS_SRTP_NULL_HMAC_SHA1_80: gnutls_srtp_profile_t = 5;
pub const gnutls_srtp_profile_t_GNUTLS_SRTP_NULL_HMAC_SHA1_32: gnutls_srtp_profile_t = 6;
#[doc = " gnutls_srtp_profile_t:"]
#[doc = " @GNUTLS_SRTP_AES128_CM_HMAC_SHA1_80: 128 bit AES with a 80 bit HMAC-SHA1"]
#[doc = " @GNUTLS_SRTP_AES128_CM_HMAC_SHA1_32: 128 bit AES with a 32 bit HMAC-SHA1"]
#[doc = " @GNUTLS_SRTP_NULL_HMAC_SHA1_80: NULL cipher with a 80 bit HMAC-SHA1"]
#[doc = " @GNUTLS_SRTP_NULL_HMAC_SHA1_32: NULL cipher with a 32 bit HMAC-SHA1"]
#[doc = ""]
#[doc = " Enumeration of different SRTP protection profiles."]
pub type gnutls_srtp_profile_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_srtp_set_profile(
        session: gnutls_session_t,
        profile: gnutls_srtp_profile_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srtp_set_profile_direct(
        session: gnutls_session_t,
        profiles: *const ::std::os::raw::c_char,
        err_pos: *mut *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srtp_get_selected_profile(
        session: gnutls_session_t,
        profile: *mut gnutls_srtp_profile_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srtp_get_profile_name(
        profile: gnutls_srtp_profile_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_srtp_get_profile_id(
        name: *const ::std::os::raw::c_char,
        profile: *mut gnutls_srtp_profile_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srtp_get_keys(
        session: gnutls_session_t,
        key_material: *mut ::std::os::raw::c_void,
        key_material_size: ::std::os::raw::c_uint,
        client_key: *mut gnutls_datum_t,
        client_salt: *mut gnutls_datum_t,
        server_key: *mut gnutls_datum_t,
        server_salt: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srtp_set_mki(
        session: gnutls_session_t,
        mki: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srtp_get_mki(
        session: gnutls_session_t,
        mki: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
pub const gnutls_alpn_flags_t_GNUTLS_ALPN_MANDATORY: gnutls_alpn_flags_t = 1;
pub const gnutls_alpn_flags_t_GNUTLS_ALPN_SERVER_PRECEDENCE: gnutls_alpn_flags_t = 2;
#[doc = " gnutls_alpn_flags_t:"]
#[doc = " @GNUTLS_ALPN_MANDATORY: Require ALPN negotiation. The connection will be"]
#[doc = "   aborted if no matching ALPN protocol is found."]
#[doc = " @GNUTLS_ALPN_SERVER_PRECEDENCE: The choices set by the server"]
#[doc = "   will take precedence over the client's."]
#[doc = ""]
#[doc = " Enumeration of different ALPN flags. These are used by gnutls_alpn_set_protocols()."]
pub type gnutls_alpn_flags_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_alpn_get_selected_protocol(
        session: gnutls_session_t,
        protocol: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_alpn_set_protocols(
        session: gnutls_session_t,
        protocols: *const gnutls_datum_t,
        protocols_size: ::std::os::raw::c_uint,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_key_generate(
        key: *mut gnutls_datum_t,
        key_size: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_init(
        priority_cache: *mut gnutls_priority_t,
        priorities: *const ::std::os::raw::c_char,
        err_pos: *mut *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_init2(
        priority_cache: *mut gnutls_priority_t,
        priorities: *const ::std::os::raw::c_char,
        err_pos: *mut *const ::std::os::raw::c_char,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_deinit(priority_cache: gnutls_priority_t);
}
extern "C" {
    pub fn gnutls_priority_get_cipher_suite_index(
        pcache: gnutls_priority_t,
        idx: ::std::os::raw::c_uint,
        sidx: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_string_list(
        iter: ::std::os::raw::c_uint,
        flags: ::std::os::raw::c_uint,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_priority_set(
        session: gnutls_session_t,
        priority: gnutls_priority_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_set_direct(
        session: gnutls_session_t,
        priorities: *const ::std::os::raw::c_char,
        err_pos: *mut *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_certificate_type_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_certificate_type_list2(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
        target: gnutls_ctype_target_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_sign_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_protocol_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_ecc_curve_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_group_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_kx_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_cipher_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_priority_mac_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_get_system_config_file() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_set_default_priority(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_set_default_priority_append(
        session: gnutls_session_t,
        add_prio: *const ::std::os::raw::c_char,
        err_pos: *mut *const ::std::os::raw::c_char,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_cipher_suite_get_name(
        kx_algorithm: gnutls_kx_algorithm_t,
        cipher_algorithm: gnutls_cipher_algorithm_t,
        mac_algorithm: gnutls_mac_algorithm_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_protocol_get_version(session: gnutls_session_t) -> gnutls_protocol_t;
}
extern "C" {
    pub fn gnutls_protocol_get_name(version: gnutls_protocol_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_session_set_data(
        session: gnutls_session_t,
        session_data: *const ::std::os::raw::c_void,
        session_data_size: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_get_data(
        session: gnutls_session_t,
        session_data: *mut ::std::os::raw::c_void,
        session_data_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_get_data2(
        session: gnutls_session_t,
        data: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_get_random(
        session: gnutls_session_t,
        client: *mut gnutls_datum_t,
        server: *mut gnutls_datum_t,
    );
}
extern "C" {
    pub fn gnutls_session_get_master_secret(session: gnutls_session_t, secret: *mut gnutls_datum_t);
}
extern "C" {
    pub fn gnutls_session_get_desc(session: gnutls_session_t) -> *mut ::std::os::raw::c_char;
}
pub type gnutls_certificate_verify_function =
    ::std::option::Option<unsafe extern "C" fn(arg1: gnutls_session_t) -> ::std::os::raw::c_int>;
extern "C" {
    pub fn gnutls_session_set_verify_function(
        session: gnutls_session_t,
        func: gnutls_certificate_verify_function,
    );
}
pub const gnutls_vdata_types_t_GNUTLS_DT_UNKNOWN: gnutls_vdata_types_t = 0;
pub const gnutls_vdata_types_t_GNUTLS_DT_DNS_HOSTNAME: gnutls_vdata_types_t = 1;
pub const gnutls_vdata_types_t_GNUTLS_DT_KEY_PURPOSE_OID: gnutls_vdata_types_t = 2;
pub const gnutls_vdata_types_t_GNUTLS_DT_RFC822NAME: gnutls_vdata_types_t = 3;
pub const gnutls_vdata_types_t_GNUTLS_DT_IP_ADDRESS: gnutls_vdata_types_t = 4;
#[doc = " gnutls_vdata_types_t:"]
#[doc = " @GNUTLS_DT_UNKNOWN: Unknown data type."]
#[doc = " @GNUTLS_DT_DNS_HOSTNAME: The data contain a null-terminated DNS hostname; the hostname will be"]
#[doc = "   matched using the RFC6125 rules. If the data contain a textual IP (v4 or v6) address it will"]
#[doc = "   be marched against the IPAddress Alternative name, unless the verification flag %GNUTLS_VERIFY_DO_NOT_ALLOW_IP_MATCHES"]
#[doc = "   is specified."]
#[doc = " @GNUTLS_DT_IP_ADDRESS: The data contain a raw IP address (4 or 16 bytes). If will be matched"]
#[doc = "   against the IPAddress Alternative name; option available since 3.6.0."]
#[doc = " @GNUTLS_DT_RFC822NAME: The data contain a null-terminated email address; the email will be"]
#[doc = "   matched against the RFC822Name Alternative name of the certificate, or the EMAIL DN component if the"]
#[doc = "   former isn't available. Prior to matching the email address will be converted to ACE"]
#[doc = "   (ASCII-compatible-encoding)."]
#[doc = " @GNUTLS_DT_KEY_PURPOSE_OID: The data contain a null-terminated key purpose OID. It will be matched"]
#[doc = "   against the certificate's Extended Key Usage extension."]
#[doc = ""]
#[doc = " Enumeration of different typed-data options. They are used as input to certificate"]
#[doc = " verification functions to provide information about the name and purpose of the"]
#[doc = " certificate. Only a single option of a type can be provided to the relevant functions"]
#[doc = " (i.e., options %GNUTLS_DT_DNS_HOSTNAME, %GNUTLS_DT_IP_ADDRESS and"]
#[doc = " %GNUTLS_DT_RFC822NAME cannot be combined)."]
pub type gnutls_vdata_types_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_typed_vdata_st {
    pub type_: gnutls_vdata_types_t,
    pub data: *mut ::std::os::raw::c_uchar,
    pub size: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_gnutls_typed_vdata_st() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_typed_vdata_st>(),
        24usize,
        concat!("Size of: ", stringify!(gnutls_typed_vdata_st))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_typed_vdata_st>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_typed_vdata_st))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_typed_vdata_st>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_typed_vdata_st),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_typed_vdata_st>())).data as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_typed_vdata_st),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_typed_vdata_st>())).size as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_typed_vdata_st),
            "::",
            stringify!(size)
        )
    );
}
extern "C" {
    pub fn gnutls_session_set_verify_cert(
        session: gnutls_session_t,
        hostname: *const ::std::os::raw::c_char,
        flags: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_session_set_verify_cert2(
        session: gnutls_session_t,
        data: *mut gnutls_typed_vdata_st,
        elements: ::std::os::raw::c_uint,
        flags: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_session_get_verify_cert_status(arg1: gnutls_session_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_session_set_premaster(
        session: gnutls_session_t,
        entity: ::std::os::raw::c_uint,
        version: gnutls_protocol_t,
        kx: gnutls_kx_algorithm_t,
        cipher: gnutls_cipher_algorithm_t,
        mac: gnutls_mac_algorithm_t,
        comp: gnutls_compression_method_t,
        master: *const gnutls_datum_t,
        session_id: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_get_id(
        session: gnutls_session_t,
        session_id: *mut ::std::os::raw::c_void,
        session_id_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_get_id2(
        session: gnutls_session_t,
        session_id: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_set_id(
        session: gnutls_session_t,
        sid: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_channel_binding(
        session: gnutls_session_t,
        cbtype: gnutls_channel_binding_t,
        cb: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_is_resumed(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_resumption_requested(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
pub type gnutls_db_store_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut ::std::os::raw::c_void,
        key: gnutls_datum_t,
        data: gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_db_remove_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut ::std::os::raw::c_void,
        key: gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_db_retr_func = ::std::option::Option<
    unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, key: gnutls_datum_t) -> gnutls_datum_t,
>;
extern "C" {
    pub fn gnutls_db_set_cache_expiration(
        session: gnutls_session_t,
        seconds: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn gnutls_db_get_default_cache_expiration() -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_db_remove_session(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_db_set_retrieve_function(
        session: gnutls_session_t,
        retr_func: gnutls_db_retr_func,
    );
}
extern "C" {
    pub fn gnutls_db_set_remove_function(
        session: gnutls_session_t,
        rem_func: gnutls_db_remove_func,
    );
}
extern "C" {
    pub fn gnutls_db_set_store_function(
        session: gnutls_session_t,
        store_func: gnutls_db_store_func,
    );
}
extern "C" {
    pub fn gnutls_db_set_ptr(session: gnutls_session_t, ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
    pub fn gnutls_db_get_ptr(session: gnutls_session_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn gnutls_db_check_entry(
        session: gnutls_session_t,
        session_entry: gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_db_check_entry_time(entry: *mut gnutls_datum_t) -> time_t;
}
extern "C" {
    pub fn gnutls_db_check_entry_expire_time(entry: *mut gnutls_datum_t) -> time_t;
}
pub type gnutls_handshake_hook_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        htype: ::std::os::raw::c_uint,
        when: ::std::os::raw::c_uint,
        incoming: ::std::os::raw::c_uint,
        msg: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_handshake_set_hook_function(
        session: gnutls_session_t,
        htype: ::std::os::raw::c_uint,
        when: ::std::os::raw::c_int,
        func: gnutls_handshake_hook_func,
    );
}
pub type gnutls_handshake_simple_hook_func =
    ::std::option::Option<unsafe extern "C" fn(arg1: gnutls_session_t) -> ::std::os::raw::c_int>;
extern "C" {
    pub fn gnutls_handshake_set_post_client_hello_function(
        session: gnutls_session_t,
        func: gnutls_handshake_simple_hook_func,
    );
}
extern "C" {
    pub fn gnutls_handshake_set_max_packet_length(session: gnutls_session_t, max: size_t);
}
extern "C" {
    pub fn gnutls_check_version(
        req_version: *const ::std::os::raw::c_char,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_credentials_clear(session: gnutls_session_t);
}
extern "C" {
    pub fn gnutls_credentials_set(
        session: gnutls_session_t,
        type_: gnutls_credentials_type_t,
        cred: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_credentials_get(
        session: gnutls_session_t,
        type_: gnutls_credentials_type_t,
        cred: *mut *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_pubkey_st {
    _unused: [u8; 0],
}
pub type gnutls_pubkey_t = *mut gnutls_pubkey_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_privkey_st {
    _unused: [u8; 0],
}
pub type gnutls_privkey_t = *mut gnutls_privkey_st;
pub type gnutls_x509_privkey_t = *mut gnutls_x509_privkey_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_x509_crl_int {
    _unused: [u8; 0],
}
pub type gnutls_x509_crl_t = *mut gnutls_x509_crl_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_x509_crt_int {
    _unused: [u8; 0],
}
pub type gnutls_x509_crt_t = *mut gnutls_x509_crt_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_x509_crq_int {
    _unused: [u8; 0],
}
pub type gnutls_x509_crq_t = *mut gnutls_x509_crq_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_openpgp_keyring_int {
    _unused: [u8; 0],
}
pub type gnutls_openpgp_keyring_t = *mut gnutls_openpgp_keyring_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_certificate_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_certificate_credentials_t = *mut gnutls_certificate_credentials_st;
pub type gnutls_certificate_server_credentials = gnutls_certificate_credentials_t;
pub type gnutls_certificate_client_credentials = gnutls_certificate_credentials_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_anon_server_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_anon_server_credentials_t = *mut gnutls_anon_server_credentials_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_anon_client_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_anon_client_credentials_t = *mut gnutls_anon_client_credentials_st;
extern "C" {
    pub fn gnutls_anon_free_server_credentials(sc: gnutls_anon_server_credentials_t);
}
extern "C" {
    pub fn gnutls_anon_allocate_server_credentials(
        sc: *mut gnutls_anon_server_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_anon_set_server_dh_params(
        res: gnutls_anon_server_credentials_t,
        dh_params: gnutls_dh_params_t,
    );
}
extern "C" {
    pub fn gnutls_anon_set_server_known_dh_params(
        res: gnutls_anon_server_credentials_t,
        sec_param: gnutls_sec_param_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_anon_set_server_params_function(
        res: gnutls_anon_server_credentials_t,
        func: gnutls_params_function,
    );
}
extern "C" {
    pub fn gnutls_anon_free_client_credentials(sc: gnutls_anon_client_credentials_t);
}
extern "C" {
    pub fn gnutls_anon_allocate_client_credentials(
        sc: *mut gnutls_anon_client_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_free_credentials(sc: gnutls_certificate_credentials_t);
}
extern "C" {
    pub fn gnutls_certificate_allocate_credentials(
        res: *mut gnutls_certificate_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_get_issuer(
        sc: gnutls_certificate_credentials_t,
        cert: gnutls_x509_crt_t,
        issuer: *mut gnutls_x509_crt_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_get_crt_raw(
        sc: gnutls_certificate_credentials_t,
        idx1: ::std::os::raw::c_uint,
        idx2: ::std::os::raw::c_uint,
        cert: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_free_keys(sc: gnutls_certificate_credentials_t);
}
extern "C" {
    pub fn gnutls_certificate_free_cas(sc: gnutls_certificate_credentials_t);
}
extern "C" {
    pub fn gnutls_certificate_free_ca_names(sc: gnutls_certificate_credentials_t);
}
extern "C" {
    pub fn gnutls_certificate_free_crls(sc: gnutls_certificate_credentials_t);
}
extern "C" {
    pub fn gnutls_certificate_set_dh_params(
        res: gnutls_certificate_credentials_t,
        dh_params: gnutls_dh_params_t,
    );
}
extern "C" {
    pub fn gnutls_certificate_set_known_dh_params(
        res: gnutls_certificate_credentials_t,
        sec_param: gnutls_sec_param_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_verify_flags(
        res: gnutls_certificate_credentials_t,
        flags: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_certificate_get_verify_flags(
        res: gnutls_certificate_credentials_t,
    ) -> ::std::os::raw::c_uint;
}
pub const gnutls_certificate_flags_GNUTLS_CERTIFICATE_SKIP_KEY_CERT_MATCH:
    gnutls_certificate_flags = 1;
pub const gnutls_certificate_flags_GNUTLS_CERTIFICATE_API_V2: gnutls_certificate_flags = 2;
pub const gnutls_certificate_flags_GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK:
    gnutls_certificate_flags = 4;
pub const gnutls_certificate_flags_GNUTLS_CERTIFICATE_VERIFY_CRLS: gnutls_certificate_flags = 8;
#[doc = " gnutls_certificate_flags:"]
#[doc = " @GNUTLS_CERTIFICATE_SKIP_KEY_CERT_MATCH: Skip the key and certificate matching check."]
#[doc = " @GNUTLS_CERTIFICATE_API_V2: If set the gnutls_certificate_set_*key* functions will return an index of the added key pair instead of zero."]
#[doc = " @GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK: If set, the gnutls_certificate_set_ocsp_status_request_file"]
#[doc = "    function, will not check whether the response set matches any of the certificates."]
#[doc = " @GNUTLS_CERTIFICATE_VERIFY_CRLS: This will enable CRL verification when added in the certificate structure."]
#[doc = "    When used, it requires CAs to be added before CRLs."]
#[doc = ""]
#[doc = " Enumeration of different certificate credentials flags."]
pub type gnutls_certificate_flags = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_certificate_set_flags(
        arg1: gnutls_certificate_credentials_t,
        flags: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_certificate_set_verify_limits(
        res: gnutls_certificate_credentials_t,
        max_bits: ::std::os::raw::c_uint,
        max_depth: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_certificate_set_x509_system_trust(
        cred: gnutls_certificate_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_trust_file(
        cred: gnutls_certificate_credentials_t,
        cafile: *const ::std::os::raw::c_char,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_trust_dir(
        cred: gnutls_certificate_credentials_t,
        ca_dir: *const ::std::os::raw::c_char,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_trust_mem(
        res: gnutls_certificate_credentials_t,
        ca: *const gnutls_datum_t,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_crl_file(
        res: gnutls_certificate_credentials_t,
        crlfile: *const ::std::os::raw::c_char,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_crl_mem(
        res: gnutls_certificate_credentials_t,
        CRL: *const gnutls_datum_t,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_key_file(
        res: gnutls_certificate_credentials_t,
        certfile: *const ::std::os::raw::c_char,
        keyfile: *const ::std::os::raw::c_char,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_key_file2(
        res: gnutls_certificate_credentials_t,
        certfile: *const ::std::os::raw::c_char,
        keyfile: *const ::std::os::raw::c_char,
        type_: gnutls_x509_crt_fmt_t,
        pass: *const ::std::os::raw::c_char,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_key_mem(
        res: gnutls_certificate_credentials_t,
        cert: *const gnutls_datum_t,
        key: *const gnutls_datum_t,
        type_: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_key_mem2(
        res: gnutls_certificate_credentials_t,
        cert: *const gnutls_datum_t,
        key: *const gnutls_datum_t,
        type_: gnutls_x509_crt_fmt_t,
        pass: *const ::std::os::raw::c_char,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_send_x509_rdn_sequence(
        session: gnutls_session_t,
        status: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn gnutls_certificate_set_x509_simple_pkcs12_file(
        res: gnutls_certificate_credentials_t,
        pkcs12file: *const ::std::os::raw::c_char,
        type_: gnutls_x509_crt_fmt_t,
        password: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_simple_pkcs12_mem(
        res: gnutls_certificate_credentials_t,
        p12blob: *const gnutls_datum_t,
        type_: gnutls_x509_crt_fmt_t,
        password: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_key(
        res: gnutls_certificate_credentials_t,
        cert_list: *mut gnutls_x509_crt_t,
        cert_list_size: ::std::os::raw::c_int,
        key: gnutls_x509_privkey_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_trust(
        res: gnutls_certificate_credentials_t,
        ca_list: *mut gnutls_x509_crt_t,
        ca_list_size: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_x509_crl(
        res: gnutls_certificate_credentials_t,
        crl_list: *mut gnutls_x509_crl_t,
        crl_list_size: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_get_x509_key(
        res: gnutls_certificate_credentials_t,
        index: ::std::os::raw::c_uint,
        key: *mut gnutls_x509_privkey_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_get_x509_crt(
        res: gnutls_certificate_credentials_t,
        index: ::std::os::raw::c_uint,
        crt_list: *mut *mut gnutls_x509_crt_t,
        crt_list_size: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
pub type gnutls_status_request_ocsp_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        ptr: *mut ::std::os::raw::c_void,
        ocsp_response: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_certificate_set_ocsp_status_request_function(
        res: gnutls_certificate_credentials_t,
        ocsp_func: gnutls_status_request_ocsp_func,
        ptr: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    pub fn gnutls_certificate_set_ocsp_status_request_function2(
        res: gnutls_certificate_credentials_t,
        idx: ::std::os::raw::c_uint,
        ocsp_func: gnutls_status_request_ocsp_func,
        ptr: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_ocsp_status_request_file(
        res: gnutls_certificate_credentials_t,
        response_file: *const ::std::os::raw::c_char,
        idx: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_ocsp_status_request_file2(
        res: gnutls_certificate_credentials_t,
        response_file: *const ::std::os::raw::c_char,
        idx: ::std::os::raw::c_uint,
        fmt: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_ocsp_status_request_mem(
        res: gnutls_certificate_credentials_t,
        resp: *const gnutls_datum_t,
        idx: ::std::os::raw::c_uint,
        fmt: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_ocsp_data_st {
    pub version: ::std::os::raw::c_uint,
    pub response: gnutls_datum_t,
    pub exptime: time_t,
    pub padding: [::std::os::raw::c_uchar; 32usize],
}
#[test]
fn bindgen_test_layout_gnutls_ocsp_data_st() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_ocsp_data_st>(),
        64usize,
        concat!("Size of: ", stringify!(gnutls_ocsp_data_st))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_ocsp_data_st>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_ocsp_data_st))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_ocsp_data_st>())).version as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_ocsp_data_st),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_ocsp_data_st>())).response as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_ocsp_data_st),
            "::",
            stringify!(response)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_ocsp_data_st>())).exptime as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_ocsp_data_st),
            "::",
            stringify!(exptime)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_ocsp_data_st>())).padding as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_ocsp_data_st),
            "::",
            stringify!(padding)
        )
    );
}
extern "C" {
    pub fn gnutls_certificate_get_ocsp_expiration(
        sc: gnutls_certificate_credentials_t,
        idx: ::std::os::raw::c_uint,
        oidx: ::std::os::raw::c_int,
        flags: ::std::os::raw::c_uint,
    ) -> time_t;
}
extern "C" {
    pub fn gnutls_ocsp_status_request_enable_client(
        session: gnutls_session_t,
        responder_id: *mut gnutls_datum_t,
        responder_id_size: size_t,
        request_extensions: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_ocsp_status_request_get(
        session: gnutls_session_t,
        response: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_ocsp_status_request_is_checked(
        session: gnutls_session_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_ocsp_status_request_get2(
        session: gnutls_session_t,
        idx: ::std::os::raw::c_uint,
        response: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_rawpk_key_mem(
        cred: gnutls_certificate_credentials_t,
        spki: *const gnutls_datum_t,
        pkey: *const gnutls_datum_t,
        format: gnutls_x509_crt_fmt_t,
        pass: *const ::std::os::raw::c_char,
        key_usage: ::std::os::raw::c_uint,
        names: *mut *const ::std::os::raw::c_char,
        names_length: ::std::os::raw::c_uint,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_rawpk_key_file(
        cred: gnutls_certificate_credentials_t,
        rawpkfile: *const ::std::os::raw::c_char,
        privkeyfile: *const ::std::os::raw::c_char,
        format: gnutls_x509_crt_fmt_t,
        pass: *const ::std::os::raw::c_char,
        key_usage: ::std::os::raw::c_uint,
        names: *mut *const ::std::os::raw::c_char,
        names_length: ::std::os::raw::c_uint,
        privkey_flags: ::std::os::raw::c_uint,
        pkcs11_flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_global_init() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_global_deinit();
}
extern "C" {
    pub fn gnutls_get_library_config() -> *const gnutls_library_config_st;
}
#[doc = " gnutls_time_func:"]
#[doc = " @t: where to store time."]
#[doc = ""]
#[doc = " Function prototype for time()-like function.  Set with"]
#[doc = " gnutls_global_set_time_function()."]
#[doc = ""]
#[doc = " Returns: Number of seconds since the epoch, or (time_t)-1 on errors."]
pub type gnutls_time_func = ::std::option::Option<unsafe extern "C" fn(t: *mut time_t) -> time_t>;
pub type mutex_init_func = ::std::option::Option<
    unsafe extern "C" fn(mutex: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type mutex_lock_func = ::std::option::Option<
    unsafe extern "C" fn(mutex: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type mutex_unlock_func = ::std::option::Option<
    unsafe extern "C" fn(mutex: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type mutex_deinit_func = ::std::option::Option<
    unsafe extern "C" fn(mutex: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_global_set_mutex(
        init: mutex_init_func,
        deinit: mutex_deinit_func,
        lock: mutex_lock_func,
        unlock: mutex_unlock_func,
    );
}
pub type gnutls_alloc_function =
    ::std::option::Option<unsafe extern "C" fn(arg1: size_t) -> *mut ::std::os::raw::c_void>;
pub type gnutls_calloc_function = ::std::option::Option<
    unsafe extern "C" fn(arg1: size_t, arg2: size_t) -> *mut ::std::os::raw::c_void,
>;
pub type gnutls_is_secure_function = ::std::option::Option<
    unsafe extern "C" fn(arg1: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>;
pub type gnutls_free_function =
    ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
pub type gnutls_realloc_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut ::std::os::raw::c_void,
        arg2: size_t,
    ) -> *mut ::std::os::raw::c_void,
>;
extern "C" {
    pub fn gnutls_global_set_time_function(time_func: gnutls_time_func);
}
extern "C" {
    pub static mut gnutls_malloc: gnutls_alloc_function;
}
extern "C" {
    pub static mut gnutls_realloc: gnutls_realloc_function;
}
extern "C" {
    pub static mut gnutls_calloc: gnutls_calloc_function;
}
extern "C" {
    pub static mut gnutls_free: gnutls_free_function;
}
extern "C" {
    pub static mut gnutls_strdup: ::std::option::Option<
        unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char,
    >;
}
extern "C" {
    pub fn gnutls_memset(data: *mut ::std::os::raw::c_void, c: ::std::os::raw::c_int, size: size_t);
}
extern "C" {
    pub fn gnutls_memcmp(
        s1: *const ::std::os::raw::c_void,
        s2: *const ::std::os::raw::c_void,
        n: size_t,
    ) -> ::std::os::raw::c_int;
}
pub type gnutls_log_func = ::std::option::Option<
    unsafe extern "C" fn(arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char),
>;
pub type gnutls_audit_log_func = ::std::option::Option<
    unsafe extern "C" fn(arg1: gnutls_session_t, arg2: *const ::std::os::raw::c_char),
>;
extern "C" {
    pub fn gnutls_global_set_log_function(log_func: gnutls_log_func);
}
extern "C" {
    pub fn gnutls_global_set_audit_log_function(log_func: gnutls_audit_log_func);
}
extern "C" {
    pub fn gnutls_global_set_log_level(level: ::std::os::raw::c_int);
}
#[doc = " gnutls_keylog_func:"]
#[doc = " @session: the current session"]
#[doc = " @label: the keylog label"]
#[doc = " @secret: the (const) data of the derived secret."]
#[doc = ""]
#[doc = " Function prototype for keylog hooks. It is set using"]
#[doc = " gnutls_session_set_keylog_function()."]
#[doc = ""]
#[doc = " Returns: Non zero on error."]
#[doc = " Since: 3.6.13"]
pub type gnutls_keylog_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        label: *const ::std::os::raw::c_char,
        secret: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_session_get_keylog_function(session: gnutls_session_t) -> gnutls_keylog_func;
}
extern "C" {
    pub fn gnutls_session_set_keylog_function(session: gnutls_session_t, func: gnutls_keylog_func);
}
extern "C" {
    pub fn gnutls_dh_params_init(dh_params: *mut gnutls_dh_params_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_deinit(dh_params: gnutls_dh_params_t);
}
extern "C" {
    pub fn gnutls_dh_params_import_raw(
        dh_params: gnutls_dh_params_t,
        prime: *const gnutls_datum_t,
        generator: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_import_dsa(
        dh_params: gnutls_dh_params_t,
        key: gnutls_x509_privkey_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_import_raw2(
        dh_params: gnutls_dh_params_t,
        prime: *const gnutls_datum_t,
        generator: *const gnutls_datum_t,
        key_bits: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_import_raw3(
        dh_params: gnutls_dh_params_t,
        prime: *const gnutls_datum_t,
        q: *const gnutls_datum_t,
        generator: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_import_pkcs3(
        params: gnutls_dh_params_t,
        pkcs3_params: *const gnutls_datum_t,
        format: gnutls_x509_crt_fmt_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_generate2(
        params: gnutls_dh_params_t,
        bits: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_export_pkcs3(
        params: gnutls_dh_params_t,
        format: gnutls_x509_crt_fmt_t,
        params_data: *mut ::std::os::raw::c_uchar,
        params_data_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_export2_pkcs3(
        params: gnutls_dh_params_t,
        format: gnutls_x509_crt_fmt_t,
        out: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_export_raw(
        params: gnutls_dh_params_t,
        prime: *mut gnutls_datum_t,
        generator: *mut gnutls_datum_t,
        bits: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_params_cpy(
        dst: gnutls_dh_params_t,
        src: gnutls_dh_params_t,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iovec {
    pub iov_base: *mut ::std::os::raw::c_void,
    pub iov_len: size_t,
}
#[test]
fn bindgen_test_layout_iovec() {
    assert_eq!(
        ::std::mem::size_of::<iovec>(),
        16usize,
        concat!("Size of: ", stringify!(iovec))
    );
    assert_eq!(
        ::std::mem::align_of::<iovec>(),
        8usize,
        concat!("Alignment of ", stringify!(iovec))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<iovec>())).iov_base as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(iovec),
            "::",
            stringify!(iov_base)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<iovec>())).iov_len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(iovec),
            "::",
            stringify!(iov_len)
        )
    );
}
pub const uio_rw_UIO_READ: uio_rw = 0;
pub const uio_rw_UIO_WRITE: uio_rw = 1;
pub type uio_rw = ::std::os::raw::c_uint;
extern "C" {
    pub fn readv(
        arg1: ::std::os::raw::c_int,
        arg2: *const iovec,
        arg3: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    pub fn writev(
        arg1: ::std::os::raw::c_int,
        arg2: *const iovec,
        arg3: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    pub fn preadv(
        arg1: ::std::os::raw::c_int,
        arg2: *const iovec,
        arg3: ::std::os::raw::c_int,
        arg4: off_t,
    ) -> ssize_t;
}
extern "C" {
    pub fn pwritev(
        arg1: ::std::os::raw::c_int,
        arg2: *const iovec,
        arg3: ::std::os::raw::c_int,
        arg4: off_t,
    ) -> ssize_t;
}
pub type giovec_t = iovec;
pub type gnutls_pull_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_transport_ptr_t,
        arg2: *mut ::std::os::raw::c_void,
        arg3: size_t,
    ) -> ssize_t,
>;
pub type gnutls_push_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_transport_ptr_t,
        arg2: *const ::std::os::raw::c_void,
        arg3: size_t,
    ) -> ssize_t,
>;
extern "C" {
    pub fn gnutls_system_recv_timeout(
        ptr: gnutls_transport_ptr_t,
        ms: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
pub type gnutls_pull_timeout_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_transport_ptr_t,
        ms: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_vec_push_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_transport_ptr_t,
        iov: *const giovec_t,
        iovcnt: ::std::os::raw::c_int,
    ) -> ssize_t,
>;
pub type gnutls_errno_func = ::std::option::Option<
    unsafe extern "C" fn(arg1: gnutls_transport_ptr_t) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_transport_set_int2(
        session: gnutls_session_t,
        r: ::std::os::raw::c_int,
        s: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn gnutls_transport_get_int2(
        session: gnutls_session_t,
        r: *mut ::std::os::raw::c_int,
        s: *mut ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn gnutls_transport_get_int(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_transport_set_ptr(session: gnutls_session_t, ptr: gnutls_transport_ptr_t);
}
extern "C" {
    pub fn gnutls_transport_set_ptr2(
        session: gnutls_session_t,
        recv_ptr: gnutls_transport_ptr_t,
        send_ptr: gnutls_transport_ptr_t,
    );
}
extern "C" {
    pub fn gnutls_transport_get_ptr(session: gnutls_session_t) -> gnutls_transport_ptr_t;
}
extern "C" {
    pub fn gnutls_transport_get_ptr2(
        session: gnutls_session_t,
        recv_ptr: *mut gnutls_transport_ptr_t,
        send_ptr: *mut gnutls_transport_ptr_t,
    );
}
extern "C" {
    pub fn gnutls_transport_set_vec_push_function(
        session: gnutls_session_t,
        vec_func: gnutls_vec_push_func,
    );
}
extern "C" {
    pub fn gnutls_transport_set_push_function(
        session: gnutls_session_t,
        push_func: gnutls_push_func,
    );
}
extern "C" {
    pub fn gnutls_transport_set_pull_function(
        session: gnutls_session_t,
        pull_func: gnutls_pull_func,
    );
}
extern "C" {
    pub fn gnutls_transport_set_pull_timeout_function(
        session: gnutls_session_t,
        func: gnutls_pull_timeout_func,
    );
}
extern "C" {
    pub fn gnutls_transport_set_errno_function(
        session: gnutls_session_t,
        errno_func: gnutls_errno_func,
    );
}
extern "C" {
    pub fn gnutls_transport_set_errno(session: gnutls_session_t, err: ::std::os::raw::c_int);
}
extern "C" {
    pub fn gnutls_session_set_ptr(session: gnutls_session_t, ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
    pub fn gnutls_session_get_ptr(session: gnutls_session_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn gnutls_openpgp_send_cert(session: gnutls_session_t, status: gnutls_openpgp_crt_status_t);
}
extern "C" {
    pub fn gnutls_fingerprint(
        algo: gnutls_digest_algorithm_t,
        data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_void,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
pub const gnutls_random_art_GNUTLS_RANDOM_ART_OPENSSH: gnutls_random_art = 1;
#[doc = " gnutls_random_art_t:"]
#[doc = " @GNUTLS_RANDOM_ART_OPENSSH: OpenSSH-style random art."]
#[doc = ""]
#[doc = " Enumeration of different random art types."]
pub type gnutls_random_art = ::std::os::raw::c_uint;
#[doc = " gnutls_random_art_t:"]
#[doc = " @GNUTLS_RANDOM_ART_OPENSSH: OpenSSH-style random art."]
#[doc = ""]
#[doc = " Enumeration of different random art types."]
pub use self::gnutls_random_art as gnutls_random_art_t;
extern "C" {
    pub fn gnutls_random_art(
        type_: gnutls_random_art_t,
        key_type: *const ::std::os::raw::c_char,
        key_size: ::std::os::raw::c_uint,
        fpr: *mut ::std::os::raw::c_void,
        fpr_size: size_t,
        art: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_idna_map(
        input: *const ::std::os::raw::c_char,
        ilen: ::std::os::raw::c_uint,
        out: *mut gnutls_datum_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_idna_reverse_map(
        input: *const ::std::os::raw::c_char,
        ilen: ::std::os::raw::c_uint,
        out: *mut gnutls_datum_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_srp_server_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_srp_server_credentials_t = *mut gnutls_srp_server_credentials_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_srp_client_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_srp_client_credentials_t = *mut gnutls_srp_client_credentials_st;
extern "C" {
    pub fn gnutls_srp_free_client_credentials(sc: gnutls_srp_client_credentials_t);
}
extern "C" {
    pub fn gnutls_srp_allocate_client_credentials(
        sc: *mut gnutls_srp_client_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_set_client_credentials(
        res: gnutls_srp_client_credentials_t,
        username: *const ::std::os::raw::c_char,
        password: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_free_server_credentials(sc: gnutls_srp_server_credentials_t);
}
extern "C" {
    pub fn gnutls_srp_allocate_server_credentials(
        sc: *mut gnutls_srp_server_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_set_server_credentials_file(
        res: gnutls_srp_server_credentials_t,
        password_file: *const ::std::os::raw::c_char,
        password_conf_file: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_server_get_username(
        session: gnutls_session_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_srp_set_prime_bits(session: gnutls_session_t, bits: ::std::os::raw::c_uint);
}
extern "C" {
    pub fn gnutls_srp_verifier(
        username: *const ::std::os::raw::c_char,
        password: *const ::std::os::raw::c_char,
        salt: *const gnutls_datum_t,
        generator: *const gnutls_datum_t,
        prime: *const gnutls_datum_t,
        res: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub static gnutls_srp_8192_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_8192_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_4096_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_4096_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_3072_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_3072_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_2048_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_2048_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_1536_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_1536_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_1024_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_srp_1024_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_8192_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_8192_group_q: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_8192_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_8192_key_bits: ::std::os::raw::c_uint;
}
extern "C" {
    pub static gnutls_ffdhe_6144_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_6144_group_q: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_6144_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_6144_key_bits: ::std::os::raw::c_uint;
}
extern "C" {
    pub static gnutls_ffdhe_4096_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_4096_group_q: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_4096_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_4096_key_bits: ::std::os::raw::c_uint;
}
extern "C" {
    pub static gnutls_ffdhe_3072_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_3072_group_q: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_3072_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_3072_key_bits: ::std::os::raw::c_uint;
}
extern "C" {
    pub static gnutls_ffdhe_2048_group_prime: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_2048_group_q: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_2048_group_generator: gnutls_datum_t;
}
extern "C" {
    pub static gnutls_ffdhe_2048_key_bits: ::std::os::raw::c_uint;
}
pub type gnutls_srp_server_credentials_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        username: *const ::std::os::raw::c_char,
        salt: *mut gnutls_datum_t,
        verifier: *mut gnutls_datum_t,
        generator: *mut gnutls_datum_t,
        prime: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_srp_set_server_credentials_function(
        cred: gnutls_srp_server_credentials_t,
        func: gnutls_srp_server_credentials_function,
    );
}
pub type gnutls_srp_client_credentials_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        arg2: *mut *mut ::std::os::raw::c_char,
        arg3: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_srp_set_client_credentials_function(
        cred: gnutls_srp_client_credentials_t,
        func: gnutls_srp_client_credentials_function,
    );
}
extern "C" {
    pub fn gnutls_srp_base64_encode(
        data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_char,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_base64_encode2(
        data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_base64_decode(
        b64_data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_char,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_base64_decode2(
        b64_data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_srp_set_server_fake_salt_seed(
        sc: gnutls_srp_server_credentials_t,
        seed: *const gnutls_datum_t,
        salt_length: ::std::os::raw::c_uint,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_psk_server_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_psk_server_credentials_t = *mut gnutls_psk_server_credentials_st;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_psk_client_credentials_st {
    _unused: [u8; 0],
}
pub type gnutls_psk_client_credentials_t = *mut gnutls_psk_client_credentials_st;
pub const gnutls_psk_key_flags_GNUTLS_PSK_KEY_RAW: gnutls_psk_key_flags = 0;
pub const gnutls_psk_key_flags_GNUTLS_PSK_KEY_HEX: gnutls_psk_key_flags = 1;
#[doc = " gnutls_psk_key_flags:"]
#[doc = " @GNUTLS_PSK_KEY_RAW: PSK-key in raw format."]
#[doc = " @GNUTLS_PSK_KEY_HEX: PSK-key in hex format."]
#[doc = ""]
#[doc = " Enumeration of different PSK key flags."]
pub type gnutls_psk_key_flags = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_psk_free_client_credentials(sc: gnutls_psk_client_credentials_t);
}
extern "C" {
    pub fn gnutls_psk_allocate_client_credentials(
        sc: *mut gnutls_psk_client_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_set_client_credentials(
        res: gnutls_psk_client_credentials_t,
        username: *const ::std::os::raw::c_char,
        key: *const gnutls_datum_t,
        flags: gnutls_psk_key_flags,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_set_client_credentials2(
        res: gnutls_psk_client_credentials_t,
        username: *const gnutls_datum_t,
        key: *const gnutls_datum_t,
        flags: gnutls_psk_key_flags,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_free_server_credentials(sc: gnutls_psk_server_credentials_t);
}
extern "C" {
    pub fn gnutls_psk_allocate_server_credentials(
        sc: *mut gnutls_psk_server_credentials_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_set_server_credentials_file(
        res: gnutls_psk_server_credentials_t,
        password_file: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_set_server_credentials_hint(
        res: gnutls_psk_server_credentials_t,
        hint: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_server_get_username(
        session: gnutls_session_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_psk_server_get_username2(
        session: gnutls_session_t,
        out: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_client_get_hint(session: gnutls_session_t) -> *const ::std::os::raw::c_char;
}
pub type gnutls_psk_server_credentials_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        username: *const ::std::os::raw::c_char,
        key: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_psk_server_credentials_function2 = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        username: *const gnutls_datum_t,
        key: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_psk_set_server_credentials_function(
        cred: gnutls_psk_server_credentials_t,
        func: gnutls_psk_server_credentials_function,
    );
}
extern "C" {
    pub fn gnutls_psk_set_server_credentials_function2(
        cred: gnutls_psk_server_credentials_t,
        func: gnutls_psk_server_credentials_function2,
    );
}
pub type gnutls_psk_client_credentials_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        username: *mut *mut ::std::os::raw::c_char,
        key: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_psk_client_credentials_function2 = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        username: *mut gnutls_datum_t,
        key: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_psk_set_client_credentials_function(
        cred: gnutls_psk_client_credentials_t,
        func: gnutls_psk_client_credentials_function,
    );
}
extern "C" {
    pub fn gnutls_psk_set_client_credentials_function2(
        cred: gnutls_psk_client_credentials_t,
        func: gnutls_psk_client_credentials_function2,
    );
}
extern "C" {
    pub fn gnutls_hex_encode(
        data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_char,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_hex_decode(
        hex_data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_void,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_hex_encode2(
        data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_hex_decode2(
        data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_set_server_dh_params(
        res: gnutls_psk_server_credentials_t,
        dh_params: gnutls_dh_params_t,
    );
}
extern "C" {
    pub fn gnutls_psk_set_server_known_dh_params(
        res: gnutls_psk_server_credentials_t,
        sec_param: gnutls_sec_param_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_psk_set_server_params_function(
        res: gnutls_psk_server_credentials_t,
        func: gnutls_params_function,
    );
}
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_DNSNAME: gnutls_x509_subject_alt_name_t = 1;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_RFC822NAME: gnutls_x509_subject_alt_name_t = 2;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_URI: gnutls_x509_subject_alt_name_t = 3;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_IPADDRESS: gnutls_x509_subject_alt_name_t = 4;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_OTHERNAME: gnutls_x509_subject_alt_name_t = 5;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_DN: gnutls_x509_subject_alt_name_t = 6;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_REGISTERED_ID: gnutls_x509_subject_alt_name_t =
    7;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_MAX: gnutls_x509_subject_alt_name_t = 7;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_OTHERNAME_XMPP: gnutls_x509_subject_alt_name_t =
    1000;
pub const gnutls_x509_subject_alt_name_t_GNUTLS_SAN_OTHERNAME_KRB5PRINCIPAL:
    gnutls_x509_subject_alt_name_t = 1001;
#[doc = " gnutls_x509_subject_alt_name_t:"]
#[doc = " @GNUTLS_SAN_DNSNAME: DNS-name SAN."]
#[doc = " @GNUTLS_SAN_RFC822NAME: E-mail address SAN."]
#[doc = " @GNUTLS_SAN_URI: URI SAN."]
#[doc = " @GNUTLS_SAN_IPADDRESS: IP address SAN."]
#[doc = " @GNUTLS_SAN_OTHERNAME: OtherName SAN."]
#[doc = " @GNUTLS_SAN_DN: DN SAN."]
#[doc = " @GNUTLS_SAN_REGISTERED_ID: RegisteredID."]
#[doc = " @GNUTLS_SAN_OTHERNAME_XMPP: Virtual SAN, used by certain functions for convenience."]
#[doc = " @GNUTLS_SAN_OTHERNAME_KRB5PRINCIPAL: Virtual SAN, used by certain functions for convenience."]
#[doc = ""]
#[doc = " Enumeration of different subject alternative names types."]
pub type gnutls_x509_subject_alt_name_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_openpgp_crt_int {
    _unused: [u8; 0],
}
pub type gnutls_openpgp_crt_t = *mut gnutls_openpgp_crt_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_openpgp_privkey_int {
    _unused: [u8; 0],
}
pub type gnutls_openpgp_privkey_t = *mut gnutls_openpgp_privkey_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_pkcs11_privkey_st {
    _unused: [u8; 0],
}
pub type gnutls_pkcs11_privkey_t = *mut gnutls_pkcs11_privkey_st;
pub const gnutls_privkey_type_t_GNUTLS_PRIVKEY_X509: gnutls_privkey_type_t = 0;
pub const gnutls_privkey_type_t_GNUTLS_PRIVKEY_OPENPGP: gnutls_privkey_type_t = 1;
pub const gnutls_privkey_type_t_GNUTLS_PRIVKEY_PKCS11: gnutls_privkey_type_t = 2;
pub const gnutls_privkey_type_t_GNUTLS_PRIVKEY_EXT: gnutls_privkey_type_t = 3;
#[doc = " gnutls_privkey_type_t:"]
#[doc = " @GNUTLS_PRIVKEY_X509: X.509 private key, #gnutls_x509_privkey_t."]
#[doc = " @GNUTLS_PRIVKEY_OPENPGP: OpenPGP private key, #gnutls_openpgp_privkey_t."]
#[doc = " @GNUTLS_PRIVKEY_PKCS11: PKCS11 private key, #gnutls_pkcs11_privkey_t."]
#[doc = " @GNUTLS_PRIVKEY_EXT: External private key, operating using callbacks."]
#[doc = ""]
#[doc = " Enumeration of different private key types."]
pub type gnutls_privkey_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct gnutls_retr2_st {
    pub cert_type: gnutls_certificate_type_t,
    pub key_type: gnutls_privkey_type_t,
    pub cert: gnutls_retr2_st__bindgen_ty_1,
    pub ncerts: ::std::os::raw::c_uint,
    pub key: gnutls_retr2_st__bindgen_ty_2,
    pub deinit_all: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union gnutls_retr2_st__bindgen_ty_1 {
    pub x509: *mut gnutls_x509_crt_t,
    pub pgp: gnutls_openpgp_crt_t,
}
#[test]
fn bindgen_test_layout_gnutls_retr2_st__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_retr2_st__bindgen_ty_1>(),
        8usize,
        concat!("Size of: ", stringify!(gnutls_retr2_st__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_retr2_st__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_retr2_st__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<gnutls_retr2_st__bindgen_ty_1>())).x509 as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st__bindgen_ty_1),
            "::",
            stringify!(x509)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<gnutls_retr2_st__bindgen_ty_1>())).pgp as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st__bindgen_ty_1),
            "::",
            stringify!(pgp)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union gnutls_retr2_st__bindgen_ty_2 {
    pub x509: gnutls_x509_privkey_t,
    pub pgp: gnutls_openpgp_privkey_t,
    pub pkcs11: gnutls_pkcs11_privkey_t,
}
#[test]
fn bindgen_test_layout_gnutls_retr2_st__bindgen_ty_2() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_retr2_st__bindgen_ty_2>(),
        8usize,
        concat!("Size of: ", stringify!(gnutls_retr2_st__bindgen_ty_2))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_retr2_st__bindgen_ty_2>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_retr2_st__bindgen_ty_2))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<gnutls_retr2_st__bindgen_ty_2>())).x509 as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st__bindgen_ty_2),
            "::",
            stringify!(x509)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<gnutls_retr2_st__bindgen_ty_2>())).pgp as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st__bindgen_ty_2),
            "::",
            stringify!(pgp)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<gnutls_retr2_st__bindgen_ty_2>())).pkcs11 as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st__bindgen_ty_2),
            "::",
            stringify!(pkcs11)
        )
    );
}
#[test]
fn bindgen_test_layout_gnutls_retr2_st() {
    assert_eq!(
        ::std::mem::size_of::<gnutls_retr2_st>(),
        40usize,
        concat!("Size of: ", stringify!(gnutls_retr2_st))
    );
    assert_eq!(
        ::std::mem::align_of::<gnutls_retr2_st>(),
        8usize,
        concat!("Alignment of ", stringify!(gnutls_retr2_st))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_retr2_st>())).cert_type as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st),
            "::",
            stringify!(cert_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_retr2_st>())).key_type as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st),
            "::",
            stringify!(key_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_retr2_st>())).cert as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st),
            "::",
            stringify!(cert)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_retr2_st>())).ncerts as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st),
            "::",
            stringify!(ncerts)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_retr2_st>())).key as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<gnutls_retr2_st>())).deinit_all as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(gnutls_retr2_st),
            "::",
            stringify!(deinit_all)
        )
    );
}
extern "C" {
    pub fn gnutls_auth_get_type(session: gnutls_session_t) -> gnutls_credentials_type_t;
}
extern "C" {
    pub fn gnutls_auth_server_get_type(session: gnutls_session_t) -> gnutls_credentials_type_t;
}
extern "C" {
    pub fn gnutls_auth_client_get_type(session: gnutls_session_t) -> gnutls_credentials_type_t;
}
extern "C" {
    pub fn gnutls_dh_set_prime_bits(session: gnutls_session_t, bits: ::std::os::raw::c_uint);
}
extern "C" {
    pub fn gnutls_dh_get_secret_bits(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_get_peers_public_bits(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_get_prime_bits(session: gnutls_session_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_get_group(
        session: gnutls_session_t,
        raw_gen: *mut gnutls_datum_t,
        raw_prime: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_dh_get_pubkey(
        session: gnutls_session_t,
        raw_key: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
pub type gnutls_certificate_retrieve_function = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gnutls_session_t,
        req_ca_rdn: *const gnutls_datum_t,
        nreqs: ::std::os::raw::c_int,
        pk_algos: *const gnutls_pk_algorithm_t,
        pk_algos_length: ::std::os::raw::c_int,
        arg2: *mut gnutls_retr2_st,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_certificate_set_retrieve_function(
        cred: gnutls_certificate_credentials_t,
        func: gnutls_certificate_retrieve_function,
    );
}
extern "C" {
    pub fn gnutls_certificate_set_verify_function(
        cred: gnutls_certificate_credentials_t,
        func: gnutls_certificate_verify_function,
    );
}
extern "C" {
    pub fn gnutls_certificate_server_set_request(
        session: gnutls_session_t,
        req: gnutls_certificate_request_t,
    );
}
extern "C" {
    pub fn gnutls_certificate_get_peers(
        session: gnutls_session_t,
        list_size: *mut ::std::os::raw::c_uint,
    ) -> *const gnutls_datum_t;
}
extern "C" {
    pub fn gnutls_certificate_get_ours(session: gnutls_session_t) -> *const gnutls_datum_t;
}
extern "C" {
    pub fn gnutls_certificate_get_peers_subkey_id(
        session: gnutls_session_t,
        id: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_activation_time_peers(session: gnutls_session_t) -> time_t;
}
extern "C" {
    pub fn gnutls_certificate_expiration_time_peers(session: gnutls_session_t) -> time_t;
}
extern "C" {
    pub fn gnutls_certificate_client_get_request_status(
        session: gnutls_session_t,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    pub fn gnutls_certificate_verify_peers2(
        session: gnutls_session_t,
        status: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_verify_peers3(
        session: gnutls_session_t,
        hostname: *const ::std::os::raw::c_char,
        status: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_verify_peers(
        session: gnutls_session_t,
        data: *mut gnutls_typed_vdata_st,
        elements: ::std::os::raw::c_uint,
        status: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_verification_status_print(
        status: ::std::os::raw::c_uint,
        type_: gnutls_certificate_type_t,
        out: *mut gnutls_datum_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_pem_base64_encode(
        msg: *const ::std::os::raw::c_char,
        data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_char,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_pem_base64_decode(
        header: *const ::std::os::raw::c_char,
        b64_data: *const gnutls_datum_t,
        result: *mut ::std::os::raw::c_uchar,
        result_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_pem_base64_encode2(
        msg: *const ::std::os::raw::c_char,
        data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_pem_base64_decode2(
        header: *const ::std::os::raw::c_char,
        b64_data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_base64_encode2(
        data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_base64_decode2(
        b64_data: *const gnutls_datum_t,
        result: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_certificate_set_params_function(
        res: gnutls_certificate_credentials_t,
        func: gnutls_params_function,
    );
}
extern "C" {
    pub fn gnutls_anon_set_params_function(
        res: gnutls_anon_server_credentials_t,
        func: gnutls_params_function,
    );
}
extern "C" {
    pub fn gnutls_psk_set_params_function(
        res: gnutls_psk_server_credentials_t,
        func: gnutls_params_function,
    );
}
extern "C" {
    pub fn gnutls_hex2bin(
        hex_data: *const ::std::os::raw::c_char,
        hex_size: size_t,
        bin_data: *mut ::std::os::raw::c_void,
        bin_size: *mut size_t,
    ) -> ::std::os::raw::c_int;
}
pub type gnutls_tdb_store_func = ::std::option::Option<
    unsafe extern "C" fn(
        db_name: *const ::std::os::raw::c_char,
        host: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        expiration: time_t,
        pubkey: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_tdb_store_commitment_func = ::std::option::Option<
    unsafe extern "C" fn(
        db_name: *const ::std::os::raw::c_char,
        host: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        expiration: time_t,
        hash_algo: gnutls_digest_algorithm_t,
        hash: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_tdb_verify_func = ::std::option::Option<
    unsafe extern "C" fn(
        db_name: *const ::std::os::raw::c_char,
        host: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        pubkey: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_tdb_int {
    _unused: [u8; 0],
}
pub type gnutls_tdb_t = *mut gnutls_tdb_int;
extern "C" {
    pub fn gnutls_tdb_init(tdb: *mut gnutls_tdb_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_tdb_set_store_func(tdb: gnutls_tdb_t, store: gnutls_tdb_store_func);
}
extern "C" {
    pub fn gnutls_tdb_set_store_commitment_func(
        tdb: gnutls_tdb_t,
        cstore: gnutls_tdb_store_commitment_func,
    );
}
extern "C" {
    pub fn gnutls_tdb_set_verify_func(tdb: gnutls_tdb_t, verify: gnutls_tdb_verify_func);
}
extern "C" {
    pub fn gnutls_tdb_deinit(tdb: gnutls_tdb_t);
}
extern "C" {
    pub fn gnutls_verify_stored_pubkey(
        db_name: *const ::std::os::raw::c_char,
        tdb: gnutls_tdb_t,
        host: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        cert_type: gnutls_certificate_type_t,
        cert: *const gnutls_datum_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_store_commitment(
        db_name: *const ::std::os::raw::c_char,
        tdb: gnutls_tdb_t,
        host: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        hash_algo: gnutls_digest_algorithm_t,
        hash: *const gnutls_datum_t,
        expiration: time_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_store_pubkey(
        db_name: *const ::std::os::raw::c_char,
        tdb: gnutls_tdb_t,
        host: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        cert_type: gnutls_certificate_type_t,
        cert: *const gnutls_datum_t,
        expiration: time_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_load_file(
        filename: *const ::std::os::raw::c_char,
        data: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_url_is_supported(url: *const ::std::os::raw::c_char) -> ::std::os::raw::c_uint;
}
pub const gnutls_pin_flag_t_GNUTLS_PIN_USER: gnutls_pin_flag_t = 1;
pub const gnutls_pin_flag_t_GNUTLS_PIN_SO: gnutls_pin_flag_t = 2;
pub const gnutls_pin_flag_t_GNUTLS_PIN_FINAL_TRY: gnutls_pin_flag_t = 4;
pub const gnutls_pin_flag_t_GNUTLS_PIN_COUNT_LOW: gnutls_pin_flag_t = 8;
pub const gnutls_pin_flag_t_GNUTLS_PIN_CONTEXT_SPECIFIC: gnutls_pin_flag_t = 16;
pub const gnutls_pin_flag_t_GNUTLS_PIN_WRONG: gnutls_pin_flag_t = 32;
#[doc = " gnutls_pin_flag_t:"]
#[doc = " @GNUTLS_PIN_USER: The PIN for the user."]
#[doc = " @GNUTLS_PIN_SO: The PIN for the security officer (admin)."]
#[doc = " @GNUTLS_PIN_CONTEXT_SPECIFIC: The PIN is for a specific action and key like signing."]
#[doc = " @GNUTLS_PIN_FINAL_TRY: This is the final try before blocking."]
#[doc = " @GNUTLS_PIN_COUNT_LOW: Few tries remain before token blocks."]
#[doc = " @GNUTLS_PIN_WRONG: Last given PIN was not correct."]
#[doc = ""]
#[doc = " Enumeration of different flags that are input to the PIN function."]
pub type gnutls_pin_flag_t = ::std::os::raw::c_uint;
#[doc = " gnutls_pin_callback_t:"]
#[doc = " @userdata: user-controlled data from gnutls_pkcs11_set_pin_function()."]
#[doc = " @attempt: pin-attempt counter, initially 0."]
#[doc = " @token_url: URL of token."]
#[doc = " @token_label: label of token."]
#[doc = " @flags: a #gnutls_pin_flag_t flag."]
#[doc = " @pin: buffer to hold PIN, of size @pin_max."]
#[doc = " @pin_max: size of @pin buffer."]
#[doc = ""]
#[doc = " Callback function type for PKCS#11 or TPM PIN entry.  It is set by"]
#[doc = " functions like gnutls_pkcs11_set_pin_function()."]
#[doc = ""]
#[doc = " The callback should provides the PIN code to unlock the token with"]
#[doc = " label @token_label, specified by the URL @token_url."]
#[doc = ""]
#[doc = " The PIN code, as a NUL-terminated ASCII string, should be copied"]
#[doc = " into the @pin buffer (of maximum size @pin_max), and return 0 to"]
#[doc = " indicate success.  Alternatively, the callback may return a"]
#[doc = " negative gnutls error code to indicate failure and cancel PIN entry"]
#[doc = " (in which case, the contents of the @pin parameter are ignored)."]
#[doc = ""]
#[doc = " When a PIN is required, the callback will be invoked repeatedly"]
#[doc = " (and indefinitely) until either the returned PIN code is correct,"]
#[doc = " the callback returns failure, or the token refuses login (e.g. when"]
#[doc = " the token is locked due to too many incorrect PINs!).  For the"]
#[doc = " first such invocation, the @attempt counter will have value zero;"]
#[doc = " it will increase by one for each subsequent attempt."]
#[doc = ""]
#[doc = " Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error."]
#[doc = ""]
#[doc = " Since: 2.12.0"]
pub type gnutls_pin_callback_t = ::std::option::Option<
    unsafe extern "C" fn(
        userdata: *mut ::std::os::raw::c_void,
        attempt: ::std::os::raw::c_int,
        token_url: *const ::std::os::raw::c_char,
        token_label: *const ::std::os::raw::c_char,
        flags: ::std::os::raw::c_uint,
        pin: *mut ::std::os::raw::c_char,
        pin_max: size_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_certificate_set_pin_function(
        arg1: gnutls_certificate_credentials_t,
        fn_: gnutls_pin_callback_t,
        userdata: *mut ::std::os::raw::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_buffer_st {
    _unused: [u8; 0],
}
pub type gnutls_buffer_t = *mut gnutls_buffer_st;
extern "C" {
    pub fn gnutls_buffer_append_data(
        arg1: gnutls_buffer_t,
        data: *const ::std::os::raw::c_void,
        data_size: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_utf8_password_normalize(
        password: *const ::std::os::raw::c_uchar,
        password_len: ::std::os::raw::c_uint,
        out: *mut gnutls_datum_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
pub type gnutls_ext_priv_data_t = *mut ::std::os::raw::c_void;
extern "C" {
    pub fn gnutls_ext_set_data(
        session: gnutls_session_t,
        type_: ::std::os::raw::c_uint,
        arg1: gnutls_ext_priv_data_t,
    );
}
extern "C" {
    pub fn gnutls_ext_get_data(
        session: gnutls_session_t,
        type_: ::std::os::raw::c_uint,
        arg1: *mut gnutls_ext_priv_data_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_ext_get_current_msg(session: gnutls_session_t) -> ::std::os::raw::c_uint;
}
pub type gnutls_ext_recv_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        data: *const ::std::os::raw::c_uchar,
        len: size_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_ext_send_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        extdata: gnutls_buffer_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_ext_deinit_data_func =
    ::std::option::Option<unsafe extern "C" fn(data: gnutls_ext_priv_data_t)>;
pub type gnutls_ext_pack_func = ::std::option::Option<
    unsafe extern "C" fn(
        data: gnutls_ext_priv_data_t,
        packed_data: gnutls_buffer_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_ext_unpack_func = ::std::option::Option<
    unsafe extern "C" fn(
        packed_data: gnutls_buffer_t,
        data: *mut gnutls_ext_priv_data_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_ext_raw_process_func = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut ::std::os::raw::c_void,
        tls_id: ::std::os::raw::c_uint,
        data: *const ::std::os::raw::c_uchar,
        data_size: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_ext_raw_parse(
        ctx: *mut ::std::os::raw::c_void,
        cb: gnutls_ext_raw_process_func,
        data: *const gnutls_datum_t,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
pub const gnutls_ext_parse_type_t_GNUTLS_EXT_ANY: gnutls_ext_parse_type_t = 0;
pub const gnutls_ext_parse_type_t_GNUTLS_EXT_APPLICATION: gnutls_ext_parse_type_t = 1;
pub const gnutls_ext_parse_type_t_GNUTLS_EXT_TLS: gnutls_ext_parse_type_t = 2;
pub const gnutls_ext_parse_type_t_GNUTLS_EXT_MANDATORY: gnutls_ext_parse_type_t = 3;
pub const gnutls_ext_parse_type_t_GNUTLS_EXT_NONE: gnutls_ext_parse_type_t = 4;
pub const gnutls_ext_parse_type_t_GNUTLS_EXT_VERSION_NEG: gnutls_ext_parse_type_t = 5;
#[doc = " gnutls_ext_parse_type_t:"]
#[doc = " @GNUTLS_EXT_NONE: Never to be parsed"]
#[doc = " @GNUTLS_EXT_ANY: Any extension type (should not be used as it is used only internally)."]
#[doc = " @GNUTLS_EXT_VERSION_NEG: Extensions to be parsed first for TLS version negotiation."]
#[doc = " @GNUTLS_EXT_MANDATORY: Parsed after @GNUTLS_EXT_VERSION_NEG and even when resuming."]
#[doc = " @GNUTLS_EXT_APPLICATION: Parsed after @GNUTLS_EXT_MANDATORY"]
#[doc = " @GNUTLS_EXT_TLS: TLS-internal extensions, parsed after @GNUTLS_EXT_APPLICATION."]
#[doc = ""]
#[doc = " Enumeration of different TLS extension parsing phases.  The @gnutls_ext_parse_type_t"]
#[doc = " indicates the time/phase an extension is parsed during Client or Server hello parsing."]
#[doc = ""]
pub type gnutls_ext_parse_type_t = ::std::os::raw::c_uint;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL: gnutls_ext_flags_t = 1;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_CLIENT_HELLO: gnutls_ext_flags_t = 2;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO: gnutls_ext_flags_t = 4;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO: gnutls_ext_flags_t = 8;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_EE: gnutls_ext_flags_t = 16;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_HRR: gnutls_ext_flags_t = 32;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_IGNORE_CLIENT_REQUEST: gnutls_ext_flags_t = 64;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_TLS: gnutls_ext_flags_t = 128;
pub const gnutls_ext_flags_t_GNUTLS_EXT_FLAG_DTLS: gnutls_ext_flags_t = 256;
#[doc = " gnutls_ext_flags_t:"]
#[doc = " @GNUTLS_EXT_FLAG_OVERRIDE_INTERNAL: If specified the extension registered will override the internal; this does not work with extensions existing prior to 3.6.0."]
#[doc = " @GNUTLS_EXT_FLAG_CLIENT_HELLO: This extension can be present in a client hello"]
#[doc = " @GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO: This extension can be present in a TLS1.2 or earlier server hello"]
#[doc = " @GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO: This extension can be present in a TLS1.3 server hello"]
#[doc = " @GNUTLS_EXT_FLAG_EE: This extension can be present in encrypted extensions message"]
#[doc = " @GNUTLS_EXT_FLAG_HRR: This extension can be present in hello retry request message"]
#[doc = " @GNUTLS_EXT_FLAG_IGNORE_CLIENT_REQUEST: When flag is present, this extension will be send even if the client didn't advertise it. An extension of this type is the Cookie TLS1.3 extension."]
#[doc = " @GNUTLS_EXT_FLAG_DTLS: This extension can be present under DTLS; otherwise ignored."]
#[doc = " @GNUTLS_EXT_FLAG_TLS: This extension can be present under TLS; otherwise ignored."]
#[doc = ""]
#[doc = " Enumeration of different TLS extension registration flags."]
pub type gnutls_ext_flags_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_ext_register(
        name: *const ::std::os::raw::c_char,
        type_: ::std::os::raw::c_int,
        parse_point: gnutls_ext_parse_type_t,
        recv_func: gnutls_ext_recv_func,
        send_func: gnutls_ext_send_func,
        deinit_func: gnutls_ext_deinit_data_func,
        pack_func: gnutls_ext_pack_func,
        unpack_func: gnutls_ext_unpack_func,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_ext_register(
        arg1: gnutls_session_t,
        name: *const ::std::os::raw::c_char,
        type_: ::std::os::raw::c_int,
        parse_point: gnutls_ext_parse_type_t,
        recv_func: gnutls_ext_recv_func,
        send_func: gnutls_ext_send_func,
        deinit_func: gnutls_ext_deinit_data_func,
        pack_func: gnutls_ext_pack_func,
        unpack_func: gnutls_ext_unpack_func,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_ext_get_name(ext: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_ext_get_name2(
        session: gnutls_session_t,
        tls_id: ::std::os::raw::c_uint,
        parse_point: gnutls_ext_parse_type_t,
    ) -> *const ::std::os::raw::c_char;
}
pub type gnutls_supp_recv_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        data: *const ::std::os::raw::c_uchar,
        data_size: size_t,
    ) -> ::std::os::raw::c_int,
>;
pub type gnutls_supp_send_func = ::std::option::Option<
    unsafe extern "C" fn(session: gnutls_session_t, buf: gnutls_buffer_t) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_supplemental_register(
        name: *const ::std::os::raw::c_char,
        type_: gnutls_supplemental_data_format_type_t,
        supp_recv_func: gnutls_supp_recv_func,
        supp_send_func: gnutls_supp_send_func,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_session_supplemental_register(
        session: gnutls_session_t,
        name: *const ::std::os::raw::c_char,
        type_: gnutls_supplemental_data_format_type_t,
        supp_recv_func: gnutls_supp_recv_func,
        supp_send_func: gnutls_supp_send_func,
        flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_supplemental_recv(
        session: gnutls_session_t,
        do_recv_supplemental: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_supplemental_send(
        session: gnutls_session_t,
        do_send_supplemental: ::std::os::raw::c_uint,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_anti_replay_st {
    _unused: [u8; 0],
}
pub type gnutls_anti_replay_t = *mut gnutls_anti_replay_st;
extern "C" {
    pub fn gnutls_anti_replay_init(anti_replay: *mut gnutls_anti_replay_t)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_anti_replay_deinit(anti_replay: gnutls_anti_replay_t);
}
extern "C" {
    pub fn gnutls_anti_replay_set_window(
        anti_replay: gnutls_anti_replay_t,
        window: ::std::os::raw::c_uint,
    );
}
extern "C" {
    pub fn gnutls_anti_replay_enable(session: gnutls_session_t, anti_replay: gnutls_anti_replay_t);
}
pub type gnutls_db_add_func = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut ::std::os::raw::c_void,
        exp_time: time_t,
        key: *const gnutls_datum_t,
        data: *const gnutls_datum_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_anti_replay_set_add_function(
        arg1: gnutls_anti_replay_t,
        add_func: gnutls_db_add_func,
    );
}
extern "C" {
    pub fn gnutls_anti_replay_set_ptr(arg1: gnutls_anti_replay_t, ptr: *mut ::std::os::raw::c_void);
}
pub const gnutls_record_encryption_level_t_GNUTLS_ENCRYPTION_LEVEL_INITIAL:
    gnutls_record_encryption_level_t = 0;
pub const gnutls_record_encryption_level_t_GNUTLS_ENCRYPTION_LEVEL_EARLY:
    gnutls_record_encryption_level_t = 1;
pub const gnutls_record_encryption_level_t_GNUTLS_ENCRYPTION_LEVEL_HANDSHAKE:
    gnutls_record_encryption_level_t = 2;
pub const gnutls_record_encryption_level_t_GNUTLS_ENCRYPTION_LEVEL_APPLICATION:
    gnutls_record_encryption_level_t = 3;
#[doc = " gnutls_record_encryption_level_t:"]
#[doc = " @GNUTLS_ENCRYPTION_LEVEL_INITIAL: initial level that doesn't involve any"]
#[doc = "    encryption"]
#[doc = " @GNUTLS_ENCRYPTION_LEVEL_EARLY: early traffic secret is installed"]
#[doc = " @GNUTLS_ENCRYPTION_LEVEL_HANDSHAKE: handshake traffic secret is installed"]
#[doc = " @GNUTLS_ENCRYPTION_LEVEL_APPLICATION: application traffic secret is installed"]
#[doc = ""]
#[doc = " Enumeration of different levels of record encryption currently in place."]
#[doc = " This is used by gnutls_handshake_set_read_function() and"]
#[doc = " gnutls_handshake_write()."]
#[doc = ""]
#[doc = " Since: 3.7.0"]
pub type gnutls_record_encryption_level_t = ::std::os::raw::c_uint;
#[doc = " gnutls_handshake_read_func:"]
#[doc = " @session: the current session"]
#[doc = " @htype: the type of the handshake message (#gnutls_handshake_description_t)"]
#[doc = " @level: #gnutls_record_encryption_level_t"]
#[doc = " @data: the (const) data that was being sent"]
#[doc = " @data_size: the size of data"]
#[doc = ""]
#[doc = " Function prototype for handshake intercepting hooks. It is set using"]
#[doc = " gnutls_handshake_set_read_function()."]
#[doc = ""]
#[doc = " Returns: Non zero on error."]
#[doc = " Since: 3.7.0"]
pub type gnutls_handshake_read_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        level: gnutls_record_encryption_level_t,
        htype: gnutls_handshake_description_t,
        data: *const ::std::os::raw::c_void,
        data_size: size_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_handshake_set_read_function(
        session: gnutls_session_t,
        func: gnutls_handshake_read_func,
    );
}
extern "C" {
    pub fn gnutls_handshake_write(
        session: gnutls_session_t,
        level: gnutls_record_encryption_level_t,
        data: *const ::std::os::raw::c_void,
        data_size: size_t,
    ) -> ::std::os::raw::c_int;
}
#[doc = " gnutls_handshake_secret_func:"]
#[doc = " @session: the current session"]
#[doc = " @level: the encryption level"]
#[doc = " @secret_read: the secret used for reading, can be %NULL if not set"]
#[doc = " @secret_write: the secret used for writing, can be %NULL if not set"]
#[doc = " @secret_size: the size of the secrets"]
#[doc = ""]
#[doc = " Function prototype for secret hooks. It is set using"]
#[doc = " gnutls_handshake_set_secret_function()."]
#[doc = ""]
#[doc = " Returns: Non zero on error."]
#[doc = " Since: 3.7.0"]
pub type gnutls_handshake_secret_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        level: gnutls_record_encryption_level_t,
        secret_read: *const ::std::os::raw::c_void,
        secret_write: *const ::std::os::raw::c_void,
        secret_size: size_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_handshake_set_secret_function(
        session: gnutls_session_t,
        func: gnutls_handshake_secret_func,
    );
}
#[doc = " gnutls_alert_read_func:"]
#[doc = " @session: the current session"]
#[doc = " @level: #gnutls_record_encryption_level_t"]
#[doc = " @alert_level: the level of the alert"]
#[doc = " @alert_desc: the alert description"]
#[doc = ""]
#[doc = " Function prototype for alert intercepting hooks. It is set using"]
#[doc = " gnutls_alert_set_read_function()."]
#[doc = ""]
#[doc = " Returns: Non zero on error."]
#[doc = " Since: 3.7.0"]
pub type gnutls_alert_read_func = ::std::option::Option<
    unsafe extern "C" fn(
        session: gnutls_session_t,
        level: gnutls_record_encryption_level_t,
        alert_level: gnutls_alert_level_t,
        alert_desc: gnutls_alert_description_t,
    ) -> ::std::os::raw::c_int,
>;
extern "C" {
    pub fn gnutls_alert_set_read_function(session: gnutls_session_t, func: gnutls_alert_read_func);
}
extern "C" {
    pub fn gnutls_fips140_mode_enabled() -> ::std::os::raw::c_uint;
}
pub const gnutls_fips_mode_t_GNUTLS_FIPS140_DISABLED: gnutls_fips_mode_t = 0;
pub const gnutls_fips_mode_t_GNUTLS_FIPS140_STRICT: gnutls_fips_mode_t = 1;
pub const gnutls_fips_mode_t_GNUTLS_FIPS140_SELFTESTS: gnutls_fips_mode_t = 2;
pub const gnutls_fips_mode_t_GNUTLS_FIPS140_LAX: gnutls_fips_mode_t = 3;
pub const gnutls_fips_mode_t_GNUTLS_FIPS140_LOG: gnutls_fips_mode_t = 4;
#[doc = " gnutls_fips_mode_t:"]
#[doc = " @GNUTLS_FIPS140_DISABLED: The FIPS140-2 mode is disabled."]
#[doc = " @GNUTLS_FIPS140_STRICT: The default mode; all forbidden operations will cause an"]
#[doc = "                         operation failure via error code."]
#[doc = " @GNUTLS_FIPS140_LAX: The library still uses the FIPS140-2 relevant algorithms but all"]
#[doc = "                      forbidden by FIPS140-2 operations are allowed; this is useful when the"]
#[doc = "                      application is aware of the followed security policy, and needs"]
#[doc = "                      to utilize disallowed operations for other reasons (e.g., compatibility)."]
#[doc = " @GNUTLS_FIPS140_LOG: Similarly to %GNUTLS_FIPS140_LAX, it allows forbidden operations; any use of them results"]
#[doc = "                      to a message to the audit callback functions."]
#[doc = " @GNUTLS_FIPS140_SELFTESTS: A transient state during library initialization. That state"]
#[doc = "\t\t\tcannot be set or seen by applications."]
#[doc = ""]
#[doc = " Enumeration of different operational modes under FIPS140-2."]
pub type gnutls_fips_mode_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_fips140_set_mode(mode: gnutls_fips_mode_t, flags: ::std::os::raw::c_uint);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gnutls_fips140_context_st {
    _unused: [u8; 0],
}
pub type gnutls_fips140_context_t = *mut gnutls_fips140_context_st;
extern "C" {
    pub fn gnutls_fips140_context_init(
        context: *mut gnutls_fips140_context_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_fips140_context_deinit(context: gnutls_fips140_context_t);
}
pub const gnutls_fips140_operation_state_t_GNUTLS_FIPS140_OP_INITIAL:
    gnutls_fips140_operation_state_t = 0;
pub const gnutls_fips140_operation_state_t_GNUTLS_FIPS140_OP_APPROVED:
    gnutls_fips140_operation_state_t = 1;
pub const gnutls_fips140_operation_state_t_GNUTLS_FIPS140_OP_NOT_APPROVED:
    gnutls_fips140_operation_state_t = 2;
pub const gnutls_fips140_operation_state_t_GNUTLS_FIPS140_OP_ERROR:
    gnutls_fips140_operation_state_t = 3;
#[doc = " gnutls_fips140_operation_state_t:"]
#[doc = " @GNUTLS_FIPS140_OP_INITIAL: no previous operation has done"]
#[doc = " @GNUTLS_FIPS140_OP_APPROVED: the previous operation was FIPS approved"]
#[doc = " @GNUTLS_FIPS140_OP_NOT_APPROVED: the previous operation was not FIPS approved"]
#[doc = " @GNUTLS_FIPS140_OP_ERROR: the previous operation caused an error regardless of FIPS"]
#[doc = ""]
#[doc = " The FIPS operation state set by the preceding operation."]
#[doc = ""]
#[doc = " There are state transition rules among the enum values:"]
#[doc = " - When the context is attached to a thread, it will be set to reset"]
#[doc = "   to the %GNUTLS_FIPS140_OP_INITIAL state"]
#[doc = " - From the %GNUTLS_FIPS140_OP_INITIAL state, the context can"]
#[doc = "   transition to either %GNUTLS_FIPS140_OP_APPROVED,"]
#[doc = "   %GNUTLS_FIPS140_OP_NOT_APPROVED, or %GNUTLS_FIPS140_OP_ERROR"]
#[doc = " - From the %GNUTLS_FIPS140_OP_APPROVED state, the context can"]
#[doc = "   transition to %GNUTLS_FIPS140_OP_NOT_APPROVED"]
#[doc = " - All other transitions are prohibited."]
#[doc = ""]
#[doc = " Since: 3.7.3"]
pub type gnutls_fips140_operation_state_t = ::std::os::raw::c_uint;
extern "C" {
    pub fn gnutls_fips140_get_operation_state(
        context: gnutls_fips140_context_t,
    ) -> gnutls_fips140_operation_state_t;
}
extern "C" {
    pub fn gnutls_fips140_push_context(context: gnutls_fips140_context_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_fips140_pop_context() -> ::std::os::raw::c_int;
}
pub type gnutls_connection_end_t = ::std::os::raw::c_uint;
pub use self::gnutls_compression_method_t as gnutls_compression_method;
pub use self::gnutls_digest_algorithm_t as gnutls_digest_algorithm;
pub use self::gnutls_kx_algorithm_t as gnutls_kx_algorithm;
pub use self::gnutls_mac_algorithm_t as gnutls_mac_algorithm;
pub type gnutls_connection_end = gnutls_connection_end_t;
pub use self::gnutls_certificate_request_t as gnutls_certificate_request;
pub use self::gnutls_certificate_status_t as gnutls_certificate_status;
pub use self::gnutls_close_request_t as gnutls_close_request;
pub use self::gnutls_pk_algorithm_t as gnutls_pk_algorithm;
pub use self::gnutls_sign_algorithm_t as gnutls_sign_algorithm;
pub use self::gnutls_x509_crt_fmt_t as gnutls_x509_crt_fmt;
pub type gnutls_session = gnutls_session_t;
pub use self::gnutls_alert_description_t as gnutls_alert_description;
pub use self::gnutls_alert_level_t as gnutls_alert_level;
pub use self::gnutls_x509_subject_alt_name_t as gnutls_x509_subject_alt_name;
pub type gnutls_openpgp_privkey = gnutls_openpgp_privkey_t;
pub type gnutls_openpgp_keyring = gnutls_openpgp_keyring_t;
pub type gnutls_x509_crt = gnutls_x509_crt_t;
pub type gnutls_x509_privkey = gnutls_x509_privkey_t;
pub type gnutls_x509_crl = gnutls_x509_crl_t;
pub type gnutls_x509_crq = gnutls_x509_crq_t;
pub type gnutls_certificate_credentials = gnutls_certificate_credentials_t;
pub type gnutls_anon_server_credentials = gnutls_anon_server_credentials_t;
pub type gnutls_anon_client_credentials = gnutls_anon_client_credentials_t;
pub type gnutls_srp_client_credentials = gnutls_srp_client_credentials_t;
pub type gnutls_srp_server_credentials = gnutls_srp_server_credentials_t;
pub type gnutls_dh_params = gnutls_dh_params_t;
pub type gnutls_rsa_params = gnutls_rsa_params_t;
pub use self::gnutls_certificate_type_t as gnutls_certificate_type;
pub use self::gnutls_credentials_type_t as gnutls_credentials_type;
pub use self::gnutls_params_type_t as gnutls_params_type;
pub type gnutls_datum = gnutls_datum_t;
pub type gnutls_transport_ptr = gnutls_transport_ptr_t;
pub use self::gnutls_openpgp_crt_status_t as gnutls_openpgp_key_status_t;
pub type gnutls_openpgp_key_t = gnutls_openpgp_crt_t;
extern "C" {
    pub fn gnutls_x509_privkey_sign_hash(
        key: gnutls_x509_privkey_t,
        hash: *const gnutls_datum_t,
        signature: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_openpgp_privkey_sign_hash(
        key: gnutls_openpgp_privkey_t,
        hash: *const gnutls_datum_t,
        signature: *mut gnutls_datum_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_x509_crt_get_preferred_hash_algorithm(
        crt: gnutls_x509_crt_t,
        hash: *mut gnutls_digest_algorithm_t,
        mand: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn gnutls_global_set_mem_functions(
        alloc_func: gnutls_alloc_function,
        secure_alloc_func: gnutls_alloc_function,
        is_secure_func: gnutls_is_secure_function,
        realloc_func: gnutls_realloc_function,
        free_func: gnutls_free_function,
    );
}
extern "C" {
    pub fn gnutls_compression_get(session: gnutls_session_t) -> gnutls_compression_method_t;
}
extern "C" {
    pub fn gnutls_compression_get_name(
        algorithm: gnutls_compression_method_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn gnutls_compression_get_id(
        name: *const ::std::os::raw::c_char,
    ) -> gnutls_compression_method_t;
}
extern "C" {
    pub fn gnutls_compression_list() -> *const gnutls_compression_method_t;
}
extern "C" {
    pub fn gnutls_priority_compression_list(
        pcache: gnutls_priority_t,
        list: *mut *const ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
pub type key_data_t = gnutls_datum_t;
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
#[doc = " The basic plist abstract data type."]
pub type plist_t = *mut ::std::os::raw::c_void;
#[doc = " The plist dictionary iterator."]
pub type plist_dict_iter = *mut ::std::os::raw::c_void;
#[doc = " The plist array iterator."]
pub type plist_array_iter = *mut ::std::os::raw::c_void;
#[doc = "< Boolean, scalar type"]
pub const plist_type_PLIST_BOOLEAN: plist_type = 0;
#[doc = "< Unsigned integer, scalar type"]
pub const plist_type_PLIST_UINT: plist_type = 1;
#[doc = "< Real, scalar type"]
pub const plist_type_PLIST_REAL: plist_type = 2;
#[doc = "< ASCII string, scalar type"]
pub const plist_type_PLIST_STRING: plist_type = 3;
#[doc = "< Ordered array, structured type"]
pub const plist_type_PLIST_ARRAY: plist_type = 4;
#[doc = "< Unordered dictionary (key/value pair), structured type"]
pub const plist_type_PLIST_DICT: plist_type = 5;
#[doc = "< Date, scalar type"]
pub const plist_type_PLIST_DATE: plist_type = 6;
#[doc = "< Binary data, scalar type"]
pub const plist_type_PLIST_DATA: plist_type = 7;
#[doc = "< Key in dictionaries (ASCII String), scalar type"]
pub const plist_type_PLIST_KEY: plist_type = 8;
#[doc = "< Special type used for 'keyed encoding'"]
pub const plist_type_PLIST_UID: plist_type = 9;
#[doc = "< No type"]
pub const plist_type_PLIST_NONE: plist_type = 10;
#[doc = " The enumeration of plist node types."]
pub type plist_type = ::std::os::raw::c_uint;
extern "C" {
    #[doc = " Create a new root plist_t type #PLIST_DICT"]
    #[doc = ""]
    #[doc = " @return the created plist"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_dict() -> plist_t;
}
extern "C" {
    #[doc = " Create a new root plist_t type #PLIST_ARRAY"]
    #[doc = ""]
    #[doc = " @return the created plist"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_array() -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_STRING"]
    #[doc = ""]
    #[doc = " @param val the sting value, encoded in UTF8."]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_string(val: *const ::std::os::raw::c_char) -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_BOOLEAN"]
    #[doc = ""]
    #[doc = " @param val the boolean value, 0 is false, other values are true."]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_bool(val: u8) -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_UINT"]
    #[doc = ""]
    #[doc = " @param val the unsigned integer value"]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_uint(val: u64) -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_REAL"]
    #[doc = ""]
    #[doc = " @param val the real value"]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_real(val: f64) -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_DATA"]
    #[doc = ""]
    #[doc = " @param val the binary buffer"]
    #[doc = " @param length the length of the buffer"]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_data(val: *const ::std::os::raw::c_char, length: u64) -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_DATE"]
    #[doc = ""]
    #[doc = " @param sec the number of seconds since 01/01/2001"]
    #[doc = " @param usec the number of microseconds"]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_date(sec: i32, usec: i32) -> plist_t;
}
extern "C" {
    #[doc = " Create a new plist_t type #PLIST_UID"]
    #[doc = ""]
    #[doc = " @param val the unsigned integer value"]
    #[doc = " @return the created item"]
    #[doc = " @sa #plist_type"]
    pub fn plist_new_uid(val: u64) -> plist_t;
}
extern "C" {
    #[doc = " Destruct a plist_t node and all its children recursively"]
    #[doc = ""]
    #[doc = " @param plist the plist to free"]
    pub fn plist_free(plist: plist_t);
}
extern "C" {
    #[doc = " Return a copy of passed node and it's children"]
    #[doc = ""]
    #[doc = " @param node the plist to copy"]
    #[doc = " @return copied plist"]
    pub fn plist_copy(node: plist_t) -> plist_t;
}
extern "C" {
    #[doc = " Get size of a #PLIST_ARRAY node."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_ARRAY"]
    #[doc = " @return size of the #PLIST_ARRAY node"]
    pub fn plist_array_get_size(node: plist_t) -> u32;
}
extern "C" {
    #[doc = " Get the nth item in a #PLIST_ARRAY node."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_ARRAY"]
    #[doc = " @param n the index of the item to get. Range is [0, array_size["]
    #[doc = " @return the nth item or NULL if node is not of type #PLIST_ARRAY"]
    pub fn plist_array_get_item(node: plist_t, n: u32) -> plist_t;
}
extern "C" {
    #[doc = " Get the index of an item. item must be a member of a #PLIST_ARRAY node."]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @return the node index or UINT_MAX if node index can't be determined"]
    pub fn plist_array_get_item_index(node: plist_t) -> u32;
}
extern "C" {
    #[doc = " Set the nth item in a #PLIST_ARRAY node."]
    #[doc = " The previous item at index n will be freed using #plist_free"]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_ARRAY"]
    #[doc = " @param item the new item at index n. The array is responsible for freeing item when it is no longer needed."]
    #[doc = " @param n the index of the item to get. Range is [0, array_size[. Assert if n is not in range."]
    pub fn plist_array_set_item(node: plist_t, item: plist_t, n: u32);
}
extern "C" {
    #[doc = " Append a new item at the end of a #PLIST_ARRAY node."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_ARRAY"]
    #[doc = " @param item the new item. The array is responsible for freeing item when it is no longer needed."]
    pub fn plist_array_append_item(node: plist_t, item: plist_t);
}
extern "C" {
    #[doc = " Insert a new item at position n in a #PLIST_ARRAY node."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_ARRAY"]
    #[doc = " @param item the new item to insert. The array is responsible for freeing item when it is no longer needed."]
    #[doc = " @param n The position at which the node will be stored. Range is [0, array_size[. Assert if n is not in range."]
    pub fn plist_array_insert_item(node: plist_t, item: plist_t, n: u32);
}
extern "C" {
    #[doc = " Remove an existing position in a #PLIST_ARRAY node."]
    #[doc = " Removed position will be freed using #plist_free."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_ARRAY"]
    #[doc = " @param n The position to remove. Range is [0, array_size[. Assert if n is not in range."]
    pub fn plist_array_remove_item(node: plist_t, n: u32);
}
extern "C" {
    #[doc = " Remove a node that is a child node of a #PLIST_ARRAY node."]
    #[doc = " node will be freed using #plist_free."]
    #[doc = ""]
    #[doc = " @param node The node to be removed from its #PLIST_ARRAY parent."]
    pub fn plist_array_item_remove(node: plist_t);
}
extern "C" {
    #[doc = " Create an iterator of a #PLIST_ARRAY node."]
    #[doc = " The allocated iterator should be freed with the standard free function."]
    #[doc = ""]
    #[doc = " @param node The node of type #PLIST_ARRAY"]
    #[doc = " @param iter Location to store the iterator for the array."]
    pub fn plist_array_new_iter(node: plist_t, iter: *mut plist_array_iter);
}
extern "C" {
    #[doc = " Increment iterator of a #PLIST_ARRAY node."]
    #[doc = ""]
    #[doc = " @param node The node of type #PLIST_ARRAY."]
    #[doc = " @param iter Iterator of the array"]
    #[doc = " @param item Location to store the item. The caller must *not* free the"]
    #[doc = "          returned item. Will be set to NULL when no more items are left"]
    #[doc = "          to iterate."]
    pub fn plist_array_next_item(node: plist_t, iter: plist_array_iter, item: *mut plist_t);
}
extern "C" {
    #[doc = " Get size of a #PLIST_DICT node."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_DICT"]
    #[doc = " @return size of the #PLIST_DICT node"]
    pub fn plist_dict_get_size(node: plist_t) -> u32;
}
extern "C" {
    #[doc = " Create an iterator of a #PLIST_DICT node."]
    #[doc = " The allocated iterator should be freed with the standard free function."]
    #[doc = ""]
    #[doc = " @param node The node of type #PLIST_DICT."]
    #[doc = " @param iter Location to store the iterator for the dictionary."]
    pub fn plist_dict_new_iter(node: plist_t, iter: *mut plist_dict_iter);
}
extern "C" {
    #[doc = " Increment iterator of a #PLIST_DICT node."]
    #[doc = ""]
    #[doc = " @param node The node of type #PLIST_DICT"]
    #[doc = " @param iter Iterator of the dictionary"]
    #[doc = " @param key Location to store the key, or NULL. The caller is responsible"]
    #[doc = "\t\tfor freeing the the returned string."]
    #[doc = " @param val Location to store the value, or NULL. The caller must *not*"]
    #[doc = "\t\tfree the returned value. Will be set to NULL when no more"]
    #[doc = "\t\tkey/value pairs are left to iterate."]
    pub fn plist_dict_next_item(
        node: plist_t,
        iter: plist_dict_iter,
        key: *mut *mut ::std::os::raw::c_char,
        val: *mut plist_t,
    );
}
extern "C" {
    #[doc = " Get key associated key to an item. Item must be member of a dictionary."]
    #[doc = ""]
    #[doc = " @param node the item"]
    #[doc = " @param key a location to store the key. The caller is responsible for freeing the returned string."]
    pub fn plist_dict_get_item_key(node: plist_t, key: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Get the nth item in a #PLIST_DICT node."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_DICT"]
    #[doc = " @param key the identifier of the item to get."]
    #[doc = " @return the item or NULL if node is not of type #PLIST_DICT. The caller should not free"]
    #[doc = "\t\tthe returned node."]
    pub fn plist_dict_get_item(node: plist_t, key: *const ::std::os::raw::c_char) -> plist_t;
}
extern "C" {
    #[doc = " Get key node associated to an item. Item must be member of a dictionary."]
    #[doc = ""]
    #[doc = " @param node the item"]
    #[doc = " @return the key node of the given item, or NULL."]
    pub fn plist_dict_item_get_key(node: plist_t) -> plist_t;
}
extern "C" {
    #[doc = " Set item identified by key in a #PLIST_DICT node."]
    #[doc = " The previous item identified by key will be freed using #plist_free."]
    #[doc = " If there is no item for the given key a new item will be inserted."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_DICT"]
    #[doc = " @param item the new item associated to key"]
    #[doc = " @param key the identifier of the item to set."]
    pub fn plist_dict_set_item(node: plist_t, key: *const ::std::os::raw::c_char, item: plist_t);
}
extern "C" {
    #[doc = " Insert a new item into a #PLIST_DICT node."]
    #[doc = ""]
    #[doc = " @deprecated Deprecated. Use plist_dict_set_item instead."]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_DICT"]
    #[doc = " @param item the new item to insert"]
    #[doc = " @param key The identifier of the item to insert."]
    pub fn plist_dict_insert_item(node: plist_t, key: *const ::std::os::raw::c_char, item: plist_t);
}
extern "C" {
    #[doc = " Remove an existing position in a #PLIST_DICT node."]
    #[doc = " Removed position will be freed using #plist_free"]
    #[doc = ""]
    #[doc = " @param node the node of type #PLIST_DICT"]
    #[doc = " @param key The identifier of the item to remove. Assert if identifier is not present."]
    pub fn plist_dict_remove_item(node: plist_t, key: *const ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Merge a dictionary into another. This will add all key/value pairs"]
    #[doc = " from the source dictionary to the target dictionary, overwriting"]
    #[doc = " any existing key/value pairs that are already present in target."]
    #[doc = ""]
    #[doc = " @param target pointer to an existing node of type #PLIST_DICT"]
    #[doc = " @param source node of type #PLIST_DICT that should be merged into target"]
    pub fn plist_dict_merge(target: *mut plist_t, source: plist_t);
}
extern "C" {
    #[doc = " Get the parent of a node"]
    #[doc = ""]
    #[doc = " @param node the parent (NULL if node is root)"]
    pub fn plist_get_parent(node: plist_t) -> plist_t;
}
extern "C" {
    #[doc = " Get the #plist_type of a node."]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @return the type of the node"]
    pub fn plist_get_node_type(node: plist_t) -> plist_type;
}
extern "C" {
    #[doc = " Get the value of a #PLIST_KEY node."]
    #[doc = " This function does nothing if node is not of type #PLIST_KEY"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to a C-string. This function allocates the memory,"]
    #[doc = "            caller is responsible for freeing it."]
    pub fn plist_get_key_val(node: plist_t, val: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Get the value of a #PLIST_STRING node."]
    #[doc = " This function does nothing if node is not of type #PLIST_STRING"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to a C-string. This function allocates the memory,"]
    #[doc = "            caller is responsible for freeing it. Data is UTF-8 encoded."]
    pub fn plist_get_string_val(node: plist_t, val: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Get a pointer to the buffer of a #PLIST_STRING node."]
    #[doc = ""]
    #[doc = " @note DO NOT MODIFY the buffer. Mind that the buffer is only available"]
    #[doc = "   until the plist node gets freed. Make a copy if needed."]
    #[doc = ""]
    #[doc = " @param node The node"]
    #[doc = " @param length If non-NULL, will be set to the length of the string"]
    #[doc = ""]
    #[doc = " @return Pointer to the NULL-terminated buffer."]
    pub fn plist_get_string_ptr(node: plist_t, length: *mut u64) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Get the value of a #PLIST_BOOLEAN node."]
    #[doc = " This function does nothing if node is not of type #PLIST_BOOLEAN"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to a uint8_t variable."]
    pub fn plist_get_bool_val(node: plist_t, val: *mut u8);
}
extern "C" {
    #[doc = " Get the value of a #PLIST_UINT node."]
    #[doc = " This function does nothing if node is not of type #PLIST_UINT"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to a uint64_t variable."]
    pub fn plist_get_uint_val(node: plist_t, val: *mut u64);
}
extern "C" {
    #[doc = " Get the value of a #PLIST_REAL node."]
    #[doc = " This function does nothing if node is not of type #PLIST_REAL"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to a double variable."]
    pub fn plist_get_real_val(node: plist_t, val: *mut f64);
}
extern "C" {
    #[doc = " Get the value of a #PLIST_DATA node."]
    #[doc = " This function does nothing if node is not of type #PLIST_DATA"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to an unallocated char buffer. This function allocates the memory,"]
    #[doc = "            caller is responsible for freeing it."]
    #[doc = " @param length the length of the buffer"]
    pub fn plist_get_data_val(
        node: plist_t,
        val: *mut *mut ::std::os::raw::c_char,
        length: *mut u64,
    );
}
extern "C" {
    #[doc = " Get a pointer to the data buffer of a #PLIST_DATA node."]
    #[doc = ""]
    #[doc = " @note DO NOT MODIFY the buffer. Mind that the buffer is only available"]
    #[doc = "   until the plist node gets freed. Make a copy if needed."]
    #[doc = ""]
    #[doc = " @param node The node"]
    #[doc = " @param length Pointer to a uint64_t that will be set to the length of the buffer"]
    #[doc = ""]
    #[doc = " @return Pointer to the buffer"]
    pub fn plist_get_data_ptr(node: plist_t, length: *mut u64) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Get the value of a #PLIST_DATE node."]
    #[doc = " This function does nothing if node is not of type #PLIST_DATE"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param sec a pointer to an int32_t variable. Represents the number of seconds since 01/01/2001."]
    #[doc = " @param usec a pointer to an int32_t variable. Represents the number of microseconds"]
    pub fn plist_get_date_val(node: plist_t, sec: *mut i32, usec: *mut i32);
}
extern "C" {
    #[doc = " Get the value of a #PLIST_UID node."]
    #[doc = " This function does nothing if node is not of type #PLIST_UID"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val a pointer to a uint64_t variable."]
    pub fn plist_get_uid_val(node: plist_t, val: *mut u64);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_KEY"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the key value"]
    pub fn plist_set_key_val(node: plist_t, val: *const ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_STRING"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the string value. The string is copied when set and will be"]
    #[doc = "\t\tfreed by the node."]
    pub fn plist_set_string_val(node: plist_t, val: *const ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_BOOLEAN"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the boolean value"]
    pub fn plist_set_bool_val(node: plist_t, val: u8);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_UINT"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the unsigned integer value"]
    pub fn plist_set_uint_val(node: plist_t, val: u64);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_REAL"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the real value"]
    pub fn plist_set_real_val(node: plist_t, val: f64);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_DATA"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the binary buffer. The buffer is copied when set and will"]
    #[doc = "\t\tbe freed by the node."]
    #[doc = " @param length the length of the buffer"]
    pub fn plist_set_data_val(node: plist_t, val: *const ::std::os::raw::c_char, length: u64);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_DATE"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param sec the number of seconds since 01/01/2001"]
    #[doc = " @param usec the number of microseconds"]
    pub fn plist_set_date_val(node: plist_t, sec: i32, usec: i32);
}
extern "C" {
    #[doc = " Set the value of a node."]
    #[doc = " Forces type of node to #PLIST_UID"]
    #[doc = ""]
    #[doc = " @param node the node"]
    #[doc = " @param val the unsigned integer value"]
    pub fn plist_set_uid_val(node: plist_t, val: u64);
}
extern "C" {
    #[doc = " Export the #plist_t structure to XML format."]
    #[doc = ""]
    #[doc = " @param plist the root node to export"]
    #[doc = " @param plist_xml a pointer to a C-string. This function allocates the memory,"]
    #[doc = "            caller is responsible for freeing it. Data is UTF-8 encoded."]
    #[doc = " @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer."]
    pub fn plist_to_xml(
        plist: plist_t,
        plist_xml: *mut *mut ::std::os::raw::c_char,
        length: *mut u32,
    );
}
extern "C" {
    #[doc = " Frees the memory allocated by plist_to_xml()."]
    #[doc = ""]
    #[doc = " @param plist_xml The buffer allocated by plist_to_xml()."]
    pub fn plist_to_xml_free(plist_xml: *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Export the #plist_t structure to binary format."]
    #[doc = ""]
    #[doc = " @param plist the root node to export"]
    #[doc = " @param plist_bin a pointer to a char* buffer. This function allocates the memory,"]
    #[doc = "            caller is responsible for freeing it."]
    #[doc = " @param length a pointer to an uint32_t variable. Represents the length of the allocated buffer."]
    pub fn plist_to_bin(
        plist: plist_t,
        plist_bin: *mut *mut ::std::os::raw::c_char,
        length: *mut u32,
    );
}
extern "C" {
    #[doc = " Frees the memory allocated by plist_to_bin()."]
    #[doc = ""]
    #[doc = " @param plist_bin The buffer allocated by plist_to_bin()."]
    pub fn plist_to_bin_free(plist_bin: *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Import the #plist_t structure from XML format."]
    #[doc = ""]
    #[doc = " @param plist_xml a pointer to the xml buffer."]
    #[doc = " @param length length of the buffer to read."]
    #[doc = " @param plist a pointer to the imported plist."]
    pub fn plist_from_xml(
        plist_xml: *const ::std::os::raw::c_char,
        length: u32,
        plist: *mut plist_t,
    );
}
extern "C" {
    #[doc = " Import the #plist_t structure from binary format."]
    #[doc = ""]
    #[doc = " @param plist_bin a pointer to the xml buffer."]
    #[doc = " @param length length of the buffer to read."]
    #[doc = " @param plist a pointer to the imported plist."]
    pub fn plist_from_bin(
        plist_bin: *const ::std::os::raw::c_char,
        length: u32,
        plist: *mut plist_t,
    );
}
extern "C" {
    #[doc = " Import the #plist_t structure from memory data."]
    #[doc = " This method will look at the first bytes of plist_data"]
    #[doc = " to determine if plist_data contains a binary or XML plist."]
    #[doc = ""]
    #[doc = " @param plist_data a pointer to the memory buffer containing plist data."]
    #[doc = " @param length length of the buffer to read."]
    #[doc = " @param plist a pointer to the imported plist."]
    pub fn plist_from_memory(
        plist_data: *const ::std::os::raw::c_char,
        length: u32,
        plist: *mut plist_t,
    );
}
extern "C" {
    #[doc = " Test if in-memory plist data is binary or XML"]
    #[doc = " This method will look at the first bytes of plist_data"]
    #[doc = " to determine if plist_data contains a binary or XML plist."]
    #[doc = " This method is not validating the whole memory buffer to check if the"]
    #[doc = " content is truly a plist, it's only using some heuristic on the first few"]
    #[doc = " bytes of plist_data."]
    #[doc = ""]
    #[doc = " @param plist_data a pointer to the memory buffer containing plist data."]
    #[doc = " @param length length of the buffer to read."]
    #[doc = " @return 1 if the buffer is a binary plist, 0 otherwise."]
    pub fn plist_is_binary(
        plist_data: *const ::std::os::raw::c_char,
        length: u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Get a node from its path. Each path element depends on the associated father node type."]
    #[doc = " For Dictionaries, var args are casted to const char*, for arrays, var args are caster to uint32_t"]
    #[doc = " Search is breath first order."]
    #[doc = ""]
    #[doc = " @param plist the node to access result from."]
    #[doc = " @param length length of the path to access"]
    #[doc = " @return the value to access."]
    pub fn plist_access_path(plist: plist_t, length: u32, ...) -> plist_t;
}
extern "C" {
    #[doc = " Variadic version of #plist_access_path."]
    #[doc = ""]
    #[doc = " @param plist the node to access result from."]
    #[doc = " @param length length of the path to access"]
    #[doc = " @param v list of array's index and dic'st key"]
    #[doc = " @return the value to access."]
    pub fn plist_access_pathv(plist: plist_t, length: u32, v: va_list) -> plist_t;
}
extern "C" {
    #[doc = " Compare two node values"]
    #[doc = ""]
    #[doc = " @param node_l left node to compare"]
    #[doc = " @param node_r rigth node to compare"]
    #[doc = " @return TRUE is type and value match, FALSE otherwise."]
    pub fn plist_compare_node_value(node_l: plist_t, node_r: plist_t) -> ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Helper function to check the value of a PLIST_BOOL node."]
    #[doc = ""]
    #[doc = " @param boolnode node of type PLIST_BOOL"]
    #[doc = " @return 1 if the boolean node has a value of TRUE, 0 if FALSE,"]
    #[doc = "   or -1 if the node is not of type PLIST_BOOL"]
    pub fn plist_bool_val_is_true(boolnode: plist_t) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_UINT node against"]
    #[doc = " a given value."]
    #[doc = ""]
    #[doc = " @param uintnode node of type PLIST_UINT"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "         1 if the node's value is greater than cmpval,"]
    #[doc = "         or -1 if the node's value is less than cmpval."]
    pub fn plist_uint_val_compare(uintnode: plist_t, cmpval: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_UID node against"]
    #[doc = " a given value."]
    #[doc = ""]
    #[doc = " @param uidnode node of type PLIST_UID"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "         1 if the node's value is greater than cmpval,"]
    #[doc = "         or -1 if the node's value is less than cmpval."]
    pub fn plist_uid_val_compare(uidnode: plist_t, cmpval: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_REAL node against"]
    #[doc = " a given value."]
    #[doc = ""]
    #[doc = " @note WARNING: Comparing floating point values can give inaccurate"]
    #[doc = "     results because of the nature of floating point values on computer"]
    #[doc = "     systems. While this function is designed to be as accurate as"]
    #[doc = "     possible, please don't rely on it too much."]
    #[doc = ""]
    #[doc = " @param realnode node of type PLIST_REAL"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @return 0 if the node's value and cmpval are (almost) equal,"]
    #[doc = "         1 if the node's value is greater than cmpval,"]
    #[doc = "         or -1 if the node's value is less than cmpval."]
    pub fn plist_real_val_compare(realnode: plist_t, cmpval: f64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_DATE node against"]
    #[doc = " a given set of seconds and fraction of a second since epoch."]
    #[doc = ""]
    #[doc = " @param datenode node of type PLIST_DATE"]
    #[doc = " @param cmpsec number of seconds since epoch to compare against"]
    #[doc = " @param cmpusec fraction of a second in microseconds to compare against"]
    #[doc = " @return 0 if the node's date is equal to the supplied values,"]
    #[doc = "         1 if the node's date is greater than the supplied values,"]
    #[doc = "         or -1 if the node's date is less than the supplied values."]
    pub fn plist_date_val_compare(
        datenode: plist_t,
        cmpsec: i32,
        cmpusec: i32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_STRING node against"]
    #[doc = " a given value."]
    #[doc = " This function basically behaves like strcmp."]
    #[doc = ""]
    #[doc = " @param strnode node of type PLIST_STRING"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "     > 0 if the node's value is lexicographically greater than cmpval,"]
    #[doc = "     or < 0 if the node's value is lexicographically less than cmpval."]
    pub fn plist_string_val_compare(
        strnode: plist_t,
        cmpval: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_STRING node against"]
    #[doc = " a given value, while not comparing more than n characters."]
    #[doc = " This function basically behaves like strncmp."]
    #[doc = ""]
    #[doc = " @param strnode node of type PLIST_STRING"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @param n maximum number of characters to compare"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "     > 0 if the node's value is lexicographically greater than cmpval,"]
    #[doc = "     or < 0 if the node's value is lexicographically less than cmpval."]
    pub fn plist_string_val_compare_with_size(
        strnode: plist_t,
        cmpval: *const ::std::os::raw::c_char,
        n: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to match a given substring in the value of a"]
    #[doc = " PLIST_STRING node."]
    #[doc = ""]
    #[doc = " @param strnode node of type PLIST_STRING"]
    #[doc = " @param substr value to match"]
    #[doc = " @return 1 if the node's value contains the given substring,"]
    #[doc = "     or 0 if not."]
    pub fn plist_string_val_contains(
        strnode: plist_t,
        substr: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_KEY node against"]
    #[doc = " a given value."]
    #[doc = " This function basically behaves like strcmp."]
    #[doc = ""]
    #[doc = " @param keynode node of type PLIST_KEY"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "     > 0 if the node's value is lexicographically greater than cmpval,"]
    #[doc = "     or < 0 if the node's value is lexicographically less than cmpval."]
    pub fn plist_key_val_compare(
        keynode: plist_t,
        cmpval: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the value of a PLIST_KEY node against"]
    #[doc = " a given value, while not comparing more than n characters."]
    #[doc = " This function basically behaves like strncmp."]
    #[doc = ""]
    #[doc = " @param keynode node of type PLIST_KEY"]
    #[doc = " @param cmpval value to compare against"]
    #[doc = " @param n maximum number of characters to compare"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "     > 0 if the node's value is lexicographically greater than cmpval,"]
    #[doc = "     or < 0 if the node's value is lexicographically less than cmpval."]
    pub fn plist_key_val_compare_with_size(
        keynode: plist_t,
        cmpval: *const ::std::os::raw::c_char,
        n: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to match a given substring in the value of a"]
    #[doc = " PLIST_KEY node."]
    #[doc = ""]
    #[doc = " @param keynode node of type PLIST_KEY"]
    #[doc = " @param substr value to match"]
    #[doc = " @return 1 if the node's value contains the given substring,"]
    #[doc = "     or 0 if not."]
    pub fn plist_key_val_contains(
        keynode: plist_t,
        substr: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the data of a PLIST_DATA node against"]
    #[doc = " a given blob and size."]
    #[doc = " This function basically behaves like memcmp after making sure the"]
    #[doc = " size of the node's data value is equal to the size of cmpval (n),"]
    #[doc = " making this a \"full match\" comparison."]
    #[doc = ""]
    #[doc = " @param datanode node of type PLIST_DATA"]
    #[doc = " @param cmpval data blob to compare against"]
    #[doc = " @param n size of data blob passed in cmpval"]
    #[doc = " @return 0 if the node's data blob and cmpval are equal,"]
    #[doc = "     > 0 if the node's value is lexicographically greater than cmpval,"]
    #[doc = "     or < 0 if the node's value is lexicographically less than cmpval."]
    pub fn plist_data_val_compare(
        datanode: plist_t,
        cmpval: *const u8,
        n: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to compare the data of a PLIST_DATA node against"]
    #[doc = " a given blob and size, while no more than n bytes are compared."]
    #[doc = " This function basically behaves like memcmp after making sure the"]
    #[doc = " size of the node's data value is at least n, making this a"]
    #[doc = " \"starts with\" comparison."]
    #[doc = ""]
    #[doc = " @param datanode node of type PLIST_DATA"]
    #[doc = " @param cmpval data blob to compare against"]
    #[doc = " @param n size of data blob passed in cmpval"]
    #[doc = " @return 0 if the node's value and cmpval are equal,"]
    #[doc = "     > 0 if the node's value is lexicographically greater than cmpval,"]
    #[doc = "     or < 0 if the node's value is lexicographically less than cmpval."]
    pub fn plist_data_val_compare_with_size(
        datanode: plist_t,
        cmpval: *const u8,
        n: size_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Helper function to match a given data blob within the value of a"]
    #[doc = " PLIST_DATA node."]
    #[doc = ""]
    #[doc = " @param datanode node of type PLIST_KEY"]
    #[doc = " @param cmpval data blob to match"]
    #[doc = " @param n size of data blob passed in cmpval"]
    #[doc = " @return 1 if the node's value contains the given data blob"]
    #[doc = "     or 0 if not."]
    pub fn plist_data_val_contains(
        datanode: plist_t,
        cmpval: *const u8,
        n: size_t,
    ) -> ::std::os::raw::c_int;
}
pub const userpref_error_t_USERPREF_E_SUCCESS: userpref_error_t = 0;
pub const userpref_error_t_USERPREF_E_INVALID_ARG: userpref_error_t = -1;
pub const userpref_error_t_USERPREF_E_NOENT: userpref_error_t = -2;
pub const userpref_error_t_USERPREF_E_INVALID_CONF: userpref_error_t = -3;
pub const userpref_error_t_USERPREF_E_SSL_ERROR: userpref_error_t = -4;
pub const userpref_error_t_USERPREF_E_READ_ERROR: userpref_error_t = -5;
pub const userpref_error_t_USERPREF_E_WRITE_ERROR: userpref_error_t = -6;
pub const userpref_error_t_USERPREF_E_UNKNOWN_ERROR: userpref_error_t = -256;
#[doc = " Error Codes"]
pub type userpref_error_t = ::std::os::raw::c_int;
extern "C" {
    pub fn userpref_get_config_dir() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn userpref_read_system_buid(
        system_buid: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn userpref_read_pair_record(
        udid: *const ::std::os::raw::c_char,
        pair_record: *mut plist_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn userpref_save_pair_record(
        udid: *const ::std::os::raw::c_char,
        device_id: u32,
        pair_record: plist_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn userpref_delete_pair_record(udid: *const ::std::os::raw::c_char) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_generate_keys_and_certs(
        pair_record: plist_t,
        public_key: key_data_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_import_key_with_name(
        pair_record: plist_t,
        name: *const ::std::os::raw::c_char,
        key: gnutls_x509_privkey_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_import_crt_with_name(
        pair_record: plist_t,
        name: *const ::std::os::raw::c_char,
        cert: gnutls_x509_crt_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_get_host_id(
        pair_record: plist_t,
        host_id: *mut *mut ::std::os::raw::c_char,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_set_host_id(
        pair_record: plist_t,
        host_id: *const ::std::os::raw::c_char,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_get_item_as_key_data(
        pair_record: plist_t,
        name: *const ::std::os::raw::c_char,
        value: *mut key_data_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn pair_record_set_item_from_key_data(
        pair_record: plist_t,
        name: *const ::std::os::raw::c_char,
        value: *mut key_data_t,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn userpref_get_paired_udids(
        list: *mut *mut *mut ::std::os::raw::c_char,
        count: *mut ::std::os::raw::c_uint,
    ) -> userpref_error_t;
}
extern "C" {
    pub fn userpref_has_pair_record(udid: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ostat {
    pub st_dev: __uint16_t,
    pub st_ino: ino_t,
    pub st_mode: mode_t,
    pub st_nlink: nlink_t,
    pub st_uid: __uint16_t,
    pub st_gid: __uint16_t,
    pub st_rdev: __uint16_t,
    pub st_size: __int32_t,
    pub st_atimespec: timespec,
    pub st_mtimespec: timespec,
    pub st_ctimespec: timespec,
    pub st_blksize: __int32_t,
    pub st_blocks: __int32_t,
    pub st_flags: __uint32_t,
    pub st_gen: __uint32_t,
}
#[test]
fn bindgen_test_layout_ostat() {
    assert_eq!(
        ::std::mem::size_of::<ostat>(),
        96usize,
        concat!("Size of: ", stringify!(ostat))
    );
    assert_eq!(
        ::std::mem::align_of::<ostat>(),
        8usize,
        concat!("Alignment of ", stringify!(ostat))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_dev as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_dev)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_ino as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_ino)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_mode as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_mode)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_nlink as *const _ as usize },
        18usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_nlink)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_uid as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_uid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_gid as *const _ as usize },
        22usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_gid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_rdev as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_rdev)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_size as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_atimespec as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_atimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_mtimespec as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_mtimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_ctimespec as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_ctimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_blksize as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_blksize)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_blocks as *const _ as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_blocks)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_flags as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ostat>())).st_gen as *const _ as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(ostat),
            "::",
            stringify!(st_gen)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct stat {
    pub st_dev: dev_t,
    pub st_mode: mode_t,
    pub st_nlink: nlink_t,
    pub st_ino: __darwin_ino64_t,
    pub st_uid: uid_t,
    pub st_gid: gid_t,
    pub st_rdev: dev_t,
    pub st_atimespec: timespec,
    pub st_mtimespec: timespec,
    pub st_ctimespec: timespec,
    pub st_birthtimespec: timespec,
    pub st_size: off_t,
    pub st_blocks: blkcnt_t,
    pub st_blksize: blksize_t,
    pub st_flags: __uint32_t,
    pub st_gen: __uint32_t,
    pub st_lspare: __int32_t,
    pub st_qspare: [__int64_t; 2usize],
}
#[test]
fn bindgen_test_layout_stat() {
    assert_eq!(
        ::std::mem::size_of::<stat>(),
        144usize,
        concat!("Size of: ", stringify!(stat))
    );
    assert_eq!(
        ::std::mem::align_of::<stat>(),
        8usize,
        concat!("Alignment of ", stringify!(stat))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_dev as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_dev)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_mode as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_mode)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_nlink as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_nlink)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_ino as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_ino)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_uid as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_uid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_gid as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_gid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_rdev as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_rdev)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_atimespec as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_atimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_mtimespec as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_mtimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_ctimespec as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_ctimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_birthtimespec as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_birthtimespec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_size as *const _ as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_blocks as *const _ as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_blocks)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_blksize as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_blksize)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_flags as *const _ as usize },
        116usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_gen as *const _ as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_gen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_lspare as *const _ as usize },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_lspare)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<stat>())).st_qspare as *const _ as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(stat),
            "::",
            stringify!(st_qspare)
        )
    );
}
extern "C" {
    pub fn chmod(arg1: *const ::std::os::raw::c_char, arg2: mode_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fchmod(arg1: ::std::os::raw::c_int, arg2: mode_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fstat(arg1: ::std::os::raw::c_int, arg2: *mut stat) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lstat(arg1: *const ::std::os::raw::c_char, arg2: *mut stat) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mkdir(arg1: *const ::std::os::raw::c_char, arg2: mode_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mkfifo(arg1: *const ::std::os::raw::c_char, arg2: mode_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn stat(arg1: *const ::std::os::raw::c_char, arg2: *mut stat) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mknod(
        arg1: *const ::std::os::raw::c_char,
        arg2: mode_t,
        arg3: dev_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn umask(arg1: mode_t) -> mode_t;
}
extern "C" {
    pub fn fchmodat(
        arg1: ::std::os::raw::c_int,
        arg2: *const ::std::os::raw::c_char,
        arg3: mode_t,
        arg4: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fstatat(
        arg1: ::std::os::raw::c_int,
        arg2: *const ::std::os::raw::c_char,
        arg3: *mut stat,
        arg4: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mkdirat(
        arg1: ::std::os::raw::c_int,
        arg2: *const ::std::os::raw::c_char,
        arg3: mode_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn futimens(__fd: ::std::os::raw::c_int, __times: *const timespec)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn utimensat(
        __fd: ::std::os::raw::c_int,
        __path: *const ::std::os::raw::c_char,
        __times: *const timespec,
        __flag: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _filesec {
    _unused: [u8; 0],
}
pub type filesec_t = *mut _filesec;
extern "C" {
    pub fn chflags(arg1: *const ::std::os::raw::c_char, arg2: __uint32_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn chmodx_np(arg1: *const ::std::os::raw::c_char, arg2: filesec_t)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fchflags(arg1: ::std::os::raw::c_int, arg2: __uint32_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fchmodx_np(arg1: ::std::os::raw::c_int, arg2: filesec_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fstatx_np(
        arg1: ::std::os::raw::c_int,
        arg2: *mut stat,
        arg3: filesec_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lchflags(arg1: *const ::std::os::raw::c_char, arg2: __uint32_t)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lchmod(arg1: *const ::std::os::raw::c_char, arg2: mode_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lstatx_np(
        arg1: *const ::std::os::raw::c_char,
        arg2: *mut stat,
        arg3: filesec_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mkdirx_np(arg1: *const ::std::os::raw::c_char, arg2: filesec_t)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mkfifox_np(
        arg1: *const ::std::os::raw::c_char,
        arg2: filesec_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn statx_np(
        arg1: *const ::std::os::raw::c_char,
        arg2: *mut stat,
        arg3: filesec_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn umaskx_np(arg1: filesec_t) -> ::std::os::raw::c_int;
}
pub const idevice_error_t_IDEVICE_E_SUCCESS: idevice_error_t = 0;
pub const idevice_error_t_IDEVICE_E_INVALID_ARG: idevice_error_t = -1;
pub const idevice_error_t_IDEVICE_E_UNKNOWN_ERROR: idevice_error_t = -2;
pub const idevice_error_t_IDEVICE_E_NO_DEVICE: idevice_error_t = -3;
pub const idevice_error_t_IDEVICE_E_NOT_ENOUGH_DATA: idevice_error_t = -4;
pub const idevice_error_t_IDEVICE_E_CONNREFUSED: idevice_error_t = -5;
pub const idevice_error_t_IDEVICE_E_SSL_ERROR: idevice_error_t = -6;
pub const idevice_error_t_IDEVICE_E_TIMEOUT: idevice_error_t = -7;
#[doc = " Error Codes"]
pub type idevice_error_t = ::std::os::raw::c_int;
pub type idevice_t = *mut idevice_private;
pub type idevice_connection_t = *mut idevice_connection_private;
#[doc = "< include USBMUX devices during lookup"]
pub const idevice_options_IDEVICE_LOOKUP_USBMUX: idevice_options = 2;
#[doc = "< include network devices during lookup"]
pub const idevice_options_IDEVICE_LOOKUP_NETWORK: idevice_options = 4;
#[doc = "< prefer network connection if device is available via USBMUX *and* network"]
pub const idevice_options_IDEVICE_LOOKUP_PREFER_NETWORK: idevice_options = 8;
#[doc = " Options for idevice_new_with_options()"]
pub type idevice_options = ::std::os::raw::c_uint;
pub const idevice_connection_type_CONNECTION_USBMUXD: idevice_connection_type = 1;
pub const idevice_connection_type_CONNECTION_NETWORK: idevice_connection_type = 2;
#[doc = " Type of connection a device is available on"]
pub type idevice_connection_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct idevice_info {
    pub udid: *mut ::std::os::raw::c_char,
    pub conn_type: idevice_connection_type,
    pub conn_data: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_idevice_info() {
    assert_eq!(
        ::std::mem::size_of::<idevice_info>(),
        24usize,
        concat!("Size of: ", stringify!(idevice_info))
    );
    assert_eq!(
        ::std::mem::align_of::<idevice_info>(),
        8usize,
        concat!("Alignment of ", stringify!(idevice_info))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_info>())).udid as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_info),
            "::",
            stringify!(udid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_info>())).conn_type as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_info),
            "::",
            stringify!(conn_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_info>())).conn_data as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_info),
            "::",
            stringify!(conn_data)
        )
    );
}
pub type idevice_info_t = *mut idevice_info;
pub const idevice_event_type_IDEVICE_DEVICE_ADD: idevice_event_type = 1;
pub const idevice_event_type_IDEVICE_DEVICE_REMOVE: idevice_event_type = 2;
pub const idevice_event_type_IDEVICE_DEVICE_PAIRED: idevice_event_type = 3;
#[doc = " The event type for device add or removal"]
pub type idevice_event_type = ::std::os::raw::c_uint;
#[doc = " Provides information about the occurred event."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct idevice_event_t {
    #[doc = "< The event type."]
    pub event: idevice_event_type,
    #[doc = "< The device unique id."]
    pub udid: *const ::std::os::raw::c_char,
    #[doc = "< The connection type."]
    pub conn_type: idevice_connection_type,
}
#[test]
fn bindgen_test_layout_idevice_event_t() {
    assert_eq!(
        ::std::mem::size_of::<idevice_event_t>(),
        24usize,
        concat!("Size of: ", stringify!(idevice_event_t))
    );
    assert_eq!(
        ::std::mem::align_of::<idevice_event_t>(),
        8usize,
        concat!("Alignment of ", stringify!(idevice_event_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_event_t>())).event as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_event_t),
            "::",
            stringify!(event)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_event_t>())).udid as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_event_t),
            "::",
            stringify!(udid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_event_t>())).conn_type as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_event_t),
            "::",
            stringify!(conn_type)
        )
    );
}
#[doc = " Callback to notifiy if a device was added or removed."]
pub type idevice_event_cb_t = ::std::option::Option<
    unsafe extern "C" fn(event: *const idevice_event_t, user_data: *mut ::std::os::raw::c_void),
>;
extern "C" {
    #[doc = " Set the level of debugging."]
    #[doc = ""]
    #[doc = " @param level Set to 0 for no debug output or 1 to enable debug output."]
    pub fn idevice_set_debug_level(level: ::std::os::raw::c_int);
}
extern "C" {
    #[doc = " Register a callback function that will be called when device add/remove"]
    #[doc = " events occur."]
    #[doc = ""]
    #[doc = " @param callback Callback function to call."]
    #[doc = " @param user_data Application-specific data passed as parameter"]
    #[doc = "   to the registered callback function."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success or an error value when an error occurred."]
    pub fn idevice_event_subscribe(
        callback: idevice_event_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Release the event callback function that has been registered with"]
    #[doc = "  idevice_event_subscribe()."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success or an error value when an error occurred."]
    pub fn idevice_event_unsubscribe() -> idevice_error_t;
}
extern "C" {
    #[doc = " Get a list of UDIDs of currently available devices (USBMUX devices only)."]
    #[doc = ""]
    #[doc = " @param devices List of UDIDs of devices that are currently available."]
    #[doc = "   This list is terminated by a NULL pointer."]
    #[doc = " @param count Number of devices found."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success or an error value when an error occurred."]
    #[doc = ""]
    #[doc = " @note This function only returns the UDIDs of USBMUX devices. To also include"]
    #[doc = "   network devices in the list, use idevice_get_device_list_extended()."]
    #[doc = " @see idevice_get_device_list_extended"]
    pub fn idevice_get_device_list(
        devices: *mut *mut *mut ::std::os::raw::c_char,
        count: *mut ::std::os::raw::c_int,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Free a list of device UDIDs."]
    #[doc = ""]
    #[doc = " @param devices List of UDIDs to free."]
    #[doc = ""]
    #[doc = " @return Always returnes IDEVICE_E_SUCCESS."]
    pub fn idevice_device_list_free(devices: *mut *mut ::std::os::raw::c_char) -> idevice_error_t;
}
extern "C" {
    #[doc = " Get a list of currently available devices"]
    #[doc = ""]
    #[doc = " @param devices List of idevice_info_t records with device information."]
    #[doc = "   This list is terminated by a NULL pointer."]
    #[doc = " @param count Number of devices included in the list."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success or an error value when an error occurred."]
    pub fn idevice_get_device_list_extended(
        devices: *mut *mut idevice_info_t,
        count: *mut ::std::os::raw::c_int,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Free an extended device list retrieved through idevice_get_device_list_extended()."]
    #[doc = ""]
    #[doc = " @param devices Device list to free."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success or an error value when an error occurred."]
    pub fn idevice_device_list_extended_free(devices: *mut idevice_info_t) -> idevice_error_t;
}
extern "C" {
    #[doc = " Creates an idevice_t structure for the device specified by UDID,"]
    #[doc = "  if the device is available (USBMUX devices only)."]
    #[doc = ""]
    #[doc = " @note The resulting idevice_t structure has to be freed with"]
    #[doc = " idevice_free() if it is no longer used."]
    #[doc = " If you need to connect to a device available via network, use"]
    #[doc = " idevice_new_with_options() and include IDEVICE_LOOKUP_NETWORK in options."]
    #[doc = ""]
    #[doc = " @see idevice_new_with_options"]
    #[doc = ""]
    #[doc = " @param device Upon calling this function, a pointer to a location of type"]
    #[doc = "  idevice_t. On successful return, this location will be populated."]
    #[doc = " @param udid The UDID to match."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_new(
        device: *mut idevice_t,
        udid: *const ::std::os::raw::c_char,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Creates an idevice_t structure for the device specified by UDID,"]
    #[doc = "  if the device is available, with the given lookup options."]
    #[doc = ""]
    #[doc = " @note The resulting idevice_t structure has to be freed with"]
    #[doc = " idevice_free() if it is no longer used."]
    #[doc = ""]
    #[doc = " @param device Upon calling this function, a pointer to a location of type"]
    #[doc = "   idevice_t. On successful return, this location will be populated."]
    #[doc = " @param udid The UDID to match."]
    #[doc = " @param options Specifies what connection types should be considered"]
    #[doc = "   when looking up devices. Accepts bitwise or'ed values of idevice_options."]
    #[doc = "   If 0 (no option) is specified it will default to IDEVICE_LOOKUP_USBMUX."]
    #[doc = "   To lookup both USB and network-connected devices, pass"]
    #[doc = "   IDEVICE_LOOKUP_USBMUX | IDEVICE_LOOKUP_NETWORK. If a device is available"]
    #[doc = "   both via USBMUX *and* network, it will select the USB connection."]
    #[doc = "   This behavior can be changed by adding IDEVICE_LOOKUP_PREFER_NETWORK"]
    #[doc = "   to the options in which case it will select the network connection."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_new_with_options(
        device: *mut idevice_t,
        udid: *const ::std::os::raw::c_char,
        options: idevice_options,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Cleans up an idevice structure, then frees the structure itself."]
    #[doc = ""]
    #[doc = " @param device idevice_t to free."]
    pub fn idevice_free(device: idevice_t) -> idevice_error_t;
}
extern "C" {
    #[doc = " Set up a connection to the given device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param port The destination port to connect to."]
    #[doc = " @param connection Pointer to an idevice_connection_t that will be filled"]
    #[doc = "   with the necessary data of the connection."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_connect(
        device: idevice_t,
        port: u16,
        connection: *mut idevice_connection_t,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Disconnect from the device and clean up the connection structure."]
    #[doc = ""]
    #[doc = " @param connection The connection to close."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_disconnect(connection: idevice_connection_t) -> idevice_error_t;
}
extern "C" {
    #[doc = " Send data to a device via the given connection."]
    #[doc = ""]
    #[doc = " @param connection The connection to send data over."]
    #[doc = " @param data Buffer with data to send."]
    #[doc = " @param len Size of the buffer to send."]
    #[doc = " @param sent_bytes Pointer to an uint32_t that will be filled"]
    #[doc = "   with the number of bytes actually sent."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_connection_send(
        connection: idevice_connection_t,
        data: *const ::std::os::raw::c_char,
        len: u32,
        sent_bytes: *mut u32,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Receive data from a device via the given connection."]
    #[doc = " This function will return after the given timeout even if no data has been"]
    #[doc = " received."]
    #[doc = ""]
    #[doc = " @param connection The connection to receive data from."]
    #[doc = " @param data Buffer that will be filled with the received data."]
    #[doc = "   This buffer has to be large enough to hold len bytes."]
    #[doc = " @param len Buffer size or number of bytes to receive."]
    #[doc = " @param recv_bytes Number of bytes actually received."]
    #[doc = " @param timeout Timeout in milliseconds after which this function should"]
    #[doc = "   return even if no data has been received."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_connection_receive_timeout(
        connection: idevice_connection_t,
        data: *mut ::std::os::raw::c_char,
        len: u32,
        recv_bytes: *mut u32,
        timeout: ::std::os::raw::c_uint,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Receive data from a device via the given connection."]
    #[doc = " This function is like idevice_connection_receive_timeout, but with a"]
    #[doc = " predefined reasonable timeout."]
    #[doc = ""]
    #[doc = " @param connection The connection to receive data from."]
    #[doc = " @param data Buffer that will be filled with the received data."]
    #[doc = "   This buffer has to be large enough to hold len bytes."]
    #[doc = " @param len Buffer size or number of bytes to receive."]
    #[doc = " @param recv_bytes Number of bytes actually received."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_connection_receive(
        connection: idevice_connection_t,
        data: *mut ::std::os::raw::c_char,
        len: u32,
        recv_bytes: *mut u32,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Enables SSL for the given connection."]
    #[doc = ""]
    #[doc = " @param connection The connection to enable SSL for."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection"]
    #[doc = "     is NULL or connection->ssl_data is non-NULL, or IDEVICE_E_SSL_ERROR when"]
    #[doc = "     SSL initialization, setup, or handshake fails."]
    pub fn idevice_connection_enable_ssl(connection: idevice_connection_t) -> idevice_error_t;
}
extern "C" {
    #[doc = " Disable SSL for the given connection."]
    #[doc = ""]
    #[doc = " @param connection The connection to disable SSL for."]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection"]
    #[doc = "     is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not"]
    #[doc = "     enabled and does no further error checking on cleanup."]
    pub fn idevice_connection_disable_ssl(connection: idevice_connection_t) -> idevice_error_t;
}
extern "C" {
    #[doc = " Disable bypass SSL for the given connection without sending out terminate messages."]
    #[doc = ""]
    #[doc = " @param connection The connection to disable SSL for."]
    #[doc = " @param sslBypass  if true ssl connection will not be terminated but just cleaned up, allowing"]
    #[doc = "                   plain text data going on underlying connection"]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection"]
    #[doc = "     is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not"]
    #[doc = "     enabled and does no further error checking on cleanup."]
    pub fn idevice_connection_disable_bypass_ssl(
        connection: idevice_connection_t,
        sslBypass: u8,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Get the underlying file descriptor for a connection"]
    #[doc = ""]
    #[doc = " @param connection The connection to get fd of"]
    #[doc = " @param fd Pointer to an int where the fd is stored"]
    #[doc = ""]
    #[doc = " @return IDEVICE_E_SUCCESS if ok, otherwise an error code."]
    pub fn idevice_connection_get_fd(
        connection: idevice_connection_t,
        fd: *mut ::std::os::raw::c_int,
    ) -> idevice_error_t;
}
extern "C" {
    #[doc = " Gets the handle or (usbmux device id) of the device."]
    pub fn idevice_get_handle(device: idevice_t, handle: *mut u32) -> idevice_error_t;
}
extern "C" {
    #[doc = " Gets the unique id for the device."]
    pub fn idevice_get_udid(
        device: idevice_t,
        udid: *mut *mut ::std::os::raw::c_char,
    ) -> idevice_error_t;
}
pub const lockdownd_error_t_LOCKDOWN_E_SUCCESS: lockdownd_error_t = 0;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_ARG: lockdownd_error_t = -1;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_CONF: lockdownd_error_t = -2;
pub const lockdownd_error_t_LOCKDOWN_E_PLIST_ERROR: lockdownd_error_t = -3;
pub const lockdownd_error_t_LOCKDOWN_E_PAIRING_FAILED: lockdownd_error_t = -4;
pub const lockdownd_error_t_LOCKDOWN_E_SSL_ERROR: lockdownd_error_t = -5;
pub const lockdownd_error_t_LOCKDOWN_E_DICT_ERROR: lockdownd_error_t = -6;
pub const lockdownd_error_t_LOCKDOWN_E_RECEIVE_TIMEOUT: lockdownd_error_t = -7;
pub const lockdownd_error_t_LOCKDOWN_E_MUX_ERROR: lockdownd_error_t = -8;
pub const lockdownd_error_t_LOCKDOWN_E_NO_RUNNING_SESSION: lockdownd_error_t = -9;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_RESPONSE: lockdownd_error_t = -10;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_KEY: lockdownd_error_t = -11;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_VALUE: lockdownd_error_t = -12;
pub const lockdownd_error_t_LOCKDOWN_E_GET_PROHIBITED: lockdownd_error_t = -13;
pub const lockdownd_error_t_LOCKDOWN_E_SET_PROHIBITED: lockdownd_error_t = -14;
pub const lockdownd_error_t_LOCKDOWN_E_REMOVE_PROHIBITED: lockdownd_error_t = -15;
pub const lockdownd_error_t_LOCKDOWN_E_IMMUTABLE_VALUE: lockdownd_error_t = -16;
pub const lockdownd_error_t_LOCKDOWN_E_PASSWORD_PROTECTED: lockdownd_error_t = -17;
pub const lockdownd_error_t_LOCKDOWN_E_USER_DENIED_PAIRING: lockdownd_error_t = -18;
pub const lockdownd_error_t_LOCKDOWN_E_PAIRING_DIALOG_RESPONSE_PENDING: lockdownd_error_t = -19;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_HOST_ID: lockdownd_error_t = -20;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_HOST_ID: lockdownd_error_t = -21;
pub const lockdownd_error_t_LOCKDOWN_E_SESSION_ACTIVE: lockdownd_error_t = -22;
pub const lockdownd_error_t_LOCKDOWN_E_SESSION_INACTIVE: lockdownd_error_t = -23;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_SESSION_ID: lockdownd_error_t = -24;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_SESSION_ID: lockdownd_error_t = -25;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_SERVICE: lockdownd_error_t = -26;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_SERVICE: lockdownd_error_t = -27;
pub const lockdownd_error_t_LOCKDOWN_E_SERVICE_LIMIT: lockdownd_error_t = -28;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_PAIR_RECORD: lockdownd_error_t = -29;
pub const lockdownd_error_t_LOCKDOWN_E_SAVE_PAIR_RECORD_FAILED: lockdownd_error_t = -30;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_PAIR_RECORD: lockdownd_error_t = -31;
pub const lockdownd_error_t_LOCKDOWN_E_INVALID_ACTIVATION_RECORD: lockdownd_error_t = -32;
pub const lockdownd_error_t_LOCKDOWN_E_MISSING_ACTIVATION_RECORD: lockdownd_error_t = -33;
pub const lockdownd_error_t_LOCKDOWN_E_SERVICE_PROHIBITED: lockdownd_error_t = -34;
pub const lockdownd_error_t_LOCKDOWN_E_ESCROW_LOCKED: lockdownd_error_t = -35;
pub const lockdownd_error_t_LOCKDOWN_E_PAIRING_PROHIBITED_OVER_THIS_CONNECTION: lockdownd_error_t =
    -36;
pub const lockdownd_error_t_LOCKDOWN_E_FMIP_PROTECTED: lockdownd_error_t = -37;
pub const lockdownd_error_t_LOCKDOWN_E_MC_PROTECTED: lockdownd_error_t = -38;
pub const lockdownd_error_t_LOCKDOWN_E_MC_CHALLENGE_REQUIRED: lockdownd_error_t = -39;
pub const lockdownd_error_t_LOCKDOWN_E_UNKNOWN_ERROR: lockdownd_error_t = -256;
#[doc = " Error Codes"]
pub type lockdownd_error_t = ::std::os::raw::c_int;
pub type lockdownd_client_t = *mut lockdownd_client_private;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lockdownd_pair_record {
    #[doc = "< The device certificate"]
    pub device_certificate: *mut ::std::os::raw::c_char,
    #[doc = "< The host certificate"]
    pub host_certificate: *mut ::std::os::raw::c_char,
    #[doc = "< The root certificate"]
    pub root_certificate: *mut ::std::os::raw::c_char,
    #[doc = "< A unique HostID for the host computer"]
    pub host_id: *mut ::std::os::raw::c_char,
    #[doc = "< A unique system id"]
    pub system_buid: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_lockdownd_pair_record() {
    assert_eq!(
        ::std::mem::size_of::<lockdownd_pair_record>(),
        40usize,
        concat!("Size of: ", stringify!(lockdownd_pair_record))
    );
    assert_eq!(
        ::std::mem::align_of::<lockdownd_pair_record>(),
        8usize,
        concat!("Alignment of ", stringify!(lockdownd_pair_record))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_pair_record>())).device_certificate as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_pair_record),
            "::",
            stringify!(device_certificate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_pair_record>())).host_certificate as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_pair_record),
            "::",
            stringify!(host_certificate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_pair_record>())).root_certificate as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_pair_record),
            "::",
            stringify!(root_certificate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<lockdownd_pair_record>())).host_id as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_pair_record),
            "::",
            stringify!(host_id)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_pair_record>())).system_buid as *const _ as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_pair_record),
            "::",
            stringify!(system_buid)
        )
    );
}
#[doc = " A pair record holding device, host and root certificates along the host_id"]
pub type lockdownd_pair_record_t = *mut lockdownd_pair_record;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lockdownd_service_descriptor {
    pub port: u16,
    pub ssl_enabled: u8,
    pub identifier: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_lockdownd_service_descriptor() {
    assert_eq!(
        ::std::mem::size_of::<lockdownd_service_descriptor>(),
        16usize,
        concat!("Size of: ", stringify!(lockdownd_service_descriptor))
    );
    assert_eq!(
        ::std::mem::align_of::<lockdownd_service_descriptor>(),
        8usize,
        concat!("Alignment of ", stringify!(lockdownd_service_descriptor))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_service_descriptor>())).port as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_service_descriptor),
            "::",
            stringify!(port)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_service_descriptor>())).ssl_enabled as *const _
                as usize
        },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_service_descriptor),
            "::",
            stringify!(ssl_enabled)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_service_descriptor>())).identifier as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_service_descriptor),
            "::",
            stringify!(identifier)
        )
    );
}
pub type lockdownd_service_descriptor_t = *mut lockdownd_service_descriptor;
#[doc = "< PIN requested: data_ptr is a char* buffer, and data_size points to the size of this buffer that must not be exceeded and has to be updated to the actual number of characters filled into the buffer."]
pub const lockdownd_cu_pairing_cb_type_t_LOCKDOWN_CU_PAIRING_PIN_REQUESTED:
    lockdownd_cu_pairing_cb_type_t = 0;
#[doc = "< device information available: data_ptr is a plist_t, and data_size is ignored. The plist_t has to be copied if required, since it is freed when the callback function returns."]
pub const lockdownd_cu_pairing_cb_type_t_LOCKDOWN_CU_PAIRING_DEVICE_INFO:
    lockdownd_cu_pairing_cb_type_t = 1;
#[doc = "< pairing error message available: data_ptr is a NULL-terminated char* buffer containing the error message, and data_size is ignored. Buffer needs to be copied if it shall persist outside the callback."]
pub const lockdownd_cu_pairing_cb_type_t_LOCKDOWN_CU_PAIRING_ERROR: lockdownd_cu_pairing_cb_type_t =
    2;
pub type lockdownd_cu_pairing_cb_type_t = ::std::os::raw::c_uint;
#[doc = " Callback used to supply the pairing PIN during a CU pairing session,"]
#[doc = "  and to report device information and pairing error messages."]
pub type lockdownd_cu_pairing_cb_t = ::std::option::Option<
    unsafe extern "C" fn(
        cb_type: lockdownd_cu_pairing_cb_type_t,
        user_data: *mut ::std::os::raw::c_void,
        data_ptr: *mut ::std::os::raw::c_void,
        data_size: *mut ::std::os::raw::c_uint,
    ),
>;
extern "C" {
    #[doc = " Creates a new lockdownd client for the device."]
    #[doc = ""]
    #[doc = " @note This function does not pair with the device or start a session. This"]
    #[doc = "  has to be done manually by the caller after the client is created."]
    #[doc = "  The device disconnects automatically if the lockdown connection idles"]
    #[doc = "  for more than 10 seconds. Make sure to call lockdownd_client_free() as soon"]
    #[doc = "  as the connection is no longer needed."]
    #[doc = ""]
    #[doc = " @param device The device to create a lockdownd client for"]
    #[doc = " @param client The pointer to the location of the new lockdownd_client"]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_client_new(
        device: idevice_t,
        client: *mut lockdownd_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Creates a new lockdownd client for the device and starts initial handshake."]
    #[doc = " The handshake consists out of query_type, validate_pair, pair and"]
    #[doc = " start_session calls. It uses the internal pairing record management."]
    #[doc = ""]
    #[doc = " @note The device disconnects automatically if the lockdown connection idles"]
    #[doc = "  for more than 10 seconds. Make sure to call lockdownd_client_free() as soon"]
    #[doc = "  as the connection is no longer needed."]
    #[doc = ""]
    #[doc = " @param device The device to create a lockdownd client for"]
    #[doc = " @param client The pointer to the location of the new lockdownd_client"]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_INVALID_CONF if configuration data is wrong"]
    pub fn lockdownd_client_new_with_handshake(
        device: idevice_t,
        client: *mut lockdownd_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Closes the lockdownd client session if one is running and frees up the"]
    #[doc = " lockdownd_client struct."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_client_free(client: lockdownd_client_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Query the type of the service daemon. Depending on whether the device is"]
    #[doc = " queried in normal mode or restore mode, different types will be returned."]
    #[doc = ""]
    #[doc = " @param client The lockdownd client"]
    #[doc = " @param type The type returned by the service daemon. Pass NULL to ignore."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_query_type(
        client: lockdownd_client_t,
        type_: *mut *mut ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Retrieves a preferences plist using an optional domain and/or key name."]
    #[doc = ""]
    #[doc = " @param client An initialized lockdownd client."]
    #[doc = " @param domain The domain to query on or NULL for global domain"]
    #[doc = " @param key The key name to request or NULL to query for all keys"]
    #[doc = " @param value A plist node representing the result value node"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_get_value(
        client: lockdownd_client_t,
        domain: *const ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        value: *mut plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Sets a preferences value using a plist and optional by domain and/or key name."]
    #[doc = ""]
    #[doc = " @param client an initialized lockdownd client."]
    #[doc = " @param domain the domain to query on or NULL for global domain"]
    #[doc = " @param key the key name to set the value or NULL to set a value dict plist"]
    #[doc = " @param value a plist node of any node type representing the value to set"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or"]
    #[doc = "  value is NULL"]
    pub fn lockdownd_set_value(
        client: lockdownd_client_t,
        domain: *const ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        value: plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Removes a preference node by domain and/or key name."]
    #[doc = ""]
    #[doc = " @note: Use with caution as this could remove vital information on the device"]
    #[doc = ""]
    #[doc = " @param client An initialized lockdownd client."]
    #[doc = " @param domain The domain to query on or NULL for global domain"]
    #[doc = " @param key The key name to remove or NULL remove all keys for the current domain"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_remove_value(
        client: lockdownd_client_t,
        domain: *const ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Requests to start a service and retrieve it's port on success."]
    #[doc = ""]
    #[doc = " @param client The lockdownd client"]
    #[doc = " @param identifier The identifier of the service to start"]
    #[doc = " @param service The service descriptor on success or NULL on failure"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if a parameter"]
    #[doc = "  is NULL, LOCKDOWN_E_INVALID_SERVICE if the requested service is not known"]
    #[doc = "  by the device, LOCKDOWN_E_START_SERVICE_FAILED if the service could not be"]
    #[doc = "  started by the device"]
    pub fn lockdownd_start_service(
        client: lockdownd_client_t,
        identifier: *const ::std::os::raw::c_char,
        service: *mut lockdownd_service_descriptor_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Requests to start a service and retrieve it's port on success."]
    #[doc = " Sends the escrow bag from the device's pair record."]
    #[doc = ""]
    #[doc = " @param client The lockdownd client"]
    #[doc = " @param identifier The identifier of the service to start"]
    #[doc = " @param service The service descriptor on success or NULL on failure"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if a parameter"]
    #[doc = "  is NULL, LOCKDOWN_E_INVALID_SERVICE if the requested service is not known"]
    #[doc = "  by the device, LOCKDOWN_E_START_SERVICE_FAILED if the service could not because"]
    #[doc = "  started by the device, LOCKDOWN_E_INVALID_CONF if the host id or escrow bag are"]
    #[doc = "  missing from the device record."]
    pub fn lockdownd_start_service_with_escrow_bag(
        client: lockdownd_client_t,
        identifier: *const ::std::os::raw::c_char,
        service: *mut lockdownd_service_descriptor_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Opens a session with lockdownd and switches to SSL mode if device wants it."]
    #[doc = ""]
    #[doc = " @param client The lockdownd client"]
    #[doc = " @param host_id The HostID of the computer"]
    #[doc = " @param session_id The new session_id of the created session"]
    #[doc = " @param ssl_enabled Whether SSL communication is used in the session"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when a client"]
    #[doc = "  or host_id is NULL, LOCKDOWN_E_PLIST_ERROR if the response plist had errors,"]
    #[doc = "  LOCKDOWN_E_INVALID_HOST_ID if the device does not know the supplied HostID,"]
    #[doc = "  LOCKDOWN_E_SSL_ERROR if enabling SSL communication failed"]
    pub fn lockdownd_start_session(
        client: lockdownd_client_t,
        host_id: *const ::std::os::raw::c_char,
        session_id: *mut *mut ::std::os::raw::c_char,
        ssl_enabled: *mut ::std::os::raw::c_int,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Closes the lockdownd session by sending the StopSession request."]
    #[doc = ""]
    #[doc = " @see lockdownd_start_session"]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param session_id The id of a running session"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_stop_session(
        client: lockdownd_client_t,
        session_id: *const ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Sends a plist to lockdownd."]
    #[doc = ""]
    #[doc = " @note This function is low-level and should only be used if you need to send"]
    #[doc = "        a new type of message."]
    #[doc = ""]
    #[doc = " @param client The lockdownd client"]
    #[doc = " @param plist The plist to send"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or"]
    #[doc = "  plist is NULL"]
    pub fn lockdownd_send(client: lockdownd_client_t, plist: plist_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Receives a plist from lockdownd."]
    #[doc = ""]
    #[doc = " @param client The lockdownd client"]
    #[doc = " @param plist The plist to store the received data"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or"]
    #[doc = "  plist is NULL"]
    pub fn lockdownd_receive(client: lockdownd_client_t, plist: *mut plist_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Pairs the device using the supplied pair record."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param pair_record The pair record to use for pairing. If NULL is passed, then"]
    #[doc = "    the pair records from the current machine are used. New records will be"]
    #[doc = "    generated automatically when pairing is done for the first time."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_PLIST_ERROR if the pair_record certificates are wrong,"]
    #[doc = "  LOCKDOWN_E_PAIRING_FAILED if the pairing failed,"]
    #[doc = "  LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected,"]
    #[doc = "  LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id"]
    pub fn lockdownd_pair(
        client: lockdownd_client_t,
        pair_record: lockdownd_pair_record_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Pairs the device using the supplied pair record and passing the given options."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param pair_record The pair record to use for pairing. If NULL is passed, then"]
    #[doc = "    the pair records from the current machine are used. New records will be"]
    #[doc = "    generated automatically when pairing is done for the first time."]
    #[doc = " @param options The pairing options to pass. Can be NULL for no options."]
    #[doc = " @param response If non-NULL a pointer to lockdownd's response dictionary is returned."]
    #[doc = "    The caller is responsible to free the response dictionary with plist_free()."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_PLIST_ERROR if the pair_record certificates are wrong,"]
    #[doc = "  LOCKDOWN_E_PAIRING_FAILED if the pairing failed,"]
    #[doc = "  LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected,"]
    #[doc = "  LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id"]
    pub fn lockdownd_pair_with_options(
        client: lockdownd_client_t,
        pair_record: lockdownd_pair_record_t,
        options: plist_t,
        response: *mut plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Validates if the device is paired with the given HostID. If successful the"]
    #[doc = " specified host will become trusted host of the device indicated by the"]
    #[doc = " lockdownd preference named TrustedHostAttached. Otherwise the host must be"]
    #[doc = " paired using lockdownd_pair() first."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param pair_record The pair record to validate pairing with. If NULL is"]
    #[doc = "    passed, then the pair record is read from the internal pairing record"]
    #[doc = "    management."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_PLIST_ERROR if the pair_record certificates are wrong,"]
    #[doc = "  LOCKDOWN_E_PAIRING_FAILED if the pairing failed,"]
    #[doc = "  LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected,"]
    #[doc = "  LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id"]
    pub fn lockdownd_validate_pair(
        client: lockdownd_client_t,
        pair_record: lockdownd_pair_record_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Unpairs the device with the given HostID and removes the pairing records"]
    #[doc = " from the device and host if the internal pairing record management is used."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param pair_record The pair record to use for unpair. If NULL is passed, then"]
    #[doc = "    the pair records from the current machine are used."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_PLIST_ERROR if the pair_record certificates are wrong,"]
    #[doc = "  LOCKDOWN_E_PAIRING_FAILED if the pairing failed,"]
    #[doc = "  LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected,"]
    #[doc = "  LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id"]
    pub fn lockdownd_unpair(
        client: lockdownd_client_t,
        pair_record: lockdownd_pair_record_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Activates the device. Only works within an open session."]
    #[doc = " The ActivationRecord plist dictionary must be obtained using the"]
    #[doc = " activation protocol requesting from Apple's https webservice."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param activation_record The activation record plist dictionary"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or"]
    #[doc = "  activation_record is NULL, LOCKDOWN_E_NO_RUNNING_SESSION if no session is"]
    #[doc = "  open, LOCKDOWN_E_PLIST_ERROR if the received plist is broken,"]
    #[doc = "  LOCKDOWN_E_ACTIVATION_FAILED if the activation failed,"]
    #[doc = "  LOCKDOWN_E_INVALID_ACTIVATION_RECORD if the device reports that the"]
    #[doc = "  activation_record is invalid"]
    pub fn lockdownd_activate(
        client: lockdownd_client_t,
        activation_record: plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Deactivates the device, returning it to the locked “Activate with iTunes”"]
    #[doc = " screen."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_NO_RUNNING_SESSION if no session is open,"]
    #[doc = "  LOCKDOWN_E_PLIST_ERROR if the received plist is broken"]
    pub fn lockdownd_deactivate(client: lockdownd_client_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Tells the device to immediately enter recovery mode."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL"]
    pub fn lockdownd_enter_recovery(client: lockdownd_client_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Sends the Goodbye request to lockdownd signaling the end of communication."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client"]
    #[doc = "  is NULL, LOCKDOWN_E_PLIST_ERROR if the device did not acknowledge the"]
    #[doc = "  request"]
    pub fn lockdownd_goodbye(client: lockdownd_client_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Creates a CU pairing session for the current lockdown client."]
    #[doc = " This is required to allow lockdownd_cu_send_request_and_get_reply(),"]
    #[doc = " lockdownd_get_value_cu() and lockdonwd_pair_cu() requests, and eventually"]
    #[doc = " allows to perform an actual wireless pairing."]
    #[doc = ""]
    #[doc = " Through the callback function, the PIN displayed on the device has to be"]
    #[doc = " supplied during the process. Currently, only AppleTV devices have this"]
    #[doc = " capability."]
    #[doc = ""]
    #[doc = " @param client  The lockdown client to perform the CU pairing for"]
    #[doc = " @param pairing_callback  Callback function that is used to supply the PIN"]
    #[doc = "   for the pairing process, but also to receive device information or"]
    #[doc = "   pairing error messages."]
    #[doc = " @param cb_user_data  User data that will be passed as additional argument"]
    #[doc = "   to the callback function."]
    #[doc = " @param host_info  (Optional) A dictionary containing host information to"]
    #[doc = "   send to the device when finalizing the CU pairing. The supplied"]
    #[doc = "   values will override the default values gathered for the current host."]
    #[doc = " @param acl  (Optional) A dictionary containing ACL information. Currently"]
    #[doc = "   only com.apple.ScreenCapture:true and com.apple.developer:true are known"]
    #[doc = "   valid ACL values, which are used as default when NULL is passed."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if one of the"]
    #[doc = "   parameters is invalid, LOCKDOWN_E_PAIRING_FAILED if the pairing failed,"]
    #[doc = "   or a LOCKDOWN_E_* error code otherwise."]
    pub fn lockdownd_cu_pairing_create(
        client: lockdownd_client_t,
        pairing_callback: lockdownd_cu_pairing_cb_t,
        cb_user_data: *mut ::std::os::raw::c_void,
        host_info: plist_t,
        acl: plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Sends a request via lockdown client with established CU pairing session"]
    #[doc = " and attempts to retrieve a reply. This function is used internally"]
    #[doc = " by lockdownd_get_value_cu() and lockdownd_pair_cu(), but exposed here to"]
    #[doc = " allow custom requests being sent and their replies being received."]
    #[doc = ""]
    #[doc = " @param client  A lockdown client with an established CU pairing."]
    #[doc = " @param request  The request to perform."]
    #[doc = " @param request_payload  The payload for the request."]
    #[doc = " @param reply  (Optional) If not NULL, the plist_t will be set to the reply"]
    #[doc = "   dictionary that has been received. Consumer is responsible to free it"]
    #[doc = "   using plist_free() when no longer required."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if one of the"]
    #[doc = "   parameters is invalid, LOCKDOWN_E_NO_RUNNING_SESSION if the current"]
    #[doc = "   lockdown client does not have an established CU pairing session,"]
    #[doc = "   or a LOCKDOWN_E_* error code otherwise."]
    pub fn lockdownd_cu_send_request_and_get_reply(
        client: lockdownd_client_t,
        request: *const ::std::os::raw::c_char,
        request_payload: plist_t,
        reply: *mut plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Retrieves a value using an optional domain and/or key name from a lockdown"]
    #[doc = " client with established CU pairing session."]
    #[doc = ""]
    #[doc = " This is used to retrieve values that are only accessible after a CU pairing"]
    #[doc = " has been established, and would otherwise only be accessible with a valid"]
    #[doc = " device pairing."]
    #[doc = ""]
    #[doc = " @param client  A lockdown client with an established CU pairing."]
    #[doc = " @param domain  The domain to query on or NULL for global domain"]
    #[doc = " @param key  The key name to request or NULL to query for all keys"]
    #[doc = " @param value  A plist node representing the result value node"]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if one of the"]
    #[doc = "   parameters is invalid, LOCKDOWN_E_NO_RUNNING_SESSION if the current"]
    #[doc = "   lockdown client does not have an established CU pairing session,"]
    #[doc = "   or a LOCKDOWN_E_* error code otherwise."]
    pub fn lockdownd_get_value_cu(
        client: lockdownd_client_t,
        domain: *const ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        value: *mut plist_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Perform a device pairing with a lockdown client that has an established"]
    #[doc = " CU pairing session."]
    #[doc = ""]
    #[doc = " @param client A lockdown client with an established CU pairing."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client"]
    #[doc = "   is NULL, LOCKDOWN_E_NO_RUNNING_SESSION if the current lockdown client"]
    #[doc = "   does not have an established CU pairing session, or a LOCKDOWN_E_* error"]
    #[doc = "   code otherwise."]
    pub fn lockdownd_pair_cu(client: lockdownd_client_t) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Sets the label to send for requests to lockdownd."]
    #[doc = ""]
    #[doc = " @param client The lockdown client"]
    #[doc = " @param label The label to set or NULL to disable sending a label"]
    #[doc = ""]
    pub fn lockdownd_client_set_label(
        client: lockdownd_client_t,
        label: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " Returns the unique id of the device from lockdownd."]
    #[doc = ""]
    #[doc = " @param client An initialized lockdownd client."]
    #[doc = " @param udid Holds the unique id of the device. The caller is responsible"]
    #[doc = "  for freeing the memory."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success"]
    pub fn lockdownd_get_device_udid(
        client: lockdownd_client_t,
        udid: *mut *mut ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Retrieves the name of the device from lockdownd set by the user."]
    #[doc = ""]
    #[doc = " @param client An initialized lockdownd client."]
    #[doc = " @param device_name Holds the name of the device. The caller is"]
    #[doc = "  responsible for freeing the memory."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success"]
    pub fn lockdownd_get_device_name(
        client: lockdownd_client_t,
        device_name: *mut *mut ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Calculates and returns the data classes the device supports from lockdownd."]
    #[doc = ""]
    #[doc = " @param client An initialized lockdownd client."]
    #[doc = " @param classes A pointer to store an array of class names. The caller is responsible"]
    #[doc = "  for freeing the memory which can be done using mobilesync_data_classes_free()."]
    #[doc = " @param count The number of items in the classes array."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success,"]
    #[doc = "  LOCKDOWN_E_INVALID_ARG when client is NULL,"]
    #[doc = "  LOCKDOWN_E_NO_RUNNING_SESSION if no session is open,"]
    #[doc = "  LOCKDOWN_E_PLIST_ERROR if the received plist is broken"]
    pub fn lockdownd_get_sync_data_classes(
        client: lockdownd_client_t,
        classes: *mut *mut *mut ::std::os::raw::c_char,
        count: *mut ::std::os::raw::c_int,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Frees memory of an allocated array of data classes as returned by lockdownd_get_sync_data_classes()"]
    #[doc = ""]
    #[doc = " @param classes An array of class names to free."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success"]
    pub fn lockdownd_data_classes_free(
        classes: *mut *mut ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Frees memory of a service descriptor as returned by lockdownd_start_service()"]
    #[doc = ""]
    #[doc = " @param service A service descriptor instance to free."]
    #[doc = ""]
    #[doc = " @return LOCKDOWN_E_SUCCESS on success"]
    pub fn lockdownd_service_descriptor_free(
        service: lockdownd_service_descriptor_t,
    ) -> lockdownd_error_t;
}
extern "C" {
    #[doc = " Gets a readable error string for a given lockdown error code."]
    #[doc = ""]
    #[doc = " @params err A lockdownd error code"]
    #[doc = ""]
    #[doc = " @returns A readable error string"]
    pub fn lockdownd_strerror(err: lockdownd_error_t) -> *const ::std::os::raw::c_char;
}
pub const afc_error_t_AFC_E_SUCCESS: afc_error_t = 0;
pub const afc_error_t_AFC_E_UNKNOWN_ERROR: afc_error_t = 1;
pub const afc_error_t_AFC_E_OP_HEADER_INVALID: afc_error_t = 2;
pub const afc_error_t_AFC_E_NO_RESOURCES: afc_error_t = 3;
pub const afc_error_t_AFC_E_READ_ERROR: afc_error_t = 4;
pub const afc_error_t_AFC_E_WRITE_ERROR: afc_error_t = 5;
pub const afc_error_t_AFC_E_UNKNOWN_PACKET_TYPE: afc_error_t = 6;
pub const afc_error_t_AFC_E_INVALID_ARG: afc_error_t = 7;
pub const afc_error_t_AFC_E_OBJECT_NOT_FOUND: afc_error_t = 8;
pub const afc_error_t_AFC_E_OBJECT_IS_DIR: afc_error_t = 9;
pub const afc_error_t_AFC_E_PERM_DENIED: afc_error_t = 10;
pub const afc_error_t_AFC_E_SERVICE_NOT_CONNECTED: afc_error_t = 11;
pub const afc_error_t_AFC_E_OP_TIMEOUT: afc_error_t = 12;
pub const afc_error_t_AFC_E_TOO_MUCH_DATA: afc_error_t = 13;
pub const afc_error_t_AFC_E_END_OF_DATA: afc_error_t = 14;
pub const afc_error_t_AFC_E_OP_NOT_SUPPORTED: afc_error_t = 15;
pub const afc_error_t_AFC_E_OBJECT_EXISTS: afc_error_t = 16;
pub const afc_error_t_AFC_E_OBJECT_BUSY: afc_error_t = 17;
pub const afc_error_t_AFC_E_NO_SPACE_LEFT: afc_error_t = 18;
pub const afc_error_t_AFC_E_OP_WOULD_BLOCK: afc_error_t = 19;
pub const afc_error_t_AFC_E_IO_ERROR: afc_error_t = 20;
pub const afc_error_t_AFC_E_OP_INTERRUPTED: afc_error_t = 21;
pub const afc_error_t_AFC_E_OP_IN_PROGRESS: afc_error_t = 22;
pub const afc_error_t_AFC_E_INTERNAL_ERROR: afc_error_t = 23;
pub const afc_error_t_AFC_E_MUX_ERROR: afc_error_t = 30;
pub const afc_error_t_AFC_E_NO_MEM: afc_error_t = 31;
pub const afc_error_t_AFC_E_NOT_ENOUGH_DATA: afc_error_t = 32;
pub const afc_error_t_AFC_E_DIR_NOT_EMPTY: afc_error_t = 33;
pub const afc_error_t_AFC_E_FORCE_SIGNED_TYPE: afc_error_t = -1;
#[doc = " Error Codes"]
pub type afc_error_t = ::std::os::raw::c_int;
#[doc = "< r   O_RDONLY"]
pub const afc_file_mode_t_AFC_FOPEN_RDONLY: afc_file_mode_t = 1;
#[doc = "< r+  O_RDWR   | O_CREAT"]
pub const afc_file_mode_t_AFC_FOPEN_RW: afc_file_mode_t = 2;
#[doc = "< w   O_WRONLY | O_CREAT  | O_TRUNC"]
pub const afc_file_mode_t_AFC_FOPEN_WRONLY: afc_file_mode_t = 3;
#[doc = "< w+  O_RDWR   | O_CREAT  | O_TRUNC"]
pub const afc_file_mode_t_AFC_FOPEN_WR: afc_file_mode_t = 4;
#[doc = "< a   O_WRONLY | O_APPEND | O_CREAT"]
pub const afc_file_mode_t_AFC_FOPEN_APPEND: afc_file_mode_t = 5;
#[doc = "< a+  O_RDWR   | O_APPEND | O_CREAT"]
pub const afc_file_mode_t_AFC_FOPEN_RDAPPEND: afc_file_mode_t = 6;
#[doc = " Flags for afc_file_open"]
pub type afc_file_mode_t = ::std::os::raw::c_uint;
pub const afc_link_type_t_AFC_HARDLINK: afc_link_type_t = 1;
pub const afc_link_type_t_AFC_SYMLINK: afc_link_type_t = 2;
#[doc = " Type of link for afc_make_link() calls"]
pub type afc_link_type_t = ::std::os::raw::c_uint;
#[doc = "< shared lock"]
pub const afc_lock_op_t_AFC_LOCK_SH: afc_lock_op_t = 5;
#[doc = "< exclusive lock"]
pub const afc_lock_op_t_AFC_LOCK_EX: afc_lock_op_t = 6;
#[doc = "< unlock"]
pub const afc_lock_op_t_AFC_LOCK_UN: afc_lock_op_t = 12;
#[doc = " Lock operation flags"]
pub type afc_lock_op_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct afc_client_private {
    _unused: [u8; 0],
}
pub type afc_client_t = *mut afc_client_private;
extern "C" {
    #[doc = " Makes a connection to the AFC service on the device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated afc_client_t"]
    #[doc = "        upon successful return."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success, AFC_E_INVALID_ARG if device or service is"]
    #[doc = "         invalid, AFC_E_MUX_ERROR if the connection cannot be established,"]
    #[doc = "         or AFC_E_NO_MEM if there is a memory allocation problem."]
    pub fn afc_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut afc_client_t,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Starts a new AFC service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated afc_client_t upon"]
    #[doc = "        successful return. Must be freed using afc_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "        Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success, or an AFC_E_* error code otherwise."]
    pub fn afc_client_start_service(
        device: idevice_t,
        client: *mut afc_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Frees up an AFC client. If the connection was created by the client itself,"]
    #[doc = " the connection will be closed."]
    #[doc = ""]
    #[doc = " @param client The client to free."]
    pub fn afc_client_free(client: afc_client_t) -> afc_error_t;
}
extern "C" {
    #[doc = " Get device information for a connected client. The device information"]
    #[doc = " returned is the device model as well as the free space, the total capacity"]
    #[doc = " and blocksize on the accessed disk partition."]
    #[doc = ""]
    #[doc = " @param client The client to get device info for."]
    #[doc = " @param device_information A char list of device information terminated by an"]
    #[doc = "        empty string or NULL if there was an error. Free with"]
    #[doc = "        afc_dictionary_free()."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_get_device_info(
        client: afc_client_t,
        device_information: *mut *mut *mut ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Gets a directory listing of the directory requested."]
    #[doc = ""]
    #[doc = " @param client The client to get a directory listing from."]
    #[doc = " @param path The directory for listing. (must be a fully-qualified path)"]
    #[doc = " @param directory_information A char list of files in the directory"]
    #[doc = "        terminated by an empty string or NULL if there was an error. Free with"]
    #[doc = "        afc_dictionary_free()."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_read_directory(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
        directory_information: *mut *mut *mut ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Gets information about a specific file."]
    #[doc = ""]
    #[doc = " @param client The client to use to get the information of the file."]
    #[doc = " @param path The fully-qualified path to the file."]
    #[doc = " @param file_information Pointer to a buffer that will be filled with a"]
    #[doc = "        NULL-terminated list of strings with the file information. Set to NULL"]
    #[doc = "        before calling this function. Free with afc_dictionary_free()."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_get_file_info(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
        file_information: *mut *mut *mut ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Opens a file on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use to open the file."]
    #[doc = " @param filename The file to open. (must be a fully-qualified path)"]
    #[doc = " @param file_mode The mode to use to open the file."]
    #[doc = " @param handle Pointer to a uint64_t that will hold the handle of the file"]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_file_open(
        client: afc_client_t,
        filename: *const ::std::os::raw::c_char,
        file_mode: afc_file_mode_t,
        handle: *mut u64,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Closes a file on the device."]
    #[doc = ""]
    #[doc = " @param client The client to close the file with."]
    #[doc = " @param handle File handle of a previously opened file."]
    pub fn afc_file_close(client: afc_client_t, handle: u64) -> afc_error_t;
}
extern "C" {
    #[doc = " Locks or unlocks a file on the device."]
    #[doc = ""]
    #[doc = " Makes use of flock on the device."]
    #[doc = " @see http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/flock.2.html"]
    #[doc = ""]
    #[doc = " @param client The client to lock the file with."]
    #[doc = " @param handle File handle of a previously opened file."]
    #[doc = " @param operation the lock or unlock operation to perform, this is one of"]
    #[doc = "        AFC_LOCK_SH (shared lock), AFC_LOCK_EX (exclusive lock), or"]
    #[doc = "        AFC_LOCK_UN (unlock)."]
    pub fn afc_file_lock(
        client: afc_client_t,
        handle: u64,
        operation: afc_lock_op_t,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Attempts to the read the given number of bytes from the given file."]
    #[doc = ""]
    #[doc = " @param client The relevant AFC client"]
    #[doc = " @param handle File handle of a previously opened file"]
    #[doc = " @param data The pointer to the memory region to store the read data"]
    #[doc = " @param length The number of bytes to read"]
    #[doc = " @param bytes_read The number of bytes actually read."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_file_read(
        client: afc_client_t,
        handle: u64,
        data: *mut ::std::os::raw::c_char,
        length: u32,
        bytes_read: *mut u32,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Writes a given number of bytes to a file."]
    #[doc = ""]
    #[doc = " @param client The client to use to write to the file."]
    #[doc = " @param handle File handle of previously opened file."]
    #[doc = " @param data The data to write to the file."]
    #[doc = " @param length How much data to write."]
    #[doc = " @param bytes_written The number of bytes actually written to the file."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_file_write(
        client: afc_client_t,
        handle: u64,
        data: *const ::std::os::raw::c_char,
        length: u32,
        bytes_written: *mut u32,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Seeks to a given position of a pre-opened file on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use to seek to the position."]
    #[doc = " @param handle File handle of a previously opened."]
    #[doc = " @param offset Seek offset."]
    #[doc = " @param whence Seeking direction, one of SEEK_SET, SEEK_CUR, or SEEK_END."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_file_seek(
        client: afc_client_t,
        handle: u64,
        offset: i64,
        whence: ::std::os::raw::c_int,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Returns current position in a pre-opened file on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use."]
    #[doc = " @param handle File handle of a previously opened file."]
    #[doc = " @param position Position in bytes of indicator"]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_file_tell(client: afc_client_t, handle: u64, position: *mut u64) -> afc_error_t;
}
extern "C" {
    #[doc = " Sets the size of a file on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use to set the file size."]
    #[doc = " @param handle File handle of a previously opened file."]
    #[doc = " @param newsize The size to set the file to."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    #[doc = ""]
    #[doc = " @note This function is more akin to ftruncate than truncate, and truncate"]
    #[doc = "       calls would have to open the file before calling this, sadly."]
    pub fn afc_file_truncate(client: afc_client_t, handle: u64, newsize: u64) -> afc_error_t;
}
extern "C" {
    #[doc = " Deletes a file or directory."]
    #[doc = ""]
    #[doc = " @param client The client to use."]
    #[doc = " @param path The path to delete. (must be a fully-qualified path)"]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_remove_path(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Renames a file or directory on the device."]
    #[doc = ""]
    #[doc = " @param client The client to have rename."]
    #[doc = " @param from The name to rename from. (must be a fully-qualified path)"]
    #[doc = " @param to The new name. (must also be a fully-qualified path)"]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_rename_path(
        client: afc_client_t,
        from: *const ::std::os::raw::c_char,
        to: *const ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Creates a directory on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use to make a directory."]
    #[doc = " @param path The directory's path. (must be a fully-qualified path, I assume"]
    #[doc = "        all other mkdir restrictions apply as well)"]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_make_directory(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Sets the size of a file on the device without prior opening it."]
    #[doc = ""]
    #[doc = " @param client The client to use to set the file size."]
    #[doc = " @param path The path of the file to be truncated."]
    #[doc = " @param newsize The size to set the file to."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_truncate(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
        newsize: u64,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Creates a hard link or symbolic link on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use for making a link"]
    #[doc = " @param linktype 1 = hard link, 2 = symlink"]
    #[doc = " @param target The file to be linked."]
    #[doc = " @param linkname The name of link."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_make_link(
        client: afc_client_t,
        linktype: afc_link_type_t,
        target: *const ::std::os::raw::c_char,
        linkname: *const ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Sets the modification time of a file on the device."]
    #[doc = ""]
    #[doc = " @param client The client to use to set the file size."]
    #[doc = " @param path Path of the file for which the modification time should be set."]
    #[doc = " @param mtime The modification time to set in nanoseconds since epoch."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_set_file_time(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
        mtime: u64,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Deletes a file or directory including possible contents."]
    #[doc = ""]
    #[doc = " @param client The client to use."]
    #[doc = " @param path The path to delete. (must be a fully-qualified path)"]
    #[doc = " @since libimobiledevice 1.1.7"]
    #[doc = " @note Only available in iOS 6 and later."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_remove_path_and_contents(
        client: afc_client_t,
        path: *const ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Get a specific key of the device info list for a client connection."]
    #[doc = " Known key values are: Model, FSTotalBytes, FSFreeBytes and FSBlockSize."]
    #[doc = " This is a helper function for afc_get_device_info()."]
    #[doc = ""]
    #[doc = " @param client The client to get device info for."]
    #[doc = " @param key The key to get the value of."]
    #[doc = " @param value The value for the key if successful or NULL otherwise."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_get_device_info_key(
        client: afc_client_t,
        key: *const ::std::os::raw::c_char,
        value: *mut *mut ::std::os::raw::c_char,
    ) -> afc_error_t;
}
extern "C" {
    #[doc = " Frees up a char dictionary as returned by some AFC functions."]
    #[doc = ""]
    #[doc = " @param dictionary The char array terminated by an empty string."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS on success or an AFC_E_* error value."]
    pub fn afc_dictionary_free(dictionary: *mut *mut ::std::os::raw::c_char) -> afc_error_t;
}
pub const companion_proxy_error_t_COMPANION_PROXY_E_SUCCESS: companion_proxy_error_t = 0;
pub const companion_proxy_error_t_COMPANION_PROXY_E_INVALID_ARG: companion_proxy_error_t = -1;
pub const companion_proxy_error_t_COMPANION_PROXY_E_PLIST_ERROR: companion_proxy_error_t = -2;
pub const companion_proxy_error_t_COMPANION_PROXY_E_MUX_ERROR: companion_proxy_error_t = -3;
pub const companion_proxy_error_t_COMPANION_PROXY_E_SSL_ERROR: companion_proxy_error_t = -4;
pub const companion_proxy_error_t_COMPANION_PROXY_E_NOT_ENOUGH_DATA: companion_proxy_error_t = -5;
pub const companion_proxy_error_t_COMPANION_PROXY_E_TIMEOUT: companion_proxy_error_t = -6;
pub const companion_proxy_error_t_COMPANION_PROXY_E_OP_IN_PROGRESS: companion_proxy_error_t = -7;
pub const companion_proxy_error_t_COMPANION_PROXY_E_NO_DEVICES: companion_proxy_error_t = -100;
pub const companion_proxy_error_t_COMPANION_PROXY_E_UNSUPPORTED_KEY: companion_proxy_error_t = -101;
pub const companion_proxy_error_t_COMPANION_PROXY_E_TIMEOUT_REPLY: companion_proxy_error_t = -102;
pub const companion_proxy_error_t_COMPANION_PROXY_E_UNKNOWN_ERROR: companion_proxy_error_t = -256;
#[doc = " Error Codes"]
pub type companion_proxy_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct companion_proxy_client_private {
    _unused: [u8; 0],
}
pub type companion_proxy_client_t = *mut companion_proxy_client_private;
pub type companion_proxy_device_event_cb_t = ::std::option::Option<
    unsafe extern "C" fn(event: plist_t, userdata: *mut ::std::os::raw::c_void),
>;
extern "C" {
    #[doc = " Connects to the companion_proxy service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     companion_proxy_client_t upon successful return. Must be freed using"]
    #[doc = "     companion_proxy_client_free() after use."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when"]
    #[doc = "     the arguments are invalid, or an COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut companion_proxy_client_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Starts a new companion_proxy service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     companion_proxy_client_t upon successful return. Must be freed using"]
    #[doc = "     companion_proxy_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success, or an COMPANION_PROXY_E_* error"]
    #[doc = "     code otherwise."]
    pub fn companion_proxy_client_start_service(
        device: idevice_t,
        client: *mut companion_proxy_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Disconnects a companion_proxy client from the device and frees up the"]
    #[doc = " companion_proxy client data."]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_client_free(client: companion_proxy_client_t)
        -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Sends a plist to the service."]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param plist The plist to send"]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL"]
    pub fn companion_proxy_send(
        client: companion_proxy_client_t,
        plist: plist_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Receives a plist from the service."]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param plist The plist to store the received data"]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL"]
    pub fn companion_proxy_receive(
        client: companion_proxy_client_t,
        plist: *mut plist_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Retrieves a list of paired devices."]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param devices Point that will receive a PLIST_ARRAY with paired device UDIDs"]
    #[doc = ""]
    #[doc = " @note The device closes the connection after sending the reply."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  COMPANION_PROXY_E_NO_DEVICES if no devices are paired,"]
    #[doc = "  or a COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_get_device_registry(
        client: companion_proxy_client_t,
        paired_devices: *mut plist_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Starts listening for paired devices."]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param callback Callback function that will be called when a new device is detected"]
    #[doc = " @param userdata Pointer that that will be passed to the callback function"]
    #[doc = ""]
    #[doc = " @note The event parameter that gets passed to the callback function is"]
    #[doc = "  freed internally after returning from the callback. The consumer needs"]
    #[doc = "  to make a copy if required."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  or a COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_start_listening_for_devices(
        client: companion_proxy_client_t,
        callback: companion_proxy_device_event_cb_t,
        userdata: *mut ::std::os::raw::c_void,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Stops listening for paired devices"]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  or a COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_stop_listening_for_devices(
        client: companion_proxy_client_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Returns a value for the given key."]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param companion_udid UDID of the (paired) companion device"]
    #[doc = " @param key The key to retrieve the value for"]
    #[doc = ""]
    #[doc = " @note The device closes the connection after sending the reply."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  COMPANION_PROXY_E_INVALID_ARG when client or paired_devices is invalid,"]
    #[doc = "  COMPANION_PROXY_E_UNSUPPORTED_KEY if the companion device doesn't support the given key,"]
    #[doc = "  or a COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_get_value_from_registry(
        client: companion_proxy_client_t,
        companion_udid: *const ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        value: *mut plist_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Start forwarding a service port on the companion device to a port on the idevice."]
    #[doc = ""]
    #[doc = " @see companion_proxy_stop_forwarding_service_port"]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param remote_port remote port"]
    #[doc = " @param service_name The name of the service that shall be forwarded"]
    #[doc = " @param forward_port Pointer that will receive the newly-assigned port accessible via USB/Network on the idevice"]
    #[doc = " @param options PLIST_DICT with additional options. Currently known are"]
    #[doc = "    IsServiceLowPriority (boolean) and PreferWifi (boolean)."]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  or a COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_start_forwarding_service_port(
        client: companion_proxy_client_t,
        remote_port: u16,
        service_name: *const ::std::os::raw::c_char,
        forward_port: *mut u16,
        options: plist_t,
    ) -> companion_proxy_error_t;
}
extern "C" {
    #[doc = " Stop forwarding a service port between companion device and idevice."]
    #[doc = ""]
    #[doc = " @see companion_proxy_start_forwarding_service_port"]
    #[doc = ""]
    #[doc = " @param client The companion_proxy client"]
    #[doc = " @param remote_port remote port"]
    #[doc = ""]
    #[doc = " @return COMPANION_PROXY_E_SUCCESS on success,"]
    #[doc = "  or a COMPANION_PROXY_E_* error code otherwise."]
    pub fn companion_proxy_stop_forwarding_service_port(
        client: companion_proxy_client_t,
        remote_port: u16,
    ) -> companion_proxy_error_t;
}
pub const debugserver_error_t_DEBUGSERVER_E_SUCCESS: debugserver_error_t = 0;
pub const debugserver_error_t_DEBUGSERVER_E_INVALID_ARG: debugserver_error_t = -1;
pub const debugserver_error_t_DEBUGSERVER_E_MUX_ERROR: debugserver_error_t = -2;
pub const debugserver_error_t_DEBUGSERVER_E_SSL_ERROR: debugserver_error_t = -3;
pub const debugserver_error_t_DEBUGSERVER_E_RESPONSE_ERROR: debugserver_error_t = -4;
pub const debugserver_error_t_DEBUGSERVER_E_TIMEOUT: debugserver_error_t = -5;
pub const debugserver_error_t_DEBUGSERVER_E_UNKNOWN_ERROR: debugserver_error_t = -256;
#[doc = " Error Codes"]
pub type debugserver_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct debugserver_client_private {
    _unused: [u8; 0],
}
pub type debugserver_client_t = *mut debugserver_client_private;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct debugserver_command_private {
    _unused: [u8; 0],
}
pub type debugserver_command_t = *mut debugserver_command_private;
extern "C" {
    #[doc = " Connects to the debugserver service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     debugserver_client_t upon successful return. Must be freed using"]
    #[doc = "     debugserver_client_free() after use."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an DEBUGSERVER_E_* error code otherwise."]
    pub fn debugserver_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut debugserver_client_t,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Starts a new debugserver service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     debugserver_client_t upon successful return. Must be freed using"]
    #[doc = "     debugserver_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error"]
    #[doc = "     code otherwise."]
    pub fn debugserver_client_start_service(
        device: idevice_t,
        client: *mut debugserver_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Disconnects a debugserver client from the device and frees up the"]
    #[doc = " debugserver client data."]
    #[doc = ""]
    #[doc = " @param client The debugserver client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an DEBUGSERVER_E_* error code otherwise."]
    pub fn debugserver_client_free(client: debugserver_client_t) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Sends raw data using the given debugserver service client."]
    #[doc = ""]
    #[doc = " @param client The debugserver client to use for sending"]
    #[doc = " @param data Data to send"]
    #[doc = " @param size Size of the data to send"]
    #[doc = " @param sent Number of bytes sent (can be NULL to ignore)"]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "      DEBUGSERVER_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid, or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs."]
    pub fn debugserver_client_send(
        client: debugserver_client_t,
        data: *const ::std::os::raw::c_char,
        size: u32,
        sent: *mut u32,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Receives raw data using the given debugserver client with specified timeout."]
    #[doc = ""]
    #[doc = " @param client The debugserver client to use for receiving"]
    #[doc = " @param data Buffer that will be filled with the data received"]
    #[doc = " @param size Number of bytes to receive"]
    #[doc = " @param received Number of bytes received (can be NULL to ignore)"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "      DEBUGSERVER_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid, DEBUGSERVER_E_MUX_ERROR when a communication error"]
    #[doc = "      occurs, or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs."]
    pub fn debugserver_client_receive_with_timeout(
        client: debugserver_client_t,
        data: *mut ::std::os::raw::c_char,
        size: u32,
        received: *mut u32,
        timeout: ::std::os::raw::c_uint,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Receives raw data from the debugserver service."]
    #[doc = ""]
    #[doc = " @param client The debugserver client"]
    #[doc = " @param data Buffer that will be filled with the data received"]
    #[doc = " @param size Number of bytes to receive"]
    #[doc = " @param received Number of bytes received (can be NULL to ignore)"]
    #[doc = " @note The default read timeout is 10 seconds."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when client or plist is NULL"]
    pub fn debugserver_client_receive(
        client: debugserver_client_t,
        data: *mut ::std::os::raw::c_char,
        size: u32,
        received: *mut u32,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Sends a command to the debugserver service."]
    #[doc = ""]
    #[doc = " @param client The debugserver client"]
    #[doc = " @param command Command to process and send"]
    #[doc = " @param response Response received for the command (can be NULL to ignore)"]
    #[doc = " @param response_size Pointer to receive response size. Set to NULL to ignore."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when client or command is NULL"]
    pub fn debugserver_client_send_command(
        client: debugserver_client_t,
        command: debugserver_command_t,
        response: *mut *mut ::std::os::raw::c_char,
        response_size: *mut size_t,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Receives and parses response of debugserver service."]
    #[doc = ""]
    #[doc = " @param client The debugserver client"]
    #[doc = " @param response Response received for last command (can be NULL to ignore)"]
    #[doc = " @param response_size Pointer to receive response size. Set to NULL to ignore."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when client is NULL"]
    pub fn debugserver_client_receive_response(
        client: debugserver_client_t,
        response: *mut *mut ::std::os::raw::c_char,
        response_size: *mut size_t,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Controls status of ACK mode when sending commands or receiving responses."]
    #[doc = ""]
    #[doc = " @see debugserver_client_send_command, debugserver_client_receive_response"]
    #[doc = ""]
    #[doc = " @param client The debugserver client"]
    #[doc = " @param enabled A boolean flag indicating whether the internal ACK mode"]
    #[doc = "   handling should be enabled or disabled."]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error"]
    #[doc = "     code otherwise."]
    pub fn debugserver_client_set_ack_mode(
        client: debugserver_client_t,
        enabled: ::std::os::raw::c_int,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Sets the argv which launches an app."]
    #[doc = ""]
    #[doc = " @param client The debugserver client"]
    #[doc = " @param argc Number of arguments"]
    #[doc = " @param argv Array starting with the executable to be run followed by it's arguments"]
    #[doc = " @param response Response received for the command (can be NULL to ignore)"]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when client is NULL"]
    pub fn debugserver_client_set_argv(
        client: debugserver_client_t,
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
        response: *mut *mut ::std::os::raw::c_char,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Adds or sets an environment variable."]
    #[doc = ""]
    #[doc = " @param client The debugserver client"]
    #[doc = " @param env The environment variable in \"KEY=VALUE\" notation"]
    #[doc = " @param response Response received for the command (can be NULL to ignore)"]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when client is NULL"]
    pub fn debugserver_client_set_environment_hex_encoded(
        client: debugserver_client_t,
        env: *const ::std::os::raw::c_char,
        response: *mut *mut ::std::os::raw::c_char,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Creates and initializes a new command object."]
    #[doc = ""]
    #[doc = " @param name The name of the command which is sent in plain text"]
    #[doc = " @param argv Array of tokens for the command ment to be encoded"]
    #[doc = " @param argc Number of items in the token array"]
    #[doc = " @param command New command object"]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when name or command is NULL"]
    pub fn debugserver_command_new(
        name: *const ::std::os::raw::c_char,
        argc: ::std::os::raw::c_int,
        argv: *mut *mut ::std::os::raw::c_char,
        command: *mut debugserver_command_t,
    ) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Frees memory of command object."]
    #[doc = ""]
    #[doc = " @param command The command object"]
    #[doc = ""]
    #[doc = " @return DEBUGSERVER_E_SUCCESS on success,"]
    #[doc = "  DEBUGSERVER_E_INVALID_ARG when command is NULL"]
    pub fn debugserver_command_free(command: debugserver_command_t) -> debugserver_error_t;
}
extern "C" {
    #[doc = " Encodes a string into hex notation."]
    #[doc = ""]
    #[doc = " @param buffer String to encode into hex notiation"]
    #[doc = " @param encoded_buffer The buffer receives a hex encoded string"]
    #[doc = " @param encoded_length Length of the hex encoded string"]
    pub fn debugserver_encode_string(
        buffer: *const ::std::os::raw::c_char,
        encoded_buffer: *mut *mut ::std::os::raw::c_char,
        encoded_length: *mut u32,
    );
}
extern "C" {
    #[doc = " Decodes a hex encoded string."]
    #[doc = ""]
    #[doc = " @param encoded_buffer The buffer with a hex encoded string"]
    #[doc = " @param encoded_length Length of the encoded buffer"]
    #[doc = " @param buffer Decoded string to be freed by the caller"]
    pub fn debugserver_decode_string(
        encoded_buffer: *const ::std::os::raw::c_char,
        encoded_length: size_t,
        buffer: *mut *mut ::std::os::raw::c_char,
    );
}
pub const diagnostics_relay_error_t_DIAGNOSTICS_RELAY_E_SUCCESS: diagnostics_relay_error_t = 0;
pub const diagnostics_relay_error_t_DIAGNOSTICS_RELAY_E_INVALID_ARG: diagnostics_relay_error_t = -1;
pub const diagnostics_relay_error_t_DIAGNOSTICS_RELAY_E_PLIST_ERROR: diagnostics_relay_error_t = -2;
pub const diagnostics_relay_error_t_DIAGNOSTICS_RELAY_E_MUX_ERROR: diagnostics_relay_error_t = -3;
pub const diagnostics_relay_error_t_DIAGNOSTICS_RELAY_E_UNKNOWN_REQUEST: diagnostics_relay_error_t =
    -4;
pub const diagnostics_relay_error_t_DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR: diagnostics_relay_error_t =
    -256;
#[doc = " Error Codes"]
pub type diagnostics_relay_error_t = ::std::os::raw::c_int;
pub const diagnostics_relay_action_t_DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT:
    diagnostics_relay_action_t = 2;
pub const diagnostics_relay_action_t_DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS:
    diagnostics_relay_action_t = 4;
pub const diagnostics_relay_action_t_DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL:
    diagnostics_relay_action_t = 8;
pub type diagnostics_relay_action_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct diagnostics_relay_client_private {
    _unused: [u8; 0],
}
pub type diagnostics_relay_client_t = *mut diagnostics_relay_client_private;
extern "C" {
    #[doc = " Connects to the diagnostics_relay service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Reference that will point to a newly allocated"]
    #[doc = "     diagnostics_relay_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "     DIAGNOSTICS_RELAY_E_INVALID_ARG when one of the parameters is invalid,"]
    #[doc = "     or DIAGNOSTICS_RELAY_E_MUX_ERROR when the connection failed."]
    pub fn diagnostics_relay_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut diagnostics_relay_client_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Starts a new diagnostics_relay service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     diagnostics_relay_client_t upon successful return. Must be freed using"]
    #[doc = "     diagnostics_relay_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success, or an DIAGNOSTICS_RELAY_E_* error"]
    #[doc = "     code otherwise."]
    pub fn diagnostics_relay_client_start_service(
        device: idevice_t,
        client: *mut diagnostics_relay_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Disconnects a diagnostics_relay client from the device and frees up the"]
    #[doc = " diagnostics_relay client data."]
    #[doc = ""]
    #[doc = " @param client The diagnostics_relay client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "     DIAGNOSTICS_RELAY_E_INVALID_ARG when one of client or client->parent"]
    #[doc = "     is invalid, or DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR when the was an"]
    #[doc = "     error freeing the parent property_list_service client."]
    pub fn diagnostics_relay_client_free(
        client: diagnostics_relay_client_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Sends the Goodbye request signaling the end of communication."]
    #[doc = ""]
    #[doc = " @param client The diagnostics_relay client"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the"]
    #[doc = "  request"]
    pub fn diagnostics_relay_goodbye(
        client: diagnostics_relay_client_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Puts the device into deep sleep mode and disconnects from host."]
    #[doc = ""]
    #[doc = " @param client The diagnostics_relay client"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the"]
    #[doc = "  request"]
    pub fn diagnostics_relay_sleep(client: diagnostics_relay_client_t)
        -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Restart the device and optionally show a user notification."]
    #[doc = ""]
    #[doc = " @param client The diagnostics_relay client"]
    #[doc = " @param flags A binary flag combination of"]
    #[doc = "        DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until"]
    #[doc = "        diagnostics_relay_client_free() disconnects before execution and"]
    #[doc = "        DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a \"FAIL\" dialog"]
    #[doc = "        or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an \"OK\" dialog"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the"]
    #[doc = "  request"]
    pub fn diagnostics_relay_restart(
        client: diagnostics_relay_client_t,
        flags: diagnostics_relay_action_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Shutdown of the device and optionally show a user notification."]
    #[doc = ""]
    #[doc = " @param client The diagnostics_relay client"]
    #[doc = " @param flags A binary flag combination of"]
    #[doc = "        DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until"]
    #[doc = "        diagnostics_relay_client_free() disconnects before execution and"]
    #[doc = "        DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a \"FAIL\" dialog"]
    #[doc = "        or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an \"OK\" dialog"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the"]
    #[doc = "  request"]
    pub fn diagnostics_relay_shutdown(
        client: diagnostics_relay_client_t,
        flags: diagnostics_relay_action_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    #[doc = " Shutdown of the device and optionally show a user notification."]
    #[doc = ""]
    #[doc = " @param client The diagnostics_relay client"]
    #[doc = " @param flags A binary flag combination of"]
    #[doc = "        DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until"]
    #[doc = "        diagnostics_relay_client_free() disconnects before execution and"]
    #[doc = "        DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a \"FAIL\" dialog"]
    #[doc = "        or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an \"OK\" dialog"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the"]
    #[doc = "  request"]
    pub fn diagnostics_relay_request_diagnostics(
        client: diagnostics_relay_client_t,
        type_: *const ::std::os::raw::c_char,
        diagnostics: *mut plist_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    pub fn diagnostics_relay_query_mobilegestalt(
        client: diagnostics_relay_client_t,
        keys: plist_t,
        result: *mut plist_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    pub fn diagnostics_relay_query_ioregistry_entry(
        client: diagnostics_relay_client_t,
        entry_name: *const ::std::os::raw::c_char,
        entry_class: *const ::std::os::raw::c_char,
        result: *mut plist_t,
    ) -> diagnostics_relay_error_t;
}
extern "C" {
    pub fn diagnostics_relay_query_ioregistry_plane(
        client: diagnostics_relay_client_t,
        plane: *const ::std::os::raw::c_char,
        result: *mut plist_t,
    ) -> diagnostics_relay_error_t;
}
pub const file_relay_error_t_FILE_RELAY_E_SUCCESS: file_relay_error_t = 0;
pub const file_relay_error_t_FILE_RELAY_E_INVALID_ARG: file_relay_error_t = -1;
pub const file_relay_error_t_FILE_RELAY_E_PLIST_ERROR: file_relay_error_t = -2;
pub const file_relay_error_t_FILE_RELAY_E_MUX_ERROR: file_relay_error_t = -3;
pub const file_relay_error_t_FILE_RELAY_E_INVALID_SOURCE: file_relay_error_t = -4;
pub const file_relay_error_t_FILE_RELAY_E_STAGING_EMPTY: file_relay_error_t = -5;
pub const file_relay_error_t_FILE_RELAY_E_PERMISSION_DENIED: file_relay_error_t = -6;
pub const file_relay_error_t_FILE_RELAY_E_UNKNOWN_ERROR: file_relay_error_t = -256;
#[doc = " Error Codes"]
pub type file_relay_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct file_relay_client_private {
    _unused: [u8; 0],
}
pub type file_relay_client_t = *mut file_relay_client_private;
extern "C" {
    #[doc = " Connects to the file_relay service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Reference that will point to a newly allocated"]
    #[doc = "     file_relay_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return FILE_RELAY_E_SUCCESS on success,"]
    #[doc = "     FILE_RELAY_E_INVALID_ARG when one of the parameters is invalid,"]
    #[doc = "     or FILE_RELAY_E_MUX_ERROR when the connection failed."]
    pub fn file_relay_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut file_relay_client_t,
    ) -> file_relay_error_t;
}
extern "C" {
    #[doc = " Starts a new file_relay service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     file_relay_client_t upon successful return. Must be freed using"]
    #[doc = "     file_relay_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return FILE_RELAY_E_SUCCESS on success, or an FILE_RELAY_E_* error"]
    #[doc = "     code otherwise."]
    pub fn file_relay_client_start_service(
        device: idevice_t,
        client: *mut file_relay_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> file_relay_error_t;
}
extern "C" {
    #[doc = " Disconnects a file_relay client from the device and frees up the file_relay"]
    #[doc = " client data."]
    #[doc = ""]
    #[doc = " @param client The file_relay client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return FILE_RELAY_E_SUCCESS on success,"]
    #[doc = "     FILE_RELAY_E_INVALID_ARG when one of client or client->parent"]
    #[doc = "     is invalid, or FILE_RELAY_E_UNKNOWN_ERROR when the was an error"]
    #[doc = "     freeing the parent property_list_service client."]
    pub fn file_relay_client_free(client: file_relay_client_t) -> file_relay_error_t;
}
extern "C" {
    #[doc = " Request data for the given sources."]
    #[doc = ""]
    #[doc = " @param client The connected file_relay client."]
    #[doc = " @param sources A NULL-terminated list of sources to retrieve."]
    #[doc = "     Valid sources are:"]
    #[doc = "     - AppleSupport"]
    #[doc = "     - Network"]
    #[doc = "     - VPN"]
    #[doc = "     - WiFi"]
    #[doc = "     - UserDatabases"]
    #[doc = "     - CrashReporter"]
    #[doc = "     - tmp"]
    #[doc = "     - SystemConfiguration"]
    #[doc = " @param connection The connection that has to be used for receiving the"]
    #[doc = "     data using idevice_connection_receive(). The connection will be closed"]
    #[doc = "     automatically by the device, but use file_relay_client_free() to clean"]
    #[doc = "     up properly."]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @note WARNING: Don't call this function without reading the data afterwards."]
    #[doc = "     A directory mobile_file_relay.XXXX used for creating the archive will"]
    #[doc = "     remain in the /tmp directory otherwise."]
    #[doc = ""]
    #[doc = " @return FILE_RELAY_E_SUCCESS on succes, FILE_RELAY_E_INVALID_ARG when one or"]
    #[doc = "     more parameters are invalid, FILE_RELAY_E_MUX_ERROR if a communication"]
    #[doc = "     error occurs, FILE_RELAY_E_PLIST_ERROR when the received result is NULL"]
    #[doc = "     or is not a valid plist, FILE_RELAY_E_INVALID_SOURCE if one or more"]
    #[doc = "     sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available"]
    #[doc = "     for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise."]
    pub fn file_relay_request_sources(
        client: file_relay_client_t,
        sources: *mut *const ::std::os::raw::c_char,
        connection: *mut idevice_connection_t,
    ) -> file_relay_error_t;
}
extern "C" {
    #[doc = " Request data for the given sources. Calls file_relay_request_sources_timeout() with"]
    #[doc = " a timeout of 60000 milliseconds (60 seconds)."]
    #[doc = ""]
    #[doc = " @param client The connected file_relay client."]
    #[doc = " @param sources A NULL-terminated list of sources to retrieve."]
    #[doc = "     Valid sources are:"]
    #[doc = "     - AppleSupport"]
    #[doc = "     - Network"]
    #[doc = "     - VPN"]
    #[doc = "     - WiFi"]
    #[doc = "     - UserDatabases"]
    #[doc = "     - CrashReporter"]
    #[doc = "     - tmp"]
    #[doc = "     - SystemConfiguration"]
    #[doc = " @param connection The connection that has to be used for receiving the"]
    #[doc = "     data using idevice_connection_receive(). The connection will be closed"]
    #[doc = "     automatically by the device, but use file_relay_client_free() to clean"]
    #[doc = "     up properly."]
    #[doc = ""]
    #[doc = " @note WARNING: Don't call this function without reading the data afterwards."]
    #[doc = "     A directory mobile_file_relay.XXXX used for creating the archive will"]
    #[doc = "     remain in the /tmp directory otherwise."]
    #[doc = ""]
    #[doc = " @return FILE_RELAY_E_SUCCESS on succes, FILE_RELAY_E_INVALID_ARG when one or"]
    #[doc = "     more parameters are invalid, FILE_RELAY_E_MUX_ERROR if a communication"]
    #[doc = "     error occurs, FILE_RELAY_E_PLIST_ERROR when the received result is NULL"]
    #[doc = "     or is not a valid plist, FILE_RELAY_E_INVALID_SOURCE if one or more"]
    #[doc = "     sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available"]
    #[doc = "     for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise."]
    pub fn file_relay_request_sources_timeout(
        client: file_relay_client_t,
        sources: *mut *const ::std::os::raw::c_char,
        connection: *mut idevice_connection_t,
        timeout: ::std::os::raw::c_uint,
    ) -> file_relay_error_t;
}
pub const heartbeat_error_t_HEARTBEAT_E_SUCCESS: heartbeat_error_t = 0;
pub const heartbeat_error_t_HEARTBEAT_E_INVALID_ARG: heartbeat_error_t = -1;
pub const heartbeat_error_t_HEARTBEAT_E_PLIST_ERROR: heartbeat_error_t = -2;
pub const heartbeat_error_t_HEARTBEAT_E_MUX_ERROR: heartbeat_error_t = -3;
pub const heartbeat_error_t_HEARTBEAT_E_SSL_ERROR: heartbeat_error_t = -4;
pub const heartbeat_error_t_HEARTBEAT_E_NOT_ENOUGH_DATA: heartbeat_error_t = -5;
pub const heartbeat_error_t_HEARTBEAT_E_TIMEOUT: heartbeat_error_t = -6;
pub const heartbeat_error_t_HEARTBEAT_E_UNKNOWN_ERROR: heartbeat_error_t = -256;
#[doc = " Error Codes"]
pub type heartbeat_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heartbeat_client_private {
    _unused: [u8; 0],
}
pub type heartbeat_client_t = *mut heartbeat_client_private;
extern "C" {
    #[doc = " Connects to the heartbeat service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     heartbeat_client_t upon successful return. Must be freed using"]
    #[doc = "     heartbeat_client_free() after use."]
    #[doc = ""]
    #[doc = " @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an HEARTBEAT_E_* error code otherwise."]
    pub fn heartbeat_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut heartbeat_client_t,
    ) -> heartbeat_error_t;
}
extern "C" {
    #[doc = " Starts a new heartbeat service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     heartbeat_client_t upon successful return. Must be freed using"]
    #[doc = "     heartbeat_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error"]
    #[doc = "     code otherwise."]
    pub fn heartbeat_client_start_service(
        device: idevice_t,
        client: *mut heartbeat_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> heartbeat_error_t;
}
extern "C" {
    #[doc = " Disconnects a heartbeat client from the device and frees up the"]
    #[doc = " heartbeat client data."]
    #[doc = ""]
    #[doc = " @param client The heartbeat client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an HEARTBEAT_E_* error code otherwise."]
    pub fn heartbeat_client_free(client: heartbeat_client_t) -> heartbeat_error_t;
}
extern "C" {
    #[doc = " Sends a plist to the service."]
    #[doc = ""]
    #[doc = " @param client The heartbeat client"]
    #[doc = " @param plist The plist to send"]
    #[doc = ""]
    #[doc = " @return HEARTBEAT_E_SUCCESS on success,"]
    #[doc = "  HEARTBEAT_E_INVALID_ARG when client or plist is NULL"]
    pub fn heartbeat_send(client: heartbeat_client_t, plist: plist_t) -> heartbeat_error_t;
}
extern "C" {
    #[doc = " Receives a plist from the service."]
    #[doc = ""]
    #[doc = " @param client The heartbeat client"]
    #[doc = " @param plist The plist to store the received data"]
    #[doc = ""]
    #[doc = " @return HEARTBEAT_E_SUCCESS on success,"]
    #[doc = "  HEARTBEAT_E_INVALID_ARG when client or plist is NULL"]
    pub fn heartbeat_receive(client: heartbeat_client_t, plist: *mut plist_t) -> heartbeat_error_t;
}
extern "C" {
    #[doc = " Receives a plist using the given heartbeat client."]
    #[doc = ""]
    #[doc = " @param client The heartbeat client to use for receiving"]
    #[doc = " @param plist pointer to a plist_t that will point to the received plist"]
    #[doc = "      upon successful return"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return HEARTBEAT_E_SUCCESS on success,"]
    #[doc = "      HEARTBEAT_E_INVALID_ARG when client or *plist is NULL,"]
    #[doc = "      HEARTBEAT_E_NOT_ENOUGH_DATA when not enough data"]
    #[doc = "      received, HEARTBEAT_E_TIMEOUT when the connection times out,"]
    #[doc = "      HEARTBEAT_E_PLIST_ERROR when the received data cannot be"]
    #[doc = "      converted to a plist, HEARTBEAT_E_MUX_ERROR when a"]
    #[doc = "      communication error occurs, or HEARTBEAT_E_UNKNOWN_ERROR"]
    #[doc = "      when an unspecified error occurs."]
    pub fn heartbeat_receive_with_timeout(
        client: heartbeat_client_t,
        plist: *mut plist_t,
        timeout_ms: u32,
    ) -> heartbeat_error_t;
}
pub const house_arrest_error_t_HOUSE_ARREST_E_SUCCESS: house_arrest_error_t = 0;
pub const house_arrest_error_t_HOUSE_ARREST_E_INVALID_ARG: house_arrest_error_t = -1;
pub const house_arrest_error_t_HOUSE_ARREST_E_PLIST_ERROR: house_arrest_error_t = -2;
pub const house_arrest_error_t_HOUSE_ARREST_E_CONN_FAILED: house_arrest_error_t = -3;
pub const house_arrest_error_t_HOUSE_ARREST_E_INVALID_MODE: house_arrest_error_t = -4;
pub const house_arrest_error_t_HOUSE_ARREST_E_UNKNOWN_ERROR: house_arrest_error_t = -256;
#[doc = " Error Codes"]
pub type house_arrest_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct house_arrest_client_private {
    _unused: [u8; 0],
}
pub type house_arrest_client_t = *mut house_arrest_client_private;
extern "C" {
    #[doc = " Connects to the house_arrest service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     housearrest_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return HOUSE_ARREST_E_SUCCESS on success, HOUSE_ARREST_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an HOUSE_ARREST_E_* error code otherwise."]
    pub fn house_arrest_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut house_arrest_client_t,
    ) -> house_arrest_error_t;
}
extern "C" {
    #[doc = " Starts a new house_arrest service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     house_arrest_client_t upon successful return. Must be freed using"]
    #[doc = "     house_arrest_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return HOUSE_ARREST_E_SUCCESS on success, or an HOUSE_ARREST_E_* error"]
    #[doc = "     code otherwise."]
    pub fn house_arrest_client_start_service(
        device: idevice_t,
        client: *mut house_arrest_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> house_arrest_error_t;
}
extern "C" {
    #[doc = " Disconnects an house_arrest client from the device and frees up the"]
    #[doc = " house_arrest client data."]
    #[doc = ""]
    #[doc = " @note After using afc_client_new_from_house_arrest_client(), make sure"]
    #[doc = "     you call afc_client_free() before calling this function to ensure"]
    #[doc = "     a proper cleanup. Do not call this function if you still need to"]
    #[doc = "     perform AFC operations since it will close the connection."]
    #[doc = ""]
    #[doc = " @param client The house_arrest client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return HOUSE_ARREST_E_SUCCESS on success, HOUSE_ARREST_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an HOUSE_ARREST_E_* error code otherwise."]
    pub fn house_arrest_client_free(client: house_arrest_client_t) -> house_arrest_error_t;
}
extern "C" {
    #[doc = " Sends a generic request to the connected house_arrest service."]
    #[doc = ""]
    #[doc = " @param client The house_arrest client to use."]
    #[doc = " @param dict The request to send as a plist of type PLIST_DICT."]
    #[doc = ""]
    #[doc = " @note If this function returns HOUSE_ARREST_E_SUCCESS it does not mean"]
    #[doc = "     that the request was successful. To check for success or failure you"]
    #[doc = "     need to call house_arrest_get_result()."]
    #[doc = " @see house_arrest_get_result"]
    #[doc = ""]
    #[doc = " @return HOUSE_ARREST_E_SUCCESS if the request was successfully sent,"]
    #[doc = "     HOUSE_ARREST_E_INVALID_ARG if client or dict is invalid,"]
    #[doc = "     HOUSE_ARREST_E_PLIST_ERROR if dict is not a plist of type PLIST_DICT,"]
    #[doc = "     HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode,"]
    #[doc = "     or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred."]
    pub fn house_arrest_send_request(
        client: house_arrest_client_t,
        dict: plist_t,
    ) -> house_arrest_error_t;
}
extern "C" {
    #[doc = " Send a command to the connected house_arrest service."]
    #[doc = " Calls house_arrest_send_request() internally."]
    #[doc = ""]
    #[doc = " @param client The house_arrest client to use."]
    #[doc = " @param command The command to send. Currently, only VendContainer and"]
    #[doc = "     VendDocuments are known."]
    #[doc = " @param appid The application identifier to pass along with the ."]
    #[doc = ""]
    #[doc = " @note If this function returns HOUSE_ARREST_E_SUCCESS it does not mean"]
    #[doc = "     that the command was successful. To check for success or failure you"]
    #[doc = "     need to call house_arrest_get_result()."]
    #[doc = " @see house_arrest_get_result"]
    #[doc = ""]
    #[doc = " @return HOUSE_ARREST_E_SUCCESS if the command was successfully sent,"]
    #[doc = "     HOUSE_ARREST_E_INVALID_ARG if client, command, or appid is invalid,"]
    #[doc = "     HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode,"]
    #[doc = "     or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred."]
    pub fn house_arrest_send_command(
        client: house_arrest_client_t,
        command: *const ::std::os::raw::c_char,
        appid: *const ::std::os::raw::c_char,
    ) -> house_arrest_error_t;
}
extern "C" {
    #[doc = " Retrieves the result of a previously sent house_arrest_request_* request."]
    #[doc = ""]
    #[doc = " @param client The house_arrest client to use"]
    #[doc = " @param dict Pointer that will be set to a plist containing the result to"]
    #[doc = "     the last performed operation. It holds a key 'Status' with the value"]
    #[doc = "     'Complete' on success or a key 'Error' with an error description as"]
    #[doc = "     value. The caller is responsible for freeing the returned plist."]
    #[doc = ""]
    #[doc = " @return HOUSE_ARREST_E_SUCCESS if a result plist was retrieved,"]
    #[doc = "     HOUSE_ARREST_E_INVALID_ARG if client is invalid,"]
    #[doc = "     HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode,"]
    #[doc = "     or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred."]
    pub fn house_arrest_get_result(
        client: house_arrest_client_t,
        dict: *mut plist_t,
    ) -> house_arrest_error_t;
}
extern "C" {
    #[doc = " Creates an AFC client using the given house_arrest client's connection"]
    #[doc = " allowing file access to a specific application directory requested by"]
    #[doc = " functions like house_arrest_request_vendor_documents()."]
    #[doc = ""]
    #[doc = " @param client The house_arrest client to use."]
    #[doc = " @param afc_client Pointer that will be set to a newly allocated afc_client_t"]
    #[doc = "     upon successful return."]
    #[doc = ""]
    #[doc = " @note After calling this function the house_arrest client will go in an"]
    #[doc = "     AFC mode that will only allow calling house_arrest_client_free()."]
    #[doc = "     Only call house_arrest_client_free() if all AFC operations have"]
    #[doc = "     completed since it will close the connection."]
    #[doc = ""]
    #[doc = " @return AFC_E_SUCCESS if the afc client was successfully created,"]
    #[doc = "     AFC_E_INVALID_ARG if client is invalid or was already used to create"]
    #[doc = "     an afc client, or an AFC_E_* error code returned by"]
    #[doc = "     afc_client_new_with_service_client()."]
    pub fn afc_client_new_from_house_arrest_client(
        client: house_arrest_client_t,
        afc_client: *mut afc_client_t,
    ) -> afc_error_t;
}
pub const instproxy_error_t_INSTPROXY_E_SUCCESS: instproxy_error_t = 0;
pub const instproxy_error_t_INSTPROXY_E_INVALID_ARG: instproxy_error_t = -1;
pub const instproxy_error_t_INSTPROXY_E_PLIST_ERROR: instproxy_error_t = -2;
pub const instproxy_error_t_INSTPROXY_E_CONN_FAILED: instproxy_error_t = -3;
pub const instproxy_error_t_INSTPROXY_E_OP_IN_PROGRESS: instproxy_error_t = -4;
pub const instproxy_error_t_INSTPROXY_E_OP_FAILED: instproxy_error_t = -5;
pub const instproxy_error_t_INSTPROXY_E_RECEIVE_TIMEOUT: instproxy_error_t = -6;
pub const instproxy_error_t_INSTPROXY_E_ALREADY_ARCHIVED: instproxy_error_t = -7;
pub const instproxy_error_t_INSTPROXY_E_API_INTERNAL_ERROR: instproxy_error_t = -8;
pub const instproxy_error_t_INSTPROXY_E_APPLICATION_ALREADY_INSTALLED: instproxy_error_t = -9;
pub const instproxy_error_t_INSTPROXY_E_APPLICATION_MOVE_FAILED: instproxy_error_t = -10;
pub const instproxy_error_t_INSTPROXY_E_APPLICATION_SINF_CAPTURE_FAILED: instproxy_error_t = -11;
pub const instproxy_error_t_INSTPROXY_E_APPLICATION_SANDBOX_FAILED: instproxy_error_t = -12;
pub const instproxy_error_t_INSTPROXY_E_APPLICATION_VERIFICATION_FAILED: instproxy_error_t = -13;
pub const instproxy_error_t_INSTPROXY_E_ARCHIVE_DESTRUCTION_FAILED: instproxy_error_t = -14;
pub const instproxy_error_t_INSTPROXY_E_BUNDLE_VERIFICATION_FAILED: instproxy_error_t = -15;
pub const instproxy_error_t_INSTPROXY_E_CARRIER_BUNDLE_COPY_FAILED: instproxy_error_t = -16;
pub const instproxy_error_t_INSTPROXY_E_CARRIER_BUNDLE_DIRECTORY_CREATION_FAILED:
    instproxy_error_t = -17;
pub const instproxy_error_t_INSTPROXY_E_CARRIER_BUNDLE_MISSING_SUPPORTED_SIMS: instproxy_error_t =
    -18;
pub const instproxy_error_t_INSTPROXY_E_COMM_CENTER_NOTIFICATION_FAILED: instproxy_error_t = -19;
pub const instproxy_error_t_INSTPROXY_E_CONTAINER_CREATION_FAILED: instproxy_error_t = -20;
pub const instproxy_error_t_INSTPROXY_E_CONTAINER_P0WN_FAILED: instproxy_error_t = -21;
pub const instproxy_error_t_INSTPROXY_E_CONTAINER_REMOVAL_FAILED: instproxy_error_t = -22;
pub const instproxy_error_t_INSTPROXY_E_EMBEDDED_PROFILE_INSTALL_FAILED: instproxy_error_t = -23;
pub const instproxy_error_t_INSTPROXY_E_EXECUTABLE_TWIDDLE_FAILED: instproxy_error_t = -24;
pub const instproxy_error_t_INSTPROXY_E_EXISTENCE_CHECK_FAILED: instproxy_error_t = -25;
pub const instproxy_error_t_INSTPROXY_E_INSTALL_MAP_UPDATE_FAILED: instproxy_error_t = -26;
pub const instproxy_error_t_INSTPROXY_E_MANIFEST_CAPTURE_FAILED: instproxy_error_t = -27;
pub const instproxy_error_t_INSTPROXY_E_MAP_GENERATION_FAILED: instproxy_error_t = -28;
pub const instproxy_error_t_INSTPROXY_E_MISSING_BUNDLE_EXECUTABLE: instproxy_error_t = -29;
pub const instproxy_error_t_INSTPROXY_E_MISSING_BUNDLE_IDENTIFIER: instproxy_error_t = -30;
pub const instproxy_error_t_INSTPROXY_E_MISSING_BUNDLE_PATH: instproxy_error_t = -31;
pub const instproxy_error_t_INSTPROXY_E_MISSING_CONTAINER: instproxy_error_t = -32;
pub const instproxy_error_t_INSTPROXY_E_NOTIFICATION_FAILED: instproxy_error_t = -33;
pub const instproxy_error_t_INSTPROXY_E_PACKAGE_EXTRACTION_FAILED: instproxy_error_t = -34;
pub const instproxy_error_t_INSTPROXY_E_PACKAGE_INSPECTION_FAILED: instproxy_error_t = -35;
pub const instproxy_error_t_INSTPROXY_E_PACKAGE_MOVE_FAILED: instproxy_error_t = -36;
pub const instproxy_error_t_INSTPROXY_E_PATH_CONVERSION_FAILED: instproxy_error_t = -37;
pub const instproxy_error_t_INSTPROXY_E_RESTORE_CONTAINER_FAILED: instproxy_error_t = -38;
pub const instproxy_error_t_INSTPROXY_E_SEATBELT_PROFILE_REMOVAL_FAILED: instproxy_error_t = -39;
pub const instproxy_error_t_INSTPROXY_E_STAGE_CREATION_FAILED: instproxy_error_t = -40;
pub const instproxy_error_t_INSTPROXY_E_SYMLINK_FAILED: instproxy_error_t = -41;
pub const instproxy_error_t_INSTPROXY_E_UNKNOWN_COMMAND: instproxy_error_t = -42;
pub const instproxy_error_t_INSTPROXY_E_ITUNES_ARTWORK_CAPTURE_FAILED: instproxy_error_t = -43;
pub const instproxy_error_t_INSTPROXY_E_ITUNES_METADATA_CAPTURE_FAILED: instproxy_error_t = -44;
pub const instproxy_error_t_INSTPROXY_E_DEVICE_OS_VERSION_TOO_LOW: instproxy_error_t = -45;
pub const instproxy_error_t_INSTPROXY_E_DEVICE_FAMILY_NOT_SUPPORTED: instproxy_error_t = -46;
pub const instproxy_error_t_INSTPROXY_E_PACKAGE_PATCH_FAILED: instproxy_error_t = -47;
pub const instproxy_error_t_INSTPROXY_E_INCORRECT_ARCHITECTURE: instproxy_error_t = -48;
pub const instproxy_error_t_INSTPROXY_E_PLUGIN_COPY_FAILED: instproxy_error_t = -49;
pub const instproxy_error_t_INSTPROXY_E_BREADCRUMB_FAILED: instproxy_error_t = -50;
pub const instproxy_error_t_INSTPROXY_E_BREADCRUMB_UNLOCK_FAILED: instproxy_error_t = -51;
pub const instproxy_error_t_INSTPROXY_E_GEOJSON_CAPTURE_FAILED: instproxy_error_t = -52;
pub const instproxy_error_t_INSTPROXY_E_NEWSSTAND_ARTWORK_CAPTURE_FAILED: instproxy_error_t = -53;
pub const instproxy_error_t_INSTPROXY_E_MISSING_COMMAND: instproxy_error_t = -54;
pub const instproxy_error_t_INSTPROXY_E_NOT_ENTITLED: instproxy_error_t = -55;
pub const instproxy_error_t_INSTPROXY_E_MISSING_PACKAGE_PATH: instproxy_error_t = -56;
pub const instproxy_error_t_INSTPROXY_E_MISSING_CONTAINER_PATH: instproxy_error_t = -57;
pub const instproxy_error_t_INSTPROXY_E_MISSING_APPLICATION_IDENTIFIER: instproxy_error_t = -58;
pub const instproxy_error_t_INSTPROXY_E_MISSING_ATTRIBUTE_VALUE: instproxy_error_t = -59;
pub const instproxy_error_t_INSTPROXY_E_LOOKUP_FAILED: instproxy_error_t = -60;
pub const instproxy_error_t_INSTPROXY_E_DICT_CREATION_FAILED: instproxy_error_t = -61;
pub const instproxy_error_t_INSTPROXY_E_INSTALL_PROHIBITED: instproxy_error_t = -62;
pub const instproxy_error_t_INSTPROXY_E_UNINSTALL_PROHIBITED: instproxy_error_t = -63;
pub const instproxy_error_t_INSTPROXY_E_MISSING_BUNDLE_VERSION: instproxy_error_t = -64;
pub const instproxy_error_t_INSTPROXY_E_UNKNOWN_ERROR: instproxy_error_t = -256;
#[doc = " Error Codes"]
pub type instproxy_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct instproxy_client_private {
    _unused: [u8; 0],
}
pub type instproxy_client_t = *mut instproxy_client_private;
#[doc = " Reports the status response of the given command"]
pub type instproxy_status_cb_t = ::std::option::Option<
    unsafe extern "C" fn(command: plist_t, status: plist_t, user_data: *mut ::std::os::raw::c_void),
>;
extern "C" {
    #[doc = " Connects to the installation_proxy service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to"]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "        instproxy_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value"]
    #[doc = "         when an error occurred."]
    pub fn instproxy_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut instproxy_client_t,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Starts a new installation_proxy service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "        instproxy_client_t upon successful return. Must be freed using"]
    #[doc = "        instproxy_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "        Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error"]
    #[doc = "         code otherwise."]
    pub fn instproxy_client_start_service(
        device: idevice_t,
        client: *mut instproxy_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Disconnects an installation_proxy client from the device and frees up the"]
    #[doc = " installation_proxy client data."]
    #[doc = ""]
    #[doc = " @param client The installation_proxy client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success"]
    #[doc = "         or INSTPROXY_E_INVALID_ARG if client is NULL."]
    pub fn instproxy_client_free(client: instproxy_client_t) -> instproxy_error_t;
}
extern "C" {
    #[doc = " List installed applications. This function runs synchronously."]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Valid client options include:"]
    #[doc = "          \"ApplicationType\" -> \"System\""]
    #[doc = "          \"ApplicationType\" -> \"User\""]
    #[doc = "          \"ApplicationType\" -> \"Internal\""]
    #[doc = "          \"ApplicationType\" -> \"Any\""]
    #[doc = " @param result Pointer that will be set to a plist that will hold an array"]
    #[doc = "        of PLIST_DICT holding information about the applications found."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    pub fn instproxy_browse(
        client: instproxy_client_t,
        client_options: plist_t,
        result: *mut plist_t,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " List pages of installed applications in a callback."]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Valid client options include:"]
    #[doc = "          \"ApplicationType\" -> \"System\""]
    #[doc = "          \"ApplicationType\" -> \"User\""]
    #[doc = "          \"ApplicationType\" -> \"Internal\""]
    #[doc = "          \"ApplicationType\" -> \"Any\""]
    #[doc = " @param status_cb Callback function to process each page of application"]
    #[doc = "        information. Passing a callback is required."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    pub fn instproxy_browse_with_callback(
        client: instproxy_client_t,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Lookup information about specific applications from the device."]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param appids An array of bundle identifiers that MUST have a terminating"]
    #[doc = "        NULL entry or NULL to lookup all."]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Currently there are no known client options, so pass NULL here."]
    #[doc = " @param result Pointer that will be set to a plist containing a PLIST_DICT"]
    #[doc = "        holding requested information about the application or NULL on errors."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    pub fn instproxy_lookup(
        client: instproxy_client_t,
        appids: *mut *const ::std::os::raw::c_char,
        client_options: plist_t,
        result: *mut plist_t,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Install an application on the device."]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param pkg_path Path of the installation package (inside the AFC jail)"]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Valid options include:"]
    #[doc = "          \"iTunesMetadata\" -> PLIST_DATA"]
    #[doc = "          \"ApplicationSINF\" -> PLIST_DATA"]
    #[doc = "          \"PackageType\" -> \"Developer\""]
    #[doc = "        If PackageType -> Developer is specified, then pkg_path points to"]
    #[doc = "        an .app directory instead of an install package."]
    #[doc = " @param status_cb Callback function for progress and status information. If"]
    #[doc = "        NULL is passed, this function will run synchronously."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    #[doc = ""]
    #[doc = " @note If a callback function is given (async mode), this function returns"]
    #[doc = "       INSTPROXY_E_SUCCESS immediately if the status updater thread has been"]
    #[doc = "       created successfully; any error occurring during the command has to be"]
    #[doc = "       handled inside the specified callback function."]
    pub fn instproxy_install(
        client: instproxy_client_t,
        pkg_path: *const ::std::os::raw::c_char,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Upgrade an application on the device. This function is nearly the same as"]
    #[doc = " instproxy_install; the difference is that the installation progress on the"]
    #[doc = " device is faster if the application is already installed."]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param pkg_path Path of the installation package (inside the AFC jail)"]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Valid options include:"]
    #[doc = "          \"iTunesMetadata\" -> PLIST_DATA"]
    #[doc = "          \"ApplicationSINF\" -> PLIST_DATA"]
    #[doc = "          \"PackageType\" -> \"Developer\""]
    #[doc = "        If PackageType -> Developer is specified, then pkg_path points to"]
    #[doc = "        an .app directory instead of an install package."]
    #[doc = " @param status_cb Callback function for progress and status information. If"]
    #[doc = "        NULL is passed, this function will run synchronously."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    #[doc = ""]
    #[doc = " @note If a callback function is given (async mode), this function returns"]
    #[doc = "       INSTPROXY_E_SUCCESS immediately if the status updater thread has been"]
    #[doc = "       created successfully; any error occurring during the command has to be"]
    #[doc = "       handled inside the specified callback function."]
    pub fn instproxy_upgrade(
        client: instproxy_client_t,
        pkg_path: *const ::std::os::raw::c_char,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Uninstall an application from the device."]
    #[doc = ""]
    #[doc = " @param client The connected installation proxy client"]
    #[doc = " @param appid ApplicationIdentifier of the app to uninstall"]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Currently there are no known client options, so pass NULL here."]
    #[doc = " @param status_cb Callback function for progress and status information. If"]
    #[doc = "        NULL is passed, this function will run synchronously."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "     an error occurred."]
    #[doc = ""]
    #[doc = " @note If a callback function is given (async mode), this function returns"]
    #[doc = "       INSTPROXY_E_SUCCESS immediately if the status updater thread has been"]
    #[doc = "       created successfully; any error occurring during the command has to be"]
    #[doc = "       handled inside the specified callback function."]
    pub fn instproxy_uninstall(
        client: instproxy_client_t,
        appid: *const ::std::os::raw::c_char,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " List archived applications. This function runs synchronously."]
    #[doc = ""]
    #[doc = " @see instproxy_archive"]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Currently there are no known client options, so pass NULL here."]
    #[doc = " @param result Pointer that will be set to a plist containing a PLIST_DICT"]
    #[doc = "        holding information about the archived applications found."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    pub fn instproxy_lookup_archives(
        client: instproxy_client_t,
        client_options: plist_t,
        result: *mut plist_t,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Archive an application on the device."]
    #[doc = " This function tells the device to make an archive of the specified"]
    #[doc = " application. This results in the device creating a ZIP archive in the"]
    #[doc = " 'ApplicationArchives' directory and uninstalling the application."]
    #[doc = ""]
    #[doc = " @param client The connected installation proxy client"]
    #[doc = " @param appid ApplicationIdentifier of the app to archive."]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Valid options include:"]
    #[doc = "          \"SkipUninstall\" -> Boolean"]
    #[doc = "          \"ArchiveType\" -> \"ApplicationOnly\""]
    #[doc = " @param status_cb Callback function for progress and status information. If"]
    #[doc = "        NULL is passed, this function will run synchronously."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "     an error occurred."]
    #[doc = ""]
    #[doc = " @note If a callback function is given (async mode), this function returns"]
    #[doc = "       INSTPROXY_E_SUCCESS immediately if the status updater thread has been"]
    #[doc = "       created successfully; any error occurring during the command has to be"]
    #[doc = "       handled inside the specified callback function."]
    pub fn instproxy_archive(
        client: instproxy_client_t,
        appid: *const ::std::os::raw::c_char,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Restore a previously archived application on the device."]
    #[doc = " This function is the counterpart to instproxy_archive."]
    #[doc = " @see instproxy_archive"]
    #[doc = ""]
    #[doc = " @param client The connected installation proxy client"]
    #[doc = " @param appid ApplicationIdentifier of the app to restore."]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Valid options include:"]
    #[doc = "          \"ArchiveType\" -> \"DocumentsOnly\""]
    #[doc = " @param status_cb Callback function for progress and status information. If"]
    #[doc = "        NULL is passed, this function will run synchronously."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "     an error occurred."]
    #[doc = ""]
    #[doc = " @note If a callback function is given (async mode), this function returns"]
    #[doc = "       INSTPROXY_E_SUCCESS immediately if the status updater thread has been"]
    #[doc = "       created successfully; any error occurring during the command has to be"]
    #[doc = "       handled inside the specified callback function."]
    pub fn instproxy_restore(
        client: instproxy_client_t,
        appid: *const ::std::os::raw::c_char,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Removes a previously archived application from the device."]
    #[doc = " This function removes the ZIP archive from the 'ApplicationArchives'"]
    #[doc = " directory."]
    #[doc = ""]
    #[doc = " @param client The connected installation proxy client"]
    #[doc = " @param appid ApplicationIdentifier of the archived app to remove."]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Currently there are no known client options, so passing NULL is fine."]
    #[doc = " @param status_cb Callback function for progress and status information. If"]
    #[doc = "        NULL is passed, this function will run synchronously."]
    #[doc = " @param user_data Callback data passed to status_cb."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    #[doc = ""]
    #[doc = " @note If a callback function is given (async mode), this function returns"]
    #[doc = "       INSTPROXY_E_SUCCESS immediately if the status updater thread has been"]
    #[doc = "       created successfully; any error occurring during the command has to be"]
    #[doc = "       handled inside the specified callback function."]
    pub fn instproxy_remove_archive(
        client: instproxy_client_t,
        appid: *const ::std::os::raw::c_char,
        client_options: plist_t,
        status_cb: instproxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Checks a device for certain capabilities."]
    #[doc = ""]
    #[doc = " @param client The connected installation_proxy client"]
    #[doc = " @param capabilities An array of char* with capability names that MUST have a"]
    #[doc = "        terminating\u{a0}NULL entry."]
    #[doc = " @param client_options The client options to use, as PLIST_DICT, or NULL."]
    #[doc = "        Currently there are no known client options, so pass NULL here."]
    #[doc = " @param result Pointer that will be set to a plist containing a PLIST_DICT"]
    #[doc = "        holding information if the capabilities matched or NULL on errors."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if"]
    #[doc = "         an error occurred."]
    pub fn instproxy_check_capabilities_match(
        client: instproxy_client_t,
        capabilities: *mut *const ::std::os::raw::c_char,
        client_options: plist_t,
        result: *mut plist_t,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Gets the name from a command dictionary."]
    #[doc = ""]
    #[doc = " @param command The dictionary describing the command."]
    #[doc = " @param name Pointer to store the name of the command."]
    pub fn instproxy_command_get_name(command: plist_t, name: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Gets the name of a status."]
    #[doc = ""]
    #[doc = " @param status The dictionary status response to use."]
    #[doc = " @param name Pointer to store the name of the status."]
    pub fn instproxy_status_get_name(status: plist_t, name: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    #[doc = " Gets error name, code and description from a response if available."]
    #[doc = ""]
    #[doc = " @param status The dictionary status response to use."]
    #[doc = " @param name Pointer to store the name of an error."]
    #[doc = " @param description Pointer to store error description text if available."]
    #[doc = "        The caller is reponsible for freeing the allocated buffer after use."]
    #[doc = "        If NULL is passed no description will be returned."]
    #[doc = " @param code Pointer to store the returned error code if available."]
    #[doc = "        If NULL is passed no error code will be returned."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS if no error is found or an INSTPROXY_E_* error"]
    #[doc = "   value matching the error that ẃas found in the status."]
    pub fn instproxy_status_get_error(
        status: plist_t,
        name: *mut *mut ::std::os::raw::c_char,
        description: *mut *mut ::std::os::raw::c_char,
        code: *mut u64,
    ) -> instproxy_error_t;
}
extern "C" {
    #[doc = " Gets total and current item information from a browse response if available."]
    #[doc = ""]
    #[doc = " @param status The dictionary status response to use."]
    #[doc = " @param total Pointer to store the total number of items."]
    #[doc = " @param current_index Pointer to store the current index of all browsed items."]
    #[doc = " @param current_amount Pointer to store the amount of items in the"]
    #[doc = "        current list."]
    #[doc = " @param list Pointer to store a newly allocated plist with items."]
    #[doc = "        The caller is reponsible for freeing the list after use."]
    #[doc = "        If NULL is passed no list will be returned. If NULL is returned no"]
    #[doc = "        list was found in the status."]
    pub fn instproxy_status_get_current_list(
        status: plist_t,
        total: *mut u64,
        current_index: *mut u64,
        current_amount: *mut u64,
        list: *mut plist_t,
    );
}
extern "C" {
    #[doc = " Gets progress in percentage from a status if available."]
    #[doc = ""]
    #[doc = " @param status The dictionary status response to use."]
    #[doc = " @param name Pointer to store the progress in percent (0-100) or -1 if not"]
    #[doc = "        progress was found in the status."]
    pub fn instproxy_status_get_percent_complete(
        status: plist_t,
        percent: *mut ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " Creates a new client_options plist."]
    #[doc = ""]
    #[doc = " @return A new plist_t of type PLIST_DICT."]
    pub fn instproxy_client_options_new() -> plist_t;
}
extern "C" {
    #[doc = " Adds one or more new key:value pairs to the given client_options."]
    #[doc = ""]
    #[doc = " @param client_options The client options to modify."]
    #[doc = " @param ... KEY, VALUE, [KEY, VALUE], NULL"]
    #[doc = ""]
    #[doc = " @note The keys and values passed are expected to be strings, except for the"]
    #[doc = "       keys \"ApplicationSINF\", \"iTunesMetadata\", \"ReturnAttributes\" which are"]
    #[doc = "       expecting a plist_t node as value and \"SkipUninstall\" expects int."]
    pub fn instproxy_client_options_add(client_options: plist_t, ...);
}
extern "C" {
    #[doc = " Adds attributes to the given client_options to filter browse results."]
    #[doc = ""]
    #[doc = " @param client_options The client options to modify."]
    #[doc = " @param ... VALUE, VALUE, [VALUE], NULL"]
    #[doc = ""]
    #[doc = " @note The values passed are expected to be strings."]
    pub fn instproxy_client_options_set_return_attributes(client_options: plist_t, ...);
}
extern "C" {
    #[doc = " Frees client_options plist."]
    #[doc = ""]
    #[doc = " @param client_options The client options plist to free. Does nothing if NULL"]
    #[doc = "        is passed."]
    pub fn instproxy_client_options_free(client_options: plist_t);
}
extern "C" {
    #[doc = " Queries the device for the path of an application."]
    #[doc = ""]
    #[doc = " @param client The connected installation proxy client."]
    #[doc = " @param appid ApplicationIdentifier of app to retrieve the path for."]
    #[doc = " @param path Pointer to store the device path for the application"]
    #[doc = "        which is set to NULL if it could not be determined."]
    #[doc = ""]
    #[doc = " @return INSTPROXY_E_SUCCESS on success, INSTPROXY_E_OP_FAILED if"]
    #[doc = "         the path could not be determined or an INSTPROXY_E_* error"]
    #[doc = "         value if an error occurred."]
    pub fn instproxy_client_get_path_for_bundle_identifier(
        client: instproxy_client_t,
        bundle_id: *const ::std::os::raw::c_char,
        path: *mut *mut ::std::os::raw::c_char,
    ) -> instproxy_error_t;
}
pub const misagent_error_t_MISAGENT_E_SUCCESS: misagent_error_t = 0;
pub const misagent_error_t_MISAGENT_E_INVALID_ARG: misagent_error_t = -1;
pub const misagent_error_t_MISAGENT_E_PLIST_ERROR: misagent_error_t = -2;
pub const misagent_error_t_MISAGENT_E_CONN_FAILED: misagent_error_t = -3;
pub const misagent_error_t_MISAGENT_E_REQUEST_FAILED: misagent_error_t = -4;
pub const misagent_error_t_MISAGENT_E_UNKNOWN_ERROR: misagent_error_t = -256;
#[doc = " Error Codes"]
pub type misagent_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct misagent_client_private {
    _unused: [u8; 0],
}
pub type misagent_client_t = *mut misagent_client_private;
extern "C" {
    #[doc = " Connects to the misagent service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     misagent_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an MISAGENT_E_* error code otherwise."]
    pub fn misagent_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut misagent_client_t,
    ) -> misagent_error_t;
}
extern "C" {
    #[doc = " Starts a new misagent service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     misagent_client_t upon successful return. Must be freed using"]
    #[doc = "     misagent_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error"]
    #[doc = "     code otherwise."]
    pub fn misagent_client_start_service(
        device: idevice_t,
        client: *mut misagent_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> misagent_error_t;
}
extern "C" {
    #[doc = " Disconnects an misagent client from the device and frees up the"]
    #[doc = " misagent client data."]
    #[doc = ""]
    #[doc = " @param client The misagent client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an MISAGENT_E_* error code otherwise."]
    pub fn misagent_client_free(client: misagent_client_t) -> misagent_error_t;
}
extern "C" {
    #[doc = " Installs the given provisioning profile. Only works with valid profiles."]
    #[doc = ""]
    #[doc = " @param client The connected misagent to use for installation"]
    #[doc = " @param profile The valid provisioning profile to install. This has to be"]
    #[doc = "    passed as a PLIST_DATA, otherwise the function will fail."]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when"]
    #[doc = "     client is invalid, or an MISAGENT_E_* error code otherwise."]
    pub fn misagent_install(client: misagent_client_t, profile: plist_t) -> misagent_error_t;
}
extern "C" {
    #[doc = " Retrieves all installed provisioning profiles (iOS 9.2.1 or below)."]
    #[doc = ""]
    #[doc = " @param client The connected misagent to use."]
    #[doc = " @param profiles Pointer to a plist_t that will be set to a PLIST_ARRAY"]
    #[doc = "    if the function is successful."]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when"]
    #[doc = "     client is invalid, or an MISAGENT_E_* error code otherwise."]
    #[doc = ""]
    #[doc = " @note This API call only works with iOS 9.2.1 or below."]
    #[doc = "     For newer iOS versions use misagent_copy_all() instead."]
    #[doc = ""]
    #[doc = " @note If no provisioning profiles are installed on the device, this function"]
    #[doc = "     still returns MISAGENT_E_SUCCESS and profiles will just point to an"]
    #[doc = "     empty array."]
    pub fn misagent_copy(client: misagent_client_t, profiles: *mut plist_t) -> misagent_error_t;
}
extern "C" {
    #[doc = " Retrieves all installed provisioning profiles (iOS 9.3 or higher)."]
    #[doc = ""]
    #[doc = " @param client The connected misagent to use."]
    #[doc = " @param profiles Pointer to a plist_t that will be set to a PLIST_ARRAY"]
    #[doc = "    if the function is successful."]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when"]
    #[doc = "     client is invalid, or an MISAGENT_E_* error code otherwise."]
    #[doc = ""]
    #[doc = " @note This API call only works with iOS 9.3 or higher."]
    #[doc = "     For older iOS versions use misagent_copy() instead."]
    #[doc = ""]
    #[doc = " @note If no provisioning profiles are installed on the device, this function"]
    #[doc = "     still returns MISAGENT_E_SUCCESS and profiles will just point to an"]
    #[doc = "     empty array."]
    pub fn misagent_copy_all(client: misagent_client_t, profiles: *mut plist_t)
        -> misagent_error_t;
}
extern "C" {
    #[doc = " Removes a given provisioning profile."]
    #[doc = ""]
    #[doc = " @param client The connected misagent to use."]
    #[doc = " @param profileID Identifier of the provisioning profile to remove."]
    #[doc = "    This is a UUID that can be obtained from the provisioning profile data."]
    #[doc = " @see misagent_copy"]
    #[doc = ""]
    #[doc = " @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when"]
    #[doc = "     client is invalid, or an MISAGENT_E_* error code otherwise."]
    pub fn misagent_remove(
        client: misagent_client_t,
        profileID: *const ::std::os::raw::c_char,
    ) -> misagent_error_t;
}
extern "C" {
    #[doc = " Retrieves the status code from the last operation."]
    #[doc = ""]
    #[doc = " @param client The misagent to use."]
    #[doc = ""]
    #[doc = " @return -1 if client is invalid, or the status code from the last operation"]
    pub fn misagent_get_status_code(client: misagent_client_t) -> ::std::os::raw::c_int;
}
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_SUCCESS:
    mobile_image_mounter_error_t = 0;
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_INVALID_ARG:
    mobile_image_mounter_error_t = -1;
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR:
    mobile_image_mounter_error_t = -2;
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_CONN_FAILED:
    mobile_image_mounter_error_t = -3;
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_COMMAND_FAILED:
    mobile_image_mounter_error_t = -4;
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_DEVICE_LOCKED:
    mobile_image_mounter_error_t = -5;
pub const mobile_image_mounter_error_t_MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR:
    mobile_image_mounter_error_t = -256;
#[doc = " Error Codes"]
pub type mobile_image_mounter_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mobile_image_mounter_client_private {
    _unused: [u8; 0],
}
pub type mobile_image_mounter_client_t = *mut mobile_image_mounter_client_private;
#[doc = " callback for image upload"]
pub type mobile_image_mounter_upload_cb_t = ::std::option::Option<
    unsafe extern "C" fn(
        buffer: *mut ::std::os::raw::c_void,
        length: size_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> ssize_t,
>;
extern "C" {
    #[doc = " Connects to the mobile_image_mounter service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "    mobile_image_mounter_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,"]
    #[doc = "    MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if device is NULL,"]
    #[doc = "    or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the"]
    #[doc = "    device could not be established."]
    pub fn mobile_image_mounter_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut mobile_image_mounter_client_t,
    ) -> mobile_image_mounter_error_t;
}
extern "C" {
    #[doc = " Starts a new mobile_image_mounter service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     mobile_image_mounter_t upon successful return. Must be freed using"]
    #[doc = "     mobile_image_mounter_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error"]
    #[doc = "     code otherwise."]
    pub fn mobile_image_mounter_start_service(
        device: idevice_t,
        client: *mut mobile_image_mounter_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> mobile_image_mounter_error_t;
}
extern "C" {
    #[doc = " Disconnects a mobile_image_mounter client from the device and frees up the"]
    #[doc = " mobile_image_mounter client data."]
    #[doc = ""]
    #[doc = " @param client The mobile_image_mounter client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,"]
    #[doc = "    or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL."]
    pub fn mobile_image_mounter_free(
        client: mobile_image_mounter_client_t,
    ) -> mobile_image_mounter_error_t;
}
extern "C" {
    #[doc = " Tells if the image of ImageType is already mounted."]
    #[doc = ""]
    #[doc = " @param client The client use"]
    #[doc = " @param image_type The type of the image to look up"]
    #[doc = " @param result Pointer to a plist that will receive the result of the"]
    #[doc = "    operation."]
    #[doc = ""]
    #[doc = " @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the"]
    #[doc = "    operation has failed. Check the resulting plist for further information."]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error"]
    pub fn mobile_image_mounter_lookup_image(
        client: mobile_image_mounter_client_t,
        image_type: *const ::std::os::raw::c_char,
        result: *mut plist_t,
    ) -> mobile_image_mounter_error_t;
}
extern "C" {
    #[doc = " Uploads an image with an optional signature to the device."]
    #[doc = ""]
    #[doc = " @param client The connected mobile_image_mounter client."]
    #[doc = " @param image_type Type of image that is being uploaded."]
    #[doc = " @param image_size Total size of the image."]
    #[doc = " @param signature Buffer with a signature of the image being uploaded. If"]
    #[doc = "    NULL, no signature will be used."]
    #[doc = " @param signature_size Total size of the image signature buffer. If 0, no"]
    #[doc = "    signature will be used."]
    #[doc = " @param upload_cb Callback function that gets the data chunks for uploading"]
    #[doc = "    the image."]
    #[doc = " @param userdata User defined data for the upload callback function."]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on succes, or a"]
    #[doc = "    MOBILE_IMAGE_MOUNTER_E_* error code otherwise."]
    pub fn mobile_image_mounter_upload_image(
        client: mobile_image_mounter_client_t,
        image_type: *const ::std::os::raw::c_char,
        image_size: size_t,
        signature: *const ::std::os::raw::c_char,
        signature_size: u16,
        upload_cb: mobile_image_mounter_upload_cb_t,
        userdata: *mut ::std::os::raw::c_void,
    ) -> mobile_image_mounter_error_t;
}
extern "C" {
    #[doc = " Mounts an image on the device."]
    #[doc = ""]
    #[doc = " @param client The connected mobile_image_mounter client."]
    #[doc = " @param image_path The absolute path of the image to mount. The image must"]
    #[doc = "    be present before calling this function."]
    #[doc = " @param signature Pointer to a buffer holding the images' signature"]
    #[doc = " @param signature_size Length of the signature image_signature points to"]
    #[doc = " @param image_type Type of image to mount"]
    #[doc = " @param result Pointer to a plist that will receive the result of the"]
    #[doc = "    operation."]
    #[doc = ""]
    #[doc = " @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the"]
    #[doc = "    operation has failed. Check the resulting plist for further information."]
    #[doc = "    Note that there is no unmounting function. The mount persists until the"]
    #[doc = "    device is rebooted."]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,"]
    #[doc = "    MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are"]
    #[doc = "    invalid, or another error code otherwise."]
    pub fn mobile_image_mounter_mount_image(
        client: mobile_image_mounter_client_t,
        image_path: *const ::std::os::raw::c_char,
        signature: *const ::std::os::raw::c_char,
        signature_size: u16,
        image_type: *const ::std::os::raw::c_char,
        result: *mut plist_t,
    ) -> mobile_image_mounter_error_t;
}
extern "C" {
    #[doc = " Hangs up the connection to the mobile_image_mounter service."]
    #[doc = " This functions has to be called before freeing up a mobile_image_mounter"]
    #[doc = " instance. If not, errors appear in the device's syslog."]
    #[doc = ""]
    #[doc = " @param client The client to hang up"]
    #[doc = ""]
    #[doc = " @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,"]
    #[doc = "     MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid,"]
    #[doc = "     or another error code otherwise."]
    pub fn mobile_image_mounter_hangup(
        client: mobile_image_mounter_client_t,
    ) -> mobile_image_mounter_error_t;
}
pub const mobileactivation_error_t_MOBILEACTIVATION_E_SUCCESS: mobileactivation_error_t = 0;
pub const mobileactivation_error_t_MOBILEACTIVATION_E_INVALID_ARG: mobileactivation_error_t = -1;
pub const mobileactivation_error_t_MOBILEACTIVATION_E_PLIST_ERROR: mobileactivation_error_t = -2;
pub const mobileactivation_error_t_MOBILEACTIVATION_E_MUX_ERROR: mobileactivation_error_t = -3;
pub const mobileactivation_error_t_MOBILEACTIVATION_E_UNKNOWN_REQUEST: mobileactivation_error_t =
    -4;
pub const mobileactivation_error_t_MOBILEACTIVATION_E_REQUEST_FAILED: mobileactivation_error_t = -5;
pub const mobileactivation_error_t_MOBILEACTIVATION_E_UNKNOWN_ERROR: mobileactivation_error_t =
    -256;
#[doc = " Error Codes"]
pub type mobileactivation_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mobileactivation_client_private {
    _unused: [u8; 0],
}
pub type mobileactivation_client_t = *mut mobileactivation_client_private;
extern "C" {
    #[doc = " Connects to the mobileactivation service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Reference that will point to a newly allocated"]
    #[doc = "     mobileactivation_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success,"]
    #[doc = "     MOBILEACTIVATION_E_INVALID_ARG when one of the parameters is invalid,"]
    #[doc = "     or MOBILEACTIVATION_E_MUX_ERROR when the connection failed."]
    pub fn mobileactivation_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut mobileactivation_client_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Starts a new mobileactivation service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     mobileactivation_client_t upon successful return. Must be freed using"]
    #[doc = "     mobileactivation_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_client_start_service(
        device: idevice_t,
        client: *mut mobileactivation_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Disconnects a mobileactivation client from the device and frees up the"]
    #[doc = " mobileactivation client data."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success,"]
    #[doc = "     MOBILEACTIVATION_E_INVALID_ARG when one of client or client->parent"]
    #[doc = "     is invalid, or MOBILEACTIVATION_E_UNKNOWN_ERROR when the was an"]
    #[doc = "     error freeing the parent property_list_service client."]
    pub fn mobileactivation_client_free(
        client: mobileactivation_client_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Retrieves the device's activation state."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client."]
    #[doc = " @param state Pointer to a plist_t variable that will be set to the"]
    #[doc = "     activation state reported by the mobileactivation service. The"]
    #[doc = "     consumer is responsible for freeing the returned object using"]
    #[doc = "     plist_free()."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_get_activation_state(
        client: mobileactivation_client_t,
        state: *mut plist_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Retrieves a session blob required for 'drmHandshake' via albert.apple.com."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client"]
    #[doc = " @param blob Pointer to a plist_t variable that will be set to the"]
    #[doc = "     session blob created by the mobielactivation service. The"]
    #[doc = "     consumer is responsible for freeing the returned object using"]
    #[doc = "     plist_free()."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_create_activation_session_info(
        client: mobileactivation_client_t,
        blob: *mut plist_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Retrieves the activation info required for device activation."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client"]
    #[doc = " @param info Pointer to a plist_t variable that will be set to the"]
    #[doc = "     activation info created by the mobileactivation service. The"]
    #[doc = "     consumer is responsible for freeing the returned object using"]
    #[doc = "     plist_free()."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_create_activation_info(
        client: mobileactivation_client_t,
        info: *mut plist_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Retrieves the activation info required for device activation in 'session'"]
    #[doc = " mode. This function expects a handshake result retrieved from"]
    #[doc = " https://albert.apple.com/deviceservies/drmHandshake  with a blob"]
    #[doc = " provided by mobileactivation_create_activation_session_info()."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client"]
    #[doc = " @aram handshake_response The handshake response returned from drmHandshake"]
    #[doc = " @param info Pointer to a plist_t variable that will be set to the"]
    #[doc = "     activation info created by the mobileactivation service. The"]
    #[doc = "     consumer is responsible for freeing the returned object using"]
    #[doc = "     plist_free()."]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_create_activation_info_with_session(
        client: mobileactivation_client_t,
        handshake_response: plist_t,
        info: *mut plist_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Activates the device with the given activation record."]
    #[doc = " The activation record plist dictionary must be obtained using the"]
    #[doc = " activation protocol requesting from Apple's https webservice."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client"]
    #[doc = " @param activation_record The activation record plist dictionary"]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_activate(
        client: mobileactivation_client_t,
        activation_record: plist_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Activates the device with the given activation record in 'session' mode."]
    #[doc = " The activation record plist must be obtained using the"]
    #[doc = " activation protocol requesting from Apple's https webservice."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client"]
    #[doc = " @param activation_record The activation record in plist format"]
    #[doc = " @param headers A plist dictionary with the activation response headers"]
    #[doc = "     as returned from Apple's https webservice with the activation record"]
    #[doc = ""]
    #[doc = " @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*"]
    #[doc = "     error code otherwise."]
    pub fn mobileactivation_activate_with_session(
        client: mobileactivation_client_t,
        activation_record: plist_t,
        headers: plist_t,
    ) -> mobileactivation_error_t;
}
extern "C" {
    #[doc = " Deactivates the device."]
    #[doc = ""]
    #[doc = " @param client The mobileactivation client"]
    pub fn mobileactivation_deactivate(
        client: mobileactivation_client_t,
    ) -> mobileactivation_error_t;
}
pub const mobilebackup_error_t_MOBILEBACKUP_E_SUCCESS: mobilebackup_error_t = 0;
pub const mobilebackup_error_t_MOBILEBACKUP_E_INVALID_ARG: mobilebackup_error_t = -1;
pub const mobilebackup_error_t_MOBILEBACKUP_E_PLIST_ERROR: mobilebackup_error_t = -2;
pub const mobilebackup_error_t_MOBILEBACKUP_E_MUX_ERROR: mobilebackup_error_t = -3;
pub const mobilebackup_error_t_MOBILEBACKUP_E_SSL_ERROR: mobilebackup_error_t = -4;
pub const mobilebackup_error_t_MOBILEBACKUP_E_RECEIVE_TIMEOUT: mobilebackup_error_t = -5;
pub const mobilebackup_error_t_MOBILEBACKUP_E_BAD_VERSION: mobilebackup_error_t = -6;
pub const mobilebackup_error_t_MOBILEBACKUP_E_REPLY_NOT_OK: mobilebackup_error_t = -7;
pub const mobilebackup_error_t_MOBILEBACKUP_E_UNKNOWN_ERROR: mobilebackup_error_t = -256;
#[doc = " Error Codes"]
pub type mobilebackup_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mobilebackup_client_private {
    _unused: [u8; 0],
}
pub type mobilebackup_client_t = *mut mobilebackup_client_private;
pub const mobilebackup_flags_t_MB_RESTORE_NOTIFY_SPRINGBOARD: mobilebackup_flags_t = 1;
pub const mobilebackup_flags_t_MB_RESTORE_PRESERVE_SETTINGS: mobilebackup_flags_t = 2;
pub const mobilebackup_flags_t_MB_RESTORE_PRESERVE_CAMERA_ROLL: mobilebackup_flags_t = 4;
pub type mobilebackup_flags_t = ::std::os::raw::c_uint;
extern "C" {
    #[doc = " Connects to the mobilebackup service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "     mobilebackup_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID ARG if one"]
    #[doc = "     or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if"]
    #[doc = "     the mobilebackup version on the device is newer."]
    pub fn mobilebackup_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut mobilebackup_client_t,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Starts a new mobilebackup service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     mobilebackup_client_t upon successful return. Must be freed using"]
    #[doc = "     mobilebackup_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, or an MOBILEBACKUP_E_* error"]
    #[doc = "     code otherwise."]
    pub fn mobilebackup_client_start_service(
        device: idevice_t,
        client: *mut mobilebackup_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Disconnects a mobilebackup client from the device and frees up the"]
    #[doc = " mobilebackup client data."]
    #[doc = ""]
    #[doc = " @param client The mobilebackup client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, or MOBILEBACKUP_E_INVALID_ARG"]
    #[doc = "     if client is NULL."]
    pub fn mobilebackup_client_free(client: mobilebackup_client_t) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Polls the device for mobilebackup data."]
    #[doc = ""]
    #[doc = " @param client The mobilebackup client"]
    #[doc = " @param plist A pointer to the location where the plist should be stored"]
    #[doc = ""]
    #[doc = " @return an error code"]
    pub fn mobilebackup_receive(
        client: mobilebackup_client_t,
        plist: *mut plist_t,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Sends mobilebackup data to the device"]
    #[doc = ""]
    #[doc = " @note This function is low-level and should only be used if you need to send"]
    #[doc = "        a new type of message."]
    #[doc = ""]
    #[doc = " @param client The mobilebackup client"]
    #[doc = " @param plist The location of the plist to send"]
    #[doc = ""]
    #[doc = " @return an error code"]
    pub fn mobilebackup_send(client: mobilebackup_client_t, plist: plist_t)
        -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Request a backup from the connected device."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param backup_manifest The backup manifest, a plist_t of type PLIST_DICT"]
    #[doc = "    containing the backup state of the last backup. For a first-time backup"]
    #[doc = "    set this parameter to NULL."]
    #[doc = " @param base_path The base path on the device to use for the backup"]
    #[doc = "    operation, usually \"/\"."]
    #[doc = " @param proto_version A string denoting the version of the backup protocol"]
    #[doc = "    to use. Latest known version is \"1.6\""]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    one of the parameters is invalid, MOBILEBACKUP_E_PLIST_ERROR if"]
    #[doc = "    backup_manifest is not of type PLIST_DICT, MOBILEBACKUP_E_MUX_ERROR"]
    #[doc = "    if a communication error occurs, MOBILEBACKUP_E_REPLY_NOT_OK"]
    pub fn mobilebackup_request_backup(
        client: mobilebackup_client_t,
        backup_manifest: plist_t,
        base_path: *const ::std::os::raw::c_char,
        proto_version: *const ::std::os::raw::c_char,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Sends a confirmation to the device that a backup file has been received."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    client is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication error"]
    #[doc = "    occurs."]
    pub fn mobilebackup_send_backup_file_received(
        client: mobilebackup_client_t,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Request that a backup should be restored to the connected device."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param backup_manifest The backup manifest, a plist_t of type PLIST_DICT"]
    #[doc = "    containing the backup state to be restored."]
    #[doc = " @param flags Flags to send with the request. Currently this is a combination"]
    #[doc = "    of the following mobilebackup_flags_t:"]
    #[doc = "    MB_RESTORE_NOTIFY_SPRINGBOARD - let SpringBoard show a 'Restore' screen"]
    #[doc = "    MB_RESTORE_PRESERVE_SETTINGS - do not overwrite any settings"]
    #[doc = "    MB_RESTORE_PRESERVE_CAMERA_ROLL - preserve the photos of the camera roll"]
    #[doc = " @param proto_version A string denoting the version of the backup protocol"]
    #[doc = "    to use. Latest known version is \"1.6\". Ideally this value should be"]
    #[doc = "    extracted from the given manifest plist."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    one of the parameters is invalid, MOBILEBACKUP_E_PLIST_ERROR if"]
    #[doc = "    backup_manifest is not of type PLIST_DICT, MOBILEBACKUP_E_MUX_ERROR"]
    #[doc = "    if a communication error occurs, or MOBILEBACKUP_E_REPLY_NOT_OK"]
    #[doc = "    if the device did not accept the request."]
    pub fn mobilebackup_request_restore(
        client: mobilebackup_client_t,
        backup_manifest: plist_t,
        flags: mobilebackup_flags_t,
        proto_version: *const ::std::os::raw::c_char,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Receive a confirmation from the device that it successfully received"]
    #[doc = " a restore file."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param result Pointer to a plist_t that will be set to the received plist"]
    #[doc = "    for further processing. The caller has to free it using plist_free()."]
    #[doc = "    Note that it will be set to NULL if the operation itself fails due to"]
    #[doc = "    a communication or plist error."]
    #[doc = "    If this parameter is NULL, it will be ignored."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    client is invalid, MOBILEBACKUP_E_REPLY_NOT_OK if the expected"]
    #[doc = "    'BackupMessageRestoreFileReceived' message could not be received,"]
    #[doc = "    MOBILEBACKUP_E_PLIST_ERROR if the received message is not a valid backup"]
    #[doc = "    message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error"]
    #[doc = "    occurs."]
    pub fn mobilebackup_receive_restore_file_received(
        client: mobilebackup_client_t,
        result: *mut plist_t,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Receive a confirmation from the device that it successfully received"]
    #[doc = " application data file."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param result Pointer to a plist_t that will be set to the received plist"]
    #[doc = "    for further processing. The caller has to free it using plist_free()."]
    #[doc = "    Note that it will be set to NULL if the operation itself fails due to"]
    #[doc = "    a communication or plist error."]
    #[doc = "    If this parameter is NULL, it will be ignored."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    client is invalid, MOBILEBACKUP_E_REPLY_NOT_OK if the expected"]
    #[doc = "    'BackupMessageRestoreApplicationReceived' message could not be received,"]
    #[doc = "    MOBILEBACKUP_E_PLIST_ERROR if the received message is not a valid backup"]
    #[doc = "    message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error"]
    #[doc = "    occurs."]
    pub fn mobilebackup_receive_restore_application_received(
        client: mobilebackup_client_t,
        result: *mut plist_t,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Tells the device that the restore process is complete and waits for the"]
    #[doc = " device to close the connection. After that, the device should reboot."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    client is invalid, MOBILEBACKUP_E_PLIST_ERROR if the received disconnect"]
    #[doc = "    message plist is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication"]
    #[doc = "    error occurs."]
    pub fn mobilebackup_send_restore_complete(
        client: mobilebackup_client_t,
    ) -> mobilebackup_error_t;
}
extern "C" {
    #[doc = " Sends a backup error message to the device."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param reason A string describing the reason for the error message."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if"]
    #[doc = "    one of the parameters is invalid, or MOBILEBACKUP_E_MUX_ERROR if a"]
    #[doc = "    communication error occurs."]
    pub fn mobilebackup_send_error(
        client: mobilebackup_client_t,
        reason: *const ::std::os::raw::c_char,
    ) -> mobilebackup_error_t;
}
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_SUCCESS: mobilebackup2_error_t = 0;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_INVALID_ARG: mobilebackup2_error_t = -1;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_PLIST_ERROR: mobilebackup2_error_t = -2;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_MUX_ERROR: mobilebackup2_error_t = -3;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_SSL_ERROR: mobilebackup2_error_t = -4;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_RECEIVE_TIMEOUT: mobilebackup2_error_t = -5;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_BAD_VERSION: mobilebackup2_error_t = -6;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_REPLY_NOT_OK: mobilebackup2_error_t = -7;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_NO_COMMON_VERSION: mobilebackup2_error_t = -8;
pub const mobilebackup2_error_t_MOBILEBACKUP2_E_UNKNOWN_ERROR: mobilebackup2_error_t = -256;
#[doc = " Error Codes"]
pub type mobilebackup2_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mobilebackup2_client_private {
    _unused: [u8; 0],
}
pub type mobilebackup2_client_t = *mut mobilebackup2_client_private;
extern "C" {
    #[doc = " Connects to the mobilebackup2 service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "     mobilebackup2_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS on success, MOBILEBACKUP2_E_INVALID ARG"]
    #[doc = "     if one or more parameter is invalid, or MOBILEBACKUP2_E_BAD_VERSION"]
    #[doc = "     if the mobilebackup2 version on the device is newer."]
    pub fn mobilebackup2_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut mobilebackup2_client_t,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Starts a new mobilebackup2 service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     mobilebackup2_client_t upon successful return. Must be freed using"]
    #[doc = "     mobilebackup2_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS on success, or an MOBILEBACKUP2_E_* error"]
    #[doc = "     code otherwise."]
    pub fn mobilebackup2_client_start_service(
        device: idevice_t,
        client: *mut mobilebackup2_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Disconnects a mobilebackup2 client from the device and frees up the"]
    #[doc = " mobilebackup2 client data."]
    #[doc = ""]
    #[doc = " @param client The mobilebackup2 client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS on success, or MOBILEBACKUP2_E_INVALID_ARG"]
    #[doc = "     if client is NULL."]
    pub fn mobilebackup2_client_free(client: mobilebackup2_client_t) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Sends a backup message plist."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param message The message to send. This will be inserted into the request"]
    #[doc = "     plist as value for MessageName. If this parameter is NULL,"]
    #[doc = "     the plist passed in the options parameter will be sent directly."]
    #[doc = " @param options Additional options as PLIST_DICT to add to the request."]
    #[doc = "     The MessageName key with the value passed in the message parameter"]
    #[doc = "     will be inserted into this plist before sending it. This parameter"]
    #[doc = "     can be NULL if message is not NULL."]
    pub fn mobilebackup2_send_message(
        client: mobilebackup2_client_t,
        message: *const ::std::os::raw::c_char,
        options: plist_t,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Receives a DL* message plist from the device."]
    #[doc = " This function is a wrapper around device_link_service_receive_message."]
    #[doc = ""]
    #[doc = " @param client The connected MobileBackup client to use."]
    #[doc = " @param msg_plist Pointer to a plist that will be set to the contents of the"]
    #[doc = "    message plist upon successful return."]
    #[doc = " @param dlmessage A pointer that will be set to a newly allocated char*"]
    #[doc = "     containing the DL* string from the given plist. It is up to the caller"]
    #[doc = "     to free the allocated memory. If this parameter is NULL"]
    #[doc = "     it will be ignored."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS if a DL* message was received,"]
    #[doc = "    MOBILEBACKUP2_E_INVALID_ARG if client or message is invalid,"]
    #[doc = "    MOBILEBACKUP2_E_PLIST_ERROR if the received plist is invalid"]
    #[doc = "    or is not a DL* message plist, or MOBILEBACKUP2_E_MUX_ERROR if"]
    #[doc = "    receiving from the device failed."]
    pub fn mobilebackup2_receive_message(
        client: mobilebackup2_client_t,
        msg_plist: *mut plist_t,
        dlmessage: *mut *mut ::std::os::raw::c_char,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Send binary data to the device."]
    #[doc = ""]
    #[doc = " @note This function returns MOBILEBACKUP2_E_SUCCESS even if less than the"]
    #[doc = "     requested length has been sent. The fourth parameter is required and"]
    #[doc = "     must be checked to ensure if the whole data has been sent."]
    #[doc = ""]
    #[doc = " @param client The MobileBackup client to send to."]
    #[doc = " @param data Pointer to the data to send"]
    #[doc = " @param length Number of bytes to send"]
    #[doc = " @param bytes Number of bytes actually sent"]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS if any data was successfully sent,"]
    #[doc = "     MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid,"]
    #[doc = "     or MOBILEBACKUP2_E_MUX_ERROR if sending of the data failed."]
    pub fn mobilebackup2_send_raw(
        client: mobilebackup2_client_t,
        data: *const ::std::os::raw::c_char,
        length: u32,
        bytes: *mut u32,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Receive binary from the device."]
    #[doc = ""]
    #[doc = " @note This function returns MOBILEBACKUP2_E_SUCCESS even if no data"]
    #[doc = "     has been received (unless a communication error occurred)."]
    #[doc = "     The fourth parameter is required and must be checked to know how"]
    #[doc = "     many bytes were actually received."]
    #[doc = ""]
    #[doc = " @param client The MobileBackup client to receive from."]
    #[doc = " @param data Pointer to a buffer that will be filled with the received data."]
    #[doc = " @param length Number of bytes to receive. The data buffer needs to be large"]
    #[doc = "     enough to store this amount of data."]
    #[doc = " @paran bytes Number of bytes actually received."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS if any or no data was received,"]
    #[doc = "     MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid,"]
    #[doc = "     or MOBILEBACKUP2_E_MUX_ERROR if receiving the data failed."]
    pub fn mobilebackup2_receive_raw(
        client: mobilebackup2_client_t,
        data: *mut ::std::os::raw::c_char,
        length: u32,
        bytes: *mut u32,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Performs the mobilebackup2 protocol version exchange."]
    #[doc = ""]
    #[doc = " @param client The MobileBackup client to use."]
    #[doc = " @param local_versions An array of supported versions to send to the remote."]
    #[doc = " @param count The number of items in local_versions."]
    #[doc = " @param remote_version Holds the protocol version of the remote on success."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS on success, or a MOBILEBACKUP2_E_* error"]
    #[doc = "     code otherwise."]
    pub fn mobilebackup2_version_exchange(
        client: mobilebackup2_client_t,
        local_versions: *mut f64,
        count: ::std::os::raw::c_char,
        remote_version: *mut f64,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Send a request to the connected mobilebackup2 service."]
    #[doc = ""]
    #[doc = " @param client"]
    #[doc = " @param request The request to send to the backup service."]
    #[doc = "     Currently, this is one of \"Backup\", \"Restore\", \"Info\", or \"List\"."]
    #[doc = " @param target_identifier UDID of the target device."]
    #[doc = " @param source_identifier UDID of backup data?"]
    #[doc = " @param options Additional options in a plist of type PLIST_DICT."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS if the request was successfully sent,"]
    #[doc = "     or a MOBILEBACKUP2_E_* error value otherwise."]
    pub fn mobilebackup2_send_request(
        client: mobilebackup2_client_t,
        request: *const ::std::os::raw::c_char,
        target_identifier: *const ::std::os::raw::c_char,
        source_identifier: *const ::std::os::raw::c_char,
        options: plist_t,
    ) -> mobilebackup2_error_t;
}
extern "C" {
    #[doc = " Sends a DLMessageStatusResponse to the device."]
    #[doc = ""]
    #[doc = " @param client The MobileBackup client to use."]
    #[doc = " @param status_code The status code to send."]
    #[doc = " @param status1 A status message to send. Can be NULL if not required."]
    #[doc = " @param status2 An additional status plist to attach to the response."]
    #[doc = "     Can be NULL if not required."]
    #[doc = ""]
    #[doc = " @return MOBILEBACKUP2_E_SUCCESS on success, MOBILEBACKUP2_E_INVALID_ARG"]
    #[doc = "     if client is invalid, or another MOBILEBACKUP2_E_* otherwise."]
    pub fn mobilebackup2_send_status_response(
        client: mobilebackup2_client_t,
        status_code: ::std::os::raw::c_int,
        status1: *const ::std::os::raw::c_char,
        status2: plist_t,
    ) -> mobilebackup2_error_t;
}
pub const mobilesync_error_t_MOBILESYNC_E_SUCCESS: mobilesync_error_t = 0;
pub const mobilesync_error_t_MOBILESYNC_E_INVALID_ARG: mobilesync_error_t = -1;
pub const mobilesync_error_t_MOBILESYNC_E_PLIST_ERROR: mobilesync_error_t = -2;
pub const mobilesync_error_t_MOBILESYNC_E_MUX_ERROR: mobilesync_error_t = -3;
pub const mobilesync_error_t_MOBILESYNC_E_SSL_ERROR: mobilesync_error_t = -4;
pub const mobilesync_error_t_MOBILESYNC_E_RECEIVE_TIMEOUT: mobilesync_error_t = -5;
pub const mobilesync_error_t_MOBILESYNC_E_BAD_VERSION: mobilesync_error_t = -6;
pub const mobilesync_error_t_MOBILESYNC_E_SYNC_REFUSED: mobilesync_error_t = -7;
pub const mobilesync_error_t_MOBILESYNC_E_CANCELLED: mobilesync_error_t = -8;
pub const mobilesync_error_t_MOBILESYNC_E_WRONG_DIRECTION: mobilesync_error_t = -9;
pub const mobilesync_error_t_MOBILESYNC_E_NOT_READY: mobilesync_error_t = -10;
pub const mobilesync_error_t_MOBILESYNC_E_UNKNOWN_ERROR: mobilesync_error_t = -256;
#[doc = " Error Codes"]
pub type mobilesync_error_t = ::std::os::raw::c_int;
#[doc = "< Fast-sync requires that only the changes made since the last synchronization should be reported by the computer."]
pub const mobilesync_sync_type_t_MOBILESYNC_SYNC_TYPE_FAST: mobilesync_sync_type_t = 0;
#[doc = "< Slow-sync requires that all data from the computer needs to be synchronized/sent."]
pub const mobilesync_sync_type_t_MOBILESYNC_SYNC_TYPE_SLOW: mobilesync_sync_type_t = 1;
#[doc = "< Reset-sync signals that the computer should send all data again."]
pub const mobilesync_sync_type_t_MOBILESYNC_SYNC_TYPE_RESET: mobilesync_sync_type_t = 2;
#[doc = " The sync type of the current sync session."]
pub type mobilesync_sync_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mobilesync_client_private {
    _unused: [u8; 0],
}
pub type mobilesync_client_t = *mut mobilesync_client_private;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mobilesync_anchors {
    pub device_anchor: *mut ::std::os::raw::c_char,
    pub computer_anchor: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_mobilesync_anchors() {
    assert_eq!(
        ::std::mem::size_of::<mobilesync_anchors>(),
        16usize,
        concat!("Size of: ", stringify!(mobilesync_anchors))
    );
    assert_eq!(
        ::std::mem::align_of::<mobilesync_anchors>(),
        8usize,
        concat!("Alignment of ", stringify!(mobilesync_anchors))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<mobilesync_anchors>())).device_anchor as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(mobilesync_anchors),
            "::",
            stringify!(device_anchor)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<mobilesync_anchors>())).computer_anchor as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(mobilesync_anchors),
            "::",
            stringify!(computer_anchor)
        )
    );
}
pub type mobilesync_anchors_t = *mut mobilesync_anchors;
extern "C" {
    #[doc = " Connects to the mobilesync service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "     #mobilesync_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one or more parameters are invalid"]
    #[doc = " @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on"]
    #[doc = " the device is newer."]
    pub fn mobilesync_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut mobilesync_client_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Starts a new mobilesync service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     mobilesync_client_t upon successful return. Must be freed using"]
    #[doc = "     mobilesync_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return MOBILESYNC_E_SUCCESS on success, or an MOBILESYNC_E_* error"]
    #[doc = "     code otherwise."]
    pub fn mobilesync_client_start_service(
        device: idevice_t,
        client: *mut mobilesync_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Disconnects a mobilesync client from the device and frees up the"]
    #[doc = " mobilesync client data."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client to disconnect and free."]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if \\a client is NULL."]
    pub fn mobilesync_client_free(client: mobilesync_client_t) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Polls the device for mobilesync data."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param plist A pointer to the location where the plist should be stored"]
    #[doc = ""]
    #[doc = " @return an error code"]
    pub fn mobilesync_receive(
        client: mobilesync_client_t,
        plist: *mut plist_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Sends mobilesync data to the device"]
    #[doc = ""]
    #[doc = " @note This function is low-level and should only be used if you need to send"]
    #[doc = "        a new type of message."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param plist The location of the plist to send"]
    #[doc = ""]
    #[doc = " @return an error code"]
    pub fn mobilesync_send(client: mobilesync_client_t, plist: plist_t) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Requests starting synchronization of a data class with the device"]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param data_class The data class identifier to sync"]
    #[doc = " @param anchors The anchors required to exchange with the device. The anchors"]
    #[doc = "   allow the device to tell if the synchronization information on the computer"]
    #[doc = "   and device are consistent to determine what sync type is required."]
    #[doc = " @param computer_data_class_version The version of the data class storage on the computer"]
    #[doc = " @param sync_type A pointer to store the sync type reported by the device_anchor"]
    #[doc = " @param device_data_class_version The version of the data class storage on the device"]
    #[doc = " @param error_description A pointer to store an error message if reported by the device"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    #[doc = " @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form"]
    #[doc = " @retval MOBILESYNC_E_SYNC_REFUSED if the device refused to sync"]
    #[doc = " @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the"]
    #[doc = " sync request"]
    pub fn mobilesync_start(
        client: mobilesync_client_t,
        data_class: *const ::std::os::raw::c_char,
        anchors: mobilesync_anchors_t,
        computer_data_class_version: u64,
        sync_type: *mut mobilesync_sync_type_t,
        device_data_class_version: *mut u64,
        error_description: *mut *mut ::std::os::raw::c_char,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Cancels a running synchronization session with a device at any time."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param reason The reason to supply to the device for cancelling"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    pub fn mobilesync_cancel(
        client: mobilesync_client_t,
        reason: *const ::std::os::raw::c_char,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Finish a synchronization session of a data class on the device."]
    #[doc = " A session must have previously been started using mobilesync_start()."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    #[doc = " @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid"]
    #[doc = " form"]
    pub fn mobilesync_finish(client: mobilesync_client_t) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Requests to receive all records of the currently set data class from the device."]
    #[doc = " The actually changes are retrieved using mobilesync_receive_changes() after this"]
    #[doc = " request has been successful."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    pub fn mobilesync_get_all_records_from_device(
        client: mobilesync_client_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Requests to receive only changed records of the currently set data class from the device."]
    #[doc = " The actually changes are retrieved using mobilesync_receive_changes() after this"]
    #[doc = " request has been successful."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    pub fn mobilesync_get_changes_from_device(client: mobilesync_client_t) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Requests the device to delete all records of the current data class"]
    #[doc = ""]
    #[doc = " @note The operation must be called after starting synchronization."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    #[doc = " @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form"]
    pub fn mobilesync_clear_all_records_on_device(
        client: mobilesync_client_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Receives changed entitites of the currently set data class from the device"]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param entities A pointer to store the changed entity records as a PLIST_DICT"]
    #[doc = " @param is_last_record A pointer to store a flag indicating if this submission is the last one"]
    #[doc = " @param actions A pointer to additional flags the device is sending or NULL to ignore"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    #[doc = " @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the"]
    #[doc = " session"]
    pub fn mobilesync_receive_changes(
        client: mobilesync_client_t,
        entities: *mut plist_t,
        is_last_record: *mut u8,
        actions: *mut plist_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Acknowledges to the device that the changes have been merged on the computer"]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    pub fn mobilesync_acknowledge_changes_from_device(
        client: mobilesync_client_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Verifies if the device is ready to receive changes from the computer."]
    #[doc = " This call changes the synchronization direction so that mobilesync_send_changes()"]
    #[doc = " can be used to send changes to the device."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    #[doc = " @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form"]
    #[doc = " @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does"]
    #[doc = " not permit this call"]
    #[doc = " @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the"]
    #[doc = " session"]
    #[doc = " @retval MOBILESYNC_E_NOT_READY if the device is not ready to start"]
    #[doc = " receiving any changes"]
    pub fn mobilesync_ready_to_send_changes_from_computer(
        client: mobilesync_client_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Sends changed entities of the currently set data class to the device"]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param entities The changed entity records as a PLIST_DICT"]
    #[doc = " @param is_last_record A flag indicating if this submission is the last one"]
    #[doc = " @param actions Additional actions for the device created with mobilesync_actions_new()"]
    #[doc = "    or NULL if no actions should be passed"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid,"]
    #[doc = " @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does"]
    #[doc = " not permit this call"]
    pub fn mobilesync_send_changes(
        client: mobilesync_client_t,
        entities: plist_t,
        is_last_record: u8,
        actions: plist_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Receives any remapped identifiers reported after the device merged submitted changes."]
    #[doc = ""]
    #[doc = " @param client The mobilesync client"]
    #[doc = " @param mapping A pointer to an array plist containing a dict of identifier remappings"]
    #[doc = ""]
    #[doc = " @retval MOBILESYNC_E_SUCCESS on success"]
    #[doc = " @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid"]
    #[doc = " @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid"]
    #[doc = " form"]
    #[doc = " @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does"]
    #[doc = " not permit this call"]
    #[doc = " @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the"]
    #[doc = " session"]
    pub fn mobilesync_remap_identifiers(
        client: mobilesync_client_t,
        mapping: *mut plist_t,
    ) -> mobilesync_error_t;
}
extern "C" {
    #[doc = " Allocates memory for a new anchors struct initialized with the passed anchors."]
    #[doc = ""]
    #[doc = " @param device_anchor An anchor the device reported the last time or NULL"]
    #[doc = "   if none is known yet which for instance is true on first synchronization."]
    #[doc = " @param computer_anchor An arbitrary string to use as anchor for the computer."]
    #[doc = ""]
    #[doc = " @return A new #mobilesync_anchors_t struct. Must be freed using mobilesync_anchors_free()."]
    pub fn mobilesync_anchors_new(
        device_anchor: *const ::std::os::raw::c_char,
        computer_anchor: *const ::std::os::raw::c_char,
    ) -> mobilesync_anchors_t;
}
extern "C" {
    #[doc = " Free memory used by anchors."]
    #[doc = ""]
    #[doc = " @param anchors The anchors to free."]
    pub fn mobilesync_anchors_free(anchors: mobilesync_anchors_t);
}
extern "C" {
    #[doc = " Create a new actions plist to use in mobilesync_send_changes()."]
    #[doc = ""]
    #[doc = " @return A new plist_t of type PLIST_DICT."]
    pub fn mobilesync_actions_new() -> plist_t;
}
extern "C" {
    #[doc = " Add one or more new key:value pairs to the given actions plist."]
    #[doc = ""]
    #[doc = " @param actions The actions to modify."]
    #[doc = " @param ... KEY, VALUE, [KEY, VALUE], NULL"]
    #[doc = ""]
    #[doc = " @note The known keys so far are \"SyncDeviceLinkEntityNamesKey\" which expects"]
    #[doc = "       an array of entity names, followed by a count paramter as well as"]
    #[doc = "       \"SyncDeviceLinkAllRecordsOfPulledEntityTypeSentKey\" which expects an"]
    #[doc = "       integer to use as a boolean value indicating that the device should"]
    #[doc = "       link submitted changes and report remapped identifiers."]
    pub fn mobilesync_actions_add(actions: plist_t, ...);
}
extern "C" {
    #[doc = " Free actions plist."]
    #[doc = ""]
    #[doc = " @param actions The actions plist to free. Does nothing if NULL is passed."]
    pub fn mobilesync_actions_free(actions: plist_t);
}
pub const np_error_t_NP_E_SUCCESS: np_error_t = 0;
pub const np_error_t_NP_E_INVALID_ARG: np_error_t = -1;
pub const np_error_t_NP_E_PLIST_ERROR: np_error_t = -2;
pub const np_error_t_NP_E_CONN_FAILED: np_error_t = -3;
pub const np_error_t_NP_E_UNKNOWN_ERROR: np_error_t = -256;
#[doc = " Error Codes"]
pub type np_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct np_client_private {
    _unused: [u8; 0],
}
pub type np_client_t = *mut np_client_private;
#[doc = " Reports which notification was received."]
pub type np_notify_cb_t = ::std::option::Option<
    unsafe extern "C" fn(
        notification: *const ::std::os::raw::c_char,
        user_data: *mut ::std::os::raw::c_void,
    ),
>;
extern "C" {
    #[doc = " Connects to the notification_proxy on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated np_client_t"]
    #[doc = "    upon successful return."]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when device is NULL,"]
    #[doc = "   or NP_E_CONN_FAILED when the connection to the device could not be"]
    #[doc = "   established."]
    pub fn np_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut np_client_t,
    ) -> np_error_t;
}
extern "C" {
    #[doc = " Starts a new notification proxy service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     np_client_t upon successful return. Must be freed using"]
    #[doc = "     np_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS on success, or an NP_E_* error"]
    #[doc = "     code otherwise."]
    pub fn np_client_start_service(
        device: idevice_t,
        client: *mut np_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> np_error_t;
}
extern "C" {
    #[doc = " Disconnects a notification_proxy client from the device and frees up the"]
    #[doc = " notification_proxy client data."]
    #[doc = ""]
    #[doc = " @param client The notification_proxy client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS on success, or NP_E_INVALID_ARG when client is NULL."]
    pub fn np_client_free(client: np_client_t) -> np_error_t;
}
extern "C" {
    #[doc = " Sends a notification to the device's notification_proxy."]
    #[doc = ""]
    #[doc = " @param client The client to send to"]
    #[doc = " @param notification The notification message to send"]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS on success, or an error returned by np_plist_send"]
    pub fn np_post_notification(
        client: np_client_t,
        notification: *const ::std::os::raw::c_char,
    ) -> np_error_t;
}
extern "C" {
    #[doc = " Tells the device to send a notification on the specified event."]
    #[doc = ""]
    #[doc = " @param client The client to send to"]
    #[doc = " @param notification The notifications that should be observed."]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client or"]
    #[doc = "    notification are NULL, or an error returned by np_plist_send."]
    pub fn np_observe_notification(
        client: np_client_t,
        notification: *const ::std::os::raw::c_char,
    ) -> np_error_t;
}
extern "C" {
    #[doc = " Tells the device to send a notification on specified events."]
    #[doc = ""]
    #[doc = " @param client The client to send to"]
    #[doc = " @param notification_spec Specification of the notifications that should be"]
    #[doc = "  observed. This is expected to be an array of const char* that MUST have a"]
    #[doc = "  terminating NULL entry."]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null,"]
    #[doc = "   or an error returned by np_observe_notification."]
    pub fn np_observe_notifications(
        client: np_client_t,
        notification_spec: *mut *const ::std::os::raw::c_char,
    ) -> np_error_t;
}
extern "C" {
    #[doc = " This function allows an application to define a callback function that will"]
    #[doc = " be called when a notification has been received."]
    #[doc = " It will start a thread that polls for notifications and calls the callback"]
    #[doc = " function if a notification has been received."]
    #[doc = " In case of an error condition when polling for notifications - e.g. device"]
    #[doc = " disconnect - the thread will call the callback function with an empty"]
    #[doc = " notification \"\" and terminate itself."]
    #[doc = ""]
    #[doc = " @param client the NP client"]
    #[doc = " @param notify_cb pointer to a callback function or NULL to de-register a"]
    #[doc = "        previously set callback function."]
    #[doc = " @param user_data Pointer that will be passed to the callback function as"]
    #[doc = "        user data. If notify_cb is NULL, this parameter is ignored."]
    #[doc = ""]
    #[doc = " @note Only one callback function can be registered at the same time;"]
    #[doc = "       any previously set callback function will be removed automatically."]
    #[doc = ""]
    #[doc = " @return NP_E_SUCCESS when the callback was successfully registered,"]
    #[doc = "         NP_E_INVALID_ARG when client is NULL, or NP_E_UNKNOWN_ERROR when"]
    #[doc = "         the callback thread could no be created."]
    pub fn np_set_notify_callback(
        client: np_client_t,
        notify_cb: np_notify_cb_t,
        userdata: *mut ::std::os::raw::c_void,
    ) -> np_error_t;
}
pub const preboard_error_t_PREBOARD_E_SUCCESS: preboard_error_t = 0;
pub const preboard_error_t_PREBOARD_E_INVALID_ARG: preboard_error_t = -1;
pub const preboard_error_t_PREBOARD_E_PLIST_ERROR: preboard_error_t = -2;
pub const preboard_error_t_PREBOARD_E_MUX_ERROR: preboard_error_t = -3;
pub const preboard_error_t_PREBOARD_E_SSL_ERROR: preboard_error_t = -4;
pub const preboard_error_t_PREBOARD_E_NOT_ENOUGH_DATA: preboard_error_t = -5;
pub const preboard_error_t_PREBOARD_E_TIMEOUT: preboard_error_t = -6;
pub const preboard_error_t_PREBOARD_E_OP_IN_PROGRESS: preboard_error_t = -10;
pub const preboard_error_t_PREBOARD_E_UNKNOWN_ERROR: preboard_error_t = -256;
#[doc = " Error Codes"]
pub type preboard_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct preboard_client_private {
    _unused: [u8; 0],
}
pub type preboard_client_t = *mut preboard_client_private;
#[doc = " Reports the status response of the given command"]
pub type preboard_status_cb_t = ::std::option::Option<
    unsafe extern "C" fn(message: plist_t, user_data: *mut ::std::os::raw::c_void),
>;
extern "C" {
    #[doc = " Connects to the preboard service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     preboard_client_t upon successful return. Must be freed using"]
    #[doc = "     preboard_client_free() after use."]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an PREBOARD_E_* error code otherwise."]
    pub fn preboard_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut preboard_client_t,
    ) -> preboard_error_t;
}
extern "C" {
    #[doc = " Starts a new preboard service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     preboard_client_t upon successful return. Must be freed using"]
    #[doc = "     preboard_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS on success, or a PREBOARD_E_* error"]
    #[doc = "     code otherwise."]
    pub fn preboard_client_start_service(
        device: idevice_t,
        client: *mut preboard_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> preboard_error_t;
}
extern "C" {
    #[doc = " Disconnects a preboard client from the device and frees up the"]
    #[doc = " preboard client data."]
    #[doc = ""]
    #[doc = " @param client The preboard client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or a PREBOARD_E_* error code otherwise."]
    pub fn preboard_client_free(client: preboard_client_t) -> preboard_error_t;
}
extern "C" {
    #[doc = " Sends a plist to the service."]
    #[doc = ""]
    #[doc = " @param client The preboard client"]
    #[doc = " @param plist The plist to send"]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS on success,"]
    #[doc = "  PREBOARD_E_INVALID_ARG when client or plist is NULL,"]
    #[doc = "  or a PREBOARD_E_* error code on error"]
    pub fn preboard_send(client: preboard_client_t, plist: plist_t) -> preboard_error_t;
}
extern "C" {
    #[doc = " Receives a plist from the service."]
    #[doc = ""]
    #[doc = " @param client The preboard client"]
    #[doc = " @param plist Pointer to a plist_t what will be set to the received plist"]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS on success,"]
    #[doc = "  PREBOARD_E_INVALID_ARG when client or plist is NULL,"]
    #[doc = "  PREBOARD_E_TIMEOUT when no data was received after 5 seconds,"]
    #[doc = "  or a PREBOARD_E_* error code on error"]
    pub fn preboard_receive(client: preboard_client_t, plist: *mut plist_t) -> preboard_error_t;
}
extern "C" {
    #[doc = " Receives a plist from the service with the specified timeout."]
    #[doc = ""]
    #[doc = " @param client The preboard client"]
    #[doc = " @param plist Pointer to a plist_t what will be set to the received plist"]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS on success,"]
    #[doc = "  PREBOARD_E_INVALID_ARG when client or plist is NULL,"]
    #[doc = "  PREBOARD_E_TIMEOUT when no data was received after the given timeout,"]
    #[doc = "  or a PREBOARD_E_* error code on error."]
    pub fn preboard_receive_with_timeout(
        client: preboard_client_t,
        plist: *mut plist_t,
        timeout_ms: u32,
    ) -> preboard_error_t;
}
extern "C" {
    #[doc = " Tells the preboard service to create a stashbag. This will make the device"]
    #[doc = " show a passcode entry so it can generate and store a token that is later"]
    #[doc = " used during restore."]
    #[doc = ""]
    #[doc = " @param client The preboard client"]
    #[doc = " @param manifest An optional manifest"]
    #[doc = " @param status_cb Callback function that will receive status and error messages."]
    #[doc = "   Can be NULL if you want to handle receiving messages in your own code."]
    #[doc = " @param user_data User data for callback function or NULL."]
    #[doc = ""]
    #[doc = " The callback or following preboard_receive* invocations will usually"]
    #[doc = " receive a dictionary with:"]
    #[doc = "     { ShowDialog: true }"]
    #[doc = " If the user does not enter a passcode, after 2 minutes a timeout is reached"]
    #[doc = " and the device sends a dictionary with:"]
    #[doc = "     { Timeout: true }"]
    #[doc = "     followed by { HideDialog: true }"]
    #[doc = " If the user aborts the passcode entry, the device sends a dictionary:"]
    #[doc = "     { Error: 1, ErrorString: <error string> }"]
    #[doc = "     followed by { HideDialog: true }"]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS if the command was successfully submitted,"]
    #[doc = "  PREBOARD_E_INVALID_ARG when client is invalid,"]
    #[doc = "  or a PREBOARD_E_* error code on error."]
    pub fn preboard_create_stashbag(
        client: preboard_client_t,
        manifest: plist_t,
        status_cb: preboard_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> preboard_error_t;
}
extern "C" {
    #[doc = " Instructs the preboard service to commit a previously created stashbag."]
    #[doc = ""]
    #[doc = " @param client The preboard client to use for receiving"]
    #[doc = " @param manifest An optional manifest"]
    #[doc = " @param status_cb Callback function that will receive status and error messages"]
    #[doc = "   Can be NULL if you want to handle receiving messages in your own code."]
    #[doc = " @param user_data User data for callback function or NULL."]
    #[doc = ""]
    #[doc = " The callback or following preboard_receive* invocations will usually"]
    #[doc = " receive a dictionary with:"]
    #[doc = "     { StashbagCommitComplete: true }"]
    #[doc = " or in case of an error:"]
    #[doc = "     { StashbagCommitComplete: 0, Error: 1, <optional> ErrorString: <error string> }"]
    #[doc = ""]
    #[doc = " @return PREBOARD_E_SUCCESS if the command was successfully submitted,"]
    #[doc = "  PREBOARD_E_INVALID_ARG when client is invalid,"]
    #[doc = "  or a PREBOARD_E_* error code on error."]
    pub fn preboard_commit_stashbag(
        client: preboard_client_t,
        manifest: plist_t,
        status_cb: preboard_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> preboard_error_t;
}
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_SUCCESS:
    property_list_service_error_t = 0;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_INVALID_ARG:
    property_list_service_error_t = -1;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_PLIST_ERROR:
    property_list_service_error_t = -2;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_MUX_ERROR:
    property_list_service_error_t = -3;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_SSL_ERROR:
    property_list_service_error_t = -4;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT:
    property_list_service_error_t = -5;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_NOT_ENOUGH_DATA:
    property_list_service_error_t = -6;
pub const property_list_service_error_t_PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR:
    property_list_service_error_t = -256;
pub type property_list_service_error_t = ::std::os::raw::c_int;
pub type property_list_service_private = property_list_service_client_private;
pub type property_list_service_client_t = *mut property_list_service_private;
extern "C" {
    #[doc = " Creates a new property list service for the specified port."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "     property_list_service_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "     PROPERTY_LIST_SERVICE_E_INVALID_ARG when one of the arguments is invalid,"]
    #[doc = "     or PROPERTY_LIST_SERVICE_E_MUX_ERROR when connecting to the device failed."]
    pub fn property_list_service_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut property_list_service_client_t,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Frees a PropertyList service."]
    #[doc = ""]
    #[doc = " @param client The property list service to free."]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "     PROPERTY_LIST_SERVICE_E_INVALID_ARG when client is invalid, or a"]
    #[doc = "     PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when another error occurred."]
    pub fn property_list_service_client_free(
        client: property_list_service_client_t,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Sends an XML plist."]
    #[doc = ""]
    #[doc = " @param client The property list service client to use for sending."]
    #[doc = " @param plist plist to send"]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist,"]
    #[doc = "      or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs."]
    pub fn property_list_service_send_xml_plist(
        client: property_list_service_client_t,
        plist: plist_t,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Sends a binary plist."]
    #[doc = ""]
    #[doc = " @param client The property list service client to use for sending."]
    #[doc = " @param plist plist to send"]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist,"]
    #[doc = "      or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs."]
    pub fn property_list_service_send_binary_plist(
        client: property_list_service_client_t,
        plist: plist_t,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Receives a plist using the given property list service client with specified"]
    #[doc = " timeout."]
    #[doc = " Binary or XML plists are automatically handled."]
    #[doc = ""]
    #[doc = " @param client The property list service client to use for receiving"]
    #[doc = " @param plist pointer to a plist_t that will point to the received plist"]
    #[doc = "              upon successful return"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_INVALID_ARG when connection or *plist is NULL,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be"]
    #[doc = "      converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a"]
    #[doc = "      communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when"]
    #[doc = "      an unspecified error occurs."]
    pub fn property_list_service_receive_plist_with_timeout(
        client: property_list_service_client_t,
        plist: *mut plist_t,
        timeout: ::std::os::raw::c_uint,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Receives a plist using the given property list service client."]
    #[doc = " Binary or XML plists are automatically handled."]
    #[doc = ""]
    #[doc = " This function is like property_list_service_receive_plist_with_timeout"]
    #[doc = "   using a timeout of 10 seconds."]
    #[doc = " @see property_list_service_receive_plist_with_timeout"]
    #[doc = ""]
    #[doc = " @param client The property list service client to use for receiving"]
    #[doc = " @param plist pointer to a plist_t that will point to the received plist"]
    #[doc = "      upon successful return"]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or *plist is NULL,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_NOT_ENOUGH_DATA when not enough data"]
    #[doc = "      received, PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT when the connection times out,"]
    #[doc = "      PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be"]
    #[doc = "      converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a"]
    #[doc = "      communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when"]
    #[doc = "      an unspecified error occurs."]
    pub fn property_list_service_receive_plist(
        client: property_list_service_client_t,
        plist: *mut plist_t,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Enable SSL for the given property list service client."]
    #[doc = ""]
    #[doc = " @param client The connected property list service client for which SSL"]
    #[doc = "     should be enabled."]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "     PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is"]
    #[doc = "     NULL, PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled,"]
    #[doc = "     or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise."]
    pub fn property_list_service_enable_ssl(
        client: property_list_service_client_t,
    ) -> property_list_service_error_t;
}
extern "C" {
    #[doc = " Disable SSL for the given property list service client."]
    #[doc = ""]
    #[doc = " @param client The connected property list service client for which SSL"]
    #[doc = "     should be disabled."]
    #[doc = ""]
    #[doc = " @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,"]
    #[doc = "     PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is"]
    #[doc = "     NULL, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise."]
    pub fn property_list_service_disable_ssl(
        client: property_list_service_client_t,
    ) -> property_list_service_error_t;
}
pub const restored_error_t_RESTORE_E_SUCCESS: restored_error_t = 0;
pub const restored_error_t_RESTORE_E_INVALID_ARG: restored_error_t = -1;
pub const restored_error_t_RESTORE_E_PLIST_ERROR: restored_error_t = -2;
pub const restored_error_t_RESTORE_E_MUX_ERROR: restored_error_t = -3;
pub const restored_error_t_RESTORE_E_NOT_ENOUGH_DATA: restored_error_t = -4;
pub const restored_error_t_RESTORE_E_RECEIVE_TIMEOUT: restored_error_t = -5;
pub const restored_error_t_RESTORE_E_UNKNOWN_ERROR: restored_error_t = -256;
#[doc = " Error Codes"]
pub type restored_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct restored_client_private {
    _unused: [u8; 0],
}
pub type restored_client_t = *mut restored_client_private;
extern "C" {
    #[doc = " Creates a new restored client for the device."]
    #[doc = ""]
    #[doc = " @param device The device to create a restored client for"]
    #[doc = " @param client The pointer to the location of the new restored_client"]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL"]
    pub fn restored_client_new(
        device: idevice_t,
        client: *mut restored_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> restored_error_t;
}
extern "C" {
    #[doc = " Closes the restored client session if one is running and frees up the"]
    #[doc = " restored_client struct."]
    #[doc = ""]
    #[doc = " @param client The restore client"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL"]
    pub fn restored_client_free(client: restored_client_t) -> restored_error_t;
}
extern "C" {
    #[doc = " Query the type of the service daemon. Depending on whether the device is"]
    #[doc = " queried in normal mode or restore mode, different types will be returned."]
    #[doc = ""]
    #[doc = " @param client The restored client"]
    #[doc = " @param type The type returned by the service daemon. Pass NULL to ignore."]
    #[doc = " @param version The restore protocol version. Pass NULL to ignore."]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL"]
    pub fn restored_query_type(
        client: restored_client_t,
        type_: *mut *mut ::std::os::raw::c_char,
        version: *mut u64,
    ) -> restored_error_t;
}
extern "C" {
    #[doc = " Queries a value from the device specified by a key."]
    #[doc = ""]
    #[doc = " @param client An initialized restored client."]
    #[doc = " @param key The key name to request"]
    #[doc = " @param value A plist node representing the result value node"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL, RESTORE_E_PLIST_ERROR if value for key can't be found"]
    pub fn restored_query_value(
        client: restored_client_t,
        key: *const ::std::os::raw::c_char,
        value: *mut plist_t,
    ) -> restored_error_t;
}
extern "C" {
    #[doc = " Retrieves a value from information plist specified by a key."]
    #[doc = ""]
    #[doc = " @param client An initialized restored client."]
    #[doc = " @param key The key name to request or NULL to query for all keys"]
    #[doc = " @param value A plist node representing the result value node"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL, RESTORE_E_PLIST_ERROR if value for key can't be found"]
    pub fn restored_get_value(
        client: restored_client_t,
        key: *const ::std::os::raw::c_char,
        value: *mut plist_t,
    ) -> restored_error_t;
}
extern "C" {
    #[doc = " Sends a plist to restored."]
    #[doc = ""]
    #[doc = " @note This function is low-level and should only be used if you need to send"]
    #[doc = "        a new type of message."]
    #[doc = ""]
    #[doc = " @param client The restored client"]
    #[doc = " @param plist The plist to send"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or"]
    #[doc = "  plist is NULL"]
    pub fn restored_send(client: restored_client_t, plist: plist_t) -> restored_error_t;
}
extern "C" {
    #[doc = " Receives a plist from restored."]
    #[doc = ""]
    #[doc = " @param client The restored client"]
    #[doc = " @param plist The plist to store the received data"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or"]
    #[doc = "  plist is NULL"]
    pub fn restored_receive(client: restored_client_t, plist: *mut plist_t) -> restored_error_t;
}
extern "C" {
    #[doc = " Sends the Goodbye request to restored signaling the end of communication."]
    #[doc = ""]
    #[doc = " @param client The restore client"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL,"]
    #[doc = "  RESTORE_E_PLIST_ERROR if the device did not acknowledge the request"]
    pub fn restored_goodbye(client: restored_client_t) -> restored_error_t;
}
extern "C" {
    #[doc = " Requests to start a restore and retrieve it's port on success."]
    #[doc = ""]
    #[doc = " @param client The restored client"]
    #[doc = " @param options PLIST_DICT with options for the restore process or NULL"]
    #[doc = " @param version the restore protocol version, see restored_query_type()"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter"]
    #[doc = "  is NULL, RESTORE_E_START_RESTORE_FAILED if the request fails"]
    pub fn restored_start_restore(
        client: restored_client_t,
        options: plist_t,
        version: u64,
    ) -> restored_error_t;
}
extern "C" {
    #[doc = " Requests device to reboot."]
    #[doc = ""]
    #[doc = " @param client The restored client"]
    #[doc = ""]
    #[doc = " @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter"]
    #[doc = "  is NULL"]
    pub fn restored_reboot(client: restored_client_t) -> restored_error_t;
}
extern "C" {
    #[doc = " Sets the label to send for requests to restored."]
    #[doc = ""]
    #[doc = " @param client The restore client"]
    #[doc = " @param label The label to set or NULL to disable sending a label"]
    #[doc = ""]
    pub fn restored_client_set_label(
        client: restored_client_t,
        label: *const ::std::os::raw::c_char,
    );
}
pub const reverse_proxy_error_t_REVERSE_PROXY_E_SUCCESS: reverse_proxy_error_t = 0;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_INVALID_ARG: reverse_proxy_error_t = -1;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_PLIST_ERROR: reverse_proxy_error_t = -2;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_MUX_ERROR: reverse_proxy_error_t = -3;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_SSL_ERROR: reverse_proxy_error_t = -4;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_NOT_ENOUGH_DATA: reverse_proxy_error_t = -5;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_TIMEOUT: reverse_proxy_error_t = -6;
pub const reverse_proxy_error_t_REVERSE_PROXY_E_UNKNOWN_ERROR: reverse_proxy_error_t = -256;
#[doc = " Error Codes"]
pub type reverse_proxy_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct reverse_proxy_client_private {
    _unused: [u8; 0],
}
pub type reverse_proxy_client_t = *mut reverse_proxy_client_private;
#[doc = "< control connection"]
pub const reverse_proxy_client_type_t_RP_TYPE_CTRL: reverse_proxy_client_type_t = 1;
#[doc = "< proxy connection"]
pub const reverse_proxy_client_type_t_RP_TYPE_CONN: reverse_proxy_client_type_t = 2;
pub type reverse_proxy_client_type_t = ::std::os::raw::c_uint;
#[doc = "< proxy is ready"]
pub const reverse_proxy_status_t_RP_STATUS_READY: reverse_proxy_status_t = 1;
#[doc = "< proxy terminated"]
pub const reverse_proxy_status_t_RP_STATUS_TERMINATE: reverse_proxy_status_t = 2;
#[doc = "< connection request received (only RP_TYPE_CTRL)"]
pub const reverse_proxy_status_t_RP_STATUS_CONNECT_REQ: reverse_proxy_status_t = 3;
#[doc = "< shutdown request received (only RP_TYPE_CTRL)"]
pub const reverse_proxy_status_t_RP_STATUS_SHUTDOWN_REQ: reverse_proxy_status_t = 4;
#[doc = "< connection established (only RP_TYPE_CONN)"]
pub const reverse_proxy_status_t_RP_STATUS_CONNECTED: reverse_proxy_status_t = 5;
#[doc = "< connection closed (only RP_TYPE_CONN)"]
pub const reverse_proxy_status_t_RP_STATUS_DISCONNECTED: reverse_proxy_status_t = 6;
pub type reverse_proxy_status_t = ::std::os::raw::c_uint;
#[doc = "< data going out to remote host"]
pub const reverse_proxy_data_direction_t_RP_DATA_DIRECTION_OUT: reverse_proxy_data_direction_t = 1;
#[doc = "< data coming in from remote host"]
pub const reverse_proxy_data_direction_t_RP_DATA_DIRECTION_IN: reverse_proxy_data_direction_t = 2;
pub type reverse_proxy_data_direction_t = ::std::os::raw::c_uint;
#[doc = " Log callback function prototype."]
#[doc = ""]
#[doc = " @param client The client that called the callback function"]
#[doc = " @param log_msg The log message"]
#[doc = " @param user_data The user_data pointer that was set when registering the callback"]
pub type reverse_proxy_log_cb_t = ::std::option::Option<
    unsafe extern "C" fn(
        client: reverse_proxy_client_t,
        log_msg: *const ::std::os::raw::c_char,
        user_data: *mut ::std::os::raw::c_void,
    ),
>;
#[doc = " Data callback function prototype."]
#[doc = ""]
#[doc = " @param client The client that called the callback function"]
#[doc = " @param direction The direction of the data, either RP_DATA_DIRECTION_OUT or RP_DATA_DIRECTION_IN"]
#[doc = " @param buffer The data buffer"]
#[doc = " @param length The length of the data buffer"]
#[doc = " @param user_data The user_data pointer that was set when registering the callback"]
pub type reverse_proxy_data_cb_t = ::std::option::Option<
    unsafe extern "C" fn(
        client: reverse_proxy_client_t,
        direction: reverse_proxy_data_direction_t,
        buffer: *const ::std::os::raw::c_char,
        length: u32,
        user_data: *mut ::std::os::raw::c_void,
    ),
>;
#[doc = " Status callback function prototype."]
#[doc = ""]
#[doc = " @param client The client that called the callback function"]
#[doc = " @param status The status the client is reporting"]
#[doc = " @param status_msg A status message the client reports along with the status"]
#[doc = " @param user_data The user_data pointer that was set when registering the callback"]
pub type reverse_proxy_status_cb_t = ::std::option::Option<
    unsafe extern "C" fn(
        client: reverse_proxy_client_t,
        status: reverse_proxy_status_t,
        status_msg: *const ::std::os::raw::c_char,
        user_data: *mut ::std::os::raw::c_void,
    ),
>;
extern "C" {
    #[doc = " Create a reverse proxy client using com.apple.PurpleReverseProxy.Ctrl and"]
    #[doc = " com.apple.PurpleReverseProxy.Conn lockdown services. This will open a port"]
    #[doc = " 1083 on the device that iOS apps could connect to; \\b however that is"]
    #[doc = " only allowed if an app has the com.apple.private.PurpleReverseProxy.allowed"]
    #[doc = " entitlement, which currently only \\c /usr/libexec/fdrhelper holds."]
    #[doc = ""]
    #[doc = " @note This function only creates and initializes the reverse proxy;"]
    #[doc = "    to make it operational, call reverse_proxy_client_start_proxy()."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will be set to a newly allocated #reverse_proxy_client_t"]
    #[doc = "    upon successful return."]
    #[doc = " @param label A label to pass to lockdownd when creating the service"]
    #[doc = "    connections, usually the program name."]
    #[doc = ""]
    #[doc = " @return REVERSE_PROXY_E_SUCCESS on success,"]
    #[doc = "    or a REVERSE_PROXY_E_* error code otherwise."]
    pub fn reverse_proxy_client_create_with_service(
        device: idevice_t,
        client: *mut reverse_proxy_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> reverse_proxy_error_t;
}
extern "C" {
    #[doc = " Create a reverse proxy client using an open port on the device. This is"]
    #[doc = " used during firmware restores with the default port REVERSE_PROXY_DEFAULT_PORT (1082)."]
    #[doc = ""]
    #[doc = " @note This function only creates and initializes the reverse proxy;"]
    #[doc = "    to make it operational, call reverse_proxy_client_start_proxy()."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will be set to a newly allocated reverse_proxy_client_t"]
    #[doc = "    upon successful return."]
    #[doc = " @param device_port An open port on the device. Unless it's being used for"]
    #[doc = "    a custom implementation, pass REVERSE_PROXY_DEFAULT_PORT here."]
    #[doc = ""]
    #[doc = " @return REVERSE_PROXY_E_SUCCESS on success,"]
    #[doc = "    or a REVERSE_PROXY_E_* error code otherwise."]
    pub fn reverse_proxy_client_create_with_port(
        device: idevice_t,
        client: *mut reverse_proxy_client_t,
        device_port: u16,
    ) -> reverse_proxy_error_t;
}
extern "C" {
    #[doc = " Disconnects a reverse proxy client and frees up the client data."]
    #[doc = ""]
    #[doc = " @param client The reverse proxy client to disconnect and free."]
    pub fn reverse_proxy_client_free(client: reverse_proxy_client_t) -> reverse_proxy_error_t;
}
extern "C" {
    #[doc = " Make an initialized reverse proxy client operational, i.e. start the actual proxy."]
    #[doc = ""]
    #[doc = " @param client The reverse proxy client to start."]
    #[doc = " @param control_protocol_version The control protocol version to use."]
    #[doc = "    This is either 1 or 2. Recent devices use 2."]
    #[doc = ""]
    #[doc = " @return REVERSE_PROXY_E_SUCCESS on success,"]
    #[doc = "    or a REVERSE_PROXY_E_* error code otherwise."]
    pub fn reverse_proxy_client_start_proxy(
        client: reverse_proxy_client_t,
        control_protocol_version: ::std::os::raw::c_int,
    ) -> reverse_proxy_error_t;
}
extern "C" {
    #[doc = " Set a status callback function. This allows to report the status of the"]
    #[doc = " reverse proxy, like Ready, Connect Request, Connected, etc."]
    #[doc = ""]
    #[doc = " @note Set the callback before calling reverse_proxy_client_start_proxy()."]
    #[doc = ""]
    #[doc = " @param client The reverse proxy client"]
    #[doc = " @param callback The status callback function that will be called"]
    #[doc = "    when the status of the reverse proxy changes."]
    #[doc = " @param user_data A pointer that will be passed to the callback function."]
    pub fn reverse_proxy_client_set_status_callback(
        client: reverse_proxy_client_t,
        callback: reverse_proxy_status_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = " Set a log callback function. Useful for debugging or verbosity."]
    #[doc = ""]
    #[doc = " @note Set the callback before calling reverse_proxy_client_start_proxy()."]
    #[doc = ""]
    #[doc = " @param client The reverse proxy client"]
    #[doc = " @param callback The log callback function that will be called"]
    #[doc = "    when the reverse proxy logs something."]
    #[doc = " @param user_data A pointer that will be passed to the callback function."]
    pub fn reverse_proxy_client_set_log_callback(
        client: reverse_proxy_client_t,
        callback: reverse_proxy_log_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = " Set a data callback function. Useful for debugging or extra verbosity."]
    #[doc = ""]
    #[doc = " @note Set the callback before calling reverse_proxy_client_start_proxy()."]
    #[doc = ""]
    #[doc = " @param client The reverse proxy client"]
    #[doc = " @param callback The status callback function that will be called"]
    #[doc = "    when the status of the reverse proxy changes."]
    #[doc = " @param user_data A pointer that will be passed to the callback function."]
    pub fn reverse_proxy_client_set_data_callback(
        client: reverse_proxy_client_t,
        callback: reverse_proxy_data_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = " Helper function to return the type of a given reverse proxy client, which"]
    #[doc = " is either RP_TYPE_CTRL or RP_TYPE_CONN. Useful for callback functions."]
    #[doc = " @see reverse_proxy_client_type_t"]
    #[doc = ""]
    #[doc = " @param client The reverse proxy client"]
    #[doc = ""]
    #[doc = " @return The type of the rerverse proxy client"]
    pub fn reverse_proxy_get_type(client: reverse_proxy_client_t) -> reverse_proxy_client_type_t;
}
pub const sbservices_error_t_SBSERVICES_E_SUCCESS: sbservices_error_t = 0;
pub const sbservices_error_t_SBSERVICES_E_INVALID_ARG: sbservices_error_t = -1;
pub const sbservices_error_t_SBSERVICES_E_PLIST_ERROR: sbservices_error_t = -2;
pub const sbservices_error_t_SBSERVICES_E_CONN_FAILED: sbservices_error_t = -3;
pub const sbservices_error_t_SBSERVICES_E_UNKNOWN_ERROR: sbservices_error_t = -256;
#[doc = " Error Codes"]
pub type sbservices_error_t = ::std::os::raw::c_int;
pub const sbservices_interface_orientation_t_SBSERVICES_INTERFACE_ORIENTATION_UNKNOWN:
    sbservices_interface_orientation_t = 0;
pub const sbservices_interface_orientation_t_SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT:
    sbservices_interface_orientation_t = 1;
pub const sbservices_interface_orientation_t_SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT_UPSIDE_DOWN : sbservices_interface_orientation_t = 2 ;
pub const sbservices_interface_orientation_t_SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_RIGHT:
    sbservices_interface_orientation_t = 3;
pub const sbservices_interface_orientation_t_SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_LEFT:
    sbservices_interface_orientation_t = 4;
pub type sbservices_interface_orientation_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sbservices_client_private {
    _unused: [u8; 0],
}
pub type sbservices_client_t = *mut sbservices_client_private;
extern "C" {
    #[doc = " Connects to the springboardservices service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     sbservices_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an SBSERVICES_E_* error code otherwise."]
    pub fn sbservices_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut sbservices_client_t,
    ) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Starts a new sbservices service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     sbservices_client_t upon successful return. Must be freed using"]
    #[doc = "     sbservices_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, or an SBSERVICES_E_* error"]
    #[doc = "     code otherwise."]
    pub fn sbservices_client_start_service(
        device: idevice_t,
        client: *mut sbservices_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Disconnects an sbservices client from the device and frees up the"]
    #[doc = " sbservices client data."]
    #[doc = ""]
    #[doc = " @param client The sbservices client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an SBSERVICES_E_* error code otherwise."]
    pub fn sbservices_client_free(client: sbservices_client_t) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Gets the icon state of the connected device."]
    #[doc = ""]
    #[doc = " @param client The connected sbservices client to use."]
    #[doc = " @param state Pointer that will point to a newly allocated plist containing"]
    #[doc = "     the current icon state. It is up to the caller to free the memory."]
    #[doc = " @param format_version A string to be passed as formatVersion along with"]
    #[doc = "     the request, or NULL if no formatVersion should be passed. This is only"]
    #[doc = "     supported since iOS 4.0 so for older firmware versions this must be set"]
    #[doc = "     to NULL."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client or state is invalid, or an SBSERVICES_E_* error code otherwise."]
    pub fn sbservices_get_icon_state(
        client: sbservices_client_t,
        state: *mut plist_t,
        format_version: *const ::std::os::raw::c_char,
    ) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Sets the icon state of the connected device."]
    #[doc = ""]
    #[doc = " @param client The connected sbservices client to use."]
    #[doc = " @param newstate A plist containing the new iconstate."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client or newstate is NULL, or an SBSERVICES_E_* error code otherwise."]
    pub fn sbservices_set_icon_state(
        client: sbservices_client_t,
        newstate: plist_t,
    ) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Get the icon of the specified app as PNG data."]
    #[doc = ""]
    #[doc = " @param client The connected sbservices client to use."]
    #[doc = " @param bundleId The bundle identifier of the app to retrieve the icon for."]
    #[doc = " @param pngdata Pointer that will point to a newly allocated buffer"]
    #[doc = "     containing the PNG data upon successful return. It is up to the caller"]
    #[doc = "     to free the memory."]
    #[doc = " @param pngsize Pointer to a uint64_t that will be set to the size of the"]
    #[doc = "     buffer pngdata points to upon successful return."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client, bundleId, or pngdata are invalid, or an SBSERVICES_E_* error"]
    #[doc = "     code otherwise."]
    pub fn sbservices_get_icon_pngdata(
        client: sbservices_client_t,
        bundleId: *const ::std::os::raw::c_char,
        pngdata: *mut *mut ::std::os::raw::c_char,
        pngsize: *mut u64,
    ) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Gets the interface orientation of the device."]
    #[doc = ""]
    #[doc = " @param client The connected sbservices client to use."]
    #[doc = " @param interface_orientation The interface orientation upon successful return."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client or state is invalid, or an SBSERVICES_E_* error code otherwise."]
    pub fn sbservices_get_interface_orientation(
        client: sbservices_client_t,
        interface_orientation: *mut sbservices_interface_orientation_t,
    ) -> sbservices_error_t;
}
extern "C" {
    #[doc = " Get the home screen wallpaper as PNG data."]
    #[doc = ""]
    #[doc = " @param client The connected sbservices client to use."]
    #[doc = " @param pngdata Pointer that will point to a newly allocated buffer"]
    #[doc = "     containing the PNG data upon successful return. It is up to the caller"]
    #[doc = "     to free the memory."]
    #[doc = " @param pngsize Pointer to a uint64_t that will be set to the size of the"]
    #[doc = "     buffer pngdata points to upon successful return."]
    #[doc = ""]
    #[doc = " @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when"]
    #[doc = "     client or pngdata are invalid, or an SBSERVICES_E_* error"]
    #[doc = "     code otherwise."]
    pub fn sbservices_get_home_screen_wallpaper_pngdata(
        client: sbservices_client_t,
        pngdata: *mut *mut ::std::os::raw::c_char,
        pngsize: *mut u64,
    ) -> sbservices_error_t;
}
pub const screenshotr_error_t_SCREENSHOTR_E_SUCCESS: screenshotr_error_t = 0;
pub const screenshotr_error_t_SCREENSHOTR_E_INVALID_ARG: screenshotr_error_t = -1;
pub const screenshotr_error_t_SCREENSHOTR_E_PLIST_ERROR: screenshotr_error_t = -2;
pub const screenshotr_error_t_SCREENSHOTR_E_MUX_ERROR: screenshotr_error_t = -3;
pub const screenshotr_error_t_SCREENSHOTR_E_SSL_ERROR: screenshotr_error_t = -4;
pub const screenshotr_error_t_SCREENSHOTR_E_RECEIVE_TIMEOUT: screenshotr_error_t = -5;
pub const screenshotr_error_t_SCREENSHOTR_E_BAD_VERSION: screenshotr_error_t = -6;
pub const screenshotr_error_t_SCREENSHOTR_E_UNKNOWN_ERROR: screenshotr_error_t = -256;
#[doc = " Error Codes"]
pub type screenshotr_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct screenshotr_client_private {
    _unused: [u8; 0],
}
pub type screenshotr_client_t = *mut screenshotr_client_private;
extern "C" {
    #[doc = " Connects to the screenshotr service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "     screenshotr_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @note This service is only available if a developer disk image has been"]
    #[doc = "     mounted."]
    #[doc = ""]
    #[doc = " @return SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID ARG if one"]
    #[doc = "     or more parameters are invalid, or SCREENSHOTR_E_CONN_FAILED if the"]
    #[doc = "     connection to the device could not be established."]
    pub fn screenshotr_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut screenshotr_client_t,
    ) -> screenshotr_error_t;
}
extern "C" {
    #[doc = " Starts a new screenshotr service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     screenshotr_client_t upon successful return. Must be freed using"]
    #[doc = "     screenshotr_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error"]
    #[doc = "     code otherwise."]
    pub fn screenshotr_client_start_service(
        device: idevice_t,
        client: *mut screenshotr_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> screenshotr_error_t;
}
extern "C" {
    #[doc = " Disconnects a screenshotr client from the device and frees up the"]
    #[doc = " screenshotr client data."]
    #[doc = ""]
    #[doc = " @param client The screenshotr client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return SCREENSHOTR_E_SUCCESS on success, or SCREENSHOTR_E_INVALID_ARG"]
    #[doc = "     if client is NULL."]
    pub fn screenshotr_client_free(client: screenshotr_client_t) -> screenshotr_error_t;
}
extern "C" {
    #[doc = " Get a screen shot from the connected device."]
    #[doc = ""]
    #[doc = " @param client The connection screenshotr service client."]
    #[doc = " @param imgdata Pointer that will point to a newly allocated buffer"]
    #[doc = "     containing TIFF image data upon successful return. It is up to the"]
    #[doc = "     caller to free the memory."]
    #[doc = " @param imgsize Pointer to a uint64_t that will be set to the size of the"]
    #[doc = "     buffer imgdata points to upon successful return."]
    #[doc = ""]
    #[doc = " @return SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID_ARG if"]
    #[doc = "     one or more parameters are invalid, or another error code if an"]
    #[doc = "     error occurred."]
    pub fn screenshotr_take_screenshot(
        client: screenshotr_client_t,
        imgdata: *mut *mut ::std::os::raw::c_char,
        imgsize: *mut u64,
    ) -> screenshotr_error_t;
}
pub const service_error_t_SERVICE_E_SUCCESS: service_error_t = 0;
pub const service_error_t_SERVICE_E_INVALID_ARG: service_error_t = -1;
pub const service_error_t_SERVICE_E_MUX_ERROR: service_error_t = -3;
pub const service_error_t_SERVICE_E_SSL_ERROR: service_error_t = -4;
pub const service_error_t_SERVICE_E_START_SERVICE_ERROR: service_error_t = -5;
pub const service_error_t_SERVICE_E_NOT_ENOUGH_DATA: service_error_t = -6;
pub const service_error_t_SERVICE_E_TIMEOUT: service_error_t = -7;
pub const service_error_t_SERVICE_E_UNKNOWN_ERROR: service_error_t = -256;
#[doc = " Error Codes"]
pub type service_error_t = ::std::os::raw::c_int;
pub type service_client_t = *mut service_client_private;
extern "C" {
    #[doc = " Creates a new service for the specified service descriptor."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will be set to a newly allocated"]
    #[doc = "     service_client_t upon successful return."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "     SERVICE_E_INVALID_ARG when one of the arguments is invalid,"]
    #[doc = "     or SERVICE_E_MUX_ERROR when connecting to the device failed."]
    pub fn service_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut service_client_t,
    ) -> service_error_t;
}
extern "C" {
    #[doc = " Starts a new service on the specified device with given name and"]
    #[doc = " connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service_name The name of the service to start."]
    #[doc = " @param client Pointer that will point to a newly allocated service_client_t"]
    #[doc = "     upon successful return. Must be freed using service_client_free() after"]
    #[doc = "     use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code"]
    #[doc = "     otherwise."]
    pub fn service_client_factory_start_service(
        device: idevice_t,
        service_name: *const ::std::os::raw::c_char,
        client: *mut *mut ::std::os::raw::c_void,
        label: *const ::std::os::raw::c_char,
        constructor_func: ::std::option::Option<
            unsafe extern "C" fn(
                arg1: idevice_t,
                arg2: lockdownd_service_descriptor_t,
                arg3: *mut *mut ::std::os::raw::c_void,
            ) -> i32,
        >,
        error_code: *mut i32,
    ) -> service_error_t;
}
extern "C" {
    #[doc = " Frees a service instance."]
    #[doc = ""]
    #[doc = " @param client The service instance to free."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "     SERVICE_E_INVALID_ARG when client is invalid, or a"]
    #[doc = "     SERVICE_E_UNKNOWN_ERROR when another error occurred."]
    pub fn service_client_free(client: service_client_t) -> service_error_t;
}
extern "C" {
    #[doc = " Sends data using the given service client."]
    #[doc = ""]
    #[doc = " @param client The service client to use for sending."]
    #[doc = " @param data Data to send"]
    #[doc = " @param size Size of the data to send"]
    #[doc = " @param sent Number of bytes sent (can be NULL to ignore)"]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "      SERVICE_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid, or SERVICE_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs."]
    pub fn service_send(
        client: service_client_t,
        data: *const ::std::os::raw::c_char,
        size: u32,
        sent: *mut u32,
    ) -> service_error_t;
}
extern "C" {
    #[doc = " Receives data using the given service client with specified timeout."]
    #[doc = ""]
    #[doc = " @param client The service client to use for receiving"]
    #[doc = " @param data Buffer that will be filled with the data received"]
    #[doc = " @param size Number of bytes to receive"]
    #[doc = " @param received Number of bytes received (can be NULL to ignore)"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "      SERVICE_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid, SERVICE_E_MUX_ERROR when a communication error"]
    #[doc = "      occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs."]
    pub fn service_receive_with_timeout(
        client: service_client_t,
        data: *mut ::std::os::raw::c_char,
        size: u32,
        received: *mut u32,
        timeout: ::std::os::raw::c_uint,
    ) -> service_error_t;
}
extern "C" {
    #[doc = " Receives data using the given service client."]
    #[doc = ""]
    #[doc = " @param client The service client to use for receiving"]
    #[doc = " @param data Buffer that will be filled with the data received"]
    #[doc = " @param size Number of bytes to receive"]
    #[doc = " @param received Number of bytes received (can be NULL to ignore)"]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "      SERVICE_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid, SERVICE_E_NOT_ENOUGH_DATA when not enough data"]
    #[doc = "      received, SERVICE_E_TIMEOUT when the connection times out,"]
    #[doc = "      SERVICE_E_MUX_ERROR when a communication error"]
    #[doc = "      occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs."]
    pub fn service_receive(
        client: service_client_t,
        data: *mut ::std::os::raw::c_char,
        size: u32,
        received: *mut u32,
    ) -> service_error_t;
}
extern "C" {
    #[doc = " Enable SSL for the given service client."]
    #[doc = ""]
    #[doc = " @param client The connected service client for that SSL should be enabled."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "     SERVICE_E_INVALID_ARG if client or client->connection is"]
    #[doc = "     NULL, SERVICE_E_NOT_ENOUGH_DATA when not enough data"]
    #[doc = "     received, SERVICE_E_TIMEOUT when the connection times out,"]
    #[doc = "     SERVICE_E_SSL_ERROR when SSL could not be enabled,"]
    #[doc = "     or SERVICE_E_UNKNOWN_ERROR otherwise."]
    pub fn service_enable_ssl(client: service_client_t) -> service_error_t;
}
extern "C" {
    #[doc = " Disable SSL for the given service client."]
    #[doc = ""]
    #[doc = " @param client The connected service client for that SSL should be disabled."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "     SERVICE_E_INVALID_ARG if client or client->connection is"]
    #[doc = "     NULL, or SERVICE_E_UNKNOWN_ERROR otherwise."]
    pub fn service_disable_ssl(client: service_client_t) -> service_error_t;
}
extern "C" {
    #[doc = " Disable SSL for the given service client without sending SSL terminate messages."]
    #[doc = ""]
    #[doc = " @param client The connected service client for that SSL should be disabled."]
    #[doc = ""]
    #[doc = " @return SERVICE_E_SUCCESS on success,"]
    #[doc = "     SERVICE_E_INVALID_ARG if client or client->connection is"]
    #[doc = "     NULL, or SERVICE_E_UNKNOWN_ERROR otherwise."]
    pub fn service_disable_bypass_ssl(client: service_client_t, sslBypass: u8) -> service_error_t;
}
pub const syslog_relay_error_t_SYSLOG_RELAY_E_SUCCESS: syslog_relay_error_t = 0;
pub const syslog_relay_error_t_SYSLOG_RELAY_E_INVALID_ARG: syslog_relay_error_t = -1;
pub const syslog_relay_error_t_SYSLOG_RELAY_E_MUX_ERROR: syslog_relay_error_t = -2;
pub const syslog_relay_error_t_SYSLOG_RELAY_E_SSL_ERROR: syslog_relay_error_t = -3;
pub const syslog_relay_error_t_SYSLOG_RELAY_E_NOT_ENOUGH_DATA: syslog_relay_error_t = -4;
pub const syslog_relay_error_t_SYSLOG_RELAY_E_TIMEOUT: syslog_relay_error_t = -5;
pub const syslog_relay_error_t_SYSLOG_RELAY_E_UNKNOWN_ERROR: syslog_relay_error_t = -256;
#[doc = " Error Codes"]
pub type syslog_relay_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct syslog_relay_client_private {
    _unused: [u8; 0],
}
pub type syslog_relay_client_t = *mut syslog_relay_client_private;
#[doc = " Receives each character received from the device."]
pub type syslog_relay_receive_cb_t = ::std::option::Option<
    unsafe extern "C" fn(c: ::std::os::raw::c_char, user_data: *mut ::std::os::raw::c_void),
>;
extern "C" {
    #[doc = " Connects to the syslog_relay service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     syslog_relay_client_t upon successful return. Must be freed using"]
    #[doc = "     syslog_relay_client_free() after use."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an SYSLOG_RELAY_E_* error code otherwise."]
    pub fn syslog_relay_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut syslog_relay_client_t,
    ) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Starts a new syslog_relay service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     syslog_relay_client_t upon successful return. Must be freed using"]
    #[doc = "     syslog_relay_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success, or an SYSLOG_RELAY_E_* error"]
    #[doc = "     code otherwise."]
    pub fn syslog_relay_client_start_service(
        device: idevice_t,
        client: *mut syslog_relay_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Disconnects a syslog_relay client from the device and frees up the"]
    #[doc = " syslog_relay client data."]
    #[doc = ""]
    #[doc = " @param client The syslog_relay client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an SYSLOG_RELAY_E_* error code otherwise."]
    pub fn syslog_relay_client_free(client: syslog_relay_client_t) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Starts capturing the syslog of the device using a callback."]
    #[doc = ""]
    #[doc = " Use syslog_relay_stop_capture() to stop receiving the syslog."]
    #[doc = ""]
    #[doc = " @param client The syslog_relay client to use"]
    #[doc = " @param callback Callback to receive each character from the syslog."]
    #[doc = " @param user_data Custom pointer passed to the callback function."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success,"]
    #[doc = "      SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs or a syslog capture has already been started."]
    pub fn syslog_relay_start_capture(
        client: syslog_relay_client_t,
        callback: syslog_relay_receive_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Starts capturing the *raw* syslog of the device using a callback."]
    #[doc = " This function is like syslog_relay_start_capture with the difference that"]
    #[doc = " it will neither check nor process the received data before passing it to"]
    #[doc = " the callback function."]
    #[doc = ""]
    #[doc = " Use syslog_relay_stop_capture() to stop receiving the syslog."]
    #[doc = ""]
    #[doc = " @note Use syslog_relay_start_capture for a safer implementation."]
    #[doc = ""]
    #[doc = " @param client The syslog_relay client to use"]
    #[doc = " @param callback Callback to receive each character from the syslog."]
    #[doc = " @param user_data Custom pointer passed to the callback function."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success,"]
    #[doc = "      SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs or a syslog capture has already been started."]
    pub fn syslog_relay_start_capture_raw(
        client: syslog_relay_client_t,
        callback: syslog_relay_receive_cb_t,
        user_data: *mut ::std::os::raw::c_void,
    ) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Stops capturing the syslog of the device."]
    #[doc = ""]
    #[doc = " Use syslog_relay_start_capture() to start receiving the syslog."]
    #[doc = ""]
    #[doc = " @param client The syslog_relay client to use"]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success,"]
    #[doc = "      SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs or a syslog capture has already been started."]
    pub fn syslog_relay_stop_capture(client: syslog_relay_client_t) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Receives data using the given syslog_relay client with specified timeout."]
    #[doc = ""]
    #[doc = " @param client The syslog_relay client to use for receiving"]
    #[doc = " @param data Buffer that will be filled with the data received"]
    #[doc = " @param size Number of bytes to receive"]
    #[doc = " @param received Number of bytes received (can be NULL to ignore)"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success,"]
    #[doc = "      SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are"]
    #[doc = "      invalid, SYSLOG_RELAY_E_MUX_ERROR when a communication error"]
    #[doc = "      occurs, or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified"]
    #[doc = "      error occurs."]
    pub fn syslog_relay_receive_with_timeout(
        client: syslog_relay_client_t,
        data: *mut ::std::os::raw::c_char,
        size: u32,
        received: *mut u32,
        timeout: ::std::os::raw::c_uint,
    ) -> syslog_relay_error_t;
}
extern "C" {
    #[doc = " Receives data from the service."]
    #[doc = ""]
    #[doc = " @param client The syslog_relay client"]
    #[doc = " @param data Buffer that will be filled with the data received"]
    #[doc = " @param size Number of bytes to receive"]
    #[doc = " @param received Number of bytes received (can be NULL to ignore)"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return SYSLOG_RELAY_E_SUCCESS on success,"]
    #[doc = "  SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL"]
    pub fn syslog_relay_receive(
        client: syslog_relay_client_t,
        data: *mut ::std::os::raw::c_char,
        size: u32,
        received: *mut u32,
    ) -> syslog_relay_error_t;
}
pub const webinspector_error_t_WEBINSPECTOR_E_SUCCESS: webinspector_error_t = 0;
pub const webinspector_error_t_WEBINSPECTOR_E_INVALID_ARG: webinspector_error_t = -1;
pub const webinspector_error_t_WEBINSPECTOR_E_PLIST_ERROR: webinspector_error_t = -2;
pub const webinspector_error_t_WEBINSPECTOR_E_MUX_ERROR: webinspector_error_t = -3;
pub const webinspector_error_t_WEBINSPECTOR_E_SSL_ERROR: webinspector_error_t = -4;
pub const webinspector_error_t_WEBINSPECTOR_E_RECEIVE_TIMEOUT: webinspector_error_t = -5;
pub const webinspector_error_t_WEBINSPECTOR_E_NOT_ENOUGH_DATA: webinspector_error_t = -6;
pub const webinspector_error_t_WEBINSPECTOR_E_UNKNOWN_ERROR: webinspector_error_t = -256;
#[doc = " Error Codes"]
pub type webinspector_error_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct webinspector_client_private {
    _unused: [u8; 0],
}
pub type webinspector_client_t = *mut webinspector_client_private;
extern "C" {
    #[doc = " Connects to the webinspector service on the specified device."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param service The service descriptor returned by lockdownd_start_service."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     webinspector_client_t upon successful return. Must be freed using"]
    #[doc = "     webinspector_client_free() after use."]
    #[doc = ""]
    #[doc = " @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an WEBINSPECTOR_E_* error code otherwise."]
    pub fn webinspector_client_new(
        device: idevice_t,
        service: lockdownd_service_descriptor_t,
        client: *mut webinspector_client_t,
    ) -> webinspector_error_t;
}
extern "C" {
    #[doc = " Starts a new webinspector service on the specified device and connects to it."]
    #[doc = ""]
    #[doc = " @param device The device to connect to."]
    #[doc = " @param client Pointer that will point to a newly allocated"]
    #[doc = "     webinspector_client_t upon successful return. Must be freed using"]
    #[doc = "     webinspector_client_free() after use."]
    #[doc = " @param label The label to use for communication. Usually the program name."]
    #[doc = "  Pass NULL to disable sending the label in requests to lockdownd."]
    #[doc = ""]
    #[doc = " @return WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error"]
    #[doc = "     code otherwise."]
    pub fn webinspector_client_start_service(
        device: idevice_t,
        client: *mut webinspector_client_t,
        label: *const ::std::os::raw::c_char,
    ) -> webinspector_error_t;
}
extern "C" {
    #[doc = " Disconnects a webinspector client from the device and frees up the"]
    #[doc = " webinspector client data."]
    #[doc = ""]
    #[doc = " @param client The webinspector client to disconnect and free."]
    #[doc = ""]
    #[doc = " @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when"]
    #[doc = "     client is NULL, or an WEBINSPECTOR_E_* error code otherwise."]
    pub fn webinspector_client_free(client: webinspector_client_t) -> webinspector_error_t;
}
extern "C" {
    #[doc = " Sends a plist to the service."]
    #[doc = ""]
    #[doc = " @param client The webinspector client"]
    #[doc = " @param plist The plist to send"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL"]
    pub fn webinspector_send(client: webinspector_client_t, plist: plist_t)
        -> webinspector_error_t;
}
extern "C" {
    #[doc = " Receives a plist from the service."]
    #[doc = ""]
    #[doc = " @param client The webinspector client"]
    #[doc = " @param plist The plist to store the received data"]
    #[doc = ""]
    #[doc = " @return DIAGNOSTICS_RELAY_E_SUCCESS on success,"]
    #[doc = "  DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL"]
    pub fn webinspector_receive(
        client: webinspector_client_t,
        plist: *mut plist_t,
    ) -> webinspector_error_t;
}
extern "C" {
    #[doc = " Receives a plist using the given webinspector client."]
    #[doc = ""]
    #[doc = " @param client The webinspector client to use for receiving"]
    #[doc = " @param plist pointer to a plist_t that will point to the received plist"]
    #[doc = "      upon successful return"]
    #[doc = " @param timeout Maximum time in milliseconds to wait for data."]
    #[doc = ""]
    #[doc = " @return WEBINSPECTOR_E_SUCCESS on success,"]
    #[doc = "      WEBINSPECTOR_E_INVALID_ARG when client or *plist is NULL,"]
    #[doc = "      WEBINSPECTOR_E_PLIST_ERROR when the received data cannot be"]
    #[doc = "      converted to a plist, WEBINSPECTOR_E_MUX_ERROR when a"]
    #[doc = "      communication error occurs, or WEBINSPECTOR_E_UNKNOWN_ERROR"]
    #[doc = "      when an unspecified error occurs."]
    pub fn webinspector_receive_with_timeout(
        client: webinspector_client_t,
        plist: *mut plist_t,
        timeout_ms: u32,
    ) -> webinspector_error_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ssl_data_private {}
#[test]
fn bindgen_test_layout_ssl_data_private() {
    assert_eq!(
        ::std::mem::size_of::<ssl_data_private>(),
        0usize,
        concat!("Size of: ", stringify!(ssl_data_private))
    );
    assert_eq!(
        ::std::mem::align_of::<ssl_data_private>(),
        1usize,
        concat!("Alignment of ", stringify!(ssl_data_private))
    );
}
pub type ssl_data_t = *mut ssl_data_private;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct idevice_connection_private {
    pub device: idevice_t,
    pub type_: idevice_connection_type,
    pub data: *mut ::std::os::raw::c_void,
    pub ssl_data: ssl_data_t,
    pub ssl_recv_timeout: ::std::os::raw::c_uint,
    pub status: idevice_error_t,
}
#[test]
fn bindgen_test_layout_idevice_connection_private() {
    assert_eq!(
        ::std::mem::size_of::<idevice_connection_private>(),
        40usize,
        concat!("Size of: ", stringify!(idevice_connection_private))
    );
    assert_eq!(
        ::std::mem::align_of::<idevice_connection_private>(),
        8usize,
        concat!("Alignment of ", stringify!(idevice_connection_private))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<idevice_connection_private>())).device as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_connection_private),
            "::",
            stringify!(device)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<idevice_connection_private>())).type_ as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_connection_private),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_connection_private>())).data as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_connection_private),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<idevice_connection_private>())).ssl_data as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_connection_private),
            "::",
            stringify!(ssl_data)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<idevice_connection_private>())).ssl_recv_timeout as *const _
                as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_connection_private),
            "::",
            stringify!(ssl_recv_timeout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<idevice_connection_private>())).status as *const _ as usize
        },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_connection_private),
            "::",
            stringify!(status)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct idevice_private {
    pub udid: *mut ::std::os::raw::c_char,
    pub mux_id: u32,
    pub conn_type: idevice_connection_type,
    pub conn_data: *mut ::std::os::raw::c_void,
    pub version: ::std::os::raw::c_int,
    pub device_class: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_idevice_private() {
    assert_eq!(
        ::std::mem::size_of::<idevice_private>(),
        32usize,
        concat!("Size of: ", stringify!(idevice_private))
    );
    assert_eq!(
        ::std::mem::align_of::<idevice_private>(),
        8usize,
        concat!("Alignment of ", stringify!(idevice_private))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_private>())).udid as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_private),
            "::",
            stringify!(udid)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_private>())).mux_id as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_private),
            "::",
            stringify!(mux_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_private>())).conn_type as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_private),
            "::",
            stringify!(conn_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_private>())).conn_data as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_private),
            "::",
            stringify!(conn_data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_private>())).version as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_private),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<idevice_private>())).device_class as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(idevice_private),
            "::",
            stringify!(device_class)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct service_client_private {
    pub connection: idevice_connection_t,
}
#[test]
fn bindgen_test_layout_service_client_private() {
    assert_eq!(
        ::std::mem::size_of::<service_client_private>(),
        8usize,
        concat!("Size of: ", stringify!(service_client_private))
    );
    assert_eq!(
        ::std::mem::align_of::<service_client_private>(),
        8usize,
        concat!("Alignment of ", stringify!(service_client_private))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<service_client_private>())).connection as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(service_client_private),
            "::",
            stringify!(connection)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct property_list_service_client_private {
    pub parent: service_client_t,
}
#[test]
fn bindgen_test_layout_property_list_service_client_private() {
    assert_eq!(
        ::std::mem::size_of::<property_list_service_client_private>(),
        8usize,
        concat!(
            "Size of: ",
            stringify!(property_list_service_client_private)
        )
    );
    assert_eq!(
        ::std::mem::align_of::<property_list_service_client_private>(),
        8usize,
        concat!(
            "Alignment of ",
            stringify!(property_list_service_client_private)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<property_list_service_client_private>())).parent as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(property_list_service_client_private),
            "::",
            stringify!(parent)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lockdownd_client_private {
    pub parent: property_list_service_client_t,
    pub ssl_enabled: ::std::os::raw::c_int,
    pub session_id: *mut ::std::os::raw::c_char,
    pub label: *mut ::std::os::raw::c_char,
    pub device: idevice_t,
    pub cu_key: *mut ::std::os::raw::c_uchar,
    pub cu_key_len: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_lockdownd_client_private() {
    assert_eq!(
        ::std::mem::size_of::<lockdownd_client_private>(),
        56usize,
        concat!("Size of: ", stringify!(lockdownd_client_private))
    );
    assert_eq!(
        ::std::mem::align_of::<lockdownd_client_private>(),
        8usize,
        concat!("Alignment of ", stringify!(lockdownd_client_private))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<lockdownd_client_private>())).parent as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(parent)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_client_private>())).ssl_enabled as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(ssl_enabled)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_client_private>())).session_id as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(session_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<lockdownd_client_private>())).label as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(label)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<lockdownd_client_private>())).device as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(device)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<lockdownd_client_private>())).cu_key as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(cu_key)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<lockdownd_client_private>())).cu_key_len as *const _ as usize
        },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(lockdownd_client_private),
            "::",
            stringify!(cu_key_len)
        )
    );
}
extern "C" {
    pub fn lockdown_check_result(
        dict: plist_t,
        query_match: *const ::std::os::raw::c_char,
    ) -> lockdownd_error_t;
}
pub type __builtin_va_list = *mut ::std::os::raw::c_char;