rovio_http.h
Go to the documentation of this file.
00001 
00011 #ifndef ROVIO_HTTP_H_
00012 #define ROVIO_HTTP_H_
00013 
00014 #include <curl/curl.h>
00015 #include <ros/ros.h>
00016 #include <semaphore.h>
00017 #include <string>
00018 
00023 #define USER "/rovio_shared/user"
00024 
00028 #define PASS "/rovio_shared/pass"
00029 
00033 #define HOST "/rovio_shared/host"
00034 
00039 typedef struct
00040 {
00041   char *data; 
00042   size_t size; 
00043 } rovio_response;
00044 
00051 class rovio_http
00052 {
00053 public:
00060   rovio_http(std::string user, std::string pass);
00061 
00065   virtual ~rovio_http();
00066 
00073   rovio_response *send(const char *url);
00074 
00075 private:
00076   CURL *curl; 
00077   sem_t sem; 
00078 };
00079 
00085 void rovio_response_clean(rovio_response *resp);
00086 
00090 size_t write_data(char *ptr, size_t size, size_t nmemb, rovio_response *buf);
00091 
00092 #endif


rovio_shared
Author(s): Russell Toris
autogenerated on Thu Aug 27 2015 14:56:40