--------------------- PatchSet 1530 Date: 2005/08/19 20:13:42 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Added an ICAP service "representative" that maintains information about a single ICAP service (that Squid communicates with). One ICAP server may host many ICAP services. Current implementation does not obey squid.conf. Members: src/ICAPServiceRep.cc:1.1->1.1.2.1 src/ICAPServiceRep.h:1.1->1.1.2.1 --- /dev/null Wed Feb 14 13:33:00 2007 +++ squid3/src/ICAPServiceRep.cc Wed Feb 14 13:34:51 2007 @@ -0,0 +1,16 @@ +#include "squid.h" +#include "ICAPServiceRep.h" + +ICAPServiceRep::ICAPServiceRep(): port(-1) { + // XXX: these need to be config-driven, and initialized elsewhere + method = xstrdup("RESPMOD"); + uri = xstrdup("icap://127.0.0.1:3214/reqmod"); + host = xstrdup("127.0.0.1"); + port = 3214; +} + +ICAPServiceRep::~ICAPServiceRep() { + xfree(method); + xfree(uri); + xfree(host); +} --- /dev/null Wed Feb 14 13:33:00 2007 +++ squid3/src/ICAPServiceRep.h Wed Feb 14 13:34:51 2007 @@ -0,0 +1,56 @@ + +/* + * $Id: ICAPServiceRep.h,v 1.1.2.1 2005/08/19 20:13:42 rousskov Exp $ + * + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sinks; see the CREDITS file for full details. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ + +#ifndef SQUID_ICAPSERVICEREP_H +#define SQUID_ICAPSERVICEREP_H + +#include + +/* The ICAP service representative maintains information about a single + ICAP service that Squid communicates with. One ICAP server may host + many ICAP services */ + +class ICAPServiceRep { +public: + ICAPServiceRep(); + ~ICAPServiceRep(); + +public: + char *method; // ICAP method (XXX: should be an enum) + char *uri; // service URI + + char *host; + int port; +}; + +#endif /* SQUID_ICAPSERVICEREP_H */