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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<!-- SECTION: Programming -->
<head>
<title>HTTP and IPP APIs</title>
<meta name='keywords' content='Programming'>
<meta name='creator' content='Mini-XML v2.3'>
<style type='text/css'><!--
h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
h3 span.info { float: right; font-size: 100%; }
h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
--></style>
</head>
<body>
<!--
"$Id: api-httpipp.shtml 5138 2006-02-21 10:49:06Z mike $"
HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
Copyright 1997-2006 by Easy Software Products.
These coded instructions, statements, and computer programs are the
property of Easy Software Products and are protected by Federal
copyright law. Distribution and use rights are outlined in the file
"LICENSE.txt" which should have been included with this file. If this
file is missing or damaged please contact Easy Software Products
at:
Attn: CUPS Licensing Information
Easy Software Products
44141 Airport View Drive, Suite 204
Hollywood, Maryland 20636 USA
Voice: (301) 373-9600
EMail: cups-info@cups.org
WWW: http://www.cups.org
-->
<h2 class='title'>Introduction</h2>
<p>The CUPS HTTP and IPP APIs provide low-level access to the
HTTP and IPP protocols and CUPS scheduler. They are typically
used by monitoring and administration programs to perform
specific functions not supported by the high-level CUPS API
functions.</p>
<h2 class='title'>General Usage</h2>
<p>The <var><cups/cups.h></var> header file must be included to
use the HTTP and IPP functions.</p>
<p>Programs using these functions must be linked to the CUPS
library: <var>libcups.a</var>, <var>libcups.so.2</var>,
<var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
<var>libcups2.lib</var> depending on the platform. The following
command compiles <var>myprogram.c</var> using GCC and the CUPS
library:</p>
<pre class='command'>
<kbd>gcc -o myprogram myprogram.c -lcups</kbd>
</pre>
<h2 class='title'>Compatibility</h2>
<p>Unless otherwise specified, the HTTP and IPP API functions
require CUPS 1.1 or higher.</p>
<h2 class='title'>Contents</h2>
<ul>
<li><a href='#ENUMERATIONS'>Enumerations</a></li>
<li><a href='#FUNCTIONS'>Functions</a></li>
<li><a href='#STRUCTURES'>Structures</a></li>
<li><a href='#TYPES'>Types</a></li>
<li><a href='#UNIONS'>Unions</a></li>
</ul>
<!-- NEW PAGE -->
<h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
<ul>
<li><a href='#http_auth_e'><tt>http_auth_e</tt></a> </li>
<li><a href='#http_encoding_e'><tt>http_encoding_e</tt></a> </li>
<li><a href='#http_encryption_e'><tt>http_encryption_e</tt></a> </li>
<li><a href='#http_field_e'><tt>http_field_e</tt></a> </li>
<li><a href='#http_keepalive_e'><tt>http_keepalive_e</tt></a> </li>
<li><a href='#http_status_e'><tt>http_status_e</tt></a> </li>
<li><a href='#ipp_res_e'><tt>ipp_res_e</tt></a> </li>
<li><a href='#ipp_status_e'><tt>ipp_status_e</tt></a> </li>
<li><a href='#ipp_tag_e'><tt>ipp_tag_e</tt></a> </li>
</ul>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_auth_e'>http_auth_e</a></h3>
<h4>Description</h4>
<p>HTTP authentication types</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_AUTH_BASIC</tt> </td><td>Basic authentication in use</td></tr>
<tr><td><tt>HTTP_AUTH_MD5</tt> </td><td>Digest authentication in use</td></tr>
<tr><td><tt>HTTP_AUTH_MD5_INT</tt> </td><td>Digest authentication in use for body</td></tr>
<tr><td><tt>HTTP_AUTH_MD5_SESS</tt> </td><td>MD5-session authentication in use</td></tr>
<tr><td><tt>HTTP_AUTH_MD5_SESS_INT</tt> </td><td>MD5-session authentication in use for body</td></tr>
<tr><td><tt>HTTP_AUTH_NONE</tt> </td><td>No authentication in use</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_encoding_e'>http_encoding_e</a></h3>
<h4>Description</h4>
<p>HTTP transfer encoding values</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_ENCODE_CHUNKED</tt> </td><td>Data is chunked</td></tr>
<tr><td><tt>HTTP_ENCODE_FIELDS</tt> </td><td>Sending HTTP fields</td></tr>
<tr><td><tt>HTTP_ENCODE_LENGTH</tt> </td><td>Data is sent with Content-Length</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_encryption_e'>http_encryption_e</a></h3>
<h4>Description</h4>
<p>HTTP encryption values</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_ENCRYPT_ALWAYS</tt> </td><td>Always encrypt (SSL)</td></tr>
<tr><td><tt>HTTP_ENCRYPT_IF_REQUESTED</tt> </td><td>Encrypt if requested (TLS upgrade)</td></tr>
<tr><td><tt>HTTP_ENCRYPT_NEVER</tt> </td><td>Never encrypt</td></tr>
<tr><td><tt>HTTP_ENCRYPT_REQUIRED</tt> </td><td>Encryption is required (TLS upgrade)</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_field_e'>http_field_e</a></h3>
<h4>Description</h4>
<p>HTTP field names</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_FIELD_ACCEPT_LANGUAGE</tt> </td><td>Accept-Language field</td></tr>
<tr><td><tt>HTTP_FIELD_ACCEPT_RANGES</tt> </td><td>Accept-Ranges field</td></tr>
<tr><td><tt>HTTP_FIELD_AUTHORIZATION</tt> </td><td>Authorization field</td></tr>
<tr><td><tt>HTTP_FIELD_CONNECTION</tt> </td><td>Connection field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_ENCODING</tt> </td><td>Content-Encoding field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_LANGUAGE</tt> </td><td>Content-Language field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_LENGTH</tt> </td><td>Content-Length field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_LOCATION</tt> </td><td>Content-Location field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_MD5</tt> </td><td>Content-MD5 field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_RANGE</tt> </td><td>Content-Range field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_TYPE</tt> </td><td>Content-Type field</td></tr>
<tr><td><tt>HTTP_FIELD_CONTENT_VERSION</tt> </td><td>Content-Version field</td></tr>
<tr><td><tt>HTTP_FIELD_DATE</tt> </td><td>Date field</td></tr>
<tr><td><tt>HTTP_FIELD_HOST</tt> </td><td>Host field</td></tr>
<tr><td><tt>HTTP_FIELD_IF_MODIFIED_SINCE</tt> </td><td>If-Modified-Since field</td></tr>
<tr><td><tt>HTTP_FIELD_IF_UNMODIFIED_SINCE</tt> </td><td>If-Unmodified-Since field</td></tr>
<tr><td><tt>HTTP_FIELD_KEEP_ALIVE</tt> </td><td>Keep-Alive field</td></tr>
<tr><td><tt>HTTP_FIELD_LAST_MODIFIED</tt> </td><td>Last-Modified field</td></tr>
<tr><td><tt>HTTP_FIELD_LINK</tt> </td><td>Link field</td></tr>
<tr><td><tt>HTTP_FIELD_LOCATION</tt> </td><td>Location field</td></tr>
<tr><td><tt>HTTP_FIELD_MAX</tt> </td><td>Maximum field index</td></tr>
<tr><td><tt>HTTP_FIELD_RANGE</tt> </td><td>Range field</td></tr>
<tr><td><tt>HTTP_FIELD_REFERER</tt> </td><td>Referer field</td></tr>
<tr><td><tt>HTTP_FIELD_RETRY_AFTER</tt> </td><td>Retry-After field</td></tr>
<tr><td><tt>HTTP_FIELD_TRANSFER_ENCODING</tt> </td><td>Transfer-Encoding field</td></tr>
<tr><td><tt>HTTP_FIELD_UNKNOWN</tt> </td><td>Unknown field</td></tr>
<tr><td><tt>HTTP_FIELD_UPGRADE</tt> </td><td>Upgrade field</td></tr>
<tr><td><tt>HTTP_FIELD_USER_AGENT</tt> </td><td>User-Agent field</td></tr>
<tr><td><tt>HTTP_FIELD_WWW_AUTHENTICATE</tt> </td><td>WWW-Authenticate field</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_keepalive_e'>http_keepalive_e</a></h3>
<h4>Description</h4>
<p>Types and structures...</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_KEEPALIVE_OFF</tt> </td><td>No keep alive support</td></tr>
<tr><td><tt>HTTP_KEEPALIVE_ON</tt> </td><td>Use keep alive</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_status_e'>http_status_e</a></h3>
<h4>Description</h4>
<p>HTTP status codes</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>HTTP_ACCEPTED</tt> </td><td>DELETE command was successful</td></tr>
<tr><td><tt>HTTP_BAD_GATEWAY</tt> </td><td>Bad gateway</td></tr>
<tr><td><tt>HTTP_BAD_REQUEST</tt> </td><td>Bad request</td></tr>
<tr><td><tt>HTTP_CONFLICT</tt> </td><td>Request is self-conflicting</td></tr>
<tr><td><tt>HTTP_CONTINUE</tt> </td><td>Everything OK, keep going...</td></tr>
<tr><td><tt>HTTP_CREATED</tt> </td><td>PUT command was successful</td></tr>
<tr><td><tt>HTTP_ERROR</tt> </td><td>An error response from httpXxxx()</td></tr>
<tr><td><tt>HTTP_EXPECTATION_FAILED</tt> </td><td>The expectation given in an Expect header field was not met</td></tr>
<tr><td><tt>HTTP_FORBIDDEN</tt> </td><td>Forbidden to access this URI</td></tr>
<tr><td><tt>HTTP_GATEWAY_TIMEOUT</tt> </td><td>Gateway connection timed out</td></tr>
<tr><td><tt>HTTP_GONE</tt> </td><td>Server has gone away</td></tr>
<tr><td><tt>HTTP_LENGTH_REQUIRED</tt> </td><td>A content length or encoding is required</td></tr>
<tr><td><tt>HTTP_METHOD_NOT_ALLOWED</tt> </td><td>Method is not allowed</td></tr>
<tr><td><tt>HTTP_MOVED_PERMANENTLY</tt> </td><td>Document has moved permanently</td></tr>
<tr><td><tt>HTTP_MOVED_TEMPORARILY</tt> </td><td>Document has moved temporarily</td></tr>
<tr><td><tt>HTTP_MULTIPLE_CHOICES</tt> </td><td>Multiple files match request</td></tr>
<tr><td><tt>HTTP_NOT_ACCEPTABLE</tt> </td><td>Not Acceptable</td></tr>
<tr><td><tt>HTTP_NOT_AUTHORITATIVE</tt> </td><td>Information isn't authoritative</td></tr>
<tr><td><tt>HTTP_NOT_FOUND</tt> </td><td>URI was not found</td></tr>
<tr><td><tt>HTTP_NOT_IMPLEMENTED</tt> </td><td>Feature not implemented</td></tr>
<tr><td><tt>HTTP_NOT_MODIFIED</tt> </td><td>File not modified</td></tr>
<tr><td><tt>HTTP_NOT_SUPPORTED</tt> </td><td>HTTP version not supported</td></tr>
<tr><td><tt>HTTP_NO_CONTENT</tt> </td><td>Successful command, no new data</td></tr>
<tr><td><tt>HTTP_OK</tt> </td><td>OPTIONS/GET/HEAD/POST/TRACE command was successful</td></tr>
<tr><td><tt>HTTP_PARTIAL_CONTENT</tt> </td><td>Only a partial file was recieved/sent</td></tr>
<tr><td><tt>HTTP_PAYMENT_REQUIRED</tt> </td><td>Payment required</td></tr>
<tr><td><tt>HTTP_PRECONDITION</tt> </td><td>Precondition failed</td></tr>
<tr><td><tt>HTTP_PROXY_AUTHENTICATION</tt> </td><td>Proxy Authentication is Required</td></tr>
<tr><td><tt>HTTP_REQUESTED_RANGE</tt> </td><td>The requested range is not satisfiable</td></tr>
<tr><td><tt>HTTP_REQUEST_TIMEOUT</tt> </td><td>Request timed out</td></tr>
<tr><td><tt>HTTP_REQUEST_TOO_LARGE</tt> </td><td>Request entity too large</td></tr>
<tr><td><tt>HTTP_RESET_CONTENT</tt> </td><td>Content was reset/recreated</td></tr>
<tr><td><tt>HTTP_SEE_OTHER</tt> </td><td>See this other link...</td></tr>
<tr><td><tt>HTTP_SERVER_ERROR</tt> </td><td>Internal server error</td></tr>
<tr><td><tt>HTTP_SERVICE_UNAVAILABLE</tt> </td><td>Service is unavailable</td></tr>
<tr><td><tt>HTTP_SWITCHING_PROTOCOLS</tt> </td><td>HTTP upgrade to TLS/SSL</td></tr>
<tr><td><tt>HTTP_UNAUTHORIZED</tt> </td><td>Unauthorized to access host</td></tr>
<tr><td><tt>HTTP_UNSUPPORTED_MEDIATYPE</tt> </td><td>The requested media type is unsupported</td></tr>
<tr><td><tt>HTTP_UPGRADE_REQUIRED</tt> </td><td>Upgrade to SSL/TLS required</td></tr>
<tr><td><tt>HTTP_URI_TOO_LONG</tt> </td><td>URI too long</td></tr>
<tr><td><tt>HTTP_USE_PROXY</tt> </td><td>Must use a proxy to access this URI</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_res_e'>ipp_res_e</a></h3>
<h4>Description</h4>
<p>Types and structures...</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>IPP_RES_PER_CM</tt> </td><td>Pixels per centimeter</td></tr>
<tr><td><tt>IPP_RES_PER_INCH</tt> </td><td>Pixels per inch</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_status_e'>ipp_status_e</a></h3>
<h4>Description</h4>
<p>IPP status codes...</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>IPP_ATTRIBUTES</tt> </td><td>client-error-attributes-or-values-not-supported</td></tr>
<tr><td><tt>IPP_ATTRIBUTES_NOT_SETTABLE</tt> </td><td>client-error-attributes-not-settable</td></tr>
<tr><td><tt>IPP_BAD_REQUEST</tt> </td><td>client-error-bad-request</td></tr>
<tr><td><tt>IPP_CHARSET</tt> </td><td>client-error-charset-not-supported</td></tr>
<tr><td><tt>IPP_COMPRESSION_ERROR</tt> </td><td>client-error-compression-error</td></tr>
<tr><td><tt>IPP_COMPRESSION_NOT_SUPPORTED</tt> </td><td>client-error-compression-not-supported</td></tr>
<tr><td><tt>IPP_CONFLICT</tt> </td><td>client-error-conflicting-attributes</td></tr>
<tr><td><tt>IPP_DEVICE_ERROR</tt> </td><td>server-error-device-error</td></tr>
<tr><td><tt>IPP_DOCUMENT_ACCESS_ERROR</tt> </td><td>client-error-document-access-error</td></tr>
<tr><td><tt>IPP_DOCUMENT_FORMAT</tt> </td><td>client-error-document-format-not-supported</td></tr>
<tr><td><tt>IPP_DOCUMENT_FORMAT_ERROR</tt> </td><td>client-error-document-format-error</td></tr>
<tr><td><tt>IPP_ERROR_JOB_CANCELED</tt> </td><td>server-error-job-canceled</td></tr>
<tr><td><tt>IPP_FORBIDDEN</tt> </td><td>client-error-forbidden</td></tr>
<tr><td><tt>IPP_GONE</tt> </td><td>client-error-gone</td></tr>
<tr><td><tt>IPP_IGNORED_ALL_NOTIFICATIONS</tt> </td><td>client-error-ignored-all-notifications</td></tr>
<tr><td><tt>IPP_IGNORED_ALL_SUBSCRIPTIONS</tt> </td><td>client-error-ignored-all-subscriptions</td></tr>
<tr><td><tt>IPP_INTERNAL_ERROR</tt> </td><td>server-error-internal-error</td></tr>
<tr><td><tt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED</tt> </td><td>server-error-multiple-document-jobs-not-supported</td></tr>
<tr><td><tt>IPP_NOT_ACCEPTING</tt> </td><td>server-error-not-accepting-jobs</td></tr>
<tr><td><tt>IPP_NOT_AUTHENTICATED</tt> </td><td>client-error-not-authenticated</td></tr>
<tr><td><tt>IPP_NOT_AUTHORIZED</tt> </td><td>client-error-not-authorized</td></tr>
<tr><td><tt>IPP_NOT_FOUND</tt> </td><td>client-error-not-found</td></tr>
<tr><td><tt>IPP_NOT_POSSIBLE</tt> </td><td>client-error-not-possible</td></tr>
<tr><td><tt>IPP_OK</tt> </td><td>successful-ok</td></tr>
<tr><td><tt>IPP_OK_BUT_CANCEL_SUBSCRIPTION</tt> </td><td>successful-ok-but-cancel-subscription</td></tr>
<tr><td><tt>IPP_OK_CONFLICT</tt> </td><td>successful-ok-conflicting-attributes</td></tr>
<tr><td><tt>IPP_OK_EVENTS_COMPLETE</tt> </td><td>successful-ok-events-complete</td></tr>
<tr><td><tt>IPP_OK_IGNORED_NOTIFICATIONS</tt> </td><td>successful-ok-ignored-notifications</td></tr>
<tr><td><tt>IPP_OK_IGNORED_SUBSCRIPTIONS</tt> </td><td>successful-ok-ignored-subscriptions</td></tr>
<tr><td><tt>IPP_OK_SUBST</tt> </td><td>successful-ok-ignored-or-substituted-attributes</td></tr>
<tr><td><tt>IPP_OK_TOO_MANY_EVENTS</tt> </td><td>successful-ok-too-many-events</td></tr>
<tr><td><tt>IPP_OPERATION_NOT_SUPPORTED</tt> </td><td>server-error-operation-not-supported</td></tr>
<tr><td><tt>IPP_PRINTER_BUSY</tt> </td><td>server-error-busy</td></tr>
<tr><td><tt>IPP_PRINTER_IS_DEACTIVATED</tt> </td><td>server-error-printer-is-deactivated</td></tr>
<tr><td><tt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND</tt> </td><td>client-error-print-support-file-not-found</td></tr>
<tr><td><tt>IPP_REDIRECTION_OTHER_SITE</tt> </td><td></td></tr>
<tr><td><tt>IPP_REQUEST_ENTITY</tt> </td><td>client-error-request-entity-too-large</td></tr>
<tr><td><tt>IPP_REQUEST_VALUE</tt> </td><td>client-error-request-value-too-long</td></tr>
<tr><td><tt>IPP_SERVICE_UNAVAILABLE</tt> </td><td>server-error-service-unavailable</td></tr>
<tr><td><tt>IPP_TEMPORARY_ERROR</tt> </td><td>server-error-temporary-error</td></tr>
<tr><td><tt>IPP_TIMEOUT</tt> </td><td>client-error-timeout</td></tr>
<tr><td><tt>IPP_TOO_MANY_SUBSCRIPTIONS</tt> </td><td>client-error-too-many-subscriptions</td></tr>
<tr><td><tt>IPP_URI_SCHEME</tt> </td><td>client-error-uri-scheme-not-supported</td></tr>
<tr><td><tt>IPP_VERSION_NOT_SUPPORTED</tt> </td><td>server-error-version-not-supported</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_tag_e'>ipp_tag_e</a></h3>
<h4>Description</h4>
<p>Format tags for attributes...</p>
<h4>Values</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>IPP_TAG_ADMINDEFINE</tt> </td><td>Admin-defined value</td></tr>
<tr><td><tt>IPP_TAG_BEGIN_COLLECTION</tt> </td><td>Beginning of collection value</td></tr>
<tr><td><tt>IPP_TAG_BOOLEAN</tt> </td><td>Boolean value</td></tr>
<tr><td><tt>IPP_TAG_CHARSET</tt> </td><td>Character set value</td></tr>
<tr><td><tt>IPP_TAG_COPY</tt> </td><td>Bitflag for copied attribute values</td></tr>
<tr><td><tt>IPP_TAG_DATE</tt> </td><td>Date/time value</td></tr>
<tr><td><tt>IPP_TAG_DEFAULT</tt> </td><td>Default value</td></tr>
<tr><td><tt>IPP_TAG_DELETEATTR</tt> </td><td>Delete-attribute value</td></tr>
<tr><td><tt>IPP_TAG_END</tt> </td><td>End-of-attributes</td></tr>
<tr><td><tt>IPP_TAG_END_COLLECTION</tt> </td><td>End of collection value</td></tr>
<tr><td><tt>IPP_TAG_ENUM</tt> </td><td>Enumeration value</td></tr>
<tr><td><tt>IPP_TAG_EVENT_NOTIFICATION</tt> </td><td>Event group</td></tr>
<tr><td><tt>IPP_TAG_INTEGER</tt> </td><td>Integer value</td></tr>
<tr><td><tt>IPP_TAG_JOB</tt> </td><td>Job group</td></tr>
<tr><td><tt>IPP_TAG_KEYWORD</tt> </td><td>Keyword value</td></tr>
<tr><td><tt>IPP_TAG_LANGUAGE</tt> </td><td>Language value</td></tr>
<tr><td><tt>IPP_TAG_MASK</tt> </td><td>Mask for copied attribute values</td></tr>
<tr><td><tt>IPP_TAG_MEMBERNAME</tt> </td><td>Collection member name value</td></tr>
<tr><td><tt>IPP_TAG_MIMETYPE</tt> </td><td>MIME media type value</td></tr>
<tr><td><tt>IPP_TAG_NAME</tt> </td><td>Name value</td></tr>
<tr><td><tt>IPP_TAG_NAMELANG</tt> </td><td>Name-with-language value</td></tr>
<tr><td><tt>IPP_TAG_NOTSETTABLE</tt> </td><td>Not-settable value</td></tr>
<tr><td><tt>IPP_TAG_NOVALUE</tt> </td><td>No-value value</td></tr>
<tr><td><tt>IPP_TAG_OPERATION</tt> </td><td>Operation group</td></tr>
<tr><td><tt>IPP_TAG_PRINTER</tt> </td><td>Printer group</td></tr>
<tr><td><tt>IPP_TAG_RANGE</tt> </td><td>Range value</td></tr>
<tr><td><tt>IPP_TAG_RESOLUTION</tt> </td><td>Resolution value</td></tr>
<tr><td><tt>IPP_TAG_STRING</tt> </td><td>Octet string value</td></tr>
<tr><td><tt>IPP_TAG_SUBSCRIPTION</tt> </td><td>Subscription group</td></tr>
<tr><td><tt>IPP_TAG_TEXT</tt> </td><td>Text value</td></tr>
<tr><td><tt>IPP_TAG_TEXTLANG</tt> </td><td>Text-with-language value</td></tr>
<tr><td><tt>IPP_TAG_UNKNOWN</tt> </td><td>Unknown value</td></tr>
<tr><td><tt>IPP_TAG_UNSUPPORTED_GROUP</tt> </td><td>Unsupported attributes group</td></tr>
<tr><td><tt>IPP_TAG_UNSUPPORTED_VALUE</tt> </td><td>Unsupported value</td></tr>
<tr><td><tt>IPP_TAG_URI</tt> </td><td>URI value</td></tr>
<tr><td><tt>IPP_TAG_URISCHEME</tt> </td><td>URI scheme value</td></tr>
<tr><td><tt>IPP_TAG_ZERO</tt> </td><td>Zero tag - used for separators</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
<ul>
<li><a href='#cupsDoAuthentication'><tt>cupsDoAuthentication()</tt></a> <span class='info'> CUPS 1.1.20 </span></li>
<li><a href='#cupsDoFileRequest'><tt>cupsDoFileRequest()</tt></a> </li>
<li><a href='#cupsDoRequest'><tt>cupsDoRequest()</tt></a> </li>
<li><a href='#cupsEncodeOptions'><tt>cupsEncodeOptions()</tt></a> </li>
<li><a href='#cupsEncodeOptions2'><tt>cupsEncodeOptions2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAddrAny'><tt>httpAddrAny()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAddrEqual'><tt>httpAddrEqual()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAddrLength'><tt>httpAddrLength()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAddrLocalhost'><tt>httpAddrLocalhost()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAddrLookup'><tt>httpAddrLookup()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAddrString'><tt>httpAddrString()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAssembleURI'><tt>httpAssembleURI()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpAssembleURIf'><tt>httpAssembleURIf()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpBlocking'><tt>httpBlocking()</tt></a> </li>
<li><a href='#httpCheck'><tt>httpCheck()</tt></a> </li>
<li><a href='#httpClearCookie'><tt>httpClearCookie()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#httpClearFields'><tt>httpClearFields()</tt></a> </li>
<li><a href='#httpClose'><tt>httpClose()</tt></a> </li>
<li><a href='#httpConnect'><tt>httpConnect()</tt></a> </li>
<li><a href='#httpConnectEncrypt'><tt>httpConnectEncrypt()</tt></a> </li>
<li><a href='#httpDecode64'><tt>httpDecode64()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpDecode64_2'><tt>httpDecode64_2()</tt></a> <span class='info'> CUPS 1.1.21 </span></li>
<li><a href='#httpDelete'><tt>httpDelete()</tt></a> </li>
<li><a href='#httpEncode64'><tt>httpEncode64()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpEncode64_2'><tt>httpEncode64_2()</tt></a> <span class='info'> CUPS 1.1.21 </span></li>
<li><a href='#httpEncryption'><tt>httpEncryption()</tt></a> </li>
<li><a href='#httpError'><tt>httpError()</tt></a> </li>
<li><a href='#httpFlush'><tt>httpFlush()</tt></a> </li>
<li><a href='#httpFlushWrite'><tt>httpFlushWrite()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGet'><tt>httpGet()</tt></a> </li>
<li><a href='#httpGetBlocking'><tt>httpGetBlocking()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGetCookie'><tt>httpGetCookie()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#httpGetDateString'><tt>httpGetDateString()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpGetDateString2'><tt>httpGetDateString2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGetDateTime'><tt>httpGetDateTime()</tt></a> </li>
<li><a href='#httpGetFd'><tt>httpGetFd()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGetField'><tt>httpGetField()</tt></a> </li>
<li><a href='#httpGetHostByName'><tt>httpGetHostByName()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpGetHostname'><tt>httpGetHostname()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGetLength'><tt>httpGetLength()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpGetLength2'><tt>httpGetLength2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGetStatus'><tt>httpGetStatus()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGetSubField'><tt>httpGetSubField()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpGetSubField2'><tt>httpGetSubField2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpGets'><tt>httpGets()</tt></a> </li>
<li><a href='#httpHead'><tt>httpHead()</tt></a> </li>
<li><a href='#httpInitialize'><tt>httpInitialize()</tt></a> </li>
<li><a href='#httpMD5'><tt>httpMD5()</tt></a> </li>
<li><a href='#httpMD5Final'><tt>httpMD5Final()</tt></a> </li>
<li><a href='#httpMD5String'><tt>httpMD5String()</tt></a> </li>
<li><a href='#httpOptions'><tt>httpOptions()</tt></a> </li>
<li><a href='#httpPost'><tt>httpPost()</tt></a> </li>
<li><a href='#httpPut'><tt>httpPut()</tt></a> </li>
<li><a href='#httpRead'><tt>httpRead()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpRead2'><tt>httpRead2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpReconnect'><tt>httpReconnect()</tt></a> </li>
<li><a href='#httpSeparate'><tt>httpSeparate()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpSeparate2'><tt>httpSeparate2()</tt></a> <span class='info'> CUPS 1.1.21 </span></li>
<li><a href='#httpSeparateURI'><tt>httpSeparateURI()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpSetCookie'><tt>httpSetCookie()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#httpSetExpect'><tt>httpSetExpect()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpSetField'><tt>httpSetField()</tt></a> </li>
<li><a href='#httpSetLength'><tt>httpSetLength()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#httpStatus'><tt>httpStatus()</tt></a> </li>
<li><a href='#httpTrace'><tt>httpTrace()</tt></a> </li>
<li><a href='#httpUpdate'><tt>httpUpdate()</tt></a> </li>
<li><a href='#httpWait'><tt>httpWait()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#httpWrite'><tt>httpWrite()</tt></a> <span class='info'> DEPRECATED </span></li>
<li><a href='#httpWrite2'><tt>httpWrite2()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippAddBoolean'><tt>ippAddBoolean()</tt></a> </li>
<li><a href='#ippAddBooleans'><tt>ippAddBooleans()</tt></a> </li>
<li><a href='#ippAddCollection'><tt>ippAddCollection()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#ippAddCollections'><tt>ippAddCollections()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#ippAddDate'><tt>ippAddDate()</tt></a> </li>
<li><a href='#ippAddInteger'><tt>ippAddInteger()</tt></a> </li>
<li><a href='#ippAddIntegers'><tt>ippAddIntegers()</tt></a> </li>
<li><a href='#ippAddOctetString'><tt>ippAddOctetString()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippAddRange'><tt>ippAddRange()</tt></a> </li>
<li><a href='#ippAddRanges'><tt>ippAddRanges()</tt></a> </li>
<li><a href='#ippAddResolution'><tt>ippAddResolution()</tt></a> </li>
<li><a href='#ippAddResolutions'><tt>ippAddResolutions()</tt></a> </li>
<li><a href='#ippAddSeparator'><tt>ippAddSeparator()</tt></a> </li>
<li><a href='#ippAddString'><tt>ippAddString()</tt></a> </li>
<li><a href='#ippAddStrings'><tt>ippAddStrings()</tt></a> </li>
<li><a href='#ippDateToTime'><tt>ippDateToTime()</tt></a> </li>
<li><a href='#ippDelete'><tt>ippDelete()</tt></a> </li>
<li><a href='#ippDeleteAttribute'><tt>ippDeleteAttribute()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#ippErrorString'><tt>ippErrorString()</tt></a> </li>
<li><a href='#ippErrorValue'><tt>ippErrorValue()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippFindAttribute'><tt>ippFindAttribute()</tt></a> </li>
<li><a href='#ippFindNextAttribute'><tt>ippFindNextAttribute()</tt></a> </li>
<li><a href='#ippLength'><tt>ippLength()</tt></a> </li>
<li><a href='#ippNew'><tt>ippNew()</tt></a> </li>
<li><a href='#ippNewRequest'><tt>ippNewRequest()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippOpString'><tt>ippOpString()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippOpValue'><tt>ippOpValue()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippPort'><tt>ippPort()</tt></a> </li>
<li><a href='#ippRead'><tt>ippRead()</tt></a> </li>
<li><a href='#ippReadFile'><tt>ippReadFile()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#ippReadIO'><tt>ippReadIO()</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ippSetPort'><tt>ippSetPort()</tt></a> </li>
<li><a href='#ippTimeToDate'><tt>ippTimeToDate()</tt></a> </li>
<li><a href='#ippWrite'><tt>ippWrite()</tt></a> </li>
<li><a href='#ippWriteFile'><tt>ippWriteFile()</tt></a> <span class='info'> CUPS 1.1.19 </span></li>
<li><a href='#ippWriteIO'><tt>ippWriteIO()</tt></a> <span class='info'> CUPS 1.2 </span></li>
</ul>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.20 </span><a name='cupsDoAuthentication'>cupsDoAuthentication()</a></h3>
<h4>Description</h4>
<p>Authenticate a request.
This function should be called in response to a HTTP_UNAUTHORIZED
status, prior to resubmitting your request.
</p>
<h4>Syntax</h4>
<pre>
int
cupsDoAuthentication(
<a href='#http_t'>http_t</a> * http,
const char * method,
const char * resource);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
<tr><td><tt>method</tt></td><td>Request method (GET, POST, PUT)</td></tr>
<tr><td><tt>resource</tt></td><td>Resource path</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>0 on success, -1 on error</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='cupsDoFileRequest'>cupsDoFileRequest()</a></h3>
<h4>Description</h4>
<p>Do an IPP request with a file.
This function sends the IPP request to the specified server, retrying
and authenticating as necessary. The request is freed with ippDelete()
after receiving a valid IPP response.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_t'>ipp_t</a> *
cupsDoFileRequest(
<a href='#http_t'>http_t</a> * http,
<a href='#ipp_t'>ipp_t</a> * request,
const char * resource,
const char * filename);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
<tr><td><tt>request</tt></td><td>IPP request</td></tr>
<tr><td><tt>resource</tt></td><td>HTTP resource for POST</td></tr>
<tr><td><tt>filename</tt></td><td>File to send or NULL for none</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Response data</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='cupsDoRequest'>cupsDoRequest()</a></h3>
<h4>Description</h4>
<p>Do an IPP request.
This function sends the IPP request to the specified server, retrying
and authenticating as necessary. The request is freed with ippDelete()
after receiving a valid IPP response.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_t'>ipp_t</a> *
cupsDoRequest(
<a href='#http_t'>http_t</a> * http,
<a href='#ipp_t'>ipp_t</a> * request,
const char * resource);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
<tr><td><tt>request</tt></td><td>IPP request</td></tr>
<tr><td><tt>resource</tt></td><td>HTTP resource for POST</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Response data</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='cupsEncodeOptions'>cupsEncodeOptions()</a></h3>
<h4>Description</h4>
<p>Encode printer options into IPP attributes.
This function adds operation, job, and then subscription attributes,
in that order. Use the cupsEncodeOptions2() function to add attributes
for a single group.</p>
<h4>Syntax</h4>
<pre>
void
cupsEncodeOptions(
<a href='#ipp_t'>ipp_t</a> * ipp,
int num_options,
cups_option_t * options);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>Request to add to</td></tr>
<tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
<tr><td><tt>options</tt></td><td>Options</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='cupsEncodeOptions2'>cupsEncodeOptions2()</a></h3>
<h4>Description</h4>
<p>Encode printer options into IPP attributes for a group.
This function only adds attributes for a single group. Call this
function multiple times for each group, or use cupsEncodeOptions()
to add the standard groups.
</p>
<h4>Syntax</h4>
<pre>
void
cupsEncodeOptions2(
<a href='#ipp_t'>ipp_t</a> * ipp,
int num_options,
cups_option_t * options,
ipp_tag_t group_tag);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>Request to add to</td></tr>
<tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
<tr><td><tt>options</tt></td><td>Options</td></tr>
<tr><td><tt>group_tag</tt></td><td>Group to encode</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrAny'>httpAddrAny()</a></h3>
<h4>Description</h4>
<p>Check for the "any" address.
</p>
<h4>Syntax</h4>
<pre>
int
httpAddrAny(
const <a href='#http_addr_t'>http_addr_t</a> * addr);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr</tt></td><td>Address to check</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>1 if "any", 0 otherwise</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrEqual'>httpAddrEqual()</a></h3>
<h4>Description</h4>
<p>Compare two addresses.
</p>
<h4>Syntax</h4>
<pre>
int
httpAddrEqual(
const <a href='#http_addr_t'>http_addr_t</a> * addr1,
const <a href='#http_addr_t'>http_addr_t</a> * addr2);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr1</tt></td><td>First address</td></tr>
<tr><td><tt>addr2</tt></td><td>Second address</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>1 if equal, 0 if not</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrLength'>httpAddrLength()</a></h3>
<h4>Description</h4>
<p>Return the length of the address in bytes.
</p>
<h4>Syntax</h4>
<pre>
int
httpAddrLength(
const <a href='#http_addr_t'>http_addr_t</a> * addr);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr</tt></td><td>Address</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Length in bytes</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrLocalhost'>httpAddrLocalhost()</a></h3>
<h4>Description</h4>
<p>Check for the local loopback address.
</p>
<h4>Syntax</h4>
<pre>
int
httpAddrLocalhost(
const <a href='#http_addr_t'>http_addr_t</a> * addr);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr</tt></td><td>Address to check</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>1 if local host, 0 otherwise</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrLookup'>httpAddrLookup()</a></h3>
<h4>Description</h4>
<p>Lookup the hostname associated with the address.
</p>
<h4>Syntax</h4>
<pre>
char *
httpAddrLookup(
const <a href='#http_addr_t'>http_addr_t</a> * addr,
char * name,
int namelen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr</tt></td><td>Address to lookup</td></tr>
<tr><td><tt>name</tt></td><td>Host name buffer</td></tr>
<tr><td><tt>namelen</tt></td><td>Size of name buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Host name</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAddrString'>httpAddrString()</a></h3>
<h4>Description</h4>
<p>Convert an address to a numeric string.
</p>
<h4>Syntax</h4>
<pre>
char *
httpAddrString(
const <a href='#http_addr_t'>http_addr_t</a> * addr,
char * s,
int slen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr</tt></td><td>Address to convert</td></tr>
<tr><td><tt>s</tt></td><td>String buffer</td></tr>
<tr><td><tt>slen</tt></td><td>Length of string</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Numeric address string</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAssembleURI'>httpAssembleURI()</a></h3>
<h4>Description</h4>
<p>Assemble a uniform resource identifier from its
components.
This function escapes reserved characters in the URI depending on the
value of the "encoding" argument. You should use this function in
place of traditional string functions whenever you need to create a
URI string.
</p>
<h4>Syntax</h4>
<pre>
http_uri_status_t
httpAssembleURI(
http_uri_coding_t encoding,
char * uri,
int urilen,
const char * scheme,
const char * username,
const char * host,
int port,
const char * resource);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>encoding</tt></td><td>Encoding flags</td></tr>
<tr><td><tt>uri</tt></td><td>URI buffer</td></tr>
<tr><td><tt>urilen</tt></td><td>Size of URI buffer</td></tr>
<tr><td><tt>scheme</tt></td><td>Scheme name</td></tr>
<tr><td><tt>username</tt></td><td>Username</td></tr>
<tr><td><tt>host</tt></td><td>Hostname or address</td></tr>
<tr><td><tt>port</tt></td><td>Port number</td></tr>
<tr><td><tt>resource</tt></td><td>Resource</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>URI status</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpAssembleURIf'>httpAssembleURIf()</a></h3>
<h4>Description</h4>
<p>Assemble a uniform resource identifier from its
components with a formatted resource.
This function creates a formatted version of the resource string
argument "resourcef" and escapes reserved characters in the URI
depending on the value of the "encoding" argument. You should use
this function in place of traditional string functions whenever
you need to create a URI string.
</p>
<h4>Syntax</h4>
<pre>
http_uri_status_t
httpAssembleURIf(
http_uri_coding_t encoding,
char * uri,
int urilen,
const char * scheme,
const char * username,
const char * host,
int port,
const char * resourcef,
...);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>encoding</tt></td><td>Encoding flags</td></tr>
<tr><td><tt>uri</tt></td><td>URI buffer</td></tr>
<tr><td><tt>urilen</tt></td><td>Size of URI buffer</td></tr>
<tr><td><tt>scheme</tt></td><td>Scheme name</td></tr>
<tr><td><tt>username</tt></td><td>Username</td></tr>
<tr><td><tt>host</tt></td><td>Hostname or address</td></tr>
<tr><td><tt>port</tt></td><td>Port number</td></tr>
<tr><td><tt>resourcef</tt></td><td>Printf-style resource</td></tr>
<tr><td><tt>...</tt></td><td>Additional arguments as needed</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>URI status</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpBlocking'>httpBlocking()</a></h3>
<h4>Description</h4>
<p>Set blocking/non-blocking behavior on a connection.</p>
<h4>Syntax</h4>
<pre>
void
httpBlocking(
<a href='#http_t'>http_t</a> * http,
int b);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>b</tt></td><td>1 = blocking, 0 = non-blocking</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpCheck'>httpCheck()</a></h3>
<h4>Description</h4>
<p>Check to see if there is a pending response from the server.</p>
<h4>Syntax</h4>
<pre>
int
httpCheck(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>0 = no data, 1 = data available</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpClearCookie'>httpClearCookie()</a></h3>
<h4>Description</h4>
<p>Clear the cookie value(s).
</p>
<h4>Syntax</h4>
<pre>
void
httpClearCookie(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpClearFields'>httpClearFields()</a></h3>
<h4>Description</h4>
<p>Clear HTTP request fields.</p>
<h4>Syntax</h4>
<pre>
void
httpClearFields(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpClose'>httpClose()</a></h3>
<h4>Description</h4>
<p>Close an HTTP connection...</p>
<h4>Syntax</h4>
<pre>
void
httpClose(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpConnect'>httpConnect()</a></h3>
<h4>Description</h4>
<p>Connect to a HTTP server.</p>
<h4>Syntax</h4>
<pre>
<a href='#http_t'>http_t</a> *
httpConnect(
const char * host,
int port);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>host</tt></td><td>Host to connect to</td></tr>
<tr><td><tt>port</tt></td><td>Port number</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New HTTP connection</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpConnectEncrypt'>httpConnectEncrypt()</a></h3>
<h4>Description</h4>
<p>Connect to a HTTP server using encryption.</p>
<h4>Syntax</h4>
<pre>
<a href='#http_t'>http_t</a> *
httpConnectEncrypt(
const char * host,
int port,
<a href='#http_encryption_t'>http_encryption_t</a> encryption);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>host</tt></td><td>Host to connect to</td></tr>
<tr><td><tt>port</tt></td><td>Port number</td></tr>
<tr><td><tt>encryption</tt></td><td>Type of encryption to use</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New HTTP connection</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpDecode64'>httpDecode64()</a></h3>
<h4>Description</h4>
<p>Base64-decode a string.
This function is deprecated. Use the httpDecode64_2() function instead
which provides buffer length arguments.
</p>
<h4>Syntax</h4>
<pre>
char *
httpDecode64(
char * out,
const char * in);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>out</tt></td><td>String to write to</td></tr>
<tr><td><tt>in</tt></td><td>String to read from</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Decoded string</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.21 </span><a name='httpDecode64_2'>httpDecode64_2()</a></h3>
<h4>Description</h4>
<p>Base64-decode a string.
</p>
<h4>Syntax</h4>
<pre>
char *
httpDecode64_2(
char * out,
int * outlen,
const char * in);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>out</tt></td><td>String to write to</td></tr>
<tr><td><tt>outlen</tt></td><td>Size of output string</td></tr>
<tr><td><tt>in</tt></td><td>String to read from</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Decoded string</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpDelete'>httpDelete()</a></h3>
<h4>Description</h4>
<p>Send a DELETE request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpDelete(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI to delete</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpEncode64'>httpEncode64()</a></h3>
<h4>Description</h4>
<p>Base64-encode a string.
This function is deprecated. Use the httpEncode64_2() function instead
which provides buffer length arguments.
</p>
<h4>Syntax</h4>
<pre>
char *
httpEncode64(
char * out,
const char * in);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>out</tt></td><td>String to write to</td></tr>
<tr><td><tt>in</tt></td><td>String to read from</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Encoded string</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.21 </span><a name='httpEncode64_2'>httpEncode64_2()</a></h3>
<h4>Description</h4>
<p>Base64-encode a string.
</p>
<h4>Syntax</h4>
<pre>
char *
httpEncode64_2(
char * out,
int outlen,
const char * in,
int inlen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>out</tt></td><td>String to write to</td></tr>
<tr><td><tt>outlen</tt></td><td>Size of output string</td></tr>
<tr><td><tt>in</tt></td><td>String to read from</td></tr>
<tr><td><tt>inlen</tt></td><td>Size of input string</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Encoded string</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpEncryption'>httpEncryption()</a></h3>
<h4>Description</h4>
<p>Set the required encryption on the link.</p>
<h4>Syntax</h4>
<pre>
int
httpEncryption(
<a href='#http_t'>http_t</a> * http,
<a href='#http_encryption_t'>http_encryption_t</a> e);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>e</tt></td><td>New encryption preference</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>-1 on error, 0 on success</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpError'>httpError()</a></h3>
<h4>Description</h4>
<p>Get the last error on a connection.</p>
<h4>Syntax</h4>
<pre>
int
httpError(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Error code (errno) value</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpFlush'>httpFlush()</a></h3>
<h4>Description</h4>
<p>Flush data from a HTTP connection.</p>
<h4>Syntax</h4>
<pre>
void
httpFlush(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpFlushWrite'>httpFlushWrite()</a></h3>
<h4>Description</h4>
<p>Flush data in write buffer.
</p>
<h4>Syntax</h4>
<pre>
int
httpFlushWrite(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Bytes written or -1 on error</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpGet'>httpGet()</a></h3>
<h4>Description</h4>
<p>Send a GET request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpGet(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI to get</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetBlocking'>httpGetBlocking()</a></h3>
<h4>Description</h4>
<p>Get the blocking/non-block state of a connection.
</p>
<h4>Syntax</h4>
<pre>
int
httpGetBlocking(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>1 if blocking, 0 if non-blocking</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpGetCookie'>httpGetCookie()</a></h3>
<h4>Description</h4>
<p>Get any cookie data from the response.
</p>
<h4>Syntax</h4>
<pre>
const char *
httpGetCookie(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connecion</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Cookie data or NULL</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetDateString'>httpGetDateString()</a></h3>
<h4>Description</h4>
<p>Get a formatted date/time string from a time value.
</p>
<h4>Syntax</h4>
<pre>
const char *
httpGetDateString(
time_t t);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>t</tt></td><td>UNIX time</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Date/time string</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetDateString2'>httpGetDateString2()</a></h3>
<h4>Description</h4>
<p>Get a formatted date/time string from a time value.
</p>
<h4>Syntax</h4>
<pre>
const char *
httpGetDateString2(
time_t t,
char * s,
int slen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>t</tt></td><td>UNIX time</td></tr>
<tr><td><tt>s</tt></td><td>String buffer</td></tr>
<tr><td><tt>slen</tt></td><td>Size of string buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Date/time string</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpGetDateTime'>httpGetDateTime()</a></h3>
<h4>Description</h4>
<p>Get a time value from a formatted date/time string.</p>
<h4>Syntax</h4>
<pre>
time_t
httpGetDateTime(
const char * s);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>s</tt></td><td>Date/time string</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>UNIX time</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetFd'>httpGetFd()</a></h3>
<h4>Description</h4>
<p>Get the file descriptor associated with a connection.
</p>
<h4>Syntax</h4>
<pre>
int
httpGetFd(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>File descriptor or -1 if none</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpGetField'>httpGetField()</a></h3>
<h4>Description</h4>
<p>Get a field value from a request/response.</p>
<h4>Syntax</h4>
<pre>
const char *
httpGetField(
<a href='#http_t'>http_t</a> * http,
http_field_t field);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>field</tt></td><td>Field to get</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Field value</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetHostByName'>httpGetHostByName()</a></h3>
<h4>Description</h4>
<p>Lookup a hostname or IPv4 address, and return
address records for the specified name.
</p>
<h4>Syntax</h4>
<pre>
struct hostent *
httpGetHostByName(
const char * name);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>name</tt></td><td>Hostname or IP address</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Host entry</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetHostname'>httpGetHostname()</a></h3>
<h4>Description</h4>
<p>Get the FQDN for the connection or local system.
When "http" points to a connected socket, return the hostname or
address that was used in the call to httpConnect() or httpConnectEncrypt().
Otherwise, return the FQDN for the local system using both gethostname()
and gethostbyname() to get the local hostname with domain.
</p>
<h4>Syntax</h4>
<pre>
const char *
httpGetHostname(
<a href='#http_t'>http_t</a> * http,
char * s,
int slen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection or NULL</td></tr>
<tr><td><tt>s</tt></td><td>String buffer for name</td></tr>
<tr><td><tt>slen</tt></td><td>Size of buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>FQDN for connection or system</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetLength'>httpGetLength()</a></h3>
<h4>Description</h4>
<p>Get the amount of data remaining from the
content-length or transfer-encoding fields.
This function is deprecated and will not return lengths larger than
2^31 - 1; use httpGetLength2() instead.
</p>
<h4>Syntax</h4>
<pre>
int
httpGetLength(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Content length</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetLength2'>httpGetLength2()</a></h3>
<h4>Description</h4>
<p>Get the amount of data remaining from the
content-length or transfer-encoding fields.
This function returns the complete content length, even for
content larger than 2^31 - 1.
</p>
<h4>Syntax</h4>
<pre>
off_t
httpGetLength2(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Content length</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetStatus'>httpGetStatus()</a></h3>
<h4>Description</h4>
<p>Get the status of the last HTTP request.
</p>
<h4>Syntax</h4>
<pre>
http_status_t
httpGetStatus(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>HTTP status</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpGetSubField'>httpGetSubField()</a></h3>
<h4>Description</h4>
<p>Get a sub-field value.
</p>
<h4>Syntax</h4>
<pre>
char *
httpGetSubField(
<a href='#http_t'>http_t</a> * http,
http_field_t field,
const char * name,
char * value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>field</tt></td><td>Field index</td></tr>
<tr><td><tt>name</tt></td><td>Name of sub-field</td></tr>
<tr><td><tt>value</tt></td><td>Value string</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Value or NULL</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpGetSubField2'>httpGetSubField2()</a></h3>
<h4>Description</h4>
<p>Get a sub-field value.
</p>
<h4>Syntax</h4>
<pre>
char *
httpGetSubField2(
<a href='#http_t'>http_t</a> * http,
http_field_t field,
const char * name,
char * value,
int valuelen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>field</tt></td><td>Field index</td></tr>
<tr><td><tt>name</tt></td><td>Name of sub-field</td></tr>
<tr><td><tt>value</tt></td><td>Value string</td></tr>
<tr><td><tt>valuelen</tt></td><td>Size of value buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Value or NULL</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpGets'>httpGets()</a></h3>
<h4>Description</h4>
<p>Get a line of text from a HTTP connection.</p>
<h4>Syntax</h4>
<pre>
char *
httpGets(
char * line,
int length,
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>line</tt></td><td>Line to read into</td></tr>
<tr><td><tt>length</tt></td><td>Max length of buffer</td></tr>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Line or NULL</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpHead'>httpHead()</a></h3>
<h4>Description</h4>
<p>Send a HEAD request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpHead(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI for head</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpInitialize'>httpInitialize()</a></h3>
<h4>Description</h4>
<p>Initialize the HTTP interface library and set the
default HTTP proxy (if any).</p>
<h4>Syntax</h4>
<pre>
void
httpInitialize(void);
</pre>
<h4>Arguments</h4>
<p>None.</p>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpMD5'>httpMD5()</a></h3>
<h4>Description</h4>
<p>Compute the MD5 sum of the username:group:password.</p>
<h4>Syntax</h4>
<pre>
char *
httpMD5(
const char * username,
const char * realm,
const char * passwd,
char md5[33]);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>username</tt></td><td>User name</td></tr>
<tr><td><tt>realm</tt></td><td>Realm name</td></tr>
<tr><td><tt>passwd</tt></td><td>Password string</td></tr>
<tr><td><tt>md5[33]</tt></td><td>MD5 string</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>MD5 sum</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpMD5Final'>httpMD5Final()</a></h3>
<h4>Description</h4>
<p>Combine the MD5 sum of the username, group, and password
with the server-supplied nonce value, method, and
request-uri.</p>
<h4>Syntax</h4>
<pre>
char *
httpMD5Final(
const char * nonce,
const char * method,
const char * resource,
char md5[33]);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>nonce</tt></td><td>Server nonce value</td></tr>
<tr><td><tt>method</tt></td><td>METHOD (GET, POST, etc.)</td></tr>
<tr><td><tt>resource</tt></td><td>Resource path</td></tr>
<tr><td><tt>md5[33]</tt></td><td>MD5 sum</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New sum</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpMD5String'>httpMD5String()</a></h3>
<h4>Description</h4>
<p>Convert an MD5 sum to a character string.</p>
<h4>Syntax</h4>
<pre>
char *
httpMD5String(
const unsigned char * sum,
char md5[33]);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>sum</tt></td><td>MD5 sum data</td></tr>
<tr><td><tt>md5[33]</tt></td><td>MD5 sum in hex</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>MD5 sum in hex</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpOptions'>httpOptions()</a></h3>
<h4>Description</h4>
<p>Send an OPTIONS request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpOptions(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI for options</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpPost'>httpPost()</a></h3>
<h4>Description</h4>
<p>Send a POST request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpPost(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI for post</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpPut'>httpPut()</a></h3>
<h4>Description</h4>
<p>Send a PUT request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpPut(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI to put</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpRead'>httpRead()</a></h3>
<h4>Description</h4>
<p>Read data from a HTTP connection.
This function is deprecated. Use the httpRead2() function which can
read more than 2GB of data.
</p>
<h4>Syntax</h4>
<pre>
int
httpRead(
<a href='#http_t'>http_t</a> * http,
char * buffer,
int length);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
<tr><td><tt>length</tt></td><td>Maximum number of bytes</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Number of bytes read</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpRead2'>httpRead2()</a></h3>
<h4>Description</h4>
<p>Read data from a HTTP connection.
</p>
<h4>Syntax</h4>
<pre>
ssize_t
httpRead2(
<a href='#http_t'>http_t</a> * http,
char * buffer,
size_t length);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
<tr><td><tt>length</tt></td><td>Maximum number of bytes</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Number of bytes read</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpReconnect'>httpReconnect()</a></h3>
<h4>Description</h4>
<p>Reconnect to a HTTP server.</p>
<h4>Syntax</h4>
<pre>
int
httpReconnect(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>0 on success, non-zero on failure</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpSeparate'>httpSeparate()</a></h3>
<h4>Description</h4>
<p>Separate a Universal Resource Identifier into its
components.
This function is deprecated; use the httpSeparateURI() function instead.
</p>
<h4>Syntax</h4>
<pre>
void
httpSeparate(
const char * uri,
char * scheme,
char * username,
char * host,
int * port,
char * resource);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr>
<tr><td><tt>scheme</tt></td><td>Scheme [32] (http, https, etc.)</td></tr>
<tr><td><tt>username</tt></td><td>Username [1024]</td></tr>
<tr><td><tt>host</tt></td><td>Hostname [1024]</td></tr>
<tr><td><tt>port</tt></td><td>Port number to use</td></tr>
<tr><td><tt>resource</tt></td><td>Resource/filename [1024]</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.21 </span><a name='httpSeparate2'>httpSeparate2()</a></h3>
<h4>Description</h4>
<p>Separate a Universal Resource Identifier into its
components.
This function is deprecated; use the httpSeparateURI() function instead.
</p>
<h4>Syntax</h4>
<pre>
void
httpSeparate2(
const char * uri,
char * scheme,
int schemelen,
char * username,
int usernamelen,
char * host,
int hostlen,
int * port,
char * resource,
int resourcelen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr>
<tr><td><tt>scheme</tt></td><td>Scheme (http, https, etc.)</td></tr>
<tr><td><tt>schemelen</tt></td><td>Size of scheme buffer</td></tr>
<tr><td><tt>username</tt></td><td>Username</td></tr>
<tr><td><tt>usernamelen</tt></td><td>Size of username buffer</td></tr>
<tr><td><tt>host</tt></td><td>Hostname</td></tr>
<tr><td><tt>hostlen</tt></td><td>Size of hostname buffer</td></tr>
<tr><td><tt>port</tt></td><td>Port number to use</td></tr>
<tr><td><tt>resource</tt></td><td>Resource/filename</td></tr>
<tr><td><tt>resourcelen</tt></td><td>Size of resource buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpSeparateURI'>httpSeparateURI()</a></h3>
<h4>Description</h4>
<p>Separate a Universal Resource Identifier into its
components.
</p>
<h4>Syntax</h4>
<pre>
http_uri_status_t
httpSeparateURI(
http_uri_coding_t decoding,
const char * uri,
char * scheme,
int schemelen,
char * username,
int usernamelen,
char * host,
int hostlen,
int * port,
char * resource,
int resourcelen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>decoding</tt></td><td>Decoding flags</td></tr>
<tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr>
<tr><td><tt>scheme</tt></td><td>Scheme (http, https, etc.)</td></tr>
<tr><td><tt>schemelen</tt></td><td>Size of scheme buffer</td></tr>
<tr><td><tt>username</tt></td><td>Username</td></tr>
<tr><td><tt>usernamelen</tt></td><td>Size of username buffer</td></tr>
<tr><td><tt>host</tt></td><td>Hostname</td></tr>
<tr><td><tt>hostlen</tt></td><td>Size of hostname buffer</td></tr>
<tr><td><tt>port</tt></td><td>Port number to use</td></tr>
<tr><td><tt>resource</tt></td><td>Resource/filename</td></tr>
<tr><td><tt>resourcelen</tt></td><td>Size of resource buffer</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Result of separation</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpSetCookie'>httpSetCookie()</a></h3>
<h4>Description</h4>
<p>Set the cookie value(s)...
</p>
<h4>Syntax</h4>
<pre>
void
httpSetCookie(
<a href='#http_t'>http_t</a> * http,
const char * cookie);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>Connection</td></tr>
<tr><td><tt>cookie</tt></td><td>Cookie string</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpSetExpect'>httpSetExpect()</a></h3>
<h4>Description</h4>
<p>Set the Expect: header in a request.
Currently only HTTP_CONTINUE is supported for the "expect" argument.
</p>
<h4>Syntax</h4>
<pre>
void
httpSetExpect(
<a href='#http_t'>http_t</a> * http,
http_status_t expect);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>expect</tt></td><td>HTTP status to expect (HTTP_CONTINUE)</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpSetField'>httpSetField()</a></h3>
<h4>Description</h4>
<p>Set the value of an HTTP header.</p>
<h4>Syntax</h4>
<pre>
void
httpSetField(
<a href='#http_t'>http_t</a> * http,
http_field_t field,
const char * value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>field</tt></td><td>Field index</td></tr>
<tr><td><tt>value</tt></td><td>Value</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpSetLength'>httpSetLength()</a></h3>
<h4>Description</h4>
<p>Set the content-length and content-encoding.
</p>
<h4>Syntax</h4>
<pre>
void
httpSetLength(
<a href='#http_t'>http_t</a> * http,
size_t length);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>length</tt></td><td>Length (0 for chunked)</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpStatus'>httpStatus()</a></h3>
<h4>Description</h4>
<p>Return a short string describing a HTTP status code.</p>
<h4>Syntax</h4>
<pre>
const char *
httpStatus(
http_status_t status);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>status</tt></td><td>HTTP status code</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>String or NULL</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpTrace'>httpTrace()</a></h3>
<h4>Description</h4>
<p>Send an TRACE request to the server.</p>
<h4>Syntax</h4>
<pre>
int
httpTrace(
<a href='#http_t'>http_t</a> * http,
const char * uri);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>uri</tt></td><td>URI for trace</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Status of call (0 = success)</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='httpUpdate'>httpUpdate()</a></h3>
<h4>Description</h4>
<p>Update the current HTTP state for incoming data.</p>
<h4>Syntax</h4>
<pre>
http_status_t
httpUpdate(
<a href='#http_t'>http_t</a> * http);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>HTTP status</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='httpWait'>httpWait()</a></h3>
<h4>Description</h4>
<p>Wait for data available on a connection.
</p>
<h4>Syntax</h4>
<pre>
int
httpWait(
<a href='#http_t'>http_t</a> * http,
int msec);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>msec</tt></td><td>Milliseconds to wait</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>1 if data is available, 0 otherwise</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> DEPRECATED </span><a name='httpWrite'>httpWrite()</a></h3>
<h4>Description</h4>
<p>Write data to a HTTP connection.
This function is deprecated. Use the httpWrite2() function which can
write more than 2GB of data.
</p>
<h4>Syntax</h4>
<pre>
int
httpWrite(
<a href='#http_t'>http_t</a> * http,
const char * buffer,
int length);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
<tr><td><tt>length</tt></td><td>Number of bytes to write</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Number of bytes written</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='httpWrite2'>httpWrite2()</a></h3>
<h4>Description</h4>
<p>Write data to a HTTP connection.
</p>
<h4>Syntax</h4>
<pre>
ssize_t
httpWrite2(
<a href='#http_t'>http_t</a> * http,
const char * buffer,
size_t length);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
<tr><td><tt>length</tt></td><td>Number of bytes to write</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Number of bytes written</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddBoolean'>ippAddBoolean()</a></h3>
<h4>Description</h4>
<p>Add a boolean attribute to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddBoolean(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
char value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>value</tt></td><td>Value of attribute</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddBooleans'>ippAddBooleans()</a></h3>
<h4>Description</h4>
<p>Add an array of boolean values.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddBooleans(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
int num_values,
const char * values);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
<tr><td><tt>values</tt></td><td>Values</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippAddCollection'>ippAddCollection()</a></h3>
<h4>Description</h4>
<p>Add a collection value.
</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddCollection(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
<a href='#ipp_t'>ipp_t</a> * value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>value</tt></td><td>Value</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippAddCollections'>ippAddCollections()</a></h3>
<h4>Description</h4>
<p>Add an array of collection values.
</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddCollections(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
int num_values,
const <a href='#ipp_t'>ipp_t</a> ** values);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
<tr><td><tt>values</tt></td><td>Values</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddDate'>ippAddDate()</a></h3>
<h4>Description</h4>
<p>Add a date attribute to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddDate(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>value</tt></td><td>Value</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddInteger'>ippAddInteger()</a></h3>
<h4>Description</h4>
<p>Add a integer attribute to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddInteger(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
ipp_tag_t type,
const char * name,
int value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>value</tt></td><td>Value of attribute</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddIntegers'>ippAddIntegers()</a></h3>
<h4>Description</h4>
<p>Add an array of integer values.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddIntegers(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
ipp_tag_t type,
const char * name,
int num_values,
const int * values);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
<tr><td><tt>values</tt></td><td>Values</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippAddOctetString'>ippAddOctetString()</a></h3>
<h4>Description</h4>
<p>Add an octetString value to an IPP message.
</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddOctetString(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
const void * data,
int datalen);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>data</tt></td><td>octetString data</td></tr>
<tr><td><tt>datalen</tt></td><td>Length of data in bytes</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddRange'>ippAddRange()</a></h3>
<h4>Description</h4>
<p>Add a range of values to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddRange(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
int lower,
int upper);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>lower</tt></td><td>Lower value</td></tr>
<tr><td><tt>upper</tt></td><td>Upper value</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddRanges'>ippAddRanges()</a></h3>
<h4>Description</h4>
<p>Add ranges of values to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddRanges(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
int num_values,
const int * lower,
const int * upper);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
<tr><td><tt>lower</tt></td><td>Lower values</td></tr>
<tr><td><tt>upper</tt></td><td>Upper values</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddResolution'>ippAddResolution()</a></h3>
<h4>Description</h4>
<p>Add a resolution value to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddResolution(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
ipp_res_t units,
int xres,
int yres);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>units</tt></td><td>Units for resolution</td></tr>
<tr><td><tt>xres</tt></td><td>X resolution</td></tr>
<tr><td><tt>yres</tt></td><td>Y resolution</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddResolutions'>ippAddResolutions()</a></h3>
<h4>Description</h4>
<p>Add resolution values to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddResolutions(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
const char * name,
int num_values,
ipp_res_t units,
const int * xres,
const int * yres);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
<tr><td><tt>units</tt></td><td>Units for resolution</td></tr>
<tr><td><tt>xres</tt></td><td>X resolutions</td></tr>
<tr><td><tt>yres</tt></td><td>Y resolutions</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddSeparator'>ippAddSeparator()</a></h3>
<h4>Description</h4>
<p>Add a group separator to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddSeparator(
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddString'>ippAddString()</a></h3>
<h4>Description</h4>
<p>Add a language-encoded string to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddString(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
ipp_tag_t type,
const char * name,
const char * charset,
const char * value);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>charset</tt></td><td>Character set</td></tr>
<tr><td><tt>value</tt></td><td>Value</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippAddStrings'>ippAddStrings()</a></h3>
<h4>Description</h4>
<p>Add language-encoded strings to an IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippAddStrings(
<a href='#ipp_t'>ipp_t</a> * ipp,
ipp_tag_t group,
ipp_tag_t type,
const char * name,
int num_values,
const char * charset,
const char *const * values);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>group</tt></td><td>IPP group</td></tr>
<tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
<tr><td><tt>charset</tt></td><td>Character set</td></tr>
<tr><td><tt>values</tt></td><td>Values</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>New attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippDateToTime'>ippDateToTime()</a></h3>
<h4>Description</h4>
<p>Convert from RFC 1903 Date/Time format to UNIX time
in seconds.</p>
<h4>Syntax</h4>
<pre>
time_t
ippDateToTime(
const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * date);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>date</tt></td><td>RFC 1903 date info</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>UNIX time value</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippDelete'>ippDelete()</a></h3>
<h4>Description</h4>
<p>Delete an IPP message.</p>
<h4>Syntax</h4>
<pre>
void
ippDelete(
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippDeleteAttribute'>ippDeleteAttribute()</a></h3>
<h4>Description</h4>
<p>Delete a single attribute in an IPP message.
</p>
<h4>Syntax</h4>
<pre>
void
ippDeleteAttribute(
<a href='#ipp_t'>ipp_t</a> * ipp,
<a href='#ipp_attribute_t'>ipp_attribute_t</a> * attr);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>attr</tt></td><td>Attribute to delete</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippErrorString'>ippErrorString()</a></h3>
<h4>Description</h4>
<p>Return a name for the given status code.</p>
<h4>Syntax</h4>
<pre>
const char *
ippErrorString(
ipp_status_t error);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>error</tt></td><td>Error status</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Text string</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippErrorValue'>ippErrorValue()</a></h3>
<h4>Description</h4>
<p>Return a status code for the given name.
</p>
<h4>Syntax</h4>
<pre>
ipp_status_t
ippErrorValue(
const char * name);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>name</tt></td><td>Name</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>IPP status code</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippFindAttribute'>ippFindAttribute()</a></h3>
<h4>Description</h4>
<p>Find a named attribute in a request...</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippFindAttribute(
<a href='#ipp_t'>ipp_t</a> * ipp,
const char * name,
ipp_tag_t type);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Matching attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippFindNextAttribute'>ippFindNextAttribute()</a></h3>
<h4>Description</h4>
<p>Find the next named attribute in a request...</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_attribute_t'>ipp_attribute_t</a> *
ippFindNextAttribute(
<a href='#ipp_t'>ipp_t</a> * ipp,
const char * name,
ipp_tag_t type);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
<tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
<tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Matching attribute</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippLength'>ippLength()</a></h3>
<h4>Description</h4>
<p>Compute the length of an IPP message.</p>
<h4>Syntax</h4>
<pre>
size_t
ippLength(
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Size of IPP message</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippNew'>ippNew()</a></h3>
<h4>Description</h4>
<p>Allocate a new IPP message.</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_t'>ipp_t</a> *
ippNew(void);
</pre>
<h4>Arguments</h4>
<p>None.</p>
<h4>Returns</h4>
<p>New IPP message</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippNewRequest'>ippNewRequest()</a></h3>
<h4>Description</h4>
<p>Allocate a new IPP request message.
The new request message is initialized with the attributes-charset and
attributes-natural-language attributes added. The
attributes-natural-language value is derived from the current locale.
</p>
<h4>Syntax</h4>
<pre>
<a href='#ipp_t'>ipp_t</a> *
ippNewRequest(
ipp_op_t op);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>op</tt></td><td>Operation code</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>IPP request message</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippOpString'>ippOpString()</a></h3>
<h4>Description</h4>
<p>Return a name for the given operation id.
</p>
<h4>Syntax</h4>
<pre>
const char *
ippOpString(
ipp_op_t op);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>op</tt></td><td>Operation ID</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Name</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippOpValue'>ippOpValue()</a></h3>
<h4>Description</h4>
<p>Return an operation id for the given name.
</p>
<h4>Syntax</h4>
<pre>
ipp_op_t
ippOpValue(
const char * name);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>name</tt></td><td>Textual name</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Operation ID</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippPort'>ippPort()</a></h3>
<h4>Description</h4>
<p>Return the default IPP port number.</p>
<h4>Syntax</h4>
<pre>
int
ippPort(void);
</pre>
<h4>Arguments</h4>
<p>None.</p>
<h4>Returns</h4>
<p>Port number</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippRead'>ippRead()</a></h3>
<h4>Description</h4>
<p>Read data for an IPP message from a HTTP connection.</p>
<h4>Syntax</h4>
<pre>
ipp_state_t
ippRead(
<a href='#http_t'>http_t</a> * http,
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Current state</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippReadFile'>ippReadFile()</a></h3>
<h4>Description</h4>
<p>Read data for an IPP message from a file.
</p>
<h4>Syntax</h4>
<pre>
ipp_state_t
ippReadFile(
int fd,
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>fd</tt></td><td>HTTP data</td></tr>
<tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Current state</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippReadIO'>ippReadIO()</a></h3>
<h4>Description</h4>
<p>Read data for an IPP message.
</p>
<h4>Syntax</h4>
<pre>
ipp_state_t
ippReadIO(
void * src,
<a href='#ipp_iocb_t'>ipp_iocb_t</a> cb,
int blocking,
<a href='#ipp_t'>ipp_t</a> * parent,
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>src</tt></td><td>Data source</td></tr>
<tr><td><tt>cb</tt></td><td>Read callback function</td></tr>
<tr><td><tt>blocking</tt></td><td>Use blocking IO?</td></tr>
<tr><td><tt>parent</tt></td><td>Parent request, if any</td></tr>
<tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Current state</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippSetPort'>ippSetPort()</a></h3>
<h4>Description</h4>
<p>Set the default port number.</p>
<h4>Syntax</h4>
<pre>
void
ippSetPort(
int p);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>p</tt></td><td>Port number to use</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Nothing.</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippTimeToDate'>ippTimeToDate()</a></h3>
<h4>Description</h4>
<p>Convert from UNIX time to RFC 1903 format.</p>
<h4>Syntax</h4>
<pre>
const <a href='#ipp_uchar_t'>ipp_uchar_t</a> *
ippTimeToDate(
time_t t);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>t</tt></td><td>UNIX time value</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>RFC-1903 date/time data</p>
<!-- NEW PAGE -->
<h3 class='title'><a name='ippWrite'>ippWrite()</a></h3>
<h4>Description</h4>
<p>Write data for an IPP message to a HTTP connection.</p>
<h4>Syntax</h4>
<pre>
ipp_state_t
ippWrite(
<a href='#http_t'>http_t</a> * http,
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
<tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Current state</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.1.19 </span><a name='ippWriteFile'>ippWriteFile()</a></h3>
<h4>Description</h4>
<p>Write data for an IPP message to a file.
</p>
<h4>Syntax</h4>
<pre>
ipp_state_t
ippWriteFile(
int fd,
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>fd</tt></td><td>HTTP data</td></tr>
<tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Current state</p>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ippWriteIO'>ippWriteIO()</a></h3>
<h4>Description</h4>
<p>Write data for an IPP message.
</p>
<h4>Syntax</h4>
<pre>
ipp_state_t
ippWriteIO(
void * dst,
<a href='#ipp_iocb_t'>ipp_iocb_t</a> cb,
int blocking,
<a href='#ipp_t'>ipp_t</a> * parent,
<a href='#ipp_t'>ipp_t</a> * ipp);
</pre>
<h4>Arguments</h4>
<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>dst</tt></td><td>Destination</td></tr>
<tr><td><tt>cb</tt></td><td>Write callback function</td></tr>
<tr><td><tt>blocking</tt></td><td>Use blocking IO?</td></tr>
<tr><td><tt>parent</tt></td><td>Parent IPP message</td></tr>
<tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
</tbody></table></div>
<h4>Returns</h4>
<p>Current state</p>
<!-- NEW PAGE -->
<h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
<ul>
<li><a href='#http_addrlist_s'><tt>http_addrlist_s</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ipp_attribute_s'><tt>ipp_attribute_s</tt></a> </li>
<li><a href='#ipp_s'><tt>ipp_s</tt></a> </li>
</ul>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='http_addrlist_s'>http_addrlist_s</a></h3>
<h4>Description</h4>
<p>Socket address list, which is
used to enumerate all of the
addresses that are associated
with a hostname. </p>
<h4>Definition</h4>
<pre>
struct http_addrlist_s
{
<a href='#http_addr_t'>http_addr_t</a> addr;
struct <a href='#http_addrlist_s'>http_addrlist_s</a> * next;
};
</pre>
<h4>Members</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>addr</tt> </td><td>Address</td></tr>
<tr><td><tt>next</tt> </td><td>Pointer to next address in list</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_attribute_s'>ipp_attribute_s</a></h3>
<h4>Description</h4>
<p>Attribute</p>
<h4>Definition</h4>
<pre>
struct ipp_attribute_s
{
char * name;
struct <a href='#ipp_attribute_s'>ipp_attribute_s</a> * next;
int num_values;
ipp_tag_t group_tag, value_tag;
<a href='#ipp_value_t'>ipp_value_t</a> values[1];
};
</pre>
<h4>Members</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>name</tt> </td><td>Name of attribute</td></tr>
<tr><td><tt>next</tt> </td><td>Next attribute in list</td></tr>
<tr><td><tt>num_values</tt> </td><td>Number of values</td></tr>
<tr><td><tt>value_tag</tt> </td><td>What type of value is it?</td></tr>
<tr><td><tt>values[1]</tt> </td><td>Values</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_s'>ipp_s</a></h3>
<h4>Description</h4>
<p>IPP Request/Response/Notification</p>
<h4>Definition</h4>
<pre>
struct ipp_s
{
<a href='#ipp_attribute_t'>ipp_attribute_t</a> * attrs;
<a href='#ipp_attribute_t'>ipp_attribute_t</a> * current;
ipp_tag_t curtag;
<a href='#ipp_attribute_t'>ipp_attribute_t</a> * last;
<a href='#ipp_attribute_t'>ipp_attribute_t</a> * prev;
<a href='#ipp_request_t'>ipp_request_t</a> request;
ipp_state_t state;
};
</pre>
<h4>Members</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>attrs</tt> </td><td>Attributes</td></tr>
<tr><td><tt>current</tt> </td><td>Current attribute (for read/write)</td></tr>
<tr><td><tt>curtag</tt> </td><td>Current attribute group tag</td></tr>
<tr><td><tt>last</tt> </td><td>Last attribute in list</td></tr>
<tr><td><tt>prev</tt> </td><td>Previous attribute (for read)</td></tr>
<tr><td><tt>request</tt> </td><td>Request header</td></tr>
<tr><td><tt>state</tt> </td><td>State of request</td></tr>
</tbody></table></div>
<!-- NEW PAGE -->
<h2 class='title'><a name='TYPES'>Types</a></h2>
<ul>
<li><a href='#http_addrlist_t'><tt>http_addrlist_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#http_auth_t'><tt>http_auth_t</tt></a> </li>
<li><a href='#http_encoding_t'><tt>http_encoding_t</tt></a> </li>
<li><a href='#http_encryption_t'><tt>http_encryption_t</tt></a> </li>
<li><a href='#http_t'><tt>http_t</tt></a> </li>
<li><a href='#ipp_attribute_t'><tt>ipp_attribute_t</tt></a> </li>
<li><a href='#ipp_iocb_t'><tt>ipp_iocb_t</tt></a> <span class='info'> CUPS 1.2 </span></li>
<li><a href='#ipp_request_t'><tt>ipp_request_t</tt></a> </li>
<li><a href='#ipp_t'><tt>ipp_t</tt></a> </li>
<li><a href='#ipp_uchar_t'><tt>ipp_uchar_t</tt></a> </li>
<li><a href='#ipp_value_t'><tt>ipp_value_t</tt></a> </li>
</ul>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='http_addrlist_t'>http_addrlist_t</a></h3>
<h4>Description</h4>
<p>Socket address list, which is
used to enumerate all of the
addresses that are associated
with a hostname. </p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#http_addrlist_s'>http_addrlist_s</a> / http_addrlist_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_auth_t'>http_auth_t</a></h3>
<h4>Description</h4>
<p>HTTP authentication types</p>
<h4>Definition</h4>
<pre>
typedef enum <a href='#http_auth_e'>http_auth_e</a> http_auth_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_encoding_t'>http_encoding_t</a></h3>
<h4>Description</h4>
<p>HTTP transfer encoding values</p>
<h4>Definition</h4>
<pre>
typedef enum <a href='#http_encoding_e'>http_encoding_e</a> http_encoding_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_encryption_t'>http_encryption_t</a></h3>
<h4>Description</h4>
<p>HTTP encryption values</p>
<h4>Definition</h4>
<pre>
typedef enum <a href='#http_encryption_e'>http_encryption_e</a> http_encryption_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='http_t'>http_t</a></h3>
<h4>Description</h4>
<p>HTTP connection structure.</p>
<h4>Definition</h4>
<pre>
typedef struct _http_s http_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_attribute_t'>ipp_attribute_t</a></h3>
<h4>Description</h4>
<p>Attribute</p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#ipp_attribute_s'>ipp_attribute_s</a> ipp_attribute_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><span class='info'> CUPS 1.2 </span><a name='ipp_iocb_t'>ipp_iocb_t</a></h3>
<h4>Description</h4>
<p>IPP IO Callback Function </p>
<h4>Definition</h4>
<pre>
typedef ssize_t (*ipp_iocb_t)(void *, <a href='#ipp_uchar_t'>ipp_uchar_t</a> *, size_t);
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_request_t'>ipp_request_t</a></h3>
<h4>Description</h4>
<p>Request Header</p>
<h4>Definition</h4>
<pre>
typedef union <a href='#ipp_request_u'>ipp_request_u</a> ipp_request_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_t'>ipp_t</a></h3>
<h4>Description</h4>
<p>Attribute Value</p>
<h4>Definition</h4>
<pre>
typedef struct <a href='#ipp_s'>ipp_s</a> ipp_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_uchar_t'>ipp_uchar_t</a></h3>
<h4>Description</h4>
<p>IPP status codes...</p>
<h4>Definition</h4>
<pre>
typedef typedef unsigned char ipp_uchar_t;
</pre>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_value_t'>ipp_value_t</a></h3>
<h4>Description</h4>
<p>New in CUPS 1.1.19</p>
<h4>Definition</h4>
<pre>
typedef union <a href='#ipp_value_u'>ipp_value_u</a> ipp_value_t;
</pre>
<!-- NEW PAGE -->
<h2 class='title'><a name='UNIONS'>Unions</a></h2>
<ul>
<li><a href='#ipp_request_u'><tt>ipp_request_u</tt></a> </li>
<li><a href='#ipp_value_u'><tt>ipp_value_u</tt></a> </li>
</ul>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_request_u'>ipp_request_u</a></h3>
<h4>Description</h4>
<p>Request Header</p>
<h4>Definition</h4>
<pre>
union ipp_request_u
{
};
</pre>
<h4>Members</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
</tbody></table></div>
<!-- NEW PAGE -->
<h3 class='title'><a name='ipp_value_u'>ipp_value_u</a></h3>
<h4>Description</h4>
<p>New in CUPS 1.1.19</p>
<h4>Definition</h4>
<pre>
union ipp_value_u
{
char boolean;
<a href='#ipp_t'>ipp_t</a> * collection;
<a href='#ipp_uchar_t'>ipp_uchar_t</a> date[11];
int integer;
};
</pre>
<h4>Members</h4>
<div class='table'><table align='center' border='1' width='80%'>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr><td><tt>boolean</tt> </td><td>Boolean value</td></tr>
<tr><td><tt>collection</tt> </td><td>Collection value</td></tr>
<tr><td><tt>date[11]</tt> </td><td>Date/time value</td></tr>
<tr><td><tt>integer</tt> </td><td>Integer/enumerated value</td></tr>
</tbody></table></div>
</body>
</html>
|