*/
#include "squid.h"
+#include "AsyncEngine.h"
#include "Debug.h"
#include "EventLoop.h"
#include "base/AsyncCallQueue.h"
+#include "SquidTime.h"
+
EventLoop::EventLoop() : errcount(0), last_loop(false), timeService(NULL),
primaryEngine(NULL)
#define SQUID_EVENTLOOP_H
#include "Array.h"
-#include "AsyncEngine.h"
-#include "SquidTime.h"
#define EVENT_LOOP_TIMEOUT 1000 /* 1s timeout */
+class AsyncEngine;
+class TimeEngine;
+
/** An event loop. An event loop is the core inner loop of squid.
* The event loop can be run until exit, or once. After it finishes control
* returns to the caller. If desired it can be run again.
#define SQUID_EXTERNALACL_H
#include "acl/Checklist.h"
-
class external_acl;
+class StoreEntry;
/** \todo CLEANUP: kill this typedef. */
typedef struct _external_acl_data external_acl_data;
MEMPROXY_CLASS_INLINE(ACLExternal);
-class ACLChecklist;
-class StoreEntry;
-
-extern void parse_externalAclHelper(external_acl **);
-extern void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
-extern void free_externalAclHelper(external_acl **);
+void parse_externalAclHelper(external_acl **);
+void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
+void free_externalAclHelper(external_acl **);
typedef void EAH(void *data, void *result);
-extern void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data);
-extern void externalAclInit(void);
-extern void externalAclShutdown(void);
+void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data);
+void externalAclInit(void);
+void externalAclShutdown(void);
#endif /* SQUID_EXTERNALACL_H */
*/
#include "squid.h"
+#include "AsyncCall.h"
#include "base/AsyncCall.h"
#include "base/AsyncCallQueue.h"
#include "cbdata.h"
#ifndef SQUID_ASYNCCALL_H
#define SQUID_ASYNCCALL_H
-//#include "cbdata.h"
#include "base/InstanceId.h"
#include "event.h"
-//#include "TextException.h"
+#include "RefCount.h"
/**
\defgroup AsynCallsAPI Async-Calls API
#include "comm/forward.h"
#include "err_detail_type.h"
#include "err_type.h"
+#include "HttpStatusCode.h"
#include "ip/Address.h"
#include "SquidString.h"
/* auth/UserRequest.h is empty unless USE_AUTH is defined */
#include "Array.h"
#include "AsyncEngine.h"
#include "MemPool.h"
-#include "RefCount.h"
-
-/* forward decls */
class StoreEntry;
typedef void EVH(void *);
-extern void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true);
-SQUIDCEXTERN void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);
-SQUIDCEXTERN void eventDelete(EVH * func, void *arg);
-SQUIDCEXTERN void eventInit(void);
-SQUIDCEXTERN void eventFreeMemory(void);
-SQUIDCEXTERN int eventFind(EVH *, void *);
+void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true);
+void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);
+void eventDelete(EVH * func, void *arg);
+void eventInit(void);
+void eventFreeMemory(void);
+int eventFind(EVH *, void *);
class ev_entry
{
#ifndef SQUID_FD_H_
#define SQUID_FD_H_
-extern void fd_close(int fd);
-extern void fd_open(int fd, unsigned int type, const char *);
-extern void fd_note(int fd, const char *);
-extern void fd_bytes(int fd, int len, unsigned int type);
-extern void fdDumpOpen(void);
-extern int fdUsageHigh(void);
-extern void fdAdjustReserved(void);
+void fd_close(int fd);
+void fd_open(int fd, unsigned int type, const char *);
+void fd_note(int fd, const char *);
+void fd_bytes(int fd, int len, unsigned int type);
+void fdDumpOpen(void);
+int fdUsageHigh(void);
+void fdAdjustReserved(void);
#endif /* SQUID_FD_H_ */
typedef class HtcpReplyData htcpReplyData;
/// \ingroup ServerProtocolHTCP
-SQUIDCEXTERN void neighborsHtcpReply(const cache_key *, htcpReplyData *, const Ip::Address &);
+void neighborsHtcpReply(const cache_key *, htcpReplyData *, const Ip::Address &);
/// \ingroup ServerProtocolHTCP
-SQUIDCEXTERN void htcpOpenPorts(void);
+void htcpOpenPorts(void);
/**
* \ingroup ServerProtocolHTCP
* Don't wait for a reply or count in stats as sent.
* \retval -1 Error sending request.
*/
-SQUIDCEXTERN int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p);
+int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p);
/// \ingroup ServerProtocolHTCP
-SQUIDCEXTERN void htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason);
+void htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason);
/// \ingroup ServerProtocolHTCP
-SQUIDCEXTERN void htcpSocketShutdown(void);
+void htcpSocketShutdown(void);
/// \ingroup ServerProtocolHTCP
-SQUIDCEXTERN void htcpClosePorts(void);
+void htcpClosePorts(void);
#endif /* USE_HTCP */
#include "base/AsyncJobCalls.h"
#include "base/TextException.h"
#include "CachePeer.h"
+#include "ChunkedCodingParser.h"
#include "client_side.h"
#include "comm/Connection.h"
#include "comm/Write.h"
#ifndef SQUID_HTTP_H
#define SQUID_HTTP_H
-#include "StoreIOBuffer.h"
#include "comm.h"
-#include "comm/forward.h"
-#include "forward.h"
#include "Server.h"
-#include "ChunkedCodingParser.h"
+
+class ChunkedCodingParser;
+class FwdState;
class HttpStateData : public ServerStateData
{
#include <cppunit/TestAssert.h>
#include "testEventLoop.h"
+#include "AsyncEngine.h"
#include "EventLoop.h"
#include "Mem.h"
+#include "SquidTime.h"
#include "stat.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop );
#define SQUID_TESTSTORESUPPORT_H
#include "EventLoop.h"
+#include "SquidTime.h"
/* construct a stock loop with event dispatching, a time service that advances
* 1 second a tick