--------------------- PatchSet 4043 Date: 2007/02/14 05:43:12 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Added ICAPInitiator interface that classes initiating ICAP transactions must now support. The API currently has just two methods: one for receiving adapted message headers (indicating a successful ICAP transaction, at least to the point of fetching adapted headers) and one for receiving a notification of an aborted ICAP transaction. Most ICAP initiators (or their close relatives) will also need to implement BodyConsumer and/or BodyProducer APIs to exchange virgin and/or adapted HTTP message bodies with the initiated ICAP transaction. However, that activity is not addressed in this API. New AsyncCall API is used to declare the callback wrappers. Members: src/ICAP/ICAPInitiator.cc:1.1->1.1.2.1 src/ICAP/ICAPInitiator.h:1.1->1.1.2.1 --- /dev/null Wed Feb 14 13:37:19 2007 +++ squid3/src/ICAP/ICAPInitiator.cc Wed Feb 14 13:38:37 2007 @@ -0,0 +1 @@ +// XXX: remove me! --- /dev/null Wed Feb 14 13:37:19 2007 +++ squid3/src/ICAP/ICAPInitiator.h Wed Feb 14 13:38:37 2007 @@ -0,0 +1,59 @@ + +/* + * $Id: ICAPInitiator.h,v 1.1.2.1 2007/02/14 05:43:13 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 + * sources; 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_ICAPINITIATOR_H +#define SQUID_ICAPINITIATOR_H + +#include "AsyncCall.h" + +/* + * The ICAP Initiator is an ICAP vectoring point that initates ICAP + * transactions. This interface exists to allow ICAP transactions to + * signal their initiators that they are finished or aborted. + */ + +class ICAPXaction; + +class ICAPInitiator +{ +public: + virtual ~ICAPInitiator() {} + + virtual void noteIcapHeadersAdapted() = 0; + virtual void noteIcapHeadersAborted() = 0; + + AsyncCallWrapper(93,4, ICAPInitiator, noteIcapHeadersAdapted); + AsyncCallWrapper(93,3, ICAPInitiator, noteIcapHeadersAborted); +}; + +#endif /* SQUID_ICAPINITIATOR_H */