AsyncWorker
#include <bb/data/AsyncWorker>
To link against this class, add the following line to your .pro file: LIBS += -lbbdata
Represents objects that do asynchronous work.
You can extend this class and pass it to an AsyncDataAccess object and it will perform the work in another thread.
An AsyncWorker is expected to perform multiple operations with commands being passed to it using one of the execute functions in AsyncDataAccess.
See SqlWorker for a concrete example of how this can be used.
BlackBerry 10.0.0
Inheritance
| bb::data::AsyncWorker | |||
| bb::data::SqlWorker | |||
Public Functions Index
| AsyncWorker (QObject *parent=0) | |
| virtual | ~AsyncWorker () |
| void | execute (const QVariant &criteria, bb::data::DataAccessReply *replyData)=0 |
Public Functions
Constructs a worker that will perform asynchronous work.
Ownership will be managed by the async framework. The object ownership will be transferred to an internal object within this framework.
| Parameters | |
|---|---|
| parent |
The parent owner. Do not specify as ownership will be overridden. |
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
void
Executes a task asynchronously in another thread provided by AsyncDataAccess.
This method will ultimately be called when either AsyncDataAccess::execute() or AsyncDataAccess::executeAndWait() is called.
| Parameters | |
|---|---|
| criteria |
The work to be performed such as an SQL query command. |
| replyData |
An output parameter, which is a pointer to an object that is updated with work results. |
BlackBerry 10.0.0