More default methods.
[shibboleth/cpp-opensaml.git] / samltest / binding.h
index 2947a49..2cd28f1 100644 (file)
@@ -126,8 +126,12 @@ public:
         return "https";\r
     }\r
 \r
-    bool isSecure() const {\r
-        return true;\r
+    const char* getHostname() const {\r
+        return "localhost";\r
+    }\r
+\r
+    int getPort() const {\r
+        return 443;\r
     }\r
 \r
     string getContentType() const {\r
@@ -138,6 +142,10 @@ public:
         return -1;\r
     }\r
 \r
+    const char* getRequestURI() const {\r
+        return "/";\r
+    }\r
+\r
     const char* getRequestURL() const {\r
         return m_url.c_str();\r
     }\r
@@ -182,18 +190,10 @@ public:
     \r
     // HTTPResponse methods\r
     \r
-    void setHeader(const char* name, const char* value) {\r
+    void setResponseHeader(const char* name, const char* value) {\r
         m_headers[name] = value ? value : "";\r
     }\r
 \r
-    void setContentType(const char* type) {\r
-        setHeader("Content-Type", type);\r
-    }\r
-    \r
-    void setCookie(const char* name, const char* value) {\r
-        m_headers["Set-Cookie"] = string(name) + "=" + (value ? value : "");\r
-    }\r
-    \r
     // The amount of error checking missing from this is incredible, but as long\r
     // as the test data isn't unexpected or malformed, it should work.\r
     \r
@@ -248,14 +248,6 @@ public:
         return decoded;\r
     }\r
     \r
-    long sendResponse(std::istream& inputStream) {\r
-        return sendResponse(inputStream, HTTPResponse::SAML_HTTP_STATUS_OK);\r
-    }\r
-\r
-    long sendError(std::istream& inputStream) {\r
-        return sendResponse(inputStream, HTTPResponse::SAML_HTTP_STATUS_ERROR);\r
-    }\r
-\r
     long sendResponse(std::istream& inputStream, long status) {\r
         m_method="POST";\r
         string page,line;\r