00001 /* 00002 * Copyright (c) 2008 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: Location information converter plug in API 00015 * 00016 */ 00017 00018 00026 #ifndef LBS_LOC_INFO_CONVERSION_PLUGIN_BASE_H 00027 #define LBS_LOC_INFO_CONVERSION_PLUGIN_BASE_H 00028 00029 00030 // System wide 00031 #include <e32base.h> 00032 00033 // Common LBS data types 00034 #include <lbs/lbslocationinfo.h> 00035 #include <lbs/lbslocationinfoconvertercommon.h> 00036 00037 // Component specific 00038 #include <lbs/lbslocinfoconverterplugincommon.h> 00039 #include <lbs/lbslocinfoconverterpluginclasstypes.h> 00040 00041 00042 class TLbsLocInfoConverterPluginParams; 00043 00044 00054 class MLbsLocInfoConverterPluginObserver 00055 { 00056 00057 public: 00058 00065 IMPORT_C virtual TVersion Version() const; 00066 00077 IMPORT_C virtual void OnValidationComplete( TInt aStatusCode ) = 0; 00078 00098 IMPORT_C virtual void OnConversionComplete( TInt aStatusCode ) = 0; 00099 00100 private: 00101 00106 IMPORT_C virtual TAny* ExtendedInterface( TInt aFunctionNumber, 00107 TAny* aPtr1, 00108 TAny* aPtr2 ); 00109 00110 }; 00111 00112 00132 class CLbsLocInfoConverterPluginBase : public CBase 00133 { 00134 00135 public: 00136 00146 IMPORT_C static CLbsLocInfoConverterPluginBase* NewL( 00147 TUid aImplementationUid, 00148 TLbsLocInfoConverterPluginParams& aParams ); 00149 00153 IMPORT_C virtual ~CLbsLocInfoConverterPluginBase(); 00154 00161 IMPORT_C virtual TVersion Version() const; 00162 00176 IMPORT_C virtual void ValidateClient( const TSecureId& aSecureId, 00177 const TVendorId& aVendorId, 00178 const TLbsConversionOutputInfoMask aRequestedInfo) = 0; 00179 00188 IMPORT_C virtual void CancelValidateClient() = 0; 00189 00208 IMPORT_C virtual void ConvertLocationInfoL( 00209 RLbsLocationInfoArray& aLocationInfoArray, 00210 const TLbsConversionPrefs aConversionPrefs, 00211 const TLbsConversionOutputInfoMask aRequestedInfo ) = 0; 00212 00220 IMPORT_C virtual void CancelConvertLocationInfo() = 0; 00221 00222 00228 IMPORT_C virtual void ConversionPluginPreferences( 00229 TLbsConversionPluginInfo& aPluginInfo ) = 0; 00230 00235 IMPORT_C virtual TAny* ExtendedInterface( TInt aFunctionNumber, 00236 TAny* aPtr1, 00237 TAny* aPtr2 ); 00238 00239 private: // data 00240 00247 TUid iDtor_ID_Key; 00248 00249 }; 00250 00251 00263 class TLbsLocInfoConverterPluginParams : public TLbsLocInfoConverterPluginClassTypeBase 00264 { 00265 00266 public: 00267 00278 IMPORT_C TLbsLocInfoConverterPluginParams( 00279 MLbsLocInfoConverterPluginObserver& aObserver ); 00280 00287 IMPORT_C MLbsLocInfoConverterPluginObserver& Observer() const; 00288 00289 protected: 00290 00294 MLbsLocInfoConverterPluginObserver& iObserver; 00295 00299 TUint8 iReserved[20]; 00300 00301 }; 00302 00303 #endif // LBS_LOC_INFO_CONVERSION_PLUGIN_BASE_H