--------------------- PatchSet 6163 Date: 2007/11/21 21:48:15 Author: chtsanti Branch: async-calls Tag: (none) Log: - Adding the name method to the AsyncCallBase class to return the name of the AsyncCall - Adding the macro scheduleJob which schedules an AsyncCallBase call Members: src/AsyncCall.h:1.3.22.6->1.3.22.7 Index: squid3/src/AsyncCall.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AsyncCall.h,v retrieving revision 1.3.22.6 retrieving revision 1.3.22.7 diff -u -r1.3.22.6 -r1.3.22.7 --- squid3/src/AsyncCall.h 20 Nov 2007 21:03:43 -0000 1.3.22.6 +++ squid3/src/AsyncCall.h 21 Nov 2007 21:48:15 -0000 1.3.22.7 @@ -1,6 +1,6 @@ /* - * $Id: AsyncCall.h,v 1.3.22.6 2007/11/20 21:03:43 chtsanti Exp $ + * $Id: AsyncCall.h,v 1.3.22.7 2007/11/21 21:48:15 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -185,6 +185,7 @@ virtual bool fire() = 0; virtual void handleException(const TextException &e) = 0; virtual void end() = 0; + const char *name() { return theName; } protected: const char *theName; int theDebugSection; @@ -273,4 +274,7 @@ #define CallJobHere1(debugSection, debugLevel, objectPtr, callName, arg1) \ CallJob(debugSection, debugLevel, __FILE__, __LINE__, #callName, MemFun(objectPtr,&callName, arg1)) +#define scheduleJob(debugSection, debugLevel, call)\ + scheduleAsyncCall(debugSection, debugLevel, __FILE__, __LINE__, call, call->name(), &(AsyncCallBase::fireWrapper2), false) + #endif /* SQUID_ASYNCCALL_H */