OpenStreamProcessCallback


#1

I’m stupid again… what to do with this: typedef bool( URL::OpenStreamProgressCallback)(void *context, int bytesSent, int totalBytes). Specifically, what’s the processCallback pointer that I have to hand over here? I want to show the progress of a download using the URL class…


#2

It’s just a function pointer - give it a callback function with that signature and it’ll call it to provide progress updates.


#3

That I got… but I don’t know what to pass for void *context. If I just use a null pointer it doesn’t update the sent byte info…


#4

The progressCallbackContext value is just whatever value you need to be passed into your callback function - it’s up to you what you use it for.