#include <icy/http/form.h>Subclassed by:
FilePart,StringPart
An implementation of FormPart.
| Return | Name | Description |
|---|---|---|
FormPart | Creates the FormPart with the given MIME content type. | |
~FormPart virtual | Destroys the FormPart. | |
void | reset virtual | Resets the internal state and write position to the beginning. Called by FormWriter when retrying or recalculating content length. |
bool | writeChunk | Writes the next chunk of data to the FormWriter. |
void | write | Writes the entire part data to the FormWriter in one call. |
void | write | Writes the entire part data to an output stream (used for content-length calculation). |
NVCollection & | headers | Returns the extra MIME headers for this part (e.g. Content-Disposition). |
bool | initialWrite virtual const | Returns true if this is the first write call since construction or reset(). |
const std::string & | contentType const | Returns the MIME content type for this part. |
uint64_t | length const | Returns the total byte length of the part data. |
FormPart(const std::string & contentType)Creates the FormPart with the given MIME content type.
contentType MIME type for this part (default: "application/octet-stream").virtual
virtual ~FormPart()Destroys the FormPart.
virtual
virtual void reset()Resets the internal state and write position to the beginning. Called by FormWriter when retrying or recalculating content length.
bool writeChunk(FormWriter & writer)Writes the next chunk of data to the FormWriter.
writer The FormWriter to send the chunk through.true if more data remains to be written; false when complete.
void write(FormWriter & writer)Writes the entire part data to the FormWriter in one call.
writer The FormWriter to send data through.void write(std::ostream & ostr)Writes the entire part data to an output stream (used for content-length calculation).
ostr Output stream to write to.NVCollection & headers()Returns the extra MIME headers for this part (e.g. Content-Disposition).
virtual const
virtual bool initialWrite() constReturns true if this is the first write call since construction or reset().
const
const std::string & contentType() constReturns the MIME content type for this part.
const
uint64_t length() constReturns the total byte length of the part data.
| Return | Name | Description |
|---|---|---|
std::string | _contentType | |
uint64_t | _length | |
NVCollection | _headers | |
bool | _initialWrite |
std::string _contentTypeuint64_t _lengthNVCollection _headersbool _initialWrite