ReactOS 0.4.16-dev-1946-g52006dd
header.h
Go to the documentation of this file.
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, <daniel@haxx.se>, 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 * SPDX-License-Identifier: curl
24 *
25 ***************************************************************************/
26
28 char *name; /* this might not use the same case */
29 char *value;
30 size_t amount; /* number of headers using this name */
31 size_t index; /* ... of this instance, 0 or higher */
32 unsigned int origin; /* see bits below */
33 void *anchor; /* handle privately used by libcurl */
34};
35
36/* 'origin' bits */
37#define CURLH_HEADER (1<<0) /* plain server header */
38#define CURLH_TRAILER (1<<1) /* trailers */
39#define CURLH_CONNECT (1<<2) /* CONNECT headers */
40#define CURLH_1XX (1<<3) /* 1xx headers */
41#define CURLH_PSEUDO (1<<4) /* pseudo headers */
42
43typedef enum {
45 CURLHE_BADINDEX, /* header exists but not with this index */
46 CURLHE_MISSING, /* no such header exists */
47 CURLHE_NOHEADERS, /* no headers at all exist (yet) */
48 CURLHE_NOREQUEST, /* no request with this number was used */
49 CURLHE_OUT_OF_MEMORY, /* out of memory while processing */
50 CURLHE_BAD_ARGUMENT, /* a function argument was not okay */
51 CURLHE_NOT_BUILT_IN /* if API was disabled in the build */
53
55 const char *name,
56 size_t index,
57 unsigned int origin,
58 int request,
59 struct curl_header **hout);
60
62 unsigned int origin,
63 int request,
64 struct curl_header *prev);
65
66#endif /* CURLINC_HEADER_H */
#define CURL_EXTERN
Definition: curl.h:124
GLuint index
Definition: glext.h:6031
voidpf uLong int origin
Definition: ioapi.h:144
CURL_EXTERN CURLHcode curl_easy_header(CURL *easy, const char *name, size_t index, unsigned int origin, int request, struct curl_header **hout)
CURLHcode
Definition: header.h:43
@ CURLHE_NOREQUEST
Definition: header.h:48
@ CURLHE_NOHEADERS
Definition: header.h:47
@ CURLHE_BADINDEX
Definition: header.h:45
@ CURLHE_MISSING
Definition: header.h:46
@ CURLHE_BAD_ARGUMENT
Definition: header.h:50
@ CURLHE_OUT_OF_MEMORY
Definition: header.h:49
@ CURLHE_OK
Definition: header.h:44
@ CURLHE_NOT_BUILT_IN
Definition: header.h:51
CURL_EXTERN struct curl_header * curl_easy_nextheader(CURL *easy, unsigned int origin, int request, struct curl_header *prev)
size_t amount
Definition: header.h:30
void * anchor
Definition: header.h:33
char * name
Definition: header.h:28
size_t index
Definition: header.h:31
char * value
Definition: header.h:29
unsigned int origin
Definition: header.h:32
Definition: name.c:39
Definition: tftpd.h:86