Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

PVActiveBase Class Reference
[OSCL Proc]

#include <oscl_scheduler_aobase.h>

Inheritance diagram for PVActiveBase:

OsclActiveObject OsclTimerObject OsclAsyncFile OsclDNSRequestAO OsclSocketRequestAO PVSchedulerStopper CallbackTimer< Alloc > OsclDNSMethod OsclSocketMethod OsclSocketServI

Public Methods

 PVActiveBase (const char name[], int32 pri)
virtual ~PVActiveBase ()
bool IsInAnyQ ()
virtual int32 RunError (int32 aError)=0
virtual void Run ()=0
virtual void DoCancel ()=0
void AddToScheduler ()
void RemoveFromScheduler ()
void Destroy ()
void Activate ()
OSCL_IMPORT_REF bool IsAdded () const
void Cancel ()

Data Fields

uint32 iAddedNum
OsclNameString< PVEXECNAMELEN > iName
PVThreadContext iThreadContext
PVActiveStatsiPVActiveStats
TReadyQueLink iPVReadyQLink
bool iBusy
OsclAOStatus iStatus

Friends

class PVActiveStats
class OsclSchedulerCommonBase
class OsclActiveObject
class OsclTimerObject
class OsclReadyQ
class OsclReadyCompare
class OsclReadySetPosition
class OsclExecScheduler

Detailed Description

PV Scheduler internal AO base class. Both OsclActiveObject and OsclTimerObject derive from this class. For Symbian, this just container has the desired additions to the basic CTimer or OsclActiveObj functionality. For non-Symbian, this class contains the entire AO implementation.


Constructor & Destructor Documentation

PVActiveBase::PVActiveBase const char    name[],
int32    pri
 

virtual PVActiveBase::~PVActiveBase   [virtual]
 


Member Function Documentation

void PVActiveBase::Activate  
 

void PVActiveBase::AddToScheduler  
 

Reimplemented in OsclActiveObject, and OsclTimerObject.

void PVActiveBase::Cancel  
 

Reimplemented in OsclActiveObject, and OsclTimerObject.

void PVActiveBase::Destroy  
 

virtual void PVActiveBase::DoCancel   [pure virtual]
 

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().

Implemented in OsclDNSRequestAO, OsclSocketRequestAO, OsclActiveObject, and OsclTimerObject.

OSCL_IMPORT_REF bool PVActiveBase::IsAdded  
 

bool PVActiveBase::IsInAnyQ   [inline]
 

void PVActiveBase::RemoveFromScheduler  
 

Reimplemented in OsclActiveObject, and OsclTimerObject.

virtual void PVActiveBase::Run   [pure virtual]
 

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 Run() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

Run() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls ExecError() 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 Run() or RunError() functions.

Implemented in OsclDNSMethod, OsclDNSRequestAO, OsclSocketMethod, OsclSocketRequestAO, and CallbackTimer< Alloc >.

virtual int32 PVActiveBase::RunError int32    aError [pure virtual]
 

Virtual routine that gets called if the active object's Run routine leaves.

Parameters:
aError:  the leave code generated by the Run.
Returns:
:returns OsclErrNone if the error was handled, or returns the input aError value if not handled.

Implemented in OsclActiveObject, and OsclTimerObject.


Friends And Related Function Documentation

friend class OsclActiveObject [friend]
 

friend class OsclExecScheduler [friend]
 

friend class OsclReadyCompare [friend]
 

friend class OsclReadyQ [friend]
 

friend class OsclReadySetPosition [friend]
 

friend class OsclSchedulerCommonBase [friend]
 

friend class OsclTimerObject [friend]
 

friend class PVActiveStats [friend]
 


Field Documentation

uint32 PVActiveBase::iAddedNum
 

bool PVActiveBase::iBusy
 

OsclNameString<PVEXECNAMELEN> PVActiveBase::iName
 

PVActiveStats* PVActiveBase::iPVActiveStats
 

TReadyQueLink PVActiveBase::iPVReadyQLink
 

OsclAOStatus PVActiveBase::iStatus
 

The request status associated with an asynchronous request.

This is passed as a parameter to all asynchronous service providers.

The active scheduler uses this to check whether the active object's request has completed.

The function can use the completion code to judge the success or otherwise of the request.

Request status contains one of the values OSCL_REQUEST_ERR_NONE: request completed with no error, or request is not active. OSCL_REQUEST_PENDING: request is active & pending OSCL_REQUEST_ERR_CANCEL: request was canceled before completion. or any user-defined value.

PVThreadContext PVActiveBase::iThreadContext
 


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310