GNU libmicrohttpd
0.9.70
action_process_upload.c
Go to the documentation of this file.
1
/*
2
This file is part of libmicrohttpd
3
Copyright (C) 2007-2018 Daniel Pittman and Christian Grothoff
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
25
#include "
internal.h
"
26
27
31
struct
UploadAction
32
{
37
struct
MHD_Action
action
;
38
39
MHD_UploadCallback uc;
40
41
void
*uc_cls;
42
43
};
44
45
56
static
enum
MHD_StatusCode
57
upload_action
(
void
*cls,
58
struct
MHD_Request
*request)
59
{
60
struct
UploadAction *ua = cls;
61
62
(void) ua;
63
// FIXME: implement!
64
return
-1;
65
}
66
67
76
const
struct
MHD_Action
*
77
MHD_action_process_upload
(MHD_UploadCallback uc,
78
void
*uc_cls)
79
{
80
struct
UploadAction *ua;
81
82
if
(
NULL
== (ua = malloc (
sizeof
(
struct
UploadAction))))
83
return
NULL
;
84
ua->action.action = &
upload_action
;
85
ua->action.action_cls = ua;
86
ua->uc = uc;
87
ua->uc_cls = uc_cls;
88
return
&ua->action;
89
}
90
91
92
/* end of action_process_upload.c */
MHD_Action
Definition:
internal.h:1548
MHD_Request
Definition:
internal.h:366
internal.h
internal shared structures
NULL
#define NULL
Definition:
reason_phrase.c:30
upload_action
static enum MHD_StatusCode upload_action(void *cls, struct MHD_Request *request)
Definition:
action_process_upload.c:57
MHD_action_process_upload
const struct MHD_Action * MHD_action_process_upload(MHD_UploadCallback uc, void *uc_cls)
Definition:
action_process_upload.c:77
MHD_Action::action
ActionCallback action
Definition:
internal.h:1554
src
lib
action_process_upload.c
Generated by
1.8.17