|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
An active object that performs its processing through an associated call back function, and which is only performed once. More...
#include <e32base.h>
Public Member Functions | |
| IMPORT_C | CAsyncCallBack (TInt aPriority) |
| Constructor taking a priority value. | |
| IMPORT_C | CAsyncCallBack (const TCallBack &aCallBack, TInt aPriority) |
| Constructor taking a priority value and a callback. | |
| IMPORT_C void | Set (const TCallBack &aCallBack) |
| Sets the call back. | |
| IMPORT_C void | CallBack () |
| Queues this active object to be run, if it is not already queued. | |
| virtual IMPORT_C | ~CAsyncCallBack () |
| Destructor. | |
Public Member Functions inherited from CAsyncOneShot | |
| IMPORT_C | CAsyncOneShot (TInt aPriority) |
| Constructor taking a priority value. | |
| virtual IMPORT_C void | DoCancel () |
| Implements cancellation of an outstanding request. | |
| virtual IMPORT_C void | Call () |
| Queues this active object to be run once. | |
| virtual IMPORT_C | ~CAsyncOneShot () |
| Frees resources prior to destruction. | |
| RThread & | Thread () |
| Gets a handle to the current thread. | |
Public Member Functions inherited from CActive | |
| IMPORT_C | ~CActive () |
| Frees resources prior to destruction. | |
| IMPORT_C void | Cancel () |
| Cancels the wait for completion of an outstanding request. | |
| IMPORT_C void | Deque () |
| Removes the active object from the active scheduler's list of active objects. | |
| IMPORT_C void | SetPriority (TInt aPriority) |
| Sets the priority of the active object. | |
| TBool | IsActive () const |
| Determines whether the active object has a request outstanding. | |
| TBool | IsAdded () const |
| Determines whether the active object has been added to the active scheduler's list of active objects. | |
| TInt | Priority () const |
| Gets the priority of the active object. | |
Public Member Functions inherited from CBase | |
| CBase () | |
| Default constructor. | |
| virtual IMPORT_C | ~CBase () |
| Virtual destructor. | |
| TAny * | operator new (TUint aSize, TAny *aBase) __NO_THROW |
| Initialises the object to binary zeroes. | |
| TAny * | operator new (TUint aSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TUint aExtraSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave, TUint aExtraSize) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
Protected Member Functions | |
| virtual void | RunL () |
| Handles an active object's request completion event. | |
Protected Member Functions inherited from CActive | |
| IMPORT_C | CActive (TInt aPriority) |
| Constructs the active object with the specified priority. | |
| IMPORT_C void | SetActive () |
| Indicates that the active object has issued a request and that it is now outstanding. | |
| virtual IMPORT_C TInt | RunError (TInt aError) |
| Handles a leave occurring in the request completion event handler RunL(). | |
| virtual IMPORT_C TInt | Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1) |
| Extension function. | |
Protected Attributes | |
| TCallBack | iCallBack |
| The callback object that encapsulates the callback function. | |
Additional Inherited Members | |
Public Types inherited from CActive | |
| enum | TPriority { EPriorityIdle =-100 , EPriorityLow =-20 , EPriorityStandard =0 , EPriorityUserInput =10 , EPriorityHigh =20 } |
| Defines standard priorities for active objects. More... | |
Static Public Member Functions inherited from CBase | |
| static IMPORT_C void | Delete (CBase *aPtr) |
| Deletes the specified object. | |
Public Attributes inherited from CActive | |
| TRequestStatus | iStatus |
| The request status associated with an asynchronous request. | |
An active object that performs its processing through an associated call back function, and which is only performed once.
| IMPORT_C CAsyncCallBack::CAsyncCallBack | ( | TInt | aPriority | ) |
Constructor taking a priority value.
Specifically, the constructor sets this active object's priority value through a call to the base class constructor in its ctor list.
No call back is set, which means that it must be set subsequently through a call to the Set() function.
| aPriority | The active object priority value. CActive::TPriority defines a standard set of priorities. |
(generated from Symbian Developer Library)
| IMPORT_C CAsyncCallBack::CAsyncCallBack | ( | const TCallBack & | aCallBack, |
| TInt | aPriority | ||
| ) |
Constructor taking a priority value and a callback.
Specifically, the constructor:
| aCallBack | A reference to a callback object encapsulating a function which is called when this active object is ready to run. The constructor takes a copy of this callback object, which means that it can be safely discarded after construction. |
| aPriority | The active object priority value. |
(generated from Symbian Developer Library)
|
virtual |
Destructor.
(generated from Symbian Developer Library)
| IMPORT_C void CAsyncCallBack::CallBack | ( | ) |
Queues this active object to be run, if it is not already queued.
(generated from Symbian Developer Library)
|
protectedvirtual |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
Implements CActive.
| IMPORT_C void CAsyncCallBack::Set | ( | const TCallBack & | aCallBack | ) |
Sets the call back.
| aCallBack | A reference to a callback object encapsulating a function which is called when this active object is ready to run. |
Panic condition: E32USER-CBase 1 if the active object is currently active.
(generated from Symbian Developer Library)
|
protected |