--------------------- PatchSet 5999 Date: 2007/10/23 22:17:06 Author: chtsanti Branch: async-calls Tag: (none) Log: Make AsyncJob a public virtual base of BodyProducer and BodyConsumer classes. The ServerStateData, ConnStateData and ClientHttpRequest are not need to inherit AsyncJob anymore Members: src/BodyPipe.h:1.5->1.5.4.1 src/Server.h:1.10.4.1->1.10.4.2 src/client_side.h:1.22.4.1->1.22.4.2 src/client_side_request.h:1.30.4.1->1.30.4.2 Index: squid3/src/BodyPipe.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/BodyPipe.h,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -u -r1.5 -r1.5.4.1 --- squid3/src/BodyPipe.h 1 Oct 2007 22:50:55 -0000 1.5 +++ squid3/src/BodyPipe.h 23 Oct 2007 22:17:06 -0000 1.5.4.1 @@ -4,14 +4,16 @@ #include "MemBuf.h" #include "AsyncCall.h" +#include "ICAP/AsyncJob.h" class BodyPipe; // Interface for those who want to produce body content for others. // BodyProducer is expected to create the BodyPipe. // One pipe cannot have more than one producer. -class BodyProducer { +class BodyProducer: virtual public AsyncJob { public: + BodyProducer():AsyncJob("BodyProducer"){} virtual ~BodyProducer() {} virtual void noteMoreBodySpaceAvailable(BodyPipe &bp) = 0; @@ -25,8 +27,9 @@ // BodyConsumer is expected to register with an existing BodyPipe // by calling BodyPipe::setConsumer(). // One pipe cannot have more than one consumer. -class BodyConsumer { +class BodyConsumer: virtual public AsyncJob { public: + BodyConsumer():AsyncJob("BodyConsumer"){} virtual ~BodyConsumer() {} virtual void noteMoreBodyDataAvailable(BodyPipe &bp) = 0; Index: squid3/src/Server.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Server.h,v retrieving revision 1.10.4.1 retrieving revision 1.10.4.2 diff -u -r1.10.4.1 -r1.10.4.2 --- squid3/src/Server.h 23 Oct 2007 20:27:51 -0000 1.10.4.1 +++ squid3/src/Server.h 23 Oct 2007 22:17:06 -0000 1.10.4.2 @@ -1,6 +1,6 @@ /* - * $Id: Server.h,v 1.10.4.1 2007/10/23 20:27:51 chtsanti Exp $ + * $Id: Server.h,v 1.10.4.2 2007/10/23 22:17:06 chtsanti Exp $ * * AUTHOR: Duane Wessels * @@ -59,7 +59,6 @@ #endif class ServerStateData: - virtual public AsyncJob, #if ICAP_CLIENT public ICAPInitiator, public BodyProducer, Index: squid3/src/client_side.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side.h,v retrieving revision 1.22.4.1 retrieving revision 1.22.4.2 diff -u -r1.22.4.1 -r1.22.4.2 --- squid3/src/client_side.h 23 Oct 2007 20:27:52 -0000 1.22.4.1 +++ squid3/src/client_side.h 23 Oct 2007 22:17:06 -0000 1.22.4.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side.h,v 1.22.4.1 2007/10/23 20:27:52 chtsanti Exp $ + * $Id: client_side.h,v 1.22.4.2 2007/10/23 22:17:06 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -129,7 +129,7 @@ /* A connection to a socket */ -class ConnStateData : virtual public AsyncJob, public BodyProducer, public RefCountable +class ConnStateData : public BodyProducer, public RefCountable { public: Index: squid3/src/client_side_request.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_request.h,v retrieving revision 1.30.4.1 retrieving revision 1.30.4.2 diff -u -r1.30.4.1 -r1.30.4.2 --- squid3/src/client_side_request.h 23 Oct 2007 20:27:52 -0000 1.30.4.1 +++ squid3/src/client_side_request.h 23 Oct 2007 22:17:06 -0000 1.30.4.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.h,v 1.30.4.1 2007/10/23 20:27:52 chtsanti Exp $ + * $Id: client_side_request.h,v 1.30.4.2 2007/10/23 22:17:06 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -60,9 +60,8 @@ class ClientRequestContext; class ClientHttpRequest: - virtual public AsyncJob #if ICAP_CLIENT - ,public ICAPInitiator, // to start ICAP transactions + public ICAPInitiator, // to start ICAP transactions public BodyConsumer // to receive reply bodies in request satisf. mode #endif {