Provides direct communication to the Rovio to via cURL. More...
#include <rovio_http.h>
Public Member Functions | |
| rovio_http (std::string user, std::string pass) | |
| rovio_response * | send (const char *url) |
| virtual | ~rovio_http () |
Private Attributes | |
| CURL * | curl |
| sem_t | sem |
Provides direct communication to the Rovio to via cURL.
The rovio_http handles communication to the Rovio's HTTP server using cURL.
Definition at line 88 of file rovio_http.h.
| rovio_http::rovio_http | ( | std::string | user, |
| std::string | pass | ||
| ) |
Create a rovio_http object that can be used to send HTTP commands to the Rovio. A valid username and password must be provide at construction.
| user | the username used to authenticate with the Rovio |
| pass | the password used to authenticate with the Rovio |
Definition at line 52 of file rovio_http.cpp.
| rovio_http::~rovio_http | ( | ) | [virtual] |
Cleanup any resources from the rovio_http object and from cURL.
Definition at line 71 of file rovio_http.cpp.
| rovio_response * rovio_http::send | ( | const char * | url | ) |
Send the given full URL command to the Rovio. A buffer containing the response is returned.
| url | the full URL command to send to the Rovio |
Definition at line 79 of file rovio_http.cpp.
CURL* rovio_http::curl [private] |
used to communicate with the Rovio
Definition at line 113 of file rovio_http.h.
sem_t rovio_http::sem [private] |
used to ensure only one call to cURL occurs
Definition at line 114 of file rovio_http.h.