/** \brief Read Callback * The libcurl read callback. * Can't pass a virtual function to libcurl so we use these static wrappers. * * \param pBuf The location to store input data. * \param nSize The amount of data to be read. * \param nMult The size in bytes of each data unit. * \param pCookie This contains the Job* that we want to call the Read method on. * */ size_t Job::ReadCallback( void* pBuf, size_t nSize, size_t nMult, void* pCookie ) { Job* pcTransfer = (Job*)pCookie; if( pcTransfer == NULL ) { return 0; } return( pcTransfer->Read( pBuf, nSize * nMult ) ); }