Moved src/eCAP into src/adaptation/ecap.
As a side effect, eCAP now tests its headers. MessageRep.h needed to include
config.h to pass the tests, which probably indicates a bug in some other
header (possibly enums.h).
ICAP source file names still need to be changed.
if test "$use_icap_client" = "yes" ; then
AC_DEFINE(ICAP_CLIENT,1,[Enable ICAP client features in Squid])
AM_CONDITIONAL(USE_ICAP_CLIENT, true)
- ICAP_LIBS="ICAP/libicap.la"
+ ICAP_LIBS="icap/libicap.la"
use_adaptation=yes
else
AC_DEFINE(ICAP_CLIENT,0,[Enable ICAP client features in Squid])
if test $use_ecap = yes;
then
AC_DEFINE(USE_ECAP,1,[Enable eCAP support])
- ECAP_LIBS="eCAP/libeCAP.la $ECAP_LIBS"
+ ECAP_LIBS="ecap/libecap.la $ECAP_LIBS"
use_adaptation=yes
else
AC_DEFINE(USE_ECAP,0,[Disable eCAP support])
src/repl/Makefile \
src/auth/Makefile \
src/adaptation/Makefile \
- src/ICAP/Makefile \
+ src/adaptation/icap/Makefile \
+ src/adaptation/ecap/Makefile \
src/icmp/Makefile \
src/ip/Makefile \
- src/eCAP/Makefile \
contrib/Makefile \
snmplib/Makefile \
icons/Makefile \
+++ /dev/null
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-CLEANFILES =
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src
-
-noinst_LTLIBRARIES = libicap.la
-
-libicap_la_SOURCES = \
- ICAPClient.cc \
- ICAPClient.h \
- ICAPInOut.h \
- ICAPConfig.cc \
- ICAPConfig.h \
- ICAPElements.cc \
- ICAPElements.h \
- ICAPOptions.cc \
- ICAPOptions.h \
- ICAPServiceRep.cc \
- ICAPServiceRep.h \
- ICAPLauncher.cc \
- ICAPLauncher.h \
- ICAPOptXact.cc \
- ICAPOptXact.h \
- ICAPXaction.cc \
- ICAPXaction.h \
- ICAPModXact.cc \
- ICAPModXact.h
-
-
-check_PROGRAMS = testHeaders
-
-## test .h correctness
-testHeaders: $(top_srcdir)/src/ICAP/*.h
- $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
-
-## No such file...
-testHeaders.c:
- touch testHeaders.c
-CLEANFILES += testHeaders.c
SUBDIRS += adaptation
endif
-if USE_ICAP_CLIENT
-SUBDIRS += ICAP
-endif
-
-if USE_ECAP
-SUBDIRS += eCAP
-endif
-
-ADAPTATION_LIBS = @ECAP_LIBS@ @ICAP_LIBS@ @ADAPTATION_LIBS@
+ADAPTATION_LIBS = @ADAPTATION_LIBS@
DELAY_POOL_ALL_SOURCE = \
CommonPool.h \
include $(top_srcdir)/src/Common.am
include $(top_srcdir)/src/TestHeaders.am
+## make a list of directories for configured adaptation schemes
+SUBDIRS =
+
+if USE_ICAP_CLIENT
+SUBDIRS += icap
+endif
+
+if USE_ECAP
+SUBDIRS += ecap
+endif
+
noinst_LTLIBRARIES = libadaptation.la
+## start with the code shared among all adaptation schemes
libadaptation_la_SOURCES = \
AccessCheck.cc \
AccessCheck.h \
ServiceGroups.cc \
ServiceGroups.h
+# add libraries for specific adaptation schemes
+libadaptation_la_LIBADD = @ECAP_LIBS@ @ICAP_LIBS@
#include "squid.h"
#include <libecap/common/registry.h>
-#include "eCAP/Host.h"
-#include "eCAP/ServiceRep.h"
-#include "eCAP/Config.h"
+#include "adaptation/ecap/Host.h"
+#include "adaptation/ecap/ServiceRep.h"
+#include "adaptation/ecap/Config.h"
Ecap::Config Ecap::TheConfig;
#include <libecap/adapter/service.h>
#include <libecap/common/names.h>
#include "TextException.h"
-#include "eCAP/ServiceRep.h"
-#include "eCAP/Host.h"
+#include "adaptation/ecap/ServiceRep.h"
+#include "adaptation/ecap/Host.h"
const libecap::Name Ecap::protocolInternal("internal", libecap::Name::NextId());
const libecap::Name Ecap::protocolCacheObj("cache_object", libecap::Name::NextId());
--- /dev/null
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
+
+noinst_LTLIBRARIES = libecap.la
+
+libecap_la_SOURCES = \
+ Config.h \
+ Config.cc \
+ Host.h \
+ Host.cc \
+ MessageRep.h \
+ MessageRep.cc \
+ ServiceRep.h \
+ ServiceRep.cc \
+ XactionRep.h \
+ XactionRep.cc \
+ \
+ Registry.h
#include "HttpReply.h"
#include "BodyPipe.h"
#include "TextException.h"
-#include "adaptation/Message.h"
#include <libecap/common/names.h>
#include <libecap/common/area.h>
#include <libecap/common/version.h>
-#include "eCAP/MessageRep.h"
-#include "eCAP/XactionRep.h"
-#include "eCAP/Host.h" /* for protocol constants */
+#include "adaptation/ecap/MessageRep.h"
+#include "adaptation/ecap/XactionRep.h"
+#include "adaptation/ecap/Host.h" /* for protocol constants */
/* HeaderRep */
#ifndef SQUID__ECAP__MESSAGE_REP_H
#define SQUID__ECAP__MESSAGE_REP_H
+#include "config.h"
+#include "HttpHeader.h"
+#include "BodyPipe.h"
#include "adaptation/forward.h"
+#include "adaptation/Message.h"
#include <libecap/common/message.h>
#include <libecap/common/header.h>
#include <libecap/common/body.h>
+class HttpMsg;
+class HttpRequest;
+class HttpReply;
+
namespace Ecap
{
#include "squid.h"
#include <libecap/adapter/service.h>
#include "TextException.h"
-#include "eCAP/ServiceRep.h"
-#include "eCAP/XactionRep.h"
+#include "adaptation/ecap/ServiceRep.h"
+#include "adaptation/ecap/XactionRep.h"
Ecap::ServiceRep::ServiceRep(const Adaptation::ServiceConfig &cfg):
/*AsyncJob("Ecap::ServiceRep"),*/ Adaptation::Service(cfg)
#include "TextException.h"
#include "HttpRequest.h"
#include "HttpReply.h"
-#include "eCAP/XactionRep.h"
+#include "adaptation/ecap/XactionRep.h"
// CBDATA_CLASS_INIT(Ecap::XactionRep);
// TODO: add CBDATA_NAMESPACED_CLASS_INIT(namespace, classname)
#include "adaptation/Initiate.h"
#include "adaptation/Service.h"
#include "adaptation/Message.h"
-#include "eCAP/MessageRep.h"
+#include "adaptation/ecap/MessageRep.h"
#include <libecap/common/forward.h>
#include <libecap/common/memory.h>
#include <libecap/host/xaction.h>
#include "squid.h"
-#include "ICAPClient.h"
+#include "adaptation/icap/ICAPClient.h"
void ICAPInitModule()
{
#include "ACL.h"
#include "Store.h"
#include "Array.h" // really Vector
-#include "ICAPConfig.h"
-#include "ICAPServiceRep.h"
+#include "adaptation/icap/ICAPConfig.h"
+#include "adaptation/icap/ICAPServiceRep.h"
#include "HttpRequest.h"
#include "HttpReply.h"
#include "ACLChecklist.h"
#include "event.h"
#include "AsyncCall.h"
#include "adaptation/Config.h"
-#include "ICAPServiceRep.h"
+#include "adaptation/icap/ICAPServiceRep.h"
class acl_access;
#include "squid.h"
-#include "ICAPElements.h"
+#include "adaptation/icap/ICAPElements.h"
// TODO: remove this file?
#include "squid.h"
#include "TextException.h"
#include "HttpMsg.h"
-#include "ICAPLauncher.h"
-#include "ICAPXaction.h"
-#include "ICAPServiceRep.h"
+#include "adaptation/icap/ICAPLauncher.h"
+#include "adaptation/icap/ICAPXaction.h"
+#include "adaptation/icap/ICAPServiceRep.h"
ICAPLauncher::ICAPLauncher(const char *aTypeName,
#include "adaptation/Initiator.h"
#include "adaptation/Initiate.h"
-#include "ICAP/ICAPServiceRep.h"
+#include "adaptation/icap/ICAPServiceRep.h"
/*
* The ICAP Launcher starts an ICAP transaction. If the transaction fails
#include "HttpRequest.h"
#include "HttpReply.h"
#include "adaptation/Initiator.h"
-#include "ICAPServiceRep.h"
-#include "ICAPLauncher.h"
-#include "ICAPModXact.h"
-#include "ICAPClient.h"
+#include "adaptation/icap/ICAPServiceRep.h"
+#include "adaptation/icap/ICAPLauncher.h"
+#include "adaptation/icap/ICAPModXact.h"
+#include "adaptation/icap/ICAPClient.h"
#include "ChunkedCodingParser.h"
#include "TextException.h"
#include "AuthUserRequest.h"
-#include "ICAPConfig.h"
+#include "adaptation/icap/ICAPConfig.h"
#include "SquidTime.h"
// flow and terminology:
#define SQUID_ICAPMODXACT_H
#include "BodyPipe.h"
-#include "ICAPXaction.h"
-#include "ICAPInOut.h"
-#include "ICAPLauncher.h"
+#include "adaptation/icap/ICAPXaction.h"
+#include "adaptation/icap/ICAPInOut.h"
+#include "adaptation/icap/ICAPLauncher.h"
/*
* ICAPModXact implements ICAP REQMOD and RESPMOD transaction using
#include "comm.h"
#include "HttpReply.h"
-#include "ICAPOptXact.h"
-#include "ICAPOptions.h"
+#include "adaptation/icap/ICAPOptXact.h"
+#include "adaptation/icap/ICAPOptions.h"
#include "TextException.h"
CBDATA_CLASS_INIT(ICAPOptXact);
#ifndef SQUID_ICAPOPTXACT_H
#define SQUID_ICAPOPTXACT_H
-#include "ICAPXaction.h"
-#include "ICAPLauncher.h"
+#include "adaptation/icap/ICAPXaction.h"
+#include "adaptation/icap/ICAPLauncher.h"
class ICAPOptions;
#include "squid.h"
#include "wordlist.h"
#include "HttpReply.h"
-#include "ICAPOptions.h"
+#include "adaptation/icap/ICAPOptions.h"
#include "TextException.h"
-#include "ICAPConfig.h"
+#include "adaptation/icap/ICAPConfig.h"
#include "SquidTime.h"
extern ICAPConfig TheICAPConfig;
#define SQUID_ICAPOPTIONS_H
#include "squid.h"
-#include "ICAPServiceRep.h"
+#include "adaptation/icap/ICAPServiceRep.h"
class wordlist;
#include "squid.h"
#include "TextException.h"
#include "HttpReply.h"
-#include "ICAPServiceRep.h"
-#include "ICAPOptions.h"
-#include "ICAPOptXact.h"
+#include "adaptation/icap/ICAPServiceRep.h"
+#include "adaptation/icap/ICAPOptions.h"
+#include "adaptation/icap/ICAPOptXact.h"
#include "ConfigParser.h"
-#include "ICAPConfig.h"
-#include "ICAPModXact.h"
+#include "adaptation/icap/ICAPConfig.h"
+#include "adaptation/icap/ICAPModXact.h"
#include "SquidTime.h"
CBDATA_CLASS_INIT(ICAPServiceRep);
#include "adaptation/Service.h"
#include "adaptation/forward.h"
#include "adaptation/Initiator.h"
-#include "ICAPElements.h"
+#include "adaptation/icap/ICAPElements.h"
class ICAPOptions;
class ICAPOptXact;
#include "comm.h"
#include "CommCalls.h"
#include "HttpMsg.h"
-#include "ICAPXaction.h"
-#include "ICAPConfig.h"
+#include "adaptation/icap/ICAPXaction.h"
+#include "adaptation/icap/ICAPConfig.h"
#include "TextException.h"
#include "pconn.h"
#include "fde.h"
#include "comm.h"
#include "CommCalls.h"
#include "MemBuf.h"
-#include "ICAPServiceRep.h"
+#include "adaptation/icap/ICAPServiceRep.h"
#include "adaptation/Initiate.h"
class HttpMsg;
--- /dev/null
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
+
+noinst_LTLIBRARIES = libicap.la
+
+libicap_la_SOURCES = \
+ ICAPClient.cc \
+ ICAPClient.h \
+ ICAPInOut.h \
+ ICAPConfig.cc \
+ ICAPConfig.h \
+ ICAPElements.cc \
+ ICAPElements.h \
+ ICAPOptions.cc \
+ ICAPOptions.h \
+ ICAPServiceRep.cc \
+ ICAPServiceRep.h \
+ ICAPLauncher.cc \
+ ICAPLauncher.h \
+ ICAPOptXact.cc \
+ ICAPOptXact.h \
+ ICAPXaction.cc \
+ ICAPXaction.h \
+ ICAPModXact.cc \
+ ICAPModXact.h
#endif
#if ICAP_CLIENT
-#include "ICAP/ICAPConfig.h"
+#include "adaptation/icap/ICAPConfig.h"
static void parse_icap_service_type(ICAPConfig *);
static void dump_icap_service_type(StoreEntry *, const char *, const ICAPConfig &);
#endif
#if USE_ECAP
-#include "eCAP/Config.h"
+#include "adaptation/ecap/Config.h"
static void parse_ecap_service_type(Ecap::Config *);
static void dump_ecap_service_type(StoreEntry *, const char *, const Ecap::Config &);
static void free_ecap_service_type(Ecap::Config *);
+++ /dev/null
-# Makefile for the eCAP library
-#
-# $Id$
-#
-
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-
-noinst_LTLIBRARIES = libeCAP.la
-
-libeCAP_la_SOURCES = \
- Config.h \
- Config.cc \
- Host.h \
- Host.cc \
- MessageRep.h \
- MessageRep.cc \
- ServiceRep.h \
- ServiceRep.cc \
- XactionRep.h \
- XactionRep.cc \
- \
- Registry.h
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I. \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src
#endif
#if ICAP_CLIENT
-#include "ICAP/ICAPConfig.h"
+#include "adaptation/icap/ICAPConfig.h"
#endif
#if USE_ECAP
-#include "eCAP/Config.h"
+#include "adaptation/ecap/Config.h"
#endif
#if USE_ADAPTATION
#include "adaptation/Config.h"