OpenZWave Library 1.6.1914
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Basic HTTP(s) Client

Classes

class  OpenZWave::Internal::Platform::TcpSocket
 a TCP Socket that can optionally be protected via SSL More...
 
class  OpenZWave::Internal::Platform::POST
 This class is used for Posting data to a HTTP(s) server. More...
 
struct  OpenZWave::Internal::Platform::Request
 Main class for making a HTTP request to a HTTP(s) server. More...
 
class  OpenZWave::Internal::Platform::HttpSocket
 a Socket that speaks HTTP protocol. More...
 
class  OpenZWave::Internal::Platform::SocketSet
 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 requests.
 
void OpenZWave::Internal::Platform::StopNetwork ()
 Stop the Network for HTTP requests.
 
bool OpenZWave::Internal::Platform::HasSSL ()
 Indicates if we support HTTPS requests.
 
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 etc.
 
void OpenZWave::Internal::Platform::URLEncode (const std::string &s, std::string &enc)
 Encode a String suitable for sending as a URL request (eg Get)
 

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 requests.

Indicates 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 requests.

Initializes 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 etc.

Split 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 requests.

Stops 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