00001 /* 00002 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 00003 * All rights reserved. 00004 * This component and the accompanying materials are made available 00005 * under the terms of "Eclipse Public License v1.0" 00006 * which accompanies this distribution, and is available 00007 * at the URL "http://www.eclipse.org/legal/epl-v10.html". 00008 * 00009 * Initial Contributors: 00010 * Nokia Corporation - initial contribution. 00011 * 00012 * Contributors: 00013 * 00014 * Description: Class used by client applications to convert data 00015 * such as such as WlanInfo or CellIds into TLocality position information 00016 * 00017 */ 00018 00025 #ifndef LBS_LOCATIONRESOLVER_H 00026 #define LBS_LOCATIONRESOLVER_H 00027 00028 00029 #include <e32base.h> 00030 #include <lbs/lbslocationcommon.h> 00031 #include <lbs/lbslocationinfo.h> 00032 #include <lbs/lbslocationinfoconvertercommon.h> 00033 00034 class CLbsLocationResolverImpl; 00035 00036 00037 class MLbsLocationResolverObserver 00038 { 00039 00040 public: 00041 00048 IMPORT_C virtual TVersion Version() const; 00049 00060 virtual void OnResolveLocationComplete(TInt aStatus, const TLocality& aLocality) = 0; 00061 00062 }; 00063 00064 00065 class CLbsLocationResolver : public CBase 00066 { 00067 00068 public: 00069 00075 IMPORT_C static CLbsLocationResolver* NewL(MLbsLocationResolverObserver& aObserver, 00076 const TUid aConverterModuleId); 00077 00082 IMPORT_C static CLbsLocationResolver* NewL(MLbsLocationResolverObserver& aObserver); 00083 00087 IMPORT_C ~CLbsLocationResolver(); 00088 00100 IMPORT_C void ResolveLocationL(const CLbsLocationInfo& aLocationInfo); 00101 00107 IMPORT_C TInt SetConversionPreferences(TLbsConversionPrefs aConversionPrefs); 00108 00115 IMPORT_C TLbsConversionPrefs ConversionPreferences(); 00116 00124 IMPORT_C void CancelResolveLocation(); 00125 00126 protected: 00130 CLbsLocationResolver(); 00131 00135 void ConstructL(MLbsLocationResolverObserver& aObserver, const TUid aConverterModuleId); 00136 00137 00138 private: 00142 CLbsLocationResolver(CLbsLocationResolver&); 00143 00147 CLbsLocationResolver& operator=(CLbsLocationResolver&); 00148 00149 private: 00150 00154 CLbsLocationResolverImpl* iLocationResolverImpl; 00155 00156 }; 00157 00158 00159 #endif // LBS_LOCATIONRESOLVER_H