]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/httpd.h
Now with added ANGRY MONKEYS.
[user/henk/code/inspircd.git] / src / modules / httpd.h
index 8819202ebc109f66f0e3152fdd44dde5ecb109ca..ba059dca8e01ea2a8d2f25c1247a737df6167923 100644 (file)
@@ -45,6 +45,42 @@ class HTTPRequest : public classbase
        }
 };
 
+class HTTPDocument : public classbase
+{
+ protected:
+       std::stringstream* document;
+       int responsecode;
+       std::string extraheaders;
+
+ public:
+
+       void* sock;
+
+       HTTPDocument(void* opaque, std::stringstream* doc, int response, const std::string &extra) : document(doc), responsecode(response), extraheaders(extra), sock(opaque)
+       {
+       }
+
+       std::stringstream* GetDocument()
+       {
+               return this->document;
+       }
+
+       unsigned long GetDocumentSize()
+       {
+               return this->document->str().length();
+       }
+
+       int GetResponseCode()
+       {
+               return this->responsecode;
+       }
+
+       std::string& GetExtraHeaders()
+       {
+               return this->extraheaders;
+       }
+};
+
 #endif
 
 //httpr(request_type,uri,headers,this,this->GetIP());