fastcgi++
|
Holds a piece of HTTP post data. More...
#include <http.hpp>
Public Types | |
enum | Type { file, form } |
Type of POST data piece. More... | |
Public Member Functions | |
const char * | data () const |
Pointer to file data. | |
size_t | size () const |
Size of file data. | |
char * | steal () const |
Expropriates the file data. Beyond this you must free it when done. | |
Post () | |
Post (const Post &x) | |
~Post () | |
Public Attributes | |
enum Fastcgipp::Http::Post::Type | type |
std::basic_string< charT > | value |
Value of POST data if type=form. | |
std::basic_string< charT > & | filename |
Filename of POST data if type=file. | |
std::basic_string< charT > | contentType |
Content Type if type=file. | |
Private Attributes | |
char * | m_data |
Pointer to file data. | |
size_t | m_size |
Size of data in bytes pointed to by data. | |
Friends | |
class | Environment |
Holds a piece of HTTP post data.
This structure will hold one of two types of HTTP post data. It can either contain form data, in which case the data field is empty and the size is zero; or it can hold an uploaded file, in which case data contains a pointer to the file data, size contains it's size and value holds it's filename. The actual name associated with the piece of post data is omitted from the class so it can be linked in an associative container.
charT | Type of character to use in the value string (char or wchar_t) |
enum Fastcgipp::Http::Post::Type |
Fastcgipp::Http::Post< charT >::Post | ( | ) | [inline] |
Fastcgipp::Http::Post< charT >::Post | ( | const Post< charT > & | x | ) | [inline] |
Fastcgipp::Http::Post< charT >::~Post | ( | ) | [inline] |
Definition at line 84 of file http.hpp.
References Fastcgipp::Http::Post< charT >::m_data.
const char* Fastcgipp::Http::Post< charT >::data | ( | ) | const [inline] |
Pointer to file data.
Definition at line 69 of file http.hpp.
References Fastcgipp::Http::Post< charT >::m_data.
size_t Fastcgipp::Http::Post< charT >::size | ( | ) | const [inline] |
Size of file data.
Definition at line 71 of file http.hpp.
References Fastcgipp::Http::Post< charT >::m_size.
Referenced by Fastcgipp::Http::Environment< charT >::fillPostsMultipart().
char* Fastcgipp::Http::Post< charT >::steal | ( | ) | const [inline] |
Expropriates the file data. Beyond this you must free it when done.
Definition at line 73 of file http.hpp.
References Fastcgipp::Http::Post< charT >::m_data, and Fastcgipp::Http::Post< charT >::m_size.
friend class Environment [friend] |
std::basic_string<charT> Fastcgipp::Http::Post< charT >::contentType |
Content Type if type=file.
Definition at line 66 of file http.hpp.
Referenced by Fastcgipp::Http::Environment< charT >::fillPostsMultipart().
std::basic_string<charT>& Fastcgipp::Http::Post< charT >::filename |
Filename of POST data if type=file.
Definition at line 64 of file http.hpp.
Referenced by Fastcgipp::Http::Environment< charT >::fillPostsMultipart().
char* Fastcgipp::Http::Post< charT >::m_data [mutable, private] |
Pointer to file data.
Definition at line 87 of file http.hpp.
Referenced by Fastcgipp::Http::Post< charT >::data(), Fastcgipp::Http::Environment< charT >::fillPostsMultipart(), Fastcgipp::Http::Post< charT >::steal(), and Fastcgipp::Http::Post< charT >::~Post().
size_t Fastcgipp::Http::Post< charT >::m_size [mutable, private] |
Size of data in bytes pointed to by data.
Definition at line 89 of file http.hpp.
Referenced by Fastcgipp::Http::Environment< charT >::fillPostsMultipart(), Fastcgipp::Http::Post< charT >::size(), and Fastcgipp::Http::Post< charT >::steal().
enum Fastcgipp::Http::Post::Type Fastcgipp::Http::Post< charT >::type |
std::basic_string<charT> Fastcgipp::Http::Post< charT >::value |
Value of POST data if type=form.
Definition at line 62 of file http.hpp.
Referenced by Fastcgipp::Http::Environment< charT >::fillPostsMultipart(), and Fastcgipp::Http::Environment< charT >::fillPostsUrlEncoded().