Public Member Functions | |
~CThreadEngine (void) | |
void | DoCancel () |
void | RunL () |
TInt | RunError (TInt aError) |
void | StartL () |
void | CreateThreadsL () |
void | KillThread (TInt aThreadCount) |
void | SetSyncValue (TInt aValue) |
TInt | GetSyncValue () const |
Static Public Member Functions | |
static CThreadEngine * | NewL (CThreadAppView *aView) |
static CThreadEngine * | NewLC (CThreadAppView *aView) |
static TInt | ExecuteThreadOne (TAny *aPtr) |
static TInt | ExecuteThreadTwo (TAny *aPtr) |
static TInt | ExecuteThreadThree (TAny *aPtr) |
Public Attributes | |
RMutex | iMutex |
CThreadEngine application engine class.
Definition at line 26 of file threadengine.h.
CThreadEngine::~CThreadEngine | ( | void | ) |
Destructor
Definition at line 42 of file threadengine.cpp.
CThreadEngine * CThreadEngine::NewL | ( | CThreadAppView * | aView | ) | [static] |
Create new CThreadEngine object return a pointer to the created instance of CThreadEngine
aView | a Pointer to CThreadAppView. |
Definition at line 56 of file threadengine.cpp.
CThreadEngine * CThreadEngine::NewLC | ( | CThreadAppView * | aView | ) | [static] |
Definition at line 63 of file threadengine.cpp.
void CThreadEngine::DoCancel | ( | ) |
void CThreadEngine::RunL | ( | ) |
Implementation of the timer's virtual method. Check that all threads are alive and running, if not then restart them.
Definition at line 103 of file threadengine.cpp.
TInt CThreadEngine::RunError | ( | TInt | aError | ) |
Handles a leave occurring in the request completion event handler RunL(). return returns always KErrNone
Definition at line 207 of file threadengine.cpp.
void CThreadEngine::StartL | ( | ) |
CreateThreads and start the timer after delay.
Definition at line 85 of file threadengine.cpp.
void CThreadEngine::CreateThreadsL | ( | ) |
Initialize 3 threads and start them.
Definition at line 386 of file threadengine.cpp.
TInt CThreadEngine::ExecuteThreadOne | ( | TAny * | aPtr | ) | [static] |
Function for thread one. Thread one executes this function while it's running. param aPtr pointer to a resource.
Definition at line 293 of file threadengine.cpp.
TInt CThreadEngine::ExecuteThreadTwo | ( | TAny * | aPtr | ) | [static] |
Function for thread two. Thread two executes this function while it's running. param aPtr pointer to a resource.
Definition at line 316 of file threadengine.cpp.
TInt CThreadEngine::ExecuteThreadThree | ( | TAny * | aPtr | ) | [static] |
Function for thread three. Thread three executes this function while it's running. param aPtr pointer to a resource.
Definition at line 339 of file threadengine.cpp.
void CThreadEngine::KillThread | ( | TInt | aThreadCount | ) |
Kill one of the threads. CreateThreadsL must have been called before this. param aThreadCount the number of the thread that should be killed (1-3).
Definition at line 235 of file threadengine.cpp.
void CThreadEngine::SetSyncValue | ( | TInt | aValue | ) |
This is a thread-safe function. Set synchronized variable. param aValue Value of the variable.
Definition at line 362 of file threadengine.cpp.
TInt CThreadEngine::GetSyncValue | ( | ) | const |
This is a thread-safe function. return value of the synchronized variable.
Definition at line 375 of file threadengine.cpp.