---------------------
PatchSet 6196 
Date: 2007/11/27 18:47:44
Author: chtsanti
Branch: async-calls
Tag: (none) 
Log:

- Rename NullBodyConsumer to BodySink
- Rename CallNoteBodyConsumer to BodyProducerCall
- Rename CallNoteBodyProducer to BodyConsumerCall

Members: 
	src/BodyPipe.cc:1.7.4.2->1.7.4.3 

Index: squid3/src/BodyPipe.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/BodyPipe.cc,v
retrieving revision 1.7.4.2
retrieving revision 1.7.4.3
diff -u -r1.7.4.2 -r1.7.4.3
--- squid3/src/BodyPipe.cc	27 Nov 2007 18:36:52 -0000	1.7.4.2
+++ squid3/src/BodyPipe.cc	27 Nov 2007 18:47:44 -0000	1.7.4.3
@@ -4,11 +4,11 @@
 
 CBDATA_CLASS_INIT(BodyPipe);
 
-class NullBodyConsumer: public BodyConsumer {
+class BodySink: public BodyConsumer {
     bool done;
 public:
-    NullBodyConsumer():AsyncJob("NullBodyConsumer"), done(false){}
-    virtual ~NullBodyConsumer() {}
+    BodySink():AsyncJob("BodySink"), done(false){}
+    virtual ~BodySink() {}
     
     virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer bp) {
 	size_t contentSize = bp->buf().contentSize();
@@ -23,20 +23,20 @@
 	done = true;
     }
     bool doneAll() const {return done && AsyncJob::doneAll();}
-    CBDATA_CLASS2(NullBodyConsumer);
+    CBDATA_CLASS2(BodySink);
 };
 
-CBDATA_CLASS_INIT(NullBodyConsumer);
+CBDATA_CLASS_INIT(BodySink);
 
 
-class CallNoteBodyConsumer:
+class BodyProducerCall:
     public JobCallT< UnaryMemFunT<BodyProducer, BodyPipe::Pointer> >
 {
 public:
     typedef JobCallT< UnaryMemFunT<BodyProducer, BodyPipe::Pointer> > Parent;
     typedef void (BodyProducer::*noteConsumerHandler)(BodyPipe::Pointer );
 
-    CallNoteBodyConsumer(BodyProducer *aProducer, noteConsumerHandler aHandler, 
+    BodyProducerCall(BodyProducer *aProducer, noteConsumerHandler aHandler, 
 			       BodyPipe::Pointer bp, const char *callName):
 	Parent(MemFun(aProducer, aHandler, bp), 93, 5, callName),thePipe(bp),theProducer(aProducer){}
 
@@ -52,14 +52,14 @@
 };
 
 
-class CallNoteBodyProducer:
+class BodyConsumerCall:
     public JobCallT< UnaryMemFunT<BodyConsumer, BodyPipe::Pointer> >
 {
 public:
     typedef JobCallT< UnaryMemFunT<BodyConsumer, BodyPipe::Pointer> > Parent;
     typedef void (BodyConsumer::*noteProducerHandler)(BodyPipe::Pointer );
 
-    CallNoteBodyProducer(BodyConsumer *aConsumer, noteProducerHandler aHandler, 
+    BodyConsumerCall(BodyConsumer *aConsumer, noteProducerHandler aHandler, 
 			       BodyPipe::Pointer bp, const char *callName):
 	Parent(MemFun(aConsumer, aHandler, bp), 93, 5, callName),thePipe(bp),theConsumer(aConsumer){}
 
@@ -237,7 +237,7 @@
 		theConsumer = NULL;
 		theCCallsToSkip = theCCallsPending; // skip all pending consumer calls
 		if (consumedSize() && !exhausted()){
-		    AsyncCall *call= new CallNoteBodyConsumer(theProducer, &BodyProducer::noteBodyConsumerAborted, this, "BodyProducer::noteBodyConsumerAborted");
+		    AsyncCall *call= new BodyProducerCall(theProducer, &BodyProducer::noteBodyConsumerAborted, this, "BodyProducer::noteBodyConsumerAborted");
 		    scheduleJob(91,5, call);
 		}
 	}
@@ -270,7 +270,7 @@
 	mustAutoConsume = true;
 	debugs(91,5, HERE << "enabled auto consumption" << status());
 	if (!theConsumer && theBuf.hasContent()){
-	        theConsumer = new NullBodyConsumer;
+	        theConsumer = new BodySink;
 		scheduleBodyDataNotification();
 	}
 }
@@ -317,7 +317,7 @@
 	theGetSize += size;
 	debugs(91,7, HERE << "consumed " << size << " bytes" << status());
 	if (mayNeedMoreData()){
-	    AsyncCall *call= new CallNoteBodyConsumer(theProducer, &BodyProducer::noteMoreBodySpaceAvailable, this, "BodyProducer::noteMoreBodySpaceAvailable");
+	    AsyncCall *call= new BodyProducerCall(theProducer, &BodyProducer::noteMoreBodySpaceAvailable, this, "BodyProducer::noteMoreBodySpaceAvailable");
 	    scheduleJob(91,5, call);
 	}
 }
@@ -342,7 +342,7 @@
 {
 	if (theConsumer || mustAutoConsume) {
 		++theCCallsPending;
-		AsyncCall *call= new CallNoteBodyProducer(theConsumer, &BodyConsumer::noteMoreBodyDataAvailable, this, "BodyConsumer::noteMoreBodyDataAvailable");
+		AsyncCall *call= new BodyConsumerCall(theConsumer, &BodyConsumer::noteMoreBodyDataAvailable, this, "BodyConsumer::noteMoreBodyDataAvailable");
 		scheduleJob(91,5, call);
 	}
 }
@@ -353,11 +353,11 @@
 	if (theConsumer) {
 		++theCCallsPending;
 		if (bodySizeKnown() && bodySize() == thePutSize) {
-		    AsyncCall *call= new CallNoteBodyProducer(theConsumer, &BodyConsumer::noteBodyProductionEnded, this, "BodyConsumer::noteBodyProductionEnded");
+		    AsyncCall *call= new BodyConsumerCall(theConsumer, &BodyConsumer::noteBodyProductionEnded, this, "BodyConsumer::noteBodyProductionEnded");
 		    scheduleJob(91,5, call);
 		}
 		else{
-		    AsyncCall *call= new CallNoteBodyProducer(theConsumer, &BodyConsumer::noteBodyProducerAborted, this, "BodyConsumer::noteBodyProducerAborted");
+		    AsyncCall *call= new BodyConsumerCall(theConsumer, &BodyConsumer::noteBodyProducerAborted, this, "BodyConsumer::noteBodyProducerAborted");
 		    scheduleJob(91,5, call);
 		}
 	}
