44#ifndef COMMONCPP_MIME_H_
45#define COMMONCPP_MIME_H_
47#ifndef COMMONCPP_CONFIG_H_
48#include <commoncpp/config.h>
51#ifndef COMMONCPP_SOCKET_H_
67class __EXPORT MIMEMultipart
70 __DELETE_COPY(MIMEMultipart);
73 friend class MIMEItemPart;
77 MIMEItemPart *first, *last;
79 virtual ~MIMEMultipart();
95 virtual void head(std::ostream *output);
103 virtual void body(std::ostream *output);
124class __EXPORT MIMEMultipartForm :
public MIMEMultipart
127 __DELETE_COPY(MIMEMultipartForm);
130 virtual ~MIMEMultipartForm();
148class __EXPORT MIMEItemPart
151 __DELETE_COPY(MIMEItemPart);
154 friend class MIMEMultipart;
165 virtual void head(std::ostream *output);
172 virtual void body(std::ostream *output) = 0;
182 virtual ~MIMEItemPart();
192class __EXPORT MIMEFormData :
public MIMEItemPart
195 __DELETE_COPY(MIMEFormData);
201 virtual ~MIMEFormData();
209 void head(std::ostream *output) __OVERRIDE;
216 void body(std::ostream *output) __OVERRIDE;
A container class for multi-part MIME document objects which can be streamed to a std::ostream destin...
MIMEMultipart(const char *document)
Contruct a multi-part document, and describe it's type.
char ** getHeaders(void)
Get a string array of the headers to use.
virtual void body(std::ostream *output)
Stream the "body" of the multi-part document.
virtual void head(std::ostream *output)
Stream the headers of the multi-part document.
The Multipart form is a MIME multipart document specific for the construction and delivery of form da...
MIMEMultipartForm()
Construct a form result.
This is used to attach an item part to a MIME multipart document that is being streamed.
virtual void body(std::ostream *output)=0
Stream the content of this document part.
MIMEItemPart(MIMEMultipart *top, const char *ct)
Construct and attach a document part to a multipart document.
virtual void head(std::ostream *output)
Stream the header(s) for the current document part.
MIMEFormData(MIMEMultipartForm *top, const char *name, const char *content)
Construct form data field part of multipart form.
void head(std::ostream *output)
Stream header, Content-Disposition form-data.
void body(std::ostream *output)
Stream content (value) of this form data field.