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

Definition at line 25 of file gmssignalmonitor.h.
Public Member Functions |
|
| virtual | ~CGMSSignalMonitor () |
Static Public Member Functions |
|
| static CGMSSignalMonitor * | NewL (MSignalObserver &aObserver) |
| static CGMSSignalMonitor * | NewLC (MSignalObserver &aObserver) |
Private Member Functions |
|
| CGMSSignalMonitor (MSignalObserver &aObserver) | |
| void | ConstructL () |
| void | StartL () |
| void | RunL () |
| void | DoCancel () |
| TInt | RunError (TInt aError) |
Private Attributes |
|
| CTelephony * | iTelephony |
| CTelephony::TSignalStrengthV1 | iSignal |
| CTelephony::TSignalStrengthV1Pckg | iPackage |
| MSignalObserver & | iObserver |
|
|
Cancel the pending request and destroy the object Definition at line 63 of file gmssignalmonitor.cpp. References iTelephony. 00064 { 00065 Cancel(); // Cancel any request, if outstanding 00066 delete iTelephony; 00067 // Delete instance variables if any 00068 }
|
|
|
C++ constructor Definition at line 18 of file gmssignalmonitor.cpp. Referenced by NewLC(). 00018 : 00019 CActive(EPriorityStandard), // Standard priority 00020 iPackage(iSignal), 00021 iObserver(aObserver) 00022 { 00023 }
|
|
|
Two-phased constructor. Definition at line 41 of file gmssignalmonitor.cpp. References NewLC(). Referenced by CHsSMWidgetExample::ConstructL(). 00042 { 00043 CGMSSignalMonitor* self = CGMSSignalMonitor::NewLC(aObserver); 00044 CleanupStack::Pop(); // self; 00045 return self; 00046 }
|
|
|
Two-phased constructor. Leaves constructed object on the cleanup stack Definition at line 29 of file gmssignalmonitor.cpp. References CGMSSignalMonitor(). Referenced by NewL(). 00030 { 00031 CGMSSignalMonitor* self = new (ELeave) CGMSSignalMonitor(aObserver); 00032 CleanupStack::PushL(self); 00033 self->ConstructL(); 00034 return self; 00035 }
|
|
|
Second-phase constructor Definition at line 52 of file gmssignalmonitor.cpp. References iTelephony, and StartL(). 00053 { 00054 iTelephony = CTelephony::NewL(); 00055 CActiveScheduler::Add(this); // Add to scheduler 00056 StartL(); 00057 }
|
|
|
Function for making the initial asynchronous request Definition at line 84 of file gmssignalmonitor.cpp. References iPackage, and iTelephony. Referenced by ConstructL(), and RunL(). 00085 { 00086 if(!IsActive()) 00087 { 00088 iTelephony->NotifyChange(iStatus, 00089 CTelephony::ESignalStrengthChange, iPackage); 00090 SetActive(); // Tell scheduler a request is active 00091 } 00092 }
|
|
|
From CActive. Handle completion of the current pending request Definition at line 98 of file gmssignalmonitor.cpp. References iObserver, iSignal, MSignalObserver::SignalLevelChangedL(), and StartL(). 00099 { 00100 // leave in case the call completed with an error 00101 // this will cause the RunError method to be called with 00102 // CActive::iStatus' value as parameter 00103 User::LeaveIfError(iStatus.Int()); 00104 00105 // forward the info to the observer 00106 iObserver.SignalLevelChangedL(iSignal.iSignalStrength, iSignal.iBar); 00107 00108 // re-start 00109 StartL(); 00110 }
|
|
|
From CActive. Get's called when the current pending request is being cancelled. Definition at line 75 of file gmssignalmonitor.cpp. References iTelephony. 00076 { 00077 iTelephony->CancelAsync(CTelephony::ESignalStrengthChangeCancel); 00078 }
|
|
|
From CActive. Override to handle leaves from RunL(). Ignores all errors but the active object remains innactive. Definition at line 117 of file gmssignalmonitor.cpp.
|
|
|
Pointer to ETel 3rd Party API's CTelephony Definition at line 83 of file gmssignalmonitor.h. Referenced by ConstructL(), DoCancel(), StartL(), and ~CGMSSignalMonitor(). |
|
|
Instance of ETel 3rd Party API's TSignalStrengthV1 Definition at line 88 of file gmssignalmonitor.h. Referenced by RunL(). |
|
|
Packaged instance of ETel 3rd Party API's TSignalStrengthV1 Definition at line 93 of file gmssignalmonitor.h. Referenced by StartL(). |
|
|
A MSignalObserver reference. Will be used to send signal change notifications to the observer registered with this asynchronous network signal monitor Definition at line 100 of file gmssignalmonitor.h. Referenced by RunL(). |
|
© Nokia 2009 |