VirtualBox

source: vbox/trunk/src/libs/curl-7.83.1/include/curl/header.h@ 97287

最後變更 在這個檔案從97287是 95312,由 vboxsync 提交於 3 年 前

libs/{curl,libxml2}: OSE export fixes, bugref:8515

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.7 KB
 
1#ifndef CURLINC_HEADER_H
2#define CURLINC_HEADER_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 2018 - 2022, Daniel Stenberg, <[email protected]>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at https://curl.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ***************************************************************************/
24
25struct curl_header {
26 char *name; /* this might not use the same case */
27 char *value;
28 size_t amount; /* number of headers using this name */
29 size_t index; /* ... of this instance, 0 or higher */
30 unsigned int origin; /* see bits below */
31 void *anchor; /* handle privately used by libcurl */
32};
33
34/* 'origin' bits */
35#define CURLH_HEADER (1<<0) /* plain server header */
36#define CURLH_TRAILER (1<<1) /* trailers */
37#define CURLH_CONNECT (1<<2) /* CONNECT headers */
38#define CURLH_1XX (1<<3) /* 1xx headers */
39#define CURLH_PSEUDO (1<<4) /* pseudo headers */
40
41typedef enum {
42 CURLHE_OK,
43 CURLHE_BADINDEX, /* header exists but not with this index */
44 CURLHE_MISSING, /* no such header exists */
45 CURLHE_NOHEADERS, /* no headers at all exist (yet) */
46 CURLHE_NOREQUEST, /* no request with this number was used */
47 CURLHE_OUT_OF_MEMORY, /* out of memory while processing */
48 CURLHE_BAD_ARGUMENT, /* a function argument was not okay */
49 CURLHE_NOT_BUILT_IN /* if API was disabled in the build */
50} CURLHcode;
51
52CURL_EXTERN CURLHcode curl_easy_header(CURL *easy,
53 const char *name,
54 size_t index,
55 unsigned int origin,
56 int request,
57 struct curl_header **hout);
58
59CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy,
60 unsigned int origin,
61 int request,
62 struct curl_header *prev);
63
64#endif /* CURLINC_HEADER_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette