]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/comm/IoCallback.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / comm / IoCallback.h
index 5d50c095786205b47a09e44447bc6f537b0ecd58..b97ca72965ab8bb61d3a7d0eef0e8b8f8305278c 100644 (file)
@@ -1,12 +1,21 @@
+/*
+ * Copyright (C) 1996-2015 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_COMM_IOCALLBACK_H
 #define _SQUID_COMM_IOCALLBACK_H
 
 #include "base/AsyncCall.h"
+#include "comm/Flag.h"
 #include "comm/forward.h"
-#include "comm_err_t.h"
-#include "SBuf.h"
 #include "typedefs.h"
 
+class SBuf;
+
 namespace Comm
 {
 
@@ -24,19 +33,11 @@ public:
     iocb_type type;
     Comm::ConnectionPointer conn;
     AsyncCall::Pointer callback;
-
-    /// Buffer to store read(2) into when set.
-    // This is a pointer to the Jobs buffer rather than an SBuf using
-    // the same store since we cannot know when or how the Job will
-    // alter its SBuf while we are reading.
-    SBuf *buf2;
-
-    // Legacy c-string buffers used when buf2 is unset.
     char *buf;
     FREE *freefunc;
     int size;
     int offset;
-    comm_err_t errcode;
+    Comm::Flag errcode;
     int xerrno;
 #if USE_DELAY_POOLS
     unsigned int quotaQueueReserv; ///< reservation ID from CommQuotaQueue
@@ -52,7 +53,7 @@ public:
     void cancel(const char *reason);
 
     /// finish the IO operation imediately and schedule the callback with the current state.
-    void finish(comm_err_t code, int xerrn);
+    void finish(Comm::Flag code, int xerrn);
 
 private:
     void reset();
@@ -81,3 +82,4 @@ void CallbackTableDestruct();
 } // namespace Comm
 
 #endif /* _SQUID_COMM_IOCALLBACK_H */
+