(Longer and better answer than my previous one) As you can see, there's 2 ways to solve your problem. The "C" way, would be to do what Mark is suggesting, a solution that I don't have any problems with it, which is absolutely right. There the 'cURLpp' way, which is to use functors. None of them is really better than the other, it's just two different ways of seeing a solution.
You seemed to have stated to use 'cURLpp' way, but using given functors utilities. As you previously said, you need to use method functors. Example17 show how to use a method functor, but for the "write" callback. I'm quite sure you'll be able to deduce how to use those for "progress" callbacks. On Wed, Jul 29, 2009 at 9:01 AM, Mark Chandler <[email protected]> wrote: > > Header: > static int progress_cb(void *clientp, double dltotal, double dlnow, > double ultotal, double ulnow); > int progress_cbloc(double dltotal, double dlnow, double ultotal, > double ulnow); > > > when using it: > curl_easy_setopt(m_pCurlHandle, CURLOPT_PROGRESSFUNCTION, > WebControl::progress_cb); > > > > CPP: > int WebControl::progress_cb(void *clientp, double dltotal, double dlnow, > double ultotal, double ulnow) > { > WebControl* temp = static_cast<WebControl*>(clientp); > if (temp) > { > return temp->progress_cbloc(dltotal, dlnow, ultotal, ulnow); > } > else > { > return 0; > } > } > > int WebControl::progress_cbloc(double dltotal, double dlnow, double > ultotal, double ulnow) > { > > } > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "curlpp" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/curlpp?hl=en -~----------~----~----~----~------~----~------~--~---
