--- a/omadrm/drmengine/drmclock/Inc/GPSWatcher.h Mon May 03 12:46:34 2010 +0300
+++ b/omadrm/drmengine/drmclock/Inc/GPSWatcher.h Fri May 14 16:07:34 2010 +0300
@@ -21,39 +21,52 @@
#define GPSWATCHER_H_
#include <lbs.h>
-
+#include <epos_intgpshwstatus.h>
class CGPSTimeUpdater;
class CDRMClock;
-class CGPSWatcher : public CTimer
+
+class CGPSWatcher : public CTimer, public MPosIntGpsHwStatusObserver
{
public:
~CGPSWatcher();
static CGPSWatcher* NewL( CDRMClock* aClock );
+public: // from MPosIntGpsHwStatusObserver
+ /**
+ * Notify observer of a GPS hardware status event
+ * @param aStatus The GPS hardware status.
+ * @param aError KErrNone if successful. Other possible error values defined by RProperty::Get()
+ */
+ void OnStatusUpdateEvent(CPosIntGpsHwStatus::TIntGpsHwStatus aStatus, TInt aError);
+
private:
CGPSWatcher( CDRMClock* aClock );
void ConstructL();
- void CheckModules();
- void Subscribe();
+ void CheckSatellites();
+ TInt CheckModules();
void RunL();
void DoCancel();
TInt RunError( TInt aError );
private:
- RPositionServer iPosServer;
- TPositionModuleStatusEvent iStatusEvent;
+ // owned:
+ RPointerArray<CGPSTimeUpdater> iTimeUpdaters;
- // owned
- CGPSTimeUpdater *iTimeUpdater;
+ // not owned:
+ CDRMClock* iClock;
- // not owned
- CDRMClock* iClock;
-
- // Retry counter
- TInt iRetryCounter;
+ // GPS status information:
+ CPosIntGpsHwStatus* iStatusUpdater;
+
+ // status received from GPS:
+ CPosIntGpsHwStatus::TIntGpsHwStatus iGpsStatus;
+
+ // List of active satellite modules:
+ RPointerArray<TPositionModuleInfo> iActiveSatelliteModules;
+
};
#endif /* GPSWATCHER_H_ */