]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/Message.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / adaptation / Message.h
index 2273c0036deb8bbab8564a4a7fb297d7ae95cecf..5c2cbc96015c6ceb5552a8b95886cff067771737 100644 (file)
@@ -1,28 +1,32 @@
-
 /*
- * $Id$
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
 #ifndef SQUID__ADAPTATION__MESSAGE_H
 #define SQUID__ADAPTATION__MESSAGE_H
 
-class HttpMsg;
+#include "base/RefCount.h"
+#include "http/forward.h"
+
 class BodyPipe;
-template <class C>
-class RefCount;
 typedef RefCount<BodyPipe> BodyPipePointer;
 
-namespace Adaptation {
+namespace Adaptation
+{
 
 // Manages the header and the body of an HTTP message being worked on.
 // Adaptation transactions use this class for virgin and adapted HTTP messages.
 // TODO: remove this class after adding refcounted message pointers and
-// after making sure nobody abruptly clears the HttpMsg::body_pipe pointer.
+// after making sure nobody abruptly clears the Http::Message::body_pipe pointer.
 class Message
 {
 
 public:
-    typedef HttpMsg Header;
+    typedef Http::Message Header;
 
     Message();
     Message(Header *aHeader);
@@ -31,14 +35,15 @@ public:
     void clear();
     void set(Header *aHeader);
 
-       static void ShortCircuit(Message &src, Message &dest);
+    static void ShortCircuit(Message &src, Message &dest);
 
 public:
     // virgin or adapted message being worked on
     Header *header;   // parsed HTTP status/request line and headers
 
-       // Copy of header->body_pipe, in case somebody moves the original.
-       BodyPipePointer body_pipe;
+    /// Copy of header->body_pipe, in case somebody moves the original.
+    /// TODO: Find and fix the code that moves (if any) and remove this.
+    BodyPipePointer body_pipe;
 
 private:
     Message(const Message &); // not implemented
@@ -50,3 +55,4 @@ private:
 // TODO: replace ICAPInOut with Adaptation::Message (adding one for "cause")
 
 #endif /* SQUID__ADAPTATION__MESSAGE_H */
+