Utility classes related to HTTP input/output.
More...
List of all members.
Static Public Member Functions |
| static std::string | getHTTPContentType (const std::string &a_fileName) |
| | Returns the type of the HTTP Content Type string, given a file name.
|
| static void | loadFile (Tonido::Data::Message::SharedPtr &a_message, const std::string &a_fileName) |
| | Loads a file from the file system into the given shared message.
|
| static void | loadRawData (Tonido::Data::Message::SharedPtr &a_message, const Data::RawData::SharedPtr &a_data, const std::string &a_contentType) |
| | Loads data from a given raw data into a message.
|
| static void | loadVfsFile (Tonido::Data::Message::SharedPtr &a_message, const std::string &a_vfsName, const std::string &a_fileName) |
| | Loads a file from the BootVFS into the given shared message.
|
| static void | loadVfsFile (Tonido::Data::RawData::SharedPtr &a_rawData, const std::string &a_vfsName, const std::string &a_fileName) |
| | Loads a file from the BootVFS into the given Raw Data.
|
| static std::string | getXMLResult (const std::string &a_type, bool a_result, const std::string &a_message="") |
| | Returns formatted XML commonly used for returning status of an HTTP operation.
|
| static std::string | getXMLResult (const std::string &a_type, int a_result, const std::string &a_message="") |
| | Returns formatted XML commonly used for returning status of an HTTP operation.
|
| static bool | parseXMLResult (const std::string &a_xml, std::string &a_type, bool &a_result, std::string &a_message) |
| | Parses XML result string and returns the returned status values.
|
Detailed Description
Utility classes related to HTTP input/output.
Member Function Documentation
| std::string Tonido::Util::HTTP::getHTTPContentType |
( |
const std::string & |
a_fileName | ) |
[static] |
Returns the type of the HTTP Content Type string, given a file name.
- Parameters:
-
| [in] | a_fileName | input file name |
- Returns:
- HTTP content type
| std::string Tonido::Util::HTTP::getXMLResult |
( |
const std::string & |
a_type, |
|
|
bool |
a_result, |
|
|
const std::string & |
a_message = "" |
|
) |
| [static] |
Returns formatted XML commonly used for returning status of an HTTP operation.
- Parameters:
-
| [in] | a_type | query type |
| [in] | a_result | query result |
| [out] | a_message | optional error string or reason |
- Returns:
- formatted XML
| std::string Tonido::Util::HTTP::getXMLResult |
( |
const std::string & |
a_type, |
|
|
int |
a_result, |
|
|
const std::string & |
a_message = "" |
|
) |
| [static] |
Returns formatted XML commonly used for returning status of an HTTP operation.
- Parameters:
-
| [in] | a_type | query type |
| [in] | a_result | query result |
| [out] | a_message | optional error string or reason |
- Returns:
- formatted XML
| void Tonido::Util::HTTP::loadFile |
( |
Tonido::Data::Message::SharedPtr & |
a_message, |
|
|
const std::string & |
a_fileName |
|
) |
| [static] |
Loads a file from the file system into the given shared message.
- Parameters:
-
| [in,out] | a_message | Tonido message |
| [in] | a_fileName | input file name |
| void Tonido::Util::HTTP::loadRawData |
( |
Tonido::Data::Message::SharedPtr & |
a_message, |
|
|
const Data::RawData::SharedPtr & |
a_data, |
|
|
const std::string & |
a_contentType |
|
) |
| [static] |
Loads data from a given raw data into a message.
- Parameters:
-
| [in,out] | a_message | Tonido message |
| [in] | a_data | input buffer |
| [in] | a_contentType | content type of the input buffer |
| void Tonido::Util::HTTP::loadVfsFile |
( |
Tonido::Data::Message::SharedPtr & |
a_message, |
|
|
const std::string & |
a_vfsName, |
|
|
const std::string & |
a_fileName |
|
) |
| [static] |
Loads a file from the BootVFS into the given shared message.
- Parameters:
-
| [in,out] | a_message | Tonido message |
| [in] | a_vfsName | vfs name to use |
| [in] | a_fileName | input file name to load |
| void Tonido::Util::HTTP::loadVfsFile |
( |
Tonido::Data::RawData::SharedPtr & |
a_rawData, |
|
|
const std::string & |
a_vfsName, |
|
|
const std::string & |
a_fileName |
|
) |
| [static] |
Loads a file from the BootVFS into the given Raw Data.
- Parameters:
-
| [out] | a_rawData | output data buffer |
| [in] | a_vfsName | vfs name to use |
| [in] | a_fileName | input file name to load |
| bool Tonido::Util::HTTP::parseXMLResult |
( |
const std::string & |
a_xml, |
|
|
std::string & |
a_type, |
|
|
bool & |
a_result, |
|
|
std::string & |
a_message |
|
) |
| [static] |
Parses XML result string and returns the returned status values.
- Parameters:
-
| [in] | a_xml | input XML result string |
| [out] | a_type | query type |
| [out] | a_result | query result |
| [out] | a_message | optional error string or reason |
- Returns:
- true on successs, false otherwise