A part of a mime multipart HTTP request.
More...
#include <libppbase/base_http/HTTPPart.h>
List of all members.
Public Member Functions |
| HTTPPart (bool mime, size_t memlimit=1048576) |
| Constructor.
|
bool | getContentType (base::String &type) |
| Returns Content-Type.
|
bool | getContentType (base::String &type, base::String &subtype, std::map< base::String, base::String > *args=NULL) |
| Returns Content-Type.
|
bool | getFileName (base::String &filename) |
| Returns the file name.
|
bool | getHeader (const base::String &name, base::String &hret) |
| Returns part header.
|
bool | getID (base::String &idret) |
| Returns the mime content id.
|
const std::map< base::String,
base::String > * | getHeaders () const |
| Returns the mime headers.
|
bool | isMIME () const |
| Checks if this part is a mime part.
|
void | parseHeader (const base::String &header, char delim, base::String &token, std::map< base::String, base::String > *args=NULL) |
| Parses a mime header into tokens.
|
void | removeHeader (const base::String &name) |
| Deletes a header.
|
void | setHeader (const base::String &name, const base::String &value) |
| Sets a header, creating it if necessary.
|
void | setMIME (bool mime=true) |
| Sets the mime flag.
|
size_t | size () const |
| Returns the size of this part.
|
Detailed Description
A part of a mime multipart HTTP request.
- Author:
- Christoph Schwarz
- Version:
- $Id: HTTPPart.h 21 2010-09-05 04:18:17Z cschwarz1 $
Constructor & Destructor Documentation
base_http::HTTPPart::HTTPPart |
( |
bool |
mime, |
|
|
size_t |
memlimit = 1048576 | |
|
) |
| | |
Constructor.
- Parameters:
-
| mime | flag: is mime part |
| memlimit | memory limit in bytes |
Member Function Documentation
bool base_http::HTTPPart::getContentType |
( |
base::String & |
type |
) |
|
Returns Content-Type.
- Parameters:
-
| type | returns mime content type |
- Returns:
- true if successful
Returns Content-Type.
- Parameters:
-
| type | returns mime content type |
| subtype | returns mime sub type |
| args | returns additional arguments |
- Returns:
- true if successful
bool base_http::HTTPPart::getFileName |
( |
base::String & |
filename |
) |
|
Returns the file name.
- Parameters:
-
| filename | returns mime content type |
- Returns:
- true if successful
Returns part header.
- Parameters:
-
| name | the header name |
| hret | returns the header |
- Returns:
- true if the header exists
Returns the mime headers.
- Returns:
- the mime headers
Returns the mime content id.
- Parameters:
-
| idret | returns the mime content id |
- Returns:
- true if successful
bool base_http::HTTPPart::isMIME |
( |
|
) |
const |
Checks if this part is a mime part.
- Returns:
- true if it is a mime part
Parses a mime header into tokens.
- Parameters:
-
| header | the header to parts |
| delim | the delimiter, mostly comma or semicolon |
| token | returns the first token |
| args | returns all additional parameters |
void base_http::HTTPPart::removeHeader |
( |
const base::String & |
name |
) |
|
Deletes a header.
- Parameters:
-
| name | the header name to delete |
Sets a header, creating it if necessary.
- Parameters:
-
| name | header name |
| value | header value |
void base_http::HTTPPart::setMIME |
( |
bool |
mime = true |
) |
|
Sets the mime flag.
- Parameters:
-
size_t base_http::HTTPPart::size |
( |
|
) |
const |
The documentation for this class was generated from the following file: