Development/Tutorials/Plasma4/JavaScript/API-IOJobs

From KDE TechBase
Revision as of 12:09, 24 June 2011 by Aseigo (talk | contribs) (Created page with '= IOJob = This object is returned by input/output access for asynchronous file and data access (see the section on Extensions for documentation on getUrl). It is used by connect...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

IOJob

This object is returned by input/output access for asynchronous file and data access (see the section on Extensions for documentation on getUrl). It is used by connecting Javascript functions in your code to the relevant signals.

Functions:

  • kill()
  • suspend()
  • resume()

Signals:

  • data(IOJob job, ByteArray data): emitted whenever data arrives. If data is empty (data.length == 0) then the transmission has completed.
  • dataReq(IOJob job, ByteArray data): when sending data, this signal is emitted when data is requested; add the data to be sent ot the data member, or leave it empty to signal that the process is complete and there is no more data to send
  • finished(IOJob job): emitted when the transmission has completed
  • suspended(IOJob job): emitted when the job has been suspeneded
  • resumed(IOJob job)
  • canceled(IOJob job)
  • connected(IOJob job)
  • redirection(IOJob job, Url to)
  • permanentRedirection(IOJob job, Url from, Url to)
  • mimetype(IOJob job, String mimetype)