1 module soup.c.types; 2 3 public import gio.c.types; 4 public import glib.c.types; 5 public import gobject.c.types; 6 7 8 struct sockaddr { 9 ushort sa_family; // address family, AF_xxx 10 char[14] sa_data; // 14 bytes of protocol address 11 }; 12 13 /** 14 * The supported address families. 15 */ 16 public enum SoupAddressFamily 17 { 18 /** 19 * an invalid %SoupAddress 20 */ 21 INVALID = -1, 22 /** 23 * an IPv4 address 24 */ 25 IPV4 = 2, 26 /** 27 * an IPv6 address 28 */ 29 IPV6 = 10, 30 } 31 alias SoupAddressFamily AddressFamily; 32 33 public enum SoupCacheResponse 34 { 35 FRESH = 0, 36 NEEDS_VALIDATION = 1, 37 STALE = 2, 38 } 39 alias SoupCacheResponse CacheResponse; 40 41 /** 42 * The type of cache; this affects what kinds of responses will be 43 * saved. 44 * 45 * Since: 2.34 46 */ 47 public enum SoupCacheType 48 { 49 /** 50 * a single-user cache 51 */ 52 SINGLE_USER = 0, 53 /** 54 * a shared cache 55 */ 56 SHARED = 1, 57 } 58 alias SoupCacheType CacheType; 59 60 public enum SoupCacheability 61 { 62 CACHEABLE = 1, 63 UNCACHEABLE = 2, 64 INVALIDATES = 4, 65 VALIDATES = 8, 66 } 67 alias SoupCacheability Cacheability; 68 69 public enum SoupConnectionState 70 { 71 NEW = 0, 72 CONNECTING = 1, 73 IDLE = 2, 74 IN_USE = 3, 75 REMOTE_DISCONNECTED = 4, 76 DISCONNECTED = 5, 77 } 78 alias SoupConnectionState ConnectionState; 79 80 /** 81 * The policy for accepting or rejecting cookies returned in 82 * responses. 83 * 84 * Since: 2.30 85 */ 86 public enum SoupCookieJarAcceptPolicy 87 { 88 /** 89 * accept all cookies unconditionally. 90 */ 91 ALWAYS = 0, 92 /** 93 * reject all cookies unconditionally. 94 */ 95 NEVER = 1, 96 /** 97 * accept all cookies set by 98 * the main document loaded in the application using libsoup. An 99 * example of the most common case, web browsers, would be: If 100 * http://www.example.com is the page loaded, accept all cookies set 101 * by example.com, but if a resource from http://www.third-party.com 102 * is loaded from that page reject any cookie that it could try to 103 * set. For libsoup to be able to tell apart first party cookies from 104 * the rest, the application must call soup_message_set_first_party() 105 * on each outgoing #SoupMessage, setting the #SoupURI of the main 106 * document. If no first party is set in a message when this policy is 107 * in effect, cookies will be assumed to be third party by default. 108 */ 109 NO_THIRD_PARTY = 2, 110 /** 111 * accept all cookies 112 * set by the main document loaded in the application using libsoup, and 113 * from domains that have previously set at least one cookie when loaded 114 * as the main document. An example of the most common case, web browsers, 115 * would be: if http://www.example.com is the page loaded, accept all 116 * cookies set by example.com, but if a resource from http://www.third-party.com 117 * is loaded from that page, reject any cookie that it could try to 118 * set unless it already has a cookie in the cookie jar. For libsoup to 119 * be able to tell apart first party cookies from the rest, the 120 * application must call soup_message_set_first_party() on each outgoing 121 * #SoupMessage, setting the #SoupURI of the main document. If no first 122 * party is set in a message when this policy is in effect, cookies will 123 * be assumed to be third party by default. Since 2.72. 124 */ 125 GRANDFATHERED_THIRD_PARTY = 3, 126 } 127 alias SoupCookieJarAcceptPolicy CookieJarAcceptPolicy; 128 129 /** 130 * Date formats that soup_date_to_string() can use. 131 * 132 * @SOUP_DATE_HTTP and @SOUP_DATE_COOKIE always coerce the time to 133 * UTC. @SOUP_DATE_ISO8601_XMLRPC uses the time as given, ignoring the 134 * offset completely. @SOUP_DATE_RFC2822 and the other ISO 8601 135 * variants use the local time, appending the offset information if 136 * available. 137 * 138 * This enum may be extended with more values in future releases. 139 */ 140 public enum SoupDateFormat 141 { 142 /** 143 * RFC 1123 format, used by the HTTP "Date" header. Eg 144 * "Sun, 06 Nov 1994 08:49:37 GMT" 145 */ 146 HTTP = 1, 147 /** 148 * The format for the "Expires" timestamp in the 149 * Netscape cookie specification. Eg, "Sun, 06-Nov-1994 08:49:37 GMT". 150 */ 151 COOKIE = 2, 152 /** 153 * RFC 2822 format, eg "Sun, 6 Nov 1994 09:49:37 -0100" 154 */ 155 RFC2822 = 3, 156 /** 157 * ISO 8601 date/time with no optional 158 * punctuation. Eg, "19941106T094937-0100". 159 */ 160 ISO8601_COMPACT = 4, 161 /** 162 * ISO 8601 date/time with all optional 163 * punctuation. Eg, "1994-11-06T09:49:37-01:00". 164 */ 165 ISO8601_FULL = 5, 166 /** 167 * An alias for @SOUP_DATE_ISO8601_FULL. 168 */ 169 ISO8601 = 5, 170 /** 171 * ISO 8601 date/time as used by XML-RPC. 172 * Eg, "19941106T09:49:37". 173 */ 174 ISO8601_XMLRPC = 6, 175 } 176 alias SoupDateFormat DateFormat; 177 178 /** 179 * How a message body is encoded for transport 180 */ 181 public enum SoupEncoding 182 { 183 /** 184 * unknown / error 185 */ 186 UNRECOGNIZED = 0, 187 /** 188 * no body is present (which is not the same as a 189 * 0-length body, and only occurs in certain places) 190 */ 191 NONE = 1, 192 /** 193 * Content-Length encoding 194 */ 195 CONTENT_LENGTH = 2, 196 /** 197 * Response body ends when the connection is closed 198 */ 199 EOF = 3, 200 /** 201 * chunked encoding (currently only supported 202 * for response) 203 */ 204 CHUNKED = 4, 205 /** 206 * multipart/byteranges (Reserved for future 207 * use: NOT CURRENTLY IMPLEMENTED) 208 */ 209 BYTERANGES = 5, 210 } 211 alias SoupEncoding Encoding; 212 213 /** 214 * Represents the parsed value of the "Expect" header. 215 */ 216 public enum SoupExpectation 217 { 218 /** 219 * any unrecognized expectation 220 */ 221 UNRECOGNIZED = 1, 222 /** 223 * "100-continue" 224 */ 225 CONTINUE = 2, 226 } 227 alias SoupExpectation Expectation; 228 229 /** 230 * Indicates the HTTP protocol version being used. 231 */ 232 public enum SoupHTTPVersion 233 { 234 /** 235 * HTTP 1.0 (RFC 1945) 236 */ 237 HTTP_1_0 = 0, 238 /** 239 * HTTP 1.1 (RFC 2616) 240 */ 241 HTTP_1_1 = 1, 242 } 243 alias SoupHTTPVersion HTTPVersion; 244 245 public enum SoupKnownStatusCode 246 { 247 NONE = 0, 248 CANCELLED = 1, 249 CANT_RESOLVE = 2, 250 CANT_RESOLVE_PROXY = 3, 251 CANT_CONNECT = 4, 252 CANT_CONNECT_PROXY = 5, 253 SSL_FAILED = 6, 254 IO_ERROR = 7, 255 MALFORMED = 8, 256 TRY_AGAIN = 9, 257 TOO_MANY_REDIRECTS = 10, 258 TLS_FAILED = 11, 259 CONTINUE = 100, 260 SWITCHING_PROTOCOLS = 101, 261 PROCESSING = 102, 262 OK = 200, 263 CREATED = 201, 264 ACCEPTED = 202, 265 NON_AUTHORITATIVE = 203, 266 NO_CONTENT = 204, 267 RESET_CONTENT = 205, 268 PARTIAL_CONTENT = 206, 269 MULTI_STATUS = 207, 270 MULTIPLE_CHOICES = 300, 271 MOVED_PERMANENTLY = 301, 272 FOUND = 302, 273 MOVED_TEMPORARILY = 302, 274 SEE_OTHER = 303, 275 NOT_MODIFIED = 304, 276 USE_PROXY = 305, 277 NOT_APPEARING_IN_THIS_PROTOCOL = 306, 278 TEMPORARY_REDIRECT = 307, 279 BAD_REQUEST = 400, 280 UNAUTHORIZED = 401, 281 PAYMENT_REQUIRED = 402, 282 FORBIDDEN = 403, 283 NOT_FOUND = 404, 284 METHOD_NOT_ALLOWED = 405, 285 NOT_ACCEPTABLE = 406, 286 PROXY_AUTHENTICATION_REQUIRED = 407, 287 PROXY_UNAUTHORIZED = 407, 288 REQUEST_TIMEOUT = 408, 289 CONFLICT = 409, 290 GONE = 410, 291 LENGTH_REQUIRED = 411, 292 PRECONDITION_FAILED = 412, 293 REQUEST_ENTITY_TOO_LARGE = 413, 294 REQUEST_URI_TOO_LONG = 414, 295 UNSUPPORTED_MEDIA_TYPE = 415, 296 REQUESTED_RANGE_NOT_SATISFIABLE = 416, 297 INVALID_RANGE = 416, 298 EXPECTATION_FAILED = 417, 299 UNPROCESSABLE_ENTITY = 422, 300 LOCKED = 423, 301 FAILED_DEPENDENCY = 424, 302 INTERNAL_SERVER_ERROR = 500, 303 NOT_IMPLEMENTED = 501, 304 BAD_GATEWAY = 502, 305 SERVICE_UNAVAILABLE = 503, 306 GATEWAY_TIMEOUT = 504, 307 HTTP_VERSION_NOT_SUPPORTED = 505, 308 INSUFFICIENT_STORAGE = 507, 309 NOT_EXTENDED = 510, 310 } 311 alias SoupKnownStatusCode KnownStatusCode; 312 313 /** 314 * Describes the level of logging output to provide. 315 */ 316 public enum SoupLoggerLogLevel 317 { 318 /** 319 * No logging 320 */ 321 NONE = 0, 322 /** 323 * Log the Request-Line or Status-Line and 324 * the Soup-Debug pseudo-headers 325 */ 326 MINIMAL = 1, 327 /** 328 * Log the full request/response headers 329 */ 330 HEADERS = 2, 331 /** 332 * Log the full headers and request/response 333 * bodies. 334 */ 335 BODY = 3, 336 } 337 alias SoupLoggerLogLevel LoggerLogLevel; 338 339 /** 340 * Describes how #SoupBuffer should use the data passed in by the 341 * caller. 342 * 343 * See also soup_buffer_new_with_owner(), which allows to you create a 344 * buffer containing data which is owned by another object. 345 */ 346 public enum SoupMemoryUse 347 { 348 /** 349 * The memory is statically allocated and 350 * constant; libsoup can use the passed-in buffer directly and not 351 * need to worry about it being modified or freed. 352 */ 353 STATIC = 0, 354 /** 355 * The caller has allocated the memory for the 356 * #SoupBuffer's use; libsoup will assume ownership of it and free it 357 * (with g_free()) when it is done with it. 358 */ 359 TAKE = 1, 360 /** 361 * The passed-in data belongs to the caller; the 362 * #SoupBuffer will copy it into new memory, leaving the caller free 363 * to reuse the original memory. 364 */ 365 COPY = 2, 366 /** 367 * The passed-in data belongs to the caller, 368 * but will remain valid for the lifetime of the #SoupBuffer. The 369 * difference between this and @SOUP_MEMORY_STATIC is that if you copy 370 * a @SOUP_MEMORY_TEMPORARY buffer, it will make a copy of the memory 371 * as well, rather than reusing the original memory. 372 */ 373 TEMPORARY = 3, 374 } 375 alias SoupMemoryUse MemoryUse; 376 377 /** 378 * Various flags that can be set on a #SoupMessage to alter its 379 * behavior. 380 */ 381 public enum SoupMessageFlags 382 { 383 /** 384 * The session should not follow redirect 385 * (3xx) responses received by this message. 386 */ 387 NO_REDIRECT = 2, 388 /** 389 * The caller will rebuild the request 390 * body if the message is restarted; see 391 * soup_message_body_set_accumulate() for more details. 392 */ 393 CAN_REBUILD = 4, 394 /** 395 * Deprecated: equivalent to calling 396 * soup_message_body_set_accumulate() on the incoming message body 397 * (ie, #SoupMessage:response_body for a client-side request), 398 * passing %FALSE. 399 */ 400 OVERWRITE_CHUNKS = 8, 401 /** 402 * Set by #SoupContentDecoder to 403 * indicate that it has removed the Content-Encoding on a message (and 404 * so headers such as Content-Length may no longer accurately describe 405 * the body). 406 */ 407 CONTENT_DECODED = 16, 408 /** 409 * if set after an https response 410 * has been received, indicates that the server's SSL certificate is 411 * trusted according to the session's CA. 412 */ 413 CERTIFICATE_TRUSTED = 32, 414 /** 415 * Requests that the message should be 416 * sent on a newly-created connection, not reusing an existing 417 * persistent connection. Note that messages with non-idempotent 418 * #SoupMessage:method<!-- -->s behave this way by default, unless 419 * #SOUP_MESSAGE_IDEMPOTENT is set. 420 */ 421 NEW_CONNECTION = 64, 422 /** 423 * The message is considered idempotent, 424 * regardless its #SoupMessage:method, and allows reuse of existing 425 * idle connections, instead of always requiring a new one, unless 426 * #SOUP_MESSAGE_NEW_CONNECTION is set. 427 */ 428 IDEMPOTENT = 128, 429 /** 430 * Request that a new connection is 431 * created for the message if there aren't idle connections available 432 * and it's not possible to create new connections due to any of the 433 * connection limits has been reached. If a dedicated connection is 434 * eventually created for this message, it will be dropped when the 435 * message finishes. Since 2.50 436 */ 437 IGNORE_CONNECTION_LIMITS = 256, 438 /** 439 * The #SoupAuthManager should not use 440 * the credentials cache for this message, neither to use cached credentials 441 * to automatically authenticate this message nor to cache the credentials 442 * after the message is successfully authenticated. This applies to both server 443 * and proxy authentication. Note that #SoupSession::authenticate signal will 444 * be emitted, if you want to disable authentication for a message use 445 * soup_message_disable_feature() passing #SOUP_TYPE_AUTH_MANAGER instead. Since 2.58 446 */ 447 DO_NOT_USE_AUTH_CACHE = 512, 448 } 449 alias SoupMessageFlags MessageFlags; 450 451 /** 452 * Value passed to soup_message_headers_new() to set certain default 453 * behaviors. 454 */ 455 public enum SoupMessageHeadersType 456 { 457 /** 458 * request headers 459 */ 460 REQUEST = 0, 461 /** 462 * response headers 463 */ 464 RESPONSE = 1, 465 /** 466 * multipart body part headers 467 */ 468 MULTIPART = 2, 469 } 470 alias SoupMessageHeadersType MessageHeadersType; 471 472 /** 473 * Priorities that can be set on a #SoupMessage to instruct the 474 * message queue to process it before any other message with lower 475 * priority. 476 */ 477 public enum SoupMessagePriority 478 { 479 /** 480 * The lowest priority, the messages 481 * with this priority will be the last ones to be attended. 482 */ 483 VERY_LOW = 0, 484 /** 485 * Use this for low priority messages, a 486 * #SoupMessage with the default priority will be processed first. 487 */ 488 LOW = 1, 489 /** 490 * The default priotity, this is the 491 * priority assigned to the #SoupMessage by default. 492 */ 493 NORMAL = 2, 494 /** 495 * High priority, a #SoupMessage with 496 * this priority will be processed before the ones with the default 497 * priority. 498 */ 499 HIGH = 3, 500 /** 501 * The highest priority, use this 502 * for very urgent #SoupMessage as they will be the first ones to be 503 * attended. 504 */ 505 VERY_HIGH = 4, 506 } 507 alias SoupMessagePriority MessagePriority; 508 509 /** 510 * A #SoupRequest error. 511 * 512 * Since: 2.42 513 */ 514 public enum SoupRequestError 515 { 516 /** 517 * the URI could not be parsed 518 */ 519 BAD_URI = 0, 520 /** 521 * the URI scheme is not 522 * supported by this #SoupSession 523 */ 524 UNSUPPORTED_URI_SCHEME = 1, 525 /** 526 * the server's response could not 527 * be parsed 528 */ 529 PARSING = 2, 530 /** 531 * the server's response was in an 532 * unsupported format 533 */ 534 ENCODING = 3, 535 } 536 alias SoupRequestError RequestError; 537 538 public enum SoupRequesterError 539 { 540 BAD_URI = 0, 541 UNSUPPORTED_URI_SCHEME = 1, 542 } 543 alias SoupRequesterError RequesterError; 544 545 public enum SoupSameSitePolicy 546 { 547 /** 548 * The cookie is exposed with both cross-site and same-site requests 549 */ 550 NONE = 0, 551 /** 552 * The cookie is withheld on cross-site requests but exposed on cross-site navigations 553 */ 554 LAX = 1, 555 /** 556 * The cookie is only exposed for same-site requests 557 */ 558 STRICT = 2, 559 } 560 alias SoupSameSitePolicy SameSitePolicy; 561 562 /** 563 * Options to pass to soup_server_listen(), etc. 564 * 565 * %SOUP_SERVER_LISTEN_IPV4_ONLY and %SOUP_SERVER_LISTEN_IPV6_ONLY 566 * only make sense with soup_server_listen_all() and 567 * soup_server_listen_local(), not plain soup_server_listen() (which 568 * simply listens on whatever kind of socket you give it). And you 569 * cannot specify both of them in a single call. 570 * 571 * Since: 2.48 572 */ 573 public enum SoupServerListenOptions 574 { 575 /** 576 * Listen for https connections rather 577 * than plain http. 578 */ 579 HTTPS = 1, 580 /** 581 * Only listen on IPv4 interfaces. 582 */ 583 IPV4_ONLY = 2, 584 /** 585 * Only listen on IPv6 interfaces. 586 */ 587 IPV6_ONLY = 4, 588 } 589 alias SoupServerListenOptions ServerListenOptions; 590 591 /** 592 * Return value from the #SoupSocket IO methods. 593 */ 594 public enum SoupSocketIOStatus 595 { 596 /** 597 * Success 598 */ 599 OK = 0, 600 /** 601 * Cannot read/write any more at this time 602 */ 603 WOULD_BLOCK = 1, 604 /** 605 * End of file 606 */ 607 EOF = 2, 608 /** 609 * Other error 610 */ 611 ERROR = 3, 612 } 613 alias SoupSocketIOStatus SocketIOStatus; 614 615 /** 616 * These represent the known HTTP status code values, plus various 617 * network and internal errors. 618 * 619 * Note that no libsoup functions take or return this type directly; 620 * any function that works with status codes will accept unrecognized 621 * status codes as well. 622 * 623 * Prior to 2.44 this type was called 624 * <literal>SoupKnownStatusCode</literal>, but the individual values 625 * have always had the names they have now. 626 */ 627 public enum SoupStatus 628 { 629 /** 630 * No status available. (Eg, the message has not 631 * been sent yet) 632 */ 633 NONE = 0, 634 /** 635 * Message was cancelled locally 636 */ 637 CANCELLED = 1, 638 /** 639 * Unable to resolve destination host name 640 */ 641 CANT_RESOLVE = 2, 642 /** 643 * Unable to resolve proxy host name 644 */ 645 CANT_RESOLVE_PROXY = 3, 646 /** 647 * Unable to connect to remote host 648 */ 649 CANT_CONNECT = 4, 650 /** 651 * Unable to connect to proxy 652 */ 653 CANT_CONNECT_PROXY = 5, 654 /** 655 * SSL/TLS negotiation failed 656 */ 657 SSL_FAILED = 6, 658 /** 659 * A network error occurred, or the other end 660 * closed the connection unexpectedly 661 */ 662 IO_ERROR = 7, 663 /** 664 * Malformed data (usually a programmer error) 665 */ 666 MALFORMED = 8, 667 /** 668 * Used internally 669 */ 670 TRY_AGAIN = 9, 671 /** 672 * There were too many redirections 673 */ 674 TOO_MANY_REDIRECTS = 10, 675 /** 676 * Used internally 677 */ 678 TLS_FAILED = 11, 679 /** 680 * 100 Continue (HTTP) 681 */ 682 CONTINUE = 100, 683 /** 684 * 101 Switching Protocols (HTTP) 685 */ 686 SWITCHING_PROTOCOLS = 101, 687 /** 688 * 102 Processing (WebDAV) 689 */ 690 PROCESSING = 102, 691 /** 692 * 200 Success (HTTP). Also used by many lower-level 693 * soup routines to indicate success. 694 */ 695 OK = 200, 696 /** 697 * 201 Created (HTTP) 698 */ 699 CREATED = 201, 700 /** 701 * 202 Accepted (HTTP) 702 */ 703 ACCEPTED = 202, 704 /** 705 * 203 Non-Authoritative Information 706 * (HTTP) 707 */ 708 NON_AUTHORITATIVE = 203, 709 /** 710 * 204 No Content (HTTP) 711 */ 712 NO_CONTENT = 204, 713 /** 714 * 205 Reset Content (HTTP) 715 */ 716 RESET_CONTENT = 205, 717 /** 718 * 206 Partial Content (HTTP) 719 */ 720 PARTIAL_CONTENT = 206, 721 /** 722 * 207 Multi-Status (WebDAV) 723 */ 724 MULTI_STATUS = 207, 725 /** 726 * 300 Multiple Choices (HTTP) 727 */ 728 MULTIPLE_CHOICES = 300, 729 /** 730 * 301 Moved Permanently (HTTP) 731 */ 732 MOVED_PERMANENTLY = 301, 733 /** 734 * 302 Found (HTTP) 735 */ 736 FOUND = 302, 737 /** 738 * 302 Moved Temporarily (old name, 739 * RFC 2068) 740 */ 741 MOVED_TEMPORARILY = 302, 742 /** 743 * 303 See Other (HTTP) 744 */ 745 SEE_OTHER = 303, 746 /** 747 * 304 Not Modified (HTTP) 748 */ 749 NOT_MODIFIED = 304, 750 /** 751 * 305 Use Proxy (HTTP) 752 */ 753 USE_PROXY = 305, 754 /** 755 * 306 [Unused] (HTTP) 756 */ 757 NOT_APPEARING_IN_THIS_PROTOCOL = 306, 758 /** 759 * 307 Temporary Redirect (HTTP) 760 */ 761 TEMPORARY_REDIRECT = 307, 762 PERMANENT_REDIRECT = 308, 763 /** 764 * 400 Bad Request (HTTP) 765 */ 766 BAD_REQUEST = 400, 767 /** 768 * 401 Unauthorized (HTTP) 769 */ 770 UNAUTHORIZED = 401, 771 /** 772 * 402 Payment Required (HTTP) 773 */ 774 PAYMENT_REQUIRED = 402, 775 /** 776 * 403 Forbidden (HTTP) 777 */ 778 FORBIDDEN = 403, 779 /** 780 * 404 Not Found (HTTP) 781 */ 782 NOT_FOUND = 404, 783 /** 784 * 405 Method Not Allowed (HTTP) 785 */ 786 METHOD_NOT_ALLOWED = 405, 787 /** 788 * 406 Not Acceptable (HTTP) 789 */ 790 NOT_ACCEPTABLE = 406, 791 /** 792 * 407 Proxy Authentication 793 * Required (HTTP) 794 */ 795 PROXY_AUTHENTICATION_REQUIRED = 407, 796 /** 797 * shorter alias for 798 * %SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED 799 */ 800 PROXY_UNAUTHORIZED = 407, 801 /** 802 * 408 Request Timeout (HTTP) 803 */ 804 REQUEST_TIMEOUT = 408, 805 /** 806 * 409 Conflict (HTTP) 807 */ 808 CONFLICT = 409, 809 /** 810 * 410 Gone (HTTP) 811 */ 812 GONE = 410, 813 /** 814 * 411 Length Required (HTTP) 815 */ 816 LENGTH_REQUIRED = 411, 817 /** 818 * 412 Precondition Failed (HTTP) 819 */ 820 PRECONDITION_FAILED = 412, 821 /** 822 * 413 Request Entity Too Large 823 * (HTTP) 824 */ 825 REQUEST_ENTITY_TOO_LARGE = 413, 826 /** 827 * 414 Request-URI Too Long (HTTP) 828 */ 829 REQUEST_URI_TOO_LONG = 414, 830 /** 831 * 415 Unsupported Media Type 832 * (HTTP) 833 */ 834 UNSUPPORTED_MEDIA_TYPE = 415, 835 /** 836 * 416 Requested Range 837 * Not Satisfiable (HTTP) 838 */ 839 REQUESTED_RANGE_NOT_SATISFIABLE = 416, 840 /** 841 * shorter alias for 842 * %SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE 843 */ 844 INVALID_RANGE = 416, 845 /** 846 * 417 Expectation Failed (HTTP) 847 */ 848 EXPECTATION_FAILED = 417, 849 /** 850 * 422 Unprocessable Entity 851 * (WebDAV) 852 */ 853 UNPROCESSABLE_ENTITY = 422, 854 /** 855 * 423 Locked (WebDAV) 856 */ 857 LOCKED = 423, 858 /** 859 * 424 Failed Dependency (WebDAV) 860 */ 861 FAILED_DEPENDENCY = 424, 862 /** 863 * 500 Internal Server Error 864 * (HTTP) 865 */ 866 INTERNAL_SERVER_ERROR = 500, 867 /** 868 * 501 Not Implemented (HTTP) 869 */ 870 NOT_IMPLEMENTED = 501, 871 /** 872 * 502 Bad Gateway (HTTP) 873 */ 874 BAD_GATEWAY = 502, 875 /** 876 * 503 Service Unavailable (HTTP) 877 */ 878 SERVICE_UNAVAILABLE = 503, 879 /** 880 * 504 Gateway Timeout (HTTP) 881 */ 882 GATEWAY_TIMEOUT = 504, 883 /** 884 * 505 HTTP Version Not 885 * Supported (HTTP) 886 */ 887 HTTP_VERSION_NOT_SUPPORTED = 505, 888 /** 889 * 507 Insufficient Storage 890 * (WebDAV) 891 */ 892 INSUFFICIENT_STORAGE = 507, 893 /** 894 * 510 Not Extended (RFC 2774) 895 */ 896 NOT_EXTENDED = 510, 897 } 898 alias SoupStatus Status; 899 900 /** 901 * Error codes for %SOUP_TLD_ERROR. 902 * 903 * Since: 2.40 904 */ 905 public enum SoupTLDError 906 { 907 /** 908 * A hostname was syntactically 909 * invalid. 910 */ 911 INVALID_HOSTNAME = 0, 912 /** 913 * The passed-in "hostname" was 914 * actually an IP address (and thus has no base domain or 915 * public suffix). 916 */ 917 IS_IP_ADDRESS = 1, 918 /** 919 * The passed-in hostname 920 * did not have enough components. Eg, calling 921 * soup_tld_get_base_domain() on <literal>"co.uk"</literal>. 922 */ 923 NOT_ENOUGH_DOMAINS = 2, 924 /** 925 * The passed-in hostname has 926 * no recognized public suffix. 927 */ 928 NO_BASE_DOMAIN = 3, 929 NO_PSL_DATA = 4, 930 } 931 alias SoupTLDError TLDError; 932 933 /** 934 * Pre-defined close codes that can be passed to 935 * soup_websocket_connection_close() or received from 936 * soup_websocket_connection_get_close_code(). (However, other codes 937 * are also allowed.) 938 * 939 * Since: 2.50 940 */ 941 public enum SoupWebsocketCloseCode 942 { 943 /** 944 * a normal, non-error close 945 */ 946 NORMAL = 1000, 947 /** 948 * the client/server is going away 949 */ 950 GOING_AWAY = 1001, 951 /** 952 * a protocol error occurred 953 */ 954 PROTOCOL_ERROR = 1002, 955 /** 956 * the endpoint received data 957 * of a type that it does not support. 958 */ 959 UNSUPPORTED_DATA = 1003, 960 /** 961 * reserved value indicating that 962 * no close code was present; must not be sent. 963 */ 964 NO_STATUS = 1005, 965 /** 966 * reserved value indicating that 967 * the connection was closed abnormally; must not be sent. 968 */ 969 ABNORMAL = 1006, 970 /** 971 * the endpoint received data that 972 * was invalid (eg, non-UTF-8 data in a text message). 973 */ 974 BAD_DATA = 1007, 975 /** 976 * generic error code 977 * indicating some sort of policy violation. 978 */ 979 POLICY_VIOLATION = 1008, 980 /** 981 * the endpoint received a message 982 * that is too big to process. 983 */ 984 TOO_BIG = 1009, 985 /** 986 * the client is closing the 987 * connection because the server failed to negotiate a required 988 * extension. 989 */ 990 NO_EXTENSION = 1010, 991 /** 992 * the server is closing the 993 * connection because it was unable to fulfill the request. 994 */ 995 SERVER_ERROR = 1011, 996 /** 997 * reserved value indicating that 998 * the TLS handshake failed; must not be sent. 999 */ 1000 TLS_HANDSHAKE = 1015, 1001 } 1002 alias SoupWebsocketCloseCode WebsocketCloseCode; 1003 1004 /** 1005 * The type of a #SoupWebsocketConnection. 1006 * 1007 * Since: 2.50 1008 */ 1009 public enum SoupWebsocketConnectionType 1010 { 1011 /** 1012 * unknown/invalid connection 1013 */ 1014 UNKNOWN = 0, 1015 /** 1016 * a client-side connection 1017 */ 1018 CLIENT = 1, 1019 /** 1020 * a server-side connection 1021 */ 1022 SERVER = 2, 1023 } 1024 alias SoupWebsocketConnectionType WebsocketConnectionType; 1025 1026 /** 1027 * The type of data contained in a #SoupWebsocketConnection::message 1028 * signal. 1029 * 1030 * Since: 2.50 1031 */ 1032 public enum SoupWebsocketDataType 1033 { 1034 /** 1035 * UTF-8 text 1036 */ 1037 TEXT = 1, 1038 /** 1039 * binary data 1040 */ 1041 BINARY = 2, 1042 } 1043 alias SoupWebsocketDataType WebsocketDataType; 1044 1045 /** 1046 * WebSocket-related errors. 1047 * 1048 * Since: 2.50 1049 */ 1050 public enum SoupWebsocketError 1051 { 1052 /** 1053 * a generic error 1054 */ 1055 FAILED = 0, 1056 /** 1057 * attempted to handshake with a 1058 * server that does not appear to understand WebSockets. 1059 */ 1060 NOT_WEBSOCKET = 1, 1061 /** 1062 * the WebSocket handshake failed 1063 * because some detail was invalid (eg, incorrect accept key). 1064 */ 1065 BAD_HANDSHAKE = 2, 1066 /** 1067 * the WebSocket handshake failed 1068 * because the "Origin" header was not an allowed value. 1069 */ 1070 BAD_ORIGIN = 3, 1071 } 1072 alias SoupWebsocketError WebsocketError; 1073 1074 /** 1075 * The state of the WebSocket connection. 1076 * 1077 * Since: 2.50 1078 */ 1079 public enum SoupWebsocketState 1080 { 1081 /** 1082 * the connection is ready to send messages 1083 */ 1084 OPEN = 1, 1085 /** 1086 * the connection is in the process of 1087 * closing down; messages may be received, but not sent 1088 */ 1089 CLOSING = 2, 1090 /** 1091 * the connection is completely closed down 1092 */ 1093 CLOSED = 3, 1094 } 1095 alias SoupWebsocketState WebsocketState; 1096 1097 public enum SoupXMLRPCError 1098 { 1099 ARGUMENTS = 0, 1100 RETVAL = 1, 1101 } 1102 alias SoupXMLRPCError XMLRPCError; 1103 1104 /** 1105 * Pre-defined XML-RPC fault codes from <ulink 1106 * url="http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php">http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php</ulink>. 1107 * These are an extension, not part of the XML-RPC spec; you can't 1108 * assume servers will use them. 1109 */ 1110 public enum SoupXMLRPCFault 1111 { 1112 /** 1113 * request was not 1114 * well-formed 1115 */ 1116 PARSE_ERROR_NOT_WELL_FORMED = -32700, 1117 /** 1118 * request was in 1119 * an unsupported encoding 1120 */ 1121 PARSE_ERROR_UNSUPPORTED_ENCODING = -32701, 1122 /** 1123 * request contained an invalid character 1124 */ 1125 PARSE_ERROR_INVALID_CHARACTER_FOR_ENCODING = -32702, 1126 /** 1127 * request was not 1128 * valid XML-RPC 1129 */ 1130 SERVER_ERROR_INVALID_XML_RPC = -32600, 1131 /** 1132 * method 1133 * not found 1134 */ 1135 SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND = -32601, 1136 /** 1137 * invalid 1138 * parameters 1139 */ 1140 SERVER_ERROR_INVALID_METHOD_PARAMETERS = -32602, 1141 /** 1142 * internal 1143 * error 1144 */ 1145 SERVER_ERROR_INTERNAL_XML_RPC_ERROR = -32603, 1146 /** 1147 * start of reserved range for 1148 * application error codes 1149 */ 1150 APPLICATION_ERROR = -32500, 1151 /** 1152 * start of reserved range for 1153 * system error codes 1154 */ 1155 SYSTEM_ERROR = -32400, 1156 /** 1157 * start of reserved range for 1158 * transport error codes 1159 */ 1160 TRANSPORT_ERROR = -32300, 1161 } 1162 alias SoupXMLRPCFault XMLRPCFault; 1163 1164 struct SoupAddress 1165 { 1166 GObject parent; 1167 } 1168 1169 struct SoupAddressClass 1170 { 1171 GObjectClass parentClass; 1172 /** */ 1173 extern(C) void function() LibsoupReserved1; 1174 /** */ 1175 extern(C) void function() LibsoupReserved2; 1176 /** */ 1177 extern(C) void function() LibsoupReserved3; 1178 /** */ 1179 extern(C) void function() LibsoupReserved4; 1180 } 1181 1182 struct SoupAuth 1183 { 1184 GObject parent; 1185 char* realm; 1186 } 1187 1188 struct SoupAuthBasic; 1189 1190 struct SoupAuthClass 1191 { 1192 GObjectClass parentClass; 1193 const(char)* schemeName; 1194 uint strength; 1195 /** 1196 * 1197 * Params: 1198 * auth = a #SoupAuth 1199 * msg = the #SoupMessage @auth is being updated for 1200 * authHeader = the WWW-Authenticate/Proxy-Authenticate header 1201 * Returns: %TRUE if @auth is still a valid (but potentially 1202 * unauthenticated) #SoupAuth. %FALSE if something about @auth_params 1203 * could not be parsed or incorporated into @auth at all. 1204 */ 1205 extern(C) int function(SoupAuth* auth, SoupMessage* msg, GHashTable* authHeader) update; 1206 /** 1207 * 1208 * Params: 1209 * auth = a #SoupAuth 1210 * sourceUri = the URI of the request that @auth was generated in 1211 * response to. 1212 * Returns: the list of 1213 * paths, which can be freed with soup_auth_free_protection_space(). 1214 */ 1215 extern(C) GSList* function(SoupAuth* auth, SoupURI* sourceUri) getProtectionSpace; 1216 /** */ 1217 extern(C) void function(SoupAuth* auth, const(char)* username, const(char)* password) authenticate; 1218 /** 1219 * 1220 * Params: 1221 * auth = a #SoupAuth 1222 * Returns: %TRUE if @auth has been given a username and password 1223 */ 1224 extern(C) int function(SoupAuth* auth) isAuthenticated; 1225 /** 1226 * 1227 * Params: 1228 * auth = a #SoupAuth 1229 * msg = the #SoupMessage to be authorized 1230 * Returns: the "Authorization" header, which must be freed. 1231 */ 1232 extern(C) char* function(SoupAuth* auth, SoupMessage* msg) getAuthorization; 1233 /** 1234 * 1235 * Params: 1236 * auth = a #SoupAuth 1237 * msg = a #SoupMessage 1238 * Returns: %TRUE if @auth is ready to make a request with. 1239 */ 1240 extern(C) int function(SoupAuth* auth, SoupMessage* msg) isReady; 1241 /** 1242 * 1243 * Params: 1244 * auth = a #SoupAuth 1245 * Returns: %TRUE if @auth is able to accept credentials. 1246 */ 1247 extern(C) int function(SoupAuth* auth) canAuthenticate; 1248 /** */ 1249 extern(C) void function() LibsoupReserved3; 1250 /** */ 1251 extern(C) void function() LibsoupReserved4; 1252 } 1253 1254 struct SoupAuthDigest; 1255 1256 struct SoupAuthDomain 1257 { 1258 GObject parent; 1259 } 1260 1261 struct SoupAuthDomainBasic 1262 { 1263 SoupAuthDomain parent; 1264 } 1265 1266 struct SoupAuthDomainBasicClass 1267 { 1268 SoupAuthDomainClass parentClass; 1269 /** */ 1270 extern(C) void function() LibsoupReserved1; 1271 /** */ 1272 extern(C) void function() LibsoupReserved2; 1273 /** */ 1274 extern(C) void function() LibsoupReserved3; 1275 /** */ 1276 extern(C) void function() LibsoupReserved4; 1277 } 1278 1279 struct SoupAuthDomainClass 1280 { 1281 GObjectClass parentClass; 1282 /** */ 1283 extern(C) char* function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* header) accepts; 1284 /** */ 1285 extern(C) char* function(SoupAuthDomain* domain, SoupMessage* msg) challenge; 1286 /** 1287 * 1288 * Params: 1289 * domain = a #SoupAuthDomain 1290 * msg = a #SoupMessage 1291 * username = a username 1292 * password = a password 1293 * Returns: whether or not the message is authenticated 1294 */ 1295 extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, const(char)* password) checkPassword; 1296 /** */ 1297 extern(C) void function() LibsoupReserved2; 1298 /** */ 1299 extern(C) void function() LibsoupReserved3; 1300 /** */ 1301 extern(C) void function() LibsoupReserved4; 1302 } 1303 1304 struct SoupAuthDomainDigest 1305 { 1306 SoupAuthDomain parent; 1307 } 1308 1309 struct SoupAuthDomainDigestClass 1310 { 1311 SoupAuthDomainClass parentClass; 1312 /** */ 1313 extern(C) void function() LibsoupReserved1; 1314 /** */ 1315 extern(C) void function() LibsoupReserved2; 1316 /** */ 1317 extern(C) void function() LibsoupReserved3; 1318 /** */ 1319 extern(C) void function() LibsoupReserved4; 1320 } 1321 1322 struct SoupAuthManager 1323 { 1324 GObject parent; 1325 SoupAuthManagerPrivate* priv; 1326 } 1327 1328 struct SoupAuthManagerClass 1329 { 1330 GObjectClass parentClass; 1331 /** */ 1332 extern(C) void function(SoupAuthManager* manager, SoupMessage* msg, SoupAuth* auth, int retrying) authenticate; 1333 } 1334 1335 struct SoupAuthManagerPrivate; 1336 1337 struct SoupAuthNTLM; 1338 1339 struct SoupAuthNegotiate; 1340 1341 struct SoupBuffer 1342 { 1343 /** 1344 * the data 1345 */ 1346 void* data; 1347 /** 1348 * length of @data 1349 */ 1350 size_t length; 1351 } 1352 1353 struct SoupCache 1354 { 1355 GObject parentInstance; 1356 SoupCachePrivate* priv; 1357 } 1358 1359 struct SoupCacheClass 1360 { 1361 GObjectClass parentClass; 1362 /** */ 1363 extern(C) SoupCacheability function(SoupCache* cache, SoupMessage* msg) getCacheability; 1364 /** */ 1365 extern(C) void function() LibsoupReserved1; 1366 /** */ 1367 extern(C) void function() LibsoupReserved2; 1368 /** */ 1369 extern(C) void function() LibsoupReserved3; 1370 } 1371 1372 struct SoupCachePrivate; 1373 1374 struct SoupClientContext; 1375 1376 struct SoupConnection; 1377 1378 struct SoupContentDecoder 1379 { 1380 GObject parent; 1381 SoupContentDecoderPrivate* priv; 1382 } 1383 1384 struct SoupContentDecoderClass 1385 { 1386 GObjectClass parentClass; 1387 /** */ 1388 extern(C) void function() LibsoupReserved1; 1389 /** */ 1390 extern(C) void function() LibsoupReserved2; 1391 /** */ 1392 extern(C) void function() LibsoupReserved3; 1393 /** */ 1394 extern(C) void function() LibsoupReserved4; 1395 /** */ 1396 extern(C) void function() LibsoupReserved5; 1397 } 1398 1399 struct SoupContentDecoderPrivate; 1400 1401 struct SoupContentSniffer 1402 { 1403 GObject parent; 1404 SoupContentSnifferPrivate* priv; 1405 } 1406 1407 struct SoupContentSnifferClass 1408 { 1409 GObjectClass parentClass; 1410 /** 1411 * 1412 * Params: 1413 * sniffer = a #SoupContentSniffer 1414 * msg = the message to sniff 1415 * buffer = a buffer containing the start of @msg's response body 1416 * params = return 1417 * location for Content-Type parameters (eg, "charset"), or %NULL 1418 * Returns: the sniffed Content-Type of @buffer; this will never be %NULL, 1419 * but may be "application/octet-stream". 1420 */ 1421 extern(C) char* function(SoupContentSniffer* sniffer, SoupMessage* msg, SoupBuffer* buffer, GHashTable** params) sniff; 1422 /** 1423 * 1424 * Params: 1425 * sniffer = a #SoupContentSniffer 1426 * Returns: the number of bytes to sniff 1427 */ 1428 extern(C) size_t function(SoupContentSniffer* sniffer) getBufferSize; 1429 /** */ 1430 extern(C) void function() LibsoupReserved1; 1431 /** */ 1432 extern(C) void function() LibsoupReserved2; 1433 /** */ 1434 extern(C) void function() LibsoupReserved3; 1435 /** */ 1436 extern(C) void function() LibsoupReserved4; 1437 /** */ 1438 extern(C) void function() LibsoupReserved5; 1439 } 1440 1441 struct SoupContentSnifferPrivate; 1442 1443 struct SoupCookie 1444 { 1445 /** 1446 * the cookie name 1447 */ 1448 char* name; 1449 /** 1450 * the cookie value 1451 */ 1452 char* value; 1453 /** 1454 * the "domain" attribute, or else the hostname that the 1455 * cookie came from. 1456 */ 1457 char* domain; 1458 /** 1459 * the "path" attribute, or %NULL 1460 */ 1461 char* path; 1462 /** 1463 * the cookie expiration time, or %NULL for a session cookie 1464 */ 1465 SoupDate* expires; 1466 /** 1467 * %TRUE if the cookie should only be tranferred over SSL 1468 */ 1469 bool secure; 1470 /** 1471 * %TRUE if the cookie should not be exposed to scripts 1472 */ 1473 bool httpOnly; 1474 } 1475 1476 struct SoupCookieJar 1477 { 1478 GObject parent; 1479 } 1480 1481 struct SoupCookieJarClass 1482 { 1483 GObjectClass parentClass; 1484 /** */ 1485 extern(C) void function(SoupCookieJar* jar) save; 1486 /** 1487 * 1488 * Params: 1489 * jar = a #SoupCookieJar 1490 * Returns: %TRUE if @jar storage is persistent or %FALSE otherwise. 1491 */ 1492 extern(C) int function(SoupCookieJar* jar) isPersistent; 1493 /** */ 1494 extern(C) void function(SoupCookieJar* jar, SoupCookie* oldCookie, SoupCookie* newCookie) changed; 1495 /** */ 1496 extern(C) void function() LibsoupReserved1; 1497 /** */ 1498 extern(C) void function() LibsoupReserved2; 1499 } 1500 1501 struct SoupCookieJarDB 1502 { 1503 SoupCookieJar parent; 1504 } 1505 1506 struct SoupCookieJarDBClass 1507 { 1508 SoupCookieJarClass parentClass; 1509 /** */ 1510 extern(C) void function() LibsoupReserved1; 1511 /** */ 1512 extern(C) void function() LibsoupReserved2; 1513 /** */ 1514 extern(C) void function() LibsoupReserved3; 1515 /** */ 1516 extern(C) void function() LibsoupReserved4; 1517 } 1518 1519 struct SoupCookieJarText 1520 { 1521 SoupCookieJar parent; 1522 } 1523 1524 struct SoupCookieJarTextClass 1525 { 1526 SoupCookieJarClass parentClass; 1527 /** */ 1528 extern(C) void function() LibsoupReserved1; 1529 /** */ 1530 extern(C) void function() LibsoupReserved2; 1531 /** */ 1532 extern(C) void function() LibsoupReserved3; 1533 /** */ 1534 extern(C) void function() LibsoupReserved4; 1535 } 1536 1537 struct SoupDate 1538 { 1539 /** 1540 * the year, 1 to 9999 1541 */ 1542 int year; 1543 /** 1544 * the month, 1 to 12 1545 */ 1546 int month; 1547 /** 1548 * day of the month, 1 to 31 1549 */ 1550 int day; 1551 /** 1552 * hour of the day, 0 to 23 1553 */ 1554 int hour; 1555 /** 1556 * minute, 0 to 59 1557 */ 1558 int minute; 1559 /** 1560 * second, 0 to 59 (or up to 61 in the case of leap seconds) 1561 */ 1562 int second; 1563 /** 1564 * %TRUE if the date is in UTC 1565 */ 1566 bool utc; 1567 /** 1568 * offset from UTC 1569 */ 1570 int offset; 1571 } 1572 1573 struct SoupHSTSEnforcer 1574 { 1575 GObject parent; 1576 SoupHSTSEnforcerPrivate* priv; 1577 } 1578 1579 struct SoupHSTSEnforcerClass 1580 { 1581 /** 1582 * The parent class. 1583 */ 1584 GObjectClass parentClass; 1585 /** 1586 * 1587 * Params: 1588 * hstsEnforcer = a #SoupHSTSEnforcer 1589 * Returns: %TRUE if @hsts_enforcer storage is persistent or %FALSE otherwise. 1590 */ 1591 extern(C) int function(SoupHSTSEnforcer* hstsEnforcer) isPersistent; 1592 /** 1593 * 1594 * Params: 1595 * hstsEnforcer = a #SoupHSTSEnforcer 1596 * domain = a domain. 1597 * Returns: %TRUE if access to @domain should happen over HTTPS, false 1598 * otherwise. 1599 */ 1600 extern(C) int function(SoupHSTSEnforcer* hstsEnforcer, const(char)* domain) hasValidPolicy; 1601 /** */ 1602 extern(C) void function(SoupHSTSEnforcer* enforcer, SoupHSTSPolicy* oldPolicy, SoupHSTSPolicy* newPolicy) changed; 1603 /** */ 1604 extern(C) void function(SoupHSTSEnforcer* enforcer, SoupMessage* message) hstsEnforced; 1605 /** */ 1606 extern(C) void function() LibsoupReserved1; 1607 /** */ 1608 extern(C) void function() LibsoupReserved2; 1609 /** */ 1610 extern(C) void function() LibsoupReserved3; 1611 /** */ 1612 extern(C) void function() LibsoupReserved4; 1613 } 1614 1615 struct SoupHSTSEnforcerDB 1616 { 1617 SoupHSTSEnforcer parent; 1618 SoupHSTSEnforcerDBPrivate* priv; 1619 } 1620 1621 struct SoupHSTSEnforcerDBClass 1622 { 1623 SoupHSTSEnforcerClass parentClass; 1624 /** */ 1625 extern(C) void function() LibsoupReserved1; 1626 /** */ 1627 extern(C) void function() LibsoupReserved2; 1628 /** */ 1629 extern(C) void function() LibsoupReserved3; 1630 /** */ 1631 extern(C) void function() LibsoupReserved4; 1632 } 1633 1634 struct SoupHSTSEnforcerDBPrivate; 1635 1636 struct SoupHSTSEnforcerPrivate; 1637 1638 struct SoupHSTSPolicy 1639 { 1640 /** 1641 * The domain or hostname that the policy applies to 1642 */ 1643 char* domain; 1644 /** 1645 * The maximum age, in seconds, that the policy is valid 1646 */ 1647 ulong maxAge; 1648 /** 1649 * the policy expiration time, or %NULL for a permanent session policy 1650 */ 1651 SoupDate* expires; 1652 /** 1653 * %TRUE if the policy applies on subdomains 1654 */ 1655 bool includeSubdomains; 1656 } 1657 1658 struct SoupLogger 1659 { 1660 GObject parent; 1661 } 1662 1663 struct SoupLoggerClass 1664 { 1665 GObjectClass parentClass; 1666 /** */ 1667 extern(C) void function() LibsoupReserved1; 1668 /** */ 1669 extern(C) void function() LibsoupReserved2; 1670 /** */ 1671 extern(C) void function() LibsoupReserved3; 1672 /** */ 1673 extern(C) void function() LibsoupReserved4; 1674 } 1675 1676 struct SoupMessage 1677 { 1678 GObject parent; 1679 /** 1680 * the HTTP method 1681 */ 1682 const(char)* method; 1683 /** 1684 * the HTTP status code 1685 */ 1686 uint statusCode; 1687 /** 1688 * the status phrase associated with @status_code 1689 */ 1690 char* reasonPhrase; 1691 /** 1692 * the request body 1693 */ 1694 SoupMessageBody* requestBody; 1695 /** 1696 * the request headers 1697 */ 1698 SoupMessageHeaders* requestHeaders; 1699 /** 1700 * the response body 1701 */ 1702 SoupMessageBody* responseBody; 1703 /** 1704 * the response headers 1705 */ 1706 SoupMessageHeaders* responseHeaders; 1707 } 1708 1709 struct SoupMessageBody 1710 { 1711 /** 1712 * the data 1713 */ 1714 const(char)* data; 1715 /** 1716 * length of @data 1717 */ 1718 long length; 1719 } 1720 1721 struct SoupMessageClass 1722 { 1723 GObjectClass parentClass; 1724 /** */ 1725 extern(C) void function(SoupMessage* msg) wroteInformational; 1726 /** */ 1727 extern(C) void function(SoupMessage* msg) wroteHeaders; 1728 /** */ 1729 extern(C) void function(SoupMessage* msg) wroteChunk; 1730 /** */ 1731 extern(C) void function(SoupMessage* msg) wroteBody; 1732 /** */ 1733 extern(C) void function(SoupMessage* msg) gotInformational; 1734 /** */ 1735 extern(C) void function(SoupMessage* msg) gotHeaders; 1736 /** */ 1737 extern(C) void function(SoupMessage* msg, SoupBuffer* chunk) gotChunk; 1738 /** */ 1739 extern(C) void function(SoupMessage* msg) gotBody; 1740 /** */ 1741 extern(C) void function(SoupMessage* msg) restarted; 1742 /** */ 1743 extern(C) void function(SoupMessage* msg) finished; 1744 /** */ 1745 extern(C) void function(SoupMessage* msg) starting; 1746 /** */ 1747 extern(C) void function() LibsoupReserved1; 1748 /** */ 1749 extern(C) void function() LibsoupReserved2; 1750 /** */ 1751 extern(C) void function() LibsoupReserved3; 1752 } 1753 1754 struct SoupMessageHeaders; 1755 1756 struct SoupMessageHeadersIter 1757 { 1758 void*[3] dummy; 1759 } 1760 1761 struct SoupMessageQueue; 1762 1763 struct SoupMessageQueueItem; 1764 1765 struct SoupMultipart; 1766 1767 struct SoupMultipartInputStream 1768 { 1769 GFilterInputStream parentInstance; 1770 SoupMultipartInputStreamPrivate* priv; 1771 } 1772 1773 struct SoupMultipartInputStreamClass 1774 { 1775 GFilterInputStreamClass parentClass; 1776 } 1777 1778 struct SoupMultipartInputStreamPrivate; 1779 1780 struct SoupPasswordManager; 1781 1782 struct SoupPasswordManagerInterface 1783 { 1784 GTypeInterface base; 1785 /** */ 1786 extern(C) void function(SoupPasswordManager* passwordManager, SoupMessage* msg, SoupAuth* auth, int retrying, GMainContext* asyncContext, GCancellable* cancellable, SoupPasswordManagerCallback callback, void* userData) getPasswordsAsync; 1787 /** */ 1788 extern(C) void function(SoupPasswordManager* passwordManager, SoupMessage* msg, SoupAuth* auth, GCancellable* cancellable) getPasswordsSync; 1789 } 1790 1791 struct SoupProxyResolver; 1792 1793 struct SoupProxyResolverDefault 1794 { 1795 GObject parent; 1796 } 1797 1798 struct SoupProxyResolverDefaultClass 1799 { 1800 GObjectClass parentClass; 1801 } 1802 1803 struct SoupProxyResolverInterface 1804 { 1805 GTypeInterface base; 1806 /** */ 1807 extern(C) void function(SoupProxyResolver* proxyResolver, SoupMessage* msg, GMainContext* asyncContext, GCancellable* cancellable, SoupProxyResolverCallback callback, void* userData) getProxyAsync; 1808 /** */ 1809 extern(C) uint function(SoupProxyResolver* proxyResolver, SoupMessage* msg, GCancellable* cancellable, SoupAddress** addr) getProxySync; 1810 } 1811 1812 struct SoupProxyURIResolver; 1813 1814 struct SoupProxyURIResolverInterface 1815 { 1816 GTypeInterface base; 1817 /** */ 1818 extern(C) void function(SoupProxyURIResolver* proxyUriResolver, SoupURI* uri, GMainContext* asyncContext, GCancellable* cancellable, SoupProxyURIResolverCallback callback, void* userData) getProxyUriAsync; 1819 /** 1820 * 1821 * Params: 1822 * proxyUriResolver = the #SoupProxyURIResolver 1823 * uri = the #SoupURI you want a proxy for 1824 * cancellable = a #GCancellable, or %NULL 1825 * proxyUri = on return, will contain the proxy URI 1826 * Returns: %SOUP_STATUS_OK if successful, or a transport-level 1827 * error. 1828 */ 1829 extern(C) uint function(SoupProxyURIResolver* proxyUriResolver, SoupURI* uri, GCancellable* cancellable, SoupURI** proxyUri) getProxyUriSync; 1830 /** */ 1831 extern(C) void function() LibsoupReserved1; 1832 /** */ 1833 extern(C) void function() LibsoupReserved2; 1834 /** */ 1835 extern(C) void function() LibsoupReserved3; 1836 /** */ 1837 extern(C) void function() LibsoupReserved4; 1838 } 1839 1840 /** 1841 * Represents a byte range as used in the Range header. 1842 * 1843 * If @end is non-negative, then @start and @end represent the bounds 1844 * of of the range, counting from 0. (Eg, the first 500 bytes would be 1845 * represented as @start = 0 and @end = 499.) 1846 * 1847 * If @end is -1 and @start is non-negative, then this represents a 1848 * range starting at @start and ending with the last byte of the 1849 * requested resource body. (Eg, all but the first 500 bytes would be 1850 * @start = 500, and @end = -1.) 1851 * 1852 * If @end is -1 and @start is negative, then it represents a "suffix 1853 * range", referring to the last -@start bytes of the resource body. 1854 * (Eg, the last 500 bytes would be @start = -500 and @end = -1.) 1855 * 1856 * Since: 2.26 1857 */ 1858 struct SoupRange 1859 { 1860 /** 1861 * the start of the range 1862 */ 1863 long start; 1864 /** 1865 * the end of the range 1866 */ 1867 long end; 1868 } 1869 1870 struct SoupRequest 1871 { 1872 GObject parent; 1873 SoupRequestPrivate* priv; 1874 } 1875 1876 struct SoupRequestClass 1877 { 1878 GObjectClass parent; 1879 char** schemes; 1880 /** */ 1881 extern(C) int function(SoupRequest* reqBase, SoupURI* uri, GError** err) checkUri; 1882 /** 1883 * 1884 * Params: 1885 * request = a #SoupRequest 1886 * cancellable = a #GCancellable or %NULL 1887 * Returns: a #GInputStream that can be used to 1888 * read from the URI pointed to by @request. 1889 * 1890 * Throws: GException on failure. 1891 */ 1892 extern(C) GInputStream* function(SoupRequest* request, GCancellable* cancellable, GError** err) send; 1893 /** */ 1894 extern(C) void function(SoupRequest* request, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) sendAsync; 1895 /** 1896 * 1897 * Params: 1898 * request = a #SoupRequest 1899 * result = the #GAsyncResult 1900 * Returns: a #GInputStream that can be used to 1901 * read from the URI pointed to by @request. 1902 * 1903 * Throws: GException on failure. 1904 */ 1905 extern(C) GInputStream* function(SoupRequest* request, GAsyncResult* result, GError** err) sendFinish; 1906 /** 1907 * 1908 * Params: 1909 * request = a #SoupRequest 1910 * Returns: the length of the data represented by @request, 1911 * or -1 if not known. 1912 */ 1913 extern(C) long function(SoupRequest* request) getContentLength; 1914 /** 1915 * 1916 * Params: 1917 * request = a #SoupRequest 1918 * Returns: the type of the data represented by 1919 * @request, or %NULL if not known. 1920 */ 1921 extern(C) const(char)* function(SoupRequest* request) getContentType; 1922 } 1923 1924 struct SoupRequestData 1925 { 1926 SoupRequest parent; 1927 SoupRequestDataPrivate* priv; 1928 } 1929 1930 struct SoupRequestDataClass 1931 { 1932 SoupRequestClass parent; 1933 } 1934 1935 struct SoupRequestDataPrivate; 1936 1937 struct SoupRequestFile 1938 { 1939 SoupRequest parent; 1940 SoupRequestFilePrivate* priv; 1941 } 1942 1943 struct SoupRequestFileClass 1944 { 1945 SoupRequestClass parent; 1946 } 1947 1948 struct SoupRequestFilePrivate; 1949 1950 struct SoupRequestHTTP 1951 { 1952 SoupRequest parent; 1953 SoupRequestHTTPPrivate* priv; 1954 } 1955 1956 struct SoupRequestHTTPClass 1957 { 1958 SoupRequestClass parent; 1959 } 1960 1961 struct SoupRequestHTTPPrivate; 1962 1963 struct SoupRequestPrivate; 1964 1965 struct SoupRequester 1966 { 1967 GObject parent; 1968 SoupRequesterPrivate* priv; 1969 } 1970 1971 struct SoupRequesterClass 1972 { 1973 GObjectClass parentClass; 1974 } 1975 1976 struct SoupRequesterPrivate; 1977 1978 struct SoupServer 1979 { 1980 GObject parent; 1981 } 1982 1983 struct SoupServerClass 1984 { 1985 GObjectClass parentClass; 1986 /** */ 1987 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestStarted; 1988 /** */ 1989 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestRead; 1990 /** */ 1991 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestFinished; 1992 /** */ 1993 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestAborted; 1994 /** */ 1995 extern(C) void function() LibsoupReserved1; 1996 /** */ 1997 extern(C) void function() LibsoupReserved2; 1998 /** */ 1999 extern(C) void function() LibsoupReserved3; 2000 /** */ 2001 extern(C) void function() LibsoupReserved4; 2002 } 2003 2004 struct SoupSession 2005 { 2006 GObject parent; 2007 } 2008 2009 struct SoupSessionAsync 2010 { 2011 SoupSession parent; 2012 } 2013 2014 struct SoupSessionAsyncClass 2015 { 2016 SoupSessionClass parentClass; 2017 /** */ 2018 extern(C) void function() LibsoupReserved1; 2019 /** */ 2020 extern(C) void function() LibsoupReserved2; 2021 /** */ 2022 extern(C) void function() LibsoupReserved3; 2023 /** */ 2024 extern(C) void function() LibsoupReserved4; 2025 } 2026 2027 struct SoupSessionClass 2028 { 2029 GObjectClass parentClass; 2030 /** */ 2031 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupSocket* socket) requestStarted; 2032 /** */ 2033 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupAuth* auth, int retrying) authenticate; 2034 /** */ 2035 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupSessionCallback callback, void* userData) queueMessage; 2036 /** */ 2037 extern(C) void function(SoupSession* session, SoupMessage* msg) requeueMessage; 2038 /** 2039 * 2040 * Params: 2041 * session = a #SoupSession 2042 * msg = the message to send 2043 * Returns: the HTTP status code of the response 2044 */ 2045 extern(C) uint function(SoupSession* session, SoupMessage* msg) sendMessage; 2046 /** */ 2047 extern(C) void function(SoupSession* session, SoupMessage* msg, uint statusCode) cancelMessage; 2048 /** */ 2049 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupAuth* auth, int retrying) authRequired; 2050 /** */ 2051 extern(C) void function(SoupSession* session) flushQueue; 2052 /** */ 2053 extern(C) void function(SoupSession* session) kick; 2054 /** */ 2055 extern(C) void function() LibsoupReserved4; 2056 } 2057 2058 struct SoupSessionFeature; 2059 2060 /** 2061 * The interface implemented by #SoupSessionFeature<!-- -->s. 2062 * 2063 * Since: 2.24 2064 */ 2065 struct SoupSessionFeatureInterface 2066 { 2067 /** 2068 * The parent interface. 2069 */ 2070 GTypeInterface parent; 2071 /** */ 2072 extern(C) void function(SoupSessionFeature* feature, SoupSession* session) attach; 2073 /** */ 2074 extern(C) void function(SoupSessionFeature* feature, SoupSession* session) detach; 2075 /** */ 2076 extern(C) void function(SoupSessionFeature* feature, SoupSession* session, SoupMessage* msg) requestQueued; 2077 /** */ 2078 extern(C) void function(SoupSessionFeature* feature, SoupSession* session, SoupMessage* msg, SoupSocket* socket) requestStarted; 2079 /** */ 2080 extern(C) void function(SoupSessionFeature* feature, SoupSession* session, SoupMessage* msg) requestUnqueued; 2081 /** 2082 * 2083 * Params: 2084 * feature = the "base" feature 2085 * type = the #GType of a "sub-feature" 2086 * Returns: %TRUE if @feature accepted @type as a subfeature. 2087 */ 2088 extern(C) int function(SoupSessionFeature* feature, GType type) addFeature; 2089 /** 2090 * 2091 * Params: 2092 * feature = the "base" feature 2093 * type = the #GType of a "sub-feature" 2094 * Returns: %TRUE if @type was removed from @feature 2095 */ 2096 extern(C) int function(SoupSessionFeature* feature, GType type) removeFeature; 2097 /** 2098 * 2099 * Params: 2100 * feature = the "base" feature 2101 * type = the #GType of a "sub-feature" 2102 * Returns: %TRUE if @feature has a subfeature of type @type 2103 */ 2104 extern(C) int function(SoupSessionFeature* feature, GType type) hasFeature; 2105 } 2106 2107 struct SoupSessionSync 2108 { 2109 SoupSession parent; 2110 } 2111 2112 struct SoupSessionSyncClass 2113 { 2114 SoupSessionClass parentClass; 2115 /** */ 2116 extern(C) void function() LibsoupReserved1; 2117 /** */ 2118 extern(C) void function() LibsoupReserved2; 2119 /** */ 2120 extern(C) void function() LibsoupReserved3; 2121 /** */ 2122 extern(C) void function() LibsoupReserved4; 2123 } 2124 2125 struct SoupSocket 2126 { 2127 GObject parent; 2128 } 2129 2130 struct SoupSocketClass 2131 { 2132 GObjectClass parentClass; 2133 /** */ 2134 extern(C) void function(SoupSocket* sock) readable; 2135 /** */ 2136 extern(C) void function(SoupSocket* sock) writable; 2137 /** */ 2138 extern(C) void function(SoupSocket* sock) disconnected; 2139 /** */ 2140 extern(C) void function(SoupSocket* listener, SoupSocket* newSock) newConnection; 2141 /** */ 2142 extern(C) void function() LibsoupReserved1; 2143 /** */ 2144 extern(C) void function() LibsoupReserved2; 2145 /** */ 2146 extern(C) void function() LibsoupReserved3; 2147 /** */ 2148 extern(C) void function() LibsoupReserved4; 2149 } 2150 2151 struct SoupURI 2152 { 2153 /** 2154 * the URI scheme (eg, "http") 2155 */ 2156 const(char)* scheme; 2157 /** 2158 * a username, or %NULL 2159 */ 2160 char* user; 2161 /** 2162 * a password, or %NULL 2163 */ 2164 char* password; 2165 /** 2166 * the hostname or IP address, or %NULL 2167 */ 2168 char* host; 2169 /** 2170 * the port number on @host 2171 */ 2172 uint port; 2173 /** 2174 * the path on @host 2175 */ 2176 char* path; 2177 /** 2178 * a query for @path, or %NULL 2179 */ 2180 char* query; 2181 /** 2182 * a fragment identifier within @path, or %NULL 2183 */ 2184 char* fragment; 2185 } 2186 2187 struct SoupWebsocketConnection 2188 { 2189 GObject parent; 2190 SoupWebsocketConnectionPrivate* pv; 2191 } 2192 2193 /** 2194 * The abstract base class for #SoupWebsocketConnection 2195 * 2196 * Since: 2.50 2197 */ 2198 struct SoupWebsocketConnectionClass 2199 { 2200 GObjectClass parent; 2201 /** */ 2202 extern(C) void function(SoupWebsocketConnection* self, SoupWebsocketDataType type, GBytes* message) message; 2203 /** */ 2204 extern(C) void function(SoupWebsocketConnection* self, GError* error) error; 2205 /** */ 2206 extern(C) void function(SoupWebsocketConnection* self) closing; 2207 /** */ 2208 extern(C) void function(SoupWebsocketConnection* self) closed; 2209 /** */ 2210 extern(C) void function(SoupWebsocketConnection* self, GBytes* message) pong; 2211 } 2212 2213 struct SoupWebsocketConnectionPrivate; 2214 2215 struct SoupWebsocketExtension 2216 { 2217 GObject parent; 2218 } 2219 2220 /** 2221 * The class structure for the SoupWebsocketExtension. 2222 * 2223 * Since: 2.68 2224 */ 2225 struct SoupWebsocketExtensionClass 2226 { 2227 /** 2228 * the parent class 2229 */ 2230 GObjectClass parentClass; 2231 const(char)* name; 2232 /** 2233 * 2234 * Params: 2235 * extension = a #SoupWebsocketExtension 2236 * connectionType = either %SOUP_WEBSOCKET_CONNECTION_CLIENT or %SOUP_WEBSOCKET_CONNECTION_SERVER 2237 * params = the parameters, or %NULL 2238 * Returns: %TRUE if extension could be configured with the given parameters, or %FALSE otherwise 2239 * 2240 * Throws: GException on failure. 2241 */ 2242 extern(C) int function(SoupWebsocketExtension* extension, SoupWebsocketConnectionType connectionType, GHashTable* params, GError** err) configure; 2243 /** 2244 * 2245 * Params: 2246 * extension = a #SoupWebsocketExtension 2247 * Returns: a new allocated string with the parameters 2248 */ 2249 extern(C) char* function(SoupWebsocketExtension* extension) getRequestParams; 2250 /** 2251 * 2252 * Params: 2253 * extension = a #SoupWebsocketExtension 2254 * Returns: a new allocated string with the parameters 2255 */ 2256 extern(C) char* function(SoupWebsocketExtension* extension) getResponseParams; 2257 /** 2258 * 2259 * Params: 2260 * extension = a #SoupWebsocketExtension 2261 * header = the message header 2262 * payload = the payload data 2263 * Returns: the message payload data, or %NULL in case of error 2264 * 2265 * Throws: GException on failure. 2266 */ 2267 extern(C) GBytes* function(SoupWebsocketExtension* extension, ubyte* header, GBytes* payload, GError** err) processOutgoingMessage; 2268 /** 2269 * 2270 * Params: 2271 * extension = a #SoupWebsocketExtension 2272 * header = the message header 2273 * payload = the payload data 2274 * Returns: the message payload data, or %NULL in case of error 2275 * 2276 * Throws: GException on failure. 2277 */ 2278 extern(C) GBytes* function(SoupWebsocketExtension* extension, ubyte* header, GBytes* payload, GError** err) processIncomingMessage; 2279 /** */ 2280 extern(C) void function() LibsoupReserved1; 2281 /** */ 2282 extern(C) void function() LibsoupReserved2; 2283 /** */ 2284 extern(C) void function() LibsoupReserved3; 2285 /** */ 2286 extern(C) void function() LibsoupReserved4; 2287 } 2288 2289 struct SoupWebsocketExtensionDeflate 2290 { 2291 SoupWebsocketExtension parent; 2292 } 2293 2294 struct SoupWebsocketExtensionDeflateClass 2295 { 2296 SoupWebsocketExtensionClass parentClass; 2297 } 2298 2299 struct SoupWebsocketExtensionManager 2300 { 2301 GObject parent; 2302 } 2303 2304 struct SoupWebsocketExtensionManagerClass 2305 { 2306 GObjectClass parentClass; 2307 } 2308 2309 struct SoupXMLRPCParams; 2310 2311 /** 2312 * The callback function passed to soup_address_resolve_async(). 2313 * 2314 * Params: 2315 * addr = the #SoupAddress that was resolved 2316 * status = %SOUP_STATUS_OK, %SOUP_STATUS_CANT_RESOLVE, or 2317 * %SOUP_STATUS_CANCELLED 2318 * userData = the user data that was passed to 2319 * soup_address_resolve_async() 2320 */ 2321 public alias extern(C) void function(SoupAddress* addr, uint status, void* userData) SoupAddressCallback; 2322 2323 /** 2324 * Callback used by #SoupAuthDomainBasic for authentication purposes. 2325 * The application should verify that @username and @password and valid 2326 * and return %TRUE or %FALSE. 2327 * 2328 * If you are maintaining your own password database (rather than 2329 * using the password to authenticate against some other system like 2330 * PAM or a remote server), you should make sure you know what you are 2331 * doing. In particular, don't store cleartext passwords, or 2332 * easily-computed hashes of cleartext passwords, even if you don't 2333 * care that much about the security of your server, because users 2334 * will frequently use the same password for multiple sites, and so 2335 * compromising any site with a cleartext (or easily-cracked) password 2336 * database may give attackers access to other more-interesting sites 2337 * as well. 2338 * 2339 * Params: 2340 * domain = the domain 2341 * msg = the message being authenticated 2342 * username = the username provided by the client 2343 * password = the password provided by the client 2344 * userData = the data passed to soup_auth_domain_basic_set_auth_callback() 2345 * 2346 * Returns: %TRUE if @username and @password are valid 2347 */ 2348 public alias extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, const(char)* password, void* userData) SoupAuthDomainBasicAuthCallback; 2349 2350 /** 2351 * Callback used by #SoupAuthDomainDigest for authentication purposes. 2352 * The application should look up @username in its password database, 2353 * and return the corresponding encoded password (see 2354 * soup_auth_domain_digest_encode_password()). 2355 * 2356 * Params: 2357 * domain = the domain 2358 * msg = the message being authenticated 2359 * username = the username provided by the client 2360 * userData = the data passed to soup_auth_domain_digest_set_auth_callback() 2361 * 2362 * Returns: the encoded password, or %NULL if 2363 * @username is not a valid user. @domain will free the password when 2364 * it is done with it. 2365 */ 2366 public alias extern(C) char* function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, void* userData) SoupAuthDomainDigestAuthCallback; 2367 2368 /** 2369 * The prototype for a #SoupAuthDomain filter; see 2370 * soup_auth_domain_set_filter() for details. 2371 * 2372 * Params: 2373 * domain = a #SoupAuthDomain 2374 * msg = a #SoupMessage 2375 * userData = the data passed to soup_auth_domain_set_filter() 2376 * 2377 * Returns: %TRUE if @msg requires authentication, %FALSE if not. 2378 */ 2379 public alias extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, void* userData) SoupAuthDomainFilter; 2380 2381 /** 2382 * The prototype for a #SoupAuthDomain generic authentication callback. 2383 * 2384 * The callback should look up the user's password, call 2385 * soup_auth_domain_check_password(), and use the return value from 2386 * that method as its own return value. 2387 * 2388 * In general, for security reasons, it is preferable to use the 2389 * auth-domain-specific auth callbacks (eg, 2390 * #SoupAuthDomainBasicAuthCallback and 2391 * #SoupAuthDomainDigestAuthCallback), because they don't require 2392 * keeping a cleartext password database. Most users will use the same 2393 * password for many different sites, meaning if any site with a 2394 * cleartext password database is compromised, accounts on other 2395 * servers might be compromised as well. For many of the cases where 2396 * #SoupServer is used, this is not really relevant, but it may still 2397 * be worth considering. 2398 * 2399 * Params: 2400 * domain = a #SoupAuthDomain 2401 * msg = the #SoupMessage being authenticated 2402 * username = the username from @msg 2403 * userData = the data passed to 2404 * soup_auth_domain_set_generic_auth_callback() 2405 * 2406 * Returns: %TRUE if @msg is authenticated, %FALSE if not. 2407 */ 2408 public alias extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, void* userData) SoupAuthDomainGenericAuthCallback; 2409 2410 /** 2411 * The prototype for a chunk allocation callback. This should allocate 2412 * a new #SoupBuffer and return it for the I/O layer to read message 2413 * body data off the network into. 2414 * 2415 * If @max_len is non-0, it indicates the maximum number of bytes that 2416 * could be read, based on what is known about the message size. Note 2417 * that this might be a very large number, and you should not simply 2418 * try to allocate that many bytes blindly. If @max_len is 0, that 2419 * means that libsoup does not know how many bytes remain to be read, 2420 * and the allocator should return a buffer of a size that it finds 2421 * convenient. 2422 * 2423 * If the allocator returns %NULL, the message will be paused. It is 2424 * up to the application to make sure that it gets unpaused when it 2425 * becomes possible to allocate a new buffer. 2426 * 2427 * Deprecated: Use #SoupRequest if you want to read into your 2428 * own buffers. 2429 * 2430 * Params: 2431 * msg = the #SoupMessage the chunk is being allocated for 2432 * maxLen = the maximum length that will be read, or 0. 2433 * userData = the data passed to soup_message_set_chunk_allocator() 2434 * 2435 * Returns: the new buffer (or %NULL) 2436 */ 2437 public alias extern(C) SoupBuffer* function(SoupMessage* msg, size_t maxLen, void* userData) SoupChunkAllocator; 2438 2439 /** 2440 * The prototype for a logging filter. The filter callback will be 2441 * invoked for each request or response, and should analyze it and 2442 * return a #SoupLoggerLogLevel value indicating how much of the 2443 * message to log. Eg, it might choose between %SOUP_LOGGER_LOG_BODY 2444 * and %SOUP_LOGGER_LOG_HEADERS depending on the Content-Type. 2445 * 2446 * Params: 2447 * logger = the #SoupLogger 2448 * msg = the message being logged 2449 * userData = the data passed to soup_logger_set_request_filter() 2450 * or soup_logger_set_response_filter() 2451 * 2452 * Returns: a #SoupLoggerLogLevel value indicating how much of 2453 * the message to log 2454 */ 2455 public alias extern(C) SoupLoggerLogLevel function(SoupLogger* logger, SoupMessage* msg, void* userData) SoupLoggerFilter; 2456 2457 /** 2458 * The prototype for a custom printing callback. 2459 * 2460 * @level indicates what kind of information is being printed. Eg, it 2461 * will be %SOUP_LOGGER_LOG_HEADERS if @data is header data. 2462 * 2463 * @direction is either '<', '>', or ' ', and @data is the single line 2464 * to print; the printer is expected to add a terminating newline. 2465 * 2466 * To get the effect of the default printer, you would do: 2467 * 2468 * <informalexample><programlisting> 2469 * printf ("%c %s\n", direction, data); 2470 * </programlisting></informalexample> 2471 * 2472 * Params: 2473 * logger = the #SoupLogger 2474 * level = the level of the information being printed. 2475 * direction = a single-character prefix to @data 2476 * data = data to print 2477 * userData = the data passed to soup_logger_set_printer() 2478 */ 2479 public alias extern(C) void function(SoupLogger* logger, SoupLoggerLogLevel level, char direction, const(char)* data, void* userData) SoupLoggerPrinter; 2480 2481 /** 2482 * The callback passed to soup_message_headers_foreach(). 2483 * 2484 * Params: 2485 * name = the header name 2486 * value = the header value 2487 * userData = the data passed to soup_message_headers_foreach() 2488 */ 2489 public alias extern(C) void function(const(char)* name, const(char)* value, void* userData) SoupMessageHeadersForeachFunc; 2490 2491 /** */ 2492 public alias extern(C) void function(SoupPasswordManager* passwordManager, SoupMessage* msg, SoupAuth* auth, int retrying, void* userData) SoupPasswordManagerCallback; 2493 2494 /** 2495 * 2496 * 2497 * Deprecated: Use SoupProxyURIResolver instead 2498 */ 2499 public alias extern(C) void function(SoupProxyResolver* proxyResolver, SoupMessage* msg, uint arg, SoupAddress* addr, void* userData) SoupProxyResolverCallback; 2500 2501 /** 2502 * Callback for soup_proxy_uri_resolver_get_proxy_uri_async() 2503 * 2504 * Params: 2505 * resolver = the #SoupProxyURIResolver 2506 * status = a #SoupStatus 2507 * proxyUri = the resolved proxy URI, or %NULL 2508 * userData = data passed to soup_proxy_uri_resolver_get_proxy_uri_async() 2509 */ 2510 public alias extern(C) void function(SoupProxyURIResolver* resolver, uint status, SoupURI* proxyUri, void* userData) SoupProxyURIResolverCallback; 2511 2512 /** 2513 * A callback used to handle requests to a #SoupServer. 2514 * 2515 * @path and @query contain the likewise-named components of the 2516 * Request-URI, subject to certain assumptions. By default, 2517 * #SoupServer decodes all percent-encoding in the URI path, such that 2518 * "/foo%<!-- -->2Fbar" is treated the same as "/foo/bar". If your 2519 * server is serving resources in some non-POSIX-filesystem namespace, 2520 * you may want to distinguish those as two distinct paths. In that 2521 * case, you can set the %SOUP_SERVER_RAW_PATHS property when creating 2522 * the #SoupServer, and it will leave those characters undecoded. (You 2523 * may want to call soup_uri_normalize() to decode any percent-encoded 2524 * characters that you aren't handling specially.) 2525 * 2526 * @query contains the query component of the Request-URI parsed 2527 * according to the rules for HTML form handling. Although this is the 2528 * only commonly-used query string format in HTTP, there is nothing 2529 * that actually requires that HTTP URIs use that format; if your 2530 * server needs to use some other format, you can just ignore @query, 2531 * and call soup_message_get_uri() and parse the URI's query field 2532 * yourself. 2533 * 2534 * See soup_server_add_handler() and soup_server_add_early_handler() 2535 * for details of what handlers can/should do. 2536 * 2537 * Params: 2538 * server = the #SoupServer 2539 * msg = the message being processed 2540 * path = the path component of @msg's Request-URI 2541 * query = the parsed query 2542 * component of @msg's Request-URI 2543 * client = additional contextual information about the client 2544 * userData = the data passed to soup_server_add_handler() or 2545 * soup_server_add_early_handler(). 2546 */ 2547 public alias extern(C) void function(SoupServer* server, SoupMessage* msg, const(char)* path, GHashTable* query, SoupClientContext* client, void* userData) SoupServerCallback; 2548 2549 /** 2550 * A callback used to handle WebSocket requests to a #SoupServer. The 2551 * callback will be invoked after sending the handshake response back 2552 * to the client (and is only invoked if the handshake was 2553 * successful). 2554 * 2555 * @path contains the path of the Request-URI, subject to the same 2556 * rules as #SoupServerCallback (qv). 2557 * 2558 * Params: 2559 * server = the #SoupServer 2560 * connection = the newly created WebSocket connection 2561 * path = the path component of @msg's Request-URI 2562 * client = additional contextual information about the client 2563 * userData = the data passed to @soup_server_add_handler 2564 */ 2565 public alias extern(C) void function(SoupServer* server, SoupWebsocketConnection* connection, const(char)* path, SoupClientContext* client, void* userData) SoupServerWebsocketCallback; 2566 2567 /** 2568 * Prototype for the callback passed to soup_session_queue_message(), 2569 * qv. 2570 * 2571 * Params: 2572 * session = the session 2573 * msg = the message that has finished 2574 * userData = the data passed to soup_session_queue_message 2575 */ 2576 public alias extern(C) void function(SoupSession* session, SoupMessage* msg, void* userData) SoupSessionCallback; 2577 2578 /** 2579 * Prototype for the progress callback passed to soup_session_connect_async(). 2580 * 2581 * Params: 2582 * session = the #SoupSession 2583 * event = a #GSocketClientEvent 2584 * connection = the current state of the network connection 2585 * userData = the data passed to soup_session_connect_async(). 2586 * 2587 * Since: 2.62 2588 */ 2589 public alias extern(C) void function(SoupSession* session, GSocketClientEvent event, GIOStream* connection, void* userData) SoupSessionConnectProgressCallback; 2590 2591 /** 2592 * The callback function passed to soup_socket_connect_async(). 2593 * 2594 * Params: 2595 * sock = the #SoupSocket 2596 * status = an HTTP status code indicating success or failure 2597 * userData = the data passed to soup_socket_connect_async() 2598 */ 2599 public alias extern(C) void function(SoupSocket* sock, uint status, void* userData) SoupSocketCallback; 2600 2601 /** 2602 * This can be passed to any #SoupAddress method that expects a port, 2603 * to indicate that you don't care what port is used. 2604 */ 2605 enum ADDRESS_ANY_PORT = 0; 2606 alias SOUP_ADDRESS_ANY_PORT = ADDRESS_ANY_PORT; 2607 2608 /** 2609 * Alias for the #SoupAddress:family property. (The 2610 * #SoupAddressFamily for this address.) 2611 */ 2612 enum ADDRESS_FAMILY = "family"; 2613 alias SOUP_ADDRESS_FAMILY = ADDRESS_FAMILY; 2614 2615 /** 2616 * Alias for the #SoupAddress:name property. (The hostname for 2617 * this address.) 2618 */ 2619 enum ADDRESS_NAME = "name"; 2620 alias SOUP_ADDRESS_NAME = ADDRESS_NAME; 2621 2622 /** 2623 * An alias for the #SoupAddress:physical property. (The 2624 * stringified IP address for this address.) 2625 */ 2626 enum ADDRESS_PHYSICAL = "physical"; 2627 alias SOUP_ADDRESS_PHYSICAL = ADDRESS_PHYSICAL; 2628 2629 /** 2630 * An alias for the #SoupAddress:port property. (The port for 2631 * this address.) 2632 */ 2633 enum ADDRESS_PORT = "port"; 2634 alias SOUP_ADDRESS_PORT = ADDRESS_PORT; 2635 2636 /** 2637 * Alias for the #SoupAddress:protocol property. (The URI scheme 2638 * used with this address.) 2639 */ 2640 enum ADDRESS_PROTOCOL = "protocol"; 2641 alias SOUP_ADDRESS_PROTOCOL = ADDRESS_PROTOCOL; 2642 2643 /** 2644 * An alias for the #SoupAddress:sockaddr property. (A pointer 2645 * to the struct sockaddr for this address.) 2646 */ 2647 enum ADDRESS_SOCKADDR = "sockaddr"; 2648 alias SOUP_ADDRESS_SOCKADDR = ADDRESS_SOCKADDR; 2649 2650 /** 2651 * Alias for the #SoupAuthDomain:add-path property. (Shortcut 2652 * for calling soup_auth_domain_add_path().) 2653 */ 2654 enum AUTH_DOMAIN_ADD_PATH = "add-path"; 2655 alias SOUP_AUTH_DOMAIN_ADD_PATH = AUTH_DOMAIN_ADD_PATH; 2656 2657 /** 2658 * Alias for the #SoupAuthDomainBasic:auth-callback property. 2659 * (The #SoupAuthDomainBasicAuthCallback.) 2660 */ 2661 enum AUTH_DOMAIN_BASIC_AUTH_CALLBACK = "auth-callback"; 2662 alias SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK = AUTH_DOMAIN_BASIC_AUTH_CALLBACK; 2663 2664 /** 2665 * Alias for the #SoupAuthDomainBasic:auth-data property. 2666 * (The data to pass to the #SoupAuthDomainBasicAuthCallback.) 2667 */ 2668 enum AUTH_DOMAIN_BASIC_AUTH_DATA = "auth-data"; 2669 alias SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA = AUTH_DOMAIN_BASIC_AUTH_DATA; 2670 2671 /** 2672 * Alias for the #SoupAuthDomainDigest:auth-callback property. 2673 * (The #SoupAuthDomainDigestAuthCallback.) 2674 */ 2675 enum AUTH_DOMAIN_DIGEST_AUTH_CALLBACK = "auth-callback"; 2676 alias SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK = AUTH_DOMAIN_DIGEST_AUTH_CALLBACK; 2677 2678 /** 2679 * Alias for the #SoupAuthDomainDigest:auth-callback property. 2680 * (The #SoupAuthDomainDigestAuthCallback.) 2681 */ 2682 enum AUTH_DOMAIN_DIGEST_AUTH_DATA = "auth-data"; 2683 alias SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA = AUTH_DOMAIN_DIGEST_AUTH_DATA; 2684 2685 /** 2686 * Alias for the #SoupAuthDomain:filter property. (The 2687 * #SoupAuthDomainFilter for the domain.) 2688 */ 2689 enum AUTH_DOMAIN_FILTER = "filter"; 2690 alias SOUP_AUTH_DOMAIN_FILTER = AUTH_DOMAIN_FILTER; 2691 2692 /** 2693 * Alias for the #SoupAuthDomain:filter-data property. (Data 2694 * to pass to the #SoupAuthDomainFilter.) 2695 */ 2696 enum AUTH_DOMAIN_FILTER_DATA = "filter-data"; 2697 alias SOUP_AUTH_DOMAIN_FILTER_DATA = AUTH_DOMAIN_FILTER_DATA; 2698 2699 /** 2700 * Alias for the #SoupAuthDomain:generic-auth-callback property. 2701 * (The #SoupAuthDomainGenericAuthCallback.) 2702 */ 2703 enum AUTH_DOMAIN_GENERIC_AUTH_CALLBACK = "generic-auth-callback"; 2704 alias SOUP_AUTH_DOMAIN_GENERIC_AUTH_CALLBACK = AUTH_DOMAIN_GENERIC_AUTH_CALLBACK; 2705 2706 /** 2707 * Alias for the #SoupAuthDomain:generic-auth-data property. 2708 * (The data to pass to the #SoupAuthDomainGenericAuthCallback.) 2709 */ 2710 enum AUTH_DOMAIN_GENERIC_AUTH_DATA = "generic-auth-data"; 2711 alias SOUP_AUTH_DOMAIN_GENERIC_AUTH_DATA = AUTH_DOMAIN_GENERIC_AUTH_DATA; 2712 2713 /** 2714 * Alias for the #SoupAuthDomain:proxy property. (Whether or 2715 * not this is a proxy auth domain.) 2716 */ 2717 enum AUTH_DOMAIN_PROXY = "proxy"; 2718 alias SOUP_AUTH_DOMAIN_PROXY = AUTH_DOMAIN_PROXY; 2719 2720 /** 2721 * Alias for the #SoupAuthDomain:realm property. (The realm of 2722 * this auth domain.) 2723 */ 2724 enum AUTH_DOMAIN_REALM = "realm"; 2725 alias SOUP_AUTH_DOMAIN_REALM = AUTH_DOMAIN_REALM; 2726 2727 /** 2728 * Alias for the #SoupAuthDomain:remove-path property. 2729 * (Shortcut for calling soup_auth_domain_remove_path().) 2730 */ 2731 enum AUTH_DOMAIN_REMOVE_PATH = "remove-path"; 2732 alias SOUP_AUTH_DOMAIN_REMOVE_PATH = AUTH_DOMAIN_REMOVE_PATH; 2733 2734 /** 2735 * An alias for the #SoupAuth:host property. (The 2736 * host being authenticated to.) 2737 */ 2738 enum AUTH_HOST = "host"; 2739 alias SOUP_AUTH_HOST = AUTH_HOST; 2740 2741 /** 2742 * An alias for the #SoupAuth:is-authenticated property. 2743 * (Whether or not the auth has been authenticated.) 2744 */ 2745 enum AUTH_IS_AUTHENTICATED = "is-authenticated"; 2746 alias SOUP_AUTH_IS_AUTHENTICATED = AUTH_IS_AUTHENTICATED; 2747 2748 /** 2749 * An alias for the #SoupAuth:is-for-proxy property. (Whether 2750 * or not the auth is for a proxy server.) 2751 */ 2752 enum AUTH_IS_FOR_PROXY = "is-for-proxy"; 2753 alias SOUP_AUTH_IS_FOR_PROXY = AUTH_IS_FOR_PROXY; 2754 2755 /** 2756 * An alias for the #SoupAuth:realm property. (The 2757 * authentication realm.) 2758 */ 2759 enum AUTH_REALM = "realm"; 2760 alias SOUP_AUTH_REALM = AUTH_REALM; 2761 2762 /** 2763 * An alias for the #SoupAuth:scheme-name property. (The 2764 * authentication scheme name.) 2765 */ 2766 enum AUTH_SCHEME_NAME = "scheme-name"; 2767 alias SOUP_AUTH_SCHEME_NAME = AUTH_SCHEME_NAME; 2768 2769 enum CHAR_HTTP_CTL = 16; 2770 alias SOUP_CHAR_HTTP_CTL = CHAR_HTTP_CTL; 2771 2772 enum CHAR_HTTP_SEPARATOR = 8; 2773 alias SOUP_CHAR_HTTP_SEPARATOR = CHAR_HTTP_SEPARATOR; 2774 2775 enum CHAR_URI_GEN_DELIMS = 2; 2776 alias SOUP_CHAR_URI_GEN_DELIMS = CHAR_URI_GEN_DELIMS; 2777 2778 enum CHAR_URI_PERCENT_ENCODED = 1; 2779 alias SOUP_CHAR_URI_PERCENT_ENCODED = CHAR_URI_PERCENT_ENCODED; 2780 2781 enum CHAR_URI_SUB_DELIMS = 4; 2782 alias SOUP_CHAR_URI_SUB_DELIMS = CHAR_URI_SUB_DELIMS; 2783 2784 /** 2785 * Alias for the #SoupCookieJar:accept-policy property. 2786 */ 2787 enum COOKIE_JAR_ACCEPT_POLICY = "accept-policy"; 2788 alias SOUP_COOKIE_JAR_ACCEPT_POLICY = COOKIE_JAR_ACCEPT_POLICY; 2789 2790 /** 2791 * Alias for the #SoupCookieJarDB:filename property. (The 2792 * cookie-storage filename.) 2793 */ 2794 enum COOKIE_JAR_DB_FILENAME = "filename"; 2795 alias SOUP_COOKIE_JAR_DB_FILENAME = COOKIE_JAR_DB_FILENAME; 2796 2797 /** 2798 * Alias for the #SoupCookieJar:read-only property. (Whether 2799 * or not the cookie jar is read-only.) 2800 */ 2801 enum COOKIE_JAR_READ_ONLY = "read-only"; 2802 alias SOUP_COOKIE_JAR_READ_ONLY = COOKIE_JAR_READ_ONLY; 2803 2804 /** 2805 * Alias for the #SoupCookieJarText:filename property. (The 2806 * cookie-storage filename.) 2807 */ 2808 enum COOKIE_JAR_TEXT_FILENAME = "filename"; 2809 alias SOUP_COOKIE_JAR_TEXT_FILENAME = COOKIE_JAR_TEXT_FILENAME; 2810 2811 /** 2812 * A constant corresponding to 1 day, for use with soup_cookie_new() 2813 * and soup_cookie_set_max_age(). 2814 */ 2815 enum COOKIE_MAX_AGE_ONE_DAY = 0; 2816 alias SOUP_COOKIE_MAX_AGE_ONE_DAY = COOKIE_MAX_AGE_ONE_DAY; 2817 2818 /** 2819 * A constant corresponding to 1 hour, for use with soup_cookie_new() 2820 * and soup_cookie_set_max_age(). 2821 */ 2822 enum COOKIE_MAX_AGE_ONE_HOUR = 3600; 2823 alias SOUP_COOKIE_MAX_AGE_ONE_HOUR = COOKIE_MAX_AGE_ONE_HOUR; 2824 2825 /** 2826 * A constant corresponding to 1 week, for use with soup_cookie_new() 2827 * and soup_cookie_set_max_age(). 2828 */ 2829 enum COOKIE_MAX_AGE_ONE_WEEK = 0; 2830 alias SOUP_COOKIE_MAX_AGE_ONE_WEEK = COOKIE_MAX_AGE_ONE_WEEK; 2831 2832 /** 2833 * A constant corresponding to 1 year, for use with soup_cookie_new() 2834 * and soup_cookie_set_max_age(). 2835 */ 2836 enum COOKIE_MAX_AGE_ONE_YEAR = 0; 2837 alias SOUP_COOKIE_MAX_AGE_ONE_YEAR = COOKIE_MAX_AGE_ONE_YEAR; 2838 2839 /** 2840 * A macro containing the value 2841 * <literal>"multipart/form-data"</literal>; the MIME type used for 2842 * posting form data that contains files to be uploaded. 2843 */ 2844 enum FORM_MIME_TYPE_MULTIPART = "multipart/form-data"; 2845 alias SOUP_FORM_MIME_TYPE_MULTIPART = FORM_MIME_TYPE_MULTIPART; 2846 2847 /** 2848 * A macro containing the value 2849 * <literal>"application/x-www-form-urlencoded"</literal>; the default 2850 * MIME type for POSTing HTML form data. 2851 */ 2852 enum FORM_MIME_TYPE_URLENCODED = "application/x-www-form-urlencoded"; 2853 alias SOUP_FORM_MIME_TYPE_URLENCODED = FORM_MIME_TYPE_URLENCODED; 2854 2855 enum HSTS_ENFORCER_DB_FILENAME = "filename"; 2856 alias SOUP_HSTS_ENFORCER_DB_FILENAME = HSTS_ENFORCER_DB_FILENAME; 2857 2858 enum HSTS_POLICY_MAX_AGE_PAST = 0; 2859 alias SOUP_HSTS_POLICY_MAX_AGE_PAST = HSTS_POLICY_MAX_AGE_PAST; 2860 2861 /** 2862 * Alias for the #SoupLogger:level property, qv. 2863 */ 2864 enum LOGGER_LEVEL = "level"; 2865 alias SOUP_LOGGER_LEVEL = LOGGER_LEVEL; 2866 2867 /** 2868 * Alias for the #SoupLogger:max-body-size property, qv. 2869 */ 2870 enum LOGGER_MAX_BODY_SIZE = "max-body-size"; 2871 alias SOUP_LOGGER_MAX_BODY_SIZE = LOGGER_MAX_BODY_SIZE; 2872 2873 /** 2874 * Like soup_get_major_version(), but from the headers used at 2875 * application compile time, rather than from the library linked 2876 * against at application run time. 2877 */ 2878 enum MAJOR_VERSION = 2; 2879 alias SOUP_MAJOR_VERSION = MAJOR_VERSION; 2880 2881 /** 2882 * Alias for the #SoupMessage:first-party property. (The 2883 * #SoupURI loaded in the application when the message was 2884 * queued.) 2885 */ 2886 enum MESSAGE_FIRST_PARTY = "first-party"; 2887 alias SOUP_MESSAGE_FIRST_PARTY = MESSAGE_FIRST_PARTY; 2888 2889 /** 2890 * Alias for the #SoupMessage:flags property. (The message's 2891 * #SoupMessageFlags.) 2892 */ 2893 enum MESSAGE_FLAGS = "flags"; 2894 alias SOUP_MESSAGE_FLAGS = MESSAGE_FLAGS; 2895 2896 /** 2897 * Alias for the #SoupMessage:http-version property. (The 2898 * message's #SoupHTTPVersion.) 2899 */ 2900 enum MESSAGE_HTTP_VERSION = "http-version"; 2901 alias SOUP_MESSAGE_HTTP_VERSION = MESSAGE_HTTP_VERSION; 2902 2903 enum MESSAGE_IS_TOP_LEVEL_NAVIGATION = "is-top-level-navigation"; 2904 alias SOUP_MESSAGE_IS_TOP_LEVEL_NAVIGATION = MESSAGE_IS_TOP_LEVEL_NAVIGATION; 2905 2906 /** 2907 * Alias for the #SoupMessage:method property. (The message's 2908 * HTTP method.) 2909 */ 2910 enum MESSAGE_METHOD = "method"; 2911 alias SOUP_MESSAGE_METHOD = MESSAGE_METHOD; 2912 2913 /** 2914 * Sets the priority of the #SoupMessage. See 2915 * soup_message_set_priority() for further details. 2916 */ 2917 enum MESSAGE_PRIORITY = "priority"; 2918 alias SOUP_MESSAGE_PRIORITY = MESSAGE_PRIORITY; 2919 2920 /** 2921 * Alias for the #SoupMessage:reason-phrase property. (The 2922 * message's HTTP response reason phrase.) 2923 */ 2924 enum MESSAGE_REASON_PHRASE = "reason-phrase"; 2925 alias SOUP_MESSAGE_REASON_PHRASE = MESSAGE_REASON_PHRASE; 2926 2927 /** 2928 * Alias for the #SoupMessage:request-body property. (The 2929 * message's HTTP request body.) 2930 */ 2931 enum MESSAGE_REQUEST_BODY = "request-body"; 2932 alias SOUP_MESSAGE_REQUEST_BODY = MESSAGE_REQUEST_BODY; 2933 2934 /** 2935 * Alias for the #SoupMessage:request-body-data property. (The 2936 * message's HTTP request body, as a #GBytes.) 2937 */ 2938 enum MESSAGE_REQUEST_BODY_DATA = "request-body-data"; 2939 alias SOUP_MESSAGE_REQUEST_BODY_DATA = MESSAGE_REQUEST_BODY_DATA; 2940 2941 /** 2942 * Alias for the #SoupMessage:request-headers property. (The 2943 * message's HTTP request headers.) 2944 */ 2945 enum MESSAGE_REQUEST_HEADERS = "request-headers"; 2946 alias SOUP_MESSAGE_REQUEST_HEADERS = MESSAGE_REQUEST_HEADERS; 2947 2948 /** 2949 * Alias for the #SoupMessage:response-body property. (The 2950 * message's HTTP response body.) 2951 */ 2952 enum MESSAGE_RESPONSE_BODY = "response-body"; 2953 alias SOUP_MESSAGE_RESPONSE_BODY = MESSAGE_RESPONSE_BODY; 2954 2955 /** 2956 * Alias for the #SoupMessage:response-body-data property. (The 2957 * message's HTTP response body, as a #GBytes.) 2958 */ 2959 enum MESSAGE_RESPONSE_BODY_DATA = "response-body-data"; 2960 alias SOUP_MESSAGE_RESPONSE_BODY_DATA = MESSAGE_RESPONSE_BODY_DATA; 2961 2962 /** 2963 * Alias for the #SoupMessage:response-headers property. (The 2964 * message's HTTP response headers.) 2965 */ 2966 enum MESSAGE_RESPONSE_HEADERS = "response-headers"; 2967 alias SOUP_MESSAGE_RESPONSE_HEADERS = MESSAGE_RESPONSE_HEADERS; 2968 2969 /** 2970 * Alias for the #SoupMessage:server-side property. (%TRUE if 2971 * the message was created by #SoupServer.) 2972 */ 2973 enum MESSAGE_SERVER_SIDE = "server-side"; 2974 alias SOUP_MESSAGE_SERVER_SIDE = MESSAGE_SERVER_SIDE; 2975 2976 enum MESSAGE_SITE_FOR_COOKIES = "site-for-cookies"; 2977 alias SOUP_MESSAGE_SITE_FOR_COOKIES = MESSAGE_SITE_FOR_COOKIES; 2978 2979 /** 2980 * Alias for the #SoupMessage:status-code property. (The 2981 * message's HTTP response status code.) 2982 */ 2983 enum MESSAGE_STATUS_CODE = "status-code"; 2984 alias SOUP_MESSAGE_STATUS_CODE = MESSAGE_STATUS_CODE; 2985 2986 /** 2987 * Alias for the #SoupMessage:tls-certificate property. (The 2988 * TLS certificate associated with the message, if any.) 2989 */ 2990 enum MESSAGE_TLS_CERTIFICATE = "tls-certificate"; 2991 alias SOUP_MESSAGE_TLS_CERTIFICATE = MESSAGE_TLS_CERTIFICATE; 2992 2993 /** 2994 * Alias for the #SoupMessage:tls-errors property. (The 2995 * verification errors on #SoupMessage:tls-certificate.) 2996 */ 2997 enum MESSAGE_TLS_ERRORS = "tls-errors"; 2998 alias SOUP_MESSAGE_TLS_ERRORS = MESSAGE_TLS_ERRORS; 2999 3000 /** 3001 * Alias for the #SoupMessage:uri property. (The message's 3002 * #SoupURI.) 3003 */ 3004 enum MESSAGE_URI = "uri"; 3005 alias SOUP_MESSAGE_URI = MESSAGE_URI; 3006 3007 /** 3008 * Like soup_get_micro_version(), but from the headers used at 3009 * application compile time, rather than from the library linked 3010 * against at application run time. 3011 */ 3012 enum MICRO_VERSION = 0; 3013 alias SOUP_MICRO_VERSION = MICRO_VERSION; 3014 3015 /** 3016 * Like soup_get_minor_version(), but from the headers used at 3017 * application compile time, rather than from the library linked 3018 * against at application run time. 3019 */ 3020 enum MINOR_VERSION = 72; 3021 alias SOUP_MINOR_VERSION = MINOR_VERSION; 3022 3023 /** 3024 * Alias for the #SoupRequest:session property, qv. 3025 */ 3026 enum REQUEST_SESSION = "session"; 3027 alias SOUP_REQUEST_SESSION = REQUEST_SESSION; 3028 3029 /** 3030 * Alias for the #SoupRequest:uri property, qv. 3031 */ 3032 enum REQUEST_URI = "uri"; 3033 alias SOUP_REQUEST_URI = REQUEST_URI; 3034 3035 /** 3036 * Alias for the #SoupServer:add-websocket-extension property, qv. 3037 */ 3038 enum SERVER_ADD_WEBSOCKET_EXTENSION = "add-websocket-extension"; 3039 alias SOUP_SERVER_ADD_WEBSOCKET_EXTENSION = SERVER_ADD_WEBSOCKET_EXTENSION; 3040 3041 /** 3042 * Alias for the deprecated #SoupServer:async-context 3043 * property, qv. 3044 * 3045 * Deprecated: The new API uses the thread-default #GMainContext 3046 * rather than having an explicitly-specified one. 3047 */ 3048 enum SERVER_ASYNC_CONTEXT = "async-context"; 3049 alias SOUP_SERVER_ASYNC_CONTEXT = SERVER_ASYNC_CONTEXT; 3050 3051 /** 3052 * Alias for the #SoupServer:https-aliases property, qv. 3053 */ 3054 enum SERVER_HTTPS_ALIASES = "https-aliases"; 3055 alias SOUP_SERVER_HTTPS_ALIASES = SERVER_HTTPS_ALIASES; 3056 3057 /** 3058 * Alias for the #SoupServer:http-aliases property, qv. 3059 */ 3060 enum SERVER_HTTP_ALIASES = "http-aliases"; 3061 alias SOUP_SERVER_HTTP_ALIASES = SERVER_HTTP_ALIASES; 3062 3063 /** 3064 * Alias for the #SoupServer:interface property, qv. 3065 * 3066 * Deprecated: #SoupServers can listen on multiple interfaces 3067 * at once now. Use soup_server_listen(), etc, to listen on an 3068 * interface, and soup_server_get_uris() to see what addresses 3069 * are being listened on. 3070 */ 3071 enum SERVER_INTERFACE = "interface"; 3072 alias SOUP_SERVER_INTERFACE = SERVER_INTERFACE; 3073 3074 /** 3075 * Alias for the deprecated #SoupServer:port property, qv. 3076 * 3077 * Deprecated: #SoupServers can listen on multiple interfaces 3078 * at once now. Use soup_server_listen(), etc, to listen on a 3079 * port, and soup_server_get_uris() to see what ports are 3080 * being listened on. 3081 */ 3082 enum SERVER_PORT = "port"; 3083 alias SOUP_SERVER_PORT = SERVER_PORT; 3084 3085 /** 3086 * Alias for the #SoupServer:raw-paths property. (If %TRUE, 3087 * percent-encoding in the Request-URI path will not be 3088 * automatically decoded.) 3089 */ 3090 enum SERVER_RAW_PATHS = "raw-paths"; 3091 alias SOUP_SERVER_RAW_PATHS = SERVER_RAW_PATHS; 3092 3093 /** 3094 * Alias for the #SoupServer:remove-websocket-extension property, qv. 3095 */ 3096 enum SERVER_REMOVE_WEBSOCKET_EXTENSION = "remove-websocket-extension"; 3097 alias SOUP_SERVER_REMOVE_WEBSOCKET_EXTENSION = SERVER_REMOVE_WEBSOCKET_EXTENSION; 3098 3099 /** 3100 * Alias for the #SoupServer:server-header property, qv. 3101 */ 3102 enum SERVER_SERVER_HEADER = "server-header"; 3103 alias SOUP_SERVER_SERVER_HEADER = SERVER_SERVER_HEADER; 3104 3105 /** 3106 * Alias for the #SoupServer:ssl-cert-file property, qv. 3107 * 3108 * Deprecated: use #SoupServer:tls-certificate or 3109 * soup_server_set_ssl_certificate(). 3110 */ 3111 enum SERVER_SSL_CERT_FILE = "ssl-cert-file"; 3112 alias SOUP_SERVER_SSL_CERT_FILE = SERVER_SSL_CERT_FILE; 3113 3114 /** 3115 * Alias for the #SoupServer:ssl-key-file property, qv. 3116 * 3117 * Deprecated: use #SoupServer:tls-certificate or 3118 * soup_server_set_ssl_certificate(). 3119 */ 3120 enum SERVER_SSL_KEY_FILE = "ssl-key-file"; 3121 alias SOUP_SERVER_SSL_KEY_FILE = SERVER_SSL_KEY_FILE; 3122 3123 /** 3124 * Alias for the #SoupServer:tls-certificate property, qv. 3125 */ 3126 enum SERVER_TLS_CERTIFICATE = "tls-certificate"; 3127 alias SOUP_SERVER_TLS_CERTIFICATE = SERVER_TLS_CERTIFICATE; 3128 3129 /** 3130 * Alias for the #SoupSession:accept-language property, qv. 3131 */ 3132 enum SESSION_ACCEPT_LANGUAGE = "accept-language"; 3133 alias SOUP_SESSION_ACCEPT_LANGUAGE = SESSION_ACCEPT_LANGUAGE; 3134 3135 /** 3136 * Alias for the #SoupSession:accept-language-auto property, qv. 3137 */ 3138 enum SESSION_ACCEPT_LANGUAGE_AUTO = "accept-language-auto"; 3139 alias SOUP_SESSION_ACCEPT_LANGUAGE_AUTO = SESSION_ACCEPT_LANGUAGE_AUTO; 3140 3141 /** 3142 * Alias for the #SoupSession:add-feature property, qv. 3143 */ 3144 enum SESSION_ADD_FEATURE = "add-feature"; 3145 alias SOUP_SESSION_ADD_FEATURE = SESSION_ADD_FEATURE; 3146 3147 /** 3148 * Alias for the #SoupSession:add-feature-by-type property, qv. 3149 */ 3150 enum SESSION_ADD_FEATURE_BY_TYPE = "add-feature-by-type"; 3151 alias SOUP_SESSION_ADD_FEATURE_BY_TYPE = SESSION_ADD_FEATURE_BY_TYPE; 3152 3153 /** 3154 * Alias for the #SoupSession:async-context property, qv. 3155 */ 3156 enum SESSION_ASYNC_CONTEXT = "async-context"; 3157 alias SOUP_SESSION_ASYNC_CONTEXT = SESSION_ASYNC_CONTEXT; 3158 3159 /** 3160 * Alias for the #SoupSession:https-aliases property, qv. 3161 */ 3162 enum SESSION_HTTPS_ALIASES = "https-aliases"; 3163 alias SOUP_SESSION_HTTPS_ALIASES = SESSION_HTTPS_ALIASES; 3164 3165 /** 3166 * Alias for the #SoupSession:http-aliases property, qv. 3167 */ 3168 enum SESSION_HTTP_ALIASES = "http-aliases"; 3169 alias SOUP_SESSION_HTTP_ALIASES = SESSION_HTTP_ALIASES; 3170 3171 /** 3172 * Alias for the #SoupSession:idle-timeout property, qv. 3173 */ 3174 enum SESSION_IDLE_TIMEOUT = "idle-timeout"; 3175 alias SOUP_SESSION_IDLE_TIMEOUT = SESSION_IDLE_TIMEOUT; 3176 3177 /** 3178 * Alias for the #SoupSession:local-address property, qv. 3179 */ 3180 enum SESSION_LOCAL_ADDRESS = "local-address"; 3181 alias SOUP_SESSION_LOCAL_ADDRESS = SESSION_LOCAL_ADDRESS; 3182 3183 /** 3184 * Alias for the #SoupSession:max-conns property, qv. 3185 */ 3186 enum SESSION_MAX_CONNS = "max-conns"; 3187 alias SOUP_SESSION_MAX_CONNS = SESSION_MAX_CONNS; 3188 3189 /** 3190 * Alias for the #SoupSession:max-conns-per-host property, qv. 3191 */ 3192 enum SESSION_MAX_CONNS_PER_HOST = "max-conns-per-host"; 3193 alias SOUP_SESSION_MAX_CONNS_PER_HOST = SESSION_MAX_CONNS_PER_HOST; 3194 3195 /** 3196 * Alias for the #SoupSession:proxy-resolver property, qv. 3197 */ 3198 enum SESSION_PROXY_RESOLVER = "proxy-resolver"; 3199 alias SOUP_SESSION_PROXY_RESOLVER = SESSION_PROXY_RESOLVER; 3200 3201 /** 3202 * Alias for the #SoupSession:proxy-uri property, qv. 3203 */ 3204 enum SESSION_PROXY_URI = "proxy-uri"; 3205 alias SOUP_SESSION_PROXY_URI = SESSION_PROXY_URI; 3206 3207 /** 3208 * Alias for the #SoupSession:remove-feature-by-type property, 3209 * qv. 3210 */ 3211 enum SESSION_REMOVE_FEATURE_BY_TYPE = "remove-feature-by-type"; 3212 alias SOUP_SESSION_REMOVE_FEATURE_BY_TYPE = SESSION_REMOVE_FEATURE_BY_TYPE; 3213 3214 /** 3215 * Alias for the #SoupSession:ssl-ca-file property, qv. 3216 */ 3217 enum SESSION_SSL_CA_FILE = "ssl-ca-file"; 3218 alias SOUP_SESSION_SSL_CA_FILE = SESSION_SSL_CA_FILE; 3219 3220 /** 3221 * Alias for the #SoupSession:ssl-strict property, qv. 3222 */ 3223 enum SESSION_SSL_STRICT = "ssl-strict"; 3224 alias SOUP_SESSION_SSL_STRICT = SESSION_SSL_STRICT; 3225 3226 /** 3227 * Alias for the #SoupSession:ssl-use-system-ca-file property, 3228 * qv. 3229 */ 3230 enum SESSION_SSL_USE_SYSTEM_CA_FILE = "ssl-use-system-ca-file"; 3231 alias SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE = SESSION_SSL_USE_SYSTEM_CA_FILE; 3232 3233 /** 3234 * Alias for the #SoupSession:timeout property, qv. 3235 */ 3236 enum SESSION_TIMEOUT = "timeout"; 3237 alias SOUP_SESSION_TIMEOUT = SESSION_TIMEOUT; 3238 3239 /** 3240 * Alias for the #SoupSession:tls-database property, qv. 3241 */ 3242 enum SESSION_TLS_DATABASE = "tls-database"; 3243 alias SOUP_SESSION_TLS_DATABASE = SESSION_TLS_DATABASE; 3244 3245 /** 3246 * Alias for the #SoupSession:tls-interaction property, qv. 3247 */ 3248 enum SESSION_TLS_INTERACTION = "tls-interaction"; 3249 alias SOUP_SESSION_TLS_INTERACTION = SESSION_TLS_INTERACTION; 3250 3251 /** 3252 * Alias for the #SoupSession:user-agent property, qv. 3253 */ 3254 enum SESSION_USER_AGENT = "user-agent"; 3255 alias SOUP_SESSION_USER_AGENT = SESSION_USER_AGENT; 3256 3257 /** 3258 * Alias for the #SoupSession:use-ntlm property, qv. 3259 */ 3260 enum SESSION_USE_NTLM = "use-ntlm"; 3261 alias SOUP_SESSION_USE_NTLM = SESSION_USE_NTLM; 3262 3263 /** 3264 * Alias for the #SoupSession:use-thread-context property, qv. 3265 */ 3266 enum SESSION_USE_THREAD_CONTEXT = "use-thread-context"; 3267 alias SOUP_SESSION_USE_THREAD_CONTEXT = SESSION_USE_THREAD_CONTEXT; 3268 3269 /** 3270 * Alias for the #SoupSocket:async-context property. (The 3271 * socket's #GMainContext.) 3272 */ 3273 enum SOCKET_ASYNC_CONTEXT = "async-context"; 3274 alias SOUP_SOCKET_ASYNC_CONTEXT = SOCKET_ASYNC_CONTEXT; 3275 3276 /** 3277 * Alias for the #SoupSocket:non-blocking property. (Whether 3278 * or not the socket uses non-blocking I/O.) 3279 */ 3280 enum SOCKET_FLAG_NONBLOCKING = "non-blocking"; 3281 alias SOUP_SOCKET_FLAG_NONBLOCKING = SOCKET_FLAG_NONBLOCKING; 3282 3283 /** 3284 * Alias for the #SoupSocket:is-server property, qv. 3285 */ 3286 enum SOCKET_IS_SERVER = "is-server"; 3287 alias SOUP_SOCKET_IS_SERVER = SOCKET_IS_SERVER; 3288 3289 /** 3290 * Alias for the #SoupSocket:local-address property. (Address 3291 * of local end of socket.) 3292 */ 3293 enum SOCKET_LOCAL_ADDRESS = "local-address"; 3294 alias SOUP_SOCKET_LOCAL_ADDRESS = SOCKET_LOCAL_ADDRESS; 3295 3296 /** 3297 * Alias for the #SoupSocket:remote-address property. (Address 3298 * of remote end of socket.) 3299 */ 3300 enum SOCKET_REMOTE_ADDRESS = "remote-address"; 3301 alias SOUP_SOCKET_REMOTE_ADDRESS = SOCKET_REMOTE_ADDRESS; 3302 3303 /** 3304 * Alias for the #SoupSocket:ssl-creds property. 3305 * (SSL credential information.) 3306 */ 3307 enum SOCKET_SSL_CREDENTIALS = "ssl-creds"; 3308 alias SOUP_SOCKET_SSL_CREDENTIALS = SOCKET_SSL_CREDENTIALS; 3309 3310 /** 3311 * Alias for the #SoupSocket:ssl-fallback property. 3312 */ 3313 enum SOCKET_SSL_FALLBACK = "ssl-fallback"; 3314 alias SOUP_SOCKET_SSL_FALLBACK = SOCKET_SSL_FALLBACK; 3315 3316 /** 3317 * Alias for the #SoupSocket:ssl-strict property. 3318 */ 3319 enum SOCKET_SSL_STRICT = "ssl-strict"; 3320 alias SOUP_SOCKET_SSL_STRICT = SOCKET_SSL_STRICT; 3321 3322 /** 3323 * Alias for the #SoupSocket:timeout property. (The timeout 3324 * in seconds for blocking socket I/O operations.) 3325 */ 3326 enum SOCKET_TIMEOUT = "timeout"; 3327 alias SOUP_SOCKET_TIMEOUT = SOCKET_TIMEOUT; 3328 3329 /** 3330 * Alias for the #SoupSocket:tls-certificate 3331 * property. Note that this property's value is only useful 3332 * if the socket is for a TLS connection, and only reliable 3333 * after some data has been transferred to or from it. 3334 */ 3335 enum SOCKET_TLS_CERTIFICATE = "tls-certificate"; 3336 alias SOUP_SOCKET_TLS_CERTIFICATE = SOCKET_TLS_CERTIFICATE; 3337 3338 /** 3339 * Alias for the #SoupSocket:tls-errors 3340 * property. Note that this property's value is only useful 3341 * if the socket is for a TLS connection, and only reliable 3342 * after some data has been transferred to or from it. 3343 */ 3344 enum SOCKET_TLS_ERRORS = "tls-errors"; 3345 alias SOUP_SOCKET_TLS_ERRORS = SOCKET_TLS_ERRORS; 3346 3347 /** 3348 * Alias for the #SoupSocket:trusted-certificate 3349 * property. 3350 */ 3351 enum SOCKET_TRUSTED_CERTIFICATE = "trusted-certificate"; 3352 alias SOUP_SOCKET_TRUSTED_CERTIFICATE = SOCKET_TRUSTED_CERTIFICATE; 3353 3354 /** 3355 * Alias for the #SoupSocket:use-thread-context property. (Use 3356 * g_main_context_get_thread_default()) 3357 */ 3358 enum SOCKET_USE_THREAD_CONTEXT = "use-thread-context"; 3359 alias SOUP_SOCKET_USE_THREAD_CONTEXT = SOCKET_USE_THREAD_CONTEXT; 3360 3361 /** 3362 * A macro that should be defined by the user prior to including 3363 * libsoup.h. The definition should be one of the predefined libsoup 3364 * version macros: %SOUP_VERSION_2_24, %SOUP_VERSION_2_26, ... 3365 * 3366 * This macro defines the earliest version of libsoup that the package 3367 * is required to be able to compile against. 3368 * 3369 * If the compiler is configured to warn about the use of deprecated 3370 * functions, then using functions that were deprecated in version 3371 * %SOUP_VERSION_MIN_REQUIRED or earlier will cause warnings (but 3372 * using functions deprecated in later releases will not). 3373 */ 3374 enum VERSION_MIN_REQUIRED = 2; 3375 alias SOUP_VERSION_MIN_REQUIRED = VERSION_MIN_REQUIRED;