--------------------- PatchSet 1953 Date: 2005/10/17 22:39:13 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Use ICAP::* types and constants from ICAPElements instead of ICAPServiceRep::* and globals. Using a class called "ICAP" to encapsulate common trivial ICAP-related types and constants is an experiment. Hopefully, we will migrate to true namespaces eventually. Members: src/ICAPAnchor.cc:1.1.2.31->1.1.2.32 src/ICAPClientSideHook.cc:1.1.2.9->1.1.2.10 src/ICAPConfig.h:1.1.2.4->1.1.2.5 src/client_side_request.cc:1.34.4.13->1.34.4.14 src/http.cc:1.49.2.46->1.49.2.47 Index: squid3/src/ICAPAnchor.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPAnchor.cc,v retrieving revision 1.1.2.31 retrieving revision 1.1.2.32 diff -u -r1.1.2.31 -r1.1.2.32 --- squid3/src/ICAPAnchor.cc 1 Oct 2005 05:09:11 -0000 1.1.2.31 +++ squid3/src/ICAPAnchor.cc 17 Oct 2005 22:39:13 -0000 1.1.2.32 @@ -47,7 +47,7 @@ virgin->data->cause = requestLink(request); virgin->data->header = reply; virgin->data->body = new MemBuf; - virgin->data->body->init(ICAPMsgPipeBufSizeMin, ICAPMsgPipeBufSizeMax); + virgin->data->body->init(ICAP::MsgPipeBufSizeMin, ICAP::MsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); leakTouch(adapted.getRaw(), MsgPipeLeaker); Index: squid3/src/ICAPClientSideHook.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPClientSideHook.cc,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -r1.1.2.9 -r1.1.2.10 --- squid3/src/ICAPClientSideHook.cc 3 Oct 2005 16:10:01 -0000 1.1.2.9 +++ squid3/src/ICAPClientSideHook.cc 17 Oct 2005 22:39:13 -0000 1.1.2.10 @@ -46,7 +46,7 @@ virgin->data->cause = NULL; virgin->data->header = requestLink(request); virgin->data->body = new MemBuf; - virgin->data->body->init(ICAPMsgPipeBufSizeMin, ICAPMsgPipeBufSizeMax); + virgin->data->body->init(ICAP::MsgPipeBufSizeMin, ICAP::MsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); leakTouch(adapted.getRaw(), MsgPipeLeaker); Index: squid3/src/ICAPConfig.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPConfig.h,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- squid3/src/ICAPConfig.h 29 Sep 2005 18:00:44 -0000 1.1.2.4 +++ squid3/src/ICAPConfig.h 17 Oct 2005 22:39:13 -0000 1.1.2.5 @@ -1,6 +1,6 @@ /* - * $Id: ICAPConfig.h,v 1.1.2.4 2005/09/29 18:00:44 dwsquid Exp $ + * $Id: ICAPConfig.h,v 1.1.2.5 2005/10/17 22:39:13 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -82,12 +82,12 @@ public: typedef void ICAPAccessCheckCallback(ICAPServiceRep::Pointer match, void *data); - ICAPAccessCheck(ICAPServiceRep::IcapMethod, ICAPServiceRep::IcapVectPoint, HttpRequest *, HttpReply *, ICAPAccessCheckCallback *, void *); + ICAPAccessCheck(ICAP::Method, ICAP::VectPoint, HttpRequest *, HttpReply *, ICAPAccessCheckCallback *, void *); ~ICAPAccessCheck(); private: - ICAPServiceRep::IcapMethod method; - ICAPServiceRep::IcapVectPoint point; + ICAP::Method method; + ICAP::VectPoint point; HttpRequest *req; HttpReply *rep; ICAPAccessCheckCallback *callback; Index: squid3/src/client_side_request.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_request.cc,v retrieving revision 1.34.4.13 retrieving revision 1.34.4.14 diff -u -r1.34.4.13 -r1.34.4.14 --- squid3/src/client_side_request.cc 3 Oct 2005 17:52:01 -0000 1.34.4.13 +++ squid3/src/client_side_request.cc 17 Oct 2005 22:39:13 -0000 1.34.4.14 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.cc,v 1.34.4.13 2005/10/03 17:52:01 dwsquid Exp $ + * $Id: client_side_request.cc,v 1.34.4.14 2005/10/17 22:39:13 rousskov Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -57,6 +57,7 @@ #if ICAP_CLIENT #include "ICAPClientSideHook.h" +#include "ICAPElements.h" #include "ICAPConfig.h" static void icapAclCheckDoneWrapper(ICAPServiceRep::Pointer service, void *data); #endif @@ -465,7 +466,7 @@ { ICAPAccessCheck *icap_access_check; - if (icap_access_check = new ICAPAccessCheck(ICAPServiceRep::reqmod, ICAPServiceRep::precache, http->request, NULL, icapAclCheckDoneWrapper, this)) { + if (icap_access_check = new ICAPAccessCheck(ICAP::methodReqmod, ICAP::pointPreCache, http->request, NULL, icapAclCheckDoneWrapper, this)) { icap_access_check->check(); return; } Index: squid3/src/http.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/http.cc,v retrieving revision 1.49.2.46 retrieving revision 1.49.2.47 diff -u -r1.49.2.46 -r1.49.2.47 --- squid3/src/http.cc 7 Oct 2005 22:40:54 -0000 1.49.2.46 +++ squid3/src/http.cc 17 Oct 2005 22:39:13 -0000 1.49.2.47 @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.49.2.46 2005/10/07 22:40:54 rousskov Exp $ + * $Id: http.cc,v 1.49.2.47 2005/10/17 22:39:13 rousskov Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -754,7 +754,7 @@ { ICAPAccessCheck *icap_access_check = - new ICAPAccessCheck(ICAPServiceRep::respmod, ICAPServiceRep::precache, request, reply, icapAclCheckDoneWrapper, this); + new ICAPAccessCheck(ICAP::methodRespmod, ICAP::pointPreCache, request, reply, icapAclCheckDoneWrapper, this); icapAccessCheckPending = true; icap_access_check->check(); // will eventually delete self