PixelLightAPI
.
|
This class represents a tiny HTTP (Hypertext Transfer Protocol) client to download files via HTTP. More...
#include <HttpHandle.h>
Public Member Functions | |
PLCORE_API | HttpHandle () |
Constructor. | |
PLCORE_API | ~HttpHandle () |
Destructor. | |
PLCORE_API bool | IsOpen () const |
Check if the connection is currently open. | |
PLCORE_API bool | Open (const String &sUrl, const String &sUsername, const String &sPassword) |
Open the connection. | |
PLCORE_API bool | Close () |
Close the connection. | |
PLCORE_API String | GetResponse () const |
Get HTTP response string. | |
PLCORE_API String | GetAuthenticate () const |
Get HTTP authenticate string. | |
PLCORE_API String | GetServer () const |
Get HTTP server string. | |
PLCORE_API String | GetDate () const |
Get HTTP date string. | |
PLCORE_API String | GetContentType () const |
Get HTTP ContentType string. | |
PLCORE_API int | GetContentLength () const |
Get HTTP content-length. | |
PLCORE_API uint32 | Read (void *pBuffer, uint32 nSize, uint32 nCount) |
Reads data from the connection. | |
PLCORE_API bool | Seek (int32 nOffset, File::ESeek nLocation) |
Sets the starting position. | |
PLCORE_API int32 | Tell () const |
Returns the file position. | |
PLCORE_API bool | IsEof () const |
Returns whether end of file has been reached. |
This class represents a tiny HTTP (Hypertext Transfer Protocol) client to download files via HTTP.
PLCORE_API PLCore::HttpHandle::HttpHandle | ( | ) |
PLCORE_API PLCore::HttpHandle::~HttpHandle | ( | ) |
Destructor.
PLCORE_API bool PLCore::HttpHandle::IsOpen | ( | ) | const |
Check if the connection is currently open.
PLCORE_API bool PLCore::HttpHandle::Open | ( | const String & | sUrl, |
const String & | sUsername, | ||
const String & | sPassword | ||
) |
Open the connection.
[in] | sUrl | URL |
[in] | sUsername | Username |
[in] | sPassword | Password |
PLCORE_API bool PLCore::HttpHandle::Close | ( | ) |
Close the connection.
PLCORE_API String PLCore::HttpHandle::GetResponse | ( | ) | const |
Get HTTP response string.
PLCORE_API String PLCore::HttpHandle::GetAuthenticate | ( | ) | const |
Get HTTP authenticate string.
PLCORE_API String PLCore::HttpHandle::GetServer | ( | ) | const |
Get HTTP server string.
PLCORE_API String PLCore::HttpHandle::GetDate | ( | ) | const |
Get HTTP date string.
PLCORE_API String PLCore::HttpHandle::GetContentType | ( | ) | const |
Get HTTP ContentType string.
PLCORE_API int PLCore::HttpHandle::GetContentLength | ( | ) | const |
Get HTTP content-length.
PLCORE_API uint32 PLCore::HttpHandle::Read | ( | void * | pBuffer, |
uint32 | nSize, | ||
uint32 | nCount | ||
) |
Reads data from the connection.
[out] | pBuffer | Buffer to store the data (MUST be valid and large enough!) |
[in] | nSize | Item size in bytes |
[in] | nCount | Number of items to read |
PLCORE_API bool PLCore::HttpHandle::Seek | ( | int32 | nOffset, |
File::ESeek | nLocation | ||
) |
Sets the starting position.
[in] | nOffset | File offset in bytes relative to the given location |
[in] | nLocation | Location |
PLCORE_API int32 PLCore::HttpHandle::Tell | ( | ) | const |
Returns the file position.
PLCORE_API bool PLCore::HttpHandle::IsEof | ( | ) | const |
Returns whether end of file has been reached.
|