A simple joinable thread which allows uploading resources to the net without blocking the GUI of your app. More...
#include <thread.h>
Public Member Functions | |
wxCurlUploadThread (wxEvtHandler *handler=NULL, int id=wxID_ANY, const wxString &url=wxEmptyString, wxInputStream *in=NULL) | |
wxCurlThreadError | SetInputStream (wxInputStream *in=NULL) |
Sets the output stream where the downloaded data are written. | |
wxInputStream * | GetInputStream () const |
Returns the output stream for downloaded data. | |
virtual bool | IsOk () const |
Returns true if this thread is ready to be started using Upload. | |
wxCurlThreadError | Upload (const wxString &url, wxInputStream *in=NULL) |
Creates and runs this thread for upload to the given URL of the given input stream (internally calls SetURL and SetOutputStream). | |
wxCurlThreadError | Upload () |
Uploads the URL previously set with SetURL using the input stream previously set with SetInputStream. | |
Protected Member Functions | |
virtual wxCurlThreadError | StartTransfer () |
Starts the transfer. | |
virtual void * | Entry () |
Protected Attributes | |
wxCurlUploadThreadInputFilter | m_input |
The input stream for uploaded data. | |
Friends | |
class | wxCurlUploadThreadInputFilter |
A simple joinable thread which allows uploading resources to the net without blocking the GUI of your app.
wxCurlThreadError wxCurlUploadThread::SetInputStream | ( | wxInputStream * | in = NULL |
) |
Sets the output stream where the downloaded data are written.
If you pass NULL to this function, then a new temporary file will be used.
virtual wxCurlThreadError wxCurlUploadThread::StartTransfer | ( | ) | [inline, protected, virtual] |
Starts the transfer.
This is equivalent to call wxCurlDownloadThread::Download or wxCurlUploadThread::Upload.
Implements wxCurlBaseThread.
wxCurlThreadError wxCurlUploadThread::Upload | ( | ) |
Uploads the URL previously set with SetURL using the input stream previously set with SetInputStream.
wxCurlThreadError wxCurlUploadThread::Upload | ( | const wxString & | url, | |
wxInputStream * | in = NULL | |||
) |
Creates and runs this thread for upload to the given URL of the given input stream (internally calls SetURL and SetOutputStream).