omadrm/drmengine/drmclock/Inc/GPSWatcher.h
changeset 23 493788a4a8a4
child 31 908beac81e0a
equal deleted inserted replaced
5:79d62d1d7957 23:493788a4a8a4
       
     1 
       
     2 /*
       
     3 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:  Implementation of the GPS Watcher
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef GPSWATCHER_H_
       
    21 #define GPSWATCHER_H_
       
    22 
       
    23 #include <lbs.h>
       
    24 
       
    25 
       
    26 class CGPSTimeUpdater;
       
    27 class CDRMClock;
       
    28 
       
    29 class CGPSWatcher : public CTimer
       
    30 	{
       
    31 public:
       
    32 	~CGPSWatcher();
       
    33 	static CGPSWatcher* NewL( CDRMClock* aClock );
       
    34 
       
    35 private:
       
    36 	CGPSWatcher( CDRMClock* aClock );
       
    37 	void ConstructL();
       
    38 	
       
    39 	void CheckModules();
       
    40 	void Subscribe();
       
    41 	void RunL();
       
    42 	void DoCancel();
       
    43 	TInt RunError( TInt aError );
       
    44 	
       
    45 private:
       
    46 	RPositionServer iPosServer;
       
    47 	TPositionModuleStatusEvent iStatusEvent;
       
    48 	
       
    49 	// owned
       
    50 	CGPSTimeUpdater *iTimeUpdater;
       
    51 	
       
    52 	// not owned
       
    53 	CDRMClock* iClock;
       
    54 
       
    55 	// Retry counter
       
    56 	TInt iRetryCounter;
       
    57 	};
       
    58 
       
    59 #endif /* GPSWATCHER_H_ */