GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
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
31struct UploadAction
32{
37 struct MHD_Action action;
38
39 MHD_UploadCallback uc;
40
41 void *uc_cls;
42
43};
44
45
56static enum MHD_StatusCode
57upload_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
76const struct MHD_Action *
77MHD_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 */
static enum MHD_StatusCode upload_action(void *cls, struct MHD_Request *request)
const struct MHD_Action * MHD_action_process_upload(MHD_UploadCallback uc, void *uc_cls)
#define NULL
MHD internal shared structures.