allow sending OSC from inline display UIs
[ardour.git] / gtk2_ardour / ardour_http.h
index cabcb3d5bc06c9fa34c430d77e5e4693801a555c..aa6b9f3936658aba6119e3af6ca9727258974c3e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <curl/curl.h>
 #include <string>
+#include <map>
 
 namespace ArdourCurl {
 
@@ -35,11 +36,15 @@ class HttpGet {
                size_t size;
        };
 
+       struct HeaderInfo {
+               std::map<std::string, std::string> h;
+       };
+
        char* get (const char* url);
 
        std::string get (const std::string& url) {
                char *rv = get (url.c_str ());
-               return rv ? std::string (rv) : std::string ();
+               return rv ? std::string (rv) : std::string ("");
        }
 
        char* data () const { return mem.data; }
@@ -47,6 +52,8 @@ class HttpGet {
 
        long int status () const { return _status; }
 
+       std::map<std::string, std::string> header () const { return nfo.h; }
+
        char* escape (const char* s, int l) const {
                return curl_easy_escape (_curl, s, l);
        }
@@ -76,6 +83,7 @@ class HttpGet {
        char error_buffer[CURL_ERROR_SIZE];
 
        struct MemStruct mem;
+       struct HeaderInfo nfo;
 
        static const char* ca_path;
        static const char* ca_info;