OpenZWave Library  1.6.953
Classes | Enumerations | Functions
Basic HTTP(s) Client

Classes

class  OpenZWave::Internal::Platform::TcpSocket
 a TCP Socket that can optionally be protected via SSLThis represents a TCP Socket that can be encrypted via SSL and is used to connect to a TCP Server (in this case, a HTTP(s) Server More...
 
class  OpenZWave::Internal::Platform::POST
 This class is used for Posting data to a HTTP(s) serverPost some data to a HTTP(s) server. More...
 
struct  OpenZWave::Internal::Platform::Request
 Main class for making a HTTP request to a HTTP(s) serverMake a request to a HTTP Server. More...
 
class  OpenZWave::Internal::Platform::HttpSocket
 a Socket that speaks HTTP protocol.Talk to a HTTP(s) server More...
 
class  OpenZWave::Internal::Platform::SocketSet
 Support Multiple TCP Socket connectionsto Support multiple TCP Socket Connections. More...
 

Enumerations

enum  OpenZWave::Internal::Platform::SSLResult {
  OpenZWave::Internal::Platform::SSLR_OK = 0x0, OpenZWave::Internal::Platform::SSLR_NO_SSL = 0x1, OpenZWave::Internal::Platform::SSLR_FAIL = 0x2, OpenZWave::Internal::Platform::SSLR_CERT_EXPIRED = 0x4,
  OpenZWave::Internal::Platform::SSLR_CERT_REVOKED = 0x8, OpenZWave::Internal::Platform::SSLR_CERT_CN_MISMATCH = 0x10, OpenZWave::Internal::Platform::SSLR_CERT_NOT_TRUSTED = 0x20, OpenZWave::Internal::Platform::SSLR_CERT_MISSING = 0x40,
  OpenZWave::Internal::Platform::SSLR_CERT_SKIP_VERIFY = 0x80, OpenZWave::Internal::Platform::SSLR_CERT_FUTURE = 0x100, OpenZWave::Internal::Platform::_SSLR_FORCE32BIT = 0x7fffffff
}
 Result Codes for SSL operations. More...
 

Functions

bool OpenZWave::Internal::Platform::InitNetwork ()
 Initialize the Network for HTTP requestsInitializes the Network for HTTP requests. More...
 
void OpenZWave::Internal::Platform::StopNetwork ()
 Stop the Network for HTTP requestsStops the Network for HTTP requests and releases resources associated with it. More...
 
bool OpenZWave::Internal::Platform::HasSSL ()
 Indicates if we support HTTPS requestsIndicates if we support HTTPS requests. More...
 
bool OpenZWave::Internal::Platform::SplitURI (const std::string &uri, std::string &host, std::string &file, int &port)
 Split a URL into its different parts/ports etcSplit a URL Into the different parts/ports. More...
 
void OpenZWave::Internal::Platform::URLEncode (const std::string &s, std::string &enc)
 Encode a String suitable for sending as a URL request (eg Get)Encode a String so it can be sent as part of a URL request. More...
 

Detailed Description

a Basic HTTP Client for talking to webservers

Enumeration Type Documentation

◆ SSLResult

Result Codes for SSL operations.

Enumerator
SSLR_OK 

No Error

SSLR_NO_SSL 

SSL Is not required

SSLR_FAIL 

Internal SSL Engine Failure

SSLR_CERT_EXPIRED 

SSL Certificate has expired

SSLR_CERT_REVOKED 

SSL Certificate is revoked

SSLR_CERT_CN_MISMATCH 

SSL CN Name does not match Hostname

SSLR_CERT_NOT_TRUSTED 

SSL Certificate is not trusted

SSLR_CERT_MISSING 

SSL Certificate is missing

SSLR_CERT_SKIP_VERIFY 

SSL Certificate Verification is disabled

SSLR_CERT_FUTURE 

SSL Certificate is valid in the future

_SSLR_FORCE32BIT 

Function Documentation

◆ HasSSL()

bool OpenZWave::Internal::Platform::HasSSL ( )

Indicates if we support HTTPS requestsIndicates if we support HTTPS requests.

Returns
success/failure
Todo:
SSL is not actually implemented yet.

◆ InitNetwork()

bool OpenZWave::Internal::Platform::InitNetwork ( )

Initialize the Network for HTTP requestsInitializes the Network for HTTP requests.

Returns
success/failure

◆ SplitURI()

bool OpenZWave::Internal::Platform::SplitURI ( const std::string &  uri,
std::string &  host,
std::string &  file,
int &  port 
)

Split a URL into its different parts/ports etcSplit a URL Into the different parts/ports.

Parameters
urithe URL to parse
hostthe Hostname of the URL
filethe directory/file name of the URL
portthe port number of the URL, or 80 if not specified
Returns
success/failure

◆ StopNetwork()

void OpenZWave::Internal::Platform::StopNetwork ( )

Stop the Network for HTTP requestsStops the Network for HTTP requests and releases resources associated with it.

◆ URLEncode()

void OpenZWave::Internal::Platform::URLEncode ( const std::string &  s,
std::string &  enc 
)

Encode a String suitable for sending as a URL request (eg Get)Encode a String so it can be sent as part of a URL request.

Parameters
sthe string to encode
encthe encoded version of the string that is returned