|
Nokia N97 SDK Example Applications Guide |
#include <gamecontroller.h>
Inheritance diagram for CWsEventReceiver:

Definition at line 144 of file gamecontroller.h.
Public Member Functions |
|
| virtual void | RunL () |
| virtual void | DoCancel () |
| ~CWsEventReceiver () | |
Static Public Member Functions |
|
| static CWsEventReceiver * | NewL (CGameController &aParent) |
Private Member Functions |
|
| CWsEventReceiver () | |
| void | ConstructL (CGameController &aParent) |
Private Attributes |
|
| RWsSession | iWsSession |
| CGameController * | iParent |
|
|
Destructor. Definition at line 448 of file gamecontroller.cpp.
|
|
|
Constructor. Definition at line 437 of file gamecontroller.cpp. 00438 :CActive( CActive::EPriorityStandard ), 00439 iParent( NULL ) 00440 { 00441 }
|
|
|
Recieves events from the Windows Server. This function gets called in the CGameController::ProcessBackgroundTasks() function, when the CActiveScheduler gets a chance to run. Definition at line 502 of file gamecontroller.cpp. References CGameController::HandleWsEvent(), iParent, and iWsSession. 00503 { 00504 TWsEvent wsEvent; 00505 iWsSession.GetEvent( wsEvent ); 00506 00507 // Pass the event on to the Game Controller. 00508 iParent->HandleWsEvent( wsEvent ); 00509 00510 // Request for more events. 00511 iWsSession.EventReady( &iStatus ); 00512 00513 SetActive(); 00514 }
|
|
|
Cancels event request from the Windows Server. Definition at line 521 of file gamecontroller.cpp. References iWsSession. 00522 { 00523 iWsSession.EventReadyCancel(); 00524 }
|
|
|
Static Constructor.
Definition at line 458 of file gamecontroller.cpp. References ConstructL(). 00459 { 00460 CWsEventReceiver* self = new (ELeave) CWsEventReceiver; 00461 00462 CleanupStack::PushL( self ); 00463 00464 self->ConstructL( aParent ); 00465 00466 CleanupStack::Pop( self ); 00467 00468 return self; 00469 }
|
|
|
Two phase Constructor.
Definition at line 477 of file gamecontroller.cpp. References iParent, and iWsSession. Referenced by NewL(). 00478 { 00479 if( !CCoeEnv::Static() ) 00480 User::Leave( KErrCoeEnvNotCreated ); 00481 00482 iParent = &aParent; 00483 00484 // Register with the Windows Server for events. 00485 iWsSession = CCoeEnv::Static()->WsSession(); 00486 00487 iWsSession.EventReady( &iStatus ); 00488 00489 CActiveScheduler::Add( this ); 00490 00491 SetActive(); 00492 }
|
|
|
The Windows Server Session Definition at line 189 of file gamecontroller.h. Referenced by ConstructL(), DoCancel(), and RunL(). |
|
|
The Game controller Definition at line 192 of file gamecontroller.h. Referenced by ConstructL(), and RunL(). |
|
© Nokia 2009 |