This thread just retrieve the sizes of the given list of files and post them to the registered event handler. More...
#include <utils.h>
Public Member Functions | |
wxCurlSizeQueryThread (wxEvtHandler *handler=NULL, int id=wxID_ANY) | |
wxCurlSizeQueryThread (wxEvtHandler *handler, int id, const wxArrayString &urls) | |
Creates the thread for querying the size of given array of urls. | |
void | SetURLs (const wxArrayString &urls) |
Sets the list of URLs to query the size for. | |
Protected Member Functions | |
virtual void * | Entry () |
Caches the file sizes and then exits. | |
virtual void | OnExit () |
Sends the wxEVT_COMMAND_CACHESIZE_COMPLETE event to the event handler. | |
Protected Attributes | |
wxArrayLong | m_urlSize |
The array with our retrieved sizes. | |
wxArrayString | m_urls |
The list of the URLs for the files whose size must be queried. | |
Friends | |
class | wxCurlSizeQueryOutput |
This thread just retrieve the sizes of the given list of files and post them to the registered event handler.
This is useful to show the size of one or more files to the user before downloading them.
wxCurlSizeQueryThread::wxCurlSizeQueryThread | ( | wxEvtHandler * | handler, | |
int | id, | |||
const wxArrayString & | urls | |||
) | [inline] |
Creates the thread for querying the size of given array of urls.
After calling the Run() function, the given event handler will get a wxCurlSizeEvent for each URL passed in the list.
virtual void wxCurlSizeQueryThread::OnExit | ( | ) | [protected, virtual] |
Sends the wxEVT_COMMAND_CACHESIZE_COMPLETE event to the event handler.
Reimplemented from wxCurlBaseThread.