#include <oscl_scheduler_ao.h>
Inheritance diagram for OsclActiveObject:
Public Types | |
enum | OsclActivePriority { EPriorityIdle = -100, EPriorityLow = -20, EPriorityNominal = 0, EPriorityHigh = 10, EPriorityHighest = 20 } |
Public Methods | |
OSCL_IMPORT_REF | OsclActiveObject (int32 aPriority, const char name[]) |
virtual OSCL_IMPORT_REF | ~OsclActiveObject () |
OSCL_IMPORT_REF void | SetBusy () |
OSCL_IMPORT_REF bool | IsBusy () const |
OSCL_IMPORT_REF void | PendForExec () |
OSCL_IMPORT_REF void | PendComplete (int32 aStatus) |
OSCL_IMPORT_REF void | AddToScheduler () |
OSCL_IMPORT_REF void | RemoveFromScheduler () |
OSCL_IMPORT_REF void | RunIfNotReady () |
OSCL_IMPORT_REF void | Cancel () |
OSCL_IMPORT_REF int32 | Priority () const |
OSCL_IMPORT_REF int32 | Status () const |
OSCL_IMPORT_REF void | SetStatus (int32) |
OSCL_IMPORT_REF OsclAOStatus & | StatusRef () |
Protected Methods | |
virtual OSCL_IMPORT_REF void | DoCancel () |
virtual OSCL_IMPORT_REF int32 | RunError (int32 aError) |
|
|
Constructor.
|
|
Destructor. |
|
Add this exec object to the current thread's scheduler. Reimplemented from PVActiveBase. |
|
Cancel any pending request. If the request is readied, this will call the DoCancel routine, wait for the request to cancel, then set the request idle. The AO will not run. If the request is not readied, it does nothing. Request must be canceled from the same thread in which it is scheduled. Reimplemented from PVActiveBase. |
|
Cancel request handler. This gets called by scheduler when the request is cancelled. The default routine will complete the request. If any additional action is needed, the derived class may override this. If the derived class does override DoCancel, it must complete the request. Implements PVActiveBase. Reimplemented in OsclDNSRequestAO, and OsclSocketRequestAO. |
|
Return true if this AO is pending, false otherwise. |
|
Complete the active request for the AO. This API is thread-safe. If the request is not pending, this call will leave.
|
|
Set request active for this AO and set the status to pending. PendForExec is identical to SetActive, but it additionally sets the request status to OSCL_REQUEST_PENDING. |
|
Return scheduling priority of this exec object. |
|
Remove this AO from its scheduler. Will leave if the calling thread context does not match the scheduling thread. Cancels any readied request before removing. Reimplemented from PVActiveBase. |
|
Run Error handler. This gets called by scheduler when the Run routine leaves. The default implementation simply returns the leave code. If the derived class wants to handle errors from Run, it may override this. The RunError should return OsclErrNone if it handles the error, otherwise it should return the input error code.
Implements PVActiveBase. |
|
Complete this AO's request immediately. If the AO is already active, this will do nothing. Will leave if the AO is not added to any scheduler, or if the calling thread context does not match the scheduling thread. |
|
Set object ready for this AO, additionally sets the request status to OSCL_REQUEST_PENDING. Will leave if the request is already readied, or the execution object is not added to any scheduler, or the calling thread context does not match the scheduler thread. |
|
|
|
Request status access |
|
|