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: 00015 * 00016 */ 00017 00018 00019 #ifndef R_LBSLOCINFOCONVERTER_H_ 00020 #define R_LBSLOCINFOCONVERTER_H_ 00021 00022 00023 #include <lbs/lbslocationcommon.h> 00024 #include <lbs/lbslocationinfoconvertercommon.h> 00025 #include "rlbslocmonitorsession.h" 00026 #include "rsecuresessionbase.h" 00027 00028 00029 // Forward declaration 00030 class CLbsLocInfoConversionHandler; 00031 class CLbsLocMonitorPtrHolder; 00032 struct TLbsClientPrefs; 00033 00034 00046 class RLbsLocInfoConverter : public RSecureSubSessionBase 00047 { 00048 public: 00049 00053 IMPORT_C RLbsLocInfoConverter(); 00054 00058 IMPORT_C ~RLbsLocInfoConverter(); 00059 00071 IMPORT_C void OpenL( RLbsLocMonitorSession& aLocMonSession ); 00072 00076 IMPORT_C void Close(); 00077 00093 IMPORT_C void ConvertLocationInfoL( CLbsLocationInfoBase& aLocationInfo, 00094 TLbsConversionPrefs aConversionPrefs, 00095 const TLbsConversionOutputInfoMask& aRequestedInfo, 00096 const TUid aConverterModuleId, 00097 TRequestStatus& aStatus ); 00098 00114 IMPORT_C void ConvertLocationInfoL( RLbsLocationInfoBaseArray& aLocationInfoArray, 00115 TLbsConversionPrefs aConversionPrefs, 00116 TLbsConversionOutputInfoMask aRequestedInfo, 00117 const TUid aConverterModuleId, 00118 TRequestStatus& aStatus ); 00119 00123 IMPORT_C void CancelConvertLocationInfo(); 00124 00129 void HandleSingleConversionBufferSizeL(); 00130 00135 void HandleMultipleConversionBufferSizeL(); 00136 00140 void ValidateLocationInfoL( CLbsLocationInfoBase* aLocationInfo ); 00141 00142 00143 private: 00147 void ConstructL(); 00148 00149 00150 private: // Member variables 00154 CLbsLocInfoConversionHandler* iConversionHandler; 00155 00160 CLbsLocMonitorPtrHolder* iPtrHolder; 00161 00166 TInt iBufferSize; 00167 00171 TLbsClientPrefs* iClientPrefs; 00172 }; 00173 00174 #endif /*R_LBSLOCINFOCONVERTER_H_*/