+/*
+ * 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
{
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
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();
} // namespace Comm
#endif /* _SQUID_COMM_IOCALLBACK_H */
+