GNU libmicrohttpd
1.0.6
Toggle main menu visibility
Loading...
Searching...
No Matches
postprocessor.h
Go to the documentation of this file.
1
/*
2
This file is part of libmicrohttpd
3
Copyright (C) 2007-2022 Daniel Pittman, Christian Grothoff, and Evgeny Grin
4
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
9
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
26
27
#ifndef MHD_POSTPROCESSOR_H
28
#define MHD_POSTPROCESSOR_H 1
29
#include "
internal.h
"
30
34
enum
PP_State
35
{
36
/* general states */
37
PP_Error
,
38
PP_Done
,
39
PP_Init
,
40
PP_NextBoundary
,
41
42
/* url encoding-states */
43
PP_ProcessKey
,
44
PP_ProcessValue
,
45
PP_Callback
,
46
47
/* post encoding-states */
48
PP_ProcessEntryHeaders
,
49
PP_PerformCheckMultipart
,
50
PP_ProcessValueToBoundary
,
51
PP_PerformCleanup
,
52
53
/* nested post-encoding states */
54
PP_Nested_Init
,
55
PP_Nested_PerformMarking
,
56
PP_Nested_ProcessEntryHeaders
,
57
PP_Nested_ProcessValueToBoundary
,
58
PP_Nested_PerformCleanup
59
60
};
61
62
63
enum
RN_State
64
{
68
RN_Inactive
= 0,
69
74
RN_OptN
= 1,
75
80
RN_Full
= 2,
81
86
RN_Dash
= 3,
87
91
RN_Dash2
= 4
92
};
93
94
100
enum
NE_State
101
{
102
NE_none
= 0,
103
NE_content_name
= 1,
104
NE_content_type
= 2,
105
NE_content_filename
= 4,
106
NE_content_transfer_encoding
= 8
107
};
108
109
114
struct
MHD_PostProcessor
115
{
116
121
struct
MHD_Connection
*
connection
;
122
126
MHD_PostDataIterator
ikvi
;
127
131
void
*
cls
;
132
136
const
char
*
encoding
;
137
141
const
char
*
boundary
;
142
146
char
*
nested_boundary
;
147
151
char
*
content_name
;
152
156
char
*
content_type
;
157
161
char
*
content_filename
;
162
166
char
*
content_transfer_encoding
;
167
171
char
xbuf
[2];
172
176
size_t
buffer_size
;
177
181
size_t
buffer_pos
;
182
186
size_t
xbuf_pos
;
187
191
uint64_t
value_offset
;
192
196
size_t
blen
;
197
201
size_t
nlen
;
202
211
bool
must_ikvi
;
212
217
bool
must_unescape_key
;
218
222
enum
PP_State
state
;
223
230
enum
RN_State
skip_rn
;
231
236
enum
PP_State
dash_state
;
237
242
enum
NE_State
have
;
243
244
};
245
246
#endif
/* ! MHD_POSTPROCESSOR_H */
internal.h
MHD internal shared structures.
MHD_PostDataIterator
enum MHD_Result(* MHD_PostDataIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
Definition
microhttpd.h:2936
RN_State
RN_State
Definition
postprocessor.h:64
RN_Dash
@ RN_Dash
Definition
postprocessor.h:86
RN_Inactive
@ RN_Inactive
Definition
postprocessor.h:68
RN_Full
@ RN_Full
Definition
postprocessor.h:80
RN_OptN
@ RN_OptN
Definition
postprocessor.h:74
RN_Dash2
@ RN_Dash2
Definition
postprocessor.h:91
NE_State
NE_State
Definition
postprocessor.h:101
NE_content_name
@ NE_content_name
Definition
postprocessor.h:103
NE_content_type
@ NE_content_type
Definition
postprocessor.h:104
NE_content_transfer_encoding
@ NE_content_transfer_encoding
Definition
postprocessor.h:106
NE_none
@ NE_none
Definition
postprocessor.h:102
NE_content_filename
@ NE_content_filename
Definition
postprocessor.h:105
PP_State
PP_State
Definition
postprocessor.h:35
PP_PerformCleanup
@ PP_PerformCleanup
Definition
postprocessor.h:51
PP_Error
@ PP_Error
Definition
postprocessor.h:37
PP_Nested_PerformMarking
@ PP_Nested_PerformMarking
Definition
postprocessor.h:55
PP_ProcessKey
@ PP_ProcessKey
Definition
postprocessor.h:43
PP_Init
@ PP_Init
Definition
postprocessor.h:39
PP_PerformCheckMultipart
@ PP_PerformCheckMultipart
Definition
postprocessor.h:49
PP_Nested_Init
@ PP_Nested_Init
Definition
postprocessor.h:54
PP_ProcessValue
@ PP_ProcessValue
Definition
postprocessor.h:44
PP_Nested_ProcessEntryHeaders
@ PP_Nested_ProcessEntryHeaders
Definition
postprocessor.h:56
PP_Nested_PerformCleanup
@ PP_Nested_PerformCleanup
Definition
postprocessor.h:58
PP_NextBoundary
@ PP_NextBoundary
Definition
postprocessor.h:40
PP_ProcessEntryHeaders
@ PP_ProcessEntryHeaders
Definition
postprocessor.h:48
PP_ProcessValueToBoundary
@ PP_ProcessValueToBoundary
Definition
postprocessor.h:50
PP_Done
@ PP_Done
Definition
postprocessor.h:38
PP_Callback
@ PP_Callback
Definition
postprocessor.h:45
PP_Nested_ProcessValueToBoundary
@ PP_Nested_ProcessValueToBoundary
Definition
postprocessor.h:57
MHD_Connection
Definition
internal.h:1325
MHD_PostProcessor
Definition
postprocessor.h:115
MHD_PostProcessor::value_offset
uint64_t value_offset
Definition
postprocessor.h:191
MHD_PostProcessor::content_filename
char * content_filename
Definition
postprocessor.h:161
MHD_PostProcessor::dash_state
enum PP_State dash_state
Definition
postprocessor.h:236
MHD_PostProcessor::ikvi
MHD_PostDataIterator ikvi
Definition
postprocessor.h:126
MHD_PostProcessor::nested_boundary
char * nested_boundary
Definition
postprocessor.h:146
MHD_PostProcessor::connection
struct MHD_Connection * connection
Definition
postprocessor.h:121
MHD_PostProcessor::buffer_size
size_t buffer_size
Definition
postprocessor.h:176
MHD_PostProcessor::content_type
char * content_type
Definition
postprocessor.h:156
MHD_PostProcessor::blen
size_t blen
Definition
postprocessor.h:196
MHD_PostProcessor::buffer_pos
size_t buffer_pos
Definition
postprocessor.h:181
MHD_PostProcessor::content_name
char * content_name
Definition
postprocessor.h:151
MHD_PostProcessor::boundary
const char * boundary
Definition
postprocessor.h:141
MHD_PostProcessor::xbuf_pos
size_t xbuf_pos
Definition
postprocessor.h:186
MHD_PostProcessor::content_transfer_encoding
char * content_transfer_encoding
Definition
postprocessor.h:166
MHD_PostProcessor::xbuf
char xbuf[2]
Definition
postprocessor.h:171
MHD_PostProcessor::cls
void * cls
Definition
postprocessor.h:131
MHD_PostProcessor::have
enum NE_State have
Definition
postprocessor.h:242
MHD_PostProcessor::must_unescape_key
bool must_unescape_key
Definition
postprocessor.h:217
MHD_PostProcessor::skip_rn
enum RN_State skip_rn
Definition
postprocessor.h:230
MHD_PostProcessor::state
enum PP_State state
Definition
postprocessor.h:222
MHD_PostProcessor::nlen
size_t nlen
Definition
postprocessor.h:201
MHD_PostProcessor::encoding
const char * encoding
Definition
postprocessor.h:136
MHD_PostProcessor::must_ikvi
bool must_ikvi
Definition
postprocessor.h:211
src
microhttpd
postprocessor.h
Generated by
1.17.0