locationrequestmgmt/networkrequesthandler/inc/measurementinfomonitor.h
changeset 36 b47902b73a93
parent 0 9cfd9a3ee49c
equal deleted inserted replaced
35:a2efdd544abf 36:b47902b73a93
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef MEASUREMENTINFOMONITOR_H_
       
    23 #define MEASUREMENTINFOMONITOR_H_
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <lbs/lbsgpsmeasurement.h>
       
    27 #include <lbs/lbsadmin.h>
       
    28 #include "LbsInternalInterface.h"
       
    29 
       
    30 /**
       
    31 */
       
    32 class MLbsMeasurementInfoObserver
       
    33 	{
       
    34 public:
       
    35 	virtual void OnMeasurementInfoUpdate(
       
    36 			TInt aReason, 
       
    37 			const TPositionGpsMeasurementInfo& aMeasurementResults,
       
    38 			const TTime& aActualTime) = 0;	
       
    39 	};
       
    40 
       
    41 /**
       
    42 */
       
    43 class CLbsMeasurementInfoMonitor : public CActive
       
    44 	{
       
    45 public:	
       
    46 	static CLbsMeasurementInfoMonitor* NewL(
       
    47 			MLbsMeasurementInfoObserver& aObserver);
       
    48 	~CLbsMeasurementInfoMonitor();
       
    49 	 
       
    50 public:
       
    51 	void StartMonitor();
       
    52 	void StopMonitor();
       
    53 	
       
    54 	void GetMeasurement(
       
    55 			TInt& aReason, 
       
    56 			TPositionGpsMeasurementInfo& aMeasurementResults,
       
    57 			TTime& aActualTime);
       
    58 	
       
    59 protected:
       
    60 	CLbsMeasurementInfoMonitor();
       
    61 	CLbsMeasurementInfoMonitor(MLbsMeasurementInfoObserver& aObserver);
       
    62 	void ConstructL();
       
    63 	
       
    64 protected: // From CActive
       
    65 	void RunL();
       
    66 	TInt RunError(TInt aError);
       
    67 	void DoCancel();	
       
    68 	
       
    69 private:
       
    70 	MLbsMeasurementInfoObserver& iObserver;
       
    71 	RLbsGpsMeasurementUpdates iLbsMeasurementInfoMonitor;
       
    72 	};
       
    73 
       
    74 #endif /*MEASUREMENTINFOMONITOR_H_*/