OpenZWave Library  1.6.1914
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenZWave::Internal::Platform::HttpSocket Class Reference

a Socket that speaks HTTP protocol.Talk to a HTTP(s) server More...

#include <HttpClient.h>

+ Inheritance diagram for OpenZWave::Internal::Platform::HttpSocket:
+ Collaboration diagram for OpenZWave::Internal::Platform::HttpSocket:

Public Member Functions

 HttpSocket ()
 
virtual ~HttpSocket ()
 
virtual bool HasPendingTask () const
 
void SetKeepAlive (unsigned int secs)
 
void SetUserAgent (const std::string &s)
 
void SetAcceptEncoding (const std::string &s)
 
void SetFollowRedirect (bool follow)
 
void SetAlwaysHandle (bool h)
 
void SetDownloadFile (std::string filename)
 
bool Download (const std::string &url, const char *extraRequest=NULL, void *user=NULL, const POST *post=NULL)
 
bool SendRequest (Request &what, bool enqueue)
 
bool SendRequest (const std::string what, const char *extraRequest=NULL, void *user=NULL)
 
bool QueueRequest (const std::string what, const char *extraRequest=NULL, void *user=NULL)
 
unsigned int GetRemaining () const
 
unsigned int GetStatusCode () const
 
unsigned int GetContentLen () const
 
bool ChunkedTransfer () const
 
bool ExpectMoreData () const
 
const RequestGetCurrentRequest () const
 
const char * Hdr (const char *h) const
 
bool IsRedirecting () const
 
bool IsSuccess () const
 
- Public Member Functions inherited from OpenZWave::Internal::Platform::TcpSocket
 TcpSocket ()
 
virtual ~TcpSocket ()
 
bool open (const char *addr=NULL, unsigned int port=0)
 
void close ()
 
bool update ()
 
bool isOpen (void)
 
void SetBufsizeIn (unsigned int s)
 
bool SetNonBlocking (bool nonblock)
 
unsigned int GetBufSize ()
 
const char * GetHost (void)
 
bool SendBytes (const void *buf, unsigned int len)
 
bool initSSL (const char *certs)
 
bool hasSSL () const
 
void shutdownSSL ()
 
SSLResult verifySSL ()
 

Protected Member Functions

virtual void _OnCloseInternal ()
 
virtual void _OnClose ()
 
virtual void _OnData ()
 
virtual void _OnRecv (void *buf, unsigned int size)
 
virtual void _OnOpen ()
 
virtual bool _OnUpdate ()
 
virtual void _OnRequestDone ()
 
bool _Redirect (std::string loc, bool forceGET)
 
void _ProcessChunk ()
 
bool _EnqueueOrSend (const Request &req, bool forceQueue=false)
 
void _DequeueMore ()
 
bool _OpenRequest (const Request &req)
 
void _ParseHeader ()
 
void _ParseHeaderFields (const char *s, size_t size)
 
bool _HandleStatus ()
 
void _FinishRequest ()
 
void _OnRecvInternal (void *buf, unsigned int size)
 
- Protected Member Functions inherited from OpenZWave::Internal::Platform::TcpSocket
void _ShiftBuffer ()
 

Protected Attributes

std::string _user_agent
 
std::string _accept_encoding
 
std::string _tmpHdr
 
unsigned int _keep_alive
 
unsigned int _remaining
 
unsigned int _contentLen
 
unsigned int _status
 
std::queue< Request_requestQ
 
std::map< std::string, std::string > _hdrs
 
Request _curRequest
 
bool _inProgress
 
bool _chunkedTransfer
 
bool _mustClose
 
bool _followRedir
 
bool _alwaysHandle
 
std::string _filename
 
FILE * _pFile
 
- Protected Attributes inherited from OpenZWave::Internal::Platform::TcpSocket
char * _inbuf
 
char * _readptr
 
char * _writeptr
 
unsigned int _inbufSize
 
unsigned int _writeSize
 
unsigned int _recvSize
 
unsigned int _lastport
 
bool _nonblocking
 
long _s
 
std::string _host
 

Detailed Description

a Socket that speaks HTTP protocol.

Talk to a HTTP(s) server

Constructor & Destructor Documentation

OpenZWave::Internal::Platform::HttpSocket::HttpSocket ( )
virtual OpenZWave::Internal::Platform::HttpSocket::~HttpSocket ( )
virtual

Member Function Documentation

void OpenZWave::Internal::Platform::HttpSocket::_DequeueMore ( )
protected
bool OpenZWave::Internal::Platform::HttpSocket::_EnqueueOrSend ( const Request req,
bool  forceQueue = false 
)
protected
void OpenZWave::Internal::Platform::HttpSocket::_FinishRequest ( )
protected
bool OpenZWave::Internal::Platform::HttpSocket::_HandleStatus ( )
protected
virtual void OpenZWave::Internal::Platform::HttpSocket::_OnClose ( )
protectedvirtual
virtual void OpenZWave::Internal::Platform::HttpSocket::_OnCloseInternal ( )
protectedvirtual
virtual void OpenZWave::Internal::Platform::HttpSocket::_OnData ( )
protectedvirtual
virtual void OpenZWave::Internal::Platform::HttpSocket::_OnOpen ( )
protectedvirtual
virtual void OpenZWave::Internal::Platform::HttpSocket::_OnRecv ( void *  buf,
unsigned int  size 
)
protectedvirtual
void OpenZWave::Internal::Platform::HttpSocket::_OnRecvInternal ( void *  buf,
unsigned int  size 
)
protected
virtual void OpenZWave::Internal::Platform::HttpSocket::_OnRequestDone ( )
inlineprotectedvirtual
virtual bool OpenZWave::Internal::Platform::HttpSocket::_OnUpdate ( )
protectedvirtual
bool OpenZWave::Internal::Platform::HttpSocket::_OpenRequest ( const Request req)
protected
void OpenZWave::Internal::Platform::HttpSocket::_ParseHeader ( )
protected
void OpenZWave::Internal::Platform::HttpSocket::_ParseHeaderFields ( const char *  s,
size_t  size 
)
protected
void OpenZWave::Internal::Platform::HttpSocket::_ProcessChunk ( )
protected
bool OpenZWave::Internal::Platform::HttpSocket::_Redirect ( std::string  loc,
bool  forceGET 
)
protected
bool OpenZWave::Internal::Platform::HttpSocket::ChunkedTransfer ( ) const
inline
bool OpenZWave::Internal::Platform::HttpSocket::Download ( const std::string &  url,
const char *  extraRequest = NULL,
void *  user = NULL,
const POST post = NULL 
)
bool OpenZWave::Internal::Platform::HttpSocket::ExpectMoreData ( ) const
inline
unsigned int OpenZWave::Internal::Platform::HttpSocket::GetContentLen ( ) const
inline
const Request& OpenZWave::Internal::Platform::HttpSocket::GetCurrentRequest ( ) const
inline
unsigned int OpenZWave::Internal::Platform::HttpSocket::GetRemaining ( ) const
inline
unsigned int OpenZWave::Internal::Platform::HttpSocket::GetStatusCode ( ) const
inline
virtual bool OpenZWave::Internal::Platform::HttpSocket::HasPendingTask ( ) const
inlinevirtual
const char* OpenZWave::Internal::Platform::HttpSocket::Hdr ( const char *  h) const
bool OpenZWave::Internal::Platform::HttpSocket::IsRedirecting ( ) const
bool OpenZWave::Internal::Platform::HttpSocket::IsSuccess ( ) const
bool OpenZWave::Internal::Platform::HttpSocket::QueueRequest ( const std::string  what,
const char *  extraRequest = NULL,
void *  user = NULL 
)
bool OpenZWave::Internal::Platform::HttpSocket::SendRequest ( Request what,
bool  enqueue 
)
bool OpenZWave::Internal::Platform::HttpSocket::SendRequest ( const std::string  what,
const char *  extraRequest = NULL,
void *  user = NULL 
)
void OpenZWave::Internal::Platform::HttpSocket::SetAcceptEncoding ( const std::string &  s)
inline
void OpenZWave::Internal::Platform::HttpSocket::SetAlwaysHandle ( bool  h)
inline
void OpenZWave::Internal::Platform::HttpSocket::SetDownloadFile ( std::string  filename)
inline
void OpenZWave::Internal::Platform::HttpSocket::SetFollowRedirect ( bool  follow)
inline
void OpenZWave::Internal::Platform::HttpSocket::SetKeepAlive ( unsigned int  secs)
inline
void OpenZWave::Internal::Platform::HttpSocket::SetUserAgent ( const std::string &  s)
inline

Member Data Documentation

std::string OpenZWave::Internal::Platform::HttpSocket::_accept_encoding
protected
bool OpenZWave::Internal::Platform::HttpSocket::_alwaysHandle
protected
bool OpenZWave::Internal::Platform::HttpSocket::_chunkedTransfer
protected
unsigned int OpenZWave::Internal::Platform::HttpSocket::_contentLen
protected
Request OpenZWave::Internal::Platform::HttpSocket::_curRequest
protected
std::string OpenZWave::Internal::Platform::HttpSocket::_filename
protected
bool OpenZWave::Internal::Platform::HttpSocket::_followRedir
protected
std::map<std::string, std::string> OpenZWave::Internal::Platform::HttpSocket::_hdrs
protected
bool OpenZWave::Internal::Platform::HttpSocket::_inProgress
protected
unsigned int OpenZWave::Internal::Platform::HttpSocket::_keep_alive
protected
bool OpenZWave::Internal::Platform::HttpSocket::_mustClose
protected
FILE* OpenZWave::Internal::Platform::HttpSocket::_pFile
protected
unsigned int OpenZWave::Internal::Platform::HttpSocket::_remaining
protected
std::queue<Request> OpenZWave::Internal::Platform::HttpSocket::_requestQ
protected
unsigned int OpenZWave::Internal::Platform::HttpSocket::_status
protected
std::string OpenZWave::Internal::Platform::HttpSocket::_tmpHdr
protected
std::string OpenZWave::Internal::Platform::HttpSocket::_user_agent
protected

The documentation for this class was generated from the following file: