]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/Pipeline.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / Pipeline.h
index 127c2996dfaf9fc1b148afc2c7baacd106235032..dcfb15c556a6834d404f362611dd6e2b5af009d7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
 #define SQUID_SRC_PIPELINE_H
 
 #include "base/RefCount.h"
+#include "http/forward.h"
 
 #include <list>
 
-class ClientSocketContext;
-typedef RefCount<ClientSocketContext> ClientSocketContextPointer;
-
 /**
  * A queue of transactions awaiting completion.
  *
@@ -43,10 +41,13 @@ public:
     ~Pipeline() = default;
 
     /// register a new request context to the pipeline
-    void add(const ClientSocketContextPointer &);
+    void add(const Http::StreamPointer &);
 
     /// get the first request context in the pipeline
-    ClientSocketContextPointer front() const;
+    Http::StreamPointer front() const;
+
+    /// get the last request context in the pipeline
+    Http::StreamPointer back() const;
 
     /// how many requests are currently pipelined
     size_t count() const {return requests.size();}
@@ -58,7 +59,7 @@ public:
     void terminateAll(const int xerrno);
 
     /// deregister the front request from the pipeline
-    void popMe(const ClientSocketContextPointer &);
+    void popMe(const Http::StreamPointer &);
 
     /// Number of requests seen in this pipeline (so far).
     /// Includes incomplete transactions.
@@ -66,7 +67,7 @@ public:
 
 private:
     /// requests parsed from the connection but not yet completed.
-    std::list<ClientSocketContextPointer> requests;
+    std::list<Http::StreamPointer> requests;
 };
 
 #endif /* SQUID_SRC_PIPELINE_H */