42#include <HttpAsynchReq.h>
43#include <MultipartUpload.h>
44#include <AuthenticatedUser.h>
90 IoIntfPtr getIoIntf();
112BA_API
const char* HttpUploadNode_getName(
struct HttpUploadNode* o);
113BA_API
const char* HttpUploadNode_getUrl(
struct HttpUploadNode* o);
117BA_API IoIntfPtr HttpUploadNode_getIoIntf(
struct HttpUploadNode* o);
120BA_API BaBool HttpUploadNode_isMultipartUpload(
struct HttpUploadNode* o);
121BA_API BaBool HttpUploadNode_isResponseMode(
struct HttpUploadNode* o);
130 return HttpUploadNode_getName(
this); }
132 return HttpUploadNode_getUrl(
this); }
134 return HttpUploadNode_getResponse(
this); }
136 return HttpUploadNode_getConnection(
this); }
137inline IoIntfPtr HttpUploadNode::getIoIntf() {
138 return HttpUploadNode_getIoIntf(
this); }
140 return HttpUploadNode_getSession(
this); }
142 return HttpUploadNode_isMultipartUpload(
this) ? true :
false; }
151typedef void (*HttpUploadCbIntf_OnFile)(
153typedef void (*HttpUploadCbIntf_OnError)(
155 int ecode,
const char* extraEcode);
173 HttpUploadCbIntf_OnFile onFileFp;
174 HttpUploadCbIntf_OnError onErrorFp;
177#define HttpUploadCbIntf_constructor(o, onFile, onError) do { \
178 (o)->onFileFp=onFile; \
179 (o)->onErrorFp=onError; \
183 inline HttpUploadCbIntf::HttpUploadCbIntf(
184 HttpUploadCbIntf_OnFile of,HttpUploadCbIntf_OnError oe) {
185 HttpUploadCbIntf_constructor(
this, of, oe);
238 DoubleList uploadNodeList;
248BA_API
void HttpUpload_constructor(
251BA_API
void HttpUpload_destructor(
HttpUpload* o);
252BA_API
int HttpUpload_service(
254#define HttpUpload_getIoIntf(o) (o)->io
259 HttpUpload_constructor(
this, io, alloc, uploadCb, maxUploads); }
261 HttpUpload_destructor(
this); }
263 return HttpUpload_service(
this, name, cmd,userdata); }
265 return HttpUpload_getIoIntf(
this); }
IoIntfPtr getIoIntf()
Return a pointer to the IoIntf implementation.
Definition: HttpUpload.h:264
~HttpUpload()
Terminate the HttpUpload instance and all active HttpUploadNode instances.
Definition: HttpUpload.h:260
HttpSession * getSession()
Returns the HttpSession object or null if no session object.
Definition: HttpUpload.h:139
struct HttpUpload HttpUpload
The HttpUpload node is responsible for creating and starting HttpUploadNode instances.
const char * getUrl()
Returns the full URL the client used when sending data.
Definition: HttpUpload.h:131
struct HttpUploadCbIntf HttpUploadCbIntf
The HttpUploadCbIntf interface is an abstract class that must be implemented by code using the HttpUp...
bool isMultipartUpload()
Returns true if HTTP POST.
Definition: HttpUpload.h:141
int service(const char *name, HttpCommand *cmd, void *userdata=0)
The HttpUpload service method.
Definition: HttpUpload.h:262
HttpAsynchResp * getResponse()
Fetch the response object.
Definition: HttpUpload.h:133
const char * getName()
Returns the file name including the relative path.
Definition: HttpUpload.h:129
ResIntfPtr(* IoIntf_InflateGzip)(IoIntfPtr io, const char *name, int *status, const char **ecode)
Open a file for writing.
Definition: IoIntf.h:260
Memory allocation and deallocation Interface class.
Definition: AllocatorIntf.h:83
Send data asynchronously to a client.
Definition: HttpAsynchResp.h:110
The HttpCommand class is a container class for the HttpRequest and HttpResponse command pair.
Definition: HttpServer.h:1818
Contains information about the physical socket connection.
Definition: HttpConnection.h:76
Provides a way to identify a user across more than one page request or visit to a web site,...
Definition: HttpServer.h:1959
The HttpUploadCbIntf interface is an abstract class that must be implemented by code using the HttpUp...
Definition: HttpUpload.h:163
A HttpUploadNode is dynamically created by an HttpUpload instance for each concurrent upload.
Definition: HttpUpload.h:74
The HttpUpload node is responsible for creating and starting HttpUploadNode instances.
Definition: HttpUpload.h:196