OpenStreamProcessCallback

Discussion and support for general JUCE issues

OpenStreamProcessCallback

Postby siedschl » Mon May 21, 2012 10:46 am

I'm stupid again... what to do with this:
Code: Select all
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...
siedschl
JUCE UberWeenie
 
Posts: 273
Joined: Wed Nov 07, 2007 10:56 am

Re: OpenStreamProcessCallback

Postby jules » Mon May 21, 2012 11:47 am

It's just a function pointer - give it a callback function with that signature and it'll call it to provide progress updates.
User avatar
jules
Fearless Leader
 
Posts: 17189
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: OpenStreamProcessCallback

Postby siedschl » Mon May 21, 2012 1:12 pm

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...
siedschl
JUCE UberWeenie
 
Posts: 273
Joined: Wed Nov 07, 2007 10:56 am

Re: OpenStreamProcessCallback

Postby jules » Mon May 21, 2012 1:31 pm

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.
User avatar
jules
Fearless Leader
 
Posts: 17189
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to General JUCE discussion

Who is online

Users browsing this forum: Google Feedfetcher and 4 guests