229 int ecode,
const char* extraEcode);
256#define HttpUploadCbIntf_constructor(o, onFile, onError) do { \
257 (o)->onFileFp=onFile; \
258 (o)->onErrorFp=onError; \
331 DoubleList uploadNodeList;
366#define HttpUpload_getIoIntf(o) (o)->io
BA_API HttpAsynchResp * HttpUploadNode_getResponse(struct HttpUploadNode *o)
Switch from receiving the upload to producing its response.
BA_API void * HttpUploadNode_getdata(struct HttpUploadNode *o)
BA_API BaBool HttpUploadNode_initial(struct HttpUploadNode *o)
IoIntfPtr getIoIntf()
Definition: HttpUpload.h:376
struct HttpConnection * getConnection()
Definition: HttpUpload.h:189
BA_API struct HttpConnection * HttpUploadNode_getConnection(struct HttpUploadNode *o)
#define HttpUpload_getIoIntf(o)
Definition: HttpUpload.h:366
~HttpUpload()
Terminate the HttpUpload instance and all active HttpUploadNode instances.
Definition: HttpUpload.h:372
HttpSession * getSession()
Definition: HttpUpload.h:193
BA_API HttpSession * HttpUploadNode_getSession(struct HttpUploadNode *o)
BA_API void HttpUpload_constructor(HttpUpload *o, IoIntfPtr io, AllocatorIntf *alloc, HttpUploadCbIntf *uploadCb, int maxUploads)
Initialize an HttpUpload instance.
BA_API const char * HttpUploadNode_getUrl(struct HttpUploadNode *o)
void(* HttpUploadCbIntf_OnFile)(struct HttpUploadCbIntf *o, struct HttpUploadNode *node, BaBool completed)
Notify the application about a file or completed request.
Definition: HttpUpload.h:215
struct HttpUpload HttpUpload
The HttpUpload node is responsible for creating and starting HttpUploadNode instances.
BA_API BaBool HttpUploadNode_isResponseMode(struct HttpUploadNode *o)
BA_API void HttpUploadNode_incRef(struct HttpUploadNode *o)
Retain a node beyond the current callback.
BA_API int HttpUpload_service(HttpUpload *o, const char *name, HttpCommand *cmd, void *userdata)
Start an upload for a PUT or multipart POST request.
void(* HttpUploadCbIntf_OnError)(struct HttpUploadCbIntf *o, struct HttpUploadNode *node, int ecode, const char *extraEcode)
Report upload failure or parent shutdown.
Definition: HttpUpload.h:227
BA_API IoIntfPtr HttpUploadNode_getIoIntf(struct HttpUploadNode *o)
const char * getUrl()
Definition: HttpUpload.h:185
struct HttpUploadCbIntf HttpUploadCbIntf
The HttpUploadCbIntf interface is an abstract class that must be implemented by code using the HttpUp...
BA_API const char * HttpUploadNode_getName(struct HttpUploadNode *o)
#define HttpUploadCbIntf_constructor(o, onFile, onError)
Install upload callbacks without allocating memory.
Definition: HttpUpload.h:256
BA_API void set_inflategzip(IoIntf_InflateGzip ptr)
Install the process-wide gzip upload adapter in builds with zlib support.
IoIntfPtr getIoIntf()
Definition: HttpUpload.h:191
BA_API IoIntf_InflateGzip get_inflategzip(void)
BA_API int HttpUploadNode_decrRef(struct HttpUploadNode *o)
Release one retained reference.
bool isMultipartUpload()
Definition: HttpUpload.h:195
BA_API BaBool HttpUploadNode_isMultipartUpload(struct HttpUploadNode *o)
BA_API void HttpUpload_destructor(HttpUpload *o)
Abort active uploads and release their storage.
int service(const char *name, HttpCommand *cmd, void *userdata=0)
The HttpUpload service method.
Definition: HttpUpload.h:374
HttpAsynchResp * getResponse()
Switch from receiving the upload to producing its response.
Definition: HttpUpload.h:187
const char * getName()
Definition: HttpUpload.h:183
ResIntfPtr(* IoIntf_InflateGzip)(IoIntfPtr io, const char *name, int *status, const char **ecode)
Open a destination that accepts gzip bytes and stores decompressed data.
Definition: IoIntf.h:274
U8 BaBool
Boolean stored in an unsigned byte; FALSE is zero and TRUE is one.
Definition: GenPrimT.h:118
Memory allocation and deallocation Interface class.
Definition: AllocatorIntf.h:98
Send data asynchronously to a client.
Definition: HttpAsynchResp.h:114
The HttpCommand class is a container class for the HttpRequest and HttpResponse command pair.
Definition: HttpServer.h:2151
Contains information about the physical socket connection.
Definition: HttpConnection.h:80
Provides a way to identify a user across more than one page request or visit to a web site,...
Definition: HttpServer.h:2305
The HttpUploadCbIntf interface is an abstract class that must be implemented by code using the HttpUp...
Definition: HttpUpload.h:237
HttpUploadCbIntf()
Uninitialized storage; install both callbacks before use.
Definition: HttpUpload.h:240
A HttpUploadNode is dynamically created by an HttpUpload instance for each concurrent upload.
Definition: HttpUpload.h:76
The HttpUpload node is responsible for creating and starting HttpUploadNode instances.
Definition: HttpUpload.h:275
HttpUpload()
Uninitialized storage; initialize before use or destruction.
Definition: HttpUpload.h:278