omadrm/drmengine/drmclock/Inc/GPSWatcher.h
branchRCL_3
changeset 32 457cd4423b8c
parent 20 a20e54f39dd4
--- a/omadrm/drmengine/drmclock/Inc/GPSWatcher.h	Tue Apr 27 16:56:11 2010 +0300
+++ b/omadrm/drmengine/drmclock/Inc/GPSWatcher.h	Tue May 11 16:28:38 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_ */