Github User Fetcher
1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
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) 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
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
struct
curl_header
{
32
char
*
name
;
/* this might not use the same case */
33
char
*
value
;
34
size_t
amount
;
/* number of headers using this name */
35
size_t
index
;
/* ... of this instance, 0 or higher */
36
unsigned
int
origin
;
/* see bits below */
37
void
*
anchor
;
/* handle privately used by libcurl */
38
};
39
40
/* 'origin' bits */
41
#define CURLH_HEADER (1<<0)
/* plain server header */
42
#define CURLH_TRAILER (1<<1)
/* trailers */
43
#define CURLH_CONNECT (1<<2)
/* CONNECT headers */
44
#define CURLH_1XX (1<<3)
/* 1xx headers */
45
#define CURLH_PSEUDO (1<<4)
/* pseudo headers */
46
47
typedef
enum
{
48
CURLHE_OK
,
49
CURLHE_BADINDEX
,
/* header exists but not with this index */
50
CURLHE_MISSING
,
/* no such header exists */
51
CURLHE_NOHEADERS
,
/* no headers at all exist (yet) */
52
CURLHE_NOREQUEST
,
/* no request with this number was used */
53
CURLHE_OUT_OF_MEMORY
,
/* out of memory while processing */
54
CURLHE_BAD_ARGUMENT
,
/* a function argument was not okay */
55
CURLHE_NOT_BUILT_IN
/* if API was disabled in the build */
56
}
CURLHcode
;
57
58
CURL_EXTERN
CURLHcode
curl_easy_header
(
CURL
*easy,
59
const
char
*
name
,
60
size_t
index
,
61
unsigned
int
origin,
62
int
request,
63
struct
curl_header
**hout);
64
65
CURL_EXTERN
struct
curl_header
*
curl_easy_nextheader
(
CURL
*easy,
66
unsigned
int
origin
,
67
int
request,
68
struct
curl_header
*prev);
69
70
#ifdef __cplusplus
71
}
/* end of extern "C" */
72
#endif
73
74
#endif
/* CURLINC_HEADER_H */
CURL_EXTERN
#define CURL_EXTERN
Definition
curl.h:137
CURL
void CURL
Definition
curl.h:117
index
guint index
Definition
deprecated/gthread.h:1
curl_easy_header
CURL_EXTERN CURLHcode curl_easy_header(CURL *easy, const char *name, size_t index, unsigned int origin, int request, struct curl_header **hout)
CURLHcode
CURLHcode
Definition
header.h:47
CURLHE_NOREQUEST
@ CURLHE_NOREQUEST
Definition
header.h:52
CURLHE_NOHEADERS
@ CURLHE_NOHEADERS
Definition
header.h:51
CURLHE_BADINDEX
@ CURLHE_BADINDEX
Definition
header.h:49
CURLHE_MISSING
@ CURLHE_MISSING
Definition
header.h:50
CURLHE_BAD_ARGUMENT
@ CURLHE_BAD_ARGUMENT
Definition
header.h:54
CURLHE_OUT_OF_MEMORY
@ CURLHE_OUT_OF_MEMORY
Definition
header.h:53
CURLHE_OK
@ CURLHE_OK
Definition
header.h:48
CURLHE_NOT_BUILT_IN
@ CURLHE_NOT_BUILT_IN
Definition
header.h:55
curl_easy_nextheader
CURL_EXTERN struct curl_header * curl_easy_nextheader(CURL *easy, unsigned int origin, int request, struct curl_header *prev)
name
const char * name
Definition
lsqlite3.c:2154
curl_header
Definition
header.h:31
curl_header::amount
size_t amount
Definition
header.h:34
curl_header::anchor
void * anchor
Definition
header.h:37
curl_header::name
char * name
Definition
header.h:32
curl_header::index
size_t index
Definition
header.h:35
curl_header::value
char * value
Definition
header.h:33
curl_header::origin
unsigned int origin
Definition
header.h:36
nix
store
xz1772bzjjsabm61gm75wh3sjlmcs4bn-curl-8.12.1-dev
include
curl
header.h
Generated by
1.10.0