The K Desktop Environment

KIO::TransferJob *get

Name

KIO::TransferJob *get -- downloads data from a remote URL

Synopsis

  KIO::TransferJob *get(const KURL& url, bool reload, bool showProgressInfo)
  

Parameters

url

The URL of the resource that you wish to get

reload

If true, then this will not look for a cached copy of the file. If false (default), then this will first search for a cached copy

showProgressInfo

If true (default), a progress info dialog will popup during long downloads.

Description

This is probably the most common operation. It tells the ioslave to "get" the resource described in the URL. This may be a web page, a POP3 message, or a local file -- it all depends on your URL.

This operation is not very interactive. You tell the ioslave what you want and it gets it for you. Period.

Specifically, it will send back your data with the data(KIO::Job *, const QByteArray&) signal. As always, the result of the operation will come in a result(KIO::Job*) signal.

Example

  KIO::TransferJob *job = KIO::get("http://www.kde.org");
  connect(job,  SIGNAL(data(KIO::Job*, const QByteArray&))
          this, SLOT(slotData(KIO::Job*, const QByteArray&)));
  connect(job,  SIGNAL(result(KIO::Job*)),
          this, SLOT(slotResult(KIO::Job*)));