datasourcemodules/gpspositioningmodule/lbsagpspsy/inc/responsehandler/crefdatabus.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 // An ative object wrapper to manage the reference data bus. This is the P&S bus
       
    15 // that the network gateway publishes to.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @InternalComponent
       
    22 */
       
    23 
       
    24 #ifndef __LBSREFDATABUS_H__
       
    25 #define __LBSREFDATABUS_H__
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <lbspositioninfo.h>
       
    29 #include "lbsnetinternalapi.h"
       
    30 #include "lbsreffnpint.h"
       
    31 
       
    32 class MDataBusObserver;
       
    33 
       
    34 
       
    35 
       
    36 /**
       
    37 Assumes something else has already called RLbsPositionUpdates::InitializeL()
       
    38 */
       
    39 class CRefDataBus : public CActive
       
    40 	{
       
    41 public:
       
    42 	static CRefDataBus* NewL(MDataBusObserver& aObserver);
       
    43 	~CRefDataBus();
       
    44 	void Subscribe();
       
    45 	void UnSubscribe();
       
    46 	TInt GetLastPositionInfo(TPositionInfo& aRefInfo, TTime& aActualTime);
       
    47 	
       
    48 	/**
       
    49 	The panic codes for the reference data bus object.
       
    50 	*/
       
    51 	enum TRefDataBusPanic
       
    52 		{
       
    53 		/** 
       
    54 		An instance of the MRefDataBusObserver has not been passed to the object.
       
    55 		The panic category will be "RefDataBus".
       
    56 		*/
       
    57 		ERefDataBusObserverNotSet = 0
       
    58 		};
       
    59 
       
    60 private:
       
    61 	CRefDataBus(MDataBusObserver& aObserver);
       
    62 	void ConstructL();
       
    63 	
       
    64 	// from CActive
       
    65 	void RunL();
       
    66 	void DoCancel();
       
    67 	TInt RunError(TInt aError);
       
    68 
       
    69 private:
       
    70 	MDataBusObserver& 		iObs;
       
    71 	RLbsNetworkPositionUpdates	iRefDataBus;
       
    72 	TPositionInfo iPositionInfo;
       
    73 	};
       
    74 
       
    75 #endif // __LBSREFDATABUS_H__