]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/icap/Xaction.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / icap / Xaction.h
index c912891a63ba5eb7d92a9e56ff5e3cacc044b555..88b2bff4e5bde113812f1ede73ba6a716f1e0fce 100644 (file)
 #ifndef SQUID_ICAPXACTION_H
 #define SQUID_ICAPXACTION_H
 
-#include "comm.h"
+#include "comm/forward.h"
 #include "CommCalls.h"
 #include "MemBuf.h"
 #include "adaptation/icap/ServiceRep.h"
 #include "adaptation/Initiate.h"
 #include "AccessLogEntry.h"
 #include "HttpReply.h"
+#include "ipcache.h"
 
 class CommConnectCbParams;
 
@@ -102,6 +103,7 @@ protected:
     void openConnection();
     void closeConnection();
     void dieOnConnectionFailure();
+    bool haveConnection() const;
 
     void scheduleRead();
     void scheduleWrite(MemBuf &buf);
@@ -132,6 +134,9 @@ public:
     // custom exception handling and end-of-call checks
     virtual void callException(const std::exception  &e);
     virtual void callEnd();
+    /// clear stored error details, if any; used for retries/repeats
+    virtual void clearError() {}
+    void dnsLookupDone(const ipcache_addrs *ia);
 
 protected:
     // logging
@@ -146,7 +151,7 @@ private:
     void maybeLog();
 
 protected:
-    int connection;     // FD of the ICAP server connection
+    Comm::ConnectionPointer connection;     ///< ICAP server connection
     Adaptation::Icap::ServiceRep::Pointer theService;
 
     /*
@@ -177,7 +182,8 @@ protected:
     AsyncCall::Pointer writer;
     AsyncCall::Pointer closer;
 
-    AccessLogEntry al;
+    AccessLogEntry::Pointer alep; ///< icap.log entry
+    AccessLogEntry &al; ///< short for *alep
 
     timeval icap_tr_start;     /*time when the ICAP transaction was created */
     timeval icap_tio_start;    /*time when the first ICAP request byte was scheduled for sending*/
@@ -187,7 +193,6 @@ private:
     //CBDATA_CLASS2(Xaction);
 };
 
-
 } // namespace Icap
 } // namespace Adaptation